Skip to content

Commit

Permalink
Latest BeefyApi & ParachainHost runtime interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
jacogr committed Aug 29, 2023
1 parent c028c69 commit b3c21c6
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/types/src/interfaces/beefy/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import type { DefinitionCall, DefinitionsCall } from '../../types/index.js';

const BEEFY_V1_V2: Record<string, DefinitionCall> = {
const BEEFY_V1_V3: Record<string, DefinitionCall> = {
beefy_genesis: {
description: 'Return the block number where BEEFY consensus is enabled/started',
params: [],
Expand Down Expand Up @@ -60,11 +60,15 @@ const BEEFY_MMR_V1: Record<string, DefinitionCall> = {
export const runtime: DefinitionsCall = {
BeefyApi: [
{
methods: BEEFY_V1_V2,
methods: BEEFY_V1_V3,
version: 3
},
{
methods: BEEFY_V1_V3,
version: 2
},
{
methods: BEEFY_V1_V2,
methods: BEEFY_V1_V3,
version: 1
}
],
Expand Down
42 changes: 42 additions & 0 deletions packages/types/src/interfaces/parachains/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,50 @@ const PH_V4: DefinitionsCallEntry['methods'] = {
}
};

const PH_V5: DefinitionsCallEntry['methods'] = {
key_ownership_proof: {
description: 'Returns a merkle proof of a validator session key',
params: [
{
name: 'validatorId',
type: 'ValidatorId'
}
],
type: 'Option<OpaqueKeyOwnershipProof'
},
submit_report_dispute_lost: {
description: 'Submit an unsigned extrinsic to slash validators who lost a dispute about a candidate of a past session',
params: [
{
name: 'disputeProof',
type: 'DisputeProof'
},
{
name: 'keyOwnershipProof',
type: 'OpaqueKeyOwnershipProof'
}
],
type: 'Option<Null>'
},
unapplied_slashes: {
description: 'Returns a list of validators that lost a past session dispute and need to be slashed',
params: [],
type: 'Vec<(SessionIndex, CandidateHash, PendingSlashes)'
}
};

export const runtime: DefinitionsCall = {
ParachainHost: [
{
methods: {
...PH_V1_TO_V2,
...PH_V2_TO_V3,
...PH_V3,
...PH_V4,
...PH_V5
},
version: 5
},
{
methods: {
...PH_V1_TO_V2,
Expand Down

0 comments on commit b3c21c6

Please sign in to comment.