Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce505aaf62 | ||
|
|
09f9a48037 | ||
|
|
700c1cfcd4 | ||
|
|
7d2463e53f | ||
|
|
a2ecd9bd3b | ||
|
|
b0de692147 | ||
|
|
dcd53c76d7 | ||
|
|
6ed90c6111 | ||
|
|
babef6d7bc | ||
|
|
e2205a65e9 | ||
|
|
32d55dfb18 | ||
|
|
60e0d0eae4 | ||
|
|
9cef1febe1 | ||
|
|
4c9032fedc | ||
|
|
5b6f222e5e | ||
|
|
47235d01bf | ||
|
|
32efe83136 | ||
|
|
c4c099e693 | ||
|
|
f26ca0e624 | ||
|
|
5f496f1809 | ||
|
|
f1cbf8cc70 | ||
|
|
8b7fccb744 | ||
|
|
66d3486674 | ||
|
|
2dbd217f6d | ||
|
|
fea9ae8f97 | ||
|
|
4e81bbc43c |
@@ -1,5 +1,23 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 4.11.1 May 23, 2021
|
||||
|
||||
Upgrade priority. Low. Recommended for users using staking entries on Polkadot and users of Substrate master.
|
||||
|
||||
Changes:
|
||||
|
||||
- Fix metadata v13 storage decoding on `NMap`
|
||||
- Add augmentation & keys/entries for NMap types
|
||||
- Return additional error information from internal u8a decoding failures
|
||||
- Adjust Westend types for 16 nominators-only
|
||||
- Add support for `DisallowSigned` (as per shell runtime) extension
|
||||
- Display small hex-slice with u8a decoding failures
|
||||
- Add `state_getChildReadProof` RPC
|
||||
- Cleanup Rococo known types (only as used)
|
||||
- Under Node.js allow for WS receiving up to 16MB messages
|
||||
- Update entries/keys for max of 256 items per call
|
||||
|
||||
|
||||
## 4.10.1 May 17, 2021
|
||||
|
||||
Upgrade priority: Medium. Recommended for uses of Polkadot/Kusama 9010 runtimes.
|
||||
|
||||
+3
-3
@@ -25,14 +25,14 @@
|
||||
"test:watch": "polkadot-dev-run-test --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.14.2",
|
||||
"@babel/core": "^7.14.3",
|
||||
"@babel/register": "^7.13.16",
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/dev": "^0.62.14",
|
||||
"@polkadot/dev": "^0.62.16",
|
||||
"@polkadot/ts": "^0.3.66",
|
||||
"@polkadot/typegen": "workspace:packages/typegen",
|
||||
"@types/jest": "^26.0.23",
|
||||
"copyfiles": "^2.4.1"
|
||||
},
|
||||
"version": "4.10.1"
|
||||
"version": "4.11.1"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api-contract",
|
||||
"version": "4.10.1",
|
||||
"version": "4.11.1",
|
||||
"type": "module",
|
||||
"description": "Interfaces for interacting with contracts and contract ABIs",
|
||||
"main": "index.js",
|
||||
@@ -20,10 +20,10 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/api": "4.10.1",
|
||||
"@polkadot/types": "4.10.1",
|
||||
"@polkadot/util": "^6.4.1",
|
||||
"@polkadot/x-rxjs": "^6.4.1",
|
||||
"@polkadot/api": "4.11.1",
|
||||
"@polkadot/types": "4.11.1",
|
||||
"@polkadot/util": "^6.5.1",
|
||||
"@polkadot/x-rxjs": "^6.5.1",
|
||||
"bn.js": "^4.11.9"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-contract', version: '4.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-contract', version: '4.11.1' };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api-derive",
|
||||
"version": "4.10.1",
|
||||
"version": "4.11.1",
|
||||
"type": "module",
|
||||
"description": "Common functions used across Polkadot, derived from RPC calls and storage queries.",
|
||||
"main": "index.js",
|
||||
@@ -20,16 +20,16 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/api": "4.10.1",
|
||||
"@polkadot/rpc-core": "4.10.1",
|
||||
"@polkadot/types": "4.10.1",
|
||||
"@polkadot/util": "^6.4.1",
|
||||
"@polkadot/util-crypto": "^6.4.1",
|
||||
"@polkadot/x-rxjs": "^6.4.1",
|
||||
"@polkadot/api": "4.11.1",
|
||||
"@polkadot/rpc-core": "4.11.1",
|
||||
"@polkadot/types": "4.11.1",
|
||||
"@polkadot/util": "^6.5.1",
|
||||
"@polkadot/util-crypto": "^6.5.1",
|
||||
"@polkadot/x-rxjs": "^6.5.1",
|
||||
"bn.js": "^4.11.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^6.4.1",
|
||||
"@polkadot/rpc-provider": "4.10.1"
|
||||
"@polkadot/keyring": "^6.5.1",
|
||||
"@polkadot/rpc-provider": "4.11.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-derive', version: '4.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-derive', version: '4.11.1' };
|
||||
|
||||
+11
-11
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api",
|
||||
"version": "4.10.1",
|
||||
"version": "4.11.1",
|
||||
"type": "module",
|
||||
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
|
||||
"main": "index.js",
|
||||
@@ -20,16 +20,16 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/api-derive": "4.10.1",
|
||||
"@polkadot/keyring": "^6.4.1",
|
||||
"@polkadot/metadata": "4.10.1",
|
||||
"@polkadot/rpc-core": "4.10.1",
|
||||
"@polkadot/rpc-provider": "4.10.1",
|
||||
"@polkadot/types": "4.10.1",
|
||||
"@polkadot/types-known": "4.10.1",
|
||||
"@polkadot/util": "^6.4.1",
|
||||
"@polkadot/util-crypto": "^6.4.1",
|
||||
"@polkadot/x-rxjs": "^6.4.1",
|
||||
"@polkadot/api-derive": "4.11.1",
|
||||
"@polkadot/keyring": "^6.5.1",
|
||||
"@polkadot/metadata": "4.11.1",
|
||||
"@polkadot/rpc-core": "4.11.1",
|
||||
"@polkadot/rpc-provider": "4.11.1",
|
||||
"@polkadot/types": "4.11.1",
|
||||
"@polkadot/types-known": "4.11.1",
|
||||
"@polkadot/util": "^6.5.1",
|
||||
"@polkadot/util-crypto": "^6.5.1",
|
||||
"@polkadot/x-rxjs": "^6.5.1",
|
||||
"bn.js": "^4.11.9",
|
||||
"eventemitter3": "^4.0.7"
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ import type { ApiTypes } from '@polkadot/api/types';
|
||||
declare module '@polkadot/api/types/consts' {
|
||||
export interface AugmentedConsts<ApiType> {
|
||||
babe: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* The amount of time, in slots, that each epoch should last.
|
||||
* NOTE: Currently it is not possible to change the epoch duration after
|
||||
@@ -30,16 +29,22 @@ declare module '@polkadot/api/types/consts' {
|
||||
* the probability of a slot being empty).
|
||||
**/
|
||||
expectedBlockTime: Moment & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
balances: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* The minimum amount required to keep an account open.
|
||||
**/
|
||||
existentialDeposit: Balance & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
bounties: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* Percentage of the curator fee that will be reserved upfront as deposit for bounty curator.
|
||||
**/
|
||||
@@ -68,9 +73,12 @@ declare module '@polkadot/api/types/consts' {
|
||||
* Maximum acceptable reason length.
|
||||
**/
|
||||
maximumReasonLength: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
contracts: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* The maximum number of tries that can be queued for deletion.
|
||||
**/
|
||||
@@ -133,9 +141,12 @@ declare module '@polkadot/api/types/consts' {
|
||||
* The minimum amount required to generate a tombstone.
|
||||
**/
|
||||
tombstoneDeposit: BalanceOf & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
democracy: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* Period in blocks where an external proposal may not be re-submitted after being vetoed.
|
||||
**/
|
||||
@@ -172,9 +183,12 @@ declare module '@polkadot/api/types/consts' {
|
||||
* How often (in blocks) to check for new votes.
|
||||
**/
|
||||
votingPeriod: BlockNumber & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* The repeat threshold of the offchain worker.
|
||||
*
|
||||
@@ -195,9 +209,12 @@ declare module '@polkadot/api/types/consts' {
|
||||
* Duration of the unsigned phase.
|
||||
**/
|
||||
unsignedPhase: BlockNumber & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
elections: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* How much should be locked up in order to submit one's candidacy.
|
||||
**/
|
||||
@@ -231,9 +248,12 @@ declare module '@polkadot/api/types/consts' {
|
||||
* The amount of bond that need to be locked for each vote (32 bytes).
|
||||
**/
|
||||
votingBondFactor: BalanceOf & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
gilt: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* Portion of the queue which is free from ordering and just a FIFO.
|
||||
*
|
||||
@@ -277,9 +297,12 @@ declare module '@polkadot/api/types/consts' {
|
||||
* this value multiplied by `Period`.
|
||||
**/
|
||||
queueCount: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
identity: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* The amount held on deposit for a registered identity
|
||||
**/
|
||||
@@ -308,16 +331,22 @@ declare module '@polkadot/api/types/consts' {
|
||||
* another trie item whose value is the size of an account ID plus 32 bytes.
|
||||
**/
|
||||
subAccountDeposit: BalanceOf & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
indices: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* The deposit needed for reserving an index.
|
||||
**/
|
||||
deposit: BalanceOf & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
lottery: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* The max number of calls available in a single lottery.
|
||||
**/
|
||||
@@ -326,9 +355,12 @@ declare module '@polkadot/api/types/consts' {
|
||||
* The Lottery's pallet id
|
||||
**/
|
||||
palletId: PalletId & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
multisig: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* The base amount of currency needed to reserve for creating a multisig execution or to store
|
||||
* a dispatch call for later.
|
||||
@@ -342,9 +374,12 @@ declare module '@polkadot/api/types/consts' {
|
||||
* The maximum amount of signatories allowed for a given multisig.
|
||||
**/
|
||||
maxSignatories: u16 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
proxy: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* The base amount of currency needed to reserve for creating an announcement.
|
||||
*
|
||||
@@ -381,9 +416,12 @@ declare module '@polkadot/api/types/consts' {
|
||||
* `32 + proxy_type.encode().len()` bytes of data.
|
||||
**/
|
||||
proxyDepositFactor: BalanceOf & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
recovery: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* The base amount of currency needed to reserve for creating a recovery configuration.
|
||||
*
|
||||
@@ -411,9 +449,12 @@ declare module '@polkadot/api/types/consts' {
|
||||
* threshold.
|
||||
**/
|
||||
recoveryDeposit: BalanceOf & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
society: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* The minimum amount of a deposit required for a bid to be made.
|
||||
**/
|
||||
@@ -448,9 +489,12 @@ declare module '@polkadot/api/types/consts' {
|
||||
* doesn't vote or someone votes in the wrong way.
|
||||
**/
|
||||
wrongSideDeduction: BalanceOf & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
staking: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* Number of eras that staked funds must remain bonded for.
|
||||
**/
|
||||
@@ -478,9 +522,12 @@ declare module '@polkadot/api/types/consts' {
|
||||
* intervention.
|
||||
**/
|
||||
slashDeferDuration: EraIndex & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
system: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* Maximum number of block number to block hash mappings to keep (oldest pruned first).
|
||||
**/
|
||||
@@ -509,9 +556,12 @@ declare module '@polkadot/api/types/consts' {
|
||||
* Get the chain's current version.
|
||||
**/
|
||||
version: RuntimeVersion & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
timestamp: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* The minimum period between blocks. Beware that this is different to the *expected* period
|
||||
* that the block production apparatus provides. Your chosen consensus system will generally
|
||||
@@ -519,9 +569,12 @@ declare module '@polkadot/api/types/consts' {
|
||||
* period on default settings.
|
||||
**/
|
||||
minimumPeriod: Moment & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
tips: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* The amount held on deposit per byte within the tip report reason.
|
||||
**/
|
||||
@@ -542,9 +595,12 @@ declare module '@polkadot/api/types/consts' {
|
||||
* The amount held on deposit for placing a tip report.
|
||||
**/
|
||||
tipReportDepositBase: BalanceOf & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
transactionPayment: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* The fee to be paid for making a transaction; the per-byte portion.
|
||||
**/
|
||||
@@ -553,9 +609,12 @@ declare module '@polkadot/api/types/consts' {
|
||||
* The polynomial that is applied in order to derive fee from weight.
|
||||
**/
|
||||
weightToFee: Vec<WeightToFeeCoefficient> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
treasury: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* Percentage of spare funds (if any) that are burnt per spend period.
|
||||
**/
|
||||
@@ -577,13 +636,20 @@ declare module '@polkadot/api/types/consts' {
|
||||
* Period between successive spends.
|
||||
**/
|
||||
spendPeriod: BlockNumber & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
vesting: {
|
||||
[key: string]: Codec;
|
||||
/**
|
||||
* The minimum amount transferred to call `vested_transfer`.
|
||||
**/
|
||||
minVestedTransfer: BalanceOf & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import type { ApiTypes } from '@polkadot/api/types';
|
||||
declare module '@polkadot/api/types/errors' {
|
||||
export interface AugmentedErrors<ApiType> {
|
||||
assets: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Invalid metadata given.
|
||||
**/
|
||||
@@ -55,9 +54,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* The source account would not survive the transfer and it needs to stay alive.
|
||||
**/
|
||||
WouldDie: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
authorship: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The uncle is genesis.
|
||||
**/
|
||||
@@ -86,9 +88,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* Uncles already set in the block.
|
||||
**/
|
||||
UnclesAlreadySet: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
babe: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A given equivocation report is valid but already previously reported.
|
||||
**/
|
||||
@@ -101,9 +106,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* A key ownership proof provided as part of an equivocation report is invalid.
|
||||
**/
|
||||
InvalidKeyOwnershipProof: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
balances: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Beneficiary account must pre-exist
|
||||
**/
|
||||
@@ -132,9 +140,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* Vesting balance too high to send value
|
||||
**/
|
||||
VestingBalance: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
bounties: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Proposer's balance is too low.
|
||||
**/
|
||||
@@ -172,9 +183,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* The bounty status is unexpected.
|
||||
**/
|
||||
UnexpectedStatus: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
contracts: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Performing the requested transfer would have brought the contract below
|
||||
* the subsistence threshold. No transfer is allowed to do this in order to allow
|
||||
@@ -324,9 +338,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* The size defined in `T::MaxValueSize` was exceeded.
|
||||
**/
|
||||
ValueTooLarge: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
council: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Members are already initialized!
|
||||
**/
|
||||
@@ -367,9 +384,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* The given weight bound for the proposal was too low.
|
||||
**/
|
||||
WrongProposalWeight: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
democracy: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Cannot cancel the same proposal twice
|
||||
**/
|
||||
@@ -503,9 +523,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* Invalid upper bound.
|
||||
**/
|
||||
WrongUpperBound: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* OCW submitted solution for wrong round
|
||||
**/
|
||||
@@ -522,9 +545,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* Wrong number of winners presented.
|
||||
**/
|
||||
PreDispatchWrongWinnerCount: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
elections: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Duplicated candidate submission.
|
||||
**/
|
||||
@@ -593,9 +619,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* Cannot vote when no candidates or members exist.
|
||||
**/
|
||||
UnableToVote: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
gilt: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The amount of the bid is less than the minimum allowed.
|
||||
**/
|
||||
@@ -629,9 +658,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* Gilt index is unknown.
|
||||
**/
|
||||
Unknown: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
grandpa: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Attempt to signal GRANDPA change with one already pending.
|
||||
**/
|
||||
@@ -662,9 +694,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* Cannot signal forced change so soon after last.
|
||||
**/
|
||||
TooSoon: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
identity: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Account ID is already named.
|
||||
**/
|
||||
@@ -729,9 +764,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* Too many subs-accounts.
|
||||
**/
|
||||
TooManySubAccounts: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
imOnline: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Duplicated heartbeat.
|
||||
**/
|
||||
@@ -740,9 +778,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* Non existent public key.
|
||||
**/
|
||||
InvalidKey: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
indices: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The index was not available.
|
||||
**/
|
||||
@@ -763,9 +804,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* The index is permanent and may not be freed/changed.
|
||||
**/
|
||||
Permanent: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
lottery: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A lottery has already ended.
|
||||
**/
|
||||
@@ -794,9 +838,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* Too many calls for a single lottery.
|
||||
**/
|
||||
TooManyCalls: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
multisig: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Call is already approved by this signatory.
|
||||
**/
|
||||
@@ -853,9 +900,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* A different timepoint was given to the multisig operation that is underway.
|
||||
**/
|
||||
WrongTimepoint: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
proxy: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Account is already a proxy.
|
||||
**/
|
||||
@@ -888,9 +938,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* A call which is incompatible with the proxy type's filter was attempted.
|
||||
**/
|
||||
Unproxyable: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
recovery: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* This account is already set up for recovery
|
||||
**/
|
||||
@@ -955,9 +1008,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* Threshold must be greater than zero
|
||||
**/
|
||||
ZeroThreshold: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
scheduler: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Failed to schedule a call
|
||||
**/
|
||||
@@ -974,9 +1030,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* Given target block number is in the past.
|
||||
**/
|
||||
TargetBlockNumberInPast: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
session: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Registered duplicate key.
|
||||
**/
|
||||
@@ -997,9 +1056,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* No keys are associated with this account.
|
||||
**/
|
||||
NoKeys: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
society: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* User has already made a bid.
|
||||
**/
|
||||
@@ -1072,9 +1134,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* User is suspended.
|
||||
**/
|
||||
Suspended: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
staking: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Stash is already bonded.
|
||||
**/
|
||||
@@ -1155,16 +1220,22 @@ declare module '@polkadot/api/types/errors' {
|
||||
* Too many nomination targets supplied.
|
||||
**/
|
||||
TooManyTargets: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
sudo: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Sender must be the Sudo account
|
||||
**/
|
||||
RequireSudo: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
system: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Failed to extract the runtime version from the new runtime.
|
||||
*
|
||||
@@ -1189,9 +1260,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* and the new runtime.
|
||||
**/
|
||||
SpecVersionNeedsToIncrease: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
technicalCommittee: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Members are already initialized!
|
||||
**/
|
||||
@@ -1232,9 +1306,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* The given weight bound for the proposal was too low.
|
||||
**/
|
||||
WrongProposalWeight: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
technicalMembership: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Already a member.
|
||||
**/
|
||||
@@ -1243,9 +1320,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* Not a member.
|
||||
**/
|
||||
NotMember: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
tips: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The tip was already found/started.
|
||||
**/
|
||||
@@ -1270,9 +1350,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* The tip hash is unknown.
|
||||
**/
|
||||
UnknownTip: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
treasury: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Proposer's balance is too low.
|
||||
**/
|
||||
@@ -1285,9 +1368,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
* Too many approvals in the queue.
|
||||
**/
|
||||
TooManyApprovals: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
vesting: {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Amount being transferred is too low to create a vesting schedule.
|
||||
**/
|
||||
@@ -1300,6 +1386,10 @@ declare module '@polkadot/api/types/errors' {
|
||||
* The account given is not vesting.
|
||||
**/
|
||||
NotVesting: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ import type { ApiTypes } from '@polkadot/api/types';
|
||||
declare module '@polkadot/api/types/events' {
|
||||
export interface AugmentedEvents<ApiType> {
|
||||
assets: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* An approval for account `delegate` was cancelled by `owner`.
|
||||
* \[id, owner, delegate\]
|
||||
@@ -105,9 +104,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* \[id, owner, delegate, destination\]
|
||||
**/
|
||||
TransferredApproved: AugmentedEvent<ApiType, [AssetId, AccountId, AccountId, AccountId, TAssetBalance]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
balances: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* A balance was set by root. \[who, free, reserved\]
|
||||
**/
|
||||
@@ -143,9 +145,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* Some balance was unreserved (moved from reserved to free). \[who, value\]
|
||||
**/
|
||||
Unreserved: AugmentedEvent<ApiType, [AccountId, Balance]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
bounties: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* A bounty is awarded to a beneficiary. \[index, beneficiary\]
|
||||
**/
|
||||
@@ -174,9 +179,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* A bounty proposal was rejected; funds were slashed. \[index, bond\]
|
||||
**/
|
||||
BountyRejected: AugmentedEvent<ApiType, [BountyIndex, Balance]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
contracts: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* A code with the specified hash was removed.
|
||||
* \[code_hash\]
|
||||
@@ -243,9 +251,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* this event is by calling `seal_terminate`.
|
||||
**/
|
||||
Terminated: AugmentedEvent<ApiType, [AccountId, AccountId]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
council: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* A motion was approved by the required threshold.
|
||||
* \[proposal_hash\]
|
||||
@@ -283,9 +294,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* \[account, proposal_hash, voted, yes, no\]
|
||||
**/
|
||||
Voted: AugmentedEvent<ApiType, [AccountId, Hash, bool, MemberCount, MemberCount]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
democracy: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* A proposal \[hash\] has been blacklisted permanently.
|
||||
**/
|
||||
@@ -362,9 +376,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* An external proposal has been vetoed. \[who, proposal_hash, until\]
|
||||
**/
|
||||
Vetoed: AugmentedEvent<ApiType, [AccountId, Hash, BlockNumber]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* The election has been finalized, with `Some` of the given computation, or else if the
|
||||
* election failed, `None`.
|
||||
@@ -393,9 +410,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* The unsigned phase of the given round has started.
|
||||
**/
|
||||
UnsignedPhaseStarted: AugmentedEvent<ApiType, [u32]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
elections: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* A \[candidate\] was slashed by \[amount\] due to failing to obtain a seat as member or
|
||||
* runner-up.
|
||||
@@ -433,9 +453,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* A \[seat holder\] was slashed by \[amount\] by being forcefully removed from the set.
|
||||
**/
|
||||
SeatHolderSlashed: AugmentedEvent<ApiType, [AccountId, Balance]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
gilt: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* A bid was successfully placed.
|
||||
* \[ who, amount, duration \]
|
||||
@@ -456,9 +479,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* \[ index, who, original_amount, additional_amount \]
|
||||
**/
|
||||
GiltThawed: AugmentedEvent<ApiType, [ActiveIndex, AccountId, BalanceOf, BalanceOf]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
grandpa: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* New authority set has been applied. \[authority_set\]
|
||||
**/
|
||||
@@ -471,9 +497,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* Current authority set has been resumed.
|
||||
**/
|
||||
Resumed: AugmentedEvent<ApiType, []>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
identity: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* A name was cleared, and the given balance returned. \[who, deposit\]
|
||||
**/
|
||||
@@ -516,9 +545,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* main identity account to the sub-identity account. \[sub, main, deposit\]
|
||||
**/
|
||||
SubIdentityRevoked: AugmentedEvent<ApiType, [AccountId, AccountId, Balance]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
imOnline: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* At the end of the session, no offence was committed.
|
||||
**/
|
||||
@@ -531,9 +563,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* At the end of the session, at least one validator was found to be \[offline\].
|
||||
**/
|
||||
SomeOffline: AugmentedEvent<ApiType, [Vec<IdentificationTuple>]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
indices: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* A account index was assigned. \[index, who\]
|
||||
**/
|
||||
@@ -546,9 +581,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* A account index has been frozen to its current account ID. \[index, who\]
|
||||
**/
|
||||
IndexFrozen: AugmentedEvent<ApiType, [AccountIndex, AccountId]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
lottery: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* A new set of calls have been set!
|
||||
**/
|
||||
@@ -565,9 +603,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* A winner has been chosen!
|
||||
**/
|
||||
Winner: AugmentedEvent<ApiType, [AccountId, Balance]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
multisig: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* A multisig operation has been approved by someone.
|
||||
* \[approving, timepoint, multisig, call_hash\]
|
||||
@@ -585,18 +626,24 @@ declare module '@polkadot/api/types/events' {
|
||||
* A new multisig operation has begun. \[approving, multisig, call_hash\]
|
||||
**/
|
||||
NewMultisig: AugmentedEvent<ApiType, [AccountId, AccountId, CallHash]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
offences: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* There is an offence reported of the given `kind` happened at the `session_index` and
|
||||
* (kind-specific) time slot. This event is not deposited for duplicate slashes.
|
||||
* \[kind, timeslot\].
|
||||
**/
|
||||
Offence: AugmentedEvent<ApiType, [Kind, OpaqueTimeSlot]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
proxy: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* An announcement was placed to make a call in the future. \[real, proxy, call_hash\]
|
||||
**/
|
||||
@@ -610,9 +657,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* A proxy was executed correctly, with the given \[result\].
|
||||
**/
|
||||
ProxyExecuted: AugmentedEvent<ApiType, [DispatchResult]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
recovery: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* Lost account has been successfully recovered by rescuer account.
|
||||
* \[lost, rescuer\]
|
||||
@@ -641,9 +691,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* \[lost, rescuer, sender\]
|
||||
**/
|
||||
RecoveryVouched: AugmentedEvent<ApiType, [AccountId, AccountId, AccountId]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
scheduler: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* Canceled some task. \[when, index\]
|
||||
**/
|
||||
@@ -656,17 +709,23 @@ declare module '@polkadot/api/types/events' {
|
||||
* Scheduled some task. \[when, index\]
|
||||
**/
|
||||
Scheduled: AugmentedEvent<ApiType, [BlockNumber, u32]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
session: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* New session has happened. Note that the argument is the \[session_index\], not the block
|
||||
* number as the type might suggest.
|
||||
**/
|
||||
NewSession: AugmentedEvent<ApiType, [SessionIndex]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
society: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* A \[candidate\] was dropped (due to an excess of bids in the system).
|
||||
**/
|
||||
@@ -734,9 +793,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* their offer is the second. The vouching party is the third. \[candidate_id, offer, vouching\]
|
||||
**/
|
||||
Vouch: AugmentedEvent<ApiType, [AccountId, Balance, AccountId]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
staking: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* An account has bonded this amount. \[stash, amount\]
|
||||
*
|
||||
@@ -781,9 +843,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* from the unlocking queue. \[stash, amount\]
|
||||
**/
|
||||
Withdrawn: AugmentedEvent<ApiType, [AccountId, Balance]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
sudo: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* The \[sudoer\] just switched identity; the old key is supplied.
|
||||
**/
|
||||
@@ -796,9 +861,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* A sudo just took place. \[result\]
|
||||
**/
|
||||
SudoAsDone: AugmentedEvent<ApiType, [DispatchResult]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
system: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* `:code` was updated.
|
||||
**/
|
||||
@@ -823,9 +891,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* On on-chain remark happened. \[origin, remark_hash\]
|
||||
**/
|
||||
Remarked: AugmentedEvent<ApiType, [AccountId, Hash]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
technicalCommittee: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* A motion was approved by the required threshold.
|
||||
* \[proposal_hash\]
|
||||
@@ -863,9 +934,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* \[account, proposal_hash, voted, yes, no\]
|
||||
**/
|
||||
Voted: AugmentedEvent<ApiType, [AccountId, Hash, bool, MemberCount, MemberCount]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
technicalMembership: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* Phantom member, never used.
|
||||
**/
|
||||
@@ -890,9 +964,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* Two members were swapped; see the transaction for who.
|
||||
**/
|
||||
MembersSwapped: AugmentedEvent<ApiType, []>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
tips: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* A new tip suggestion has been opened. \[tip_hash\]
|
||||
**/
|
||||
@@ -913,9 +990,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* A tip suggestion has been slashed. \[tip_hash, finder, deposit\]
|
||||
**/
|
||||
TipSlashed: AugmentedEvent<ApiType, [Hash, AccountId, Balance]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
treasury: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* Some funds have been allocated. \[proposal_index, award, beneficiary\]
|
||||
**/
|
||||
@@ -945,9 +1025,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* We have ended a spend period and will now allocate funds. \[budget_remaining\]
|
||||
**/
|
||||
Spending: AugmentedEvent<ApiType, [Balance]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
utility: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* Batch of dispatches completed fully with no error.
|
||||
**/
|
||||
@@ -957,9 +1040,12 @@ declare module '@polkadot/api/types/events' {
|
||||
* well as the error. \[index, error\]
|
||||
**/
|
||||
BatchInterrupted: AugmentedEvent<ApiType, [u32, DispatchError]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
vesting: {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
/**
|
||||
* An \[account\] has become fully vested. No further vesting can happen.
|
||||
**/
|
||||
@@ -970,6 +1056,10 @@ declare module '@polkadot/api/types/events' {
|
||||
* \[account, unvested\]
|
||||
**/
|
||||
VestingUpdated: AugmentedEvent<ApiType, [AccountId, Balance]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import type { Bytes, Data, Option, U8aFixed, Vec, bool, u32, u64 } from '@polkadot/types';
|
||||
import type { AnyNumber, ITuple, Observable } from '@polkadot/types/types';
|
||||
import type { AssetApproval, AssetApprovalKey, AssetBalance, AssetDetails, AssetMetadata } from '@polkadot/types/interfaces/assets';
|
||||
import type { AssetApproval, AssetBalance, AssetDetails, AssetMetadata } from '@polkadot/types/interfaces/assets';
|
||||
import type { UncleEntryItem } from '@polkadot/types/interfaces/authorship';
|
||||
import type { BabeAuthorityWeight, BabeEpochConfiguration, MaybeRandomness, NextConfigDescriptor, Randomness } from '@polkadot/types/interfaces/babe';
|
||||
import type { AccountData, BalanceLock } from '@polkadot/types/interfaces/balances';
|
||||
@@ -35,16 +35,16 @@ import type { ApiTypes } from '@polkadot/api/types';
|
||||
declare module '@polkadot/api/types/storage' {
|
||||
export interface AugmentedQueries<ApiType> {
|
||||
assets: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The number of units of assets held by any given account.
|
||||
**/
|
||||
account: AugmentedQueryDoubleMap<ApiType, (key1: AssetId | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<AssetBalance>, [AssetId, AccountId]> & QueryableStorageEntry<ApiType, [AssetId, AccountId]>;
|
||||
account: AugmentedQuery<ApiType, (arg1: AssetId | AnyNumber | Uint8Array, arg2: AccountId | string | Uint8Array) => Observable<AssetBalance>, [AssetId, AccountId]> & QueryableStorageEntry<ApiType, [AssetId, AccountId]>;
|
||||
/**
|
||||
* Approved balance transfers. First balance is the amount approved for transfer. Second
|
||||
* is the amount of `T::Currency` reserved for storing this.
|
||||
* First key is the asset ID, second key is the owner and third key is the delegate.
|
||||
**/
|
||||
approvals: AugmentedQueryDoubleMap<ApiType, (key1: AssetId | AnyNumber | Uint8Array, key2: AssetApprovalKey | { owner?: any; delegate?: any } | string | Uint8Array) => Observable<Option<AssetApproval>>, [AssetId, AssetApprovalKey]> & QueryableStorageEntry<ApiType, [AssetId, AssetApprovalKey]>;
|
||||
approvals: AugmentedQuery<ApiType, (arg1: AssetId | AnyNumber | Uint8Array, arg2: AccountId | string | Uint8Array, arg3: AccountId | string | Uint8Array) => Observable<Option<AssetApproval>>, [AssetId, AccountId, AccountId]> & QueryableStorageEntry<ApiType, [AssetId, AccountId, AccountId]>;
|
||||
/**
|
||||
* Details of an asset.
|
||||
**/
|
||||
@@ -53,9 +53,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* Metadata of an asset.
|
||||
**/
|
||||
metadata: AugmentedQuery<ApiType, (arg: AssetId | AnyNumber | Uint8Array) => Observable<AssetMetadata>, [AssetId]> & QueryableStorageEntry<ApiType, [AssetId]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
authorship: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Author of current block.
|
||||
**/
|
||||
@@ -68,9 +71,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* Uncles
|
||||
**/
|
||||
uncles: AugmentedQuery<ApiType, () => Observable<Vec<UncleEntryItem>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
babe: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Current epoch authorities.
|
||||
**/
|
||||
@@ -165,9 +171,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay.
|
||||
**/
|
||||
underConstruction: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Randomness>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
balances: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The balance of an account.
|
||||
*
|
||||
@@ -189,9 +198,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* The total units issued in the system.
|
||||
**/
|
||||
totalIssuance: AugmentedQuery<ApiType, () => Observable<Balance>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
bounties: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Bounties that have been made.
|
||||
**/
|
||||
@@ -208,9 +220,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* The description of each bounty.
|
||||
**/
|
||||
bountyDescriptions: AugmentedQuery<ApiType, (arg: BountyIndex | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [BountyIndex]> & QueryableStorageEntry<ApiType, [BountyIndex]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
contracts: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The subtrie counter.
|
||||
**/
|
||||
@@ -236,9 +251,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* A mapping from an original code hash to the original code, untouched by instrumentation.
|
||||
**/
|
||||
pristineCode: AugmentedQuery<ApiType, (arg: CodeHash | string | Uint8Array) => Observable<Option<Bytes>>, [CodeHash]> & QueryableStorageEntry<ApiType, [CodeHash]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
council: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The current members of the collective. This is stored sorted (just by value).
|
||||
**/
|
||||
@@ -263,9 +281,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* Votes on a given proposal, if it is ongoing.
|
||||
**/
|
||||
voting: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<Option<Votes>>, [Hash]> & QueryableStorageEntry<ApiType, [Hash]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
democracy: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* A record of who vetoed what. Maps proposal hash to a possible existent block number
|
||||
* (until when it may not be resubmitted) and who vetoed it.
|
||||
@@ -341,9 +362,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway.
|
||||
**/
|
||||
votingOf: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Voting>, [AccountId]> & QueryableStorageEntry<ApiType, [AccountId]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Current phase.
|
||||
**/
|
||||
@@ -379,9 +403,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* Only exists when [`Snapshot`] is present.
|
||||
**/
|
||||
snapshotMetadata: AugmentedQuery<ApiType, () => Observable<Option<SolutionOrSnapshotSize>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
elections: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The present candidate list. A current member or runner-up can never enter this vector
|
||||
* and is always implicitly assumed to be a candidate.
|
||||
@@ -414,9 +441,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* TWOX-NOTE: SAFE as `AccountId` is a crypto hash.
|
||||
**/
|
||||
voting: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Voter>, [AccountId]> & QueryableStorageEntry<ApiType, [AccountId]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
gilt: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The currently active gilts, indexed according to the order of creation.
|
||||
**/
|
||||
@@ -437,9 +467,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* whose duration is one `Period` would be storage `0`.
|
||||
**/
|
||||
queueTotals: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, BalanceOf]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
grandpa: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The number of changes (both in terms of keys and underlying economic responsibilities)
|
||||
* in the "set" of Grandpa validators from genesis.
|
||||
@@ -468,9 +501,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* State of the current authority set.
|
||||
**/
|
||||
state: AugmentedQuery<ApiType, () => Observable<StoredState>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
identity: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Information that is pertinent to identify the entity behind an account.
|
||||
*
|
||||
@@ -497,14 +533,17 @@ declare module '@polkadot/api/types/storage' {
|
||||
* context. If the account is not some other account's sub-identity, then just `None`.
|
||||
**/
|
||||
superOf: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<ITuple<[AccountId, Data]>>>, [AccountId]> & QueryableStorageEntry<ApiType, [AccountId]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
imOnline: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* For each session index, we keep a mapping of `ValidatorId<T>` to the
|
||||
* number of blocks authored by the given authority.
|
||||
**/
|
||||
authoredBlocks: AugmentedQueryDoubleMap<ApiType, (key1: SessionIndex | AnyNumber | Uint8Array, key2: ValidatorId | string | Uint8Array) => Observable<u32>, [SessionIndex, ValidatorId]> & QueryableStorageEntry<ApiType, [SessionIndex, ValidatorId]>;
|
||||
authoredBlocks: AugmentedQuery<ApiType, (arg1: SessionIndex | AnyNumber | Uint8Array, arg2: ValidatorId | string | Uint8Array) => Observable<u32>, [SessionIndex, ValidatorId]> & QueryableStorageEntry<ApiType, [SessionIndex, ValidatorId]>;
|
||||
/**
|
||||
* The block number after which it's ok to send heartbeats in the current
|
||||
* session.
|
||||
@@ -527,17 +566,23 @@ declare module '@polkadot/api/types/storage' {
|
||||
* For each session index, we keep a mapping of `AuthIndex` to
|
||||
* `offchain::OpaqueNetworkState`.
|
||||
**/
|
||||
receivedHeartbeats: AugmentedQueryDoubleMap<ApiType, (key1: SessionIndex | AnyNumber | Uint8Array, key2: AuthIndex | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [SessionIndex, AuthIndex]> & QueryableStorageEntry<ApiType, [SessionIndex, AuthIndex]>;
|
||||
receivedHeartbeats: AugmentedQuery<ApiType, (arg1: SessionIndex | AnyNumber | Uint8Array, arg2: AuthIndex | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [SessionIndex, AuthIndex]> & QueryableStorageEntry<ApiType, [SessionIndex, AuthIndex]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
indices: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The lookup from index to account.
|
||||
**/
|
||||
accounts: AugmentedQuery<ApiType, (arg: AccountIndex | AnyNumber | Uint8Array) => Observable<Option<ITuple<[AccountId, BalanceOf, bool]>>>, [AccountIndex]> & QueryableStorageEntry<ApiType, [AccountIndex]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
lottery: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The calls stored in this pallet to be used in an active lottery if configured
|
||||
* by `Config::ValidateCall`.
|
||||
@@ -563,9 +608,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* Total number of tickets sold.
|
||||
**/
|
||||
ticketsCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
mmr: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Hashes of the nodes in the MMR.
|
||||
*
|
||||
@@ -581,21 +629,27 @@ declare module '@polkadot/api/types/storage' {
|
||||
* Latest MMR Root hash.
|
||||
**/
|
||||
rootHash: AugmentedQuery<ApiType, () => Observable<Hash>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
multisig: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
calls: AugmentedQuery<ApiType, (arg: U8aFixed | string | Uint8Array) => Observable<Option<ITuple<[OpaqueCall, AccountId, BalanceOf]>>>, [U8aFixed]> & QueryableStorageEntry<ApiType, [U8aFixed]>;
|
||||
/**
|
||||
* The set of open multisig operations.
|
||||
**/
|
||||
multisigs: AugmentedQueryDoubleMap<ApiType, (key1: AccountId | string | Uint8Array, key2: U8aFixed | string | Uint8Array) => Observable<Option<Multisig>>, [AccountId, U8aFixed]> & QueryableStorageEntry<ApiType, [AccountId, U8aFixed]>;
|
||||
multisigs: AugmentedQuery<ApiType, (arg1: AccountId | string | Uint8Array, arg2: U8aFixed | string | Uint8Array) => Observable<Option<Multisig>>, [AccountId, U8aFixed]> & QueryableStorageEntry<ApiType, [AccountId, U8aFixed]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
offences: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* A vector of reports of the same kind that happened at the same time slot.
|
||||
**/
|
||||
concurrentReportsIndex: AugmentedQueryDoubleMap<ApiType, (key1: Kind | string | Uint8Array, key2: OpaqueTimeSlot | string | Uint8Array) => Observable<Vec<ReportIdOf>>, [Kind, OpaqueTimeSlot]> & QueryableStorageEntry<ApiType, [Kind, OpaqueTimeSlot]>;
|
||||
concurrentReportsIndex: AugmentedQuery<ApiType, (arg1: Kind | string | Uint8Array, arg2: OpaqueTimeSlot | string | Uint8Array) => Observable<Vec<ReportIdOf>>, [Kind, OpaqueTimeSlot]> & QueryableStorageEntry<ApiType, [Kind, OpaqueTimeSlot]>;
|
||||
/**
|
||||
* The primary structure that holds all offence records keyed by report identifiers.
|
||||
**/
|
||||
@@ -609,9 +663,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* different types are not supported at the moment so we are doing the manual serialization.
|
||||
**/
|
||||
reportsByKindIndex: AugmentedQuery<ApiType, (arg: Kind | string | Uint8Array) => Observable<Bytes>, [Kind]> & QueryableStorageEntry<ApiType, [Kind]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
proxy: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The announcements made by the proxy (key).
|
||||
**/
|
||||
@@ -621,25 +678,31 @@ declare module '@polkadot/api/types/storage' {
|
||||
* which are being delegated to, together with the amount held on deposit.
|
||||
**/
|
||||
proxies: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<ITuple<[Vec<ProxyDefinition>, BalanceOf]>>, [AccountId]> & QueryableStorageEntry<ApiType, [AccountId]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
randomnessCollectiveFlip: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Series of block headers from the last 81 blocks that acts as random seed material. This
|
||||
* is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of
|
||||
* the oldest hash.
|
||||
**/
|
||||
randomMaterial: AugmentedQuery<ApiType, () => Observable<Vec<Hash>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
recovery: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Active recovery attempts.
|
||||
*
|
||||
* First account is the account to be recovered, and the second account
|
||||
* is the user trying to recover the account.
|
||||
**/
|
||||
activeRecoveries: AugmentedQueryDoubleMap<ApiType, (key1: AccountId | string | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Option<ActiveRecovery>>, [AccountId, AccountId]> & QueryableStorageEntry<ApiType, [AccountId, AccountId]>;
|
||||
activeRecoveries: AugmentedQuery<ApiType, (arg1: AccountId | string | Uint8Array, arg2: AccountId | string | Uint8Array) => Observable<Option<ActiveRecovery>>, [AccountId, AccountId]> & QueryableStorageEntry<ApiType, [AccountId, AccountId]>;
|
||||
/**
|
||||
* The list of allowed proxy accounts.
|
||||
*
|
||||
@@ -650,9 +713,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* The set of recoverable accounts and their recovery configuration.
|
||||
**/
|
||||
recoverable: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<RecoveryConfig>>, [AccountId]> & QueryableStorageEntry<ApiType, [AccountId]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
scheduler: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Items to be executed, indexed by the block number that they should be executed on.
|
||||
**/
|
||||
@@ -667,9 +733,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* New networks start with last version.
|
||||
**/
|
||||
storageVersion: AugmentedQuery<ApiType, () => Observable<Releases>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
session: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Current index of the session.
|
||||
**/
|
||||
@@ -702,9 +771,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* The current set of validators.
|
||||
**/
|
||||
validators: AugmentedQuery<ApiType, () => Observable<Vec<ValidatorId>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
society: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The current bids, stored ordered by the value of the bid.
|
||||
**/
|
||||
@@ -765,14 +837,17 @@ declare module '@polkadot/api/types/storage' {
|
||||
/**
|
||||
* Double map from Candidate -> Voter -> (Maybe) Vote.
|
||||
**/
|
||||
votes: AugmentedQueryDoubleMap<ApiType, (key1: AccountId | string | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Option<SocietyVote>>, [AccountId, AccountId]> & QueryableStorageEntry<ApiType, [AccountId, AccountId]>;
|
||||
votes: AugmentedQuery<ApiType, (arg1: AccountId | string | Uint8Array, arg2: AccountId | string | Uint8Array) => Observable<Option<SocietyVote>>, [AccountId, AccountId]> & QueryableStorageEntry<ApiType, [AccountId, AccountId]>;
|
||||
/**
|
||||
* Members currently vouching or banned from vouching again
|
||||
**/
|
||||
vouching: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<VouchingStatus>>, [AccountId]> & QueryableStorageEntry<ApiType, [AccountId]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
staking: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The active era information, it holds index and start.
|
||||
*
|
||||
@@ -826,7 +901,7 @@ declare module '@polkadot/api/types/storage' {
|
||||
* Is it removed after `HISTORY_DEPTH` eras.
|
||||
* If stakers hasn't been set or has been removed then empty exposure is returned.
|
||||
**/
|
||||
erasStakers: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Exposure>, [EraIndex, AccountId]> & QueryableStorageEntry<ApiType, [EraIndex, AccountId]>;
|
||||
erasStakers: AugmentedQuery<ApiType, (arg1: EraIndex | AnyNumber | Uint8Array, arg2: AccountId | string | Uint8Array) => Observable<Exposure>, [EraIndex, AccountId]> & QueryableStorageEntry<ApiType, [EraIndex, AccountId]>;
|
||||
/**
|
||||
* Clipped Exposure of validator at era.
|
||||
*
|
||||
@@ -840,7 +915,7 @@ declare module '@polkadot/api/types/storage' {
|
||||
* Is it removed after `HISTORY_DEPTH` eras.
|
||||
* If stakers hasn't been set or has been removed then empty exposure is returned.
|
||||
**/
|
||||
erasStakersClipped: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Exposure>, [EraIndex, AccountId]> & QueryableStorageEntry<ApiType, [EraIndex, AccountId]>;
|
||||
erasStakersClipped: AugmentedQuery<ApiType, (arg1: EraIndex | AnyNumber | Uint8Array, arg2: AccountId | string | Uint8Array) => Observable<Exposure>, [EraIndex, AccountId]> & QueryableStorageEntry<ApiType, [EraIndex, AccountId]>;
|
||||
/**
|
||||
* The session index at which the era start for the last `HISTORY_DEPTH` eras.
|
||||
*
|
||||
@@ -860,7 +935,7 @@ declare module '@polkadot/api/types/storage' {
|
||||
*
|
||||
* Is it removed after `HISTORY_DEPTH` eras.
|
||||
**/
|
||||
erasValidatorPrefs: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<ValidatorPrefs>, [EraIndex, AccountId]> & QueryableStorageEntry<ApiType, [EraIndex, AccountId]>;
|
||||
erasValidatorPrefs: AugmentedQuery<ApiType, (arg1: EraIndex | AnyNumber | Uint8Array, arg2: AccountId | string | Uint8Array) => Observable<ValidatorPrefs>, [EraIndex, AccountId]> & QueryableStorageEntry<ApiType, [EraIndex, AccountId]>;
|
||||
/**
|
||||
* The total validator era payout for the last `HISTORY_DEPTH` eras.
|
||||
*
|
||||
@@ -902,7 +977,7 @@ declare module '@polkadot/api/types/storage' {
|
||||
/**
|
||||
* All slashing events on nominators, mapped by era to the highest slash value of the era.
|
||||
**/
|
||||
nominatorSlashInEra: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Option<BalanceOf>>, [EraIndex, AccountId]> & QueryableStorageEntry<ApiType, [EraIndex, AccountId]>;
|
||||
nominatorSlashInEra: AugmentedQuery<ApiType, (arg1: EraIndex | AnyNumber | Uint8Array, arg2: AccountId | string | Uint8Array) => Observable<Option<BalanceOf>>, [EraIndex, AccountId]> & QueryableStorageEntry<ApiType, [EraIndex, AccountId]>;
|
||||
/**
|
||||
* Where the reward payment should be made. Keyed by stash.
|
||||
**/
|
||||
@@ -945,17 +1020,23 @@ declare module '@polkadot/api/types/storage' {
|
||||
* All slashing events on validators, mapped by era to the highest slash proportion
|
||||
* and slash value of the era.
|
||||
**/
|
||||
validatorSlashInEra: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Option<ITuple<[Perbill, BalanceOf]>>>, [EraIndex, AccountId]> & QueryableStorageEntry<ApiType, [EraIndex, AccountId]>;
|
||||
validatorSlashInEra: AugmentedQuery<ApiType, (arg1: EraIndex | AnyNumber | Uint8Array, arg2: AccountId | string | Uint8Array) => Observable<Option<ITuple<[Perbill, BalanceOf]>>>, [EraIndex, AccountId]> & QueryableStorageEntry<ApiType, [EraIndex, AccountId]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
sudo: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The `AccountId` of the sudo key.
|
||||
**/
|
||||
key: AugmentedQuery<ApiType, () => Observable<AccountId>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
system: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The full account information for a particular account ID.
|
||||
**/
|
||||
@@ -1030,9 +1111,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* True if we have upgraded so that `type RefCount` is `u32`. False (default) if not.
|
||||
**/
|
||||
upgradedToU32RefCount: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
technicalCommittee: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The current members of the collective. This is stored sorted (just by value).
|
||||
**/
|
||||
@@ -1057,9 +1141,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* Votes on a given proposal, if it is ongoing.
|
||||
**/
|
||||
voting: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<Option<Votes>>, [Hash]> & QueryableStorageEntry<ApiType, [Hash]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
technicalMembership: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The current membership, stored as an ordered Vec.
|
||||
**/
|
||||
@@ -1068,9 +1155,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* The current prime member, if one exists.
|
||||
**/
|
||||
prime: AugmentedQuery<ApiType, () => Observable<Option<AccountId>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
timestamp: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Did the timestamp get updated in this block?
|
||||
**/
|
||||
@@ -1079,9 +1169,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* Current time for the current block.
|
||||
**/
|
||||
now: AugmentedQuery<ApiType, () => Observable<Moment>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
tips: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Simple preimage lookup from the reason's hash to the original data. Again, has an
|
||||
* insecure enumerable hash since the key is guaranteed to be the result of a secure hash.
|
||||
@@ -1093,14 +1186,20 @@ declare module '@polkadot/api/types/storage' {
|
||||
* guaranteed to be a secure hash.
|
||||
**/
|
||||
tips: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<Option<OpenTip>>, [Hash]> & QueryableStorageEntry<ApiType, [Hash]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
transactionPayment: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
nextFeeMultiplier: AugmentedQuery<ApiType, () => Observable<Multiplier>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
storageVersion: AugmentedQuery<ApiType, () => Observable<Releases>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
treasury: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Proposal indices that have been approved but not yet awarded.
|
||||
**/
|
||||
@@ -1113,13 +1212,20 @@ declare module '@polkadot/api/types/storage' {
|
||||
* Proposals that have been made.
|
||||
**/
|
||||
proposals: AugmentedQuery<ApiType, (arg: ProposalIndex | AnyNumber | Uint8Array) => Observable<Option<TreasuryProposal>>, [ProposalIndex]> & QueryableStorageEntry<ApiType, [ProposalIndex]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
vesting: {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Information regarding the vesting of a given account.
|
||||
**/
|
||||
vesting: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<VestingInfo>>, [AccountId]> & QueryableStorageEntry<ApiType, [AccountId]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -382,6 +382,10 @@ declare module '@polkadot/rpc-core/types.jsonrpc' {
|
||||
* Retrieves the keys with prefix of a specific child storage
|
||||
**/
|
||||
getChildKeys: AugmentedRpc<(childStorageKey: StorageKey | string | Uint8Array | any, childDefinition: StorageKey | string | Uint8Array | any, childType: u32 | AnyNumber | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<StorageKey>>>;
|
||||
/**
|
||||
* Returns proof of storage for child key entries at a specific block state.
|
||||
**/
|
||||
getChildReadProof: AugmentedRpc<(childStorageKey: PrefixedStorageKey | string | Uint8Array, keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: BlockHash | string | Uint8Array) => Observable<ReadProof>>;
|
||||
/**
|
||||
* Retrieves the child storage for a key
|
||||
**/
|
||||
|
||||
+128
-32
@@ -29,7 +29,6 @@ import type { ApiTypes, SubmittableExtrinsic } from '@polkadot/api/types';
|
||||
declare module '@polkadot/api/types/submittable' {
|
||||
export interface AugmentedSubmittables<ApiType> {
|
||||
assets: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Approve an amount of asset for transfer by a delegated third-party account.
|
||||
*
|
||||
@@ -433,16 +432,22 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
transferOwnership: AugmentedSubmittable<(id: Compact<AssetId> | AnyNumber | Uint8Array, owner: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<AssetId>, LookupSource]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
authorship: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Provide a set of uncles.
|
||||
**/
|
||||
setUncles: AugmentedSubmittable<(newUncles: Vec<Header> | (Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Header>]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
babe: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Plan an epoch config change. The epoch config change is recorded and will be enacted on
|
||||
* the next call to `enact_epoch_change`. The config will be activated one epoch after.
|
||||
@@ -468,9 +473,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* reporter.
|
||||
**/
|
||||
reportEquivocationUnsigned: AugmentedSubmittable<(equivocationProof: BabeEquivocationProof | { offender?: any; slotNumber?: any; firstHeader?: any; secondHeader?: any } | string | Uint8Array, keyOwnerProof: KeyOwnerProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [BabeEquivocationProof, KeyOwnerProof]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
balances: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Exactly as `transfer`, except the origin must be root and the source account may be
|
||||
* specified.
|
||||
@@ -545,9 +553,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* #</weight>
|
||||
**/
|
||||
transferKeepAlive: AugmentedSubmittable<(dest: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: Compact<Balance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Compact<Balance>]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
bounties: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Accept the curator role for a bounty.
|
||||
* A deposit will be reserved from curator and refund upon successful payout.
|
||||
@@ -667,9 +678,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
unassignCurator: AugmentedSubmittable<(bountyId: Compact<BountyIndex> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<BountyIndex>]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
contracts: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Makes a call to an account, optionally transferring some balance.
|
||||
*
|
||||
@@ -724,9 +738,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - The `deploy` function is executed in the context of the newly-created account.
|
||||
**/
|
||||
instantiateWithCode: AugmentedSubmittable<(endowment: Compact<BalanceOf> | AnyNumber | Uint8Array, gasLimit: Compact<Weight> | AnyNumber | Uint8Array, code: Bytes | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<BalanceOf>, Compact<Weight>, Bytes, Bytes, Bytes]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
council: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Close a vote that is either approved, disapproved or whose voting period has ended.
|
||||
*
|
||||
@@ -863,9 +880,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
vote: AugmentedSubmittable<(proposal: Hash | string | Uint8Array, index: Compact<ProposalIndex> | AnyNumber | Uint8Array, approve: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [Hash, Compact<ProposalIndex>, bool]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
democracy: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Permanently place a proposal into the blacklist. This prevents it from ever being
|
||||
* proposed again.
|
||||
@@ -1196,9 +1216,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* Weight: `O(R)` where R is the number of referendums the voter has voted on.
|
||||
**/
|
||||
vote: AugmentedSubmittable<(refIndex: Compact<ReferendumIndex> | AnyNumber | Uint8Array, vote: AccountVote | { Standard: any } | { Split: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<ReferendumIndex>, AccountVote]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Submit a solution for the unsigned phase.
|
||||
*
|
||||
@@ -1216,9 +1239,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* No deposit or reward is associated with this submission.
|
||||
**/
|
||||
submitUnsigned: AugmentedSubmittable<(solution: RawSolution | { compact?: any; score?: any; round?: any } | string | Uint8Array, witness: SolutionOrSnapshotSize | { voters?: any; targets?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [RawSolution, SolutionOrSnapshotSize]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
elections: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Clean all voters who are defunct (i.e. they do not serve any purpose at all). The
|
||||
* deposit of the removed voters are returned.
|
||||
@@ -1321,9 +1347,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
vote: AugmentedSubmittable<(votes: Vec<AccountId> | (AccountId | string | Uint8Array)[], value: Compact<BalanceOf> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<AccountId>, Compact<BalanceOf>]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
gilt: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Place a bid for a gilt to be issued.
|
||||
*
|
||||
@@ -1369,9 +1398,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - `index`: The index of the gilt to be thawed.
|
||||
**/
|
||||
thaw: AugmentedSubmittable<(index: Compact<ActiveIndex> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<ActiveIndex>]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
grandpa: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Note that the current authority set of the GRANDPA finality gadget has
|
||||
* stalled. This will trigger a forced authority set change at the beginning
|
||||
@@ -1401,9 +1433,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* reporter.
|
||||
**/
|
||||
reportEquivocationUnsigned: AugmentedSubmittable<(equivocationProof: GrandpaEquivocationProof | { setId?: any; equivocation?: any } | string | Uint8Array, keyOwnerProof: KeyOwnerProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [GrandpaEquivocationProof, KeyOwnerProof]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
identity: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Add a registrar to the system.
|
||||
*
|
||||
@@ -1665,9 +1700,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
setSubs: AugmentedSubmittable<(subs: Vec<ITuple<[AccountId, Data]>> | ([AccountId | string | Uint8Array, Data | { None: any } | { Raw: any } | { BlakeTwo256: any } | { Sha256: any } | { Keccak256: any } | { ShaThree256: any } | string | Uint8Array])[]) => SubmittableExtrinsic<ApiType>, [Vec<ITuple<[AccountId, Data]>>]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
imOnline: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* # <weight>
|
||||
* - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len)
|
||||
@@ -1680,9 +1718,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
heartbeat: AugmentedSubmittable<(heartbeat: Heartbeat | { blockNumber?: any; networkState?: any; sessionIndex?: any; authorityIndex?: any; validatorsLen?: any } | string | Uint8Array, signature: Signature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Heartbeat, Signature]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
indices: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Assign an previously unassigned index.
|
||||
*
|
||||
@@ -1792,9 +1833,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
transfer: AugmentedSubmittable<(updated: AccountId | string | Uint8Array, index: AccountIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId, AccountIndex]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
lottery: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Buy a ticket to enter the lottery.
|
||||
*
|
||||
@@ -1838,9 +1882,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* This extrinsic must be called by the `ManagerOrigin`.
|
||||
**/
|
||||
stopRepeat: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
multisig: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Register approval for a dispatch to be made from a deterministic composite account if
|
||||
* approved by a total of `threshold - 1` of `other_signatories`.
|
||||
@@ -1977,9 +2024,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
cancelAsMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId> | (AccountId | string | Uint8Array)[], timepoint: Timepoint | { height?: any; index?: any } | string | Uint8Array, callHash: U8aFixed | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId>, Timepoint, U8aFixed]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
proxy: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Register a proxy account for the sender that is able to make calls on its behalf.
|
||||
*
|
||||
@@ -2172,9 +2222,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
removeProxy: AugmentedSubmittable<(delegate: AccountId | string | Uint8Array, proxyType: ProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | number | Uint8Array, delay: BlockNumber | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId, ProxyType, BlockNumber]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
recovery: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Send a call through a recovered account.
|
||||
*
|
||||
@@ -2374,9 +2427,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
vouchRecovery: AugmentedSubmittable<(lost: AccountId | string | Uint8Array, rescuer: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId, AccountId]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
scheduler: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Cancel an anonymously scheduled task.
|
||||
*
|
||||
@@ -2445,9 +2501,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
scheduleNamedAfter: AugmentedSubmittable<(id: Bytes | string | Uint8Array, after: BlockNumber | AnyNumber | Uint8Array, maybePeriodic: Option<Period> | null | object | string | Uint8Array, priority: Priority | AnyNumber | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, BlockNumber, Option<Period>, Priority, Call]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
session: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Removes any session key(s) of the function caller.
|
||||
* This doesn't take effect until the next session.
|
||||
@@ -2480,9 +2539,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
setKeys: AugmentedSubmittable<(keys: Keys, proof: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Keys, Bytes]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
society: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* A user outside of the society can make a bid for entry.
|
||||
*
|
||||
@@ -2800,9 +2862,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
vouch: AugmentedSubmittable<(who: AccountId | string | Uint8Array, value: BalanceOf | AnyNumber | Uint8Array, tip: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId, BalanceOf, BalanceOf]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
staking: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Take the origin account as a stash and lock up `value` of its balance. `controller` will
|
||||
* be the account that controls it.
|
||||
@@ -3234,9 +3299,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
withdrawUnbonded: AugmentedSubmittable<(numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
sudo: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key.
|
||||
*
|
||||
@@ -3289,9 +3357,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
sudoUncheckedWeight: AugmentedSubmittable<(call: Call | { callIndex?: any; args?: any } | string | Uint8Array, weight: Weight | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Weight]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
system: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* A dispatch that will fill the block weight up to the given ratio.
|
||||
**/
|
||||
@@ -3397,9 +3468,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
setStorage: AugmentedSubmittable<(items: Vec<KeyValue> | (KeyValue)[]) => SubmittableExtrinsic<ApiType>, [Vec<KeyValue>]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
technicalCommittee: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Close a vote that is either approved, disapproved or whose voting period has ended.
|
||||
*
|
||||
@@ -3536,9 +3610,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
vote: AugmentedSubmittable<(proposal: Hash | string | Uint8Array, index: Compact<ProposalIndex> | AnyNumber | Uint8Array, approve: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [Hash, Compact<ProposalIndex>, bool]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
technicalMembership: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Add a member `who` to the set.
|
||||
*
|
||||
@@ -3586,9 +3663,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* Prime membership is *not* passed from `remove` to `add`, if extant.
|
||||
**/
|
||||
swapMember: AugmentedSubmittable<(remove: AccountId | string | Uint8Array, add: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId, AccountId]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
timestamp: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Set the current time.
|
||||
*
|
||||
@@ -3607,9 +3687,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
set: AugmentedSubmittable<(now: Compact<Moment> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<Moment>]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
tips: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Close and payout a tip.
|
||||
*
|
||||
@@ -3742,9 +3825,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
tipNew: AugmentedSubmittable<(reason: Bytes | string | Uint8Array, who: AccountId | string | Uint8Array, tipValue: Compact<BalanceOf> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, AccountId, Compact<BalanceOf>]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
treasury: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Approve a proposal. At a later time, the proposal will be allocated to the beneficiary
|
||||
* and the original deposit will be returned.
|
||||
@@ -3782,9 +3868,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
rejectProposal: AugmentedSubmittable<(proposalId: Compact<ProposalIndex> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<ProposalIndex>]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
utility: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Send a call through an indexed pseudonym of the sender.
|
||||
*
|
||||
@@ -3838,9 +3927,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
batchAll: AugmentedSubmittable<(calls: Vec<Call> | (Call | { callIndex?: any; args?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
vesting: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Force a vested transfer.
|
||||
*
|
||||
@@ -3914,6 +4006,10 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
vestedTransfer: AugmentedSubmittable<(target: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, schedule: VestingInfo | { locked?: any; perBlock?: any; startingBlock?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, VestingInfo]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ interface MetaDecoration {
|
||||
}
|
||||
|
||||
// the max amount of keys/values that we will retrieve at once
|
||||
const PAGE_SIZE = 384;
|
||||
const PAGE_SIZE = 256;
|
||||
|
||||
const l = logger('api/init');
|
||||
|
||||
@@ -356,7 +356,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
|
||||
private _decorateStorageEntry<ApiType extends ApiTypes> (creator: StorageEntry, decorateMethod: DecorateMethod<ApiType>): QueryableStorageEntry<ApiType> {
|
||||
// get the storage arguments, with DoubleMap as an array entry, otherwise spread
|
||||
const getArgs = (...args: unknown[]): unknown[] => extractStorageArgs(creator, args);
|
||||
const getArgs = (args: unknown[]): unknown[] => extractStorageArgs(creator, args);
|
||||
|
||||
// Disable this where it occurs for each field we are decorating
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment */
|
||||
@@ -365,11 +365,11 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
|
||||
decorated.creator = creator;
|
||||
|
||||
decorated.at = decorateMethod((hash: Hash, arg1?: Arg, arg2?: Arg): Observable<Codec> =>
|
||||
this._rpcCore.state.getStorage(getArgs(arg1, arg2), hash));
|
||||
decorated.at = decorateMethod((hash: Hash, ...args: Arg[]): Observable<Codec> =>
|
||||
this._rpcCore.state.getStorage(getArgs(args), hash));
|
||||
|
||||
decorated.hash = decorateMethod((arg1?: Arg, arg2?: Arg): Observable<Hash> =>
|
||||
this._rpcCore.state.getStorageHash(getArgs(arg1, arg2)));
|
||||
decorated.hash = decorateMethod((...args: Arg[]): Observable<Hash> =>
|
||||
this._rpcCore.state.getStorageHash(getArgs(args)));
|
||||
|
||||
decorated.is = <A extends AnyTuple> (key: IStorageKey<AnyTuple>): key is IStorageKey<A> =>
|
||||
key.section === creator.section && key.method === creator.method;
|
||||
@@ -385,40 +385,40 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
: args
|
||||
))[1]);
|
||||
|
||||
decorated.keyPrefix = (key1?: Arg): string =>
|
||||
u8aToHex(creator.keyPrefix(key1));
|
||||
decorated.keyPrefix = (...keys: Arg[]): string =>
|
||||
u8aToHex(creator.keyPrefix(...keys));
|
||||
|
||||
decorated.range = decorateMethod((range: [Hash, Hash?], arg1?: Arg, arg2?: Arg): Observable<[Hash, Codec][]> =>
|
||||
this._decorateStorageRange(decorated, [arg1, arg2], range));
|
||||
decorated.range = decorateMethod((range: [Hash, Hash?], ...args: Arg[]): Observable<[Hash, Codec][]> =>
|
||||
this._decorateStorageRange(decorated, args, range));
|
||||
|
||||
decorated.size = decorateMethod((arg1?: Arg, arg2?: Arg): Observable<u64> =>
|
||||
this._rpcCore.state.getStorageSize(getArgs(arg1, arg2)));
|
||||
decorated.size = decorateMethod((...args: Arg[]): Observable<u64> =>
|
||||
this._rpcCore.state.getStorageSize(getArgs(args)));
|
||||
|
||||
decorated.sizeAt = decorateMethod((hash: Hash | Uint8Array | string, arg1?: Arg, arg2?: Arg): Observable<u64> =>
|
||||
this._rpcCore.state.getStorageSize(getArgs(arg1, arg2), hash));
|
||||
decorated.sizeAt = decorateMethod((hash: Hash | Uint8Array | string, ...args: Arg[]): Observable<u64> =>
|
||||
this._rpcCore.state.getStorageSize(getArgs(args), hash));
|
||||
|
||||
// FIXME NMap support
|
||||
// .keys() & .entries() only available on map types
|
||||
if (creator.iterKey && (creator.meta.type.isMap || creator.meta.type.isDoubleMap)) {
|
||||
decorated.entries = decorateMethod(
|
||||
memo(this.#instanceId, (doubleMapArg?: Arg): Observable<[StorageKey, Codec][]> =>
|
||||
this._retrieveMapEntries(creator, null, doubleMapArg)));
|
||||
memo(this.#instanceId, (...args: Arg[]): Observable<[StorageKey, Codec][]> =>
|
||||
this._retrieveMapEntries(creator, null, args)));
|
||||
|
||||
decorated.entriesAt = decorateMethod(
|
||||
memo(this.#instanceId, (hash: Hash | Uint8Array | string, doubleMapArg?: Arg): Observable<[StorageKey, Codec][]> =>
|
||||
this._retrieveMapEntries(creator, hash, doubleMapArg)));
|
||||
memo(this.#instanceId, (hash: Hash | Uint8Array | string, ...args: Arg[]): Observable<[StorageKey, Codec][]> =>
|
||||
this._retrieveMapEntries(creator, hash, args)));
|
||||
|
||||
decorated.entriesPaged = decorateMethod(
|
||||
memo(this.#instanceId, (opts: PaginationOptions): Observable<[StorageKey, Codec][]> =>
|
||||
this._retrieveMapEntriesPaged(creator, opts)));
|
||||
|
||||
decorated.keys = decorateMethod(
|
||||
memo(this.#instanceId, (doubleMapArg?: Arg): Observable<StorageKey[]> =>
|
||||
this._retrieveMapKeys(creator, null, doubleMapArg)));
|
||||
memo(this.#instanceId, (...args: Arg[]): Observable<StorageKey[]> =>
|
||||
this._retrieveMapKeys(creator, null, args)));
|
||||
|
||||
decorated.keysAt = decorateMethod(
|
||||
memo(this.#instanceId, (hash: Hash | Uint8Array | string, doubleMapArg?: Arg): Observable<StorageKey[]> =>
|
||||
this._retrieveMapKeys(creator, hash, doubleMapArg)));
|
||||
memo(this.#instanceId, (hash: Hash | Uint8Array | string, ...args: Arg[]): Observable<StorageKey[]> =>
|
||||
this._retrieveMapKeys(creator, hash, args)));
|
||||
|
||||
decorated.keysPaged = decorateMethod(
|
||||
memo(this.#instanceId, (opts: PaginationOptions): Observable<StorageKey[]> =>
|
||||
@@ -452,7 +452,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
});
|
||||
}
|
||||
|
||||
private _decorateStorageRange<ApiType extends ApiTypes> (decorated: QueryableStorageEntry<ApiType>, args: [Arg?, Arg?], range: [Hash, Hash?]): Observable<[Hash, Codec][]> {
|
||||
private _decorateStorageRange<ApiType extends ApiTypes> (decorated: QueryableStorageEntry<ApiType>, args: Arg[], range: [Hash, Hash?]): Observable<[Hash, Codec][]> {
|
||||
const outputType = unwrapStorageType(decorated.creator.meta.type, decorated.creator.meta.modifier.isOptional);
|
||||
|
||||
return this._rpcCore.state
|
||||
@@ -483,10 +483,10 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
);
|
||||
}
|
||||
|
||||
private _retrieveMapKeys ({ iterKey, meta, method, section }: StorageEntry, at: Hash | Uint8Array | string | null, arg?: Arg): Observable<StorageKey[]> {
|
||||
assert(iterKey && (meta.type.isMap || meta.type.isDoubleMap), 'keys can only be retrieved on maps, linked maps and double maps');
|
||||
private _retrieveMapKeys ({ iterKey, meta, method, section }: StorageEntry, at: Hash | Uint8Array | string | null, args: Arg[]): Observable<StorageKey[]> {
|
||||
assert(iterKey && (meta.type.isMap || meta.type.isDoubleMap || meta.type.isNMap), 'keys can only be retrieved on maps, linked maps and double maps');
|
||||
|
||||
const headKey = iterKey(arg).toHex();
|
||||
const headKey = iterKey(...args).toHex();
|
||||
const startSubject = new BehaviorSubject<string>(headKey);
|
||||
const query = at
|
||||
? (startKey: string) => this._rpcCore.state.getKeysPaged(headKey, PAGE_SIZE, startKey, at)
|
||||
@@ -511,21 +511,21 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
}
|
||||
|
||||
private _retrieveMapKeysPaged ({ iterKey, meta, method, section }: StorageEntry, opts: PaginationOptions): Observable<StorageKey[]> {
|
||||
assert(iterKey && (meta.type.isMap || meta.type.isDoubleMap), 'keys can only be retrieved on maps, linked maps and double maps');
|
||||
assert(iterKey && (meta.type.isMap || meta.type.isDoubleMap || meta.type.isNMap), 'keys can only be retrieved on maps, linked maps and double maps');
|
||||
|
||||
const headKey = iterKey(opts.arg).toHex();
|
||||
const headKey = iterKey(...opts.args).toHex();
|
||||
|
||||
return this._rpcCore.state.getKeysPaged(headKey, opts.pageSize, opts.startKey || headKey).pipe(
|
||||
map((keys) => keys.map((key) => key.setMeta(meta, section, method)))
|
||||
);
|
||||
}
|
||||
|
||||
private _retrieveMapEntries (entry: StorageEntry, at: Hash | Uint8Array | string | null, arg?: Arg): Observable<[StorageKey, Codec][]> {
|
||||
private _retrieveMapEntries (entry: StorageEntry, at: Hash | Uint8Array | string | null, args: Arg[]): Observable<[StorageKey, Codec][]> {
|
||||
const query = at
|
||||
? (keyset: StorageKey[]) => this._rpcCore.state.queryStorageAt(keyset, at)
|
||||
: (keyset: StorageKey[]) => this._rpcCore.state.queryStorageAt(keyset);
|
||||
|
||||
return this._retrieveMapKeys(entry, at, arg).pipe(
|
||||
return this._retrieveMapKeys(entry, at, args).pipe(
|
||||
switchMap((keys) =>
|
||||
keys.length
|
||||
? combineLatest(arrayChunk(keys, PAGE_SIZE).map(query)).pipe(
|
||||
|
||||
@@ -129,6 +129,12 @@ async function queryExtra (api: ApiPromise, pairs: TestKeyringMap): Promise<void
|
||||
await api.query.system.account.entries(); // should not take a param
|
||||
await api.query.staking.nominatorSlashInEra.entries(123); // should take a param
|
||||
|
||||
// nmap with keys
|
||||
await api.query.assets.approvals.keys(123, 'blah');
|
||||
await api.query.assets.account.keys(123);
|
||||
await api.query.assets.account.entries(123);
|
||||
await api.query.assets.blah.keys();
|
||||
|
||||
// check range
|
||||
await api.query.balances.freeBalance.range<Balance>(['0x1234'], pairs.bob.address);
|
||||
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api', version: '4.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/api', version: '4.11.1' };
|
||||
|
||||
@@ -1,30 +1,12 @@
|
||||
// Copyright 2017-2021 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
import type { AnyFunction, Callback, Codec, CodecArg } from '@polkadot/types/types';
|
||||
import type { Observable } from '@polkadot/x-rxjs';
|
||||
|
||||
// Prepend an element V onto the beginning of a tuple T.
|
||||
// Cons<1, [2,3,4]> is [1,2,3,4]
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export type Cons<V, T extends any[]> = ((v: V, ...t: T) => void) extends ((...r: infer R) => void)
|
||||
? R
|
||||
: never;
|
||||
export type Push<T extends readonly unknown[], V> = [...T, V]
|
||||
|
||||
// Append an element V onto the end of a tuple T
|
||||
// Push<[1,2,3],4> is [1,2,3,4]
|
||||
// note that this DOES NOT PRESERVE optionality/readonly in tuples.
|
||||
// So unfortunately Push<[1, 2?, 3?], 4> is [1,2|undefined,3|undefined,4]
|
||||
export type Push<T extends any[], V> = (
|
||||
(
|
||||
Cons<any, Required<T>> extends infer R
|
||||
? { [K in keyof R]: K extends keyof T ? T[K] : V }
|
||||
: never
|
||||
) extends infer P
|
||||
? P extends any[] ? P : never
|
||||
: never
|
||||
);
|
||||
export type DropLast<T extends readonly unknown[]> = T extends readonly [...infer U, any?] ? U : [...T];
|
||||
|
||||
export type ApiTypes = 'promise' | 'rxjs';
|
||||
|
||||
@@ -75,8 +57,9 @@ export interface DecorateMethodOptions {
|
||||
|
||||
export type DecorateFn <T extends Codec> = (...args: any[]) => Observable<T>;
|
||||
|
||||
// FIXME We need a solution for NMap
|
||||
export interface PaginationOptions<ArgType = CodecArg> {
|
||||
arg?: ArgType;
|
||||
args: ArgType[];
|
||||
pageSize: number;
|
||||
startKey?: string;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { Hash } from '@polkadot/types/interfaces';
|
||||
import type { StorageEntry } from '@polkadot/types/primitive/types';
|
||||
import type { AnyFunction, AnyTuple, Callback, Codec, CodecArg, IStorageKey } from '@polkadot/types/types';
|
||||
import type { Observable } from '@polkadot/x-rxjs';
|
||||
import type { ApiTypes, MethodResult, ObsInnerType, PaginationOptions, PromiseOrObs, UnsubscribePromise } from './base';
|
||||
import type { ApiTypes, DropLast, MethodResult, ObsInnerType, PaginationOptions, PromiseOrObs, UnsubscribePromise } from './base';
|
||||
|
||||
interface StorageEntryObservableMulti {
|
||||
<T extends Codec>(args: (CodecArg[] | CodecArg)[]): Observable<T[]>;
|
||||
@@ -18,15 +18,16 @@ interface StorageEntryPromiseMulti {
|
||||
}
|
||||
|
||||
export interface StorageEntryPromiseOverloads {
|
||||
(arg1?: CodecArg, arg2?: CodecArg): Promise<Codec>;
|
||||
<T extends Codec>(arg1?: CodecArg, arg2?: CodecArg): Promise<T>;
|
||||
(arg1?: CodecArg, arg2?: CodecArg, arg3?: CodecArg): Promise<Codec>;
|
||||
<T extends Codec>(arg1?: CodecArg, arg2?: CodecArg, arg3?: CodecArg): Promise<T>;
|
||||
<T extends Codec>(callback: Callback<T>): UnsubscribePromise;
|
||||
<T extends Codec>(arg: CodecArg, callback: Callback<T>): UnsubscribePromise;
|
||||
<T extends Codec>(arg1: CodecArg, arg2: CodecArg, callback: Callback<T>): UnsubscribePromise;
|
||||
<T extends Codec>(arg1: CodecArg, arg2: CodecArg, arg3: CodecArg, callback: Callback<T>): UnsubscribePromise;
|
||||
}
|
||||
|
||||
// This is the most generic typings we can have for a storage entry function
|
||||
type GenericStorageEntryFunction = (arg1?: CodecArg, arg2?: CodecArg) => Observable<Codec>
|
||||
type GenericStorageEntryFunction = (...args: CodecArg[]) => Observable<Codec>
|
||||
|
||||
export type QueryableStorageEntry<ApiType extends ApiTypes, A extends AnyTuple = AnyTuple> =
|
||||
ApiType extends 'rxjs'
|
||||
@@ -38,15 +39,15 @@ export type QueryableStorageEntry<ApiType extends ApiTypes, A extends AnyTuple =
|
||||
export interface StorageEntryBase<ApiType extends ApiTypes, F extends AnyFunction, A extends AnyTuple = AnyTuple> {
|
||||
at: <T extends Codec | any = ObsInnerType<ReturnType<F>>>(hash: Hash | Uint8Array | string, ...args: Parameters<F>) => PromiseOrObs<ApiType, T>;
|
||||
creator: StorageEntry;
|
||||
entries: <T extends Codec | any = ObsInnerType<ReturnType<F>>, K extends AnyTuple = A>(arg?: Parameters<F>[0]) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
|
||||
entriesAt: <T extends Codec | any = ObsInnerType<ReturnType<F>>, K extends AnyTuple = A>(hash: Hash | Uint8Array | string, arg?: Parameters<F>[0]) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
|
||||
entries: <T extends Codec | any = ObsInnerType<ReturnType<F>>, K extends AnyTuple = A>(...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
|
||||
entriesAt: <T extends Codec | any = ObsInnerType<ReturnType<F>>, K extends AnyTuple = A>(hash: Hash | Uint8Array | string, ...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
|
||||
entriesPaged: <T extends Codec | any = ObsInnerType<ReturnType<F>>, K extends AnyTuple = A>(opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
|
||||
hash: (...args: Parameters<F>) => PromiseOrObs<ApiType, Hash>;
|
||||
is: (key: IStorageKey<AnyTuple>) => key is IStorageKey<A>;
|
||||
key: (...args: Parameters<F>) => string;
|
||||
keyPrefix: () => string;
|
||||
keys: <K extends AnyTuple = A> (arg?: any) => PromiseOrObs<ApiType, StorageKey<K>[]>;
|
||||
keysAt: <K extends AnyTuple = A> (hash: Hash | Uint8Array | string, arg?: any) => PromiseOrObs<ApiType, StorageKey<K>[]>;
|
||||
keyPrefix: (...args: DropLast<Parameters<F>>) => string;
|
||||
keys: <K extends AnyTuple = A> (...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
|
||||
keysAt: <K extends AnyTuple = A> (hash: Hash | Uint8Array | string, ...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
|
||||
keysPaged: <K extends AnyTuple = A> (opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
|
||||
// @deprecated The underlying RPC this been marked unsafe and is generally not exposed
|
||||
range: <T extends Codec | any = ObsInnerType<ReturnType<F>>>([from, to]: [Hash | Uint8Array | string, Hash | Uint8Array | string | undefined] | [Hash | Uint8Array | string], ...args: Parameters<F>) => PromiseOrObs<ApiType, [Hash, T][]>;
|
||||
@@ -80,10 +81,4 @@ export type QueryableStorageMulti<ApiType extends ApiTypes> =
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface,@typescript-eslint/no-unused-vars
|
||||
export interface AugmentedQueries<ApiType extends ApiTypes> { }
|
||||
|
||||
export interface StorageEntryDoubleMap<ApiType extends ApiTypes, F extends AnyFunction, A extends AnyTuple> extends StorageEntryBase<ApiType, F, A> {
|
||||
keyPrefix: (key1?: Parameters<F>[0]) => string;
|
||||
}
|
||||
|
||||
export type AugmentedQuery<ApiType extends ApiTypes, F extends AnyFunction, A extends AnyTuple = AnyTuple> = MethodResult<ApiType, F> & StorageEntryBase<ApiType, F, A>;
|
||||
|
||||
export type AugmentedQueryDoubleMap<ApiType extends ApiTypes, F extends AnyFunction, A extends AnyTuple = AnyTuple> = MethodResult<ApiType, F> & StorageEntryDoubleMap<ApiType, F, A>;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/metadata",
|
||||
"version": "4.10.1",
|
||||
"version": "4.11.1",
|
||||
"type": "module",
|
||||
"description": "Helpers to extract information from runtime metadata",
|
||||
"main": "index.js",
|
||||
@@ -20,13 +20,13 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/types": "4.10.1",
|
||||
"@polkadot/types-known": "4.10.1",
|
||||
"@polkadot/util": "^6.4.1",
|
||||
"@polkadot/util-crypto": "^6.4.1",
|
||||
"@polkadot/types": "4.11.1",
|
||||
"@polkadot/types-known": "4.11.1",
|
||||
"@polkadot/util": "^6.5.1",
|
||||
"@polkadot/util-crypto": "^6.5.1",
|
||||
"bn.js": "^4.11.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^6.4.1"
|
||||
"@polkadot/keyring": "^6.5.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,21 @@ function createPrefixedKey ({ method, prefix }: CreateItemFn): Uint8Array {
|
||||
return u8aConcat(xxhashAsU8a(prefix, 128), xxhashAsU8a(method, 128));
|
||||
}
|
||||
|
||||
function createKeyRaw (registry: Registry, itemFn: CreateItemFn, keys: Type[], hashers: U8aHasher[], args: CreateArgType[]): Uint8Array {
|
||||
const { method, section } = itemFn;
|
||||
|
||||
return u8aConcat(
|
||||
createPrefixedKey(itemFn),
|
||||
...keys.map((type, index): Uint8Array => {
|
||||
const arg = args[index];
|
||||
|
||||
assert(!isUndefined(arg) && !isNull(arg), () => `Call to ${stringCamelCase(section || 'unknown')}.${stringCamelCase(method || 'unknown')} has a null or undefined argument at position ${index}`);
|
||||
|
||||
return hashers[index](registry.createType(type.toString() as 'Raw', arg).toU8a());
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
function createKey (registry: Registry, itemFn: CreateItemFn, keys: Type[], hashers: U8aHasher[], args: CreateArgType[]): Uint8Array {
|
||||
const { method, section } = itemFn;
|
||||
|
||||
@@ -46,16 +61,7 @@ function createKey (registry: Registry, itemFn: CreateItemFn, keys: Type[], hash
|
||||
|
||||
// as per createKey, always add the length prefix (underlying it is Bytes)
|
||||
return compactAddLength(
|
||||
u8aConcat(
|
||||
createPrefixedKey(itemFn),
|
||||
...keys.map((type, index): Uint8Array => {
|
||||
const arg = args[index];
|
||||
|
||||
assert(!isUndefined(arg) && !isNull(arg), () => `Call to ${stringCamelCase(section || 'unknown')}.${stringCamelCase(method || 'unknown')} has a null or undefined argument at position ${index}`);
|
||||
|
||||
return hashers[index](registry.createType(type.toString() as 'Raw', arg).toU8a());
|
||||
})
|
||||
)
|
||||
createKeyRaw(registry, itemFn, keys, hashers, args)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -80,49 +86,58 @@ function expandWithMeta ({ meta, method, prefix, section }: CreateItemFn, _stora
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
function extendHeadMeta (registry: Registry, { meta: { documentation, name, type }, section }: CreateItemFn, { method }: StorageEntry, iterFn: (arg?: any) => Raw): (arg?: any) => StorageKey {
|
||||
function extendHeadMeta (registry: Registry, { meta: { documentation, name, type }, section }: CreateItemFn, { method }: StorageEntry, iterFn: (...args: unknown[]) => Raw): (...args: unknown[]) => StorageKey {
|
||||
const outputType = type.isMap
|
||||
? type.asMap.key.toString()
|
||||
: type.asDoubleMap.key1.toString();
|
||||
? type.asMap.key
|
||||
: type.isDoubleMap
|
||||
? type.asDoubleMap.key1
|
||||
: type.asNMap.keyVec[0];
|
||||
|
||||
// metadata with a fallback value using the type of the key, the normal
|
||||
// meta fallback only applies to actual entry values, create one for head
|
||||
(iterFn as IterFn).meta = registry.createType('StorageEntryMetadataLatest', {
|
||||
documentation,
|
||||
fallback: registry.createType('Bytes', registry.createType(outputType as 'Raw').toHex()),
|
||||
fallback: registry.createType('Bytes', registry.createType(outputType.toString() as 'Raw').toHex()),
|
||||
modifier: registry.createType('StorageEntryModifierLatest', 1), // required
|
||||
name,
|
||||
type: registry.createType('StorageEntryTypeLatest', registry.createType('Type', type.isMap ? type.asMap.key : type.asDoubleMap.key1), 0)
|
||||
type: registry.createType('StorageEntryTypeLatest', registry.createType('Type', outputType), 0)
|
||||
});
|
||||
|
||||
const prefixKey = registry.createType('StorageKey', iterFn, { method, section });
|
||||
|
||||
return (arg?: any) =>
|
||||
!isUndefined(arg) && !isNull(arg)
|
||||
? registry.createType('StorageKey', iterFn(arg), { method, section })
|
||||
: prefixKey;
|
||||
return (...args: unknown[]) =>
|
||||
registry.createType('StorageKey', iterFn(...args), { method, section });
|
||||
}
|
||||
|
||||
// attach the full list hashing for prefixed maps
|
||||
/** @internal */
|
||||
function extendPrefixedMap (registry: Registry, itemFn: CreateItemFn, storageFn: StorageEntry): StorageEntry {
|
||||
const { meta: { type } } = itemFn;
|
||||
const { meta: { type }, method, section } = itemFn;
|
||||
|
||||
// FIXME NMap support
|
||||
storageFn.iterKey = extendHeadMeta(registry, itemFn, storageFn, (arg?: any): Raw => {
|
||||
assert(type.isDoubleMap || isUndefined(arg), 'Filtering arguments for keys/entries are only valid on double maps');
|
||||
|
||||
return new Raw(
|
||||
registry,
|
||||
type.isDoubleMap && !isUndefined(arg) && !isNull(arg)
|
||||
? u8aConcat(
|
||||
createPrefixedKey(itemFn),
|
||||
getHasher(type.asDoubleMap.hasher)(
|
||||
registry.createType(type.asDoubleMap.key1.toString() as 'Raw', arg).toU8a()
|
||||
)
|
||||
)
|
||||
: createPrefixedKey(itemFn)
|
||||
storageFn.iterKey = extendHeadMeta(registry, itemFn, storageFn, (...args: unknown[]): Raw => {
|
||||
assert(
|
||||
(
|
||||
(args.length === 0) ||
|
||||
(type.isDoubleMap && args.length === 1) ||
|
||||
(type.isNMap && args.length === (type.asNMap.hashers.length - 1))
|
||||
),
|
||||
() => `Iteration ${stringCamelCase(section || 'unknown')}.${stringCamelCase(method || 'unknown')} needs arguments to be one less than the full arguments, found [${args.join(', ')}]`
|
||||
);
|
||||
|
||||
if (args.length) {
|
||||
if (type.isDoubleMap) {
|
||||
return new Raw(registry, createKeyRaw(registry, itemFn, [type.asDoubleMap.key1], [getHasher(type.asDoubleMap.hasher)], args as CreateArgType[]));
|
||||
} else if (type.isNMap) {
|
||||
const keys = [...type.asNMap.keyVec];
|
||||
const hashers = type.asNMap.hashers.map((h) => getHasher(h));
|
||||
|
||||
// remove the last entry
|
||||
keys.pop();
|
||||
hashers.pop();
|
||||
|
||||
return new Raw(registry, createKeyRaw(registry, itemFn, keys, hashers, args as CreateArgType[]));
|
||||
}
|
||||
}
|
||||
|
||||
return new Raw(registry, createKeyRaw(registry, itemFn, [], [], []));
|
||||
});
|
||||
|
||||
return storageFn;
|
||||
@@ -148,13 +163,12 @@ export function createFunction (registry: Registry, itemFn: CreateItemFn, option
|
||||
: createKey(registry, itemFn, type.asNMap.keyVec, type.asNMap.hashers.map((h) => getHasher(h)), arg as CreateArgType[])
|
||||
);
|
||||
|
||||
// FIXME NMap support
|
||||
if (type.isMap || type.isDoubleMap) {
|
||||
if (type.isMap || type.isDoubleMap || type.isNMap) {
|
||||
extendPrefixedMap(registry, itemFn, storageFn);
|
||||
}
|
||||
|
||||
storageFn.keyPrefix = (arg?: any): Uint8Array =>
|
||||
(storageFn.iterKey && storageFn.iterKey(arg)) ||
|
||||
storageFn.keyPrefix = (...args: unknown[]): Uint8Array =>
|
||||
(storageFn.iterKey && storageFn.iterKey(...args)) ||
|
||||
compactStripLength(storageFn())[1];
|
||||
|
||||
return storageFn;
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/metadata', version: '4.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/metadata', version: '4.11.1' };
|
||||
|
||||
@@ -12602,18 +12602,25 @@
|
||||
"name": "Approvals",
|
||||
"modifier": "Optional",
|
||||
"type": {
|
||||
"doubleMap": {
|
||||
"hasher": "Blake2_128Concat",
|
||||
"key1": "AssetId",
|
||||
"key2": "AssetApprovalKey",
|
||||
"value": "AssetApproval",
|
||||
"key2Hasher": "Blake2_128Concat"
|
||||
"nMap": {
|
||||
"keyVec": [
|
||||
"AssetId",
|
||||
"AccountId",
|
||||
"AccountId"
|
||||
],
|
||||
"hashers": [
|
||||
"Blake2_128Concat",
|
||||
"Blake2_128Concat",
|
||||
"Blake2_128Concat"
|
||||
],
|
||||
"value": "AssetApproval"
|
||||
}
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"documentation": [
|
||||
" Approved balance transfers. First balance is the amount approved for transfer. Second",
|
||||
" is the amount of `T::Currency` reserved for storing this."
|
||||
" is the amount of `T::Currency` reserved for storing this.",
|
||||
" First key is the asset ID, second key is the owner and third key is the delegate."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/rpc-core",
|
||||
"version": "4.10.1",
|
||||
"version": "4.11.1",
|
||||
"type": "module",
|
||||
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
|
||||
"main": "index.js",
|
||||
@@ -20,13 +20,13 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/metadata": "4.10.1",
|
||||
"@polkadot/rpc-provider": "4.10.1",
|
||||
"@polkadot/types": "4.10.1",
|
||||
"@polkadot/util": "^6.4.1",
|
||||
"@polkadot/x-rxjs": "^6.4.1"
|
||||
"@polkadot/metadata": "4.11.1",
|
||||
"@polkadot/rpc-provider": "4.11.1",
|
||||
"@polkadot/types": "4.11.1",
|
||||
"@polkadot/util": "^6.5.1",
|
||||
"@polkadot/x-rxjs": "^6.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^6.4.1"
|
||||
"@polkadot/keyring": "^6.5.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-core', version: '4.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-core', version: '4.11.1' };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/rpc-provider",
|
||||
"version": "4.10.1",
|
||||
"version": "4.11.1",
|
||||
"type": "module",
|
||||
"description": "Transport providers for the API",
|
||||
"main": "index.js",
|
||||
@@ -20,18 +20,18 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/types": "4.10.1",
|
||||
"@polkadot/util": "^6.4.1",
|
||||
"@polkadot/util-crypto": "^6.4.1",
|
||||
"@polkadot/x-fetch": "^6.4.1",
|
||||
"@polkadot/x-global": "^6.4.1",
|
||||
"@polkadot/x-ws": "^6.4.1",
|
||||
"@polkadot/types": "4.11.1",
|
||||
"@polkadot/util": "^6.5.1",
|
||||
"@polkadot/util-crypto": "^6.5.1",
|
||||
"@polkadot/x-fetch": "^6.5.1",
|
||||
"@polkadot/x-global": "^6.5.1",
|
||||
"@polkadot/x-ws": "^6.5.1",
|
||||
"bn.js": "^4.11.9",
|
||||
"eventemitter3": "^4.0.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^6.4.1",
|
||||
"@polkadot/metadata": "4.10.1",
|
||||
"@polkadot/keyring": "^6.5.1",
|
||||
"@polkadot/metadata": "4.11.1",
|
||||
"mock-socket": "^9.0.3",
|
||||
"nock": "^13.0.11"
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-provider', version: '4.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-provider', version: '4.11.1' };
|
||||
|
||||
@@ -178,8 +178,10 @@ export class WsProvider implements ProviderInterface {
|
||||
: new WebSocket(this.#endpoints[this.#endpointIndex], undefined, undefined, this.#headers, undefined, {
|
||||
// default: true
|
||||
fragmentOutgoingMessages: true,
|
||||
// default: 16K
|
||||
fragmentationThreshold: 256 * 1024
|
||||
// default: 16K (bump, the Node has issues with too many fragments, e.g. on setCode)
|
||||
fragmentationThreshold: 256 * 1024,
|
||||
// default: 8MB (however Polkadot api.query.staking.erasStakers.entries(356) is over that)
|
||||
maxReceivedMessageSize: 16 * 1024 * 1024
|
||||
});
|
||||
|
||||
this.#websocket.onclose = this.#onSocketClose;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/typegen",
|
||||
"version": "4.10.1",
|
||||
"version": "4.11.1",
|
||||
"type": "module",
|
||||
"description": "Type generation scripts",
|
||||
"main": "index.js",
|
||||
@@ -26,20 +26,20 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/typegen#readme",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.14.2",
|
||||
"@babel/core": "^7.14.3",
|
||||
"@babel/register": "^7.13.16",
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/api": "4.10.1",
|
||||
"@polkadot/metadata": "4.10.1",
|
||||
"@polkadot/rpc-provider": "4.10.1",
|
||||
"@polkadot/types": "4.10.1",
|
||||
"@polkadot/util": "^6.4.1",
|
||||
"@polkadot/api": "4.11.1",
|
||||
"@polkadot/metadata": "4.11.1",
|
||||
"@polkadot/rpc-provider": "4.11.1",
|
||||
"@polkadot/types": "4.11.1",
|
||||
"@polkadot/util": "^6.5.1",
|
||||
"handlebars": "^4.7.7",
|
||||
"websocket": "^1.0.34",
|
||||
"yargs": "^17.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/websocket": "^1.0.2",
|
||||
"@types/yargs": "^16.0.1"
|
||||
"@types/yargs": "^17.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,8 @@ async function run (ws: string): Promise<void> {
|
||||
api.runtimeMetadata.getUniqTypes(false);
|
||||
}
|
||||
|
||||
type ArgV = { ws: string };
|
||||
|
||||
export function main (): void {
|
||||
// retrieve and parse arguments - we do this globally, since this is a single command
|
||||
const { ws } = yargs
|
||||
@@ -38,7 +40,7 @@ export function main (): void {
|
||||
required: true,
|
||||
type: 'string'
|
||||
}
|
||||
}).argv;
|
||||
}).argv as ArgV;
|
||||
|
||||
run(ws)
|
||||
.then((): void => {
|
||||
|
||||
@@ -38,6 +38,8 @@ function generate (metaHex: string, pkg: string | undefined, output: string, isS
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
type ArgV = { endpoint: string; output: string; package?: string; strict?: boolean };
|
||||
|
||||
export function main (): void {
|
||||
const { endpoint, output, package: pkg, strict: isStrict } = yargs.strict().options({
|
||||
endpoint: {
|
||||
@@ -58,7 +60,7 @@ export function main (): void {
|
||||
description: 'Turns on strict mode, no output of catch-all generic versions',
|
||||
type: 'boolean'
|
||||
}
|
||||
}).argv;
|
||||
}).argv as ArgV;
|
||||
|
||||
if (endpoint.startsWith('wss://') || endpoint.startsWith('ws://')) {
|
||||
try {
|
||||
|
||||
@@ -9,6 +9,8 @@ import * as substrateDefs from '@polkadot/types/interfaces/definitions';
|
||||
import { generateInterfaceTypes } from './generate/interfaceRegistry';
|
||||
import { generateTsDef } from './generate/tsDef';
|
||||
|
||||
type ArgV = { input: string; package: string };
|
||||
|
||||
export function main (): void {
|
||||
const { input, package: pkg } = yargs.strict().options({
|
||||
input: {
|
||||
@@ -21,7 +23,7 @@ export function main (): void {
|
||||
required: true,
|
||||
type: 'string'
|
||||
}
|
||||
}).argv;
|
||||
}).argv as ArgV;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const userDefs = require(path.join(process.cwd(), input, 'definitions.ts')) as Record<string, any>;
|
||||
|
||||
@@ -58,7 +58,7 @@ function entrySignature (allDefs: Record<string, ModuleTypes>, registry: Registr
|
||||
|
||||
return [
|
||||
[formatType(allDefs, dm.key1.toString(), imports), formatType(allDefs, dm.key2.toString(), imports)].join(', '),
|
||||
`key1: ${key1Types}, key2: ${key2Types}`,
|
||||
`arg1: ${key1Types}, arg2: ${key2Types}`,
|
||||
formatType(allDefs, outputType, imports)
|
||||
];
|
||||
} else if (storageEntry.type.isNMap) {
|
||||
@@ -76,7 +76,7 @@ function entrySignature (allDefs: Record<string, ModuleTypes>, registry: Registr
|
||||
|
||||
return [
|
||||
nmap.keyVec.map((k) => formatType(allDefs, k.toString(), imports)).join(', '),
|
||||
keyTypes.map((t, i) => `key${i + 1}: ${t}`).join(', '),
|
||||
keyTypes.map((t, i) => `arg${i + 1}: ${t}`).join(', '),
|
||||
formatType(allDefs, outputType, imports)
|
||||
];
|
||||
}
|
||||
@@ -104,16 +104,11 @@ function generateForMeta (registry: Registry, meta: Metadata, dest: string, extr
|
||||
.sort(compareName)
|
||||
.map((storageEntry) => {
|
||||
const [args, params, returnType] = entrySignature(allDefs, registry, storageEntry, imports);
|
||||
let entryType = 'AugmentedQuery';
|
||||
|
||||
if (storageEntry.type.isDoubleMap) {
|
||||
entryType = `${entryType}DoubleMap`;
|
||||
}
|
||||
|
||||
return {
|
||||
args,
|
||||
docs: storageEntry.documentation,
|
||||
entryType,
|
||||
entryType: 'AugmentedQuery',
|
||||
name: stringCamelCase(storageEntry.name),
|
||||
params,
|
||||
returnType
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/typegen', version: '4.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/typegen', version: '4.11.1' };
|
||||
|
||||
@@ -6,13 +6,16 @@ declare module '@polkadot/api/types/consts' {
|
||||
export interface AugmentedConsts<ApiType> {
|
||||
{{#each modules}}
|
||||
{{{name}}}: {
|
||||
{{#unless @root.isStrict}}
|
||||
[key: string]: Codec;
|
||||
{{/unless}}
|
||||
{{~#each items}}
|
||||
{{#each items}}
|
||||
{{> docs}}
|
||||
{{{name}}}: {{{type}}} & AugmentedConst<ApiType>;
|
||||
{{/each}}
|
||||
{{#unless @root.isStrict}}
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
{{/unless}}
|
||||
};
|
||||
{{/each}}
|
||||
}
|
||||
|
||||
@@ -6,13 +6,16 @@ declare module '@polkadot/api/types/errors' {
|
||||
export interface AugmentedErrors<ApiType> {
|
||||
{{#each modules}}
|
||||
{{{name}}}: {
|
||||
{{#unless @root.isStrict}}
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
{{/unless}}
|
||||
{{~#each items}}
|
||||
{{#each items}}
|
||||
{{> docs}}
|
||||
{{{name}}}: AugmentedError<ApiType>;
|
||||
{{/each}}
|
||||
{{#unless @root.isStrict}}
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
{{/unless}}
|
||||
};
|
||||
{{/each}}
|
||||
}
|
||||
|
||||
@@ -6,13 +6,16 @@ declare module '@polkadot/api/types/events' {
|
||||
export interface AugmentedEvents<ApiType> {
|
||||
{{#each modules}}
|
||||
{{{name}}}: {
|
||||
{{#unless @root.isStrict}}
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
{{/unless}}
|
||||
{{~#each items}}
|
||||
{{#each items}}
|
||||
{{> docs}}
|
||||
{{{name}}}: AugmentedEvent<ApiType, [{{{type}}}]>;
|
||||
{{/each}}
|
||||
{{#unless @root.isStrict}}
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
{{/unless}}
|
||||
};
|
||||
{{/each}}
|
||||
}
|
||||
|
||||
@@ -6,13 +6,16 @@ declare module '@polkadot/api/types/storage' {
|
||||
export interface AugmentedQueries<ApiType> {
|
||||
{{#each modules}}
|
||||
{{{name}}}: {
|
||||
{{#unless @root.isStrict}}
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
{{/unless}}
|
||||
{{~#each items}}
|
||||
{{#each items}}
|
||||
{{> docs}}
|
||||
{{{name}}}: {{{entryType}}}<ApiType, ({{{params}}}) => Observable<{{{returnType}}}>, [{{{args}}}]>{{#unless @root.isStrict}} & QueryableStorageEntry<ApiType, [{{{args}}}]>{{/unless}};
|
||||
{{/each}}
|
||||
{{#unless @root.isStrict}}
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
{{/unless}}
|
||||
};
|
||||
{{/each}}
|
||||
}
|
||||
|
||||
@@ -6,13 +6,16 @@ declare module '@polkadot/api/types/submittable' {
|
||||
export interface AugmentedSubmittables<ApiType> {
|
||||
{{#each modules}}
|
||||
{{{name}}}: {
|
||||
{{#unless @root.isStrict}}
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
{{/unless}}
|
||||
{{~#each items}}
|
||||
{{#each items}}
|
||||
{{> docs}}
|
||||
{{{name}}}: AugmentedSubmittable<({{{params}}}) => SubmittableExtrinsic<ApiType>, [{{{args}}}]>;
|
||||
{{/each}}
|
||||
{{#unless @root.isStrict}}
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
{{/unless}}
|
||||
};
|
||||
{{/each}}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/types-known",
|
||||
"version": "4.10.1",
|
||||
"version": "4.11.1",
|
||||
"type": "module",
|
||||
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
|
||||
"main": "index.js",
|
||||
@@ -20,9 +20,9 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-known#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/networks": "^6.4.1",
|
||||
"@polkadot/types": "4.10.1",
|
||||
"@polkadot/util": "^6.4.1",
|
||||
"@polkadot/networks": "^6.5.1",
|
||||
"@polkadot/types": "4.11.1",
|
||||
"@polkadot/util": "^6.5.1",
|
||||
"bn.js": "^4.11.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-known', version: '4.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/types-known', version: '4.11.1' };
|
||||
|
||||
@@ -9,6 +9,7 @@ import node from './node';
|
||||
import nodeTemplate from './node-template';
|
||||
import polkadot from './polkadot';
|
||||
import rococo from './rococo';
|
||||
import shell from './shell';
|
||||
import statemint from './statemint';
|
||||
import westend from './westend';
|
||||
|
||||
@@ -20,6 +21,8 @@ const typesSpec: Record<string, OverrideVersionedType[]> = {
|
||||
'node-template': nodeTemplate,
|
||||
polkadot,
|
||||
rococo,
|
||||
shell,
|
||||
statemine: statemint,
|
||||
statemint,
|
||||
westend
|
||||
};
|
||||
|
||||
@@ -20,39 +20,25 @@ const versioned: OverrideVersionedType[] = [
|
||||
...sharedTypes,
|
||||
AccountInfo: 'AccountInfoWithDualRefCount',
|
||||
Address: 'AccountId',
|
||||
CompactAssignments: 'CompactAssignmentsWith16',
|
||||
LookupSource: 'AccountId',
|
||||
RawSolution: 'RawSolutionWith16'
|
||||
LookupSource: 'AccountId'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [201, 214],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
AccountInfo: 'AccountInfoWithDualRefCount',
|
||||
CompactAssignments: 'CompactAssignmentsWith16',
|
||||
RawSolution: 'RawSolutionWith16'
|
||||
AccountInfo: 'AccountInfoWithDualRefCount'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [215, 228],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
CompactAssignments: 'CompactAssignmentsWith16',
|
||||
Keys: 'SessionKeys6',
|
||||
RawSolution: 'RawSolutionWith16'
|
||||
Keys: 'SessionKeys6'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [229, 9000],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
CompactAssignments: 'CompactAssignmentsWith16',
|
||||
RawSolution: 'RawSolutionWith16'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [9010, undefined],
|
||||
minmax: [229, undefined],
|
||||
types: {
|
||||
...sharedTypes
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
// Copyright 2017-2021 @polkadot/types-known authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { OverrideVersionedType } from '@polkadot/types/types';
|
||||
|
||||
const versioned: OverrideVersionedType[] = [
|
||||
{
|
||||
minmax: [0, undefined],
|
||||
types: {
|
||||
// nothing, limited runtime
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
export default versioned;
|
||||
@@ -6,6 +6,10 @@
|
||||
import type { OverrideVersionedType } from '@polkadot/types/types';
|
||||
|
||||
const sharedTypes = {
|
||||
// 16 validators
|
||||
CompactAssignments: 'CompactAssignmentsWith16',
|
||||
RawSolution: 'RawSolutionWith16',
|
||||
// general
|
||||
Keys: 'SessionKeys6',
|
||||
ProxyType: {
|
||||
_enum: ['Any', 'NonTransfer', 'Staking', 'SudoBalances', 'IdentityJudgement', 'CancelProxy']
|
||||
@@ -73,21 +77,11 @@ const versioned: OverrideVersionedType[] = [
|
||||
minmax: [48, 49],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
AccountInfo: 'AccountInfoWithDualRefCount',
|
||||
CompactAssignments: 'CompactAssignmentsWith16',
|
||||
RawSolution: 'RawSolutionWith16'
|
||||
AccountInfo: 'AccountInfoWithDualRefCount'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [50, 9000],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
CompactAssignments: 'CompactAssignmentsWith16',
|
||||
RawSolution: 'RawSolutionWith16'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [9010, undefined],
|
||||
minmax: [50, undefined],
|
||||
types: {
|
||||
...sharedTypes
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/types",
|
||||
"version": "4.10.1",
|
||||
"version": "4.11.1",
|
||||
"type": "module",
|
||||
"description": "Implementation of the Parity codec",
|
||||
"main": "index.js",
|
||||
@@ -20,14 +20,14 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/metadata": "4.10.1",
|
||||
"@polkadot/util": "^6.4.1",
|
||||
"@polkadot/util-crypto": "^6.4.1",
|
||||
"@polkadot/x-rxjs": "^6.4.1",
|
||||
"@polkadot/metadata": "4.11.1",
|
||||
"@polkadot/util": "^6.5.1",
|
||||
"@polkadot/util-crypto": "^6.5.1",
|
||||
"@polkadot/x-rxjs": "^6.5.1",
|
||||
"@types/bn.js": "^4.11.6",
|
||||
"bn.js": "^4.11.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^6.4.1"
|
||||
"@polkadot/keyring": "^6.5.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ 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 { AccountData, BalanceLock, BalanceLockTo212, BalanceStatus, Reasons, VestingSchedule, WithdrawReasons } from '@polkadot/types/interfaces/balances';
|
||||
import type { BeefyCommitment, BeefyNextAuthoritySet, BeefyPayload, BeefySignedCommitment, MmrRootHash, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
|
||||
import type { BridgedBlockHash, BridgedBlockNumber, BridgedHeader, InitializationData } from '@polkadot/types/interfaces/bridges';
|
||||
import type { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||
import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
|
||||
import type { EthereumAddress, StatementKind } from '@polkadot/types/interfaces/claims';
|
||||
@@ -27,7 +28,7 @@ import type { EvmAccount, EvmLog, EvmVicinity, ExitError, ExitFatal, ExitReason,
|
||||
import type { AnySignature, EcdsaSignature, Ed25519Signature, 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';
|
||||
import type { AuthorityIndex, AuthorityList, AuthorityWeight, EncodedFinalityProofs, GrandpaEquivocation, GrandpaEquivocationProof, GrandpaEquivocationValue, GrandpaPrevote, JustificationNotification, KeyOwnerProof, NextAuthority, PendingPause, PendingResume, Precommits, Prevotes, ReportedRoundStates, RoundState, SetId, StoredPendingChange, StoredState } from '@polkadot/types/interfaces/grandpa';
|
||||
import type { AuthorityIndex, AuthorityList, AuthoritySet, AuthoritySetChange, AuthoritySetChanges, AuthorityWeight, DelayKind, DelayKindBest, EncodedFinalityProofs, ForkTreePendingChange, ForkTreePendingChangeNode, GrandpaCommit, GrandpaEquivocation, GrandpaEquivocationProof, GrandpaEquivocationValue, GrandpaJustification, GrandpaPrecommit, GrandpaPrevote, GrandpaSignedPrecommit, JustificationNotification, KeyOwnerProof, NextAuthority, PendingChange, PendingPause, PendingResume, Precommits, Prevotes, ReportedRoundStates, RoundState, SetId, StoredPendingChange, StoredState } from '@polkadot/types/interfaces/grandpa';
|
||||
import type { IdentityFields, IdentityInfo, IdentityInfoAdditional, IdentityJudgement, RegistrarIndex, RegistrarInfo, Registration, RegistrationJudgement } 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';
|
||||
@@ -53,6 +54,7 @@ import type { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support'
|
||||
import type { AccountInfo, AccountInfoWithDualRefCount, AccountInfoWithProviders, AccountInfoWithRefCount, AccountInfoWithTripleRefCount, ApplyExtrinsicResult, ArithmeticError, BlockLength, BlockWeights, ChainProperties, ChainType, ConsumedWeight, DigestOf, DispatchClass, DispatchError, DispatchErrorModule, 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, 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 { 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';
|
||||
import type { AccountId32Junction, AccountIndex64Junction, AccountKey20Junction, AssetInstance, BodyId, BodyPart, BodyPartAtLeastProportion, BodyPartFraction, BodyPartMoreThanProportion, DoubleEncodedCall, InboundStatus, Junction, MultiAsset, MultiAssetAbstractFungible, MultiAssetAbstractNonFungible, MultiAssetConcreteFungible, MultiAssetConcreteNonFungible, MultiLocation, NetworkId, OutboundStatus, Outcome, PluralityJunction, QueueConfigData, VersionedMultiAsset, VersionedMultiLocation, VersionedXcm, Xcm, XcmAssetEffects, XcmError, XcmHrmpChannelAccepted, XcmHrmpChannelClosing, XcmHrmpNewChannelOpenRequest, XcmOrder, XcmOrderBuyExecution, XcmOrderDepositAsset, XcmOrderDepositReserveAsset, XcmOrderExchangeAsset, XcmOrderInitiateReserveWithdraw, XcmOrderInitiateTeleport, XcmOrderQueryHolding, XcmOriginKind, XcmQueryResponse, XcmRelayedFrom, XcmReserveAssetDeposit, XcmResponse, XcmTeleportAsset, XcmTransact, XcmTransferAsset, XcmTransferReserveAsset, XcmWithdrawAsset, XcmpMessageFormat } from '@polkadot/types/interfaces/xcm';
|
||||
@@ -74,8 +76,12 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Compact<BalanceOf>': Compact<BalanceOf>;
|
||||
'Compact<BlockNumber>': Compact<BlockNumber>;
|
||||
'Compact<BountyIndex>': Compact<BountyIndex>;
|
||||
'Compact<BridgedBlockNumber>': Compact<BridgedBlockNumber>;
|
||||
'Compact<ClassId>': Compact<ClassId>;
|
||||
'Compact<ContractDiscriminant>': Compact<ContractDiscriminant>;
|
||||
'Compact<CoreIndex>': Compact<CoreIndex>;
|
||||
'Compact<DepositBalance>': Compact<DepositBalance>;
|
||||
'Compact<DepositBalanceOf>': Compact<DepositBalanceOf>;
|
||||
'Compact<EraIndex>': Compact<EraIndex>;
|
||||
'Compact<EventIndex>': Compact<EventIndex>;
|
||||
'Compact<ExtendedBalance>': Compact<ExtendedBalance>;
|
||||
@@ -85,6 +91,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Compact<Gas>': Compact<Gas>;
|
||||
'Compact<GroupIndex>': Compact<GroupIndex>;
|
||||
'Compact<Index>': Compact<Index>;
|
||||
'Compact<InstanceId>': Compact<InstanceId>;
|
||||
'Compact<KeyTypeId>': Compact<KeyTypeId>;
|
||||
'Compact<LeasePeriod>': Compact<LeasePeriod>;
|
||||
'Compact<LeasePeriodOf>': Compact<LeasePeriodOf>;
|
||||
@@ -200,6 +207,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<AuthorityId>': Option<AuthorityId>;
|
||||
'Option<AuthorityIndex>': Option<AuthorityIndex>;
|
||||
'Option<AuthorityList>': Option<AuthorityList>;
|
||||
'Option<AuthoritySet>': Option<AuthoritySet>;
|
||||
'Option<AuthoritySetChange>': Option<AuthoritySetChange>;
|
||||
'Option<AuthoritySetChanges>': Option<AuthoritySetChanges>;
|
||||
'Option<AuthoritySignature>': Option<AuthoritySignature>;
|
||||
'Option<AuthorityWeight>': Option<AuthorityWeight>;
|
||||
'Option<AvailabilityBitfield>': Option<AvailabilityBitfield>;
|
||||
@@ -247,6 +257,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<BountyStatusActive>': Option<BountyStatusActive>;
|
||||
'Option<BountyStatusCuratorProposed>': Option<BountyStatusCuratorProposed>;
|
||||
'Option<BountyStatusPendingPayout>': Option<BountyStatusPendingPayout>;
|
||||
'Option<BridgedBlockHash>': Option<BridgedBlockHash>;
|
||||
'Option<BridgedBlockNumber>': Option<BridgedBlockNumber>;
|
||||
'Option<BridgedHeader>': Option<BridgedHeader>;
|
||||
'Option<BufferedSessionChange>': Option<BufferedSessionChange>;
|
||||
'Option<Bytes>': Option<Bytes>;
|
||||
'Option<Call>': Option<Call>;
|
||||
@@ -262,6 +275,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<ChainType>': Option<ChainType>;
|
||||
'Option<ChangesTrieConfiguration>': Option<ChangesTrieConfiguration>;
|
||||
'Option<ChangesTrieSignal>': Option<ChangesTrieSignal>;
|
||||
'Option<ClassDetails>': Option<ClassDetails>;
|
||||
'Option<ClassId>': Option<ClassId>;
|
||||
'Option<ClassMetadata>': Option<ClassMetadata>;
|
||||
'Option<CodecHash>': Option<CodecHash>;
|
||||
'Option<CodeHash>': Option<CodeHash>;
|
||||
'Option<CollatorId>': Option<CollatorId>;
|
||||
@@ -323,8 +339,13 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<Data>': Option<Data>;
|
||||
'Option<DeferredOffenceOf>': Option<DeferredOffenceOf>;
|
||||
'Option<DefunctVoter>': Option<DefunctVoter>;
|
||||
'Option<DelayKind>': Option<DelayKind>;
|
||||
'Option<DelayKindBest>': Option<DelayKindBest>;
|
||||
'Option<Delegations>': Option<Delegations>;
|
||||
'Option<DeletedContract>': Option<DeletedContract>;
|
||||
'Option<DepositBalance>': Option<DepositBalance>;
|
||||
'Option<DepositBalanceOf>': Option<DepositBalanceOf>;
|
||||
'Option<DestroyWitness>': Option<DestroyWitness>;
|
||||
'Option<Digest>': Option<Digest>;
|
||||
'Option<DigestItem>': Option<DigestItem>;
|
||||
'Option<DigestOf>': Option<DigestOf>;
|
||||
@@ -450,6 +471,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<FixedU128>': Option<FixedU128>;
|
||||
'Option<FixedU64>': Option<FixedU64>;
|
||||
'Option<Forcing>': Option<Forcing>;
|
||||
'Option<ForkTreePendingChange>': Option<ForkTreePendingChange>;
|
||||
'Option<ForkTreePendingChangeNode>': Option<ForkTreePendingChangeNode>;
|
||||
'Option<FullIdentification>': Option<FullIdentification>;
|
||||
'Option<FunctionArgumentMetadataLatest>': Option<FunctionArgumentMetadataLatest>;
|
||||
'Option<FunctionArgumentMetadataV10>': Option<FunctionArgumentMetadataV10>;
|
||||
@@ -469,10 +492,14 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<GiltBid>': Option<GiltBid>;
|
||||
'Option<GlobalValidationData>': Option<GlobalValidationData>;
|
||||
'Option<GlobalValidationSchedule>': Option<GlobalValidationSchedule>;
|
||||
'Option<GrandpaCommit>': Option<GrandpaCommit>;
|
||||
'Option<GrandpaEquivocation>': Option<GrandpaEquivocation>;
|
||||
'Option<GrandpaEquivocationProof>': Option<GrandpaEquivocationProof>;
|
||||
'Option<GrandpaEquivocationValue>': Option<GrandpaEquivocationValue>;
|
||||
'Option<GrandpaJustification>': Option<GrandpaJustification>;
|
||||
'Option<GrandpaPrecommit>': Option<GrandpaPrecommit>;
|
||||
'Option<GrandpaPrevote>': Option<GrandpaPrevote>;
|
||||
'Option<GrandpaSignedPrecommit>': Option<GrandpaSignedPrecommit>;
|
||||
'Option<GroupIndex>': Option<GroupIndex>;
|
||||
'Option<H1024>': Option<H1024>;
|
||||
'Option<H128>': Option<H128>;
|
||||
@@ -527,6 +554,10 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<Index>': Option<Index>;
|
||||
'Option<IndicesLookupSource>': Option<IndicesLookupSource>;
|
||||
'Option<IndividualExposure>': Option<IndividualExposure>;
|
||||
'Option<InitializationData>': Option<InitializationData>;
|
||||
'Option<InstanceDetails>': Option<InstanceDetails>;
|
||||
'Option<InstanceId>': Option<InstanceId>;
|
||||
'Option<InstanceMetadata>': Option<InstanceMetadata>;
|
||||
'Option<InstantiateRequest>': Option<InstantiateRequest>;
|
||||
'Option<InstantiateReturnValue>': Option<InstantiateReturnValue>;
|
||||
'Option<InstructionWeights>': Option<InstructionWeights>;
|
||||
@@ -670,6 +701,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<PeerEndpointAddr>': Option<PeerEndpointAddr>;
|
||||
'Option<PeerInfo>': Option<PeerInfo>;
|
||||
'Option<PeerPing>': Option<PeerPing>;
|
||||
'Option<PendingChange>': Option<PendingChange>;
|
||||
'Option<PendingPause>': Option<PendingPause>;
|
||||
'Option<PendingResume>': Option<PendingResume>;
|
||||
'Option<Perbill>': Option<Perbill>;
|
||||
@@ -1043,6 +1075,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<AuthorityId>': Vec<AuthorityId>;
|
||||
'Vec<AuthorityIndex>': Vec<AuthorityIndex>;
|
||||
'Vec<AuthorityList>': Vec<AuthorityList>;
|
||||
'Vec<AuthoritySet>': Vec<AuthoritySet>;
|
||||
'Vec<AuthoritySetChange>': Vec<AuthoritySetChange>;
|
||||
'Vec<AuthoritySetChanges>': Vec<AuthoritySetChanges>;
|
||||
'Vec<AuthoritySignature>': Vec<AuthoritySignature>;
|
||||
'Vec<AuthorityWeight>': Vec<AuthorityWeight>;
|
||||
'Vec<AvailabilityBitfield>': Vec<AvailabilityBitfield>;
|
||||
@@ -1090,6 +1125,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<BountyStatusActive>': Vec<BountyStatusActive>;
|
||||
'Vec<BountyStatusCuratorProposed>': Vec<BountyStatusCuratorProposed>;
|
||||
'Vec<BountyStatusPendingPayout>': Vec<BountyStatusPendingPayout>;
|
||||
'Vec<BridgedBlockHash>': Vec<BridgedBlockHash>;
|
||||
'Vec<BridgedBlockNumber>': Vec<BridgedBlockNumber>;
|
||||
'Vec<BridgedHeader>': Vec<BridgedHeader>;
|
||||
'Vec<BufferedSessionChange>': Vec<BufferedSessionChange>;
|
||||
'Vec<Bytes>': Vec<Bytes>;
|
||||
'Vec<Call>': Vec<Call>;
|
||||
@@ -1105,6 +1143,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<ChainType>': Vec<ChainType>;
|
||||
'Vec<ChangesTrieConfiguration>': Vec<ChangesTrieConfiguration>;
|
||||
'Vec<ChangesTrieSignal>': Vec<ChangesTrieSignal>;
|
||||
'Vec<ClassDetails>': Vec<ClassDetails>;
|
||||
'Vec<ClassId>': Vec<ClassId>;
|
||||
'Vec<ClassMetadata>': Vec<ClassMetadata>;
|
||||
'Vec<CodecHash>': Vec<CodecHash>;
|
||||
'Vec<CodeHash>': Vec<CodeHash>;
|
||||
'Vec<CollatorId>': Vec<CollatorId>;
|
||||
@@ -1166,8 +1207,13 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<Data>': Vec<Data>;
|
||||
'Vec<DeferredOffenceOf>': Vec<DeferredOffenceOf>;
|
||||
'Vec<DefunctVoter>': Vec<DefunctVoter>;
|
||||
'Vec<DelayKind>': Vec<DelayKind>;
|
||||
'Vec<DelayKindBest>': Vec<DelayKindBest>;
|
||||
'Vec<Delegations>': Vec<Delegations>;
|
||||
'Vec<DeletedContract>': Vec<DeletedContract>;
|
||||
'Vec<DepositBalance>': Vec<DepositBalance>;
|
||||
'Vec<DepositBalanceOf>': Vec<DepositBalanceOf>;
|
||||
'Vec<DestroyWitness>': Vec<DestroyWitness>;
|
||||
'Vec<Digest>': Vec<Digest>;
|
||||
'Vec<DigestItem>': Vec<DigestItem>;
|
||||
'Vec<DigestOf>': Vec<DigestOf>;
|
||||
@@ -1293,6 +1339,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<FixedU128>': Vec<FixedU128>;
|
||||
'Vec<FixedU64>': Vec<FixedU64>;
|
||||
'Vec<Forcing>': Vec<Forcing>;
|
||||
'Vec<ForkTreePendingChange>': Vec<ForkTreePendingChange>;
|
||||
'Vec<ForkTreePendingChangeNode>': Vec<ForkTreePendingChangeNode>;
|
||||
'Vec<FullIdentification>': Vec<FullIdentification>;
|
||||
'Vec<FunctionArgumentMetadataLatest>': Vec<FunctionArgumentMetadataLatest>;
|
||||
'Vec<FunctionArgumentMetadataV10>': Vec<FunctionArgumentMetadataV10>;
|
||||
@@ -1312,10 +1360,14 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<GiltBid>': Vec<GiltBid>;
|
||||
'Vec<GlobalValidationData>': Vec<GlobalValidationData>;
|
||||
'Vec<GlobalValidationSchedule>': Vec<GlobalValidationSchedule>;
|
||||
'Vec<GrandpaCommit>': Vec<GrandpaCommit>;
|
||||
'Vec<GrandpaEquivocation>': Vec<GrandpaEquivocation>;
|
||||
'Vec<GrandpaEquivocationProof>': Vec<GrandpaEquivocationProof>;
|
||||
'Vec<GrandpaEquivocationValue>': Vec<GrandpaEquivocationValue>;
|
||||
'Vec<GrandpaJustification>': Vec<GrandpaJustification>;
|
||||
'Vec<GrandpaPrecommit>': Vec<GrandpaPrecommit>;
|
||||
'Vec<GrandpaPrevote>': Vec<GrandpaPrevote>;
|
||||
'Vec<GrandpaSignedPrecommit>': Vec<GrandpaSignedPrecommit>;
|
||||
'Vec<GroupIndex>': Vec<GroupIndex>;
|
||||
'Vec<H1024>': Vec<H1024>;
|
||||
'Vec<H128>': Vec<H128>;
|
||||
@@ -1370,6 +1422,10 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<Index>': Vec<Index>;
|
||||
'Vec<IndicesLookupSource>': Vec<IndicesLookupSource>;
|
||||
'Vec<IndividualExposure>': Vec<IndividualExposure>;
|
||||
'Vec<InitializationData>': Vec<InitializationData>;
|
||||
'Vec<InstanceDetails>': Vec<InstanceDetails>;
|
||||
'Vec<InstanceId>': Vec<InstanceId>;
|
||||
'Vec<InstanceMetadata>': Vec<InstanceMetadata>;
|
||||
'Vec<InstantiateRequest>': Vec<InstantiateRequest>;
|
||||
'Vec<InstantiateReturnValue>': Vec<InstantiateReturnValue>;
|
||||
'Vec<InstructionWeights>': Vec<InstructionWeights>;
|
||||
@@ -1513,6 +1569,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<PeerEndpointAddr>': Vec<PeerEndpointAddr>;
|
||||
'Vec<PeerInfo>': Vec<PeerInfo>;
|
||||
'Vec<PeerPing>': Vec<PeerPing>;
|
||||
'Vec<PendingChange>': Vec<PendingChange>;
|
||||
'Vec<PendingPause>': Vec<PendingPause>;
|
||||
'Vec<PendingResume>': Vec<PendingResume>;
|
||||
'Vec<Perbill>': Vec<Perbill>;
|
||||
@@ -1886,6 +1943,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
AuthorityId: AuthorityId;
|
||||
AuthorityIndex: AuthorityIndex;
|
||||
AuthorityList: AuthorityList;
|
||||
AuthoritySet: AuthoritySet;
|
||||
AuthoritySetChange: AuthoritySetChange;
|
||||
AuthoritySetChanges: AuthoritySetChanges;
|
||||
AuthoritySignature: AuthoritySignature;
|
||||
AuthorityWeight: AuthorityWeight;
|
||||
AvailabilityBitfield: AvailabilityBitfield;
|
||||
@@ -1933,6 +1993,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
BountyStatusActive: BountyStatusActive;
|
||||
BountyStatusCuratorProposed: BountyStatusCuratorProposed;
|
||||
BountyStatusPendingPayout: BountyStatusPendingPayout;
|
||||
BridgedBlockHash: BridgedBlockHash;
|
||||
BridgedBlockNumber: BridgedBlockNumber;
|
||||
BridgedHeader: BridgedHeader;
|
||||
BufferedSessionChange: BufferedSessionChange;
|
||||
Bytes: Bytes;
|
||||
Call: Call;
|
||||
@@ -1948,6 +2011,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
ChainType: ChainType;
|
||||
ChangesTrieConfiguration: ChangesTrieConfiguration;
|
||||
ChangesTrieSignal: ChangesTrieSignal;
|
||||
ClassDetails: ClassDetails;
|
||||
ClassId: ClassId;
|
||||
ClassMetadata: ClassMetadata;
|
||||
CodecHash: CodecHash;
|
||||
CodeHash: CodeHash;
|
||||
CollatorId: CollatorId;
|
||||
@@ -2009,8 +2075,13 @@ declare module '@polkadot/types/types/registry' {
|
||||
Data: Data;
|
||||
DeferredOffenceOf: DeferredOffenceOf;
|
||||
DefunctVoter: DefunctVoter;
|
||||
DelayKind: DelayKind;
|
||||
DelayKindBest: DelayKindBest;
|
||||
Delegations: Delegations;
|
||||
DeletedContract: DeletedContract;
|
||||
DepositBalance: DepositBalance;
|
||||
DepositBalanceOf: DepositBalanceOf;
|
||||
DestroyWitness: DestroyWitness;
|
||||
Digest: Digest;
|
||||
DigestItem: DigestItem;
|
||||
DigestOf: DigestOf;
|
||||
@@ -2136,6 +2207,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
FixedU128: FixedU128;
|
||||
FixedU64: FixedU64;
|
||||
Forcing: Forcing;
|
||||
ForkTreePendingChange: ForkTreePendingChange;
|
||||
ForkTreePendingChangeNode: ForkTreePendingChangeNode;
|
||||
FullIdentification: FullIdentification;
|
||||
FunctionArgumentMetadataLatest: FunctionArgumentMetadataLatest;
|
||||
FunctionArgumentMetadataV10: FunctionArgumentMetadataV10;
|
||||
@@ -2155,10 +2228,14 @@ declare module '@polkadot/types/types/registry' {
|
||||
GiltBid: GiltBid;
|
||||
GlobalValidationData: GlobalValidationData;
|
||||
GlobalValidationSchedule: GlobalValidationSchedule;
|
||||
GrandpaCommit: GrandpaCommit;
|
||||
GrandpaEquivocation: GrandpaEquivocation;
|
||||
GrandpaEquivocationProof: GrandpaEquivocationProof;
|
||||
GrandpaEquivocationValue: GrandpaEquivocationValue;
|
||||
GrandpaJustification: GrandpaJustification;
|
||||
GrandpaPrecommit: GrandpaPrecommit;
|
||||
GrandpaPrevote: GrandpaPrevote;
|
||||
GrandpaSignedPrecommit: GrandpaSignedPrecommit;
|
||||
GroupIndex: GroupIndex;
|
||||
H1024: H1024;
|
||||
H128: H128;
|
||||
@@ -2213,6 +2290,10 @@ declare module '@polkadot/types/types/registry' {
|
||||
Index: Index;
|
||||
IndicesLookupSource: IndicesLookupSource;
|
||||
IndividualExposure: IndividualExposure;
|
||||
InitializationData: InitializationData;
|
||||
InstanceDetails: InstanceDetails;
|
||||
InstanceId: InstanceId;
|
||||
InstanceMetadata: InstanceMetadata;
|
||||
InstantiateRequest: InstantiateRequest;
|
||||
InstantiateReturnValue: InstantiateReturnValue;
|
||||
InstructionWeights: InstructionWeights;
|
||||
@@ -2356,6 +2437,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
PeerEndpointAddr: PeerEndpointAddr;
|
||||
PeerInfo: PeerInfo;
|
||||
PeerPing: PeerPing;
|
||||
PendingChange: PendingChange;
|
||||
PendingPause: PendingPause;
|
||||
PendingResume: PendingResume;
|
||||
Perbill: Perbill;
|
||||
|
||||
@@ -99,12 +99,13 @@ function decodeStructFromObject <T> (registry: Registry, Types: ConstructorDef,
|
||||
*/
|
||||
function decodeStruct <T> (registry: Registry, Types: ConstructorDef, value: unknown, jsonMap: Map<any, string>): T {
|
||||
if (isHex(value)) {
|
||||
return decodeStruct(registry, Types, hexToU8a(value as string), jsonMap);
|
||||
return decodeStruct(registry, Types, hexToU8a(value.toString()), jsonMap);
|
||||
} else if (isU8a(value)) {
|
||||
const values = decodeU8a(registry, value, Object.values(Types));
|
||||
const keys = Object.keys(Types);
|
||||
const values = decodeU8a(registry, value, Object.values(Types), keys);
|
||||
|
||||
// Transform array of values to {key: value} mapping
|
||||
return Object.keys(Types).reduce((raw, key, index): T => {
|
||||
return keys.reduce((raw, key, index): T => {
|
||||
// TS2322: Type 'Codec' is not assignable to type 'T[keyof S]'.
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||
(raw as any)[key] = values[index];
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
import type { Codec, Constructor, Registry } from '../../types';
|
||||
|
||||
import { u8aToHex } from '@polkadot/util';
|
||||
|
||||
/**
|
||||
* Given an u8a, and an array of Type constructors, decode the u8a against the
|
||||
* types, and return an array of decoded values.
|
||||
@@ -10,18 +12,32 @@ import type { Codec, Constructor, Registry } from '../../types';
|
||||
* @param u8a - The u8a to decode.
|
||||
* @param types - The array of Constructor to decode the U8a against.
|
||||
*/
|
||||
export function decodeU8a (registry: Registry, u8a: Uint8Array, _types: Constructor[] | { [index: string]: Constructor }): Codec[] {
|
||||
const types = Array.isArray(_types)
|
||||
? _types
|
||||
: Object.values(_types);
|
||||
export function decodeU8a (registry: Registry, u8a: Uint8Array, _types: Constructor[] | { [index: string]: Constructor }, _keys?: string[]): Codec[] {
|
||||
const [types, keys]: [Constructor<Codec>[], string[]] = Array.isArray(_types)
|
||||
? [_types, _keys || []]
|
||||
: [Object.values(_types), Object.keys(_types)];
|
||||
const result: Codec[] = [];
|
||||
let offset = 0;
|
||||
|
||||
for (let i = 0; i < types.length; i++) {
|
||||
const value = new types[i](registry, u8a.subarray(offset));
|
||||
const Type = types[i];
|
||||
|
||||
result.push(value);
|
||||
offset += value.encodedLength;
|
||||
try {
|
||||
const value = new Type(registry, u8a.subarray(offset));
|
||||
|
||||
result.push(value);
|
||||
offset += value.encodedLength;
|
||||
} catch (error) {
|
||||
let rawType: string;
|
||||
|
||||
try {
|
||||
rawType = new Type(registry).toRawType();
|
||||
} catch {
|
||||
rawType = '';
|
||||
}
|
||||
|
||||
throw new Error(`decodeU8a: failed at ${u8aToHex(u8a.subarray(offset).slice(0, 8))}… on ${keys[i] ? `${keys[i]}` : ''}${rawType ? `: ${rawType}` : ''}:: ${(error as Error).message}`);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
@@ -32,6 +32,7 @@ const mappings: Mapper[] = [
|
||||
// alias Vec<u8> -> Bytes
|
||||
alias('Vec<u8>', 'Bytes'),
|
||||
alias('&\\[u8\\]', 'Bytes'),
|
||||
alias("&'static\\[u8\\]", 'Bytes'),
|
||||
// alias RawAddress -> Address
|
||||
alias('RawAddress', 'Address'),
|
||||
// lookups, mapped to Address/AccountId as appropriate in runtime
|
||||
|
||||
@@ -4,13 +4,18 @@
|
||||
import type { ExtDef, ExtInfo, ExtTypes } from './types';
|
||||
|
||||
import { polkadot } from './polkadot';
|
||||
import { shell } from './shell';
|
||||
import { substrate } from './substrate';
|
||||
|
||||
// A mapping of the known signed extensions to the extra fields that they contain. Unlike in the actual extensions,
|
||||
// we define the extra fields not as a Tuple, but rather as a struct so they can be named. These will be expanded
|
||||
// into the various fields when added to the payload (we only support V4 onwards with these, V3 and earlier are
|
||||
// deemed fixed and non-changeable)
|
||||
const allExtensions: ExtDef = { ...substrate, ...polkadot };
|
||||
const allExtensions: ExtDef = {
|
||||
...substrate,
|
||||
...shell,
|
||||
...polkadot
|
||||
};
|
||||
|
||||
// the v4 signed extensions (the order is important here, as applied by default)
|
||||
const defaultExtensions: Array<keyof typeof allExtensions> = [
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ExtDef } from './types';
|
||||
|
||||
import { emptyCheck } from './emptyCheck';
|
||||
|
||||
export const shell: ExtDef = {
|
||||
DisallowSigned: emptyCheck
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// order important in structs... :)
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
BridgedBlockHash: 'H256',
|
||||
BridgedBlockNumber: 'BlockNumber',
|
||||
BridgedHeader: 'Header',
|
||||
InitializationData: {
|
||||
header: 'Header',
|
||||
authorityList: 'AuthorityList',
|
||||
setId: 'SetId',
|
||||
isHalted: 'bool'
|
||||
}
|
||||
}
|
||||
} 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,25 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import type { Struct, bool } from '@polkadot/types';
|
||||
import type { AuthorityList, SetId } from '@polkadot/types/interfaces/grandpa';
|
||||
import type { BlockNumber, H256, Header } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name BridgedBlockHash */
|
||||
export interface BridgedBlockHash extends H256 {}
|
||||
|
||||
/** @name BridgedBlockNumber */
|
||||
export interface BridgedBlockNumber extends BlockNumber {}
|
||||
|
||||
/** @name BridgedHeader */
|
||||
export interface BridgedHeader extends Header {}
|
||||
|
||||
/** @name InitializationData */
|
||||
export interface InitializationData extends Struct {
|
||||
readonly header: Header;
|
||||
readonly authorityList: AuthorityList;
|
||||
readonly setId: SetId;
|
||||
readonly isHalted: bool;
|
||||
}
|
||||
|
||||
export type PHANTOM_BRIDGES = 'bridges';
|
||||
@@ -38,11 +38,13 @@ export { default as syncstate } from './syncstate/definitions';
|
||||
export { default as system } from './system/definitions';
|
||||
export { default as treasury } from './treasury/definitions';
|
||||
export { default as txpayment } from './txpayment/definitions';
|
||||
export { default as uniques } from './uniques/definitions';
|
||||
export { default as utility } from './utility/definitions';
|
||||
export { default as vesting } from './vesting/definitions';
|
||||
|
||||
// polkadot-specific types
|
||||
export { default as attestations } from './attestations/definitions';
|
||||
export { default as bridges } from './bridges/definitions';
|
||||
export { default as claims } from './claims/definitions';
|
||||
export { default as crowdloan } from './crowdloan/definitions';
|
||||
export { default as cumulus } from './cumulus/definitions';
|
||||
|
||||
@@ -46,7 +46,35 @@ export default {
|
||||
types: {
|
||||
AuthorityIndex: 'u64',
|
||||
AuthorityList: 'Vec<NextAuthority>',
|
||||
AuthoritySet: {
|
||||
currentAuthorities: 'AuthorityList',
|
||||
setId: 'u64',
|
||||
pendingStandardChanges: 'ForkTreePendingChange',
|
||||
pendingForcedChanges: 'Vec<PendingChange>',
|
||||
authoritySetChanges: 'AuthoritySetChanges'
|
||||
},
|
||||
ForkTreePendingChange: {
|
||||
roots: 'Vec<ForkTreePendingChangeNode>',
|
||||
bestFinalizedNumber: 'Option<BlockNumber>'
|
||||
},
|
||||
ForkTreePendingChangeNode: {
|
||||
hash: 'BlockHash',
|
||||
number: 'BlockNumber',
|
||||
data: 'PendingChange', // actual data, here PendingChange
|
||||
children: 'Vec<ForkTreePendingChangeNode>'
|
||||
},
|
||||
AuthoritySetChange: '(U64, BlockNumber)',
|
||||
AuthoritySetChanges: 'Vec<AuthoritySetChange>',
|
||||
AuthorityWeight: 'u64',
|
||||
DelayKind: {
|
||||
_enum: {
|
||||
Finalized: 'Null',
|
||||
Best: 'DelayKindBest'
|
||||
}
|
||||
},
|
||||
DelayKindBest: {
|
||||
medianLastFinalized: 'BlockNumber'
|
||||
},
|
||||
EncodedFinalityProofs: 'Bytes',
|
||||
GrandpaEquivocation: {
|
||||
_enum: {
|
||||
@@ -68,19 +96,41 @@ export default {
|
||||
targetHash: 'Hash',
|
||||
targetNumber: 'BlockNumber'
|
||||
},
|
||||
GrandpaCommit: {
|
||||
targetHash: 'BlockHash',
|
||||
targetNumber: 'BlockNumber',
|
||||
precommits: 'Vec<GrandpaSignedPrecommit>'
|
||||
},
|
||||
GrandpaPrecommit: {
|
||||
targetHash: 'BlockHash',
|
||||
targetNumber: 'BlockNumber'
|
||||
},
|
||||
GrandpaSignedPrecommit: {
|
||||
precommit: 'GrandpaPrecommit',
|
||||
signature: 'AuthoritySignature',
|
||||
id: 'AuthorityId'
|
||||
},
|
||||
GrandpaJustification: {
|
||||
round: 'u64',
|
||||
commit: 'GrandpaCommit',
|
||||
votesAncestries: 'Vec<Header>'
|
||||
},
|
||||
JustificationNotification: 'Bytes',
|
||||
KeyOwnerProof: 'MembershipProof',
|
||||
NextAuthority: '(AuthorityId, AuthorityWeight)',
|
||||
PendingChange: {
|
||||
nextAuthorities: 'AuthorityList',
|
||||
delay: 'BlockNumber',
|
||||
canonHeight: 'BlockNumber',
|
||||
canonHash: 'BlockHash',
|
||||
delayKind: 'DelayKind'
|
||||
},
|
||||
PendingPause: {
|
||||
/// Block at which the intention to pause was scheduled.
|
||||
scheduledAt: 'BlockNumber',
|
||||
/// Number of blocks after which the change will be enacted.
|
||||
delay: 'BlockNumber'
|
||||
},
|
||||
PendingResume: {
|
||||
/// Block at which the intention to resume was scheduled.
|
||||
scheduledAt: 'BlockNumber',
|
||||
/// Number of blocks after which the change will be enacted.
|
||||
delay: 'BlockNumber'
|
||||
},
|
||||
Precommits: {
|
||||
@@ -111,13 +161,9 @@ export default {
|
||||
},
|
||||
StoredState: {
|
||||
_enum: {
|
||||
/// The current authority set is live, and GRANDPA is enabled.
|
||||
Live: 'Null',
|
||||
/// There is a pending pause event which will be enacted at the given block height.
|
||||
PendingPause: 'PendingPause',
|
||||
/// The current GRANDPA authority set is paused.
|
||||
Paused: 'Null',
|
||||
/// There is a pending resume event which will be enacted at the given block height.
|
||||
PendingResume: 'PendingResume'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import type { BTreeSet, Bytes, Enum, Struct, Vec, u32, u64 } from '@polkadot/types';
|
||||
import type { BTreeSet, Bytes, Enum, Option, Struct, U64, Vec, u32, u64 } from '@polkadot/types';
|
||||
import type { ITuple } from '@polkadot/types/types';
|
||||
import type { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||
import type { AuthoritySignature } from '@polkadot/types/interfaces/imOnline';
|
||||
import type { BlockNumber, Hash } from '@polkadot/types/interfaces/runtime';
|
||||
import type { BlockNumber, Hash, Header } from '@polkadot/types/interfaces/runtime';
|
||||
import type { MembershipProof } from '@polkadot/types/interfaces/session';
|
||||
|
||||
/** @name AuthorityIndex */
|
||||
@@ -14,12 +15,60 @@ export interface AuthorityIndex extends u64 {}
|
||||
/** @name AuthorityList */
|
||||
export interface AuthorityList extends Vec<NextAuthority> {}
|
||||
|
||||
/** @name AuthoritySet */
|
||||
export interface AuthoritySet extends Struct {
|
||||
readonly currentAuthorities: AuthorityList;
|
||||
readonly setId: u64;
|
||||
readonly pendingStandardChanges: ForkTreePendingChange;
|
||||
readonly pendingForcedChanges: Vec<PendingChange>;
|
||||
readonly authoritySetChanges: AuthoritySetChanges;
|
||||
}
|
||||
|
||||
/** @name AuthoritySetChange */
|
||||
export interface AuthoritySetChange extends ITuple<[U64, BlockNumber]> {}
|
||||
|
||||
/** @name AuthoritySetChanges */
|
||||
export interface AuthoritySetChanges extends Vec<AuthoritySetChange> {}
|
||||
|
||||
/** @name AuthorityWeight */
|
||||
export interface AuthorityWeight extends u64 {}
|
||||
|
||||
/** @name DelayKind */
|
||||
export interface DelayKind extends Enum {
|
||||
readonly isFinalized: boolean;
|
||||
readonly isBest: boolean;
|
||||
readonly asBest: DelayKindBest;
|
||||
}
|
||||
|
||||
/** @name DelayKindBest */
|
||||
export interface DelayKindBest extends Struct {
|
||||
readonly medianLastFinalized: BlockNumber;
|
||||
}
|
||||
|
||||
/** @name EncodedFinalityProofs */
|
||||
export interface EncodedFinalityProofs extends Bytes {}
|
||||
|
||||
/** @name ForkTreePendingChange */
|
||||
export interface ForkTreePendingChange extends Struct {
|
||||
readonly roots: Vec<ForkTreePendingChangeNode>;
|
||||
readonly bestFinalizedNumber: Option<BlockNumber>;
|
||||
}
|
||||
|
||||
/** @name ForkTreePendingChangeNode */
|
||||
export interface ForkTreePendingChangeNode extends Struct {
|
||||
readonly hash: BlockHash;
|
||||
readonly number: BlockNumber;
|
||||
readonly data: PendingChange;
|
||||
readonly children: Vec<ForkTreePendingChangeNode>;
|
||||
}
|
||||
|
||||
/** @name GrandpaCommit */
|
||||
export interface GrandpaCommit extends Struct {
|
||||
readonly targetHash: BlockHash;
|
||||
readonly targetNumber: BlockNumber;
|
||||
readonly precommits: Vec<GrandpaSignedPrecommit>;
|
||||
}
|
||||
|
||||
/** @name GrandpaEquivocation */
|
||||
export interface GrandpaEquivocation extends Enum {
|
||||
readonly isPrevote: boolean;
|
||||
@@ -42,12 +91,32 @@ export interface GrandpaEquivocationValue extends Struct {
|
||||
readonly second: ITuple<[GrandpaPrevote, AuthoritySignature]>;
|
||||
}
|
||||
|
||||
/** @name GrandpaJustification */
|
||||
export interface GrandpaJustification extends Struct {
|
||||
readonly round: u64;
|
||||
readonly commit: GrandpaCommit;
|
||||
readonly votesAncestries: Vec<Header>;
|
||||
}
|
||||
|
||||
/** @name GrandpaPrecommit */
|
||||
export interface GrandpaPrecommit extends Struct {
|
||||
readonly targetHash: BlockHash;
|
||||
readonly targetNumber: BlockNumber;
|
||||
}
|
||||
|
||||
/** @name GrandpaPrevote */
|
||||
export interface GrandpaPrevote extends Struct {
|
||||
readonly targetHash: Hash;
|
||||
readonly targetNumber: BlockNumber;
|
||||
}
|
||||
|
||||
/** @name GrandpaSignedPrecommit */
|
||||
export interface GrandpaSignedPrecommit extends Struct {
|
||||
readonly precommit: GrandpaPrecommit;
|
||||
readonly signature: AuthoritySignature;
|
||||
readonly id: AuthorityId;
|
||||
}
|
||||
|
||||
/** @name JustificationNotification */
|
||||
export interface JustificationNotification extends Bytes {}
|
||||
|
||||
@@ -57,6 +126,15 @@ export interface KeyOwnerProof extends MembershipProof {}
|
||||
/** @name NextAuthority */
|
||||
export interface NextAuthority extends ITuple<[AuthorityId, AuthorityWeight]> {}
|
||||
|
||||
/** @name PendingChange */
|
||||
export interface PendingChange extends Struct {
|
||||
readonly nextAuthorities: AuthorityList;
|
||||
readonly delay: BlockNumber;
|
||||
readonly canonHeight: BlockNumber;
|
||||
readonly canonHash: BlockHash;
|
||||
readonly delayKind: DelayKind;
|
||||
}
|
||||
|
||||
/** @name PendingPause */
|
||||
export interface PendingPause extends Struct {
|
||||
readonly scheduledAt: BlockNumber;
|
||||
|
||||
@@ -269,8 +269,8 @@ export default {
|
||||
index: 'u8'
|
||||
},
|
||||
NMapTypeV13: {
|
||||
hashers: 'Vec<StorageHasherV13>',
|
||||
keyVec: 'Vec<Type>',
|
||||
hashers: 'Vec<StorageHasherV13>',
|
||||
value: 'Type'
|
||||
},
|
||||
StorageEntryModifierV13: 'StorageEntryModifierV12',
|
||||
|
||||
@@ -301,8 +301,8 @@ export interface NMapTypeLatest extends NMapTypeV13 {}
|
||||
|
||||
/** @name NMapTypeV13 */
|
||||
export interface NMapTypeV13 extends Struct {
|
||||
readonly hashers: Vec<StorageHasherV13>;
|
||||
readonly keyVec: Vec<Type>;
|
||||
readonly hashers: Vec<StorageHasherV13>;
|
||||
readonly value: Type;
|
||||
}
|
||||
|
||||
|
||||
@@ -310,6 +310,26 @@ export default {
|
||||
],
|
||||
type: 'Vec<StorageChangeSet>'
|
||||
},
|
||||
getChildReadProof: {
|
||||
description: 'Returns proof of storage for child key entries at a specific block state.',
|
||||
params: [
|
||||
{
|
||||
name: 'childStorageKey',
|
||||
type: 'PrefixedStorageKey'
|
||||
},
|
||||
{
|
||||
name: 'keys',
|
||||
type: 'Vec<StorageKey>'
|
||||
},
|
||||
{
|
||||
name: 'at',
|
||||
type: 'BlockHash',
|
||||
isHistoric: true,
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'ReadProof'
|
||||
},
|
||||
getReadProof: {
|
||||
description: 'Returns proof of storage entries at a specific block state',
|
||||
params: [
|
||||
|
||||
@@ -35,9 +35,11 @@ export * from './syncstate/types';
|
||||
export * from './system/types';
|
||||
export * from './treasury/types';
|
||||
export * from './txpayment/types';
|
||||
export * from './uniques/types';
|
||||
export * from './utility/types';
|
||||
export * from './vesting/types';
|
||||
export * from './attestations/types';
|
||||
export * from './bridges/types';
|
||||
export * from './claims/types';
|
||||
export * from './crowdloan/types';
|
||||
export * from './cumulus/types';
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// order important in structs... :)
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
ClassId: 'u32',
|
||||
InstanceId: 'u32',
|
||||
DepositBalance: 'Balance',
|
||||
DepositBalanceOf: 'Balance',
|
||||
ClassDetails: {
|
||||
owner: 'AccountId',
|
||||
issuer: 'AccountId',
|
||||
admin: 'AccountId',
|
||||
freezer: 'AccountId',
|
||||
totalTeposit: 'DepositBalance',
|
||||
freeHolding: 'bool',
|
||||
instances: 'u32',
|
||||
instanceMetadatas: 'u32',
|
||||
isFrozen: 'bool'
|
||||
},
|
||||
DestroyWitness: {
|
||||
instances: 'Compact<u32>',
|
||||
instanceMetadatas: 'Compact<u32>'
|
||||
},
|
||||
InstanceDetails: {
|
||||
owner: 'AccountId',
|
||||
approved: 'Option<AccountId>',
|
||||
isFrozen: 'bool',
|
||||
deposit: 'DepositBalance'
|
||||
},
|
||||
ClassMetadata: {
|
||||
deposit: 'DepositBalance',
|
||||
name: 'Vec<u8>',
|
||||
information: 'Vec<u8>',
|
||||
isFrozen: 'bool'
|
||||
},
|
||||
InstanceMetadata: {
|
||||
deposit: 'DepositBalance',
|
||||
name: 'Vec<u8>',
|
||||
information: 'Vec<u8>',
|
||||
isFrozen: 'bool'
|
||||
}
|
||||
}
|
||||
} 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,62 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import type { Bytes, Compact, Option, Struct, bool, u32 } from '@polkadot/types';
|
||||
import type { AccountId, Balance } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name ClassDetails */
|
||||
export interface ClassDetails extends Struct {
|
||||
readonly owner: AccountId;
|
||||
readonly issuer: AccountId;
|
||||
readonly admin: AccountId;
|
||||
readonly freezer: AccountId;
|
||||
readonly totalTeposit: DepositBalance;
|
||||
readonly freeHolding: bool;
|
||||
readonly instances: u32;
|
||||
readonly instanceMetadatas: u32;
|
||||
readonly isFrozen: bool;
|
||||
}
|
||||
|
||||
/** @name ClassId */
|
||||
export interface ClassId extends u32 {}
|
||||
|
||||
/** @name ClassMetadata */
|
||||
export interface ClassMetadata extends Struct {
|
||||
readonly deposit: DepositBalance;
|
||||
readonly name: Bytes;
|
||||
readonly information: Bytes;
|
||||
readonly isFrozen: bool;
|
||||
}
|
||||
|
||||
/** @name DepositBalance */
|
||||
export interface DepositBalance extends Balance {}
|
||||
|
||||
/** @name DepositBalanceOf */
|
||||
export interface DepositBalanceOf extends Balance {}
|
||||
|
||||
/** @name DestroyWitness */
|
||||
export interface DestroyWitness extends Struct {
|
||||
readonly instances: Compact<u32>;
|
||||
readonly instanceMetadatas: Compact<u32>;
|
||||
}
|
||||
|
||||
/** @name InstanceDetails */
|
||||
export interface InstanceDetails extends Struct {
|
||||
readonly owner: AccountId;
|
||||
readonly approved: Option<AccountId>;
|
||||
readonly isFrozen: bool;
|
||||
readonly deposit: DepositBalance;
|
||||
}
|
||||
|
||||
/** @name InstanceId */
|
||||
export interface InstanceId extends u32 {}
|
||||
|
||||
/** @name InstanceMetadata */
|
||||
export interface InstanceMetadata extends Struct {
|
||||
readonly deposit: DepositBalance;
|
||||
readonly name: Bytes;
|
||||
readonly information: Bytes;
|
||||
readonly isFrozen: bool;
|
||||
}
|
||||
|
||||
export type PHANTOM_UNIQUES = 'uniques';
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types', version: '4.10.1' };
|
||||
export const packageInfo = { name: '@polkadot/types', version: '4.11.1' };
|
||||
|
||||
@@ -5,9 +5,9 @@ import type { StorageEntryMetadataLatest } from '../interfaces/metadata';
|
||||
import type { Codec } from '../types';
|
||||
|
||||
export interface StorageEntry {
|
||||
(arg?: any): Uint8Array;
|
||||
iterKey?: (arg?: any) => Uint8Array & Codec;
|
||||
keyPrefix: (arg?: any) => Uint8Array;
|
||||
(arg?: unknown): Uint8Array;
|
||||
iterKey?: (...args: unknown[]) => Uint8Array & Codec;
|
||||
keyPrefix: (...args: unknown[]) => Uint8Array;
|
||||
meta: StorageEntryMetadataLatest;
|
||||
method: string;
|
||||
prefix: string;
|
||||
|
||||
Reference in New Issue
Block a user