Fix beefy::subscribeJustifications() return type (#5740)

* Fix beefy::subscribeJustifications() return type

* yarn build

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Serban Iorga
2023-10-19 05:31:59 +03:00
committed by GitHub
co-authored by github-actions[bot]
parent bc2a51e28e
commit 5246a6771c
5 changed files with 22 additions and 7 deletions
+3 -3
View File
@@ -11,7 +11,7 @@ import type { Bytes, HashMap, Json, Null, Option, Text, U256, U64, Vec, bool, f6
import type { AnyNumber, Codec } from '@polkadot/types-codec/types';
import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
import type { EpochAuthorship } from '@polkadot/types/interfaces/babe';
import type { BeefySignedCommitment } from '@polkadot/types/interfaces/beefy';
import type { BeefyVersionedFinalityProof } from '@polkadot/types/interfaces/beefy';
import type { BlockHash } from '@polkadot/types/interfaces/chain';
import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
@@ -80,9 +80,9 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
**/
getFinalizedHead: AugmentedRpc<() => Observable<H256>>;
/**
* Returns the block most recently finalized by BEEFY, alongside side its justification.
* Returns the block most recently finalized by BEEFY, alongside its justification.
**/
subscribeJustifications: AugmentedRpc<() => Observable<BeefySignedCommitment>>;
subscribeJustifications: AugmentedRpc<() => Observable<BeefyVersionedFinalityProof>>;
};
chain: {
/**
@@ -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, BeefyEquivocationProof, BeefyId, BeefyNextAuthoritySet, BeefyPayload, BeefyPayloadId, BeefySignedCommitment, BeefyVoteMessage, MmrRootHash, ValidatorSet, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
import type { BeefyAuthoritySet, BeefyCommitment, BeefyEquivocationProof, BeefyId, BeefyNextAuthoritySet, BeefyPayload, BeefyPayloadId, BeefySignedCommitment, BeefyVersionedFinalityProof, 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';
@@ -159,6 +159,7 @@ declare module '@polkadot/types/types/registry' {
BeefyPayload: BeefyPayload;
BeefyPayloadId: BeefyPayloadId;
BeefySignedCommitment: BeefySignedCommitment;
BeefyVersionedFinalityProof: BeefyVersionedFinalityProof;
BeefyVoteMessage: BeefyVoteMessage;
BenchmarkBatch: BenchmarkBatch;
BenchmarkConfig: BenchmarkConfig;
@@ -32,6 +32,12 @@ export default {
commitment: 'BeefyCommitment',
signatures: 'Vec<Option<EcdsaSignature>>'
},
BeefyVersionedFinalityProof: {
_enum: {
V0: 'Null',
V1: 'BeefySignedCommitment'
}
},
BeefyNextAuthoritySet: {
id: 'u64',
len: 'u32',
+2 -2
View File
@@ -10,13 +10,13 @@ export const rpc: DefinitionsRpc = {
type: 'H256'
},
subscribeJustifications: {
description: 'Returns the block most recently finalized by BEEFY, alongside side its justification.',
description: 'Returns the block most recently finalized by BEEFY, alongside its justification.',
params: [],
pubsub: [
'justifications',
'subscribeJustifications',
'unsubscribeJustifications'
],
type: 'BeefySignedCommitment'
type: 'BeefyVersionedFinalityProof'
}
};
+9 -1
View File
@@ -1,7 +1,7 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import type { Bytes, Option, Struct, U8aFixed, Vec, u32, u64 } from '@polkadot/types-codec';
import type { Bytes, Enum, 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, Signature } from '@polkadot/types/interfaces/extrinsics';
@@ -49,6 +49,14 @@ export interface BeefySignedCommitment extends Struct {
readonly signatures: Vec<Option<EcdsaSignature>>;
}
/** @name BeefyVersionedFinalityProof */
export interface BeefyVersionedFinalityProof extends Enum {
readonly isV0: boolean;
readonly isV1: boolean;
readonly asV1: BeefySignedCommitment;
readonly type: 'V0' | 'V1';
}
/** @name BeefyVoteMessage */
export interface BeefyVoteMessage extends Struct {
readonly commitment: BeefyCommitment;