Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b7ab25ce8 | ||
|
|
4c0cc44ecb | ||
|
|
9018fc9bc4 | ||
|
|
af669cae9a | ||
|
|
0d4b5df61e | ||
|
|
8bacac840f | ||
|
|
f75d32e198 | ||
|
|
0282cbac35 | ||
|
|
98506f9fea | ||
|
|
ecf6ad725b | ||
|
|
627e54473e | ||
|
|
8e56995556 | ||
|
|
45525b4288 | ||
|
|
6808eb1925 | ||
|
|
c301e7128d | ||
|
|
72a6f60498 | ||
|
|
ef6cbce6e5 | ||
|
|
50e9e9cb1e | ||
|
|
230cc2c437 | ||
|
|
511a345b23 | ||
|
|
5800ba5d91 | ||
|
|
d91b16f93d | ||
|
|
6d4027e116 | ||
|
|
e39a1ebac5 | ||
|
|
2ef672d4ec | ||
|
|
9a89ad37c9 | ||
|
|
7eb907b155 | ||
|
|
5fc142cf5c | ||
|
|
7571c6ae76 | ||
|
|
5a1598a389 | ||
|
|
b8451b4fe7 | ||
|
|
a97da748be | ||
|
|
34fead5c8a | ||
|
|
332b79a04a | ||
|
|
64384a6a04 | ||
|
|
6e6f46a188 | ||
|
|
ee09a2f4d6 | ||
|
|
62be4530f9 | ||
|
|
516289bcb7 | ||
|
|
b24e13f478 | ||
|
|
6fdd0d674e | ||
|
|
d85a096066 | ||
|
|
df68fde6cd | ||
|
|
1664c868df | ||
|
|
f5e89b7530 | ||
|
|
abdbd37215 | ||
|
|
354c4b8fd4 | ||
|
|
2ddacb67db | ||
|
|
602cff44a4 | ||
|
|
9ea866815b | ||
|
|
74e1442343 | ||
|
|
23069dad76 | ||
|
|
560bf096f7 | ||
|
|
ac1837cdfe |
+1
-1
@@ -1 +1 @@
|
||||
8.10.1
|
||||
8.11.2
|
||||
+2
-1
@@ -55,4 +55,5 @@
|
||||
8.3.2
|
||||
8.4.2
|
||||
8.6.2
|
||||
8.8.2
|
||||
8.8.2
|
||||
8.11.2
|
||||
@@ -1,5 +1,27 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 8.11.2 Jul 4, 2022
|
||||
|
||||
Changes:
|
||||
|
||||
- Bump to `@polkadot/util-crypto` 9.7.2 (w/ `@polkadot/wasm-crypto` 6.2.2)
|
||||
|
||||
|
||||
## 8.11.1 Jul 2, 2022
|
||||
|
||||
Contributed:
|
||||
|
||||
- Adjust `api.{tx, query, ...}` with no external side-effects (Thanks to https://github.com/btwiuse)
|
||||
|
||||
Changes:
|
||||
|
||||
- Support for `state_call` definitions via API config (exposed on `api.call.*`)
|
||||
- Base type definitions for `state_call` from Substrate, Polkadot & Orml
|
||||
- Align runtime types with latest Substrate master
|
||||
- Type generation for runtime call definitions (internal & external)
|
||||
- Update to latest Substrate, Polkadot & Kusama metadata
|
||||
|
||||
|
||||
## 8.10.1 Jun 26, 2022
|
||||
|
||||
Contributed:
|
||||
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
3063 Jaco 8.10.1 (#4986)
|
||||
3089 Jaco 8.11.2 (#5021)
|
||||
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
|
||||
37 Keith Ingram Update contract types and rpc (#4541)
|
||||
35 Stefanie Doll Updated child storage parameters (#1709)
|
||||
@@ -46,6 +46,7 @@
|
||||
1 Alan Sapede Adds Eth feeHistory & maxPriorityFeePerGas rpc (#4956)
|
||||
1 Andreea Eftene Add storage deposit support (#4304)
|
||||
1 Brad Larson [NEW] Support for custom headers with providers (#2423)
|
||||
1 Btwiuse Arch Add side effect check workaround (#4994) (#5009)
|
||||
1 chriswmercer little readme tweak (#279)
|
||||
1 codingsh #2182 - add: search for docs (#2232)
|
||||
1 coolcorexix Investigate 4559 v2 (#4608)
|
||||
|
||||
+6
-6
@@ -11,7 +11,7 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "commonjs",
|
||||
"version": "8.10.1",
|
||||
"version": "8.11.2",
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
],
|
||||
@@ -31,12 +31,12 @@
|
||||
"test:watch": "polkadot-dev-run-test --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.18.5",
|
||||
"@babel/register": "^7.17.7",
|
||||
"@babel/runtime": "^7.18.3",
|
||||
"@polkadot/dev": "^0.67.43",
|
||||
"@babel/core": "^7.18.6",
|
||||
"@babel/register": "^7.18.6",
|
||||
"@babel/runtime": "^7.18.6",
|
||||
"@polkadot/dev": "^0.67.50",
|
||||
"@polkadot/typegen": "workspace:packages/typegen",
|
||||
"@types/jest": "^28.1.3",
|
||||
"@types/jest": "^28.1.4",
|
||||
"copyfiles": "^2.4.1"
|
||||
},
|
||||
"resolutions": {
|
||||
|
||||
@@ -20,18 +20,18 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "8.10.1",
|
||||
"version": "8.11.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.3",
|
||||
"@polkadot/api-base": "8.10.1",
|
||||
"@polkadot/rpc-augment": "8.10.1",
|
||||
"@polkadot/types": "8.10.1",
|
||||
"@polkadot/types-augment": "8.10.1",
|
||||
"@polkadot/types-codec": "8.10.1",
|
||||
"@polkadot/util": "^9.6.2"
|
||||
"@babel/runtime": "^7.18.6",
|
||||
"@polkadot/api-base": "8.11.2",
|
||||
"@polkadot/rpc-augment": "8.11.2",
|
||||
"@polkadot/types": "8.11.2",
|
||||
"@polkadot/types-augment": "8.11.2",
|
||||
"@polkadot/types-codec": "8.11.2",
|
||||
"@polkadot/util": "^9.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/types-support": "8.10.1"
|
||||
"@polkadot/types-support": "8.11.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -497,6 +497,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* these are removed, either through `unvote` or `reap_vote`.
|
||||
**/
|
||||
VotesExist: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Voting period too low
|
||||
**/
|
||||
VotingPeriodLow: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Invalid upper bound.
|
||||
**/
|
||||
|
||||
@@ -7,4 +7,5 @@ import './errors';
|
||||
import './events';
|
||||
import './query';
|
||||
import './registry';
|
||||
import './runtime';
|
||||
import './tx';
|
||||
|
||||
@@ -0,0 +1,334 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ApiTypes } from '@polkadot/api-base/types';
|
||||
import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, 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 { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
|
||||
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 { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
|
||||
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
|
||||
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import type { AccountId, Block, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
||||
import type { SessionIndex } from '@polkadot/types/interfaces/session';
|
||||
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
|
||||
import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue';
|
||||
import type { IExtrinsic, Observable } from '@polkadot/types/types';
|
||||
|
||||
declare module '@polkadot/api-base/types/calls' {
|
||||
export interface AugmentedCalls<ApiType extends ApiTypes> {
|
||||
/** 0xbc9d89904f5b923f/1 */
|
||||
accountNonceApi: {
|
||||
/**
|
||||
* The API to query account nonce (aka transaction index)
|
||||
**/
|
||||
accountNonce: AugmentedCall<ApiType, (accountId: AccountId | string | Uint8Array) => Observable<Index>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x687ad44ad37f03c2/1 */
|
||||
authorityDiscoveryApi: {
|
||||
/**
|
||||
* Retrieve authority identifiers of the current and next authority set.
|
||||
**/
|
||||
authorities: AugmentedCall<ApiType, () => Observable<Vec<AuthorityId>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xcbca25e39f142387/2 */
|
||||
babeApi: {
|
||||
/**
|
||||
* Return the genesis configuration for BABE. The configuration is only read on genesis.
|
||||
**/
|
||||
configuration: AugmentedCall<ApiType, () => Observable<BabeGenesisConfiguration>>;
|
||||
/**
|
||||
* Returns information regarding the current epoch.
|
||||
**/
|
||||
currentEpoch: AugmentedCall<ApiType, () => Observable<Epoch>>;
|
||||
/**
|
||||
* Returns the slot that started the current epoch.
|
||||
**/
|
||||
currentEpochStart: AugmentedCall<ApiType, () => Observable<Slot>>;
|
||||
/**
|
||||
* Generates a proof of key ownership for the given authority in the current epoch.
|
||||
**/
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (slot: Slot | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
|
||||
/**
|
||||
* Returns information regarding the next epoch (which was already previously announced).
|
||||
**/
|
||||
nextEpoch: AugmentedCall<ApiType, () => Observable<Epoch>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report an equivocation.
|
||||
**/
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: BabeEquivocationProof | { offender?: any; slotNumber?: any; firstHeader?: any; secondHeader?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x49eaaf1b548a0cb0/1 */
|
||||
beefyApi: {
|
||||
/**
|
||||
* Return the current active BEEFY validator set
|
||||
**/
|
||||
validatorSet: AugmentedCall<ApiType, () => Observable<Option<ValidatorSet>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x40fe3ad401f8959a/6 */
|
||||
blockBuilder: {
|
||||
/**
|
||||
* Apply the given extrinsic.
|
||||
**/
|
||||
applyExtrinsic: AugmentedCall<ApiType, (extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<ApplyExtrinsicResult>>;
|
||||
/**
|
||||
* Check that the inherents are valid.
|
||||
**/
|
||||
checkInherents: AugmentedCall<ApiType, (block: Block | { header?: any; extrinsics?: any } | string | Uint8Array, data: InherentData | { data?: any } | string | Uint8Array) => Observable<CheckInherentsResult>>;
|
||||
/**
|
||||
* Finish the current block.
|
||||
**/
|
||||
finalizeBlock: AugmentedCall<ApiType, () => Observable<Header>>;
|
||||
/**
|
||||
* Generate inherent extrinsics.
|
||||
**/
|
||||
inherentExtrinsics: AugmentedCall<ApiType, (inherent: InherentData | { data?: any } | string | Uint8Array) => Observable<Vec<Extrinsic>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xdf6acb689907609b/4 */
|
||||
core: {
|
||||
/**
|
||||
* Execute the given block.
|
||||
**/
|
||||
executeBlock: AugmentedCall<ApiType, (block: Block | { header?: any; extrinsics?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Initialize a block with the given header.
|
||||
**/
|
||||
initializeBlock: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Returns the version of the runtime.
|
||||
**/
|
||||
version: AugmentedCall<ApiType, () => Observable<RuntimeVersion>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xed99c5acb25eedf5/3 */
|
||||
grandpaApi: {
|
||||
/**
|
||||
* Get current GRANDPA authority set id.
|
||||
**/
|
||||
currentSetId: AugmentedCall<ApiType, () => Observable<SetId>>;
|
||||
/**
|
||||
* Generates a proof of key ownership for the given authority in the given set.
|
||||
**/
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (setId: SetId | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
|
||||
/**
|
||||
* Get the current GRANDPA authorities and weights. This should not change except for when changes are scheduled and the corresponding delay has passed.
|
||||
**/
|
||||
grandpaAuthorities: AugmentedCall<ApiType, () => Observable<AuthorityList>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report an equivocation.
|
||||
**/
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: GrandpaEquivocationProof | { setId?: any; equivocation?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x37e397fc7c91f5e4/1 */
|
||||
metadata: {
|
||||
/**
|
||||
* Returns the metadata of a runtime
|
||||
**/
|
||||
metadata: AugmentedCall<ApiType, () => Observable<OpaqueMetadata>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x91d5df18b0d2cf58/1 */
|
||||
mmrApi: {
|
||||
/**
|
||||
* Generate MMR proof for a series of leaves under given indices.
|
||||
**/
|
||||
generateBatchProof: AugmentedCall<ApiType, (leafIndices: Vec<MmrLeafIndex> | (MmrLeafIndex | AnyNumber | Uint8Array)[]) => Observable<Result<ITuple<[Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof]>, MmrError>>>;
|
||||
/**
|
||||
* Generate MMR proof for a leaf under given index.
|
||||
**/
|
||||
generateProof: AugmentedCall<ApiType, (leafIndex: MmrLeafIndex | AnyNumber | Uint8Array) => Observable<Result<ITuple<[MmrEncodableOpaqueLeaf, MmrProof]>, MmrError>>>;
|
||||
/**
|
||||
* Return the on-chain MMR root hash.
|
||||
**/
|
||||
mmrRoot: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
|
||||
/**
|
||||
* Verify MMR proof against on-chain MMR for a batch of leaves.
|
||||
**/
|
||||
verifyBatchProof: AugmentedCall<ApiType, (leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
/**
|
||||
* Verify MMR proof against given root hash or a batch of leaves.
|
||||
**/
|
||||
verifyBatchProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
/**
|
||||
* Verify MMR proof against on-chain MMR.
|
||||
**/
|
||||
verifyProof: AugmentedCall<ApiType, (leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
/**
|
||||
* Verify MMR proof against given root hash.
|
||||
**/
|
||||
verifyProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xf78b278be53f454c/2 */
|
||||
offchainWorkerApi: {
|
||||
/**
|
||||
* Starts the off-chain task for given block header.
|
||||
**/
|
||||
offchainWorker: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xaf2c0297a23e6d3d/2 */
|
||||
parachainHost: {
|
||||
/**
|
||||
* Returns the persisted validation data for the given `ParaId` along with the corresponding validation code hash.
|
||||
**/
|
||||
assumedValidationData: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, hash: Hash | string | Uint8Array) => Observable<Option<ITuple<[PersistedValidationData, ValidationCodeHash]>>>>;
|
||||
/**
|
||||
* Yields information on all availability cores as relevant to the child block.
|
||||
**/
|
||||
availabilityCores: AugmentedCall<ApiType, () => Observable<Vec<CoreState>>>;
|
||||
/**
|
||||
* Get a vector of events concerning candidates that occurred within a block.
|
||||
**/
|
||||
candidateEvents: AugmentedCall<ApiType, () => Observable<Vec<CandidateEvent>>>;
|
||||
/**
|
||||
* Get the receipt of a candidate pending availability.
|
||||
**/
|
||||
candidatePendingAvailability: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Option<CommittedCandidateReceipt>>>;
|
||||
/**
|
||||
* Checks if the given validation outputs pass the acceptance criteria.
|
||||
**/
|
||||
checkValidationOutputs: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, outputs: CandidateCommitments | { upwardMessages?: any; horizontalMessages?: any; newValidationCode?: any; headData?: any; processedDownwardMessages?: any; hrmpWatermark?: any } | string | Uint8Array) => Observable<bool>>;
|
||||
/**
|
||||
* Get all the pending inbound messages in the downward message queue for a para.
|
||||
**/
|
||||
dmqContents: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Vec<InboundDownwardMessage>>>;
|
||||
/**
|
||||
* Get the contents of all channels addressed to the given recipient.
|
||||
**/
|
||||
inboundHrmpChannelsContents: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Vec<InboundHrmpMessage>>>;
|
||||
/**
|
||||
* Scrape dispute relevant from on-chain, backing votes and resolved disputes.
|
||||
**/
|
||||
onChainVotes: AugmentedCall<ApiType, () => Observable<Option<ScrapedOnChainVotes>>>;
|
||||
/**
|
||||
* Yields the persisted validation data for the given `ParaId` along with an assumption that should be used if the para currently occupies a core.
|
||||
**/
|
||||
persistedValidationData: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<PersistedValidationData>>>;
|
||||
/**
|
||||
* Returns code hashes of PVFs that require pre-checking by validators in the active set.
|
||||
**/
|
||||
pvfsRequirePrecheck: AugmentedCall<ApiType, () => Observable<Vec<ValidationCodeHash>>>;
|
||||
/**
|
||||
* Returns the session index expected at a child of the block.
|
||||
**/
|
||||
sessionIndexForChild: AugmentedCall<ApiType, () => Observable<SessionIndex>>;
|
||||
/**
|
||||
* Get the session info for the given session, if stored.
|
||||
**/
|
||||
sessionInfo: AugmentedCall<ApiType, (index: SessionIndex | AnyNumber | Uint8Array) => Observable<Option<SessionInfo>>>;
|
||||
/**
|
||||
* Submits a PVF pre-checking statement into the transaction pool.
|
||||
**/
|
||||
submitPvfCheckStatement: AugmentedCall<ApiType, (stmt: PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: ValidatorSignature | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.
|
||||
**/
|
||||
validationCode: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<ValidationCode>>;
|
||||
/**
|
||||
* Get the validation code from its hash.
|
||||
**/
|
||||
validationCodeByHash: AugmentedCall<ApiType, (hash: ValidationCodeHash | string | Uint8Array) => Observable<Option<ValidationCode>>>;
|
||||
/**
|
||||
* Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`.
|
||||
**/
|
||||
validationCodeHash: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<ValidationCodeHash>>>;
|
||||
/**
|
||||
* Returns the validator groups and rotation info localized based on the hypothetical child of a block whose state this is invoked on
|
||||
**/
|
||||
validatorGroups: AugmentedCall<ApiType, () => Observable<ITuple<[Vec<Vec<ParaValidatorIndex>>, GroupRotationInfo]>>>;
|
||||
/**
|
||||
* Get the current validators.
|
||||
**/
|
||||
validators: AugmentedCall<ApiType, () => Observable<Vec<ValidatorId>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xab3c0572291feb8b/1 */
|
||||
sessionKeys: {
|
||||
/**
|
||||
* Decode the given public session keys.
|
||||
**/
|
||||
decodeSessionKeys: AugmentedCall<ApiType, (encoded: Bytes | string | Uint8Array) => Observable<Option<Vec<ITuple<[Bytes, KeyTypeId]>>>>>;
|
||||
/**
|
||||
* Generate a set of session keys with optionally using the given seed.
|
||||
**/
|
||||
generateSessionKeys: AugmentedCall<ApiType, (seed: Option<Bytes> | null | object | string | Uint8Array) => Observable<Bytes>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xd2bc9897eed08f15/3 */
|
||||
taggedTransactionQueue: {
|
||||
/**
|
||||
* Validate the transaction.
|
||||
**/
|
||||
validateTransaction: AugmentedCall<ApiType, (source: TransactionSource | 'InBlock' | 'Local' | 'External' | number | Uint8Array, tx: Extrinsic | IExtrinsic | string | Uint8Array, blockHash: BlockHash | string | Uint8Array) => Observable<TransactionValidity>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x37c8bb1350a9a2a8/1 */
|
||||
transactionPaymentApi: {
|
||||
/**
|
||||
* The transaction fee details
|
||||
**/
|
||||
queryFeeDetails: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<FeeDetails>>;
|
||||
/**
|
||||
* The transaction info
|
||||
**/
|
||||
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
} // AugmentedCalls
|
||||
} // declare module
|
||||
@@ -1139,8 +1139,9 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* The dispatch of this call must be `FastTrackOrigin`.
|
||||
*
|
||||
* - `proposal_hash`: The hash of the current external proposal.
|
||||
* - `voting_period`: The period that is allowed for voting on this proposal. Increased to
|
||||
* `FastTrackVotingPeriod` if too low.
|
||||
* - `voting_period`: The period that is allowed for voting on this proposal.
|
||||
* Must be always greater than zero.
|
||||
* For `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`.
|
||||
* - `delay`: The number of block after voting has ended in approval and this should be
|
||||
* enacted. This doesn't have a minimum amount.
|
||||
*
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '8.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '8.11.2' };
|
||||
|
||||
@@ -497,6 +497,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* these are removed, either through `unvote` or `reap_vote`.
|
||||
**/
|
||||
VotesExist: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Voting period too low
|
||||
**/
|
||||
VotingPeriodLow: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Invalid upper bound.
|
||||
**/
|
||||
|
||||
@@ -7,4 +7,5 @@ import './errors';
|
||||
import './events';
|
||||
import './query';
|
||||
import './registry';
|
||||
import './runtime';
|
||||
import './tx';
|
||||
|
||||
@@ -0,0 +1,334 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ApiTypes } from '@polkadot/api-base/types';
|
||||
import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, 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 { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
|
||||
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 { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
|
||||
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
|
||||
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import type { AccountId, Block, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
||||
import type { SessionIndex } from '@polkadot/types/interfaces/session';
|
||||
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
|
||||
import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue';
|
||||
import type { IExtrinsic, Observable } from '@polkadot/types/types';
|
||||
|
||||
declare module '@polkadot/api-base/types/calls' {
|
||||
export interface AugmentedCalls<ApiType extends ApiTypes> {
|
||||
/** 0xbc9d89904f5b923f/1 */
|
||||
accountNonceApi: {
|
||||
/**
|
||||
* The API to query account nonce (aka transaction index)
|
||||
**/
|
||||
accountNonce: AugmentedCall<ApiType, (accountId: AccountId | string | Uint8Array) => Observable<Index>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x687ad44ad37f03c2/1 */
|
||||
authorityDiscoveryApi: {
|
||||
/**
|
||||
* Retrieve authority identifiers of the current and next authority set.
|
||||
**/
|
||||
authorities: AugmentedCall<ApiType, () => Observable<Vec<AuthorityId>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xcbca25e39f142387/2 */
|
||||
babeApi: {
|
||||
/**
|
||||
* Return the genesis configuration for BABE. The configuration is only read on genesis.
|
||||
**/
|
||||
configuration: AugmentedCall<ApiType, () => Observable<BabeGenesisConfiguration>>;
|
||||
/**
|
||||
* Returns information regarding the current epoch.
|
||||
**/
|
||||
currentEpoch: AugmentedCall<ApiType, () => Observable<Epoch>>;
|
||||
/**
|
||||
* Returns the slot that started the current epoch.
|
||||
**/
|
||||
currentEpochStart: AugmentedCall<ApiType, () => Observable<Slot>>;
|
||||
/**
|
||||
* Generates a proof of key ownership for the given authority in the current epoch.
|
||||
**/
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (slot: Slot | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
|
||||
/**
|
||||
* Returns information regarding the next epoch (which was already previously announced).
|
||||
**/
|
||||
nextEpoch: AugmentedCall<ApiType, () => Observable<Epoch>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report an equivocation.
|
||||
**/
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: BabeEquivocationProof | { offender?: any; slotNumber?: any; firstHeader?: any; secondHeader?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x49eaaf1b548a0cb0/1 */
|
||||
beefyApi: {
|
||||
/**
|
||||
* Return the current active BEEFY validator set
|
||||
**/
|
||||
validatorSet: AugmentedCall<ApiType, () => Observable<Option<ValidatorSet>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x40fe3ad401f8959a/6 */
|
||||
blockBuilder: {
|
||||
/**
|
||||
* Apply the given extrinsic.
|
||||
**/
|
||||
applyExtrinsic: AugmentedCall<ApiType, (extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<ApplyExtrinsicResult>>;
|
||||
/**
|
||||
* Check that the inherents are valid.
|
||||
**/
|
||||
checkInherents: AugmentedCall<ApiType, (block: Block | { header?: any; extrinsics?: any } | string | Uint8Array, data: InherentData | { data?: any } | string | Uint8Array) => Observable<CheckInherentsResult>>;
|
||||
/**
|
||||
* Finish the current block.
|
||||
**/
|
||||
finalizeBlock: AugmentedCall<ApiType, () => Observable<Header>>;
|
||||
/**
|
||||
* Generate inherent extrinsics.
|
||||
**/
|
||||
inherentExtrinsics: AugmentedCall<ApiType, (inherent: InherentData | { data?: any } | string | Uint8Array) => Observable<Vec<Extrinsic>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xdf6acb689907609b/4 */
|
||||
core: {
|
||||
/**
|
||||
* Execute the given block.
|
||||
**/
|
||||
executeBlock: AugmentedCall<ApiType, (block: Block | { header?: any; extrinsics?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Initialize a block with the given header.
|
||||
**/
|
||||
initializeBlock: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Returns the version of the runtime.
|
||||
**/
|
||||
version: AugmentedCall<ApiType, () => Observable<RuntimeVersion>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xed99c5acb25eedf5/3 */
|
||||
grandpaApi: {
|
||||
/**
|
||||
* Get current GRANDPA authority set id.
|
||||
**/
|
||||
currentSetId: AugmentedCall<ApiType, () => Observable<SetId>>;
|
||||
/**
|
||||
* Generates a proof of key ownership for the given authority in the given set.
|
||||
**/
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (setId: SetId | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
|
||||
/**
|
||||
* Get the current GRANDPA authorities and weights. This should not change except for when changes are scheduled and the corresponding delay has passed.
|
||||
**/
|
||||
grandpaAuthorities: AugmentedCall<ApiType, () => Observable<AuthorityList>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report an equivocation.
|
||||
**/
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: GrandpaEquivocationProof | { setId?: any; equivocation?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x37e397fc7c91f5e4/1 */
|
||||
metadata: {
|
||||
/**
|
||||
* Returns the metadata of a runtime
|
||||
**/
|
||||
metadata: AugmentedCall<ApiType, () => Observable<OpaqueMetadata>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x91d5df18b0d2cf58/1 */
|
||||
mmrApi: {
|
||||
/**
|
||||
* Generate MMR proof for a series of leaves under given indices.
|
||||
**/
|
||||
generateBatchProof: AugmentedCall<ApiType, (leafIndices: Vec<MmrLeafIndex> | (MmrLeafIndex | AnyNumber | Uint8Array)[]) => Observable<Result<ITuple<[Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof]>, MmrError>>>;
|
||||
/**
|
||||
* Generate MMR proof for a leaf under given index.
|
||||
**/
|
||||
generateProof: AugmentedCall<ApiType, (leafIndex: MmrLeafIndex | AnyNumber | Uint8Array) => Observable<Result<ITuple<[MmrEncodableOpaqueLeaf, MmrProof]>, MmrError>>>;
|
||||
/**
|
||||
* Return the on-chain MMR root hash.
|
||||
**/
|
||||
mmrRoot: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
|
||||
/**
|
||||
* Verify MMR proof against on-chain MMR for a batch of leaves.
|
||||
**/
|
||||
verifyBatchProof: AugmentedCall<ApiType, (leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
/**
|
||||
* Verify MMR proof against given root hash or a batch of leaves.
|
||||
**/
|
||||
verifyBatchProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
/**
|
||||
* Verify MMR proof against on-chain MMR.
|
||||
**/
|
||||
verifyProof: AugmentedCall<ApiType, (leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
/**
|
||||
* Verify MMR proof against given root hash.
|
||||
**/
|
||||
verifyProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xf78b278be53f454c/2 */
|
||||
offchainWorkerApi: {
|
||||
/**
|
||||
* Starts the off-chain task for given block header.
|
||||
**/
|
||||
offchainWorker: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xaf2c0297a23e6d3d/2 */
|
||||
parachainHost: {
|
||||
/**
|
||||
* Returns the persisted validation data for the given `ParaId` along with the corresponding validation code hash.
|
||||
**/
|
||||
assumedValidationData: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, hash: Hash | string | Uint8Array) => Observable<Option<ITuple<[PersistedValidationData, ValidationCodeHash]>>>>;
|
||||
/**
|
||||
* Yields information on all availability cores as relevant to the child block.
|
||||
**/
|
||||
availabilityCores: AugmentedCall<ApiType, () => Observable<Vec<CoreState>>>;
|
||||
/**
|
||||
* Get a vector of events concerning candidates that occurred within a block.
|
||||
**/
|
||||
candidateEvents: AugmentedCall<ApiType, () => Observable<Vec<CandidateEvent>>>;
|
||||
/**
|
||||
* Get the receipt of a candidate pending availability.
|
||||
**/
|
||||
candidatePendingAvailability: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Option<CommittedCandidateReceipt>>>;
|
||||
/**
|
||||
* Checks if the given validation outputs pass the acceptance criteria.
|
||||
**/
|
||||
checkValidationOutputs: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, outputs: CandidateCommitments | { upwardMessages?: any; horizontalMessages?: any; newValidationCode?: any; headData?: any; processedDownwardMessages?: any; hrmpWatermark?: any } | string | Uint8Array) => Observable<bool>>;
|
||||
/**
|
||||
* Get all the pending inbound messages in the downward message queue for a para.
|
||||
**/
|
||||
dmqContents: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Vec<InboundDownwardMessage>>>;
|
||||
/**
|
||||
* Get the contents of all channels addressed to the given recipient.
|
||||
**/
|
||||
inboundHrmpChannelsContents: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Vec<InboundHrmpMessage>>>;
|
||||
/**
|
||||
* Scrape dispute relevant from on-chain, backing votes and resolved disputes.
|
||||
**/
|
||||
onChainVotes: AugmentedCall<ApiType, () => Observable<Option<ScrapedOnChainVotes>>>;
|
||||
/**
|
||||
* Yields the persisted validation data for the given `ParaId` along with an assumption that should be used if the para currently occupies a core.
|
||||
**/
|
||||
persistedValidationData: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<PersistedValidationData>>>;
|
||||
/**
|
||||
* Returns code hashes of PVFs that require pre-checking by validators in the active set.
|
||||
**/
|
||||
pvfsRequirePrecheck: AugmentedCall<ApiType, () => Observable<Vec<ValidationCodeHash>>>;
|
||||
/**
|
||||
* Returns the session index expected at a child of the block.
|
||||
**/
|
||||
sessionIndexForChild: AugmentedCall<ApiType, () => Observable<SessionIndex>>;
|
||||
/**
|
||||
* Get the session info for the given session, if stored.
|
||||
**/
|
||||
sessionInfo: AugmentedCall<ApiType, (index: SessionIndex | AnyNumber | Uint8Array) => Observable<Option<SessionInfo>>>;
|
||||
/**
|
||||
* Submits a PVF pre-checking statement into the transaction pool.
|
||||
**/
|
||||
submitPvfCheckStatement: AugmentedCall<ApiType, (stmt: PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: ValidatorSignature | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.
|
||||
**/
|
||||
validationCode: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<ValidationCode>>;
|
||||
/**
|
||||
* Get the validation code from its hash.
|
||||
**/
|
||||
validationCodeByHash: AugmentedCall<ApiType, (hash: ValidationCodeHash | string | Uint8Array) => Observable<Option<ValidationCode>>>;
|
||||
/**
|
||||
* Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`.
|
||||
**/
|
||||
validationCodeHash: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<ValidationCodeHash>>>;
|
||||
/**
|
||||
* Returns the validator groups and rotation info localized based on the hypothetical child of a block whose state this is invoked on
|
||||
**/
|
||||
validatorGroups: AugmentedCall<ApiType, () => Observable<ITuple<[Vec<Vec<ParaValidatorIndex>>, GroupRotationInfo]>>>;
|
||||
/**
|
||||
* Get the current validators.
|
||||
**/
|
||||
validators: AugmentedCall<ApiType, () => Observable<Vec<ValidatorId>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xab3c0572291feb8b/1 */
|
||||
sessionKeys: {
|
||||
/**
|
||||
* Decode the given public session keys.
|
||||
**/
|
||||
decodeSessionKeys: AugmentedCall<ApiType, (encoded: Bytes | string | Uint8Array) => Observable<Option<Vec<ITuple<[Bytes, KeyTypeId]>>>>>;
|
||||
/**
|
||||
* Generate a set of session keys with optionally using the given seed.
|
||||
**/
|
||||
generateSessionKeys: AugmentedCall<ApiType, (seed: Option<Bytes> | null | object | string | Uint8Array) => Observable<Bytes>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xd2bc9897eed08f15/3 */
|
||||
taggedTransactionQueue: {
|
||||
/**
|
||||
* Validate the transaction.
|
||||
**/
|
||||
validateTransaction: AugmentedCall<ApiType, (source: TransactionSource | 'InBlock' | 'Local' | 'External' | number | Uint8Array, tx: Extrinsic | IExtrinsic | string | Uint8Array, blockHash: BlockHash | string | Uint8Array) => Observable<TransactionValidity>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x37c8bb1350a9a2a8/1 */
|
||||
transactionPaymentApi: {
|
||||
/**
|
||||
* The transaction fee details
|
||||
**/
|
||||
queryFeeDetails: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<FeeDetails>>;
|
||||
/**
|
||||
* The transaction info
|
||||
**/
|
||||
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
} // AugmentedCalls
|
||||
} // declare module
|
||||
@@ -1139,8 +1139,9 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* The dispatch of this call must be `FastTrackOrigin`.
|
||||
*
|
||||
* - `proposal_hash`: The hash of the current external proposal.
|
||||
* - `voting_period`: The period that is allowed for voting on this proposal. Increased to
|
||||
* `FastTrackVotingPeriod` if too low.
|
||||
* - `voting_period`: The period that is allowed for voting on this proposal.
|
||||
* Must be always greater than zero.
|
||||
* For `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`.
|
||||
* - `delay`: The number of block after voting has ended in approval and this should be
|
||||
* enacted. This doesn't have a minimum amount.
|
||||
*
|
||||
|
||||
@@ -733,6 +733,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* these are removed, either through `unvote` or `reap_vote`.
|
||||
**/
|
||||
VotesExist: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Voting period too low
|
||||
**/
|
||||
VotingPeriodLow: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Invalid upper bound.
|
||||
**/
|
||||
|
||||
@@ -7,4 +7,5 @@ import './errors';
|
||||
import './events';
|
||||
import './query';
|
||||
import './registry';
|
||||
import './runtime';
|
||||
import './tx';
|
||||
|
||||
@@ -0,0 +1,265 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ApiTypes } from '@polkadot/api-base/types';
|
||||
import type { Bytes, Null, Option, Result, Vec, u32, u64 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
|
||||
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';
|
||||
import type { CodeUploadResult, ContractExecResult, ContractInstantiateResult } from '@polkadot/types/interfaces/contracts';
|
||||
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
||||
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
|
||||
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import type { AccountId, Balance, Block, Hash, Header, Index, KeyTypeId, Slot } from '@polkadot/types/interfaces/runtime';
|
||||
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
|
||||
import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue';
|
||||
import type { IExtrinsic, Observable } from '@polkadot/types/types';
|
||||
|
||||
declare module '@polkadot/api-base/types/calls' {
|
||||
export interface AugmentedCalls<ApiType extends ApiTypes> {
|
||||
/** 0xbc9d89904f5b923f/1 */
|
||||
accountNonceApi: {
|
||||
/**
|
||||
* The API to query account nonce (aka transaction index)
|
||||
**/
|
||||
accountNonce: AugmentedCall<ApiType, (accountId: AccountId | string | Uint8Array) => Observable<Index>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x687ad44ad37f03c2/1 */
|
||||
authorityDiscoveryApi: {
|
||||
/**
|
||||
* Retrieve authority identifiers of the current and next authority set.
|
||||
**/
|
||||
authorities: AugmentedCall<ApiType, () => Observable<Vec<AuthorityId>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xcbca25e39f142387/2 */
|
||||
babeApi: {
|
||||
/**
|
||||
* Return the genesis configuration for BABE. The configuration is only read on genesis.
|
||||
**/
|
||||
configuration: AugmentedCall<ApiType, () => Observable<BabeGenesisConfiguration>>;
|
||||
/**
|
||||
* Returns information regarding the current epoch.
|
||||
**/
|
||||
currentEpoch: AugmentedCall<ApiType, () => Observable<Epoch>>;
|
||||
/**
|
||||
* Returns the slot that started the current epoch.
|
||||
**/
|
||||
currentEpochStart: AugmentedCall<ApiType, () => Observable<Slot>>;
|
||||
/**
|
||||
* Generates a proof of key ownership for the given authority in the current epoch.
|
||||
**/
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (slot: Slot | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
|
||||
/**
|
||||
* Returns information regarding the next epoch (which was already previously announced).
|
||||
**/
|
||||
nextEpoch: AugmentedCall<ApiType, () => Observable<Epoch>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report an equivocation.
|
||||
**/
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: BabeEquivocationProof | { offender?: any; slotNumber?: any; firstHeader?: any; secondHeader?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x40fe3ad401f8959a/6 */
|
||||
blockBuilder: {
|
||||
/**
|
||||
* Apply the given extrinsic.
|
||||
**/
|
||||
applyExtrinsic: AugmentedCall<ApiType, (extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<ApplyExtrinsicResult>>;
|
||||
/**
|
||||
* Check that the inherents are valid.
|
||||
**/
|
||||
checkInherents: AugmentedCall<ApiType, (block: Block | { header?: any; extrinsics?: any } | string | Uint8Array, data: InherentData | { data?: any } | string | Uint8Array) => Observable<CheckInherentsResult>>;
|
||||
/**
|
||||
* Finish the current block.
|
||||
**/
|
||||
finalizeBlock: AugmentedCall<ApiType, () => Observable<Header>>;
|
||||
/**
|
||||
* Generate inherent extrinsics.
|
||||
**/
|
||||
inherentExtrinsics: AugmentedCall<ApiType, (inherent: InherentData | { data?: any } | string | Uint8Array) => Observable<Vec<Extrinsic>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x68b66ba122c93fa7/1 */
|
||||
contractsApi: {
|
||||
/**
|
||||
* Perform a call from a specified account to a given contract.
|
||||
**/
|
||||
call: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, dest: AccountId | string | Uint8Array, value: Balance | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, storageDepositLimit: Option<Balance> | null | object | string | Uint8Array, inputData: Bytes | string | Uint8Array) => Observable<ContractExecResult>>;
|
||||
/**
|
||||
* Query a given storage key in a given contract.
|
||||
**/
|
||||
getStorage: AugmentedCall<ApiType, (address: AccountId | string | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Instantiate a new contract.
|
||||
**/
|
||||
instantiate: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, value: Balance | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, storageDepositLimit: Option<Balance> | null | object | string | Uint8Array, code: Bytes | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => Observable<ContractInstantiateResult>>;
|
||||
/**
|
||||
* Upload new code without instantiating a contract from it.
|
||||
**/
|
||||
uploadCode: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, code: Bytes | string | Uint8Array, storageDepositLimit: Option<Balance> | null | object | string | Uint8Array) => Observable<CodeUploadResult>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xdf6acb689907609b/4 */
|
||||
core: {
|
||||
/**
|
||||
* Execute the given block.
|
||||
**/
|
||||
executeBlock: AugmentedCall<ApiType, (block: Block | { header?: any; extrinsics?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Initialize a block with the given header.
|
||||
**/
|
||||
initializeBlock: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Returns the version of the runtime.
|
||||
**/
|
||||
version: AugmentedCall<ApiType, () => Observable<RuntimeVersion>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xed99c5acb25eedf5/3 */
|
||||
grandpaApi: {
|
||||
/**
|
||||
* Get current GRANDPA authority set id.
|
||||
**/
|
||||
currentSetId: AugmentedCall<ApiType, () => Observable<SetId>>;
|
||||
/**
|
||||
* Generates a proof of key ownership for the given authority in the given set.
|
||||
**/
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (setId: SetId | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
|
||||
/**
|
||||
* Get the current GRANDPA authorities and weights. This should not change except for when changes are scheduled and the corresponding delay has passed.
|
||||
**/
|
||||
grandpaAuthorities: AugmentedCall<ApiType, () => Observable<AuthorityList>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report an equivocation.
|
||||
**/
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: GrandpaEquivocationProof | { setId?: any; equivocation?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x37e397fc7c91f5e4/1 */
|
||||
metadata: {
|
||||
/**
|
||||
* Returns the metadata of a runtime
|
||||
**/
|
||||
metadata: AugmentedCall<ApiType, () => Observable<OpaqueMetadata>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x91d5df18b0d2cf58/1 */
|
||||
mmrApi: {
|
||||
/**
|
||||
* Generate MMR proof for a series of leaves under given indices.
|
||||
**/
|
||||
generateBatchProof: AugmentedCall<ApiType, (leafIndices: Vec<MmrLeafIndex> | (MmrLeafIndex | AnyNumber | Uint8Array)[]) => Observable<Result<ITuple<[Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof]>, MmrError>>>;
|
||||
/**
|
||||
* Generate MMR proof for a leaf under given index.
|
||||
**/
|
||||
generateProof: AugmentedCall<ApiType, (leafIndex: MmrLeafIndex | AnyNumber | Uint8Array) => Observable<Result<ITuple<[MmrEncodableOpaqueLeaf, MmrProof]>, MmrError>>>;
|
||||
/**
|
||||
* Return the on-chain MMR root hash.
|
||||
**/
|
||||
mmrRoot: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
|
||||
/**
|
||||
* Verify MMR proof against on-chain MMR for a batch of leaves.
|
||||
**/
|
||||
verifyBatchProof: AugmentedCall<ApiType, (leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
/**
|
||||
* Verify MMR proof against given root hash or a batch of leaves.
|
||||
**/
|
||||
verifyBatchProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
/**
|
||||
* Verify MMR proof against on-chain MMR.
|
||||
**/
|
||||
verifyProof: AugmentedCall<ApiType, (leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
/**
|
||||
* Verify MMR proof against given root hash.
|
||||
**/
|
||||
verifyProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xf78b278be53f454c/2 */
|
||||
offchainWorkerApi: {
|
||||
/**
|
||||
* Starts the off-chain task for given block header.
|
||||
**/
|
||||
offchainWorker: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xab3c0572291feb8b/1 */
|
||||
sessionKeys: {
|
||||
/**
|
||||
* Decode the given public session keys.
|
||||
**/
|
||||
decodeSessionKeys: AugmentedCall<ApiType, (encoded: Bytes | string | Uint8Array) => Observable<Option<Vec<ITuple<[Bytes, KeyTypeId]>>>>>;
|
||||
/**
|
||||
* Generate a set of session keys with optionally using the given seed.
|
||||
**/
|
||||
generateSessionKeys: AugmentedCall<ApiType, (seed: Option<Bytes> | null | object | string | Uint8Array) => Observable<Bytes>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xd2bc9897eed08f15/3 */
|
||||
taggedTransactionQueue: {
|
||||
/**
|
||||
* Validate the transaction.
|
||||
**/
|
||||
validateTransaction: AugmentedCall<ApiType, (source: TransactionSource | 'InBlock' | 'Local' | 'External' | number | Uint8Array, tx: Extrinsic | IExtrinsic | string | Uint8Array, blockHash: BlockHash | string | Uint8Array) => Observable<TransactionValidity>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x37c8bb1350a9a2a8/1 */
|
||||
transactionPaymentApi: {
|
||||
/**
|
||||
* The transaction fee details
|
||||
**/
|
||||
queryFeeDetails: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<FeeDetails>>;
|
||||
/**
|
||||
* The transaction info
|
||||
**/
|
||||
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
} // AugmentedCalls
|
||||
} // declare module
|
||||
@@ -1655,8 +1655,9 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* The dispatch of this call must be `FastTrackOrigin`.
|
||||
*
|
||||
* - `proposal_hash`: The hash of the current external proposal.
|
||||
* - `voting_period`: The period that is allowed for voting on this proposal. Increased to
|
||||
* `FastTrackVotingPeriod` if too low.
|
||||
* - `voting_period`: The period that is allowed for voting on this proposal.
|
||||
* Must be always greater than zero.
|
||||
* For `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`.
|
||||
* - `delay`: The number of block after voting has ended in approval and this should be
|
||||
* enacted. This doesn't have a minimum amount.
|
||||
*
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "8.10.1",
|
||||
"version": "8.11.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.3",
|
||||
"@polkadot/rpc-core": "8.10.1",
|
||||
"@polkadot/types": "8.10.1",
|
||||
"@polkadot/util": "^9.6.2",
|
||||
"@babel/runtime": "^7.18.6",
|
||||
"@polkadot/rpc-core": "8.11.2",
|
||||
"@polkadot/types": "8.11.2",
|
||||
"@polkadot/util": "^9.7.2",
|
||||
"rxjs": "^7.5.5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '8.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '8.11.2' };
|
||||
|
||||
@@ -65,3 +65,9 @@ export interface PaginationOptions<A = unknown> {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export type DecorateMethod<ApiType extends ApiTypes, T = any> =
|
||||
<M extends (...args: any[]) => Observable<any>>(method: M, options?: DecorateMethodOptions) => T;
|
||||
|
||||
type AsCodec<R extends Codec | any> = R extends Codec
|
||||
? R
|
||||
: Codec;
|
||||
|
||||
export type ReturnCodec<F extends AnyFunction> = AsCodec<ObsInnerType<ReturnType<F>>>;
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// Copyright 2017-2022 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { AnyFunction, Codec, DefinitionCallNamed } from '@polkadot/types/types';
|
||||
import type { ApiTypes, ReturnCodec } from './base';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface
|
||||
export interface AugmentedCalls<ApiType extends ApiTypes> {
|
||||
// augmented
|
||||
}
|
||||
|
||||
export interface QueryableCalls<ApiType extends ApiTypes> extends AugmentedCalls<ApiType> {
|
||||
// when non-augmented, we need to at least have Codec results
|
||||
[key: string]: QueryableModuleCalls<ApiType>;
|
||||
}
|
||||
|
||||
export interface QueryableModuleCalls<ApiType extends ApiTypes> {
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
}
|
||||
|
||||
export type DecoratedCallBase<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> =
|
||||
ApiType extends 'rxjs'
|
||||
? <T extends Codec | any = ReturnCodec<F>> (...args: Parameters<F>) => Observable<T>
|
||||
: <T extends Codec | any = ReturnCodec<F>> (...args: Parameters<F>) => Promise<T>;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export type AugmentedCall<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> =
|
||||
DecoratedCallBase<ApiType, F> & { meta: DefinitionCallNamed };
|
||||
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// These are augmented, do an augmentation export
|
||||
export * from '@polkadot/api-base/types/calls';
|
||||
export * from '@polkadot/api-base/types/consts';
|
||||
export * from '@polkadot/api-base/types/errors';
|
||||
export * from '@polkadot/api-base/types/events';
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { StorageKey, u64 } from '@polkadot/types';
|
||||
import type { Hash } from '@polkadot/types/interfaces';
|
||||
import type { StorageEntry } from '@polkadot/types/primitive/types';
|
||||
import type { AnyFunction, AnyTuple, Callback, Codec, IStorageKey } from '@polkadot/types/types';
|
||||
import type { ApiTypes, DropLast, MethodResult, ObsInnerType, PaginationOptions, PromiseOrObs, UnsubscribePromise } from './base';
|
||||
import type { ApiTypes, DropLast, MethodResult, PaginationOptions, PromiseOrObs, ReturnCodec, UnsubscribePromise } from './base';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface
|
||||
export interface AugmentedQueries<ApiType extends ApiTypes> {
|
||||
@@ -22,12 +22,6 @@ export interface QueryableStorageAt<ApiType extends ApiTypes> extends AugmentedQ
|
||||
[key: string]: QueryableModuleStorageAt<ApiType>;
|
||||
}
|
||||
|
||||
type AsCodec<R extends Codec | any> = R extends Codec
|
||||
? R
|
||||
: Codec;
|
||||
|
||||
type ReturnCodec<F extends AnyFunction> = AsCodec<ObsInnerType<ReturnType<F>>>;
|
||||
|
||||
interface StorageEntryObservableMulti<R extends Codec = Codec> {
|
||||
<T extends Codec = R>(args: (unknown[] | unknown)[]): Observable<T[]>;
|
||||
}
|
||||
|
||||
@@ -20,20 +20,20 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "8.10.1",
|
||||
"version": "8.11.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.3",
|
||||
"@polkadot/api": "8.10.1",
|
||||
"@polkadot/types": "8.10.1",
|
||||
"@polkadot/types-codec": "8.10.1",
|
||||
"@polkadot/types-create": "8.10.1",
|
||||
"@polkadot/util": "^9.6.2",
|
||||
"@polkadot/util-crypto": "^9.6.2",
|
||||
"@babel/runtime": "^7.18.6",
|
||||
"@polkadot/api": "8.11.2",
|
||||
"@polkadot/types": "8.11.2",
|
||||
"@polkadot/types-codec": "8.11.2",
|
||||
"@polkadot/types-create": "8.11.2",
|
||||
"@polkadot/util": "^9.7.2",
|
||||
"@polkadot/util-crypto": "^9.7.2",
|
||||
"rxjs": "^7.5.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api-augment": "8.10.1",
|
||||
"@polkadot/keyring": "^9.6.2"
|
||||
"@polkadot/api-augment": "8.11.2",
|
||||
"@polkadot/keyring": "^9.7.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '8.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '8.11.2' };
|
||||
|
||||
@@ -20,25 +20,25 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "8.10.1",
|
||||
"version": "8.11.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.3",
|
||||
"@polkadot/api": "8.10.1",
|
||||
"@polkadot/api-augment": "8.10.1",
|
||||
"@polkadot/api-base": "8.10.1",
|
||||
"@polkadot/rpc-core": "8.10.1",
|
||||
"@polkadot/types": "8.10.1",
|
||||
"@polkadot/types-codec": "8.10.1",
|
||||
"@polkadot/util": "^9.6.2",
|
||||
"@polkadot/util-crypto": "^9.6.2",
|
||||
"@babel/runtime": "^7.18.6",
|
||||
"@polkadot/api": "8.11.2",
|
||||
"@polkadot/api-augment": "8.11.2",
|
||||
"@polkadot/api-base": "8.11.2",
|
||||
"@polkadot/rpc-core": "8.11.2",
|
||||
"@polkadot/types": "8.11.2",
|
||||
"@polkadot/types-codec": "8.11.2",
|
||||
"@polkadot/util": "^9.7.2",
|
||||
"@polkadot/util-crypto": "^9.7.2",
|
||||
"rxjs": "^7.5.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api": "8.10.1",
|
||||
"@polkadot/api-augment": "8.10.1",
|
||||
"@polkadot/rpc-augment": "8.10.1",
|
||||
"@polkadot/rpc-provider": "8.10.1",
|
||||
"@polkadot/types-support": "8.10.1"
|
||||
"@polkadot/api": "8.11.2",
|
||||
"@polkadot/api-augment": "8.11.2",
|
||||
"@polkadot/rpc-augment": "8.11.2",
|
||||
"@polkadot/rpc-provider": "8.11.2",
|
||||
"@polkadot/types-support": "8.11.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '8.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '8.11.2' };
|
||||
|
||||
+18
-18
@@ -20,29 +20,29 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "8.10.1",
|
||||
"version": "8.11.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.3",
|
||||
"@polkadot/api-augment": "8.10.1",
|
||||
"@polkadot/api-base": "8.10.1",
|
||||
"@polkadot/api-derive": "8.10.1",
|
||||
"@polkadot/keyring": "^9.6.2",
|
||||
"@polkadot/rpc-augment": "8.10.1",
|
||||
"@polkadot/rpc-core": "8.10.1",
|
||||
"@polkadot/rpc-provider": "8.10.1",
|
||||
"@polkadot/types": "8.10.1",
|
||||
"@polkadot/types-augment": "8.10.1",
|
||||
"@polkadot/types-codec": "8.10.1",
|
||||
"@polkadot/types-create": "8.10.1",
|
||||
"@polkadot/types-known": "8.10.1",
|
||||
"@polkadot/util": "^9.6.2",
|
||||
"@polkadot/util-crypto": "^9.6.2",
|
||||
"@babel/runtime": "^7.18.6",
|
||||
"@polkadot/api-augment": "8.11.2",
|
||||
"@polkadot/api-base": "8.11.2",
|
||||
"@polkadot/api-derive": "8.11.2",
|
||||
"@polkadot/keyring": "^9.7.2",
|
||||
"@polkadot/rpc-augment": "8.11.2",
|
||||
"@polkadot/rpc-core": "8.11.2",
|
||||
"@polkadot/rpc-provider": "8.11.2",
|
||||
"@polkadot/types": "8.11.2",
|
||||
"@polkadot/types-augment": "8.11.2",
|
||||
"@polkadot/types-codec": "8.11.2",
|
||||
"@polkadot/types-create": "8.11.2",
|
||||
"@polkadot/types-known": "8.11.2",
|
||||
"@polkadot/util": "^9.7.2",
|
||||
"@polkadot/util-crypto": "^9.7.2",
|
||||
"eventemitter3": "^4.0.7",
|
||||
"rxjs": "^7.5.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api-augment": "8.10.1",
|
||||
"@polkadot/types-support": "8.10.1"
|
||||
"@polkadot/api-augment": "8.11.2",
|
||||
"@polkadot/types-support": "8.11.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { DeriveCustom } from '@polkadot/api-base/types';
|
||||
import type { AugmentedCall, DeriveCustom, QueryableCalls } from '@polkadot/api-base/types';
|
||||
import type { RpcInterface } from '@polkadot/rpc-core/types';
|
||||
import type { Option, Raw, StorageKey, Text, u64 } from '@polkadot/types';
|
||||
import type { Call, Hash, RuntimeVersion } from '@polkadot/types/interfaces';
|
||||
import type { DecoratedMeta } from '@polkadot/types/metadata/decorate/types';
|
||||
import type { StorageEntry } from '@polkadot/types/primitive/types';
|
||||
import type { AnyFunction, AnyTuple, CallFunction, Codec, DefinitionRpc, DefinitionRpcSub, DetectCodec, IMethod, IStorageKey, Registry, RegistryError, RegistryTypes } from '@polkadot/types/types';
|
||||
import type { AnyFunction, AnyTuple, CallFunction, Codec, DefinitionCallNamed, DefinitionRpc, DefinitionRpcSub, DefinitionsCall, DefinitionsCallEntry, DetectCodec, IMethod, IStorageKey, Registry, RegistryError, RegistryTypes } from '@polkadot/types/types';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { SubmittableExtrinsic } from '../submittable/types';
|
||||
import type { ApiDecoration, ApiInterfaceRx, ApiOptions, ApiTypes, AugmentedQuery, DecoratedErrors, DecoratedEvents, DecoratedRpc, DecorateMethod, GenericStorageEntryFunction, PaginationOptions, QueryableConsts, QueryableStorage, QueryableStorageEntry, QueryableStorageEntryAt, QueryableStorageMulti, QueryableStorageMultiArg, SubmittableExtrinsicFunction, SubmittableExtrinsics } from '../types';
|
||||
import type { VersionedRegistry } from './types';
|
||||
@@ -18,8 +19,10 @@ import { BehaviorSubject, combineLatest, from, map, of, switchMap, tap, toArray
|
||||
import { getAvailableDerives } from '@polkadot/api-derive';
|
||||
import { memo, RpcCore } from '@polkadot/rpc-core';
|
||||
import { WsProvider } from '@polkadot/rpc-provider';
|
||||
import { expandMetadata, Metadata, TypeRegistry, unwrapStorageType } from '@polkadot/types';
|
||||
import { arrayChunk, arrayFlatten, assert, assertReturn, BN, compactStripLength, lazyMethod, lazyMethods, logger, nextTick, objectSpread, u8aToHex } from '@polkadot/util';
|
||||
import { expandMetadata, Metadata, typeDefinitions, TypeRegistry, unwrapStorageType } from '@polkadot/types';
|
||||
import { getSpecRuntime } from '@polkadot/types-known';
|
||||
import { arrayChunk, arrayFlatten, assert, assertReturn, BN, compactStripLength, lazyMethod, lazyMethods, logger, nextTick, objectSpread, stringCamelCase, stringUpperFirst, u8aConcatStrict, u8aToHex } from '@polkadot/util';
|
||||
import { blake2AsHex } from '@polkadot/util-crypto';
|
||||
|
||||
import { createSubmittable } from '../submittable';
|
||||
import { augmentObject } from '../util/augmentObject';
|
||||
@@ -66,6 +69,8 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
// HACK Use BN import so decorateDerive works... yes, wtf.
|
||||
protected __phantom = new BN(0);
|
||||
|
||||
protected _call: QueryableCalls<ApiType> = {} as QueryableCalls<ApiType>;
|
||||
|
||||
protected _consts: QueryableConsts<ApiType> = {} as QueryableConsts<ApiType>;
|
||||
|
||||
protected _derive?: ReturnType<Decorate<ApiType>['_decorateDerive']>;
|
||||
@@ -94,6 +99,8 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
|
||||
protected _rpcCore: RpcCore & RpcInterface;
|
||||
|
||||
protected _runtimeMap: Record<HexString, string> = {};
|
||||
|
||||
protected _runtimeChain?: Text;
|
||||
|
||||
protected _runtimeMetadata?: Metadata;
|
||||
@@ -206,6 +213,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
|
||||
protected _emptyDecorated (registry: Registry, blockHash?: Uint8Array): ApiDecoration<ApiType> {
|
||||
return {
|
||||
call: {},
|
||||
consts: {},
|
||||
errors: {},
|
||||
events: {},
|
||||
@@ -227,6 +235,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
registry.decoratedMeta = expandMetadata(registry.registry, registry.metadata);
|
||||
}
|
||||
|
||||
const runtime = this._decorateCalls(registry, this._decorateMethod, blockHash);
|
||||
const storage = this._decorateStorage(registry.decoratedMeta, this._decorateMethod, blockHash);
|
||||
const storageRx = this._decorateStorage(registry.decoratedMeta, this._rxDecorateMethod, blockHash);
|
||||
|
||||
@@ -235,6 +244,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
augmentObject('events', registry.decoratedMeta.events, decoratedApi.events, fromEmpty);
|
||||
augmentObject('query', storage, decoratedApi.query, fromEmpty);
|
||||
augmentObject('query', storageRx, decoratedApi.rx.query, fromEmpty);
|
||||
augmentObject('call', runtime, decoratedApi.call, fromEmpty);
|
||||
|
||||
decoratedApi.findCall = (callIndex: Uint8Array | string): CallFunction =>
|
||||
findCall(registry.registry, callIndex);
|
||||
@@ -259,6 +269,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
|
||||
const { decoratedApi, decoratedMeta } = this._createDecorated(registry, fromEmpty, registry.decoratedApi);
|
||||
|
||||
this._call = decoratedApi.call;
|
||||
this._consts = decoratedApi.consts;
|
||||
this._errors = decoratedApi.errors;
|
||||
this._events = decoratedApi.events;
|
||||
@@ -316,6 +327,28 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
this._decorateRpc(this._rpcCore, this._rxDecorateMethod, this._rx.rpc);
|
||||
}
|
||||
|
||||
// extract the actual sections from the methods (this is useful when
|
||||
// we try and create mappings to runtime names via a hash mapping)
|
||||
const sectionMap: Record<string, boolean> = {};
|
||||
|
||||
for (let i = 0; i < methods.length; i++) {
|
||||
const [section] = methods[i].split('_');
|
||||
|
||||
sectionMap[section] = true;
|
||||
}
|
||||
|
||||
// convert the actual section names into an easy name lookup
|
||||
const sections = Object.keys(sectionMap);
|
||||
|
||||
for (let i = 0; i < sections.length; i++) {
|
||||
const nameA = stringUpperFirst(sections[i]);
|
||||
const nameB = `${nameA}Api`;
|
||||
|
||||
this._runtimeMap[blake2AsHex(nameA, 64)] = nameA;
|
||||
this._runtimeMap[blake2AsHex(nameB, 64)] = nameB;
|
||||
}
|
||||
|
||||
// finally we filter the actual methods to expose
|
||||
this._filterRpcMethods(methods);
|
||||
}
|
||||
|
||||
@@ -404,6 +437,151 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
return out as DecoratedRpc<ApiType, RpcInterface>;
|
||||
}
|
||||
|
||||
// add all definition entries
|
||||
protected _addRuntimeDef (result: DefinitionsCall, additional?: DefinitionsCall): void {
|
||||
if (!additional) {
|
||||
return;
|
||||
}
|
||||
|
||||
const entries = Object.entries(additional);
|
||||
|
||||
for (let j = 0; j < entries.length; j++) {
|
||||
const [key, defs] = entries[j];
|
||||
|
||||
if (result[key]) {
|
||||
// we have this one already, step through for new versions or
|
||||
// new methods and add those as applicable
|
||||
for (let k = 0; k < defs.length; k++) {
|
||||
const def = defs[k];
|
||||
const prev = result[key].find(({ version }) => def.version === version);
|
||||
|
||||
if (prev) {
|
||||
// interleave the new methods with the old - last definition wins
|
||||
objectSpread(prev.methods, def.methods);
|
||||
} else {
|
||||
// we don't have this specific version, add it
|
||||
result[key].push(def);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// we don't have this runtime definition, add it as-is
|
||||
result[key] = defs;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// extract all runtime definitions
|
||||
protected _getRuntimeDefs (registry: Registry, specName: Text, chain: Text | string = ''): [string, DefinitionsCallEntry[]][] {
|
||||
const result: DefinitionsCall = {};
|
||||
const defValues = Object.values(typeDefinitions);
|
||||
|
||||
// options > chain/spec > built-in, apply in reverse order with
|
||||
// methods overriding previous definitions (or interleave missing)
|
||||
for (let i = 0; i < defValues.length; i++) {
|
||||
this._addRuntimeDef(result, defValues[i].runtime);
|
||||
}
|
||||
|
||||
this._addRuntimeDef(result, getSpecRuntime(registry, chain, specName));
|
||||
this._addRuntimeDef(result, this._options.runtime);
|
||||
|
||||
return Object.entries(result);
|
||||
}
|
||||
|
||||
// pre-metadata decoration
|
||||
protected _decorateCalls<ApiType extends ApiTypes> ({ registry, runtimeVersion: { apis, specName } }: VersionedRegistry<ApiType>, decorateMethod: DecorateMethod<ApiType>, blockHash?: Uint8Array | string | null): QueryableCalls<ApiType> {
|
||||
const result = {} as QueryableCalls<ApiType>;
|
||||
const named: Record<string, Record<string, DefinitionCallNamed>> = {};
|
||||
const hashes: Record<HexString, boolean> = {};
|
||||
const sections = this._getRuntimeDefs(registry, specName, this._runtimeChain);
|
||||
const older: string[] = [];
|
||||
|
||||
for (let i = 0; i < sections.length; i++) {
|
||||
const [_section, secs] = sections[i];
|
||||
const sectionHash = blake2AsHex(_section, 64);
|
||||
const rtApi = apis.find(([a]) => a.eq(sectionHash));
|
||||
|
||||
hashes[sectionHash] = true;
|
||||
|
||||
if (rtApi) {
|
||||
const all = secs.map(({ version }) => version).sort();
|
||||
const sec = secs.find(({ version }) => rtApi[1].eq(version));
|
||||
|
||||
if (sec) {
|
||||
const section = stringCamelCase(_section);
|
||||
const methods = Object.entries(sec.methods);
|
||||
|
||||
if (methods.length) {
|
||||
if (!named[section]) {
|
||||
named[section] = {};
|
||||
}
|
||||
|
||||
for (let m = 0; m < methods.length; m++) {
|
||||
const [_method, def] = methods[m];
|
||||
const method = stringCamelCase(_method);
|
||||
|
||||
named[section][method] = objectSpread({ method, name: `${_section}_${_method}`, section, sectionHash }, def);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
older.push(`${_section}/${rtApi[1].toString()} (${all.join('/')} known)`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// find the runtimes that we don't have hashes for
|
||||
const notFound = apis
|
||||
.map(([a, v]): [HexString, string] => [a.toHex(), v.toString()])
|
||||
.filter(([a]) => !hashes[a])
|
||||
.map(([a, v]) => `${this._runtimeMap[a] || a}/${v}`);
|
||||
|
||||
if (older.length) {
|
||||
l.warn(`Not decorating runtime apis without matching versions: ${older.join(', ')}`);
|
||||
}
|
||||
|
||||
if (notFound.length) {
|
||||
l.warn(`Not decorating unknown runtime apis: ${notFound.join(', ')}`);
|
||||
}
|
||||
|
||||
const stateCall = blockHash
|
||||
? (name: string, bytes: Uint8Array) => this._rpcCore.state.call(name, bytes, blockHash)
|
||||
: (name: string, bytes: Uint8Array) => this._rpcCore.state.call(name, bytes);
|
||||
|
||||
const lazySection = (section: string) =>
|
||||
lazyMethods({}, Object.keys(named[section]), (method: string) =>
|
||||
this._decorateCall(registry, named[section][method], stateCall, decorateMethod)
|
||||
);
|
||||
|
||||
const modules = Object.keys(named);
|
||||
|
||||
for (let i = 0; i < modules.length; i++) {
|
||||
lazyMethod(result, modules[i], lazySection);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
protected _decorateCall<ApiType extends ApiTypes> (registry: Registry, def: DefinitionCallNamed, stateCall: (method: string, bytes: Uint8Array) => Observable<Codec>, decorateMethod: DecorateMethod<ApiType>): AugmentedCall<ApiType> {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const decorated = decorateMethod((...args: unknown[]): Observable<Codec> => {
|
||||
if (args.length !== def.params.length) {
|
||||
throw new Error(`${def.name}:: Expected ${def.params.length} arguments, found ${args.length}`);
|
||||
}
|
||||
|
||||
const bytes = registry.createType('Raw', u8aConcatStrict(
|
||||
args.map((a, i) => registry.createTypeUnsafe(def.params[i].type, [a]).toU8a())
|
||||
));
|
||||
|
||||
return stateCall(def.name, bytes).pipe(
|
||||
map((r) => registry.createTypeUnsafe(def.type, [r]))
|
||||
);
|
||||
});
|
||||
|
||||
(decorated as AugmentedCall<ApiType>).meta = def;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
||||
return decorated;
|
||||
}
|
||||
|
||||
// only be called if supportMulti is true
|
||||
protected _decorateMulti<ApiType extends ApiTypes> (decorateMethod: DecorateMethod<ApiType>): QueryableStorageMulti<ApiType> {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
||||
|
||||
@@ -7,9 +7,7 @@ import type { Text } from '@polkadot/types';
|
||||
import type { Hash, RuntimeVersion } from '@polkadot/types/interfaces';
|
||||
import type { Metadata } from '@polkadot/types/metadata';
|
||||
import type { CallFunction, RegistryError } from '@polkadot/types/types';
|
||||
import type { ApiDecoration, ApiInterfaceRx, ApiTypes, DecoratedErrors, DecoratedEvents, DecoratedRpc, QueryableConsts, QueryableStorage, QueryableStorageMulti, SubmittableExtrinsics } from '../types';
|
||||
|
||||
import { assertReturn } from '@polkadot/util';
|
||||
import type { ApiDecoration, ApiInterfaceRx, ApiTypes, DecoratedErrors, DecoratedEvents, DecoratedRpc, QueryableCalls, QueryableConsts, QueryableStorage, QueryableStorageMulti, SubmittableExtrinsics } from '../types';
|
||||
|
||||
import { packageInfo } from '../packageInfo';
|
||||
import { findCall, findError } from './find';
|
||||
@@ -21,10 +19,21 @@ interface PkgJson {
|
||||
}
|
||||
|
||||
function assertResult<T> (value: T | undefined): T {
|
||||
return assertReturn(value, 'Api needs to be initialized before using, listen on \'ready\'');
|
||||
if (value === undefined) {
|
||||
throw new Error("Api interfaces needs to be initialized before using, wait for 'isReady'");
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
export abstract class Getters<ApiType extends ApiTypes> extends Init<ApiType> implements ApiDecoration<ApiType> {
|
||||
/**
|
||||
* @description Runtime call interfaces (currently untyped, only decorated via API options)
|
||||
*/
|
||||
public get call (): QueryableCalls<ApiType> {
|
||||
return assertResult(this._call);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Contains the parameter types (constants) of all modules.
|
||||
*
|
||||
|
||||
@@ -18,6 +18,19 @@ import { SubmittableResult } from './';
|
||||
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
async function calls (api: ApiPromise): Promise<void> {
|
||||
// it allows defaults
|
||||
const testSetId = await api.call.grandpaApi.currentSetId();
|
||||
|
||||
// it allows type overrides (generally shouldn't be used, but available)
|
||||
const testSetIdO = await api.call.grandpaApi.currentSetId<AccountId>();
|
||||
|
||||
// it allows actual params
|
||||
const nonce = await api.call.accountNonceApi.accountNonce('5Test');
|
||||
|
||||
console.log(testSetId.toNumber(), testSetIdO.isAscii, nonce.toNumber());
|
||||
}
|
||||
|
||||
function consts (api: ApiPromise): void {
|
||||
// constants has actual value & metadata
|
||||
console.log(
|
||||
@@ -215,12 +228,13 @@ function types (api: ApiPromise): void {
|
||||
const compact = registry.createType('Compact<u32>', 2);
|
||||
const f32 = registry.createType('f32');
|
||||
const u32 = registry.createType('u32');
|
||||
const raw = registry.createType('Raw');
|
||||
// const random = registry.createType('RandomType', 2); // This one should deliberately show a TS error
|
||||
|
||||
const gasUnsafe = createTypeUnsafe(registry, 'Gas', [2]);
|
||||
const overriddenUnsafe = createTypeUnsafe<Header>(registry, 'Gas', [2]);
|
||||
|
||||
console.log(balance, gas, compact, gasUnsafe, overriddenUnsafe, u32.toNumber(), f32.toNumber(), api.createType('AccountData'));
|
||||
console.log(balance, gas, compact, gasUnsafe, overriddenUnsafe, u32.toNumber(), f32.toNumber(), api.createType('AccountData'), raw.subarray(0, 10));
|
||||
}
|
||||
|
||||
async function tx (api: ApiPromise, pairs: TestKeyringMap): Promise<void> {
|
||||
@@ -289,6 +303,7 @@ async function main (): Promise<void> {
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
Promise.all([
|
||||
calls(api),
|
||||
consts(api),
|
||||
derive(api),
|
||||
errors(api),
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '8.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '8.11.2' };
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
// Copyright 2017-2022 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export * from '@polkadot/api-base/types/calls';
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
import type { ApiTypes, DeriveCustom, QueryableStorageMulti } from '@polkadot/api-base/types';
|
||||
import type { ApiInterfaceRx as ApiInterfaceBase } from '@polkadot/api-base/types/api';
|
||||
import type { QueryableCalls } from '@polkadot/api-base/types/calls';
|
||||
import type { QueryableConsts } from '@polkadot/api-base/types/consts';
|
||||
import type { DecoratedErrors } from '@polkadot/api-base/types/errors';
|
||||
import type { DecoratedEvents } from '@polkadot/api-base/types/events';
|
||||
@@ -10,7 +11,7 @@ import type { QueryableStorage } from '@polkadot/api-base/types/storage';
|
||||
import type { ProviderInterface, ProviderInterfaceEmitted } from '@polkadot/rpc-provider/types';
|
||||
import type { ExtDef } from '@polkadot/types/extrinsic/signedExtensions/types';
|
||||
import type { Call, Extrinsic, Hash, RuntimeVersionPartial } from '@polkadot/types/interfaces';
|
||||
import type { CallFunction, DefinitionRpc, DefinitionRpcSub, RegisteredTypes, Registry, RegistryError, SignatureOptions, Signer } from '@polkadot/types/types';
|
||||
import type { CallFunction, DefinitionRpc, DefinitionRpcSub, DefinitionsCall, RegisteredTypes, Registry, RegistryError, SignatureOptions, Signer } from '@polkadot/types/types';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { ApiBase } from '../base';
|
||||
@@ -18,6 +19,7 @@ import type { SubmittableExtrinsic } from '../types/submittable';
|
||||
import type { AllDerives } from '../util/decorate';
|
||||
|
||||
export * from '@polkadot/api-base/types';
|
||||
export * from '@polkadot/api/types/calls';
|
||||
export * from '@polkadot/api/types/consts';
|
||||
export * from '@polkadot/api/types/errors';
|
||||
export * from '@polkadot/api/types/events';
|
||||
@@ -60,6 +62,10 @@ export interface ApiOptions extends RegisteredTypes {
|
||||
* @description User-defined RPC methods
|
||||
*/
|
||||
rpc?: Record<string, Record<string, DefinitionRpc | DefinitionRpcSub>>;
|
||||
/**
|
||||
* @description Overrides for state_call usage (this will be removed in some future version)
|
||||
*/
|
||||
runtime?: DefinitionsCall;
|
||||
/**
|
||||
* @description Any chain-specific signed extensions that are now well-known
|
||||
*/
|
||||
@@ -90,6 +96,7 @@ export interface SignerOptions extends SignatureOptions {
|
||||
}
|
||||
|
||||
export interface ApiDecoration<ApiType extends ApiTypes> {
|
||||
call: QueryableCalls<ApiType>;
|
||||
consts: QueryableConsts<ApiType>;
|
||||
errors: DecoratedErrors<ApiType>;
|
||||
events: DecoratedEvents<ApiType>;
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "8.10.1",
|
||||
"version": "8.11.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.3",
|
||||
"@polkadot/rpc-core": "8.10.1",
|
||||
"@polkadot/types": "8.10.1",
|
||||
"@polkadot/types-codec": "8.10.1",
|
||||
"@polkadot/util": "^9.6.2"
|
||||
"@babel/runtime": "^7.18.6",
|
||||
"@polkadot/rpc-core": "8.11.2",
|
||||
"@polkadot/types": "8.11.2",
|
||||
"@polkadot/types-codec": "8.11.2",
|
||||
"@polkadot/util": "^9.7.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,11 +56,11 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
|
||||
/**
|
||||
* Submit and subscribe to watch an extrinsic until unsubscribed
|
||||
**/
|
||||
submitAndWatchExtrinsic: AugmentedRpc<(extrinsic: IExtrinsic) => Observable<ExtrinsicStatus>>;
|
||||
submitAndWatchExtrinsic: AugmentedRpc<(extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<ExtrinsicStatus>>;
|
||||
/**
|
||||
* Submit a fully formatted extrinsic for block inclusion
|
||||
**/
|
||||
submitExtrinsic: AugmentedRpc<(extrinsic: IExtrinsic) => Observable<Hash>>;
|
||||
submitExtrinsic: AugmentedRpc<(extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<Hash>>;
|
||||
};
|
||||
babe: {
|
||||
/**
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '8.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '8.11.2' };
|
||||
|
||||
@@ -20,18 +20,18 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "8.10.1",
|
||||
"version": "8.11.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.3",
|
||||
"@polkadot/rpc-augment": "8.10.1",
|
||||
"@polkadot/rpc-provider": "8.10.1",
|
||||
"@polkadot/types": "8.10.1",
|
||||
"@polkadot/util": "^9.6.2",
|
||||
"@babel/runtime": "^7.18.6",
|
||||
"@polkadot/rpc-augment": "8.11.2",
|
||||
"@polkadot/rpc-provider": "8.11.2",
|
||||
"@polkadot/types": "8.11.2",
|
||||
"@polkadot/util": "^9.7.2",
|
||||
"rxjs": "^7.5.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^9.6.2",
|
||||
"@polkadot/rpc-augment": "8.10.1"
|
||||
"@polkadot/keyring": "^9.7.2",
|
||||
"@polkadot/rpc-augment": "8.11.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '8.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '8.11.2' };
|
||||
|
||||
@@ -20,21 +20,21 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "8.10.1",
|
||||
"version": "8.11.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.3",
|
||||
"@polkadot/keyring": "^9.6.2",
|
||||
"@polkadot/types": "8.10.1",
|
||||
"@polkadot/types-support": "8.10.1",
|
||||
"@polkadot/util": "^9.6.2",
|
||||
"@polkadot/util-crypto": "^9.6.2",
|
||||
"@polkadot/x-fetch": "^9.6.2",
|
||||
"@polkadot/x-global": "^9.6.2",
|
||||
"@polkadot/x-ws": "^9.6.2",
|
||||
"@babel/runtime": "^7.18.6",
|
||||
"@polkadot/keyring": "^9.7.2",
|
||||
"@polkadot/types": "8.11.2",
|
||||
"@polkadot/types-support": "8.11.2",
|
||||
"@polkadot/util": "^9.7.2",
|
||||
"@polkadot/util-crypto": "^9.7.2",
|
||||
"@polkadot/x-fetch": "^9.7.2",
|
||||
"@polkadot/x-global": "^9.7.2",
|
||||
"@polkadot/x-ws": "^9.7.2",
|
||||
"@substrate/connect": "0.7.7",
|
||||
"eventemitter3": "^4.0.7",
|
||||
"mock-socket": "^9.1.5",
|
||||
"nock": "^13.2.7"
|
||||
"nock": "^13.2.8"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '8.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '8.11.2' };
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "8.10.1",
|
||||
"version": "8.11.2",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.cjs",
|
||||
@@ -30,20 +30,21 @@
|
||||
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.cjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.18.5",
|
||||
"@babel/register": "^7.17.7",
|
||||
"@babel/runtime": "^7.18.3",
|
||||
"@polkadot/api": "8.10.1",
|
||||
"@polkadot/api-augment": "8.10.1",
|
||||
"@polkadot/rpc-augment": "8.10.1",
|
||||
"@polkadot/rpc-provider": "8.10.1",
|
||||
"@polkadot/types": "8.10.1",
|
||||
"@polkadot/types-augment": "8.10.1",
|
||||
"@polkadot/types-codec": "8.10.1",
|
||||
"@polkadot/types-create": "8.10.1",
|
||||
"@polkadot/types-support": "8.10.1",
|
||||
"@polkadot/util": "^9.6.2",
|
||||
"@polkadot/x-ws": "^9.6.2",
|
||||
"@babel/core": "^7.18.6",
|
||||
"@babel/register": "^7.18.6",
|
||||
"@babel/runtime": "^7.18.6",
|
||||
"@polkadot/api": "8.11.2",
|
||||
"@polkadot/api-augment": "8.11.2",
|
||||
"@polkadot/rpc-augment": "8.11.2",
|
||||
"@polkadot/rpc-provider": "8.11.2",
|
||||
"@polkadot/types": "8.11.2",
|
||||
"@polkadot/types-augment": "8.11.2",
|
||||
"@polkadot/types-codec": "8.11.2",
|
||||
"@polkadot/types-create": "8.11.2",
|
||||
"@polkadot/types-support": "8.11.2",
|
||||
"@polkadot/util": "^9.7.2",
|
||||
"@polkadot/util-crypto": "^9.7.2",
|
||||
"@polkadot/x-ws": "^9.7.2",
|
||||
"handlebars": "^4.7.7",
|
||||
"websocket": "^1.0.34",
|
||||
"yargs": "^17.5.1"
|
||||
|
||||
@@ -9,10 +9,12 @@ import yargs from 'yargs';
|
||||
import { Definitions } from '@polkadot/types/types';
|
||||
import { formatNumber } from '@polkadot/util';
|
||||
|
||||
import { generateDefaultConsts, generateDefaultErrors, generateDefaultEvents, generateDefaultQuery, generateDefaultRpc, generateDefaultTx } from './generate';
|
||||
import { generateDefaultCalls, generateDefaultConsts, generateDefaultErrors, generateDefaultEvents, generateDefaultQuery, generateDefaultRpc, generateDefaultTx } from './generate';
|
||||
import { assertDir, assertFile, getMetadataViaWs, HEADER, writeFile } from './util';
|
||||
|
||||
function generate (metaHex: HexString, pkg: string | undefined, output: string, isStrict?: boolean): void {
|
||||
type Version = { apis: [HexString, number][] };
|
||||
|
||||
function generate (metaHex: HexString, version: Version | null, pkg: string | undefined, output: string, isStrict?: boolean): void {
|
||||
console.log(`Generating from metadata, ${formatNumber((metaHex.length - 2) / 2)} bytes`);
|
||||
|
||||
const outputPath = assertDir(path.join(process.cwd(), output));
|
||||
@@ -46,12 +48,15 @@ function generate (metaHex: HexString, pkg: string | undefined, output: string,
|
||||
generateDefaultQuery(path.join(outputPath, 'augment-api-query.ts'), metaHex, extraTypes, isStrict, customLookupDefinitions);
|
||||
generateDefaultRpc(path.join(outputPath, 'augment-api-rpc.ts'), extraTypes);
|
||||
generateDefaultTx(path.join(outputPath, 'augment-api-tx.ts'), metaHex, extraTypes, isStrict, customLookupDefinitions);
|
||||
generateDefaultCalls(path.join(outputPath, 'augment-api-runtime.ts'), metaHex, version, extraTypes, isStrict, customLookupDefinitions);
|
||||
|
||||
writeFile(path.join(outputPath, 'augment-api.ts'), (): string =>
|
||||
[
|
||||
HEADER('chain'),
|
||||
...[
|
||||
...['consts', 'errors', 'events', 'query', 'tx', 'rpc'].filter((key) => !!key).map((key) => `./augment-api-${key}`)
|
||||
...['consts', 'errors', 'events', 'query', 'tx', 'rpc', 'runtime']
|
||||
.filter((key) => !!key)
|
||||
.map((key) => `./augment-api-${key}`)
|
||||
].map((path) => `import '${path}';\n`)
|
||||
].join('')
|
||||
);
|
||||
@@ -59,10 +64,10 @@ function generate (metaHex: HexString, pkg: string | undefined, output: string,
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
type ArgV = { endpoint: string; output: string; package?: string; strict?: boolean };
|
||||
type ArgV = { endpoint: string; output: string; package?: string; strict?: boolean, version?: string };
|
||||
|
||||
export function main (): void {
|
||||
const { endpoint, output, package: pkg, strict: isStrict } = yargs.strict().options({
|
||||
const { endpoint, output, package: pkg, strict: isStrict, version } = yargs.strict().options({
|
||||
endpoint: {
|
||||
description: 'The endpoint to connect to (e.g. wss://kusama-rpc.polkadot.io) or relative path to a file containing the JSON output of an RPC state_getMetadata call',
|
||||
required: true,
|
||||
@@ -80,15 +85,28 @@ export function main (): void {
|
||||
strict: {
|
||||
description: 'Turns on strict mode, no output of catch-all generic versions',
|
||||
type: 'boolean'
|
||||
},
|
||||
version: {
|
||||
description: 'Pass through a version JSON (if endpoint is non-wss)',
|
||||
type: 'string'
|
||||
}
|
||||
}).argv as ArgV;
|
||||
|
||||
if (endpoint.startsWith('wss://') || endpoint.startsWith('ws://')) {
|
||||
getMetadataViaWs(endpoint)
|
||||
.then((metadata) => generate(metadata, pkg, output, isStrict))
|
||||
.then(({ metadata, version }) => generate(metadata, version, pkg, output, isStrict))
|
||||
.catch(() => process.exit(1));
|
||||
} else {
|
||||
let rtv: Version | null = null;
|
||||
|
||||
if (version) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
rtv = (require(assertFile(path.join(process.cwd(), version))) as Record<string, Version>).result;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
generate((require(assertFile(path.join(process.cwd(), endpoint))) as Record<string, HexString>).result, pkg, output, isStrict);
|
||||
const metadata = (require(assertFile(path.join(process.cwd(), endpoint))) as Record<string, HexString>).result;
|
||||
|
||||
generate(metadata, rtv, pkg, output, isStrict);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ export function main (): void {
|
||||
if (endpoint) {
|
||||
if (endpoint.startsWith('wss://') || endpoint.startsWith('ws://')) {
|
||||
getMetadataViaWs(endpoint)
|
||||
.then((metadata) => generateDefaultLookup(inputPath, metadata))
|
||||
.then(({ metadata }) => generateDefaultLookup(inputPath, metadata))
|
||||
.catch(() => process.exit(1));
|
||||
} else {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
|
||||
@@ -8,5 +8,6 @@ export { generateDefaultInterface } from './interfaceRegistry';
|
||||
export { generateDefaultLookup } from './lookup';
|
||||
export { generateDefaultQuery } from './query';
|
||||
export { generateDefaultRpc } from './rpc';
|
||||
export { generateDefaultCalls } from './runtime';
|
||||
export { generateDefaultTsDef } from './tsDef';
|
||||
export { generateDefaultTx } from './tx';
|
||||
|
||||
@@ -30,7 +30,7 @@ const StorageKeyType = 'StorageKey | string | Uint8Array | any';
|
||||
const generateRpcTypesTemplate = Handlebars.compile(readTemplate('rpc'));
|
||||
|
||||
/** @internal */
|
||||
export function generateRpcTypes (registry: TypeRegistry, importDefinitions: Record<string, Definitions>, dest: string, extraTypes: ExtraTypes = {}): void {
|
||||
export function generateRpcTypes (registry: TypeRegistry, importDefinitions: Record<string, Definitions>, dest: string, extraTypes: ExtraTypes): void {
|
||||
writeFile(dest, (): string => {
|
||||
const allTypes: ExtraTypes = { '@polkadot/types/interfaces': importDefinitions, ...extraTypes };
|
||||
const imports = createImports(allTypes);
|
||||
@@ -46,7 +46,7 @@ export function generateRpcTypes (registry: TypeRegistry, importDefinitions: Rec
|
||||
|
||||
const additional: Record<string, ModuleDef> = {};
|
||||
const modules = rpcKeys.map((sectionFullName) => {
|
||||
const rpc = definitions[sectionFullName].rpc;
|
||||
const rpc = definitions[sectionFullName].rpc || {};
|
||||
const section = sectionFullName.split('/').pop();
|
||||
|
||||
const allMethods = Object.keys(rpc).sort().map((methodName) => {
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
// Copyright 2017-2022 @polkadot/typegen authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { TypeRegistry } from '@polkadot/types/create';
|
||||
import type { DefinitionCallNamed, Definitions } from '@polkadot/types/types';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { ExtraTypes } from './types';
|
||||
|
||||
import Handlebars from 'handlebars';
|
||||
|
||||
import * as defaultDefs from '@polkadot/types/interfaces/definitions';
|
||||
import lookupDefinitions from '@polkadot/types-augment/lookup/definitions';
|
||||
import { objectSpread, stringCamelCase } from '@polkadot/util';
|
||||
import { blake2AsHex } from '@polkadot/util-crypto';
|
||||
|
||||
import { createImports, formatType, getSimilarTypes, initMeta, readTemplate, setImports, writeFile } from '../util';
|
||||
|
||||
type Apis = [HexString, number][];
|
||||
|
||||
const generateCallsTypesTemplate = Handlebars.compile(readTemplate('calls'));
|
||||
|
||||
/** @internal */
|
||||
function getDefs (apis: Apis | null, defs: Record<string, Definitions>): Record<string, Record<string, DefinitionCallNamed>> {
|
||||
const named: Record<string, Record<string, DefinitionCallNamed>> = {};
|
||||
const all = Object.values(defs);
|
||||
|
||||
for (let j = 0; j < all.length; j++) {
|
||||
const set = all[j].runtime;
|
||||
|
||||
if (set) {
|
||||
const sections = Object.entries(set);
|
||||
|
||||
for (let i = 0; i < sections.length; i++) {
|
||||
const [_section, sec] = sections[i];
|
||||
const sectionHash = blake2AsHex(_section, 64);
|
||||
const api = apis && apis.find(([h]) => h === sectionHash);
|
||||
|
||||
if (api) {
|
||||
const ver = sec.find(({ version }) => version === api[1]);
|
||||
|
||||
if (ver) {
|
||||
const methods = Object.entries(ver.methods);
|
||||
|
||||
if (methods.length) {
|
||||
const section = stringCamelCase(_section);
|
||||
|
||||
if (!named[section]) {
|
||||
named[section] = {};
|
||||
}
|
||||
|
||||
for (let m = 0; m < methods.length; m++) {
|
||||
const [_method, def] = methods[m];
|
||||
const method = stringCamelCase(_method);
|
||||
|
||||
named[section][method] = objectSpread({ method, name: `${_section}_${method}`, section, sectionHash, version: ver.version }, def);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.warn(`Unable to find matching version for runtime ${_section}, expected ${api[1]}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return named;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function generateCallTypes (registry: TypeRegistry, dest: string, apis: Apis | null, extraTypes: ExtraTypes, isStrict: boolean, customLookupDefinitions?: Definitions): void {
|
||||
writeFile(dest, (): string => {
|
||||
const allTypes: ExtraTypes = {
|
||||
'@polkadot/types-augment': {
|
||||
lookup: {
|
||||
...lookupDefinitions,
|
||||
...customLookupDefinitions
|
||||
}
|
||||
},
|
||||
'@polkadot/types/interfaces': defaultDefs,
|
||||
...extraTypes
|
||||
};
|
||||
const imports = createImports(allTypes);
|
||||
const allDefs = Object.entries(allTypes).reduce((defs, [path, obj]) => {
|
||||
return Object.entries(obj).reduce((defs, [key, value]) => ({ ...defs, [`${path}/${key}`]: value }), defs);
|
||||
}, {});
|
||||
const definitions = getDefs(apis, imports.definitions as Record<string, Definitions>);
|
||||
const callKeys = Object.keys(definitions);
|
||||
|
||||
const modules = callKeys.map((section) => {
|
||||
const calls = definitions[section];
|
||||
|
||||
const allMethods = Object.keys(calls).sort().map((methodName) => {
|
||||
const def = calls[methodName];
|
||||
|
||||
setImports(allDefs, imports, [def.type]);
|
||||
|
||||
const args = def.params.map((param) => {
|
||||
const similarTypes = getSimilarTypes(registry, imports.definitions, param.type, imports);
|
||||
|
||||
setImports(allDefs, imports, [param.type, ...similarTypes]);
|
||||
|
||||
return `${param.name}: ${similarTypes.join(' | ')}`;
|
||||
});
|
||||
|
||||
return {
|
||||
args: args.join(', '),
|
||||
docs: [def.description],
|
||||
name: methodName,
|
||||
sectionHash: def.sectionHash,
|
||||
sectionName: def.section,
|
||||
sectionVersion: def.version,
|
||||
type: formatType(registry, allDefs, def.type, imports)
|
||||
};
|
||||
}).sort((a, b) => a.name.localeCompare(b.name));
|
||||
|
||||
return {
|
||||
items: allMethods,
|
||||
name: section || 'unknown',
|
||||
sectionHash: allMethods.length && allMethods[0].sectionHash,
|
||||
sectionName: allMethods.length && allMethods[0].sectionName,
|
||||
sectionVersion: allMethods.length && allMethods[0].sectionVersion
|
||||
};
|
||||
}).filter(({ items }) => items.length).sort((a, b) => a.name.localeCompare(b.name));
|
||||
|
||||
if (modules.length) {
|
||||
imports.typesTypes.Observable = true;
|
||||
}
|
||||
|
||||
return generateCallsTypesTemplate({
|
||||
headerType: 'chain',
|
||||
imports,
|
||||
isStrict,
|
||||
modules,
|
||||
types: [
|
||||
...Object.keys(imports.localTypes).sort().map((packagePath): { file: string; types: string[] } => ({
|
||||
file: packagePath.replace('@polkadot/types-augment', '@polkadot/types'),
|
||||
types: Object.keys(imports.localTypes[packagePath])
|
||||
})),
|
||||
{
|
||||
file: '@polkadot/api-base/types',
|
||||
types: ['ApiTypes']
|
||||
}
|
||||
]
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export function generateDefaultCalls (dest: string, data: HexString, rtVersion: { apis: Apis } | null = null, extraTypes: ExtraTypes = {}, isStrict = false, customLookupDefinitions?: Definitions): void {
|
||||
const { registry } = initMeta(data, extraTypes);
|
||||
|
||||
generateCallTypes(
|
||||
registry,
|
||||
dest,
|
||||
rtVersion && rtVersion.apis,
|
||||
extraTypes,
|
||||
isStrict,
|
||||
customLookupDefinitions
|
||||
);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2022 @polkadot/typegen authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export type ExtraTypes = Record<string, Record<string, { types: Record<string, any> }>>;
|
||||
export type ExtraTypes = Record<string, Record<string, { runtime?: Record<string, any>, types: Record<string, any> }>>;
|
||||
|
||||
@@ -6,11 +6,15 @@ import type { HexString } from '@polkadot/util/types';
|
||||
import kusama from '@polkadot/types-support/metadata/static-kusama';
|
||||
import polkadot from '@polkadot/types-support/metadata/static-polkadot';
|
||||
import substrate from '@polkadot/types-support/metadata/static-substrate';
|
||||
import kusamaVer from '@polkadot/types-support/versions/kusama';
|
||||
import polkadotVer from '@polkadot/types-support/versions/polkadot';
|
||||
import substrateVer from '@polkadot/types-support/versions/substrate';
|
||||
|
||||
import { generateDefaultConsts, generateDefaultErrors, generateDefaultEvents, generateDefaultInterface, generateDefaultLookup, generateDefaultQuery, generateDefaultRpc, generateDefaultTsDef, generateDefaultTx } from './generate';
|
||||
import { generateDefaultCalls, generateDefaultConsts, generateDefaultErrors, generateDefaultEvents, generateDefaultInterface, generateDefaultLookup, generateDefaultQuery, generateDefaultRpc, generateDefaultTsDef, generateDefaultTx } from './generate';
|
||||
|
||||
const BASE = 'packages/api-augment/src';
|
||||
const METAS = Object.entries({ kusama, polkadot, substrate }) as [string, HexString][];
|
||||
const VERS = { kusama: kusamaVer, polkadot: polkadotVer, substrate: substrateVer };
|
||||
|
||||
export function main (): void {
|
||||
generateDefaultInterface();
|
||||
@@ -27,5 +31,6 @@ export function main (): void {
|
||||
generateDefaultEvents(`${BASE}/${name}/events.ts`, staticMeta);
|
||||
generateDefaultQuery(`${BASE}/${name}/query.ts`, staticMeta);
|
||||
generateDefaultTx(`${BASE}/${name}/tx.ts`, staticMeta);
|
||||
generateDefaultCalls(`${BASE}/${name}/runtime.ts`, staticMeta, VERS[name as keyof typeof VERS] as unknown as { apis: [HexString, number][] });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,10 +138,10 @@ function addRpc (): string {
|
||||
.reduce((all: Section[], _sectionName): Section[] => {
|
||||
const section = definitions[_sectionName as 'babe'];
|
||||
|
||||
Object.keys(section.rpc)
|
||||
Object.keys(section.rpc || {})
|
||||
.sort()
|
||||
.forEach((methodName) => {
|
||||
const method = section.rpc[methodName];
|
||||
const method = (section.rpc || {})[methodName];
|
||||
const sectionName = method.aliasSection || _sectionName;
|
||||
const topName = method.aliasSection ? `${_sectionName}/${method.aliasSection}` : _sectionName;
|
||||
let container = all.find(({ name }) => name === topName);
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '8.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '8.11.2' };
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{{> header }}
|
||||
|
||||
{{{ importsAll }}}
|
||||
|
||||
declare module '@polkadot/api-base/types/calls' {
|
||||
export interface AugmentedCalls<ApiType extends ApiTypes> {
|
||||
{{#each modules}}
|
||||
/** {{{sectionHash}}}/{{{sectionVersion}}} */
|
||||
{{{name}}}: {
|
||||
{{#each items}}
|
||||
{{> docs}}
|
||||
{{{name}}}: AugmentedCall<ApiType, ({{{args}}}) => Observable<{{{type}}}>>;
|
||||
{{/each}}
|
||||
{{#unless @root.isStrict}}
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
{{/unless}}
|
||||
};
|
||||
{{/each}}
|
||||
} // AugmentedCalls
|
||||
} // declare module
|
||||
@@ -31,7 +31,7 @@ export function getSimilarTypes (registry: Registry, definitions: Record<string,
|
||||
if (type === 'Extrinsic') {
|
||||
setImports(definitions, imports, ['IExtrinsic']);
|
||||
|
||||
return ['IExtrinsic'];
|
||||
return ['Extrinsic', 'IExtrinsic', 'string', 'Uint8Array'];
|
||||
} else if (type === 'Keys') {
|
||||
// This one is weird... surely it should popup as a Tuple? (but either way better as defined hex)
|
||||
return ['Keys', 'string', 'Uint8Array'];
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { HexString } from '@polkadot/util/types';
|
||||
|
||||
import { WebSocket } from '@polkadot/x-ws';
|
||||
|
||||
export async function getMetadataViaWs (endpoint: string): Promise<HexString> {
|
||||
async function getWsData <T> (endpoint: string, method: 'state_getMetadata' | 'state_getRuntimeVersion'): Promise<T> {
|
||||
return new Promise((resolve): void => {
|
||||
try {
|
||||
const websocket = new WebSocket(endpoint);
|
||||
@@ -28,11 +28,11 @@ export async function getMetadataViaWs (endpoint: string): Promise<HexString> {
|
||||
|
||||
websocket.onopen = (): void => {
|
||||
console.log('connected');
|
||||
websocket.send('{"id":"1","jsonrpc":"2.0","method":"state_getMetadata","params":[]}');
|
||||
websocket.send(`{"id":"1","jsonrpc":"2.0","method":"${method}","params":[]}`);
|
||||
};
|
||||
|
||||
websocket.onmessage = (message: { data: string }): void => {
|
||||
resolve((JSON.parse(message.data) as { result: HexString }).result);
|
||||
resolve((JSON.parse(message.data) as { result: T }).result);
|
||||
websocket.close();
|
||||
};
|
||||
} catch (error) {
|
||||
@@ -40,3 +40,15 @@ export async function getMetadataViaWs (endpoint: string): Promise<HexString> {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export async function getMetadataViaWs (endpoint: string): Promise<{ metadata: HexString, version: { apis: [HexString, number][] } }> {
|
||||
return Promise
|
||||
.all([
|
||||
getWsData<HexString>(endpoint, 'state_getMetadata'),
|
||||
getWsData<{ apis: [HexString, number][] }>(endpoint, 'state_getRuntimeVersion')
|
||||
])
|
||||
.then(([metadata, version]) => ({
|
||||
metadata,
|
||||
version
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "8.10.1",
|
||||
"version": "8.11.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.3",
|
||||
"@polkadot/types": "8.10.1",
|
||||
"@polkadot/types-codec": "8.10.1",
|
||||
"@polkadot/util": "^9.6.2"
|
||||
"@babel/runtime": "^7.18.6",
|
||||
"@polkadot/types": "8.11.2",
|
||||
"@polkadot/types-codec": "8.11.2",
|
||||
"@polkadot/util": "^9.7.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4216,7 +4216,7 @@ export default {
|
||||
* Lookup458: pallet_democracy::pallet::Error<T>
|
||||
**/
|
||||
PalletDemocracyError: {
|
||||
_enum: ['ValueLow', 'ProposalMissing', 'AlreadyCanceled', 'DuplicateProposal', 'ProposalBlacklisted', 'NotSimpleMajority', 'InvalidHash', 'NoProposal', 'AlreadyVetoed', 'DuplicatePreimage', 'NotImminent', 'TooEarly', 'Imminent', 'PreimageMissing', 'ReferendumInvalid', 'PreimageInvalid', 'NoneWaiting', 'NotVoter', 'NoPermission', 'AlreadyDelegating', 'InsufficientFunds', 'NotDelegating', 'VotesExist', 'InstantNotAllowed', 'Nonsense', 'WrongUpperBound', 'MaxVotesReached', 'TooManyProposals']
|
||||
_enum: ['ValueLow', 'ProposalMissing', 'AlreadyCanceled', 'DuplicateProposal', 'ProposalBlacklisted', 'NotSimpleMajority', 'InvalidHash', 'NoProposal', 'AlreadyVetoed', 'DuplicatePreimage', 'NotImminent', 'TooEarly', 'Imminent', 'PreimageMissing', 'ReferendumInvalid', 'PreimageInvalid', 'NoneWaiting', 'NotVoter', 'NoPermission', 'AlreadyDelegating', 'InsufficientFunds', 'NotDelegating', 'VotesExist', 'InstantNotAllowed', 'Nonsense', 'WrongUpperBound', 'MaxVotesReached', 'TooManyProposals', 'VotingPeriodLow']
|
||||
},
|
||||
/**
|
||||
* Lookup460: pallet_collective::Votes<sp_core::crypto::AccountId32, BlockNumber>
|
||||
|
||||
@@ -4564,7 +4564,8 @@ declare module '@polkadot/types/lookup' {
|
||||
readonly isWrongUpperBound: boolean;
|
||||
readonly isMaxVotesReached: boolean;
|
||||
readonly isTooManyProposals: boolean;
|
||||
readonly type: 'ValueLow' | 'ProposalMissing' | 'AlreadyCanceled' | 'DuplicateProposal' | 'ProposalBlacklisted' | 'NotSimpleMajority' | 'InvalidHash' | 'NoProposal' | 'AlreadyVetoed' | 'DuplicatePreimage' | 'NotImminent' | 'TooEarly' | 'Imminent' | 'PreimageMissing' | 'ReferendumInvalid' | 'PreimageInvalid' | 'NoneWaiting' | 'NotVoter' | 'NoPermission' | 'AlreadyDelegating' | 'InsufficientFunds' | 'NotDelegating' | 'VotesExist' | 'InstantNotAllowed' | 'Nonsense' | 'WrongUpperBound' | 'MaxVotesReached' | 'TooManyProposals';
|
||||
readonly isVotingPeriodLow: boolean;
|
||||
readonly type: 'ValueLow' | 'ProposalMissing' | 'AlreadyCanceled' | 'DuplicateProposal' | 'ProposalBlacklisted' | 'NotSimpleMajority' | 'InvalidHash' | 'NoProposal' | 'AlreadyVetoed' | 'DuplicatePreimage' | 'NotImminent' | 'TooEarly' | 'Imminent' | 'PreimageMissing' | 'ReferendumInvalid' | 'PreimageInvalid' | 'NoneWaiting' | 'NotVoter' | 'NoPermission' | 'AlreadyDelegating' | 'InsufficientFunds' | 'NotDelegating' | 'VotesExist' | 'InstantNotAllowed' | 'Nonsense' | 'WrongUpperBound' | 'MaxVotesReached' | 'TooManyProposals' | 'VotingPeriodLow';
|
||||
}
|
||||
|
||||
/** @name PalletCollectiveVotes (460) */
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '8.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '8.11.2' };
|
||||
|
||||
@@ -8,9 +8,11 @@ import type { BlockAttestations, IncludedBlocks, MoreAttestations } from '@polka
|
||||
import type { RawAuraPreDigest } from '@polkadot/types/interfaces/aura';
|
||||
import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
|
||||
import type { UncleEntryItem } from '@polkadot/types/interfaces/authorship';
|
||||
import type { AllowedSlots, BabeAuthorityWeight, BabeBlockWeight, BabeEpochConfiguration, BabeEquivocationProof, BabeWeight, EpochAuthorship, MaybeRandomness, MaybeVrf, NextConfigDescriptor, NextConfigDescriptorV1, Randomness, RawBabePreDigest, RawBabePreDigestCompat, RawBabePreDigestPrimary, RawBabePreDigestPrimaryTo159, RawBabePreDigestSecondaryPlain, RawBabePreDigestSecondaryTo159, RawBabePreDigestSecondaryVRF, RawBabePreDigestTo159, SlotNumber, VrfData, VrfOutput, VrfProof } from '@polkadot/types/interfaces/babe';
|
||||
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 { BeefyCommitment, BeefyId, BeefyNextAuthoritySet, BeefyPayload, BeefyPayloadId, BeefySignedCommitment, MmrRootHash, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
|
||||
import type { BeefyAuthoritySet, BeefyCommitment, BeefyId, BeefyNextAuthoritySet, BeefyPayload, BeefyPayloadId, BeefySignedCommitment, MmrRootHash, ValidatorSet, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
|
||||
import type { BenchmarkConfig, BenchmarkList, BenchmarkMetadata, BenchmarkParameter } 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';
|
||||
import type { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||
import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
|
||||
@@ -20,13 +22,13 @@ import type { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/conse
|
||||
import type { AliveContractInfo, CodeHash, CodeSource, CodeUploadRequest, CodeUploadResult, CodeUploadResultValue, ContractCallFlags, ContractCallRequest, ContractExecResult, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractInfo, ContractInstantiateResult, ContractInstantiateResultTo267, ContractInstantiateResultTo299, ContractReturnFlags, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateRequestV1, InstantiateRequestV2, InstantiateReturnValue, InstantiateReturnValueOk, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, StorageDeposit, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
|
||||
import type { ContractConstructorSpecLatest, ContractConstructorSpecV0, ContractConstructorSpecV1, ContractConstructorSpecV2, ContractConstructorSpecV3, ContractContractSpecV0, ContractContractSpecV1, ContractContractSpecV2, ContractContractSpecV3, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEventParamSpecLatest, ContractEventParamSpecV0, ContractEventParamSpecV2, ContractEventSpecLatest, ContractEventSpecV0, ContractEventSpecV1, ContractEventSpecV2, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpecLatest, ContractMessageParamSpecV0, ContractMessageParamSpecV2, ContractMessageSpecLatest, ContractMessageSpecV0, ContractMessageSpecV1, ContractMessageSpecV2, ContractMetadata, ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1, ContractMetadataV2, ContractMetadataV3, ContractProject, ContractProjectContract, ContractProjectInfo, ContractProjectSource, ContractProjectV0, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi';
|
||||
import type { FundIndex, FundInfo, LastContribution, TrieIndex } from '@polkadot/types/interfaces/crowdloan';
|
||||
import type { ConfigData, MessageId, OverweightIndex, PageCounter, PageIndexData } from '@polkadot/types/interfaces/cumulus';
|
||||
import type { CollationInfo, CollationInfoV1, ConfigData, MessageId, OverweightIndex, PageCounter, PageIndexData } from '@polkadot/types/interfaces/cumulus';
|
||||
import type { AccountVote, AccountVoteSplit, AccountVoteStandard, Conviction, Delegations, PreimageStatus, PreimageStatusAvailable, PriorLock, PropIndex, Proposal, ProxyState, ReferendumIndex, ReferendumInfo, ReferendumInfoFinished, ReferendumInfoTo239, ReferendumStatus, Tally, Voting, VotingDelegating, VotingDirect, VotingDirectVote } from '@polkadot/types/interfaces/democracy';
|
||||
import type { BlockStats } from '@polkadot/types/interfaces/dev';
|
||||
import type { ApprovalFlag, DefunctVoter, Renouncing, SetIndex, Vote, VoteIndex, VoteThreshold, VoterInfo } from '@polkadot/types/interfaces/elections';
|
||||
import type { CreatedBlock, ImportedAux } from '@polkadot/types/interfaces/engine';
|
||||
import type { BlockV0, BlockV1, BlockV2, EIP1559Transaction, EIP2930Transaction, EthAccessList, EthAccessListItem, EthAccount, EthAddress, EthBlock, EthBloom, EthCallRequest, EthFeeHistory, EthFilter, EthFilterAddress, EthFilterChanges, EthFilterTopic, EthFilterTopicEntry, EthFilterTopicInner, EthHeader, EthLog, EthReceipt, EthRichBlock, EthRichHeader, EthStorageProof, EthSubKind, EthSubParams, EthSubResult, EthSyncInfo, EthSyncStatus, EthTransaction, EthTransactionAction, EthTransactionCondition, EthTransactionRequest, EthTransactionSignature, EthTransactionStatus, EthWork, EthereumAccountId, EthereumAddress, EthereumLookupSource, EthereumSignature, LegacyTransaction, TransactionV0, TransactionV1, TransactionV2 } from '@polkadot/types/interfaces/eth';
|
||||
import type { EvmAccount, EvmLog, EvmVicinity, ExitError, ExitFatal, ExitReason, ExitRevert, ExitSucceed } from '@polkadot/types/interfaces/evm';
|
||||
import type { BlockV0, BlockV1, BlockV2, EIP1559Transaction, EIP2930Transaction, EthAccessList, EthAccessListItem, EthAccount, EthAddress, EthBlock, EthBloom, EthCallRequest, EthFeeHistory, EthFilter, EthFilterAddress, EthFilterChanges, EthFilterTopic, EthFilterTopicEntry, EthFilterTopicInner, EthHeader, EthLog, EthReceipt, EthReceiptV0, EthReceiptV3, EthRichBlock, EthRichHeader, EthStorageProof, EthSubKind, EthSubParams, EthSubResult, EthSyncInfo, EthSyncStatus, EthTransaction, EthTransactionAction, EthTransactionCondition, EthTransactionRequest, EthTransactionSignature, EthTransactionStatus, EthWork, EthereumAccountId, EthereumAddress, EthereumLookupSource, EthereumSignature, LegacyTransaction, TransactionV0, TransactionV1, TransactionV2 } from '@polkadot/types/interfaces/eth';
|
||||
import type { EvmAccount, EvmCallInfo, EvmCreateInfo, EvmLog, EvmVicinity, ExitError, ExitFatal, ExitReason, ExitRevert, ExitSucceed } from '@polkadot/types/interfaces/evm';
|
||||
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 { AssetOptions, Owner, PermissionLatest, PermissionVersions, PermissionsV1 } from '@polkadot/types/interfaces/genericAsset';
|
||||
import type { ActiveGilt, ActiveGiltsTotal, ActiveIndex, GiltBid } from '@polkadot/types/interfaces/gilt';
|
||||
@@ -34,28 +36,29 @@ import type { AuthorityIndex, AuthorityList, AuthoritySet, AuthoritySetChange, A
|
||||
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 { ErrorMetadataLatest, ErrorMetadataV10, ErrorMetadataV11, ErrorMetadataV12, ErrorMetadataV13, ErrorMetadataV14, ErrorMetadataV9, EventMetadataLatest, EventMetadataV10, EventMetadataV11, EventMetadataV12, EventMetadataV13, EventMetadataV14, EventMetadataV9, ExtrinsicMetadataLatest, ExtrinsicMetadataV11, ExtrinsicMetadataV12, ExtrinsicMetadataV13, ExtrinsicMetadataV14, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV10, FunctionArgumentMetadataV11, FunctionArgumentMetadataV12, FunctionArgumentMetadataV13, FunctionArgumentMetadataV14, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV10, FunctionMetadataV11, FunctionMetadataV12, FunctionMetadataV13, FunctionMetadataV14, FunctionMetadataV9, MetadataAll, MetadataLatest, MetadataV10, MetadataV11, MetadataV12, MetadataV13, MetadataV14, MetadataV9, ModuleConstantMetadataV10, ModuleConstantMetadataV11, ModuleConstantMetadataV12, ModuleConstantMetadataV13, ModuleConstantMetadataV9, ModuleMetadataV10, ModuleMetadataV11, ModuleMetadataV12, ModuleMetadataV13, ModuleMetadataV9, PalletCallMetadataLatest, PalletCallMetadataV14, PalletConstantMetadataLatest, PalletConstantMetadataV14, PalletErrorMetadataLatest, PalletErrorMetadataV14, PalletEventMetadataLatest, PalletEventMetadataV14, PalletMetadataLatest, PalletMetadataV14, PalletStorageMetadataLatest, PalletStorageMetadataV14, PortableType, PortableTypeV14, 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 { MmrLeafBatchProof, MmrLeafProof } from '@polkadot/types/interfaces/mmr';
|
||||
import type { ErrorMetadataLatest, ErrorMetadataV10, ErrorMetadataV11, ErrorMetadataV12, ErrorMetadataV13, ErrorMetadataV14, ErrorMetadataV9, EventMetadataLatest, EventMetadataV10, EventMetadataV11, EventMetadataV12, EventMetadataV13, EventMetadataV14, EventMetadataV9, ExtrinsicMetadataLatest, ExtrinsicMetadataV11, ExtrinsicMetadataV12, ExtrinsicMetadataV13, ExtrinsicMetadataV14, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV10, FunctionArgumentMetadataV11, FunctionArgumentMetadataV12, FunctionArgumentMetadataV13, FunctionArgumentMetadataV14, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV10, FunctionMetadataV11, FunctionMetadataV12, FunctionMetadataV13, FunctionMetadataV14, FunctionMetadataV9, MetadataAll, MetadataLatest, MetadataV10, MetadataV11, MetadataV12, MetadataV13, MetadataV14, MetadataV9, ModuleConstantMetadataV10, ModuleConstantMetadataV11, ModuleConstantMetadataV12, ModuleConstantMetadataV13, ModuleConstantMetadataV9, ModuleMetadataV10, ModuleMetadataV11, ModuleMetadataV12, ModuleMetadataV13, ModuleMetadataV9, OpaqueMetadata, PalletCallMetadataLatest, PalletCallMetadataV14, PalletConstantMetadataLatest, PalletConstantMetadataV14, PalletErrorMetadataLatest, PalletErrorMetadataV14, PalletEventMetadataLatest, PalletEventMetadataV14, PalletMetadataLatest, PalletMetadataV14, PalletStorageMetadataLatest, PalletStorageMetadataV14, PortableType, PortableTypeV14, 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 { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafBatchProof, MmrLeafIndex, MmrLeafProof, MmrNodeIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||
import type { StorageKind } from '@polkadot/types/interfaces/offchain';
|
||||
import type { DeferredOffenceOf, Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';
|
||||
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidateInfo, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, CoreAssignment, CoreIndex, CoreOccupied, DisputeLocation, DisputeResult, DisputeState, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, QueuedParathread, RegisteredParachainInfo, RelayBlockNumber, RelayChainBlockNumber, RelayChainHash, RelayHash, Remark, ReplacementTimes, Retriable, Scheduling, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, SlotRange10, Statement, SubId, SystemInherentData, TransientValidationData, UpgradeGoAhead, UpgradeRestriction, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationCodeHash, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, WinnersData, WinnersData10, WinnersDataTuple, WinnersDataTuple10, WinningData, WinningData10, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
|
||||
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateEvent, CandidateHash, CandidateInfo, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, CoreAssignment, CoreIndex, CoreOccupied, CoreState, DisputeLocation, DisputeResult, DisputeState, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, GroupRotationInfo, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, OccupiedCore, OccupiedCoreAssumption, OldV1SessionInfo, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, PvfCheckStatement, QueuedParathread, RegisteredParachainInfo, RelayBlockNumber, RelayChainBlockNumber, RelayChainHash, RelayHash, Remark, ReplacementTimes, Retriable, ScheduledCore, Scheduling, ScrapedOnChainVotes, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, SlotRange10, Statement, SubId, SystemInherentData, TransientValidationData, UpgradeGoAhead, UpgradeRestriction, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationCodeHash, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, WinnersData, WinnersData10, WinnersDataTuple, WinnersDataTuple10, WinningData, WinningData10, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
|
||||
import type { FeeDetails, InclusionFee, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import type { Approvals } from '@polkadot/types/interfaces/poll';
|
||||
import type { ProxyAnnouncement, ProxyDefinition, ProxyType } from '@polkadot/types/interfaces/proxy';
|
||||
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, 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, RuntimeDbWeight, Seal, SealV0, SignedBlock, SignedBlockWithJustification, SignedBlockWithJustifications, Slot, StorageData, StorageProof, TransactionInfo, TransactionPriority, TransactionStorageProof, U32F32, ValidatorId, ValidatorIdOf, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
|
||||
import type { AccountId, AccountId20, AccountId32, 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, RuntimeDbWeight, Seal, SealV0, SignedBlock, SignedBlockWithJustification, SignedBlockWithJustifications, Slot, SlotDuration, StorageData, StorageInfo, StorageProof, TransactionInfo, TransactionLongevity, TransactionPriority, TransactionStorageProof, TransactionTag, U32F32, ValidatorId, ValidatorIdOf, Weight, WeightMultiplier } 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, SpecVersion, StorageChangeSet, TraceBlockResponse, TraceError } from '@polkadot/types/interfaces/state';
|
||||
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 { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
|
||||
import type { AccountInfo, AccountInfoWithDualRefCount, AccountInfoWithProviders, AccountInfoWithRefCount, AccountInfoWithRefCountU8, AccountInfoWithTripleRefCount, ApplyExtrinsicResult, ArithmeticError, BlockLength, BlockWeights, ChainProperties, ChainType, ConsumedWeight, DigestOf, DispatchClass, DispatchError, DispatchErrorModule, DispatchErrorModuleU8, DispatchErrorModuleU8a, DispatchErrorTo198, DispatchInfo, DispatchInfoTo190, DispatchInfoTo244, DispatchOutcome, 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 { AccountInfo, AccountInfoWithDualRefCount, AccountInfoWithProviders, AccountInfoWithRefCount, AccountInfoWithRefCountU8, AccountInfoWithTripleRefCount, ApplyExtrinsicResult, ApplyExtrinsicResultPre6, ArithmeticError, BlockLength, BlockWeights, ChainProperties, ChainType, ConsumedWeight, DigestOf, DispatchClass, DispatchError, DispatchErrorModule, DispatchErrorModulePre6, DispatchErrorModuleU8, DispatchErrorModuleU8a, DispatchErrorPre6, 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';
|
||||
import type { Multiplier } from '@polkadot/types/interfaces/txpayment';
|
||||
import type { TransactionSource, TransactionValidity, ValidTransaction } from '@polkadot/types/interfaces/txqueue';
|
||||
import type { ClassDetails, ClassId, ClassMetadata, DepositBalance, DepositBalanceOf, DestroyWitness, InstanceDetails, InstanceId, InstanceMetadata } from '@polkadot/types/interfaces/uniques';
|
||||
import type { Multisig, Timepoint } from '@polkadot/types/interfaces/utility';
|
||||
import type { VestingInfo } from '@polkadot/types/interfaces/vesting';
|
||||
@@ -94,6 +97,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
AnySignature: AnySignature;
|
||||
ApiId: ApiId;
|
||||
ApplyExtrinsicResult: ApplyExtrinsicResult;
|
||||
ApplyExtrinsicResultPre6: ApplyExtrinsicResultPre6;
|
||||
ApprovalFlag: ApprovalFlag;
|
||||
Approvals: Approvals;
|
||||
ArithmeticError: ArithmeticError;
|
||||
@@ -129,6 +133,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
BabeBlockWeight: BabeBlockWeight;
|
||||
BabeEpochConfiguration: BabeEpochConfiguration;
|
||||
BabeEquivocationProof: BabeEquivocationProof;
|
||||
BabeGenesisConfiguration: BabeGenesisConfiguration;
|
||||
BabeGenesisConfigurationV1: BabeGenesisConfigurationV1;
|
||||
BabeWeight: BabeWeight;
|
||||
BackedCandidate: BackedCandidate;
|
||||
Balance: Balance;
|
||||
@@ -136,6 +142,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
BalanceLockTo212: BalanceLockTo212;
|
||||
BalanceOf: BalanceOf;
|
||||
BalanceStatus: BalanceStatus;
|
||||
BeefyAuthoritySet: BeefyAuthoritySet;
|
||||
BeefyCommitment: BeefyCommitment;
|
||||
BeefyId: BeefyId;
|
||||
BeefyKey: BeefyKey;
|
||||
@@ -143,6 +150,10 @@ declare module '@polkadot/types/types/registry' {
|
||||
BeefyPayload: BeefyPayload;
|
||||
BeefyPayloadId: BeefyPayloadId;
|
||||
BeefySignedCommitment: BeefySignedCommitment;
|
||||
BenchmarkConfig: BenchmarkConfig;
|
||||
BenchmarkList: BenchmarkList;
|
||||
BenchmarkMetadata: BenchmarkMetadata;
|
||||
BenchmarkParameter: BenchmarkParameter;
|
||||
Bid: Bid;
|
||||
Bidder: Bidder;
|
||||
BidKind: BidKind;
|
||||
@@ -186,6 +197,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
CallOrigin: CallOrigin;
|
||||
CandidateCommitments: CandidateCommitments;
|
||||
CandidateDescriptor: CandidateDescriptor;
|
||||
CandidateEvent: CandidateEvent;
|
||||
CandidateHash: CandidateHash;
|
||||
CandidateInfo: CandidateInfo;
|
||||
CandidatePendingAvailability: CandidatePendingAvailability;
|
||||
@@ -195,6 +207,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
ChainType: ChainType;
|
||||
ChangesTrieConfiguration: ChangesTrieConfiguration;
|
||||
ChangesTrieSignal: ChangesTrieSignal;
|
||||
CheckInherentsResult: CheckInherentsResult;
|
||||
ClassDetails: ClassDetails;
|
||||
ClassId: ClassId;
|
||||
ClassMetadata: ClassMetadata;
|
||||
@@ -204,6 +217,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
CodeUploadRequest: CodeUploadRequest;
|
||||
CodeUploadResult: CodeUploadResult;
|
||||
CodeUploadResultValue: CodeUploadResultValue;
|
||||
CollationInfo: CollationInfo;
|
||||
CollationInfoV1: CollationInfoV1;
|
||||
CollatorId: CollatorId;
|
||||
CollatorSignature: CollatorSignature;
|
||||
CollectiveOrigin: CollectiveOrigin;
|
||||
@@ -287,6 +302,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
CoreAssignment: CoreAssignment;
|
||||
CoreIndex: CoreIndex;
|
||||
CoreOccupied: CoreOccupied;
|
||||
CoreState: CoreState;
|
||||
CrateVersion: CrateVersion;
|
||||
CreatedBlock: CreatedBlock;
|
||||
Data: Data;
|
||||
@@ -306,14 +322,17 @@ declare module '@polkadot/types/types/registry' {
|
||||
DispatchClass: DispatchClass;
|
||||
DispatchError: DispatchError;
|
||||
DispatchErrorModule: DispatchErrorModule;
|
||||
DispatchErrorModulePre6: DispatchErrorModulePre6;
|
||||
DispatchErrorModuleU8: DispatchErrorModuleU8;
|
||||
DispatchErrorModuleU8a: DispatchErrorModuleU8a;
|
||||
DispatchErrorPre6: DispatchErrorPre6;
|
||||
DispatchErrorTo198: DispatchErrorTo198;
|
||||
DispatchFeePayment: DispatchFeePayment;
|
||||
DispatchInfo: DispatchInfo;
|
||||
DispatchInfoTo190: DispatchInfoTo190;
|
||||
DispatchInfoTo244: DispatchInfoTo244;
|
||||
DispatchOutcome: DispatchOutcome;
|
||||
DispatchOutcomePre6: DispatchOutcomePre6;
|
||||
DispatchResult: DispatchResult;
|
||||
DispatchResultOf: DispatchResultOf;
|
||||
DispatchResultTo198: DispatchResultTo198;
|
||||
@@ -337,6 +356,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
ElectionStatus: ElectionStatus;
|
||||
EncodedFinalityProofs: EncodedFinalityProofs;
|
||||
EncodedJustification: EncodedJustification;
|
||||
Epoch: Epoch;
|
||||
EpochAuthorship: EpochAuthorship;
|
||||
Era: Era;
|
||||
EraIndex: EraIndex;
|
||||
@@ -371,6 +391,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
EthHeader: EthHeader;
|
||||
EthLog: EthLog;
|
||||
EthReceipt: EthReceipt;
|
||||
EthReceiptV0: EthReceiptV0;
|
||||
EthReceiptV3: EthReceiptV3;
|
||||
EthRichBlock: EthRichBlock;
|
||||
EthRichHeader: EthRichHeader;
|
||||
EthStorageProof: EthStorageProof;
|
||||
@@ -398,6 +420,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
EventMetadataV9: EventMetadataV9;
|
||||
EventRecord: EventRecord;
|
||||
EvmAccount: EvmAccount;
|
||||
EvmCallInfo: EvmCallInfo;
|
||||
EvmCreateInfo: EvmCreateInfo;
|
||||
EvmLog: EvmLog;
|
||||
EvmVicinity: EvmVicinity;
|
||||
ExecReturnValue: ExecReturnValue;
|
||||
@@ -474,6 +498,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
GrandpaPrevote: GrandpaPrevote;
|
||||
GrandpaSignedPrecommit: GrandpaSignedPrecommit;
|
||||
GroupIndex: GroupIndex;
|
||||
GroupRotationInfo: GroupRotationInfo;
|
||||
H1024: H1024;
|
||||
H128: H128;
|
||||
H160: H160;
|
||||
@@ -530,6 +555,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
Index: Index;
|
||||
IndicesLookupSource: IndicesLookupSource;
|
||||
IndividualExposure: IndividualExposure;
|
||||
InherentData: InherentData;
|
||||
InherentIdentifier: InherentIdentifier;
|
||||
InitializationData: InitializationData;
|
||||
InstanceDetails: InstanceDetails;
|
||||
InstanceId: InstanceId;
|
||||
@@ -600,8 +627,14 @@ declare module '@polkadot/types/types/registry' {
|
||||
MetadataV14: MetadataV14;
|
||||
MetadataV9: MetadataV9;
|
||||
MigrationStatusResult: MigrationStatusResult;
|
||||
MmrBatchProof: MmrBatchProof;
|
||||
MmrEncodableOpaqueLeaf: MmrEncodableOpaqueLeaf;
|
||||
MmrError: MmrError;
|
||||
MmrLeafBatchProof: MmrLeafBatchProof;
|
||||
MmrLeafIndex: MmrLeafIndex;
|
||||
MmrLeafProof: MmrLeafProof;
|
||||
MmrNodeIndex: MmrNodeIndex;
|
||||
MmrProof: MmrProof;
|
||||
MmrRootHash: MmrRootHash;
|
||||
ModuleConstantMetadataV10: ModuleConstantMetadataV10;
|
||||
ModuleConstantMetadataV11: ModuleConstantMetadataV11;
|
||||
@@ -652,11 +685,16 @@ declare module '@polkadot/types/types/registry' {
|
||||
NominatorIndexCompact: NominatorIndexCompact;
|
||||
NotConnectedPeer: NotConnectedPeer;
|
||||
Null: Null;
|
||||
OccupiedCore: OccupiedCore;
|
||||
OccupiedCoreAssumption: OccupiedCoreAssumption;
|
||||
OffchainAccuracy: OffchainAccuracy;
|
||||
OffchainAccuracyCompact: OffchainAccuracyCompact;
|
||||
OffenceDetails: OffenceDetails;
|
||||
Offender: Offender;
|
||||
OldV1SessionInfo: OldV1SessionInfo;
|
||||
OpaqueCall: OpaqueCall;
|
||||
OpaqueKeyOwnershipProof: OpaqueKeyOwnershipProof;
|
||||
OpaqueMetadata: OpaqueMetadata;
|
||||
OpaqueMultiaddr: OpaqueMultiaddr;
|
||||
OpaqueNetworkState: OpaqueNetworkState;
|
||||
OpaquePeerId: OpaquePeerId;
|
||||
@@ -757,6 +795,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
ProxyDefinition: ProxyDefinition;
|
||||
ProxyState: ProxyState;
|
||||
ProxyType: ProxyType;
|
||||
PvfCheckStatement: PvfCheckStatement;
|
||||
QueryId: QueryId;
|
||||
QueryStatus: QueryStatus;
|
||||
QueueConfigData: QueueConfigData;
|
||||
@@ -827,8 +866,11 @@ declare module '@polkadot/types/types/registry' {
|
||||
RuntimeVersion: RuntimeVersion;
|
||||
RuntimeVersionApi: RuntimeVersionApi;
|
||||
RuntimeVersionPartial: RuntimeVersionPartial;
|
||||
RuntimeVersionPre3: RuntimeVersionPre3;
|
||||
RuntimeVersionPre4: RuntimeVersionPre4;
|
||||
Schedule: Schedule;
|
||||
Scheduled: Scheduled;
|
||||
ScheduledCore: ScheduledCore;
|
||||
ScheduledTo254: ScheduledTo254;
|
||||
SchedulePeriod: SchedulePeriod;
|
||||
SchedulePriority: SchedulePriority;
|
||||
@@ -836,6 +878,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
ScheduleTo258: ScheduleTo258;
|
||||
ScheduleTo264: ScheduleTo264;
|
||||
Scheduling: Scheduling;
|
||||
ScrapedOnChainVotes: ScrapedOnChainVotes;
|
||||
Seal: Seal;
|
||||
SealV0: SealV0;
|
||||
SeatHolder: SeatHolder;
|
||||
@@ -924,6 +967,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
SlashingSpansTo204: SlashingSpansTo204;
|
||||
SlashJournalEntry: SlashJournalEntry;
|
||||
Slot: Slot;
|
||||
SlotDuration: SlotDuration;
|
||||
SlotNumber: SlotNumber;
|
||||
SlotRange: SlotRange;
|
||||
SlotRange10: SlotRange10;
|
||||
@@ -972,6 +1016,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
StorageHasherV13: StorageHasherV13;
|
||||
StorageHasherV14: StorageHasherV14;
|
||||
StorageHasherV9: StorageHasherV9;
|
||||
StorageInfo: StorageInfo;
|
||||
StorageKey: StorageKey;
|
||||
StorageKind: StorageKind;
|
||||
StorageMetadataV10: StorageMetadataV10;
|
||||
@@ -1001,11 +1046,15 @@ declare module '@polkadot/types/types/registry' {
|
||||
TraceError: TraceError;
|
||||
TransactionalError: TransactionalError;
|
||||
TransactionInfo: TransactionInfo;
|
||||
TransactionLongevity: TransactionLongevity;
|
||||
TransactionPriority: TransactionPriority;
|
||||
TransactionSource: TransactionSource;
|
||||
TransactionStorageProof: TransactionStorageProof;
|
||||
TransactionTag: TransactionTag;
|
||||
TransactionV0: TransactionV0;
|
||||
TransactionV1: TransactionV1;
|
||||
TransactionV2: TransactionV2;
|
||||
TransactionValidity: TransactionValidity;
|
||||
TransactionValidityError: TransactionValidityError;
|
||||
TransientValidationData: TransientValidationData;
|
||||
TreasuryProposal: TreasuryProposal;
|
||||
@@ -1052,10 +1101,12 @@ declare module '@polkadot/types/types/registry' {
|
||||
ValidatorPrefsTo196: ValidatorPrefsTo196;
|
||||
ValidatorPrefsWithBlocked: ValidatorPrefsWithBlocked;
|
||||
ValidatorPrefsWithCommission: ValidatorPrefsWithCommission;
|
||||
ValidatorSet: ValidatorSet;
|
||||
ValidatorSetId: ValidatorSetId;
|
||||
ValidatorSignature: ValidatorSignature;
|
||||
ValidDisputeStatementKind: ValidDisputeStatementKind;
|
||||
ValidityAttestation: ValidityAttestation;
|
||||
ValidTransaction: ValidTransaction;
|
||||
VecInboundHrmpMessage: VecInboundHrmpMessage;
|
||||
VersionedMultiAsset: VersionedMultiAsset;
|
||||
VersionedMultiAssets: VersionedMultiAssets;
|
||||
|
||||
@@ -20,17 +20,17 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "8.10.1",
|
||||
"version": "8.11.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.3",
|
||||
"@polkadot/util": "^9.6.2",
|
||||
"@polkadot/x-bigint": "^9.6.2"
|
||||
"@babel/runtime": "^7.18.6",
|
||||
"@polkadot/util": "^9.7.2",
|
||||
"@polkadot/x-bigint": "^9.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/types": "8.10.1",
|
||||
"@polkadot/types-augment": "8.10.1",
|
||||
"@polkadot/types-support": "8.10.1",
|
||||
"@polkadot/util-crypto": "^9.6.2"
|
||||
"@polkadot/types": "8.11.2",
|
||||
"@polkadot/types-augment": "8.11.2",
|
||||
"@polkadot/types-support": "8.11.2",
|
||||
"@polkadot/util-crypto": "^9.7.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-codec', path: 'auto', type: 'auto', version: '8.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/types-codec', path: 'auto', type: 'auto', version: '8.11.2' };
|
||||
|
||||
@@ -20,14 +20,14 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "8.10.1",
|
||||
"version": "8.11.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.3",
|
||||
"@polkadot/types-codec": "8.10.1",
|
||||
"@polkadot/util": "^9.6.2"
|
||||
"@babel/runtime": "^7.18.6",
|
||||
"@polkadot/types-codec": "8.11.2",
|
||||
"@polkadot/util": "^9.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/types": "8.10.1"
|
||||
"@polkadot/types": "8.11.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-create', path: 'auto', type: 'auto', version: '8.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/types-create', path: 'auto', type: 'auto', version: '8.11.2' };
|
||||
|
||||
@@ -20,14 +20,14 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "8.10.1",
|
||||
"version": "8.11.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.3",
|
||||
"@polkadot/networks": "^9.6.2",
|
||||
"@polkadot/types": "8.10.1",
|
||||
"@polkadot/types-codec": "8.10.1",
|
||||
"@polkadot/types-create": "8.10.1",
|
||||
"@polkadot/util": "^9.6.2"
|
||||
"@babel/runtime": "^7.18.6",
|
||||
"@polkadot/networks": "^9.7.2",
|
||||
"@polkadot/types": "8.11.2",
|
||||
"@polkadot/types-codec": "8.11.2",
|
||||
"@polkadot/types-create": "8.11.2",
|
||||
"@polkadot/util": "^9.7.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-known', path: 'auto', type: 'auto', version: '8.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/types-known', path: 'auto', type: 'auto', version: '8.11.2' };
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
|
||||
import type { ExtDef } from '@polkadot/types/extrinsic/signedExtensions/types';
|
||||
import type { Hash } from '@polkadot/types/interfaces';
|
||||
import type { ChainUpgradeVersion, CodecHasher, DefinitionRpc, DefinitionRpcSub, OverrideModuleType, OverrideVersionedType, Registry, RegistryTypes } from '@polkadot/types/types';
|
||||
import type { ChainUpgradeVersion, CodecHasher, DefinitionRpc, DefinitionRpcSub, DefinitionsCall, OverrideModuleType, OverrideVersionedType, Registry, RegistryTypes } from '@polkadot/types/types';
|
||||
import type { Text } from '@polkadot/types-codec';
|
||||
import type { BN } from '@polkadot/util';
|
||||
|
||||
import { bnToBn, isNull, isUndefined, objectSpread } from '@polkadot/util';
|
||||
import { bnToBn, objectSpread } from '@polkadot/util';
|
||||
|
||||
import typesChain from './chain';
|
||||
import typesSpec from './spec';
|
||||
@@ -22,8 +22,8 @@ function withNames <T> (chainName: Text | string, specName: Text | string, fn: (
|
||||
function filterVersions (versions: OverrideVersionedType[] = [], specVersion: number): RegistryTypes {
|
||||
return versions
|
||||
.filter(({ minmax: [min, max] }) =>
|
||||
(isUndefined(min) || isNull(min) || specVersion >= min) &&
|
||||
(isUndefined(max) || isNull(max) || specVersion <= max)
|
||||
(min === undefined || min === null || specVersion >= min) &&
|
||||
(max === undefined || max === null || specVersion <= max)
|
||||
)
|
||||
.reduce((result: RegistryTypes, { types }): RegistryTypes =>
|
||||
objectSpread(result, types), {}
|
||||
@@ -86,6 +86,18 @@ export function getSpecRpc ({ knownTypes }: Registry, chainName: Text | string,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Based on the chain and runtimeVersion, get the applicable runtime definitions (ready for registration)
|
||||
*/
|
||||
export function getSpecRuntime ({ knownTypes }: Registry, chainName: Text | string, specName: Text | string): DefinitionsCall {
|
||||
return withNames(chainName, specName, (c, s) =>
|
||||
objectSpread({},
|
||||
knownTypes.typesBundle?.spec?.[s]?.runtime,
|
||||
knownTypes.typesBundle?.chain?.[c]?.runtime
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Based on the chain and runtimeVersion, get the applicable alias definitions (ready for registration)
|
||||
*/
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "8.10.1",
|
||||
"version": "8.11.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.3",
|
||||
"@polkadot/util": "^9.6.2"
|
||||
"@babel/runtime": "^7.18.6",
|
||||
"@polkadot/util": "^9.7.2"
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -19573,8 +19573,9 @@
|
||||
"The dispatch of this call must be `FastTrackOrigin`.",
|
||||
"",
|
||||
"- `proposal_hash`: The hash of the current external proposal.",
|
||||
"- `voting_period`: The period that is allowed for voting on this proposal. Increased to",
|
||||
" `FastTrackVotingPeriod` if too low.",
|
||||
"- `voting_period`: The period that is allowed for voting on this proposal.",
|
||||
"\tMust be always greater than zero.",
|
||||
"\tFor `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`.",
|
||||
"- `delay`: The number of block after voting has ended in approval and this should be",
|
||||
" enacted. This doesn't have a minimum amount.",
|
||||
"",
|
||||
@@ -20263,6 +20264,14 @@
|
||||
"docs": [
|
||||
"Maximum number of proposals reached."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "VotingPeriodLow",
|
||||
"fields": [],
|
||||
"index": 28,
|
||||
"docs": [
|
||||
"Voting period too low"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -16353,8 +16353,9 @@
|
||||
"The dispatch of this call must be `FastTrackOrigin`.",
|
||||
"",
|
||||
"- `proposal_hash`: The hash of the current external proposal.",
|
||||
"- `voting_period`: The period that is allowed for voting on this proposal. Increased to",
|
||||
" `FastTrackVotingPeriod` if too low.",
|
||||
"- `voting_period`: The period that is allowed for voting on this proposal.",
|
||||
"\tMust be always greater than zero.",
|
||||
"\tFor `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`.",
|
||||
"- `delay`: The number of block after voting has ended in approval and this should be",
|
||||
" enacted. This doesn't have a minimum amount.",
|
||||
"",
|
||||
@@ -33889,6 +33890,14 @@
|
||||
"docs": [
|
||||
"Maximum number of proposals reached."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "VotingPeriodLow",
|
||||
"fields": [],
|
||||
"index": 28,
|
||||
"docs": [
|
||||
"Voting period too low"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -16070,8 +16070,9 @@
|
||||
"The dispatch of this call must be `FastTrackOrigin`.",
|
||||
"",
|
||||
"- `proposal_hash`: The hash of the current external proposal.",
|
||||
"- `voting_period`: The period that is allowed for voting on this proposal. Increased to",
|
||||
" `FastTrackVotingPeriod` if too low.",
|
||||
"- `voting_period`: The period that is allowed for voting on this proposal.",
|
||||
"\tMust be always greater than zero.",
|
||||
"\tFor `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`.",
|
||||
"- `delay`: The number of block after voting has ended in approval and this should be",
|
||||
" enacted. This doesn't have a minimum amount.",
|
||||
"",
|
||||
@@ -32800,6 +32801,14 @@
|
||||
"docs": [
|
||||
"Maximum number of proposals reached."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "VotingPeriodLow",
|
||||
"fields": [],
|
||||
"index": 28,
|
||||
"docs": [
|
||||
"Voting period too low"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-support', path: 'auto', type: 'auto', version: '8.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/types-support', path: 'auto', type: 'auto', version: '8.11.2' };
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
// Copyright 2017-2022 @polkadot/types-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
export default {
|
||||
specName: 'kusama',
|
||||
implName: 'parity-kusama',
|
||||
authoringVersion: 2,
|
||||
specVersion: 9230,
|
||||
implVersion: 0,
|
||||
apis: [
|
||||
[
|
||||
'0xdf6acb689907609b',
|
||||
4
|
||||
],
|
||||
[
|
||||
'0x37e397fc7c91f5e4',
|
||||
1
|
||||
],
|
||||
[
|
||||
'0x40fe3ad401f8959a',
|
||||
6
|
||||
],
|
||||
[
|
||||
'0xd2bc9897eed08f15',
|
||||
3
|
||||
],
|
||||
[
|
||||
'0xf78b278be53f454c',
|
||||
2
|
||||
],
|
||||
[
|
||||
'0xaf2c0297a23e6d3d',
|
||||
2
|
||||
],
|
||||
[
|
||||
'0x49eaaf1b548a0cb0',
|
||||
1
|
||||
],
|
||||
[
|
||||
'0x91d5df18b0d2cf58',
|
||||
1
|
||||
],
|
||||
[
|
||||
'0xed99c5acb25eedf5',
|
||||
3
|
||||
],
|
||||
[
|
||||
'0xcbca25e39f142387',
|
||||
2
|
||||
],
|
||||
[
|
||||
'0x687ad44ad37f03c2',
|
||||
1
|
||||
],
|
||||
[
|
||||
'0xab3c0572291feb8b',
|
||||
1
|
||||
],
|
||||
[
|
||||
'0xbc9d89904f5b923f',
|
||||
1
|
||||
],
|
||||
[
|
||||
'0x37c8bb1350a9a2a8',
|
||||
1
|
||||
]
|
||||
],
|
||||
transactionVersion: 11,
|
||||
stateVersion: 0
|
||||
};
|
||||
@@ -0,0 +1,72 @@
|
||||
// Copyright 2017-2022 @polkadot/types-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
export default {
|
||||
specName: 'polkadot',
|
||||
implName: 'parity-polkadot',
|
||||
authoringVersion: 0,
|
||||
specVersion: 9230,
|
||||
implVersion: 0,
|
||||
apis: [
|
||||
[
|
||||
'0xdf6acb689907609b',
|
||||
4
|
||||
],
|
||||
[
|
||||
'0x37e397fc7c91f5e4',
|
||||
1
|
||||
],
|
||||
[
|
||||
'0x40fe3ad401f8959a',
|
||||
6
|
||||
],
|
||||
[
|
||||
'0xd2bc9897eed08f15',
|
||||
3
|
||||
],
|
||||
[
|
||||
'0xf78b278be53f454c',
|
||||
2
|
||||
],
|
||||
[
|
||||
'0xaf2c0297a23e6d3d',
|
||||
2
|
||||
],
|
||||
[
|
||||
'0x49eaaf1b548a0cb0',
|
||||
1
|
||||
],
|
||||
[
|
||||
'0x91d5df18b0d2cf58',
|
||||
1
|
||||
],
|
||||
[
|
||||
'0xed99c5acb25eedf5',
|
||||
3
|
||||
],
|
||||
[
|
||||
'0xcbca25e39f142387',
|
||||
2
|
||||
],
|
||||
[
|
||||
'0x687ad44ad37f03c2',
|
||||
1
|
||||
],
|
||||
[
|
||||
'0xab3c0572291feb8b',
|
||||
1
|
||||
],
|
||||
[
|
||||
'0xbc9d89904f5b923f',
|
||||
1
|
||||
],
|
||||
[
|
||||
'0x37c8bb1350a9a2a8',
|
||||
1
|
||||
]
|
||||
],
|
||||
transactionVersion: 12,
|
||||
stateVersion: 0
|
||||
};
|
||||
@@ -0,0 +1,68 @@
|
||||
// Copyright 2017-2022 @polkadot/types-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
export default {
|
||||
specName: 'node',
|
||||
implName: 'substrate-node',
|
||||
authoringVersion: 10,
|
||||
specVersion: 268,
|
||||
implVersion: 0,
|
||||
apis: [
|
||||
[
|
||||
'0xdf6acb689907609b',
|
||||
4
|
||||
],
|
||||
[
|
||||
'0x37e397fc7c91f5e4',
|
||||
1
|
||||
],
|
||||
[
|
||||
'0x40fe3ad401f8959a',
|
||||
6
|
||||
],
|
||||
[
|
||||
'0xd2bc9897eed08f15',
|
||||
3
|
||||
],
|
||||
[
|
||||
'0xf78b278be53f454c',
|
||||
2
|
||||
],
|
||||
[
|
||||
'0xed99c5acb25eedf5',
|
||||
3
|
||||
],
|
||||
[
|
||||
'0xcbca25e39f142387',
|
||||
2
|
||||
],
|
||||
[
|
||||
'0x687ad44ad37f03c2',
|
||||
1
|
||||
],
|
||||
[
|
||||
'0xbc9d89904f5b923f',
|
||||
1
|
||||
],
|
||||
[
|
||||
'0x68b66ba122c93fa7',
|
||||
1
|
||||
],
|
||||
[
|
||||
'0x37c8bb1350a9a2a8',
|
||||
1
|
||||
],
|
||||
[
|
||||
'0x91d5df18b0d2cf58',
|
||||
1
|
||||
],
|
||||
[
|
||||
'0xab3c0572291feb8b',
|
||||
1
|
||||
]
|
||||
],
|
||||
transactionVersion: 2,
|
||||
stateVersion: 1
|
||||
};
|
||||
+10
-10
@@ -20,20 +20,20 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "8.10.1",
|
||||
"version": "8.11.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.3",
|
||||
"@polkadot/keyring": "^9.6.2",
|
||||
"@polkadot/types-augment": "8.10.1",
|
||||
"@polkadot/types-codec": "8.10.1",
|
||||
"@polkadot/types-create": "8.10.1",
|
||||
"@polkadot/util": "^9.6.2",
|
||||
"@polkadot/util-crypto": "^9.6.2",
|
||||
"@babel/runtime": "^7.18.6",
|
||||
"@polkadot/keyring": "^9.7.2",
|
||||
"@polkadot/types-augment": "8.11.2",
|
||||
"@polkadot/types-codec": "8.11.2",
|
||||
"@polkadot/types-create": "8.11.2",
|
||||
"@polkadot/util": "^9.7.2",
|
||||
"@polkadot/util-crypto": "^9.7.2",
|
||||
"rxjs": "^7.5.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^9.6.2",
|
||||
"@polkadot/types-support": "8.10.1"
|
||||
"@polkadot/keyring": "^9.7.2",
|
||||
"@polkadot/types-support": "8.11.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,11 @@
|
||||
|
||||
import type { Definitions } from '../../types';
|
||||
|
||||
import { runtime } from './runtime';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
runtime,
|
||||
types: {
|
||||
RawAuraPreDigest: {
|
||||
slotNumber: 'u64'
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
// Copyright 2017-2022 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { DefinitionsCall } from '../../types';
|
||||
|
||||
export const runtime: DefinitionsCall = {
|
||||
AuraApi: [
|
||||
{
|
||||
methods: {
|
||||
authorities: {
|
||||
description: 'Return the current set of authorities.',
|
||||
params: [],
|
||||
type: 'Vec<AuthorityId>'
|
||||
},
|
||||
slot_duration: {
|
||||
description: 'Returns the slot duration for Aura.',
|
||||
params: [],
|
||||
type: 'SlotDuration'
|
||||
}
|
||||
},
|
||||
version: 1
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -6,98 +6,10 @@
|
||||
|
||||
import type { Definitions } from '../../types';
|
||||
|
||||
import { rpc } from './rpc';
|
||||
|
||||
export default {
|
||||
rpc: {
|
||||
hasKey: {
|
||||
description: 'Returns true if the keystore has private keys for the given public key and key type.',
|
||||
params: [
|
||||
{
|
||||
name: 'publicKey',
|
||||
type: 'Bytes'
|
||||
},
|
||||
{
|
||||
name: 'keyType',
|
||||
type: 'Text'
|
||||
}
|
||||
],
|
||||
type: 'bool'
|
||||
},
|
||||
hasSessionKeys: {
|
||||
description: 'Returns true if the keystore has private keys for the given session public keys.',
|
||||
params: [
|
||||
{
|
||||
name: 'sessionKeys',
|
||||
type: 'Bytes'
|
||||
}
|
||||
],
|
||||
type: 'bool'
|
||||
},
|
||||
removeExtrinsic: {
|
||||
description: 'Remove given extrinsic from the pool and temporarily ban it to prevent reimporting',
|
||||
params: [
|
||||
{
|
||||
name: 'bytesOrHash',
|
||||
type: 'Vec<ExtrinsicOrHash>'
|
||||
}
|
||||
],
|
||||
type: 'Vec<Hash>'
|
||||
},
|
||||
insertKey: {
|
||||
description: 'Insert a key into the keystore.',
|
||||
params: [
|
||||
{
|
||||
name: 'keyType',
|
||||
type: 'Text'
|
||||
},
|
||||
{
|
||||
name: 'suri',
|
||||
type: 'Text'
|
||||
},
|
||||
{
|
||||
name: 'publicKey',
|
||||
type: 'Bytes'
|
||||
}
|
||||
],
|
||||
type: 'Bytes'
|
||||
},
|
||||
rotateKeys: {
|
||||
description: 'Generate new session keys and returns the corresponding public keys',
|
||||
params: [],
|
||||
type: 'Bytes'
|
||||
},
|
||||
pendingExtrinsics: {
|
||||
description: 'Returns all pending extrinsics, potentially grouped by sender',
|
||||
params: [],
|
||||
type: 'Vec<Extrinsic>'
|
||||
},
|
||||
submitExtrinsic: {
|
||||
isSigned: true,
|
||||
description: 'Submit a fully formatted extrinsic for block inclusion',
|
||||
params: [
|
||||
{
|
||||
name: 'extrinsic',
|
||||
type: 'Extrinsic'
|
||||
}
|
||||
],
|
||||
type: 'Hash'
|
||||
},
|
||||
submitAndWatchExtrinsic: {
|
||||
description: 'Submit and subscribe to watch an extrinsic until unsubscribed',
|
||||
isSigned: true,
|
||||
params: [
|
||||
{
|
||||
name: 'extrinsic',
|
||||
type: 'Extrinsic'
|
||||
}
|
||||
],
|
||||
pubsub: [
|
||||
'extrinsicUpdate',
|
||||
'submitAndWatchExtrinsic',
|
||||
'unwatchExtrinsic'
|
||||
],
|
||||
type: 'ExtrinsicStatus'
|
||||
}
|
||||
},
|
||||
rpc,
|
||||
types: {
|
||||
ExtrinsicOrHash: {
|
||||
_enum: {
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
// Copyright 2017-2022 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { DefinitionsRpc } from '../../types';
|
||||
|
||||
export const rpc: DefinitionsRpc = {
|
||||
hasKey: {
|
||||
description: 'Returns true if the keystore has private keys for the given public key and key type.',
|
||||
params: [
|
||||
{
|
||||
name: 'publicKey',
|
||||
type: 'Bytes'
|
||||
},
|
||||
{
|
||||
name: 'keyType',
|
||||
type: 'Text'
|
||||
}
|
||||
],
|
||||
type: 'bool'
|
||||
},
|
||||
hasSessionKeys: {
|
||||
description: 'Returns true if the keystore has private keys for the given session public keys.',
|
||||
params: [
|
||||
{
|
||||
name: 'sessionKeys',
|
||||
type: 'Bytes'
|
||||
}
|
||||
],
|
||||
type: 'bool'
|
||||
},
|
||||
insertKey: {
|
||||
description: 'Insert a key into the keystore.',
|
||||
params: [
|
||||
{
|
||||
name: 'keyType',
|
||||
type: 'Text'
|
||||
},
|
||||
{
|
||||
name: 'suri',
|
||||
type: 'Text'
|
||||
},
|
||||
{
|
||||
name: 'publicKey',
|
||||
type: 'Bytes'
|
||||
}
|
||||
],
|
||||
type: 'Bytes'
|
||||
},
|
||||
pendingExtrinsics: {
|
||||
description: 'Returns all pending extrinsics, potentially grouped by sender',
|
||||
params: [],
|
||||
type: 'Vec<Extrinsic>'
|
||||
},
|
||||
removeExtrinsic: {
|
||||
description: 'Remove given extrinsic from the pool and temporarily ban it to prevent reimporting',
|
||||
params: [
|
||||
{
|
||||
name: 'bytesOrHash',
|
||||
type: 'Vec<ExtrinsicOrHash>'
|
||||
}
|
||||
],
|
||||
type: 'Vec<Hash>'
|
||||
},
|
||||
rotateKeys: {
|
||||
description: 'Generate new session keys and returns the corresponding public keys',
|
||||
params: [],
|
||||
type: 'Bytes'
|
||||
},
|
||||
submitAndWatchExtrinsic: {
|
||||
description: 'Submit and subscribe to watch an extrinsic until unsubscribed',
|
||||
isSigned: true,
|
||||
params: [
|
||||
{
|
||||
name: 'extrinsic',
|
||||
type: 'Extrinsic'
|
||||
}
|
||||
],
|
||||
pubsub: [
|
||||
'extrinsicUpdate',
|
||||
'submitAndWatchExtrinsic',
|
||||
'unwatchExtrinsic'
|
||||
],
|
||||
type: 'ExtrinsicStatus'
|
||||
},
|
||||
submitExtrinsic: {
|
||||
description: 'Submit a fully formatted extrinsic for block inclusion',
|
||||
isSigned: true,
|
||||
params: [
|
||||
{
|
||||
name: 'extrinsic',
|
||||
type: 'Extrinsic'
|
||||
}
|
||||
],
|
||||
type: 'Hash'
|
||||
}
|
||||
};
|
||||
@@ -6,14 +6,12 @@
|
||||
|
||||
import type { Definitions } from '../../types';
|
||||
|
||||
import { rpc } from './rpc';
|
||||
import { runtime } from './runtime';
|
||||
|
||||
export default {
|
||||
rpc: {
|
||||
epochAuthorship: {
|
||||
description: 'Returns data about which slots (primary or secondary) can be claimed in the current epoch with the keys in the keystore',
|
||||
params: [],
|
||||
type: 'HashMap<AuthorityId, EpochAuthorship>'
|
||||
}
|
||||
},
|
||||
rpc,
|
||||
runtime,
|
||||
types: {
|
||||
AllowedSlots: {
|
||||
_enum: ['PrimarySlots', 'PrimaryAndSecondaryPlainSlots', 'PrimaryAndSecondaryVRFSlots']
|
||||
@@ -30,9 +28,33 @@ export default {
|
||||
firstHeader: 'Header',
|
||||
secondHeader: 'Header'
|
||||
},
|
||||
BabeGenesisConfiguration: {
|
||||
slotDuration: 'u64',
|
||||
epochLength: 'u64',
|
||||
c: '(u64, u64)',
|
||||
genesisAuthorities: 'Vec<(AuthorityId, BabeAuthorityWeight)>',
|
||||
randomness: 'Randomness',
|
||||
allowedSlots: 'AllowedSlots'
|
||||
},
|
||||
BabeGenesisConfigurationV1: {
|
||||
slotDuration: 'u64',
|
||||
epochLength: 'u64',
|
||||
c: '(u64, u64)',
|
||||
genesisAuthorities: 'Vec<(AuthorityId, BabeAuthorityWeight)>',
|
||||
randomness: 'Randomness',
|
||||
secondarySlots: 'bool'
|
||||
},
|
||||
BabeWeight: 'u64',
|
||||
MaybeRandomness: 'Option<Randomness>',
|
||||
MaybeVrf: 'Option<VrfData>',
|
||||
Epoch: {
|
||||
epochIndex: 'u64',
|
||||
startSlot: 'Slot',
|
||||
duration: 'u64',
|
||||
authorities: 'Vec<(AuthorityId, BabeAuthorityWeight)>',
|
||||
randomness: 'Hash', // [u8; VRF_OUTPUT_LENGTH],
|
||||
config: 'BabeEpochConfiguration'
|
||||
},
|
||||
EpochAuthorship: {
|
||||
primary: 'Vec<u64>',
|
||||
secondary: 'Vec<u64>',
|
||||
@@ -48,7 +70,8 @@ export default {
|
||||
c: '(u64, u64)',
|
||||
allowedSlots: 'AllowedSlots'
|
||||
},
|
||||
Randomness: 'Hash',
|
||||
OpaqueKeyOwnershipProof: 'Bytes',
|
||||
Randomness: 'Hash', // [u8; RANDOMNESS_LENGTH],
|
||||
RawBabePreDigest: {
|
||||
_enum: {
|
||||
Phantom: 'Null', // index starts at 1... empty slot at 0
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
// Copyright 2017-2022 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { DefinitionsRpc } from '../../types';
|
||||
|
||||
export const rpc: DefinitionsRpc = {
|
||||
epochAuthorship: {
|
||||
description: 'Returns data about which slots (primary or secondary) can be claimed in the current epoch with the keys in the keystore',
|
||||
params: [],
|
||||
type: 'HashMap<AuthorityId, EpochAuthorship>'
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,77 @@
|
||||
// Copyright 2017-2022 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { DefinitionCall, DefinitionsCall } from '../../types';
|
||||
|
||||
import { objectSpread } from '@polkadot/util';
|
||||
|
||||
const V1_V2_SHARED: Record<string, DefinitionCall> = {
|
||||
current_epoch: {
|
||||
description: 'Returns information regarding the current epoch.',
|
||||
params: [],
|
||||
type: 'Epoch'
|
||||
},
|
||||
current_epoch_start: {
|
||||
description: 'Returns the slot that started the current epoch.',
|
||||
params: [],
|
||||
type: 'Slot'
|
||||
},
|
||||
generate_key_ownership_proof: {
|
||||
description: 'Generates a proof of key ownership for the given authority in the current epoch.',
|
||||
params: [
|
||||
{
|
||||
name: 'slot',
|
||||
type: 'Slot'
|
||||
},
|
||||
{
|
||||
name: 'authorityId',
|
||||
type: 'AuthorityId'
|
||||
}
|
||||
],
|
||||
type: 'Option<OpaqueKeyOwnershipProof>'
|
||||
},
|
||||
next_epoch: {
|
||||
description: 'Returns information regarding the next epoch (which was already previously announced).',
|
||||
params: [],
|
||||
type: 'Epoch'
|
||||
},
|
||||
submit_report_equivocation_unsigned_extrinsic: {
|
||||
description: 'Submits an unsigned extrinsic to report an equivocation.',
|
||||
params: [
|
||||
{
|
||||
name: 'equivocationProof',
|
||||
type: 'BabeEquivocationProof'
|
||||
},
|
||||
{
|
||||
name: 'keyOwnerProof',
|
||||
type: 'OpaqueKeyOwnershipProof'
|
||||
}
|
||||
],
|
||||
type: 'Option<Null>'
|
||||
}
|
||||
};
|
||||
|
||||
export const runtime: DefinitionsCall = {
|
||||
BabeApi: [
|
||||
{
|
||||
methods: objectSpread({
|
||||
configuration: {
|
||||
description: 'Return the genesis configuration for BABE. The configuration is only read on genesis.',
|
||||
params: [],
|
||||
type: 'BabeGenesisConfiguration'
|
||||
}
|
||||
}, V1_V2_SHARED),
|
||||
version: 2
|
||||
},
|
||||
{
|
||||
methods: objectSpread({
|
||||
configuration: {
|
||||
description: 'Return the configuration for BABE. Version 1.',
|
||||
params: [],
|
||||
type: 'BabeGenesisConfigurationV1'
|
||||
}
|
||||
}, V1_V2_SHARED),
|
||||
version: 1
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -1,10 +1,10 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import type { Enum, Option, Struct, U8aFixed, Vec, u32, u64 } from '@polkadot/types-codec';
|
||||
import type { Bytes, Enum, Option, Struct, U8aFixed, Vec, bool, u32, u64 } from '@polkadot/types-codec';
|
||||
import type { ITuple } from '@polkadot/types-codec/types';
|
||||
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||
import type { Hash, Header } from '@polkadot/types/interfaces/runtime';
|
||||
import type { Hash, Header, Slot } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name AllowedSlots */
|
||||
export interface AllowedSlots extends Enum {
|
||||
@@ -34,9 +34,39 @@ export interface BabeEquivocationProof extends Struct {
|
||||
readonly secondHeader: Header;
|
||||
}
|
||||
|
||||
/** @name BabeGenesisConfiguration */
|
||||
export interface BabeGenesisConfiguration extends Struct {
|
||||
readonly slotDuration: u64;
|
||||
readonly epochLength: u64;
|
||||
readonly c: ITuple<[u64, u64]>;
|
||||
readonly genesisAuthorities: Vec<ITuple<[AuthorityId, BabeAuthorityWeight]>>;
|
||||
readonly randomness: Randomness;
|
||||
readonly allowedSlots: AllowedSlots;
|
||||
}
|
||||
|
||||
/** @name BabeGenesisConfigurationV1 */
|
||||
export interface BabeGenesisConfigurationV1 extends Struct {
|
||||
readonly slotDuration: u64;
|
||||
readonly epochLength: u64;
|
||||
readonly c: ITuple<[u64, u64]>;
|
||||
readonly genesisAuthorities: Vec<ITuple<[AuthorityId, BabeAuthorityWeight]>>;
|
||||
readonly randomness: Randomness;
|
||||
readonly secondarySlots: bool;
|
||||
}
|
||||
|
||||
/** @name BabeWeight */
|
||||
export interface BabeWeight extends u64 {}
|
||||
|
||||
/** @name Epoch */
|
||||
export interface Epoch extends Struct {
|
||||
readonly epochIndex: u64;
|
||||
readonly startSlot: Slot;
|
||||
readonly duration: u64;
|
||||
readonly authorities: Vec<ITuple<[AuthorityId, BabeAuthorityWeight]>>;
|
||||
readonly randomness: Hash;
|
||||
readonly config: BabeEpochConfiguration;
|
||||
}
|
||||
|
||||
/** @name EpochAuthorship */
|
||||
export interface EpochAuthorship extends Struct {
|
||||
readonly primary: Vec<u64>;
|
||||
@@ -64,6 +94,9 @@ export interface NextConfigDescriptorV1 extends Struct {
|
||||
readonly allowedSlots: AllowedSlots;
|
||||
}
|
||||
|
||||
/** @name OpaqueKeyOwnershipProof */
|
||||
export interface OpaqueKeyOwnershipProof extends Bytes {}
|
||||
|
||||
/** @name Randomness */
|
||||
export interface Randomness extends Hash {}
|
||||
|
||||
|
||||
@@ -6,25 +6,18 @@
|
||||
|
||||
import type { Definitions } from '../../types';
|
||||
|
||||
import { rpc } from './rpc';
|
||||
import { runtime } from './runtime';
|
||||
|
||||
export default {
|
||||
rpc: {
|
||||
subscribeJustifications: {
|
||||
description: 'Returns the block most recently finalized by BEEFY, alongside side its justification.',
|
||||
params: [],
|
||||
pubsub: [
|
||||
'justifications',
|
||||
'subscribeJustifications',
|
||||
'unsubscribeJustifications'
|
||||
],
|
||||
type: 'BeefySignedCommitment'
|
||||
},
|
||||
getFinalizedHead: {
|
||||
description: 'Returns hash of the latest BEEFY finalized block as seen by this client.',
|
||||
params: [],
|
||||
type: 'H256'
|
||||
}
|
||||
},
|
||||
rpc,
|
||||
runtime,
|
||||
types: {
|
||||
BeefyAuthoritySet: {
|
||||
id: 'u64',
|
||||
len: 'u32',
|
||||
root: 'H256'
|
||||
},
|
||||
BeefyCommitment: {
|
||||
payload: 'BeefyPayload',
|
||||
blockNumber: 'BlockNumber',
|
||||
@@ -43,6 +36,10 @@ export default {
|
||||
BeefyPayload: 'Vec<(BeefyPayloadId, Bytes)>',
|
||||
BeefyPayloadId: '[u8;2]',
|
||||
MmrRootHash: 'H256',
|
||||
ValidatorSetId: 'u64'
|
||||
ValidatorSetId: 'u64',
|
||||
ValidatorSet: {
|
||||
validators: 'Vec<AuthorityId>',
|
||||
id: 'ValidatorSetId'
|
||||
}
|
||||
}
|
||||
} as Definitions;
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
// Copyright 2017-2022 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { DefinitionsRpc } from '../../types';
|
||||
|
||||
export const rpc: DefinitionsRpc = {
|
||||
getFinalizedHead: {
|
||||
description: 'Returns hash of the latest BEEFY finalized block as seen by this client.',
|
||||
params: [],
|
||||
type: 'H256'
|
||||
},
|
||||
subscribeJustifications: {
|
||||
description: 'Returns the block most recently finalized by BEEFY, alongside side its justification.',
|
||||
params: [],
|
||||
pubsub: [
|
||||
'justifications',
|
||||
'subscribeJustifications',
|
||||
'unsubscribeJustifications'
|
||||
],
|
||||
type: 'BeefySignedCommitment'
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
// Copyright 2017-2022 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { DefinitionsCall } from '../../types';
|
||||
|
||||
export const runtime: DefinitionsCall = {
|
||||
BeefyApi: [
|
||||
{
|
||||
methods: {
|
||||
validator_set: {
|
||||
description: 'Return the current active BEEFY validator set',
|
||||
params: [],
|
||||
type: 'Option<ValidatorSet>'
|
||||
}
|
||||
},
|
||||
version: 1
|
||||
}
|
||||
],
|
||||
BeefyMmrApi: [
|
||||
{
|
||||
methods: {
|
||||
authority_set_proof: {
|
||||
description: 'Return the currently active BEEFY authority set proof.',
|
||||
params: [],
|
||||
type: 'BeefyAuthoritySet'
|
||||
},
|
||||
next_authority_set_proof: {
|
||||
description: 'Return the next/queued BEEFY authority set proof.',
|
||||
params: [],
|
||||
type: 'BeefyNextAuthoritySet'
|
||||
}
|
||||
},
|
||||
version: 1
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -3,9 +3,17 @@
|
||||
|
||||
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 { BlockNumber, H256 } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name BeefyAuthoritySet */
|
||||
export interface BeefyAuthoritySet extends Struct {
|
||||
readonly id: u64;
|
||||
readonly len: u32;
|
||||
readonly root: H256;
|
||||
}
|
||||
|
||||
/** @name BeefyCommitment */
|
||||
export interface BeefyCommitment extends Struct {
|
||||
readonly payload: BeefyPayload;
|
||||
@@ -38,6 +46,12 @@ export interface BeefySignedCommitment extends Struct {
|
||||
/** @name MmrRootHash */
|
||||
export interface MmrRootHash extends H256 {}
|
||||
|
||||
/** @name ValidatorSet */
|
||||
export interface ValidatorSet extends Struct {
|
||||
readonly validators: Vec<AuthorityId>;
|
||||
readonly id: ValidatorSetId;
|
||||
}
|
||||
|
||||
/** @name ValidatorSetId */
|
||||
export interface ValidatorSetId extends u64 {}
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
// Copyright 2017-2022 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// order important in structs... :)
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { Definitions } from '../../types';
|
||||
|
||||
import { runtime } from './runtime';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
runtime,
|
||||
types: {
|
||||
BenchmarkConfig: {
|
||||
pallet: 'Bytes',
|
||||
benchmark: 'Bytes',
|
||||
selectedComponents: 'Vec<(BenchmarkParameter, u32)>',
|
||||
verify: 'bool',
|
||||
internalRepeats: 'u32'
|
||||
},
|
||||
BenchmarkList: {
|
||||
pallet: 'Bytes',
|
||||
instance: 'Bytes',
|
||||
benchmarks: 'Vec<BenchmarkMetadata>'
|
||||
},
|
||||
BenchmarkMetadata: {
|
||||
name: 'Bytes',
|
||||
components: 'Vec<(BenchmarkParameter, u32, u32)>'
|
||||
},
|
||||
BenchmarkParameter: {
|
||||
_enum: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
|
||||
}
|
||||
}
|
||||
} as Definitions;
|
||||
@@ -0,0 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
@@ -0,0 +1,34 @@
|
||||
// Copyright 2017-2022 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { DefinitionsCall } from '../../types';
|
||||
|
||||
export const runtime: DefinitionsCall = {
|
||||
Benchmark: [
|
||||
{
|
||||
methods: {
|
||||
benchmark_metadata: {
|
||||
description: 'Get the benchmark metadata available for this runtime.',
|
||||
params: [
|
||||
{
|
||||
name: 'extra',
|
||||
type: 'bool'
|
||||
}
|
||||
],
|
||||
type: '(Vec<BenchmarkList>, Vec<StorageInfo>)'
|
||||
},
|
||||
dispatch_benchmark: {
|
||||
description: 'Dispatch the given benchmark.',
|
||||
params: [
|
||||
{
|
||||
name: 'config',
|
||||
type: 'BenchmarkConfig'
|
||||
}
|
||||
],
|
||||
type: 'Result<Vec<BenchmarkBatch>, Text>'
|
||||
}
|
||||
},
|
||||
version: 1
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -0,0 +1,60 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import type { Bytes, Enum, Struct, Vec, bool, u32 } from '@polkadot/types-codec';
|
||||
import type { ITuple } from '@polkadot/types-codec/types';
|
||||
|
||||
/** @name BenchmarkConfig */
|
||||
export interface BenchmarkConfig extends Struct {
|
||||
readonly pallet: Bytes;
|
||||
readonly benchmark: Bytes;
|
||||
readonly selectedComponents: Vec<ITuple<[BenchmarkParameter, u32]>>;
|
||||
readonly verify: bool;
|
||||
readonly internalRepeats: u32;
|
||||
}
|
||||
|
||||
/** @name BenchmarkList */
|
||||
export interface BenchmarkList extends Struct {
|
||||
readonly pallet: Bytes;
|
||||
readonly instance: Bytes;
|
||||
readonly benchmarks: Vec<BenchmarkMetadata>;
|
||||
}
|
||||
|
||||
/** @name BenchmarkMetadata */
|
||||
export interface BenchmarkMetadata extends Struct {
|
||||
readonly name: Bytes;
|
||||
readonly components: Vec<ITuple<[BenchmarkParameter, u32, u32]>>;
|
||||
}
|
||||
|
||||
/** @name BenchmarkParameter */
|
||||
export interface BenchmarkParameter extends Enum {
|
||||
readonly isA: boolean;
|
||||
readonly isB: boolean;
|
||||
readonly isC: boolean;
|
||||
readonly isD: boolean;
|
||||
readonly isE: boolean;
|
||||
readonly isF: boolean;
|
||||
readonly isG: boolean;
|
||||
readonly isH: boolean;
|
||||
readonly isI: boolean;
|
||||
readonly isJ: boolean;
|
||||
readonly isK: boolean;
|
||||
readonly isL: boolean;
|
||||
readonly isM: boolean;
|
||||
readonly isN: boolean;
|
||||
readonly isO: boolean;
|
||||
readonly isP: boolean;
|
||||
readonly isQ: boolean;
|
||||
readonly isR: boolean;
|
||||
readonly isS: boolean;
|
||||
readonly isT: boolean;
|
||||
readonly isU: boolean;
|
||||
readonly isV: boolean;
|
||||
readonly isW: boolean;
|
||||
readonly isX: boolean;
|
||||
readonly isY: boolean;
|
||||
readonly isZ: boolean;
|
||||
readonly type: 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z';
|
||||
}
|
||||
|
||||
export type PHANTOM_BENCHMARK = 'benchmark';
|
||||
@@ -0,0 +1,25 @@
|
||||
// Copyright 2017-2022 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// order important in structs... :)
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { Definitions } from '../../types';
|
||||
|
||||
import { runtime } from './runtime';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
runtime,
|
||||
types: {
|
||||
CheckInherentsResult: {
|
||||
okay: 'bool',
|
||||
fatalError: 'bool',
|
||||
errors: 'InherentData'
|
||||
},
|
||||
InherentData: {
|
||||
data: 'BTreeMap<InherentIdentifier, Bytes>'
|
||||
},
|
||||
InherentIdentifier: '[u8; 8]'
|
||||
}
|
||||
} as Definitions;
|
||||
@@ -0,0 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
@@ -0,0 +1,73 @@
|
||||
// Copyright 2017-2022 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { DefinitionsCall, DefinitionsCallEntry } from '../../types';
|
||||
|
||||
import { objectSpread } from '@polkadot/util';
|
||||
|
||||
const BB_V5_TO_V6: DefinitionsCallEntry['methods'] = {
|
||||
check_inherents: {
|
||||
description: 'Check that the inherents are valid.',
|
||||
params: [
|
||||
{
|
||||
name: 'block',
|
||||
type: 'Block'
|
||||
},
|
||||
{
|
||||
name: 'data',
|
||||
type: 'InherentData'
|
||||
}
|
||||
],
|
||||
type: 'CheckInherentsResult'
|
||||
},
|
||||
finalize_block: {
|
||||
description: 'Finish the current block.',
|
||||
params: [],
|
||||
type: 'Header'
|
||||
},
|
||||
inherent_extrinsics: {
|
||||
description: 'Generate inherent extrinsics.',
|
||||
params: [
|
||||
{
|
||||
name: 'inherent',
|
||||
type: 'InherentData'
|
||||
}
|
||||
],
|
||||
type: 'Vec<Extrinsic>'
|
||||
}
|
||||
};
|
||||
|
||||
export const runtime: DefinitionsCall = {
|
||||
BlockBuilder: [
|
||||
{
|
||||
methods: objectSpread({
|
||||
apply_extrinsic: {
|
||||
description: 'Apply the given extrinsic.',
|
||||
params: [
|
||||
{
|
||||
name: 'extrinsic',
|
||||
type: 'Extrinsic'
|
||||
}
|
||||
],
|
||||
type: 'ApplyExtrinsicResult'
|
||||
}
|
||||
}, BB_V5_TO_V6),
|
||||
version: 6
|
||||
},
|
||||
{
|
||||
methods: objectSpread({
|
||||
apply_extrinsic: {
|
||||
description: 'Apply the given extrinsic.',
|
||||
params: [
|
||||
{
|
||||
name: 'extrinsic',
|
||||
type: 'Extrinsic'
|
||||
}
|
||||
],
|
||||
type: 'ApplyExtrinsicResultPre6'
|
||||
}
|
||||
}, BB_V5_TO_V6),
|
||||
version: 5
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import type { BTreeMap, Bytes, Struct, U8aFixed, bool } from '@polkadot/types-codec';
|
||||
|
||||
/** @name CheckInherentsResult */
|
||||
export interface CheckInherentsResult extends Struct {
|
||||
readonly okay: bool;
|
||||
readonly fatalError: bool;
|
||||
readonly errors: InherentData;
|
||||
}
|
||||
|
||||
/** @name InherentData */
|
||||
export interface InherentData extends Struct {
|
||||
readonly data: BTreeMap<InherentIdentifier, Bytes>;
|
||||
}
|
||||
|
||||
/** @name InherentIdentifier */
|
||||
export interface InherentIdentifier extends U8aFixed {}
|
||||
|
||||
export type PHANTOM_BLOCKBUILDER = 'blockbuilder';
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user