diff --git a/packages/api-augment/src/kusama/runtime.ts b/packages/api-augment/src/kusama/runtime.ts index 82750b7e5c..b8069bcf96 100644 --- a/packages/api-augment/src/kusama/runtime.ts +++ b/packages/api-augment/src/kusama/runtime.ts @@ -6,7 +6,7 @@ import '@polkadot/api-base/types/calls'; import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types'; -import type { Bytes, Null, Option, Result, Vec, u32 } from '@polkadot/types-codec'; +import type { Bytes, Null, Option, Result, U64, Vec, 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 { BeefyAuthoritySet, BeefyEquivocationProof, BeefyNextAuthoritySet, ValidatorSet, ValidatorSetId } from '@polkadot/types/interfaces/beefy'; @@ -14,6 +14,7 @@ import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfa import type { BlockHash } from '@polkadot/types/interfaces/chain'; import type { AuthorityId } from '@polkadot/types/interfaces/consensus'; import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics'; +import type { GenesisBuildErr } from '@polkadot/types/interfaces/genesisBuilder'; import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa'; import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata'; import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError } from '@polkadot/types/interfaces/mmr'; @@ -163,6 +164,21 @@ declare module '@polkadot/api-base/types/calls' { **/ [key: string]: DecoratedCallBase; }; + /** 0xfbc577b9d747efd6/1 */ + genesisBuilder: { + /** + * Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the storage. + **/ + buildConfig: AugmentedCall Observable, GenesisBuildErr>>>; + /** + * Creates the default `RuntimeGenesisConfig` and returns it as a JSON blob. + **/ + createDefaultConfig: AugmentedCall Observable>; + /** + * Generic call + **/ + [key: string]: DecoratedCallBase; + }; /** 0xed99c5acb25eedf5/3 */ grandpaApi: { /** @@ -211,10 +227,14 @@ declare module '@polkadot/api-base/types/calls' { * Generate MMR proof for the given block numbers. **/ generateProof: AugmentedCall | (BlockNumber | AnyNumber | Uint8Array)[], bestKnownBlockNumber: Option | null | Uint8Array | BlockNumber | AnyNumber) => Observable, MmrBatchProof]>, MmrError>>>; + /** + * Return the number of MMR blocks in the chain. + **/ + mmrLeafCount: AugmentedCall Observable>>; /** * Return the on-chain MMR root hash. **/ - root: AugmentedCall Observable>>; + mmrRoot: AugmentedCall Observable>>; /** * Verify MMR proof against on-chain MMR. **/ diff --git a/packages/api-augment/src/polkadot/runtime.ts b/packages/api-augment/src/polkadot/runtime.ts index c1d6e4eaa1..22cea87042 100644 --- a/packages/api-augment/src/polkadot/runtime.ts +++ b/packages/api-augment/src/polkadot/runtime.ts @@ -6,7 +6,7 @@ import '@polkadot/api-base/types/calls'; import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types'; -import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec'; +import type { Bytes, Null, Option, Result, U64, 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 { BeefyAuthoritySet, BeefyEquivocationProof, BeefyNextAuthoritySet, ValidatorSet, ValidatorSetId } from '@polkadot/types/interfaces/beefy'; @@ -14,6 +14,7 @@ import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfa import type { BlockHash } from '@polkadot/types/interfaces/chain'; import type { AuthorityId } from '@polkadot/types/interfaces/consensus'; import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics'; +import type { GenesisBuildErr } from '@polkadot/types/interfaces/genesisBuilder'; import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa'; import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata'; import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError } from '@polkadot/types/interfaces/mmr'; @@ -165,6 +166,21 @@ declare module '@polkadot/api-base/types/calls' { **/ [key: string]: DecoratedCallBase; }; + /** 0xfbc577b9d747efd6/1 */ + genesisBuilder: { + /** + * Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the storage. + **/ + buildConfig: AugmentedCall Observable, GenesisBuildErr>>>; + /** + * Creates the default `RuntimeGenesisConfig` and returns it as a JSON blob. + **/ + createDefaultConfig: AugmentedCall Observable>; + /** + * Generic call + **/ + [key: string]: DecoratedCallBase; + }; /** 0xed99c5acb25eedf5/3 */ grandpaApi: { /** @@ -213,10 +229,14 @@ declare module '@polkadot/api-base/types/calls' { * Generate MMR proof for the given block numbers. **/ generateProof: AugmentedCall | (BlockNumber | AnyNumber | Uint8Array)[], bestKnownBlockNumber: Option | null | Uint8Array | BlockNumber | AnyNumber) => Observable, MmrBatchProof]>, MmrError>>>; + /** + * Return the number of MMR blocks in the chain. + **/ + mmrLeafCount: AugmentedCall Observable>>; /** * Return the on-chain MMR root hash. **/ - root: AugmentedCall Observable>>; + mmrRoot: AugmentedCall Observable>>; /** * Verify MMR proof against on-chain MMR. **/ diff --git a/packages/api-augment/src/substrate/runtime.ts b/packages/api-augment/src/substrate/runtime.ts index 1bda5c7ea4..71ab46673f 100644 --- a/packages/api-augment/src/substrate/runtime.ts +++ b/packages/api-augment/src/substrate/runtime.ts @@ -6,7 +6,7 @@ import '@polkadot/api-base/types/calls'; import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types'; -import type { Bytes, Null, Option, Result, Vec, bool, u128, u32 } from '@polkadot/types-codec'; +import type { Bytes, Null, Option, Result, U64, Vec, bool, u128, u32 } from '@polkadot/types-codec'; import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types'; import type { TAssetBalance } from '@polkadot/types/interfaces/assets'; import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe'; @@ -16,16 +16,20 @@ import type { BlockHash } from '@polkadot/types/interfaces/chain'; import type { AuthorityId } from '@polkadot/types/interfaces/consensus'; import type { CodeSource, CodeUploadResult, ContractExecResult, ContractInstantiateResult } from '@polkadot/types/interfaces/contracts'; import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics'; +import type { GenesisBuildErr } from '@polkadot/types/interfaces/genesisBuilder'; import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa'; import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata'; +import type { Mixnode, MixnodesErr, SessionStatus } from '@polkadot/types/interfaces/mixnet'; import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError } from '@polkadot/types/interfaces/mmr'; import type { NftCollectionId, NftItemId } from '@polkadot/types/interfaces/nfts'; import type { NpPoolId } from '@polkadot/types/interfaces/nompools'; import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment'; -import type { AccountId, Balance, Block, BlockNumber, Call, Hash, Header, Index, KeyTypeId, Slot, Weight, WeightV2 } from '@polkadot/types/interfaces/runtime'; +import type { AccountId, Balance, Block, BlockNumber, Call, ExtrinsicInclusionMode, Hash, Header, Index, KeyTypeId, Slot, Weight, WeightV2 } from '@polkadot/types/interfaces/runtime'; +import type { RuntimeVersion } from '@polkadot/types/interfaces/state'; +import type { StatementStoreInvalidStatement, StatementStoreStatementSource, StatementStoreValidStatement } from '@polkadot/types/interfaces/statement'; import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system'; import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue'; -import type { StagingXcmV3MultiLocation } from '@polkadot/types/lookup'; +import type { SpStatementStoreStatement, StagingXcmV3MultiLocation } from '@polkadot/types/lookup'; import type { IExtrinsic, Observable } from '@polkadot/types/types'; export type __AugmentedCall = AugmentedCall; @@ -185,6 +189,40 @@ declare module '@polkadot/api-base/types/calls' { **/ [key: string]: DecoratedCallBase; }; + /** 0xdf6acb689907609b/5 */ + core: { + /** + * Execute the given block. + **/ + executeBlock: AugmentedCall Observable>; + /** + * Initialize a block with the given header. + **/ + initializeBlock: AugmentedCall Observable>; + /** + * Returns the version of the runtime. + **/ + version: AugmentedCall Observable>; + /** + * Generic call + **/ + [key: string]: DecoratedCallBase; + }; + /** 0xfbc577b9d747efd6/1 */ + genesisBuilder: { + /** + * Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the storage. + **/ + buildConfig: AugmentedCall Observable, GenesisBuildErr>>>; + /** + * Creates the default `RuntimeGenesisConfig` and returns it as a JSON blob. + **/ + createDefaultConfig: AugmentedCall Observable>; + /** + * Generic call + **/ + [key: string]: DecoratedCallBase; + }; /** 0xed99c5acb25eedf5/3 */ grandpaApi: { /** @@ -227,16 +265,43 @@ declare module '@polkadot/api-base/types/calls' { **/ [key: string]: DecoratedCallBase; }; + /** 0x6fd7c327202e4a8d/1 */ + mixnetApi: { + /** + * Get the index and phase of the current session. + **/ + currentMixnodes: AugmentedCall Observable>>; + /** + * Try to register a mixnode for the next session. + **/ + maybeRegister: AugmentedCall Observable>; + /** + * Get the index and phase of the current session. + **/ + prevMixnodes: AugmentedCall Observable>>; + /** + * Get the index and phase of the current session. + **/ + sessionStatus: AugmentedCall Observable>; + /** + * Generic call + **/ + [key: string]: DecoratedCallBase; + }; /** 0x91d5df18b0d2cf58/2 */ mmrApi: { /** * Generate MMR proof for the given block numbers. **/ generateProof: AugmentedCall | (BlockNumber | AnyNumber | Uint8Array)[], bestKnownBlockNumber: Option | null | Uint8Array | BlockNumber | AnyNumber) => Observable, MmrBatchProof]>, MmrError>>>; + /** + * Return the number of MMR blocks in the chain. + **/ + mmrLeafCount: AugmentedCall Observable>>; /** * Return the on-chain MMR root hash. **/ - root: AugmentedCall Observable>>; + mmrRoot: AugmentedCall Observable>>; /** * Verify MMR proof against on-chain MMR. **/ @@ -394,5 +459,16 @@ declare module '@polkadot/api-base/types/calls' { **/ [key: string]: DecoratedCallBase; }; + /** 0xbe9fb0c91a8046cf/1 */ + validateStatement: { + /** + * Validate the statement. + **/ + valdateStatement: AugmentedCall Observable>>; + /** + * Generic call + **/ + [key: string]: DecoratedCallBase; + }; } // AugmentedCalls } // declare module diff --git a/packages/types-augment/src/registry/interfaces.ts b/packages/types-augment/src/registry/interfaces.ts index e049850eb1..cd73b64c9d 100644 --- a/packages/types-augment/src/registry/interfaces.ts +++ b/packages/types-augment/src/registry/interfaces.ts @@ -37,12 +37,14 @@ import type { EvmAccount, EvmCallInfo, EvmCallInfoV2, EvmCreateInfo, EvmCreateIn import type { AnySignature, EcdsaSignature, Ed25519Signature, Era, Extrinsic, ExtrinsicEra, ExtrinsicPayload, ExtrinsicPayloadUnknown, ExtrinsicPayloadV4, ExtrinsicSignature, ExtrinsicSignatureV4, ExtrinsicUnknown, ExtrinsicV4, ImmortalEra, MortalEra, MultiSignature, Signature, SignerPayload, Sr25519Signature } from '@polkadot/types/interfaces/extrinsics'; import type { FungiblesAccessError } from '@polkadot/types/interfaces/fungibles'; import type { AssetOptions, Owner, PermissionLatest, PermissionVersions, PermissionsV1 } from '@polkadot/types/interfaces/genericAsset'; +import type { GenesisBuildErr } from '@polkadot/types/interfaces/genesisBuilder'; import type { ActiveGilt, ActiveGiltsTotal, ActiveIndex, GiltBid } from '@polkadot/types/interfaces/gilt'; import type { AuthorityIndex, AuthorityList, AuthoritySet, AuthoritySetChange, AuthoritySetChanges, AuthorityWeight, DelayKind, DelayKindBest, EncodedFinalityProofs, ForkTreePendingChange, ForkTreePendingChangeNode, GrandpaCommit, GrandpaEquivocation, GrandpaEquivocationProof, GrandpaEquivocationValue, GrandpaJustification, GrandpaPrecommit, GrandpaPrevote, GrandpaSignedPrecommit, JustificationNotification, KeyOwnerProof, NextAuthority, PendingChange, PendingPause, PendingResume, Precommits, Prevotes, ReportedRoundStates, RoundState, SetId, StoredPendingChange, StoredState } from '@polkadot/types/interfaces/grandpa'; import type { IdentityFields, IdentityInfo, IdentityInfoAdditional, IdentityInfoTo198, IdentityJudgement, RegistrarIndex, RegistrarInfo, Registration, RegistrationJudgement, RegistrationTo198 } from '@polkadot/types/interfaces/identity'; import type { AuthIndex, AuthoritySignature, Heartbeat, HeartbeatTo244, OpaqueMultiaddr, OpaqueNetworkState, OpaquePeerId } from '@polkadot/types/interfaces/imOnline'; import type { CallIndex, LotteryConfig } from '@polkadot/types/interfaces/lottery'; import type { CustomMetadata15, CustomValueMetadata15, ErrorMetadataLatest, ErrorMetadataV10, ErrorMetadataV11, ErrorMetadataV12, ErrorMetadataV13, ErrorMetadataV14, ErrorMetadataV9, EventMetadataLatest, EventMetadataV10, EventMetadataV11, EventMetadataV12, EventMetadataV13, EventMetadataV14, EventMetadataV9, ExtrinsicMetadataLatest, ExtrinsicMetadataV11, ExtrinsicMetadataV12, ExtrinsicMetadataV13, ExtrinsicMetadataV14, ExtrinsicMetadataV15, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV10, FunctionArgumentMetadataV11, FunctionArgumentMetadataV12, FunctionArgumentMetadataV13, FunctionArgumentMetadataV14, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV10, FunctionMetadataV11, FunctionMetadataV12, FunctionMetadataV13, FunctionMetadataV14, FunctionMetadataV9, MetadataAll, MetadataLatest, MetadataV10, MetadataV11, MetadataV12, MetadataV13, MetadataV14, MetadataV15, MetadataV9, ModuleConstantMetadataV10, ModuleConstantMetadataV11, ModuleConstantMetadataV12, ModuleConstantMetadataV13, ModuleConstantMetadataV9, ModuleMetadataV10, ModuleMetadataV11, ModuleMetadataV12, ModuleMetadataV13, ModuleMetadataV9, OpaqueMetadata, OuterEnums15, PalletCallMetadataLatest, PalletCallMetadataV14, PalletConstantMetadataLatest, PalletConstantMetadataV14, PalletErrorMetadataLatest, PalletErrorMetadataV14, PalletEventMetadataLatest, PalletEventMetadataV14, PalletMetadataLatest, PalletMetadataV14, PalletMetadataV15, PalletStorageMetadataLatest, PalletStorageMetadataV14, PortableType, PortableTypeV14, RuntimeApiMetadataLatest, RuntimeApiMetadataV15, RuntimeApiMethodMetadataV15, RuntimeApiMethodParamMetadataV15, SignedExtensionMetadataLatest, SignedExtensionMetadataV14, StorageEntryMetadataLatest, StorageEntryMetadataV10, StorageEntryMetadataV11, StorageEntryMetadataV12, StorageEntryMetadataV13, StorageEntryMetadataV14, StorageEntryMetadataV9, StorageEntryModifierLatest, StorageEntryModifierV10, StorageEntryModifierV11, StorageEntryModifierV12, StorageEntryModifierV13, StorageEntryModifierV14, StorageEntryModifierV9, StorageEntryTypeLatest, StorageEntryTypeV10, StorageEntryTypeV11, StorageEntryTypeV12, StorageEntryTypeV13, StorageEntryTypeV14, StorageEntryTypeV9, StorageHasher, StorageHasherV10, StorageHasherV11, StorageHasherV12, StorageHasherV13, StorageHasherV14, StorageHasherV9, StorageMetadataV10, StorageMetadataV11, StorageMetadataV12, StorageMetadataV13, StorageMetadataV9 } from '@polkadot/types/interfaces/metadata'; +import type { Mixnode, MixnodesErr, SessionPhase, SessionStatus } from '@polkadot/types/interfaces/mixnet'; import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrHash, MmrLeafBatchProof, MmrLeafIndex, MmrLeafProof, MmrNodeIndex, MmrProof } from '@polkadot/types/interfaces/mmr'; import type { NftCollectionId, NftItemId } from '@polkadot/types/interfaces/nfts'; import type { NpApiError, NpPoolId } from '@polkadot/types/interfaces/nompools'; @@ -55,13 +57,14 @@ import type { ProxyAnnouncement, ProxyDefinition, ProxyType } from '@polkadot/ty import type { AccountStatus, AccountValidity } from '@polkadot/types/interfaces/purchase'; import type { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery'; import type { RpcMethods } from '@polkadot/types/interfaces/rpc'; -import type { AccountId, AccountId20, AccountId32, AccountId33, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, BlockNumberFor, BlockNumberOf, Call, CallHash, CallHashOf, ChangesTrieConfiguration, ChangesTrieSignal, CodecHash, Consensus, ConsensusEngineId, CrateVersion, Digest, DigestItem, EncodedJustification, ExtrinsicsWeight, Fixed128, Fixed64, FixedI128, FixedI64, FixedU128, FixedU64, H1024, H128, H160, H2048, H256, H32, H512, H64, Hash, Header, HeaderPartial, I32F32, Index, IndicesLookupSource, Justification, Justifications, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, MultiAddress, MultiSigner, OpaqueCall, Origin, OriginCaller, PalletId, PalletVersion, PalletsOrigin, Pays, PerU16, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Releases, RuntimeCall, RuntimeDbWeight, RuntimeEvent, Seal, SealV0, SignedBlock, SignedBlockWithJustification, SignedBlockWithJustifications, Slot, SlotDuration, StorageData, StorageInfo, StorageProof, TransactionInfo, TransactionLongevity, TransactionPriority, TransactionStorageProof, TransactionTag, U32F32, ValidatorId, ValidatorIdOf, Weight, WeightMultiplier, WeightV0, WeightV1, WeightV2 } from '@polkadot/types/interfaces/runtime'; +import type { AccountId, AccountId20, AccountId32, AccountId33, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, BlockNumberFor, BlockNumberOf, Call, CallHash, CallHashOf, ChangesTrieConfiguration, ChangesTrieSignal, CodecHash, Consensus, ConsensusEngineId, CrateVersion, Digest, DigestItem, EncodedJustification, ExtrinsicInclusionMode, ExtrinsicsWeight, Fixed128, Fixed64, FixedI128, FixedI64, FixedU128, FixedU64, H1024, H128, H160, H2048, H256, H32, H512, H64, Hash, Header, HeaderPartial, I32F32, Index, IndicesLookupSource, Justification, Justifications, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, MultiAddress, MultiSigner, OpaqueCall, Origin, OriginCaller, PalletId, PalletVersion, PalletsOrigin, Pays, PerU16, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Releases, RuntimeCall, RuntimeDbWeight, RuntimeEvent, Seal, SealV0, SignedBlock, SignedBlockWithJustification, SignedBlockWithJustifications, Slot, SlotDuration, StorageData, StorageInfo, StorageProof, TransactionInfo, TransactionLongevity, TransactionPriority, TransactionStorageProof, TransactionTag, U32F32, ValidatorId, ValidatorIdOf, Weight, WeightMultiplier, WeightV0, WeightV1, WeightV2 } from '@polkadot/types/interfaces/runtime'; import type { Si0Field, Si0LookupTypeId, Si0Path, Si0Type, Si0TypeDef, Si0TypeDefArray, Si0TypeDefBitSequence, Si0TypeDefCompact, Si0TypeDefComposite, Si0TypeDefPhantom, Si0TypeDefPrimitive, Si0TypeDefSequence, Si0TypeDefTuple, Si0TypeDefVariant, Si0TypeParameter, Si0Variant, Si1Field, Si1LookupTypeId, Si1Path, Si1Type, Si1TypeDef, Si1TypeDefArray, Si1TypeDefBitSequence, Si1TypeDefCompact, Si1TypeDefComposite, Si1TypeDefPrimitive, Si1TypeDefSequence, Si1TypeDefTuple, Si1TypeDefVariant, Si1TypeParameter, Si1Variant, SiField, SiLookupTypeId, SiPath, SiType, SiTypeDef, SiTypeDefArray, SiTypeDefBitSequence, SiTypeDefCompact, SiTypeDefComposite, SiTypeDefPrimitive, SiTypeDefSequence, SiTypeDefTuple, SiTypeDefVariant, SiTypeParameter, SiVariant } from '@polkadot/types/interfaces/scaleInfo'; import type { Period, Priority, SchedulePeriod, SchedulePriority, Scheduled, ScheduledTo254, TaskAddress } from '@polkadot/types/interfaces/scheduler'; import type { BeefyKey, FullIdentification, IdentificationTuple, Keys, MembershipProof, SessionIndex, SessionKeys1, SessionKeys10, SessionKeys10B, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6, SessionKeys6B, SessionKeys7, SessionKeys7B, SessionKeys8, SessionKeys8B, SessionKeys9, SessionKeys9B, ValidatorCount } from '@polkadot/types/interfaces/session'; import type { Bid, BidKind, SocietyJudgement, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society'; import type { ActiveEraInfo, CompactAssignments, CompactAssignmentsTo257, CompactAssignmentsTo265, CompactAssignmentsWith16, CompactAssignmentsWith24, CompactScore, CompactScoreCompact, ElectionCompute, ElectionPhase, ElectionResult, ElectionScore, ElectionSize, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, ExtendedBalance, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, NominatorIndex, NominatorIndexCompact, OffchainAccuracy, OffchainAccuracyCompact, PhragmenScore, Points, RawSolution, RawSolutionTo265, RawSolutionWith16, RawSolutionWith24, ReadySolution, RewardDestination, RewardPoint, RoundSnapshot, SeatHolder, SignedSubmission, SignedSubmissionOf, SignedSubmissionTo276, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SolutionOrSnapshotSize, SolutionSupport, SolutionSupports, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, StakingLedgerTo240, SubmissionIndicesOf, Supports, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorIndexCompact, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196, ValidatorPrefsWithBlocked, ValidatorPrefsWithCommission, VoteWeight, Voter } from '@polkadot/types/interfaces/staking'; import type { ApiId, BlockTrace, BlockTraceEvent, BlockTraceEventData, BlockTraceSpan, KeyValueOption, MigrationStatusResult, ReadProof, RuntimeVersion, RuntimeVersionApi, RuntimeVersionPartial, RuntimeVersionPre3, RuntimeVersionPre4, SpecVersion, StorageChangeSet, TraceBlockResponse, TraceError } from '@polkadot/types/interfaces/state'; +import type { StatementStoreInvalidStatement, StatementStoreStatementSource, StatementStoreValidStatement } from '@polkadot/types/interfaces/statement'; import type { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support'; import type { AccountInfo, AccountInfoWithDualRefCount, AccountInfoWithProviders, AccountInfoWithRefCount, AccountInfoWithRefCountU8, AccountInfoWithTripleRefCount, ApplyExtrinsicResult, ApplyExtrinsicResultPre6, ArithmeticError, BlockLength, BlockWeights, ChainProperties, ChainType, ConsumedWeight, DigestOf, DispatchClass, DispatchError, DispatchErrorModule, DispatchErrorModulePre6, DispatchErrorModuleU8, DispatchErrorModuleU8a, DispatchErrorPre6, DispatchErrorPre6First, DispatchErrorTo198, DispatchInfo, DispatchInfoTo190, DispatchInfoTo244, DispatchOutcome, DispatchOutcomePre6, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, Health, InvalidTransaction, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, PerDispatchClassU32, PerDispatchClassWeight, PerDispatchClassWeightsPerClass, Phase, RawOrigin, RefCount, RefCountTo259, SyncState, SystemOrigin, TokenError, TransactionValidityError, TransactionalError, UnknownTransaction, WeightPerClass } from '@polkadot/types/interfaces/system'; import type { Bounty, BountyIndex, BountyStatus, BountyStatusActive, BountyStatusCuratorProposed, BountyStatusPendingPayout, OpenTip, OpenTipFinderTo225, OpenTipTip, OpenTipTo225, TreasuryProposal } from '@polkadot/types/interfaces/treasury'; @@ -471,6 +474,7 @@ declare module '@polkadot/types/types/registry' { ExtendedBalance: ExtendedBalance; Extrinsic: Extrinsic; ExtrinsicEra: ExtrinsicEra; + ExtrinsicInclusionMode: ExtrinsicInclusionMode; ExtrinsicMetadataLatest: ExtrinsicMetadataLatest; ExtrinsicMetadataV11: ExtrinsicMetadataV11; ExtrinsicMetadataV12: ExtrinsicMetadataV12; @@ -524,6 +528,7 @@ declare module '@polkadot/types/types/registry' { FungibilityV2: FungibilityV2; FungiblesAccessError: FungiblesAccessError; Gas: Gas; + GenesisBuildErr: GenesisBuildErr; GiltBid: GiltBid; GlobalValidationData: GlobalValidationData; GlobalValidationSchedule: GlobalValidationSchedule; @@ -668,6 +673,8 @@ declare module '@polkadot/types/types/registry' { MetadataV15: MetadataV15; MetadataV9: MetadataV9; MigrationStatusResult: MigrationStatusResult; + Mixnode: Mixnode; + MixnodesErr: MixnodesErr; MmrBatchProof: MmrBatchProof; MmrEncodableOpaqueLeaf: MmrEncodableOpaqueLeaf; MmrError: MmrError; @@ -961,6 +968,8 @@ declare module '@polkadot/types/types/registry' { SessionKeys8B: SessionKeys8B; SessionKeys9: SessionKeys9; SessionKeys9B: SessionKeys9B; + SessionPhase: SessionPhase; + SessionStatus: SessionStatus; SetId: SetId; SetIndex: SetIndex; Si0Field: Si0Field; @@ -1045,6 +1054,9 @@ declare module '@polkadot/types/types/registry' { StakingLedgerTo240: StakingLedgerTo240; Statement: Statement; StatementKind: StatementKind; + StatementStoreInvalidStatement: StatementStoreInvalidStatement; + StatementStoreStatementSource: StatementStoreStatementSource; + StatementStoreValidStatement: StatementStoreValidStatement; StorageChangeSet: StorageChangeSet; StorageData: StorageData; StorageDeposit: StorageDeposit; diff --git a/packages/types/src/interfaces/definitions.ts b/packages/types/src/interfaces/definitions.ts index 510d83ec07..d6a460c6f5 100644 --- a/packages/types/src/interfaces/definitions.ts +++ b/packages/types/src/interfaces/definitions.ts @@ -25,11 +25,13 @@ export { default as evm } from './evm/definitions.js'; export { default as extrinsics } from './extrinsics/definitions.js'; export { default as fungibles } from './fungibles/definitions.js'; export { default as genericAsset } from './genericAsset/definitions.js'; +export { default as genesisBuilder } from './genesisBuilder/definitions.js'; export { default as gilt } from './gilt/definitions.js'; export { default as grandpa } from './grandpa/definitions.js'; export { default as identity } from './identity/definitions.js'; export { default as imOnline } from './imOnline/definitions.js'; export { default as lottery } from './lottery/definitions.js'; +export { default as mixnet } from './mixnet/definitions.js'; export { default as mmr } from './mmr/definitions.js'; export { default as nfts } from './nfts/definitions.js'; export { default as nompools } from './nompools/definitions.js'; @@ -41,6 +43,7 @@ export { default as scheduler } from './scheduler/definitions.js'; export { default as session } from './session/definitions.js'; export { default as society } from './society/definitions.js'; export { default as staking } from './staking/definitions.js'; +export { default as statement } from './statement/definitions.js'; export { default as support } from './support/definitions.js'; export { default as syncstate } from './syncstate/definitions.js'; export { default as system } from './system/definitions.js'; diff --git a/packages/types/src/interfaces/genesisBuilder/definitions.ts b/packages/types/src/interfaces/genesisBuilder/definitions.ts new file mode 100644 index 0000000000..dcde00c106 --- /dev/null +++ b/packages/types/src/interfaces/genesisBuilder/definitions.ts @@ -0,0 +1,14 @@ +// Copyright 2017-2024 @polkadot/types authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +import type { Definitions } from '../../types/index.js'; + +import { runtime } from './runtime.js'; + +export default { + rpc: {}, + runtime, + types: { + GenesisBuildErr: 'Text' + } +} as Definitions; diff --git a/packages/types/src/interfaces/genesisBuilder/index.ts b/packages/types/src/interfaces/genesisBuilder/index.ts new file mode 100644 index 0000000000..7f1de782f7 --- /dev/null +++ b/packages/types/src/interfaces/genesisBuilder/index.ts @@ -0,0 +1,4 @@ +// Auto-generated via `yarn polkadot-types-from-defs`, do not edit +/* eslint-disable */ + +export * from './types.js'; diff --git a/packages/types/src/interfaces/genesisBuilder/runtime.ts b/packages/types/src/interfaces/genesisBuilder/runtime.ts new file mode 100644 index 0000000000..643538a6e7 --- /dev/null +++ b/packages/types/src/interfaces/genesisBuilder/runtime.ts @@ -0,0 +1,29 @@ +// Copyright 2017-2024 @polkadot/types authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +import type { DefinitionsCall } from '../../types/index.js'; + +export const runtime: DefinitionsCall = { + GenesisBuilder: [ + { + methods: { + build_config: { + description: 'Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the storage.', + params: [ + { + name: 'json', + type: 'Vec' + } + ], + type: 'Result<(), GenesisBuildErr>' + }, + create_default_config: { + description: 'Creates the default `RuntimeGenesisConfig` and returns it as a JSON blob.', + params: [], + type: 'Vec' + } + }, + version: 1 + } + ] +}; diff --git a/packages/types/src/interfaces/genesisBuilder/types.ts b/packages/types/src/interfaces/genesisBuilder/types.ts new file mode 100644 index 0000000000..2b91578f96 --- /dev/null +++ b/packages/types/src/interfaces/genesisBuilder/types.ts @@ -0,0 +1,9 @@ +// Auto-generated via `yarn polkadot-types-from-defs`, do not edit +/* eslint-disable */ + +import type { Text } from '@polkadot/types-codec'; + +/** @name GenesisBuildErr */ +export interface GenesisBuildErr extends Text {} + +export type PHANTOM_GENESISBUILDER = 'genesisBuilder'; diff --git a/packages/types/src/interfaces/mixnet/definitions.ts b/packages/types/src/interfaces/mixnet/definitions.ts new file mode 100644 index 0000000000..cf4983c396 --- /dev/null +++ b/packages/types/src/interfaces/mixnet/definitions.ts @@ -0,0 +1,33 @@ +// Copyright 2017-2024 @polkadot/types authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +import type { Definitions } from '../../types/index.js'; + +import { runtime } from './runtime.js'; + +export default { + rpc: {}, + runtime, + types: { + Mixnode: { + externalAddresses: 'Vec', + kxPublic: '[u8; 32]', + peerId: '[u8; 32]' + }, + MixnodesErr: { + _enum: { + InsufficientRegistrations: { + min: 'u32', + num: 'u32' + } + } + }, + SessionPhase: { + _enum: ['CoverToCurrent', 'RequestsToCurrent', 'CoverToPrev', 'DisconnectFromPrev'] + }, + SessionStatus: { + currentIndex: 'u32', + phase: 'SessionPhase' + } + } +} as Definitions; diff --git a/packages/types/src/interfaces/mixnet/index.ts b/packages/types/src/interfaces/mixnet/index.ts new file mode 100644 index 0000000000..7f1de782f7 --- /dev/null +++ b/packages/types/src/interfaces/mixnet/index.ts @@ -0,0 +1,4 @@ +// Auto-generated via `yarn polkadot-types-from-defs`, do not edit +/* eslint-disable */ + +export * from './types.js'; diff --git a/packages/types/src/interfaces/mixnet/runtime.ts b/packages/types/src/interfaces/mixnet/runtime.ts new file mode 100644 index 0000000000..b421ed53c4 --- /dev/null +++ b/packages/types/src/interfaces/mixnet/runtime.ts @@ -0,0 +1,43 @@ +// Copyright 2017-2024 @polkadot/types authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +import type { DefinitionsCall } from '../../types/index.js'; + +export const runtime: DefinitionsCall = { + MixnetApi: [ + { + methods: { + current_mixnodes: { + description: 'Get the index and phase of the current session.', + params: [], + type: 'Result' + }, + maybe_register: { + description: 'Try to register a mixnode for the next session.', + params: [ + { + name: 'session_index', + type: 'u32' + }, + { + name: 'mixnode', + type: 'Mixnode' + } + ], + type: 'bool' + }, + prev_mixnodes: { + description: 'Get the index and phase of the current session.', + params: [], + type: 'Result' + }, + session_status: { + description: 'Get the index and phase of the current session.', + params: [], + type: 'SessionStatus' + } + }, + version: 1 + } + ] +}; diff --git a/packages/types/src/interfaces/mixnet/types.ts b/packages/types/src/interfaces/mixnet/types.ts new file mode 100644 index 0000000000..ba7f3abbdc --- /dev/null +++ b/packages/types/src/interfaces/mixnet/types.ts @@ -0,0 +1,38 @@ +// Auto-generated via `yarn polkadot-types-from-defs`, do not edit +/* eslint-disable */ + +import type { Bytes, Enum, Struct, U8aFixed, Vec, u32 } from '@polkadot/types-codec'; + +/** @name Mixnode */ +export interface Mixnode extends Struct { + readonly externalAddresses: Vec; + readonly kxPublic: U8aFixed; + readonly peerId: U8aFixed; +} + +/** @name MixnodesErr */ +export interface MixnodesErr extends Enum { + readonly isInsufficientRegistrations: boolean; + readonly asInsufficientRegistrations: { + readonly min: u32; + readonly num: u32; + } & Struct; + readonly type: 'InsufficientRegistrations'; +} + +/** @name SessionPhase */ +export interface SessionPhase extends Enum { + readonly isCoverToCurrent: boolean; + readonly isRequestsToCurrent: boolean; + readonly isCoverToPrev: boolean; + readonly isDisconnectFromPrev: boolean; + readonly type: 'CoverToCurrent' | 'RequestsToCurrent' | 'CoverToPrev' | 'DisconnectFromPrev'; +} + +/** @name SessionStatus */ +export interface SessionStatus extends Struct { + readonly currentIndex: u32; + readonly phase: SessionPhase; +} + +export type PHANTOM_MIXNET = 'mixnet'; diff --git a/packages/types/src/interfaces/mmr/definitions.ts b/packages/types/src/interfaces/mmr/definitions.ts index ee95e62900..923843b646 100644 --- a/packages/types/src/interfaces/mmr/definitions.ts +++ b/packages/types/src/interfaces/mmr/definitions.ts @@ -20,7 +20,7 @@ export default { }, MmrEncodableOpaqueLeaf: 'Bytes', MmrError: { - _enum: ['Push', 'GetRoot', 'Commit', 'GenerateProof', 'Verify', 'LeafNotFound', ' PalletNotIncluded', 'InvalidLeafIndex'] + _enum: ['InvalidNumericOp', 'Push', 'GetRoot', 'Commit', 'GenerateProof', 'Verify', 'LeafNotFound', ' PalletNotIncluded', 'InvalidLeafIndex', 'InvalidBestKnownBlock'] }, MmrHash: 'Hash', MmrLeafBatchProof: { diff --git a/packages/types/src/interfaces/mmr/runtime.ts b/packages/types/src/interfaces/mmr/runtime.ts index e6bf452e6b..cee00f00e5 100644 --- a/packages/types/src/interfaces/mmr/runtime.ts +++ b/packages/types/src/interfaces/mmr/runtime.ts @@ -18,7 +18,12 @@ const MMR_V2: Record = { ], type: 'Result<(Vec, MmrBatchProof), MmrError>' }, - root: { + mmr_leaf_count: { + description: 'Return the number of MMR blocks in the chain.', + params: [], + type: 'Result' + }, + mmr_root: { description: 'Return the on-chain MMR root hash.', params: [], type: 'Result' diff --git a/packages/types/src/interfaces/mmr/types.ts b/packages/types/src/interfaces/mmr/types.ts index 219eddbdca..f7ba211d25 100644 --- a/packages/types/src/interfaces/mmr/types.ts +++ b/packages/types/src/interfaces/mmr/types.ts @@ -17,6 +17,7 @@ export interface MmrEncodableOpaqueLeaf extends Bytes {} /** @name MmrError */ export interface MmrError extends Enum { + readonly isInvalidNumericOp: boolean; readonly isPush: boolean; readonly isGetRoot: boolean; readonly isCommit: boolean; @@ -25,7 +26,8 @@ export interface MmrError extends Enum { readonly isLeafNotFound: boolean; readonly isPalletNotIncluded: boolean; readonly isInvalidLeafIndex: boolean; - readonly type: 'Push' | 'GetRoot' | 'Commit' | 'GenerateProof' | 'Verify' | 'LeafNotFound' | 'PalletNotIncluded' | 'InvalidLeafIndex'; + readonly isInvalidBestKnownBlock: boolean; + readonly type: 'InvalidNumericOp' | 'Push' | 'GetRoot' | 'Commit' | 'GenerateProof' | 'Verify' | 'LeafNotFound' | 'PalletNotIncluded' | 'InvalidLeafIndex' | 'InvalidBestKnownBlock'; } /** @name MmrHash */ diff --git a/packages/types/src/interfaces/runtime/definitions.ts b/packages/types/src/interfaces/runtime/definitions.ts index d9466763ec..3b0b9c2d1a 100644 --- a/packages/types/src/interfaces/runtime/definitions.ts +++ b/packages/types/src/interfaces/runtime/definitions.ts @@ -226,6 +226,11 @@ export default { PreRuntime: '(ConsensusEngineId, Bytes)', SealV0: '(u64, Signature)', Seal: '(ConsensusEngineId, Bytes)', - Consensus: '(ConsensusEngineId, Bytes)' + Consensus: '(ConsensusEngineId, Bytes)', + + // Type when core initialize_block went from v4 to v5 + ExtrinsicInclusionMode: { + _enum: ['AllExtrinsics', 'OnlyInherents'] + } } } as Definitions; diff --git a/packages/types/src/interfaces/runtime/runtime.ts b/packages/types/src/interfaces/runtime/runtime.ts index 2d81a01922..64c219d9f5 100644 --- a/packages/types/src/interfaces/runtime/runtime.ts +++ b/packages/types/src/interfaces/runtime/runtime.ts @@ -37,15 +37,40 @@ const CORE_V2_TO_V4: DefinitionsCallEntry['methods'] = { } }; +const CORE_V4_VERSION: DefinitionsCallEntry['methods'] = { + version: { + description: 'Returns the version of the runtime.', + params: [], + type: 'RuntimeVersion' + } +}; + +const CORE_V4_TO_V5: DefinitionsCallEntry['methods'] = { + ...CORE_V1_TO_V4, + initialize_block: { + description: 'Initialize a block with the given header.', + params: [ + { + name: 'header', + type: 'Header' + } + ], + type: 'ExtrinsicInclusionMode' + } +}; + export const runtime: DefinitionsCall = { Core: [ { methods: { - version: { - description: 'Returns the version of the runtime.', - params: [], - type: 'RuntimeVersion' - }, + ...CORE_V4_VERSION, + ...CORE_V4_TO_V5 + }, + version: 5 + }, + { + methods: { + ...CORE_V4_VERSION, ...CORE_V1_TO_V4, ...CORE_V2_TO_V4 }, diff --git a/packages/types/src/interfaces/runtime/types.ts b/packages/types/src/interfaces/runtime/types.ts index 0a6d48119c..e304321894 100644 --- a/packages/types/src/interfaces/runtime/types.ts +++ b/packages/types/src/interfaces/runtime/types.ts @@ -118,6 +118,13 @@ export interface DigestItem extends Enum { /** @name EncodedJustification */ export interface EncodedJustification extends Bytes {} +/** @name ExtrinsicInclusionMode */ +export interface ExtrinsicInclusionMode extends Enum { + readonly isAllExtrinsics: boolean; + readonly isOnlyInherents: boolean; + readonly type: 'AllExtrinsics' | 'OnlyInherents'; +} + /** @name ExtrinsicsWeight */ export interface ExtrinsicsWeight extends Struct { readonly normal: Weight; diff --git a/packages/types/src/interfaces/statement/definitions.ts b/packages/types/src/interfaces/statement/definitions.ts new file mode 100644 index 0000000000..0c262bf938 --- /dev/null +++ b/packages/types/src/interfaces/statement/definitions.ts @@ -0,0 +1,26 @@ +// Copyright 2017-2024 @polkadot/types authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +// order important in structs... :) +/* eslint-disable sort-keys */ + +import type { Definitions } from '../../types/index.js'; + +import { runtime } from './runtime.js'; + +export default { + rpc: {}, + runtime, + types: { + StatementStoreStatementSource: { + _enum: ['Chain', 'Network', 'Local'] + }, + StatementStoreValidStatement: { + maxCount: 'u32', + maxSize: 'u32' + }, + StatementStoreInvalidStatement: { + _enum: ['BadProof', 'NoProof', 'InternalError'] + } + } +} as Definitions; diff --git a/packages/types/src/interfaces/statement/index.ts b/packages/types/src/interfaces/statement/index.ts new file mode 100644 index 0000000000..7f1de782f7 --- /dev/null +++ b/packages/types/src/interfaces/statement/index.ts @@ -0,0 +1,4 @@ +// Auto-generated via `yarn polkadot-types-from-defs`, do not edit +/* eslint-disable */ + +export * from './types.js'; diff --git a/packages/types/src/interfaces/statement/runtime.ts b/packages/types/src/interfaces/statement/runtime.ts new file mode 100644 index 0000000000..e0ed510a59 --- /dev/null +++ b/packages/types/src/interfaces/statement/runtime.ts @@ -0,0 +1,28 @@ +// Copyright 2017-2024 @polkadot/types authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +import type { DefinitionsCall } from '../../types/index.js'; + +export const runtime: DefinitionsCall = { + ValidateStatement: [ + { + methods: { + valdate_statement: { + description: 'Validate the statement.', + params: [ + { + name: 'source', + type: 'StatementStoreStatementSource' + }, + { + name: 'statement', + type: 'SpStatementStoreStatement' + } + ], + type: 'Result' + } + }, + version: 1 + } + ] +}; diff --git a/packages/types/src/interfaces/statement/types.ts b/packages/types/src/interfaces/statement/types.ts new file mode 100644 index 0000000000..51aa7dbbdd --- /dev/null +++ b/packages/types/src/interfaces/statement/types.ts @@ -0,0 +1,28 @@ +// Auto-generated via `yarn polkadot-types-from-defs`, do not edit +/* eslint-disable */ + +import type { Enum, Struct, u32 } from '@polkadot/types-codec'; + +/** @name StatementStoreInvalidStatement */ +export interface StatementStoreInvalidStatement extends Enum { + readonly isBadProof: boolean; + readonly isNoProof: boolean; + readonly isInternalError: boolean; + readonly type: 'BadProof' | 'NoProof' | 'InternalError'; +} + +/** @name StatementStoreStatementSource */ +export interface StatementStoreStatementSource extends Enum { + readonly isChain: boolean; + readonly isNetwork: boolean; + readonly isLocal: boolean; + readonly type: 'Chain' | 'Network' | 'Local'; +} + +/** @name StatementStoreValidStatement */ +export interface StatementStoreValidStatement extends Struct { + readonly maxCount: u32; + readonly maxSize: u32; +} + +export type PHANTOM_STATEMENT = 'statement'; diff --git a/packages/types/src/interfaces/types.ts b/packages/types/src/interfaces/types.ts index 7c09252b32..f67b356fdb 100644 --- a/packages/types/src/interfaces/types.ts +++ b/packages/types/src/interfaces/types.ts @@ -33,12 +33,14 @@ export * from './extrinsics/types.js'; export * from './finality/types.js'; export * from './fungibles/types.js'; export * from './genericAsset/types.js'; +export * from './genesisBuilder/types.js'; export * from './gilt/types.js'; export * from './grandpa/types.js'; export * from './identity/types.js'; export * from './imOnline/types.js'; export * from './lottery/types.js'; export * from './metadata/types.js'; +export * from './mixnet/types.js'; export * from './mmr/types.js'; export * from './nfts/types.js'; export * from './nimbus/types.js'; @@ -62,6 +64,7 @@ export * from './session/types.js'; export * from './society/types.js'; export * from './staking/types.js'; export * from './state/types.js'; +export * from './statement/types.js'; export * from './support/types.js'; export * from './syncstate/types.js'; export * from './system/types.js';