From b3c21c61216a861c5a2bba261a860b96b99ff322 Mon Sep 17 00:00:00 2001 From: Jaco Date: Tue, 29 Aug 2023 10:41:36 +0300 Subject: [PATCH] Latest BeefyApi & ParachainHost runtime interfaces --- .../types/src/interfaces/beefy/runtime.ts | 10 +++-- .../src/interfaces/parachains/runtime.ts | 42 +++++++++++++++++++ 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/packages/types/src/interfaces/beefy/runtime.ts b/packages/types/src/interfaces/beefy/runtime.ts index 505938b2183b..dec641cfd293 100644 --- a/packages/types/src/interfaces/beefy/runtime.ts +++ b/packages/types/src/interfaces/beefy/runtime.ts @@ -3,7 +3,7 @@ import type { DefinitionCall, DefinitionsCall } from '../../types/index.js'; -const BEEFY_V1_V2: Record = { +const BEEFY_V1_V3: Record = { beefy_genesis: { description: 'Return the block number where BEEFY consensus is enabled/started', params: [], @@ -60,11 +60,15 @@ const BEEFY_MMR_V1: Record = { 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 } ], diff --git a/packages/types/src/interfaces/parachains/runtime.ts b/packages/types/src/interfaces/parachains/runtime.ts index a1e0b1d27020..42b50739b2e8 100644 --- a/packages/types/src/interfaces/parachains/runtime.ts +++ b/packages/types/src/interfaces/parachains/runtime.ts @@ -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' + }, + 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,