Adjust BeefyApi to latest (#5523)
* Adjust BeefyApi to latest * Rebuild
This commit is contained in:
@@ -9,7 +9,7 @@ import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-b
|
||||
import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
|
||||
import type { ValidatorSet } from '@polkadot/types/interfaces/beefy';
|
||||
import type { BeefyEquivocationProof, ValidatorSet, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
|
||||
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
|
||||
import type { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||
@@ -91,6 +91,14 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
* Return the block number where BEEFY consensus is enabled/started
|
||||
**/
|
||||
beefyGenesis: AugmentedCall<ApiType, () => Observable<Option<BlockNumber>>>;
|
||||
/**
|
||||
* Generates a proof of key ownership for the given authority in the given set.
|
||||
**/
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (setId: ValidatorSetId | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report an equivocation.
|
||||
**/
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: BeefyEquivocationProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Return the current active BEEFY validator set
|
||||
**/
|
||||
|
||||
@@ -9,7 +9,7 @@ import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-b
|
||||
import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
|
||||
import type { ValidatorSet } from '@polkadot/types/interfaces/beefy';
|
||||
import type { BeefyEquivocationProof, ValidatorSet, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
|
||||
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
|
||||
import type { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||
@@ -91,6 +91,14 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
* Return the block number where BEEFY consensus is enabled/started
|
||||
**/
|
||||
beefyGenesis: AugmentedCall<ApiType, () => Observable<Option<BlockNumber>>>;
|
||||
/**
|
||||
* Generates a proof of key ownership for the given authority in the given set.
|
||||
**/
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (setId: ValidatorSetId | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report an equivocation.
|
||||
**/
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: BeefyEquivocationProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Return the current active BEEFY validator set
|
||||
**/
|
||||
|
||||
@@ -14,7 +14,7 @@ import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interface
|
||||
import type { UncleEntryItem } from '@polkadot/types/interfaces/authorship';
|
||||
import type { AllowedSlots, BabeAuthorityWeight, BabeBlockWeight, BabeEpochConfiguration, BabeEquivocationProof, BabeGenesisConfiguration, BabeGenesisConfigurationV1, BabeWeight, Epoch, EpochAuthorship, MaybeRandomness, MaybeVrf, NextConfigDescriptor, NextConfigDescriptorV1, OpaqueKeyOwnershipProof, Randomness, RawBabePreDigest, RawBabePreDigestCompat, RawBabePreDigestPrimary, RawBabePreDigestPrimaryTo159, RawBabePreDigestSecondaryPlain, RawBabePreDigestSecondaryTo159, RawBabePreDigestSecondaryVRF, RawBabePreDigestTo159, SlotNumber, VrfData, VrfOutput, VrfProof } from '@polkadot/types/interfaces/babe';
|
||||
import type { AccountData, BalanceLock, BalanceLockTo212, BalanceStatus, Reasons, ReserveData, ReserveIdentifier, VestingSchedule, WithdrawReasons } from '@polkadot/types/interfaces/balances';
|
||||
import type { BeefyAuthoritySet, BeefyCommitment, BeefyId, BeefyNextAuthoritySet, BeefyPayload, BeefyPayloadId, BeefySignedCommitment, MmrRootHash, ValidatorSet, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
|
||||
import type { BeefyAuthoritySet, BeefyCommitment, BeefyEquivocationProof, BeefyId, BeefyNextAuthoritySet, BeefyPayload, BeefyPayloadId, BeefySignedCommitment, BeefyVoteMessage, MmrRootHash, ValidatorSet, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
|
||||
import type { BenchmarkBatch, BenchmarkConfig, BenchmarkList, BenchmarkMetadata, BenchmarkParameter, BenchmarkResult } from '@polkadot/types/interfaces/benchmark';
|
||||
import type { CheckInherentsResult, InherentData, InherentIdentifier } from '@polkadot/types/interfaces/blockbuilder';
|
||||
import type { BridgeMessageId, BridgedBlockHash, BridgedBlockNumber, BridgedHeader, CallOrigin, ChainId, DeliveredMessages, DispatchFeePayment, InboundLaneData, InboundRelayer, InitializationData, LaneId, MessageData, MessageKey, MessageNonce, MessagesDeliveryProofOf, MessagesProofOf, OperatingMode, OutboundLaneData, OutboundMessageFee, OutboundPayload, Parameter, RelayerId, UnrewardedRelayer, UnrewardedRelayersState } from '@polkadot/types/interfaces/bridges';
|
||||
@@ -151,12 +151,14 @@ declare module '@polkadot/types/types/registry' {
|
||||
BalanceStatus: BalanceStatus;
|
||||
BeefyAuthoritySet: BeefyAuthoritySet;
|
||||
BeefyCommitment: BeefyCommitment;
|
||||
BeefyEquivocationProof: BeefyEquivocationProof;
|
||||
BeefyId: BeefyId;
|
||||
BeefyKey: BeefyKey;
|
||||
BeefyNextAuthoritySet: BeefyNextAuthoritySet;
|
||||
BeefyPayload: BeefyPayload;
|
||||
BeefyPayloadId: BeefyPayloadId;
|
||||
BeefySignedCommitment: BeefySignedCommitment;
|
||||
BeefyVoteMessage: BeefyVoteMessage;
|
||||
BenchmarkBatch: BenchmarkBatch;
|
||||
BenchmarkConfig: BenchmarkConfig;
|
||||
BenchmarkList: BenchmarkList;
|
||||
|
||||
@@ -24,6 +24,10 @@ export default {
|
||||
validatorSetId: 'ValidatorSetId'
|
||||
},
|
||||
BeefyId: '[u8; 33]',
|
||||
BeefyEquivocationProof: {
|
||||
first: 'BeefyVoteMessage',
|
||||
second: 'BeefyVoteMessage'
|
||||
},
|
||||
BeefySignedCommitment: {
|
||||
commitment: 'BeefyCommitment',
|
||||
signatures: 'Vec<Option<EcdsaSignature>>'
|
||||
@@ -35,6 +39,11 @@ export default {
|
||||
},
|
||||
BeefyPayload: 'Vec<(BeefyPayloadId, Bytes)>',
|
||||
BeefyPayloadId: '[u8;2]',
|
||||
BeefyVoteMessage: {
|
||||
commitment: 'BeefyCommitment',
|
||||
id: 'AuthorityId',
|
||||
signature: 'Signature'
|
||||
},
|
||||
MmrRootHash: 'H256',
|
||||
ValidatorSetId: 'u64',
|
||||
ValidatorSet: {
|
||||
|
||||
@@ -12,6 +12,34 @@ export const runtime: DefinitionsCall = {
|
||||
params: [],
|
||||
type: 'Option<BlockNumber>'
|
||||
},
|
||||
generate_key_ownership_proof: {
|
||||
description: 'Generates a proof of key ownership for the given authority in the given set.',
|
||||
params: [
|
||||
{
|
||||
name: 'setId',
|
||||
type: 'ValidatorSetId'
|
||||
},
|
||||
{
|
||||
name: 'authorityId',
|
||||
type: 'AuthorityId'
|
||||
}
|
||||
],
|
||||
type: 'Option<OpaqueKeyOwnershipProof>'
|
||||
},
|
||||
submit_report_equivocation_unsigned_extrinsic: {
|
||||
description: 'Submits an unsigned extrinsic to report an equivocation.',
|
||||
params: [
|
||||
{
|
||||
name: 'equivocationProof',
|
||||
type: 'BeefyEquivocationProof'
|
||||
},
|
||||
{
|
||||
name: 'keyOwnerProof',
|
||||
type: 'OpaqueKeyOwnershipProof'
|
||||
}
|
||||
],
|
||||
type: 'Option<Null>'
|
||||
},
|
||||
validator_set: {
|
||||
description: 'Return the current active BEEFY validator set',
|
||||
params: [],
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import type { Bytes, Option, Struct, U8aFixed, Vec, u32, u64 } from '@polkadot/types-codec';
|
||||
import type { ITuple } from '@polkadot/types-codec/types';
|
||||
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||
import type { EcdsaSignature } from '@polkadot/types/interfaces/extrinsics';
|
||||
import type { EcdsaSignature, Signature } from '@polkadot/types/interfaces/extrinsics';
|
||||
import type { BlockNumber, H256 } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name BeefyAuthoritySet */
|
||||
@@ -21,6 +21,12 @@ export interface BeefyCommitment extends Struct {
|
||||
readonly validatorSetId: ValidatorSetId;
|
||||
}
|
||||
|
||||
/** @name BeefyEquivocationProof */
|
||||
export interface BeefyEquivocationProof extends Struct {
|
||||
readonly first: BeefyVoteMessage;
|
||||
readonly second: BeefyVoteMessage;
|
||||
}
|
||||
|
||||
/** @name BeefyId */
|
||||
export interface BeefyId extends U8aFixed {}
|
||||
|
||||
@@ -43,6 +49,13 @@ export interface BeefySignedCommitment extends Struct {
|
||||
readonly signatures: Vec<Option<EcdsaSignature>>;
|
||||
}
|
||||
|
||||
/** @name BeefyVoteMessage */
|
||||
export interface BeefyVoteMessage extends Struct {
|
||||
readonly commitment: BeefyCommitment;
|
||||
readonly id: AuthorityId;
|
||||
readonly signature: Signature;
|
||||
}
|
||||
|
||||
/** @name MmrRootHash */
|
||||
export interface MmrRootHash extends H256 {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user