Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ddf67d5564 | ||
|
|
ad6b8280a2 | ||
|
|
682c6b6fb2 | ||
|
|
6a281211b4 | ||
|
|
6ef94b3c3b | ||
|
|
e900d1d657 | ||
|
|
7f1a3fa636 | ||
|
|
21802664b8 | ||
|
|
1492df11a7 | ||
|
|
00fed90da2 | ||
|
|
e6beb6554d | ||
|
|
099cf5a351 | ||
|
|
55e762a348 | ||
|
|
0ad146c607 | ||
|
|
4e7f3f5268 | ||
|
|
6a9e3d80f1 | ||
|
|
dee98fae55 | ||
|
|
ff52876920 | ||
|
|
4d01a09c54 | ||
|
|
7310ea825e | ||
|
|
15b80a47c3 | ||
|
|
622682b4ef | ||
|
|
56415df4ab | ||
|
|
8bea5e5a3b | ||
|
|
d6372ade44 | ||
|
|
f501994df8 | ||
|
|
b787a7d5a0 | ||
|
|
11d162a10d | ||
|
|
e2564dea17 | ||
|
|
2b9152871e | ||
|
|
70ecb03d14 | ||
|
|
a2f179acb1 | ||
|
|
c8cb97edef |
@@ -1,5 +1,24 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 1.19.1 Jun 16, 2020
|
||||
|
||||
- Improve typing on `.entries()` queries (Thanks to https://github.com/monitz87)
|
||||
- Align metadata and types with latest Substrate
|
||||
- Update Polkadot types for current evolution of parachains
|
||||
- Allow for type aliasing on events (aligning with calls & queries)
|
||||
|
||||
## 1.18.1 Jun 8, 2020
|
||||
|
||||
- Expand docs on node-template types (Thanks to https://github.com/g2udevelopment)
|
||||
- Update contract fees to current impl. (Thanks to https://github.com/djuanit0x)
|
||||
- Allow `Option` types in enum/Result type generation (Thanks to http://github.com/xlc)
|
||||
- Add `.entriesPaged` and `.keysPaged` methods for state maps (https://github.com/monitz87)
|
||||
- Add types for new Substrate proxy module
|
||||
- Adjust types for new Substrate (renamed) npos-elections module
|
||||
- `Call` now exposes `method` & `section` fields (aligned with `toHuman()` representation)
|
||||
- Cater for new Substrate string subscription ids (with backwards compatibility)
|
||||
- `@polkadot/util` 2.13
|
||||
|
||||
## 1.17.2 Jun 2, 2020
|
||||
|
||||
- Ensure subscription promise resolves before first result
|
||||
|
||||
@@ -20,6 +20,9 @@ All data transferred between the API and the Node is in a SCALE-encoded binary f
|
||||
|
||||
To fix this, you should look at the specific `api.tx.*` params and adjust the type definitions for those param types to match what is found on the node side. In some rare cases the cause could be extrinsic formatting related, to track these make an `api.tx.system.remark(data: Bytes)` call, if it fails, the API and node cannot agree on [an extrinsic format and adjustments are required](types.extend.md#impact-on-extrinsics).
|
||||
|
||||
If you are using a node-template based version of substrate and you changed the specName you need to add these typings(In addition to other custom types) `{"Address": "AccountId","LookupSource": "AccountId"}`. This is also the case when you use [polkadot-js/apps](https://github.com/polkadot-js/apps) to connect to your node. When the specName stays node-template the API is smart enough to add the custom typings.
|
||||
|
||||
|
||||
## I would like to sign transactions offline
|
||||
|
||||
The API itself is independent on where the signature comes from and how it is injected. Additionally it implements a signer interface, that can be used for external signing - an example of this is the [polkadot-js/apps](https://github.com/polkadot-js/apps) support for signing via extensions and even the [polkadot-js/extension](https://github.com/polkadot-js/extension) support for tools such as the [Parity Signer](https://github.com/paritytech/parity-signer).
|
||||
|
||||
+1
-1
@@ -9,5 +9,5 @@
|
||||
"packages": [
|
||||
"packages/*"
|
||||
],
|
||||
"version": "1.17.2"
|
||||
"version": "1.19.1"
|
||||
}
|
||||
|
||||
+5
-5
@@ -27,12 +27,12 @@
|
||||
"@babel/core": "^7.10.2",
|
||||
"@babel/register": "^7.10.1",
|
||||
"@babel/runtime": "^7.10.2",
|
||||
"@polkadot/dev": "^0.55.7",
|
||||
"@polkadot/ts": "^0.3.25",
|
||||
"@polkadot/dev": "^0.55.10",
|
||||
"@polkadot/ts": "^0.3.26",
|
||||
"@polkadot/typegen": "workspace:packages/typegen",
|
||||
"@types/jest": "^25.2.3",
|
||||
"@vuepress/plugin-search": "^1.5.0",
|
||||
"@types/jest": "^26.0.0",
|
||||
"@vuepress/plugin-search": "^1.5.2",
|
||||
"copyfiles": "^2.3.0"
|
||||
},
|
||||
"version": "1.17.2"
|
||||
"version": "1.19.1"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api-contract",
|
||||
"version": "1.17.2",
|
||||
"version": "1.19.1",
|
||||
"description": "Interfaces for interacting with contracts and contract ABIs",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
@@ -27,10 +27,10 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.10.2",
|
||||
"@polkadot/api": "1.17.2",
|
||||
"@polkadot/rpc-core": "1.17.2",
|
||||
"@polkadot/types": "1.17.2",
|
||||
"@polkadot/util": "^2.12.2",
|
||||
"@polkadot/api": "1.19.1",
|
||||
"@polkadot/rpc-core": "1.19.1",
|
||||
"@polkadot/types": "1.19.1",
|
||||
"@polkadot/util": "^2.14.1",
|
||||
"bn.js": "^5.1.2",
|
||||
"rxjs": "^6.5.5"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api-derive",
|
||||
"version": "1.17.2",
|
||||
"version": "1.19.1",
|
||||
"description": "Common functions used across Polkadot, derived from RPC calls and storage queries.",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
@@ -28,17 +28,17 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.10.2",
|
||||
"@polkadot/api": "1.17.2",
|
||||
"@polkadot/rpc-core": "1.17.2",
|
||||
"@polkadot/rpc-provider": "1.17.2",
|
||||
"@polkadot/types": "1.17.2",
|
||||
"@polkadot/util": "^2.12.2",
|
||||
"@polkadot/util-crypto": "^2.12.2",
|
||||
"@polkadot/api": "1.19.1",
|
||||
"@polkadot/rpc-core": "1.19.1",
|
||||
"@polkadot/rpc-provider": "1.19.1",
|
||||
"@polkadot/types": "1.19.1",
|
||||
"@polkadot/util": "^2.14.1",
|
||||
"@polkadot/util-crypto": "^2.14.1",
|
||||
"bn.js": "^5.1.2",
|
||||
"memoizee": "^0.4.14",
|
||||
"rxjs": "^6.5.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^2.12.2"
|
||||
"@polkadot/keyring": "^2.14.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,23 +11,24 @@ import { map } from 'rxjs/operators';
|
||||
|
||||
import { memo } from '../util';
|
||||
|
||||
type ResultV2 = [BN, BN, BN, BN, BN, BN, BN, BN, BN];
|
||||
type ResultV2 = [BN, BN, BN, BN, BN, BN, BN, BN, BN, BN];
|
||||
|
||||
// query via constants (current applicable path)
|
||||
function queryConstants (api: ApiInterfaceRx): Observable<ResultV2> {
|
||||
return of([
|
||||
// deprecated
|
||||
api.consts.contracts.callBaseFee || api.registry.createType('Balance'),
|
||||
api.consts.contracts.contractFee || api.registry.createType('Balance'),
|
||||
api.consts.contracts.creationFee || api.registry.createType('Balance'),
|
||||
api.consts.contracts.transactionBaseFee || api.registry.createType('Balance'),
|
||||
api.consts.contracts.transactionByteFee || api.registry.createType('Balance'),
|
||||
api.consts.contracts.transferFee || api.registry.createType('Balance'),
|
||||
|
||||
// current
|
||||
api.consts.contracts.callBaseFee,
|
||||
api.consts.contracts.contractFee,
|
||||
api.consts.contracts.rentByteFee,
|
||||
api.consts.contracts.rentDepositOffset,
|
||||
api.consts.contracts.tombstoneDeposit,
|
||||
api.consts.contracts.transactionBaseFee,
|
||||
api.consts.contracts.transactionByteFee
|
||||
api.consts.contracts.surchargeReward,
|
||||
api.consts.contracts.tombstoneDeposit
|
||||
]) as unknown as Observable<ResultV2>;
|
||||
}
|
||||
|
||||
@@ -47,12 +48,13 @@ function queryConstants (api: ApiInterfaceRx): Observable<ResultV2> {
|
||||
export function fees (api: ApiInterfaceRx): () => Observable<DeriveContractFees> {
|
||||
return memo((): Observable<DeriveContractFees> => {
|
||||
return queryConstants(api).pipe(
|
||||
map(([creationFee, transferFee, callBaseFee, contractFee, rentByteFee, rentDepositOffset, tombstoneDeposit, transactionBaseFee, transactionByteFee]): DeriveContractFees => ({
|
||||
map(([callBaseFee, contractFee, creationFee, transactionBaseFee, transactionByteFee, transferFee, rentByteFee, rentDepositOffset, surchargeReward, tombstoneDeposit]): DeriveContractFees => ({
|
||||
callBaseFee,
|
||||
contractFee,
|
||||
creationFee,
|
||||
rentByteFee,
|
||||
rentDepositOffset,
|
||||
surchargeReward,
|
||||
tombstoneDeposit,
|
||||
transactionBaseFee,
|
||||
transactionByteFee,
|
||||
|
||||
@@ -42,6 +42,7 @@ export interface DeriveContractFees {
|
||||
creationFee: BN;
|
||||
rentByteFee: BN;
|
||||
rentDepositOffset: BN;
|
||||
surchargeReward: BN;
|
||||
tombstoneDeposit: BN;
|
||||
transactionBaseFee: BN;
|
||||
transactionByteFee: BN;
|
||||
|
||||
+11
-11
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api",
|
||||
"version": "1.17.2",
|
||||
"version": "1.19.1",
|
||||
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
@@ -27,20 +27,20 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.10.2",
|
||||
"@polkadot/api-derive": "1.17.2",
|
||||
"@polkadot/keyring": "^2.12.2",
|
||||
"@polkadot/metadata": "1.17.2",
|
||||
"@polkadot/rpc-core": "1.17.2",
|
||||
"@polkadot/rpc-provider": "1.17.2",
|
||||
"@polkadot/types": "1.17.2",
|
||||
"@polkadot/types-known": "1.17.2",
|
||||
"@polkadot/util": "^2.12.2",
|
||||
"@polkadot/util-crypto": "^2.12.2",
|
||||
"@polkadot/api-derive": "1.19.1",
|
||||
"@polkadot/keyring": "^2.14.1",
|
||||
"@polkadot/metadata": "1.19.1",
|
||||
"@polkadot/rpc-core": "1.19.1",
|
||||
"@polkadot/rpc-provider": "1.19.1",
|
||||
"@polkadot/types": "1.19.1",
|
||||
"@polkadot/types-known": "1.19.1",
|
||||
"@polkadot/util": "^2.14.1",
|
||||
"@polkadot/util-crypto": "^2.14.1",
|
||||
"bn.js": "^5.1.2",
|
||||
"eventemitter3": "^4.0.4",
|
||||
"rxjs": "^6.5.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^2.12.2"
|
||||
"@polkadot/keyring": "^2.14.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,18 +10,18 @@ import { AccountData, BalanceLock, ReleasesBalances } from '@polkadot/types/inte
|
||||
import { ProposalIndex, Votes } from '@polkadot/types/interfaces/collective';
|
||||
import { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||
import { CodeHash, ContractInfo, PrefabWasmModule, Schedule } from '@polkadot/types/interfaces/contracts';
|
||||
import { PreimageStatus, PropIndex, Proposal, ProxyState, ReferendumIndex, ReferendumInfo, ReleasesDemocracy, Voting } from '@polkadot/types/interfaces/democracy';
|
||||
import { PreimageStatus, PropIndex, Proposal, ReferendumIndex, ReferendumInfo, ReleasesDemocracy, Voting } from '@polkadot/types/interfaces/democracy';
|
||||
import { VoteThreshold } from '@polkadot/types/interfaces/elections';
|
||||
import { SetId, StoredPendingChange, StoredState } from '@polkadot/types/interfaces/grandpa';
|
||||
import { RegistrarInfo, Registration } from '@polkadot/types/interfaces/identity';
|
||||
import { AuthIndex } from '@polkadot/types/interfaces/imOnline';
|
||||
import { DeferredOffenceOf, Kind, OffenceDetails, OpaqueTimeSlot, ReportIdOf } from '@polkadot/types/interfaces/offences';
|
||||
import { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
|
||||
import { AccountId, AccountIndex, Balance, BalanceOf, BlockNumber, ExtrinsicsWeight, Hash, KeyTypeId, Moment, Perbill, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
||||
import { AccountId, AccountIndex, Balance, BalanceOf, BlockNumber, ExtrinsicsWeight, Hash, KeyTypeId, Moment, Perbill, ProxyType, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
||||
import { Scheduled, TaskAddress } from '@polkadot/types/interfaces/scheduler';
|
||||
import { Keys, SessionIndex } from '@polkadot/types/interfaces/session';
|
||||
import { Bid, BidKind, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
|
||||
import { ActiveEraInfo, ElectionResult, ElectionStatus, EraIndex, EraRewardPoints, Exposure, Forcing, Nominations, PhragmenScore, ReleasesStaking, RewardDestination, SlashingSpans, SpanIndex, SpanRecord, StakingLedger, UnappliedSlash, ValidatorPrefs } from '@polkadot/types/interfaces/staking';
|
||||
import { ActiveEraInfo, ElectionResult, ElectionScore, ElectionStatus, EraIndex, EraRewardPoints, Exposure, Forcing, Nominations, ReleasesStaking, RewardDestination, SlashingSpans, SpanIndex, SpanRecord, StakingLedger, UnappliedSlash, ValidatorPrefs } from '@polkadot/types/interfaces/staking';
|
||||
import { AccountInfo, DigestOf, EventIndex, EventRecord, LastRuntimeUpgradeInfo, Phase } from '@polkadot/types/interfaces/system';
|
||||
import { OpenTip, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
|
||||
import { Multiplier } from '@polkadot/types/interfaces/txpayment';
|
||||
@@ -121,9 +121,6 @@ declare module '@polkadot/api/types/storage' {
|
||||
/**
|
||||
* The balance of an account.
|
||||
*
|
||||
* NOTE: THIS MAY NEVER BE IN EXISTENCE AND YET HAVE A `total().is_zero()`. If the total
|
||||
* is ever zero, then the entry *MUST* be removed.
|
||||
*
|
||||
* NOTE: This is only used in the case that this module is used to store balances.
|
||||
**/
|
||||
account: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<AccountData>> & QueryableStorageEntry<ApiType>;
|
||||
@@ -242,13 +239,6 @@ declare module '@polkadot/api/types/storage' {
|
||||
* The block number is the block at which it was deposited.
|
||||
**/
|
||||
preimages: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<Option<PreimageStatus>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Who is able to vote for whom. Value is the fund-holding account, key is the
|
||||
* vote-transaction-sending account.
|
||||
*
|
||||
* TWOX-NOTE: OK ― `AccountId` is a secure hash.
|
||||
**/
|
||||
proxy: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<ProxyState>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The number of (public) proposals that have been made so far.
|
||||
**/
|
||||
@@ -398,7 +388,14 @@ declare module '@polkadot/api/types/storage' {
|
||||
/**
|
||||
* The lookup from index to account.
|
||||
**/
|
||||
accounts: AugmentedQuery<ApiType, (arg: AccountIndex | AnyNumber | Uint8Array) => Observable<Option<ITuple<[AccountId, BalanceOf]>>>> & QueryableStorageEntry<ApiType>;
|
||||
accounts: AugmentedQuery<ApiType, (arg: AccountIndex | AnyNumber | Uint8Array) => Observable<Option<ITuple<[AccountId, BalanceOf, bool]>>>> & QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
multisig: {
|
||||
[index: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The set of open multisig operations.
|
||||
**/
|
||||
multisigs: AugmentedQueryDoubleMap<ApiType, (key1: AccountId | string | Uint8Array, key2: U8aFixed | string | Uint8Array) => Observable<Option<Multisig>>> & QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
offences: {
|
||||
[index: string]: QueryableStorageEntry<ApiType>;
|
||||
@@ -425,6 +422,14 @@ declare module '@polkadot/api/types/storage' {
|
||||
**/
|
||||
reportsByKindIndex: AugmentedQuery<ApiType, (arg: Kind | string | Uint8Array) => Observable<Bytes>> & QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
proxy: {
|
||||
[index: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The set of account proxies. Maps the account which has delegated to the accounts
|
||||
* which are being delegated to, together with the amount held on deposit.
|
||||
**/
|
||||
proxies: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<ITuple<[Vec<ITuple<[AccountId, ProxyType]>>, BalanceOf]>>> & QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
randomnessCollectiveFlip: {
|
||||
[index: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
@@ -669,9 +674,9 @@ declare module '@polkadot/api/types/storage' {
|
||||
*
|
||||
* Information is kept for eras in `[current_era - history_depth; current_era]`.
|
||||
*
|
||||
* Must be more than the number of eras delayed by session otherwise.
|
||||
* I.e. active era must always be in history.
|
||||
* I.e. `active_era > current_era - history_depth` must be guaranteed.
|
||||
* Must be more than the number of eras delayed by session otherwise. I.e. active era must
|
||||
* always be in history. I.e. `active_era > current_era - history_depth` must be
|
||||
* guaranteed.
|
||||
**/
|
||||
historyDepth: AugmentedQuery<ApiType, () => Observable<u32>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
@@ -689,10 +694,6 @@ declare module '@polkadot/api/types/storage' {
|
||||
* Map from all (unlocked) "controller" accounts to the info regarding the staking.
|
||||
**/
|
||||
ledger: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<StakingLedger>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The era where we migrated from Lazy Payouts to Simple Payouts
|
||||
**/
|
||||
migrateEra: AugmentedQuery<ApiType, () => Observable<Option<EraIndex>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Minimum number of staking participants before emergency conditions are imposed.
|
||||
**/
|
||||
@@ -718,7 +719,7 @@ declare module '@polkadot/api/types/storage' {
|
||||
/**
|
||||
* The score of the current [`QueuedElected`].
|
||||
**/
|
||||
queuedScore: AugmentedQuery<ApiType, () => Observable<Option<PhragmenScore>>> & QueryableStorageEntry<ApiType>;
|
||||
queuedScore: AugmentedQuery<ApiType, () => Observable<Option<ElectionScore>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Slashing spans for stash accounts.
|
||||
**/
|
||||
@@ -928,13 +929,6 @@ declare module '@polkadot/api/types/storage' {
|
||||
**/
|
||||
tips: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<Option<OpenTip>>> & QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
utility: {
|
||||
[index: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The set of open multisig operations.
|
||||
**/
|
||||
multisigs: AugmentedQueryDoubleMap<ApiType, (key1: AccountId | string | Uint8Array, key2: U8aFixed | string | Uint8Array) => Observable<Option<Multisig>>> & QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
vesting: {
|
||||
[index: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
|
||||
+310
-345
@@ -12,11 +12,11 @@ import { Extrinsic, Signature } from '@polkadot/types/interfaces/extrinsics';
|
||||
import { EquivocationProof, KeyOwnerProof } from '@polkadot/types/interfaces/grandpa';
|
||||
import { IdentityFields, IdentityInfo, IdentityJudgement, RegistrarIndex } from '@polkadot/types/interfaces/identity';
|
||||
import { Heartbeat } from '@polkadot/types/interfaces/imOnline';
|
||||
import { AccountId, AccountIndex, Address, Balance, BalanceOf, BlockNumber, Call, ChangesTrieConfiguration, Hash, Header, KeyValue, LookupSource, Moment, Perbill, Weight } from '@polkadot/types/interfaces/runtime';
|
||||
import { AccountId, AccountIndex, Address, Balance, BalanceOf, BlockNumber, Call, ChangesTrieConfiguration, Hash, Header, KeyValue, LookupSource, Moment, Perbill, ProxyType, Weight } from '@polkadot/types/interfaces/runtime';
|
||||
import { Period, Priority } from '@polkadot/types/interfaces/scheduler';
|
||||
import { Keys } from '@polkadot/types/interfaces/session';
|
||||
import { SocietyJudgement } from '@polkadot/types/interfaces/society';
|
||||
import { CompactAssignments, ElectionSize, EraIndex, PhragmenScore, RewardDestination, ValidatorIndex, ValidatorPrefs } from '@polkadot/types/interfaces/staking';
|
||||
import { CompactAssignments, ElectionScore, ElectionSize, EraIndex, RewardDestination, ValidatorIndex, ValidatorPrefs } from '@polkadot/types/interfaces/staking';
|
||||
import { Key } from '@polkadot/types/interfaces/system';
|
||||
import { Timepoint } from '@polkadot/types/interfaces/utility';
|
||||
import { VestingInfo } from '@polkadot/types/interfaces/vesting';
|
||||
@@ -290,23 +290,6 @@ declare module '@polkadot/api/types/submittable' {
|
||||
};
|
||||
democracy: {
|
||||
[index: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Specify a proxy that is already open to us. Called by the stash.
|
||||
*
|
||||
* NOTE: Used to be called `set_proxy`.
|
||||
*
|
||||
* The dispatch origin of this call must be _Signed_.
|
||||
*
|
||||
* - `proxy`: The account that will be activated as proxy.
|
||||
*
|
||||
* # <weight>
|
||||
* - Complexity: `O(1)`
|
||||
* - Db reads: `Proxy`
|
||||
* - Db writes: `Proxy`
|
||||
* - Base Weight: 7.972 µs
|
||||
* # </weight>
|
||||
**/
|
||||
activateProxy: AugmentedSubmittable<(proxy: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Cancel a proposal queued for enactment.
|
||||
*
|
||||
@@ -348,40 +331,6 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
clearPublicProposals: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Clear the proxy. Called by the proxy.
|
||||
*
|
||||
* NOTE: Used to be called `resign_proxy`.
|
||||
*
|
||||
* The dispatch origin of this call must be _Signed_.
|
||||
*
|
||||
* # <weight>
|
||||
* - Complexity: `O(1)`
|
||||
* - Db reads: `Proxy`, `sender account`
|
||||
* - Db writes: `Proxy`, `sender account`
|
||||
* - Base Weight: 15.41 µs
|
||||
* # </weight>
|
||||
**/
|
||||
closeProxy: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Deactivate the proxy, but leave open to this account. Called by the stash.
|
||||
*
|
||||
* The proxy must already be active.
|
||||
*
|
||||
* NOTE: Used to be called `remove_proxy`.
|
||||
*
|
||||
* The dispatch origin of this call must be _Signed_.
|
||||
*
|
||||
* - `proxy`: The account that will be deactivated as proxy.
|
||||
*
|
||||
* # <weight>
|
||||
* - Complexity: `O(1)`
|
||||
* - Db reads: `Proxy`
|
||||
* - Db writes: `Proxy`
|
||||
* - Base Weight: 8.03 µs
|
||||
* # </weight>
|
||||
**/
|
||||
deactivateProxy: AugmentedSubmittable<(proxy: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Delegate the voting power (with some given conviction) of the sending account.
|
||||
*
|
||||
@@ -547,25 +496,6 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* Same as `note_preimage` but origin is `OperationalPreimageOrigin`.
|
||||
**/
|
||||
notePreimageOperational: AugmentedSubmittable<(encodedProposal: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Become a proxy.
|
||||
*
|
||||
* This must be called prior to a later `activate_proxy`.
|
||||
*
|
||||
* Origin must be a Signed.
|
||||
*
|
||||
* - `target`: The account whose votes will later be proxied.
|
||||
*
|
||||
* `close_proxy` must be called before the account can be destroyed.
|
||||
*
|
||||
* # <weight>
|
||||
* - Complexity: O(1)
|
||||
* - Db reads: `Proxy`, `proxy account`
|
||||
* - Db writes: `Proxy`, `proxy account`
|
||||
* - Base Weight: 14.86 µs
|
||||
* # </weight>
|
||||
**/
|
||||
openProxy: AugmentedSubmittable<(target: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Propose a sensitive action to be taken.
|
||||
*
|
||||
@@ -586,95 +516,6 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
propose: AugmentedSubmittable<(proposalHash: Hash | string | Uint8Array, value: Compact<BalanceOf> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Delegate the voting power (with some given conviction) of a proxied account.
|
||||
*
|
||||
* The balance delegated is locked for as long as it's delegated, and thereafter for the
|
||||
* time appropriate for the conviction's lock period.
|
||||
*
|
||||
* The dispatch origin of this call must be _Signed_, and the signing account must have
|
||||
* been set as the proxy account for `target`.
|
||||
*
|
||||
* - `target`: The account whole voting power shall be delegated and whose balance locked.
|
||||
* This account must either:
|
||||
* - be delegating already; or
|
||||
* - have no voting activity (if there is, then it will need to be removed/consolidated
|
||||
* through `reap_vote` or `unvote`).
|
||||
* - `to`: The account whose voting the `target` account's voting power will follow.
|
||||
* - `conviction`: The conviction that will be attached to the delegated votes. When the
|
||||
* account is undelegated, the funds will be locked for the corresponding period.
|
||||
* - `balance`: The amount of the account's balance to be used in delegating. This must
|
||||
* not be more than the account's current balance.
|
||||
*
|
||||
* Emits `Delegated`.
|
||||
*
|
||||
* # <weight>
|
||||
* same as `delegate with additional:
|
||||
* - Db reads: `Proxy`, `proxy account`
|
||||
* - Db writes: `proxy account`
|
||||
* - Base Weight: 68.61 + 8.039 * R µs
|
||||
* # </weight>
|
||||
**/
|
||||
proxyDelegate: AugmentedSubmittable<(to: AccountId | string | Uint8Array, conviction: Conviction | 'None'|'Locked1x'|'Locked2x'|'Locked3x'|'Locked4x'|'Locked5x'|'Locked6x' | number | Uint8Array, balance: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Remove a proxied vote for a referendum.
|
||||
*
|
||||
* Exactly equivalent to `remove_vote` except that it operates on the account that the
|
||||
* sender is a proxy for.
|
||||
*
|
||||
* The dispatch origin of this call must be _Signed_ and the signing account must be a
|
||||
* proxy for some other account which has a registered vote for the referendum of `index`.
|
||||
*
|
||||
* - `index`: The index of referendum of the vote to be removed.
|
||||
*
|
||||
* # <weight>
|
||||
* - `O(R + log R)` where R is the number of referenda that `target` has voted on.
|
||||
* Weight is calculated for the maximum number of vote.
|
||||
* - Db reads: `ReferendumInfoOf`, `VotingOf`, `Proxy`
|
||||
* - Db writes: `ReferendumInfoOf`, `VotingOf`
|
||||
* - Base Weight: 26.35 + .36 * R µs
|
||||
* # </weight>
|
||||
**/
|
||||
proxyRemoveVote: AugmentedSubmittable<(index: ReferendumIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Undelegate the voting power of a proxied account.
|
||||
*
|
||||
* Tokens may be unlocked following once an amount of time consistent with the lock period
|
||||
* of the conviction with which the delegation was issued.
|
||||
*
|
||||
* The dispatch origin of this call must be _Signed_ and the signing account must be a
|
||||
* proxy for some other account which is currently delegating.
|
||||
*
|
||||
* Emits `Undelegated`.
|
||||
*
|
||||
* # <weight>
|
||||
* same as `undelegate with additional:
|
||||
* Db reads: `Proxy`
|
||||
* Base Weight: 39 + 7.958 * R µs
|
||||
* # </weight>
|
||||
**/
|
||||
proxyUndelegate: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Vote in a referendum on behalf of a stash. If `vote.is_aye()`, the vote is to enact
|
||||
* the proposal; otherwise it is a vote to keep the status quo.
|
||||
*
|
||||
* The dispatch origin of this call must be _Signed_.
|
||||
*
|
||||
* - `ref_index`: The index of the referendum to proxy vote for.
|
||||
* - `vote`: The vote configuration.
|
||||
*
|
||||
* # <weight>
|
||||
* - Complexity: `O(R)` where R is the number of referendums the proxy has voted on.
|
||||
* weight is charged as if maximum votes.
|
||||
* - Db reads: `ReferendumInfoOf`, `VotingOf`, `balances locks`, `Proxy`, `proxy account`
|
||||
* - Db writes: `ReferendumInfoOf`, `VotingOf`, `balances locks`
|
||||
* ------------
|
||||
* - Base Weight:
|
||||
* - Proxy Vote New: 54.35 + .344 * R µs
|
||||
* - Proxy Vote Existing: 54.35 + .35 * R µs
|
||||
* # </weight>
|
||||
**/
|
||||
proxyVote: AugmentedSubmittable<(refIndex: Compact<ReferendumIndex> | AnyNumber | Uint8Array, vote: AccountVote | { Standard: any } | { Split: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Remove an expired proposal preimage and collect the deposit.
|
||||
*
|
||||
@@ -861,7 +702,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* the outgoing member is slashed.
|
||||
*
|
||||
* If a runner-up is available, then the best runner-up will be removed and replaces the
|
||||
* outgoing member. Otherwise, a new phragmen round is started.
|
||||
* outgoing member. Otherwise, a new phragmen election is started.
|
||||
*
|
||||
* Note that this does not affect the designated block number of the next election.
|
||||
*
|
||||
@@ -1297,6 +1138,9 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - One storage mutation (codec `O(1)`).
|
||||
* - One reserve operation.
|
||||
* - One event.
|
||||
* -------------------
|
||||
* - Base Weight: 28.69 µs
|
||||
* - DB Weight: 1 Read/Write (Accounts)
|
||||
* # </weight>
|
||||
**/
|
||||
claim: AugmentedSubmittable<(index: AccountIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
@@ -1308,6 +1152,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
*
|
||||
* - `index`: the index to be (re-)assigned.
|
||||
* - `new`: the new owner of the index. This function is a no-op if it is equal to sender.
|
||||
* - `freeze`: if set to `true`, will freeze the index so it cannot be transferred.
|
||||
*
|
||||
* Emits `IndexAssigned` if successful.
|
||||
*
|
||||
@@ -1316,9 +1161,14 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - One storage mutation (codec `O(1)`).
|
||||
* - Up to one reserve operation.
|
||||
* - One event.
|
||||
* -------------------
|
||||
* - Base Weight: 26.83 µs
|
||||
* - DB Weight:
|
||||
* - Reads: Indices Accounts, System Account (original owner)
|
||||
* - Writes: Indices Accounts, System Account (original owner)
|
||||
* # </weight>
|
||||
**/
|
||||
forceTransfer: AugmentedSubmittable<(updated: AccountId | string | Uint8Array, index: AccountIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
forceTransfer: AugmentedSubmittable<(updated: AccountId | string | Uint8Array, index: AccountIndex | AnyNumber | Uint8Array, freeze: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Free up an index owned by the sender.
|
||||
*
|
||||
@@ -1335,9 +1185,33 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - One storage mutation (codec `O(1)`).
|
||||
* - One reserve operation.
|
||||
* - One event.
|
||||
* -------------------
|
||||
* - Base Weight: 25.53 µs
|
||||
* - DB Weight: 1 Read/Write (Accounts)
|
||||
* # </weight>
|
||||
**/
|
||||
free: AugmentedSubmittable<(index: AccountIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Freeze an index so it will always point to the sender account. This consumes the deposit.
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_ and the signing account must have a
|
||||
* non-frozen account `index`.
|
||||
*
|
||||
* - `index`: the index to be frozen in place.
|
||||
*
|
||||
* Emits `IndexFrozen` if successful.
|
||||
*
|
||||
* # <weight>
|
||||
* - `O(1)`.
|
||||
* - One storage mutation (codec `O(1)`).
|
||||
* - Up to one slash operation.
|
||||
* - One event.
|
||||
* -------------------
|
||||
* - Base Weight: 30.86 µs
|
||||
* - DB Weight: 1 Read/Write (Accounts)
|
||||
* # </weight>
|
||||
**/
|
||||
freeze: AugmentedSubmittable<(index: AccountIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Assign an index already owned by the sender to another account. The balance reservation
|
||||
* is effectively transferred to the new account.
|
||||
@@ -1354,10 +1228,262 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - One storage mutation (codec `O(1)`).
|
||||
* - One transfer operation.
|
||||
* - One event.
|
||||
* -------------------
|
||||
* - Base Weight: 33.74 µs
|
||||
* - DB Weight:
|
||||
* - Reads: Indices Accounts, System Account (recipient)
|
||||
* - Writes: Indices Accounts, System Account (recipient)
|
||||
* # </weight>
|
||||
**/
|
||||
transfer: AugmentedSubmittable<(updated: AccountId | string | Uint8Array, index: AccountIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
};
|
||||
multisig: {
|
||||
[index: 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`.
|
||||
*
|
||||
* Payment: `DepositBase` will be reserved if this is the first approval, plus
|
||||
* `threshold` times `DepositFactor`. It is returned once this dispatch happens or
|
||||
* is cancelled.
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_.
|
||||
*
|
||||
* - `threshold`: The total number of approvals for this dispatch before it is executed.
|
||||
* - `other_signatories`: The accounts (other than the sender) who can approve this
|
||||
* dispatch. May not be empty.
|
||||
* - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is
|
||||
* not the first approval, then it must be `Some`, with the timepoint (block number and
|
||||
* transaction index) of the first approval transaction.
|
||||
* - `call_hash`: The hash of the call to be executed.
|
||||
*
|
||||
* NOTE: If this is the final approval, you will want to use `as_multi` instead.
|
||||
*
|
||||
* # <weight>
|
||||
* - `O(S)`.
|
||||
* - Up to one balance-reserve or unreserve operation.
|
||||
* - One passthrough operation, one insert, both `O(S)` where `S` is the number of
|
||||
* signatories. `S` is capped by `MaxSignatories`, with weight being proportional.
|
||||
* - One encode & hash, both of complexity `O(S)`.
|
||||
* - Up to one binary search and insert (`O(logS + S)`).
|
||||
* - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove.
|
||||
* - One event.
|
||||
* - Storage: inserts one item, value size bounded by `MaxSignatories`, with a
|
||||
* deposit taken for its lifetime of
|
||||
* `DepositBase + threshold * DepositFactor`.
|
||||
* ----------------------------------
|
||||
* - Base Weight:
|
||||
* - Create: 44.71 + 0.088 * S
|
||||
* - Approve: 31.48 + 0.116 * S
|
||||
* - DB Weight:
|
||||
* - Read: Multisig Storage, [Caller Account]
|
||||
* - Write: Multisig Storage, [Caller Account]
|
||||
* # </weight>
|
||||
**/
|
||||
approveAsMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId> | (AccountId | string | Uint8Array)[], maybeTimepoint: Option<Timepoint> | null | object | string | Uint8Array, callHash: U8aFixed | string | Uint8Array) => SubmittableExtrinsic<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`.
|
||||
*
|
||||
* If there are enough, then dispatch the call.
|
||||
*
|
||||
* Payment: `DepositBase` will be reserved if this is the first approval, plus
|
||||
* `threshold` times `DepositFactor`. It is returned once this dispatch happens or
|
||||
* is cancelled.
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_.
|
||||
*
|
||||
* - `threshold`: The total number of approvals for this dispatch before it is executed.
|
||||
* - `other_signatories`: The accounts (other than the sender) who can approve this
|
||||
* dispatch. May not be empty.
|
||||
* - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is
|
||||
* not the first approval, then it must be `Some`, with the timepoint (block number and
|
||||
* transaction index) of the first approval transaction.
|
||||
* - `call`: The call to be executed.
|
||||
*
|
||||
* NOTE: Unless this is the final approval, you will generally want to use
|
||||
* `approve_as_multi` instead, since it only requires a hash of the call.
|
||||
*
|
||||
* Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise
|
||||
* on success, result is `Ok` and the result from the interior call, if it was executed,
|
||||
* may be found in the deposited `MultisigExecuted` event.
|
||||
*
|
||||
* # <weight>
|
||||
* - `O(S + Z + Call)`.
|
||||
* - Up to one balance-reserve or unreserve operation.
|
||||
* - One passthrough operation, one insert, both `O(S)` where `S` is the number of
|
||||
* signatories. `S` is capped by `MaxSignatories`, with weight being proportional.
|
||||
* - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len.
|
||||
* - One encode & hash, both of complexity `O(S)`.
|
||||
* - Up to one binary search and insert (`O(logS + S)`).
|
||||
* - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove.
|
||||
* - One event.
|
||||
* - The weight of the `call`.
|
||||
* - Storage: inserts one item, value size bounded by `MaxSignatories`, with a
|
||||
* deposit taken for its lifetime of
|
||||
* `DepositBase + threshold * DepositFactor`.
|
||||
* -------------------------------
|
||||
* - Base Weight:
|
||||
* - Create: 46.55 + 0.089 * S µs
|
||||
* - Approve: 34.03 + .112 * S µs
|
||||
* - Complete: 40.36 + .225 * S µs
|
||||
* - DB Weight:
|
||||
* - Reads: Multisig Storage, [Caller Account]
|
||||
* - Writes: Multisig Storage, [Caller Account]
|
||||
* - Plus Call Weight
|
||||
* # </weight>
|
||||
**/
|
||||
asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId> | (AccountId | string | Uint8Array)[], maybeTimepoint: Option<Timepoint> | null | object | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously
|
||||
* for this operation will be unreserved on success.
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_.
|
||||
*
|
||||
* - `threshold`: The total number of approvals for this dispatch before it is executed.
|
||||
* - `other_signatories`: The accounts (other than the sender) who can approve this
|
||||
* dispatch. May not be empty.
|
||||
* - `timepoint`: The timepoint (block number and transaction index) of the first approval
|
||||
* transaction for this dispatch.
|
||||
* - `call_hash`: The hash of the call to be executed.
|
||||
*
|
||||
* # <weight>
|
||||
* - `O(S)`.
|
||||
* - Up to one balance-reserve or unreserve operation.
|
||||
* - One passthrough operation, one insert, both `O(S)` where `S` is the number of
|
||||
* signatories. `S` is capped by `MaxSignatories`, with weight being proportional.
|
||||
* - One encode & hash, both of complexity `O(S)`.
|
||||
* - One event.
|
||||
* - I/O: 1 read `O(S)`, one remove.
|
||||
* - Storage: removes one item.
|
||||
* ----------------------------------
|
||||
* - Base Weight: 37.6 + 0.084 * S
|
||||
* - DB Weight:
|
||||
* - Read: Multisig Storage, [Caller Account]
|
||||
* - Write: Multisig Storage, [Caller Account]
|
||||
* # </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>>;
|
||||
};
|
||||
proxy: {
|
||||
[index: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* Register a proxy account for the sender that is able to make calls on its behalf.
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_.
|
||||
*
|
||||
* Parameters:
|
||||
* - `proxy`: The account that the `caller` would like to make a proxy.
|
||||
* - `proxy_type`: The permissions allowed for this proxy account.
|
||||
*
|
||||
* # <weight>
|
||||
* P is the number of proxies the user has
|
||||
* - Base weight: 17.48 + .176 * P µs
|
||||
* - DB weight: 1 storage read and write.
|
||||
* # </weight>
|
||||
**/
|
||||
addProxy: AugmentedSubmittable<(proxy: AccountId | string | Uint8Array, proxyType: ProxyType | 'Any'|'NonTransfer'|'Governance'|'Staking' | number | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and
|
||||
* initialize it with a proxy of `proxy_type` for `origin` sender.
|
||||
*
|
||||
* Requires a `Signed` origin.
|
||||
*
|
||||
* - `proxy_type`: The type of the proxy that the sender will be registered as over the
|
||||
* new account. This will almost always be the most permissive `ProxyType` possible to
|
||||
* allow for maximum flexibility.
|
||||
* - `index`: A disambiguation index, in case this is called multiple times in the same
|
||||
* transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just
|
||||
* want to use `0`.
|
||||
*
|
||||
* Fails with `Duplicate` if this has already been called in this transaction, from the
|
||||
* same sender, with the same parameters.
|
||||
*
|
||||
* Fails if there are insufficient funds to pay for deposit.
|
||||
*
|
||||
* # <weight>
|
||||
* P is the number of proxies the user has
|
||||
* - Base weight: 36.48 + .039 * P µs
|
||||
* - DB weight: 1 storage read and write.
|
||||
* # </weight>
|
||||
**/
|
||||
anonymous: AugmentedSubmittable<(proxyType: ProxyType | 'Any'|'NonTransfer'|'Governance'|'Staking' | number | Uint8Array, index: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Removes a previously spawned anonymous proxy.
|
||||
*
|
||||
* WARNING: **All access to this account will be lost.** Any funds held in it will be
|
||||
* inaccessible.
|
||||
*
|
||||
* Requires a `Signed` origin, and the sender account must have been created by a call to
|
||||
* `anonymous` with corresponding parameters.
|
||||
*
|
||||
* - `spawner`: The account that originally called `anonymous` to create this account.
|
||||
* - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`.
|
||||
* - `proxy_type`: The proxy type originally passed to `anonymous`.
|
||||
* - `height`: The height of the chain when the call to `anonymous` was processed.
|
||||
* - `ext_index`: The extrinsic index in which the call to `anonymous` was processed.
|
||||
*
|
||||
* Fails with `NoPermission` in case the caller is not a previously created anonymous
|
||||
* account whose `anonymous` call has corresponding parameters.
|
||||
*
|
||||
* # <weight>
|
||||
* P is the number of proxies the user has
|
||||
* - Base weight: 15.65 + .137 * P µs
|
||||
* - DB weight: 1 storage read and write.
|
||||
* # </weight>
|
||||
**/
|
||||
killAnonymous: AugmentedSubmittable<(spawner: AccountId | string | Uint8Array, proxyType: ProxyType | 'Any'|'NonTransfer'|'Governance'|'Staking' | number | Uint8Array, index: u16 | AnyNumber | Uint8Array, height: Compact<BlockNumber> | AnyNumber | Uint8Array, extIndex: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Dispatch the given `call` from an account that the sender is authorised for through
|
||||
* `add_proxy`.
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_.
|
||||
*
|
||||
* Parameters:
|
||||
* - `real`: The account that the proxy will make a call on behalf of.
|
||||
* - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.
|
||||
* - `call`: The call to be made by the `real` account.
|
||||
*
|
||||
* # <weight>
|
||||
* P is the number of proxies the user has
|
||||
* - Base weight: 19.87 + .141 * P µs
|
||||
* - DB weight: 1 storage read.
|
||||
* - Plus the weight of the `call`
|
||||
* # </weight>
|
||||
**/
|
||||
proxy: AugmentedSubmittable<(real: AccountId | string | Uint8Array, forceProxyType: Option<ProxyType> | null | object | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Unregister all proxy accounts for the sender.
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_.
|
||||
*
|
||||
* WARNING: This may be called on accounts created by `anonymous`, however if done, then
|
||||
* the unreserved fees will be inaccessible. **All access to this account will be lost.**
|
||||
*
|
||||
* # <weight>
|
||||
* P is the number of proxies the user has
|
||||
* - Base weight: 13.73 + .129 * P µs
|
||||
* - DB weight: 1 storage read and write.
|
||||
* # </weight>
|
||||
**/
|
||||
removeProxies: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Unregister a proxy account for the sender.
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_.
|
||||
*
|
||||
* Parameters:
|
||||
* - `proxy`: The account that the `caller` would like to remove as a proxy.
|
||||
* - `proxy_type`: The permissions currently enabled for the removed proxy account.
|
||||
*
|
||||
* # <weight>
|
||||
* P is the number of proxies the user has
|
||||
* - Base weight: 14.37 + .164 * P µs
|
||||
* - DB weight: 1 storage read and write.
|
||||
* # </weight>
|
||||
**/
|
||||
removeProxy: AugmentedSubmittable<(proxy: AccountId | string | Uint8Array, proxyType: ProxyType | 'Any'|'NonTransfer'|'Governance'|'Staking' | number | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
};
|
||||
recovery: {
|
||||
[index: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
@@ -2131,39 +2257,6 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
nominate: AugmentedSubmittable<(targets: Vec<LookupSource> | (LookupSource | Address | AccountId | AccountIndex | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* **This extrinsic will be removed after `MigrationEra + HistoryDepth` has passed, giving
|
||||
* opportunity for users to claim all rewards before moving to Simple Payouts. After this
|
||||
* time, you should use `payout_stakers` instead.**
|
||||
*
|
||||
* Make one nominator's payout for one era.
|
||||
*
|
||||
* - `who` is the controller account of the nominator to pay out.
|
||||
* - `era` may not be lower than one following the most recently paid era. If it is higher,
|
||||
* then it indicates an instruction to skip the payout of all previous eras.
|
||||
* - `validators` is the list of all validators that `who` had exposure to during `era`,
|
||||
* alongside the index of `who` in the clipped exposure of the validator.
|
||||
* I.e. each element is a tuple of
|
||||
* `(validator, index of `who` in clipped exposure of validator)`.
|
||||
* If it is incomplete, then less than the full reward will be paid out.
|
||||
* It must not exceed `MAX_NOMINATIONS`.
|
||||
*
|
||||
* WARNING: once an era is payed for a validator such validator can't claim the payout of
|
||||
* previous era.
|
||||
*
|
||||
* WARNING: Incorrect arguments here can result in loss of payout. Be very careful.
|
||||
*
|
||||
* # <weight>
|
||||
* - Number of storage read of `O(validators)`; `validators` is the argument of the call,
|
||||
* and is bounded by `MAX_NOMINATIONS`.
|
||||
* - Each storage read is `O(N)` size and decode complexity; `N` is the maximum
|
||||
* nominations that can be given to a single validator.
|
||||
* - Computation complexity: `O(MAX_NOMINATIONS * logN)`; `MAX_NOMINATIONS` is the
|
||||
* maximum number of validators that may be nominated by a single nominator, it is
|
||||
* bounded only economically (all nominators are required to place a minimum stake).
|
||||
* # </weight>
|
||||
**/
|
||||
payoutNominator: AugmentedSubmittable<(era: EraIndex | AnyNumber | Uint8Array, validators: Vec<ITuple<[AccountId, u32]>> | ([AccountId | string | Uint8Array, u32 | AnyNumber | Uint8Array])[]) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Pay out all the stakers behind a single validator for a single era.
|
||||
*
|
||||
@@ -2183,35 +2276,13 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* N is the Number of payouts for the validator (including the validator)
|
||||
* Base Weight: 110 + 54.2 * N µs (Median Slopes)
|
||||
* DB Weight:
|
||||
* - Read: EraElectionStatus, CurrentEra, HistoryDepth, MigrateEra, ErasValidatorReward,
|
||||
* - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward,
|
||||
* ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items)
|
||||
* - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items)
|
||||
* - Write Each: System Account, Locks, Ledger (3 items)
|
||||
* # </weight>
|
||||
**/
|
||||
payoutStakers: AugmentedSubmittable<(validatorStash: AccountId | string | Uint8Array, era: EraIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* **This extrinsic will be removed after `MigrationEra + HistoryDepth` has passed, giving
|
||||
* opportunity for users to claim all rewards before moving to Simple Payouts. After this
|
||||
* time, you should use `payout_stakers` instead.**
|
||||
*
|
||||
* Make one validator's payout for one era.
|
||||
*
|
||||
* - `who` is the controller account of the validator to pay out.
|
||||
* - `era` may not be lower than one following the most recently paid era. If it is higher,
|
||||
* then it indicates an instruction to skip the payout of all previous eras.
|
||||
*
|
||||
* WARNING: once an era is payed for a validator such validator can't claim the payout of
|
||||
* previous era.
|
||||
*
|
||||
* WARNING: Incorrect arguments here can result in loss of payout. Be very careful.
|
||||
*
|
||||
* # <weight>
|
||||
* - Time complexity: O(1).
|
||||
* - Contains a limited number of reads and writes.
|
||||
* # </weight>
|
||||
**/
|
||||
payoutValidator: AugmentedSubmittable<(era: EraIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Remove all data structure concerning a staker/stash once its balance is zero.
|
||||
* This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone
|
||||
@@ -2335,7 +2406,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
**/
|
||||
setValidatorCount: AugmentedSubmittable<(updated: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Submit a phragmen result to the chain. If the solution:
|
||||
* Submit an election result to the chain. If the solution:
|
||||
*
|
||||
* 1. is valid.
|
||||
* 2. has a better score than a potentially existing solution on chain.
|
||||
@@ -2348,7 +2419,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* 2. `assignments`: the compact version of an assignment vector that encodes the edge
|
||||
* weights.
|
||||
*
|
||||
* Both of which may be computed using [`phragmen`], or any other algorithm.
|
||||
* Both of which may be computed using _phragmen_, or any other algorithm.
|
||||
*
|
||||
* Additionally, the submitter must provide:
|
||||
*
|
||||
@@ -2383,7 +2454,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* See `crate::weight` module.
|
||||
* # </weight>
|
||||
**/
|
||||
submitElectionSolution: AugmentedSubmittable<(winners: Vec<ValidatorIndex> | (ValidatorIndex | AnyNumber | Uint8Array)[], compact: CompactAssignments | { votes1?: any; votes2?: any; votes3?: any; votes4?: any; votes5?: any; votes6?: any; votes7?: any; votes8?: any; votes9?: any; votes10?: any; votes11?: any; votes12?: any; votes13?: any; votes14?: any; votes15?: any; votes16?: any } | string | Uint8Array, score: PhragmenScore, era: EraIndex | AnyNumber | Uint8Array, size: ElectionSize | { validators?: any; nominators?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
submitElectionSolution: AugmentedSubmittable<(winners: Vec<ValidatorIndex> | (ValidatorIndex | AnyNumber | Uint8Array)[], compact: CompactAssignments | { votes1?: any; votes2?: any; votes3?: any; votes4?: any; votes5?: any; votes6?: any; votes7?: any; votes8?: any; votes9?: any; votes10?: any; votes11?: any; votes12?: any; votes13?: any; votes14?: any; votes15?: any; votes16?: any } | string | Uint8Array, score: ElectionScore, era: EraIndex | AnyNumber | Uint8Array, size: ElectionSize | { validators?: any; nominators?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Unsigned version of `submit_election_solution`.
|
||||
*
|
||||
@@ -2395,7 +2466,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* See `crate::weight` module.
|
||||
* # </weight>
|
||||
**/
|
||||
submitElectionSolutionUnsigned: AugmentedSubmittable<(winners: Vec<ValidatorIndex> | (ValidatorIndex | AnyNumber | Uint8Array)[], compact: CompactAssignments | { votes1?: any; votes2?: any; votes3?: any; votes4?: any; votes5?: any; votes6?: any; votes7?: any; votes8?: any; votes9?: any; votes10?: any; votes11?: any; votes12?: any; votes13?: any; votes14?: any; votes15?: any; votes16?: any } | string | Uint8Array, score: PhragmenScore, era: EraIndex | AnyNumber | Uint8Array, size: ElectionSize | { validators?: any; nominators?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
submitElectionSolutionUnsigned: AugmentedSubmittable<(winners: Vec<ValidatorIndex> | (ValidatorIndex | AnyNumber | Uint8Array)[], compact: CompactAssignments | { votes1?: any; votes2?: any; votes3?: any; votes4?: any; votes5?: any; votes6?: any; votes7?: any; votes8?: any; votes9?: any; votes10?: any; votes11?: any; votes12?: any; votes13?: any; votes14?: any; votes15?: any; votes16?: any } | string | Uint8Array, score: ElectionScore, era: EraIndex | AnyNumber | Uint8Array, size: ElectionSize | { validators?: any; nominators?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Schedule a portion of the stash to be unlocked ready for transfer out after the bond
|
||||
* period ends. If this leaves an amount actively bonded less than
|
||||
@@ -3015,105 +3086,29 @@ declare module '@polkadot/api/types/submittable' {
|
||||
utility: {
|
||||
[index: 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`.
|
||||
* Send a call through an indexed pseudonym of the sender.
|
||||
*
|
||||
* Payment: `MultisigDepositBase` will be reserved if this is the first approval, plus
|
||||
* `threshold` times `MultisigDepositFactor`. It is returned once this dispatch happens or
|
||||
* is cancelled.
|
||||
* Filter from origin are passed along. The call will be dispatched with an origin which
|
||||
* use the same filter as the origin of this call.
|
||||
*
|
||||
* NOTE: If you need to ensure that any account-based filtering is not honored (i.e.
|
||||
* because you expect `proxy` to have been used prior in the call stack and you do not want
|
||||
* the call restrictions to apply to any sub-accounts), then use `as_sub` instead.
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_.
|
||||
*
|
||||
* - `threshold`: The total number of approvals for this dispatch before it is executed.
|
||||
* - `other_signatories`: The accounts (other than the sender) who can approve this
|
||||
* dispatch. May not be empty.
|
||||
* - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is
|
||||
* not the first approval, then it must be `Some`, with the timepoint (block number and
|
||||
* transaction index) of the first approval transaction.
|
||||
* - `call_hash`: The hash of the call to be executed.
|
||||
*
|
||||
* NOTE: If this is the final approval, you will want to use `as_multi` instead.
|
||||
*
|
||||
* # <weight>
|
||||
* - `O(S)`.
|
||||
* - Up to one balance-reserve or unreserve operation.
|
||||
* - One passthrough operation, one insert, both `O(S)` where `S` is the number of
|
||||
* signatories. `S` is capped by `MaxSignatories`, with weight being proportional.
|
||||
* - One encode & hash, both of complexity `O(S)`.
|
||||
* - Up to one binary search and insert (`O(logS + S)`).
|
||||
* - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove.
|
||||
* - One event.
|
||||
* - Storage: inserts one item, value size bounded by `MaxSignatories`, with a
|
||||
* deposit taken for its lifetime of
|
||||
* `MultisigDepositBase + threshold * MultisigDepositFactor`.
|
||||
* ----------------------------------
|
||||
* - Base Weight:
|
||||
* - Create: 44.71 + 0.088 * S
|
||||
* - Approve: 31.48 + 0.116 * S
|
||||
* - DB Weight:
|
||||
* - Read: Multisig Storage, [Caller Account]
|
||||
* - Write: Multisig Storage, [Caller Account]
|
||||
* - Base weight: 2.861 µs
|
||||
* - Plus the weight of the `call`
|
||||
* # </weight>
|
||||
**/
|
||||
approveAsMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId> | (AccountId | string | Uint8Array)[], maybeTimepoint: Option<Timepoint> | null | object | string | Uint8Array, callHash: U8aFixed | string | Uint8Array) => SubmittableExtrinsic<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`.
|
||||
*
|
||||
* If there are enough, then dispatch the call. Calls must each fulfil the `IsCallable`
|
||||
* filter.
|
||||
*
|
||||
* Payment: `MultisigDepositBase` will be reserved if this is the first approval, plus
|
||||
* `threshold` times `MultisigDepositFactor`. It is returned once this dispatch happens or
|
||||
* is cancelled.
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_.
|
||||
*
|
||||
* - `threshold`: The total number of approvals for this dispatch before it is executed.
|
||||
* - `other_signatories`: The accounts (other than the sender) who can approve this
|
||||
* dispatch. May not be empty.
|
||||
* - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is
|
||||
* not the first approval, then it must be `Some`, with the timepoint (block number and
|
||||
* transaction index) of the first approval transaction.
|
||||
* - `call`: The call to be executed.
|
||||
*
|
||||
* NOTE: Unless this is the final approval, you will generally want to use
|
||||
* `approve_as_multi` instead, since it only requires a hash of the call.
|
||||
*
|
||||
* Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise
|
||||
* on success, result is `Ok` and the result from the interior call, if it was executed,
|
||||
* may be found in the deposited `MultisigExecuted` event.
|
||||
*
|
||||
* # <weight>
|
||||
* - `O(S + Z + Call)`.
|
||||
* - Up to one balance-reserve or unreserve operation.
|
||||
* - One passthrough operation, one insert, both `O(S)` where `S` is the number of
|
||||
* signatories. `S` is capped by `MaxSignatories`, with weight being proportional.
|
||||
* - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len.
|
||||
* - One encode & hash, both of complexity `O(S)`.
|
||||
* - Up to one binary search and insert (`O(logS + S)`).
|
||||
* - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove.
|
||||
* - One event.
|
||||
* - The weight of the `call`.
|
||||
* - Storage: inserts one item, value size bounded by `MaxSignatories`, with a
|
||||
* deposit taken for its lifetime of
|
||||
* `MultisigDepositBase + threshold * MultisigDepositFactor`.
|
||||
* -------------------------------
|
||||
* - Base Weight:
|
||||
* - Create: 46.55 + 0.089 * S µs
|
||||
* - Approve: 34.03 + .112 * S µs
|
||||
* - Complete: 40.36 + .225 * S µs
|
||||
* - DB Weight:
|
||||
* - Reads: Multisig Storage, [Caller Account]
|
||||
* - Writes: Multisig Storage, [Caller Account]
|
||||
* - Plus Call Weight
|
||||
* # </weight>
|
||||
**/
|
||||
asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId> | (AccountId | string | Uint8Array)[], maybeTimepoint: Option<Timepoint> | null | object | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
asLimitedSub: AugmentedSubmittable<(index: u16 | AnyNumber | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Send a call through an indexed pseudonym of the sender.
|
||||
*
|
||||
* Calls must each fulfil the `IsCallable` filter.
|
||||
* NOTE: If you need to ensure that any account-based filtering is honored (i.e. because
|
||||
* you expect `proxy` to have been used prior in the call stack and you want it to apply to
|
||||
* any sub-accounts), then use `as_limited_sub` instead.
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_.
|
||||
*
|
||||
@@ -3126,13 +3121,13 @@ declare module '@polkadot/api/types/submittable' {
|
||||
/**
|
||||
* Send a batch of dispatch calls.
|
||||
*
|
||||
* This will execute until the first one fails and then stop. Calls must fulfil the
|
||||
* `IsCallable` filter unless the origin is `Root`.
|
||||
*
|
||||
* May be called from any origin.
|
||||
*
|
||||
* - `calls`: The calls to be dispatched from the same origin.
|
||||
*
|
||||
* If origin is root then call are dispatch without checking origin filter. (This includes
|
||||
* bypassing `frame_system::Trait::BaseCallFilter`).
|
||||
*
|
||||
* # <weight>
|
||||
* - Base weight: 14.39 + .987 * c µs
|
||||
* - Plus the sum of the weights of the `calls`.
|
||||
@@ -3146,36 +3141,6 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* event is deposited.
|
||||
**/
|
||||
batch: AugmentedSubmittable<(calls: Vec<Call> | (Call | { callIndex?: any; args?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously
|
||||
* for this operation will be unreserved on success.
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_.
|
||||
*
|
||||
* - `threshold`: The total number of approvals for this dispatch before it is executed.
|
||||
* - `other_signatories`: The accounts (other than the sender) who can approve this
|
||||
* dispatch. May not be empty.
|
||||
* - `timepoint`: The timepoint (block number and transaction index) of the first approval
|
||||
* transaction for this dispatch.
|
||||
* - `call_hash`: The hash of the call to be executed.
|
||||
*
|
||||
* # <weight>
|
||||
* - `O(S)`.
|
||||
* - Up to one balance-reserve or unreserve operation.
|
||||
* - One passthrough operation, one insert, both `O(S)` where `S` is the number of
|
||||
* signatories. `S` is capped by `MaxSignatories`, with weight being proportional.
|
||||
* - One encode & hash, both of complexity `O(S)`.
|
||||
* - One event.
|
||||
* - I/O: 1 read `O(S)`, one remove.
|
||||
* - Storage: removes one item.
|
||||
* ----------------------------------
|
||||
* - Base Weight: 37.6 + 0.084 * S
|
||||
* - DB Weight:
|
||||
* - Read: Multisig Storage, [Caller Account]
|
||||
* - Write: Multisig Storage, [Caller Account]
|
||||
* # </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>>;
|
||||
};
|
||||
vesting: {
|
||||
[index: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
|
||||
@@ -7,7 +7,7 @@ import { RpcInterface } from '@polkadot/rpc-core/types';
|
||||
import { Call, Hash, RuntimeVersion } from '@polkadot/types/interfaces';
|
||||
import { AnyFunction, CallFunction, Codec, CodecArg as Arg, ITuple, InterfaceTypes, ModulesWithCalls, Registry, RegistryTypes } from '@polkadot/types/types';
|
||||
import { SubmittableExtrinsic } from '../submittable/types';
|
||||
import { ApiInterfaceRx, ApiOptions, ApiTypes, DecorateMethod, DecoratedRpc, DecoratedRpcSection, QueryableModuleStorage, QueryableStorage, QueryableStorageEntry, QueryableStorageMulti, QueryableStorageMultiArg, SubmittableExtrinsicFunction, SubmittableExtrinsics, SubmittableModuleExtrinsics } from '../types';
|
||||
import { ApiInterfaceRx, ApiOptions, ApiTypes, DecorateMethod, DecoratedRpc, DecoratedRpcSection, PaginationOptions, QueryableModuleStorage, QueryableStorage, QueryableStorageEntry, QueryableStorageMulti, QueryableStorageMultiArg, SubmittableExtrinsicFunction, SubmittableExtrinsics, SubmittableModuleExtrinsics } from '../types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
import { BehaviorSubject, Observable, combineLatest, of } from 'rxjs';
|
||||
@@ -371,10 +371,20 @@ export default abstract class Decorate<ApiType extends ApiTypes> extends Events
|
||||
memo((doubleMapArg?: Arg): Observable<[StorageKey, Codec][]> =>
|
||||
this._retrieveMapEntries(creator, doubleMapArg)));
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment
|
||||
decorated.entriesPaged = decorateMethod(
|
||||
memo((opts: PaginationOptions): Observable<[StorageKey, Codec][]> =>
|
||||
this._retrieveMapEntriesPaged(creator, opts)));
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment
|
||||
decorated.keys = decorateMethod(
|
||||
memo((doubleMapArg?: Arg): Observable<StorageKey[]> =>
|
||||
this._retrieveMapKeys(creator, doubleMapArg)));
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment
|
||||
decorated.keysPaged = decorateMethod(
|
||||
memo((opts: PaginationOptions): Observable<StorageKey[]> =>
|
||||
this._retrieveMapKeysPaged(creator, opts)));
|
||||
}
|
||||
|
||||
// only support multi where subs are available
|
||||
@@ -505,6 +515,19 @@ export default abstract class Decorate<ApiType extends ApiTypes> extends Events
|
||||
);
|
||||
}
|
||||
|
||||
private _retrieveMapKeysPaged ({ iterKey, meta }: 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');
|
||||
|
||||
const headKey = iterKey(opts.arg).toHex();
|
||||
const getKeysPaged = this._rpcCore.state.getKeysPaged;
|
||||
|
||||
assert(getKeysPaged, 'Pagination not supported by the chain');
|
||||
|
||||
return getKeysPaged(headKey, opts.pageSize, opts.startKey || headKey).pipe(
|
||||
map((keys) => keys.map((key) => key.setMeta(meta)))
|
||||
);
|
||||
}
|
||||
|
||||
private _retrieveMapEntries (entry: StorageEntry, arg?: Arg): Observable<[StorageKey, Codec][]> {
|
||||
return this._retrieveMapKeys(entry, arg).pipe(
|
||||
switchMap((keys) =>
|
||||
@@ -529,6 +552,24 @@ export default abstract class Decorate<ApiType extends ApiTypes> extends Events
|
||||
);
|
||||
}
|
||||
|
||||
private _retrieveMapEntriesPaged (entry: StorageEntry, opts: PaginationOptions): Observable<[StorageKey, Codec][]> {
|
||||
return this._retrieveMapKeysPaged(entry, opts).pipe(
|
||||
switchMap((keys) =>
|
||||
combineLatest<[StorageKey[], ...Codec[][]]>([
|
||||
of(keys),
|
||||
this._rpcCore.state.queryStorageAt
|
||||
? this._rpcCore.state.queryStorageAt<Codec[]>(keys)
|
||||
: this._rpcCore.state.subscribeStorage<Codec[]>(keys).pipe(take(1))
|
||||
])
|
||||
),
|
||||
map(([keys, ...valsArr]): [StorageKey, Codec][] =>
|
||||
valsArr
|
||||
.reduce((result: Codec[], vals) => result.concat(vals), [])
|
||||
.map((value, index) => [keys[index], value])
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
protected _decorateDeriveRx (decorateMethod: DecorateMethod<ApiType>): DeriveAllSections<'rxjs', ExactDerive> {
|
||||
// Pull in derive from api-derive
|
||||
const derive = decorateDerive(this._rx, this._options.derives);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
import { AnyFunction, Callback, Codec } from '@polkadot/types/types';
|
||||
import { AnyFunction, Callback, Codec, CodecArg } from '@polkadot/types/types';
|
||||
|
||||
// Prepend an element V onto the beginning of a tuple T.
|
||||
// Cons<1, [2,3,4]> is [1,2,3,4]
|
||||
@@ -68,4 +68,10 @@ export interface DecorateMethodOptions {
|
||||
methodName?: string;
|
||||
}
|
||||
|
||||
export interface PaginationOptions<ArgType = CodecArg> {
|
||||
arg?: ArgType;
|
||||
pageSize: number;
|
||||
startKey?: string;
|
||||
}
|
||||
|
||||
export type DecorateMethod<ApiType extends ApiTypes> = <Method extends (...args: any[]) => Observable<any>>(method: Method, options?: DecorateMethodOptions) => any;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { Hash } from '@polkadot/types/interfaces';
|
||||
import { AnyFunction, Callback, Codec, CodecArg } from '@polkadot/types/types';
|
||||
import StorageKey, { StorageEntry } from '@polkadot/types/primitive/StorageKey';
|
||||
|
||||
import { ApiTypes, MethodResult, ObsInnerType, PromiseOrObs, UnsubscribePromise } from './base';
|
||||
import { ApiTypes, MethodResult, ObsInnerType, PaginationOptions, PromiseOrObs, UnsubscribePromise } from './base';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface AugmentedQueries<ApiType extends ApiTypes> { }
|
||||
@@ -28,18 +28,19 @@ export type QueryableStorageEntry<ApiType extends ApiTypes> =
|
||||
export interface StorageEntryBase<ApiType extends ApiTypes, F extends AnyFunction> {
|
||||
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>>>(arg?: any) => PromiseOrObs<ApiType, [StorageKey, T][]>;
|
||||
entries: <T extends Codec | any = ObsInnerType<ReturnType<F>>>(arg?: Parameters<F>[0]) => PromiseOrObs<ApiType, [StorageKey, T][]>;
|
||||
entriesPaged: <T extends Codec | any = ObsInnerType<ReturnType<F>>>(opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, [StorageKey, T][]>;
|
||||
hash: (...args: Parameters<F>) => PromiseOrObs<ApiType, Hash>;
|
||||
key: (...args: Parameters<F>) => string;
|
||||
keyPrefix: () => string;
|
||||
keys: (arg?: any) => PromiseOrObs<ApiType, StorageKey[]>;
|
||||
keysPaged: (opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, StorageKey[]>;
|
||||
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][]>;
|
||||
size: (...args: Parameters<F>) => PromiseOrObs<ApiType, u64>;
|
||||
multi: ApiType extends 'rxjs' ? StorageEntryObservableMulti : StorageEntryPromiseMulti;
|
||||
}
|
||||
|
||||
export interface StorageEntryDoubleMap<ApiType extends ApiTypes, F extends AnyFunction> extends StorageEntryBase<ApiType, F> {
|
||||
entries: <T extends Codec | any = ObsInnerType<ReturnType<F>>>(arg?: Parameters<F>[0]) => PromiseOrObs<ApiType, [StorageKey, T][]>;
|
||||
keyPrefix: (key1?: Parameters<F>[0]) => string;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/metadata",
|
||||
"version": "1.17.2",
|
||||
"version": "1.19.1",
|
||||
"description": "Helpers to extract information from runtime metadata",
|
||||
"main": "index.js",
|
||||
"publishConfig": {
|
||||
@@ -27,13 +27,13 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.10.2",
|
||||
"@polkadot/types": "1.17.2",
|
||||
"@polkadot/types-known": "1.17.2",
|
||||
"@polkadot/util": "^2.12.2",
|
||||
"@polkadot/util-crypto": "^2.12.2",
|
||||
"@polkadot/types": "1.19.1",
|
||||
"@polkadot/types-known": "1.19.1",
|
||||
"@polkadot/util": "^2.14.1",
|
||||
"@polkadot/util-crypto": "^2.14.1",
|
||||
"bn.js": "^5.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^2.12.2"
|
||||
"@polkadot/keyring": "^2.14.1"
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -2,7 +2,7 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { FunctionMetadataV11, FunctionMetadataLatest, MetadataV11, MetadataLatest, ModuleMetadataLatest, StorageMetadataV11, StorageMetadataLatest, StorageEntryMetadataLatest } from '@polkadot/types/interfaces/metadata';
|
||||
import { EventMetadataV11, EventMetadataLatest, FunctionMetadataV11, FunctionMetadataLatest, MetadataV11, MetadataLatest, ModuleMetadataLatest, StorageMetadataV11, StorageMetadataLatest, StorageEntryMetadataLatest } from '@polkadot/types/interfaces/metadata';
|
||||
import { Registry, OverrideModuleType } from '@polkadot/types/types';
|
||||
|
||||
import { getModuleTypes } from '@polkadot/types-known';
|
||||
@@ -35,6 +35,18 @@ function convertCalls (registry: Registry, calls: FunctionMetadataV11[], section
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply module-specific type overrides (always be done as part of toLatest)
|
||||
* @internal
|
||||
**/
|
||||
function convertEvents (registry: Registry, events: EventMetadataV11[], sectionTypes: OverrideModuleType): EventMetadataLatest[] {
|
||||
return events.map(({ args, documentation, name }): EventMetadataLatest => {
|
||||
args.forEach((type): void => setTypeOverride(sectionTypes, type));
|
||||
|
||||
return registry.createType('EventMetadataLatest', { args, documentation, name });
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply module-specific storage type overrides (always part of toLatest)
|
||||
* @internal
|
||||
@@ -70,6 +82,7 @@ export default function toLatest (registry: Registry, { extrinsic, modules }: Me
|
||||
extrinsic,
|
||||
modules: modules.map((mod): ModuleMetadataLatest => {
|
||||
const calls = mod.calls.unwrapOr(null);
|
||||
const events = mod.events.unwrapOr(null);
|
||||
const storage = mod.storage.unwrapOr(null);
|
||||
const sectionTypes = getModuleTypes(registry, stringCamelCase(mod.name.toString()));
|
||||
|
||||
@@ -78,6 +91,9 @@ export default function toLatest (registry: Registry, { extrinsic, modules }: Me
|
||||
calls: calls
|
||||
? convertCalls(registry, calls, sectionTypes)
|
||||
: null,
|
||||
events: events
|
||||
? convertEvents(registry, events, sectionTypes)
|
||||
: null,
|
||||
storage: storage
|
||||
? convertStorage(registry, storage, sectionTypes)
|
||||
: null
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/rpc-core",
|
||||
"version": "1.17.2",
|
||||
"version": "1.19.1",
|
||||
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
@@ -27,14 +27,14 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.10.2",
|
||||
"@polkadot/metadata": "1.17.2",
|
||||
"@polkadot/rpc-provider": "1.17.2",
|
||||
"@polkadot/types": "1.17.2",
|
||||
"@polkadot/util": "^2.12.2",
|
||||
"@polkadot/metadata": "1.19.1",
|
||||
"@polkadot/rpc-provider": "1.19.1",
|
||||
"@polkadot/types": "1.19.1",
|
||||
"@polkadot/util": "^2.14.1",
|
||||
"memoizee": "^0.4.14",
|
||||
"rxjs": "^6.5.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^2.12.2"
|
||||
"@polkadot/keyring": "^2.14.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/rpc-provider",
|
||||
"version": "1.17.2",
|
||||
"version": "1.19.1",
|
||||
"description": "Transport providers for the API",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
@@ -27,17 +27,17 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.10.2",
|
||||
"@polkadot/metadata": "1.17.2",
|
||||
"@polkadot/types": "1.17.2",
|
||||
"@polkadot/util": "^2.12.2",
|
||||
"@polkadot/util-crypto": "^2.12.2",
|
||||
"@polkadot/metadata": "1.19.1",
|
||||
"@polkadot/types": "1.19.1",
|
||||
"@polkadot/util": "^2.14.1",
|
||||
"@polkadot/util-crypto": "^2.14.1",
|
||||
"bn.js": "^5.1.2",
|
||||
"eventemitter3": "^4.0.4",
|
||||
"isomorphic-fetch": "^2.2.1",
|
||||
"websocket": "^1.0.31"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^2.12.2",
|
||||
"@polkadot/keyring": "^2.14.1",
|
||||
"mock-socket": "^9.0.3",
|
||||
"nock": "^12.0.3"
|
||||
}
|
||||
|
||||
@@ -48,6 +48,18 @@ describe('decodeResponse', (): void => {
|
||||
).toThrow(/123: test error: Some random error description/);
|
||||
});
|
||||
|
||||
it('allows for number subscription ids', (): void => {
|
||||
expect(
|
||||
coder.decodeResponse({ id: 1, jsonrpc: '2.0', method: 'test', params: { result: 'test result', subscription: 1 } } as JsonRpcResponse)
|
||||
).toEqual('test result');
|
||||
});
|
||||
|
||||
it('allows for string subscription ids', (): void => {
|
||||
expect(
|
||||
coder.decodeResponse({ id: 1, jsonrpc: '2.0', method: 'test', params: { result: 'test result', subscription: 'abc' } } as JsonRpcResponse)
|
||||
).toEqual('test result');
|
||||
});
|
||||
|
||||
it('returns the result', (): void => {
|
||||
expect(
|
||||
coder.decodeResponse({ id: 1, jsonrpc: '2.0', result: 'some result' } as JsonRpcResponse)
|
||||
|
||||
@@ -30,7 +30,7 @@ export default class RpcCoder {
|
||||
|
||||
const isSubscription = !isUndefined(response.params) && !isUndefined(response.method);
|
||||
|
||||
assert(isNumber(response.id) || (isSubscription && isNumber(response.params.subscription)), 'Invalid id field in decoded object');
|
||||
assert(isNumber(response.id) || (isSubscription && (isNumber(response.params.subscription) || isString(response.params.subscription))), 'Invalid id field in decoded object');
|
||||
|
||||
this._checkError(response.error);
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ interface JsonRpcResponseSubscription {
|
||||
params: {
|
||||
error?: JsonRpcResponseBaseError;
|
||||
result: unknown;
|
||||
subscription: number;
|
||||
subscription: number | string;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/typegen",
|
||||
"version": "1.17.2",
|
||||
"version": "1.19.1",
|
||||
"description": "Type generation scripts",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
@@ -36,11 +36,11 @@
|
||||
"@babel/core": "^7.10.2",
|
||||
"@babel/register": "^7.10.1",
|
||||
"@babel/runtime": "^7.10.2",
|
||||
"@polkadot/api": "1.17.2",
|
||||
"@polkadot/metadata": "1.17.2",
|
||||
"@polkadot/rpc-provider": "1.17.2",
|
||||
"@polkadot/types": "1.17.2",
|
||||
"@polkadot/util": "^2.12.2",
|
||||
"@polkadot/api": "1.19.1",
|
||||
"@polkadot/metadata": "1.19.1",
|
||||
"@polkadot/rpc-provider": "1.19.1",
|
||||
"@polkadot/types": "1.19.1",
|
||||
"@polkadot/util": "^2.14.1",
|
||||
"handlebars": "^4.7.6",
|
||||
"websocket": "^1.0.31",
|
||||
"yargs": "^15.3.1"
|
||||
|
||||
@@ -61,6 +61,7 @@ function tsEnum (definitions: Record<string, ModuleTypes>, { name: enumName, sub
|
||||
case TypeDefInfo.Plain:
|
||||
case TypeDefInfo.Tuple:
|
||||
case TypeDefInfo.Vec:
|
||||
case TypeDefInfo.Option:
|
||||
return `${isGetter}${asGetter}`;
|
||||
|
||||
default:
|
||||
@@ -89,6 +90,7 @@ function tsResultGetter (definitions: Record<string, ModuleTypes>, resultName =
|
||||
case TypeDefInfo.Plain:
|
||||
case TypeDefInfo.Tuple:
|
||||
case TypeDefInfo.Vec:
|
||||
case TypeDefInfo.Option:
|
||||
return `${isGetter}${asGetter}`;
|
||||
|
||||
default:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/types-known",
|
||||
"version": "1.17.2",
|
||||
"version": "1.19.1",
|
||||
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
@@ -27,8 +27,8 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-known#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.10.2",
|
||||
"@polkadot/types": "1.17.2",
|
||||
"@polkadot/util": "^2.12.2",
|
||||
"@polkadot/types": "1.19.1",
|
||||
"@polkadot/util": "^2.14.1",
|
||||
"bn.js": "^5.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -7,7 +7,8 @@ import { OverrideModuleType } from '@polkadot/types/types';
|
||||
// type overrides for modules (where duplication between modules exist)
|
||||
const typesModules: Record<string, OverrideModuleType> = {
|
||||
balances: {
|
||||
Releases: 'ReleasesBalances'
|
||||
Releases: 'ReleasesBalances',
|
||||
Status: 'BalanceStatus'
|
||||
},
|
||||
contract: { // old metadata & naming
|
||||
// v2 & v3
|
||||
|
||||
@@ -7,12 +7,23 @@ import { OverrideVersionedType } from '@polkadot/types/types';
|
||||
// these are override types for Polkadot
|
||||
const versioned: OverrideVersionedType[] = [
|
||||
{
|
||||
minmax: [0, undefined],
|
||||
minmax: [0, 3],
|
||||
types: {
|
||||
Address: 'AccountId',
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'AccountId'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [4, undefined],
|
||||
types: {
|
||||
Address: 'AccountId',
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'AccountId',
|
||||
ProxyType: {
|
||||
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'SudoBalances']
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -16,12 +16,23 @@ const versioned: OverrideVersionedType[] = [
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [3, undefined],
|
||||
minmax: [3, 19],
|
||||
types: {
|
||||
Address: 'AccountId',
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'AccountId'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [20, undefined],
|
||||
types: {
|
||||
Address: 'AccountId',
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'AccountId',
|
||||
ProxyType: {
|
||||
_enum: ['Any', 'NonTransfer', 'Staking', 'SudoBalances']
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/types",
|
||||
"version": "1.17.2",
|
||||
"version": "1.19.1",
|
||||
"description": "Implementation of the Parity codec",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
@@ -27,16 +27,16 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.10.2",
|
||||
"@polkadot/metadata": "1.17.2",
|
||||
"@polkadot/util": "^2.12.2",
|
||||
"@polkadot/util-crypto": "^2.12.2",
|
||||
"@polkadot/metadata": "1.19.1",
|
||||
"@polkadot/util": "^2.14.1",
|
||||
"@polkadot/util-crypto": "^2.14.1",
|
||||
"@types/bn.js": "^4.11.6",
|
||||
"bn.js": "^5.1.2",
|
||||
"memoizee": "^0.4.14",
|
||||
"rxjs": "^6.5.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^2.12.2",
|
||||
"@polkadot/keyring": "^2.14.1",
|
||||
"@types/memoizee": "^0.4.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import { RawAuraPreDigest } from '@polkadot/types/interfaces/aura';
|
||||
import { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
|
||||
import { UncleEntryItem } from '@polkadot/types/interfaces/authorship';
|
||||
import { AllowedSlots, BabeAuthorityWeight, BabeBlockWeight, 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 { AccountData, BalanceLock, BalanceLockTo212, Reasons, ReleasesBalances, VestingSchedule, WithdrawReasons } from '@polkadot/types/interfaces/balances';
|
||||
import { AccountData, BalanceLock, BalanceLockTo212, BalanceStatus, Reasons, ReleasesBalances, VestingSchedule, WithdrawReasons } from '@polkadot/types/interfaces/balances';
|
||||
import { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||
import { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
|
||||
import { EthereumAddress, StatementKind } from '@polkadot/types/interfaces/claims';
|
||||
@@ -27,15 +27,15 @@ import { AuthIndex, AuthoritySignature, Heartbeat, HeartbeatTo244, OpaqueMultiad
|
||||
import { CallMetadataV0, DoubleMapTypeLatest, DoubleMapTypeV10, DoubleMapTypeV11, DoubleMapTypeV3, DoubleMapTypeV4, DoubleMapTypeV5, DoubleMapTypeV6, DoubleMapTypeV7, DoubleMapTypeV8, DoubleMapTypeV9, ErrorMetadataV10, ErrorMetadataV11, ErrorMetadataV8, ErrorMetadataV9, EventMetadataLatest, EventMetadataV0, EventMetadataV1, EventMetadataV10, EventMetadataV11, EventMetadataV2, EventMetadataV3, EventMetadataV4, EventMetadataV5, EventMetadataV6, EventMetadataV7, EventMetadataV8, EventMetadataV9, ExtrinsicMetadataLatest, ExtrinsicMetadataV11, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV0, FunctionArgumentMetadataV1, FunctionArgumentMetadataV10, FunctionArgumentMetadataV11, FunctionArgumentMetadataV2, FunctionArgumentMetadataV3, FunctionArgumentMetadataV4, FunctionArgumentMetadataV5, FunctionArgumentMetadataV6, FunctionArgumentMetadataV7, FunctionArgumentMetadataV8, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV0, FunctionMetadataV1, FunctionMetadataV10, FunctionMetadataV11, FunctionMetadataV2, FunctionMetadataV3, FunctionMetadataV4, FunctionMetadataV5, FunctionMetadataV6, FunctionMetadataV7, FunctionMetadataV8, FunctionMetadataV9, MapTypeLatest, MapTypeV0, MapTypeV10, MapTypeV11, MapTypeV2, MapTypeV3, MapTypeV4, MapTypeV5, MapTypeV6, MapTypeV7, MapTypeV8, MapTypeV9, MetadataAll, MetadataLatest, MetadataV0, MetadataV1, MetadataV10, MetadataV11, MetadataV2, MetadataV3, MetadataV4, MetadataV5, MetadataV6, MetadataV7, MetadataV8, MetadataV9, ModuleConstantMetadataLatest, ModuleConstantMetadataV10, ModuleConstantMetadataV11, ModuleConstantMetadataV6, ModuleConstantMetadataV7, ModuleConstantMetadataV8, ModuleConstantMetadataV9, ModuleMetadataLatest, ModuleMetadataV0, ModuleMetadataV1, ModuleMetadataV10, ModuleMetadataV11, ModuleMetadataV2, ModuleMetadataV3, ModuleMetadataV4, ModuleMetadataV5, ModuleMetadataV6, ModuleMetadataV7, ModuleMetadataV8, ModuleMetadataV9, OuterDispatchCallV0, OuterDispatchMetadataV0, OuterEventEventMetadataEventsV0, OuterEventEventMetadataV0, OuterEventMetadataV0, PlainTypeLatest, PlainTypeV0, PlainTypeV10, PlainTypeV11, PlainTypeV2, PlainTypeV3, PlainTypeV4, PlainTypeV5, PlainTypeV6, PlainTypeV7, PlainTypeV8, PlainTypeV9, RuntimeModuleMetadataV0, StorageEntryMetadataLatest, StorageEntryMetadataV10, StorageEntryMetadataV11, StorageEntryMetadataV6, StorageEntryMetadataV7, StorageEntryMetadataV8, StorageEntryMetadataV9, StorageEntryModifierLatest, StorageEntryModifierV10, StorageEntryModifierV11, StorageEntryModifierV6, StorageEntryModifierV7, StorageEntryModifierV8, StorageEntryModifierV9, StorageEntryTypeLatest, StorageEntryTypeV10, StorageEntryTypeV11, StorageEntryTypeV6, StorageEntryTypeV7, StorageEntryTypeV8, StorageEntryTypeV9, StorageFunctionMetadataV0, StorageFunctionMetadataV1, StorageFunctionMetadataV2, StorageFunctionMetadataV3, StorageFunctionMetadataV4, StorageFunctionMetadataV5, StorageFunctionModifierV0, StorageFunctionModifierV1, StorageFunctionModifierV2, StorageFunctionModifierV3, StorageFunctionModifierV4, StorageFunctionModifierV5, StorageFunctionTypeV0, StorageFunctionTypeV1, StorageFunctionTypeV2, StorageFunctionTypeV3, StorageFunctionTypeV4, StorageFunctionTypeV5, StorageHasher, StorageHasherV10, StorageHasherV11, StorageHasherV4, StorageHasherV5, StorageHasherV6, StorageHasherV7, StorageHasherV8, StorageHasherV9, StorageMetadataLatest, StorageMetadataV0, StorageMetadataV10, StorageMetadataV11, StorageMetadataV7, StorageMetadataV8, StorageMetadataV9 } from '@polkadot/types/interfaces/metadata';
|
||||
import { StorageKind } from '@polkadot/types/interfaces/offchain';
|
||||
import { DeferredOffenceOf, Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';
|
||||
import { AttestedCandidate, AuctionIndex, Bidder, CandidateReceipt, CollatorId, CollatorSignature, DoubleVoteReport, DoubleVoteReportProof, DoubleVoteReportStatement, EgressQueueRoot, HeadData, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, LeasePeriod, LeasePeriodOf, NewBidder, ParaId, ParaIdOf, ParaInfo, ParaPastCodeMeta, ParaScheduling, ParachainDispatchOrigin, Retriable, SigningContext, SlotRange, Statement, SubId, UpwardMessage, ValidationCode, ValidatorSignature, ValidityAttestation, WinningData, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
|
||||
import { AbridgedCandidateReceipt, AttestedCandidate, AuctionIndex, Bidder, CandidateCommitments, CandidateReceipt, CollatorId, CollatorSignature, DoubleVoteReport, DownwardMessage, GlobalValidationSchedule, HeadData, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, LeasePeriod, LeasePeriodOf, LocalValidationData, NewBidder, ParaId, ParaInfo, ParaPastCodeMeta, ParaScheduling, ParachainDispatchOrigin, Remark, Retriable, Scheduling, SigningContext, SlotRange, Statement, SubId, UpwardMessage, ValidationCode, ValidatorSignature, ValidityAttestation, WinningData, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
|
||||
import { RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
|
||||
import { RpcMethods } from '@polkadot/types/interfaces/rpc';
|
||||
import { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, ChangesTrieConfiguration, Consensus, ConsensusEngineId, Digest, DigestItem, DispatchClass, DispatchInfo, DispatchInfoTo190, DispatchInfoTo244, ExtrinsicsWeight, Fixed128, Fixed64, H160, H256, H512, Hash, Header, Index, Justification, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, Origin, Pays, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, RuntimeDbWeight, Seal, SealV0, SignedBlock, StorageData, ValidatorId, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
|
||||
import { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, ChangesTrieConfiguration, Consensus, ConsensusEngineId, Digest, DigestItem, DispatchClass, DispatchInfo, DispatchInfoTo190, DispatchInfoTo244, ExtrinsicsWeight, Fixed128, Fixed64, H160, H256, H512, Hash, Header, Index, Justification, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, Origin, Pays, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, ProxyType, RuntimeDbWeight, Seal, SealV0, SignedBlock, StorageData, ValidatorId, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
|
||||
import { Period, Priority, SchedulePeriod, SchedulePriority, Scheduled, TaskAddress } from '@polkadot/types/interfaces/scheduler';
|
||||
import { FullIdentification, IdentificationTuple, Keys, MembershipProof, SessionIndex, SessionKeys1, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6, ValidatorCount } from '@polkadot/types/interfaces/session';
|
||||
import { Bid, BidKind, SocietyJudgement, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
|
||||
import { ActiveEraInfo, CompactAssignments, CompactScore, ElectionCompute, ElectionResult, ElectionSize, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, NominatorIndex, OffchainAccuracy, PerU16, PhragmenScore, Points, ReleasesStaking, RewardDestination, RewardPoint, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, StakingLedgerTo240, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196 } from '@polkadot/types/interfaces/staking';
|
||||
import { ActiveEraInfo, CompactAssignments, CompactScore, ElectionCompute, ElectionResult, ElectionScore, ElectionSize, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, NominatorIndex, OffchainAccuracy, PerU16, PhragmenScore, Points, ReleasesStaking, RewardDestination, RewardPoint, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, StakingLedgerTo240, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196 } from '@polkadot/types/interfaces/staking';
|
||||
import { ApiId, KeyValueOption, ReadProof, RuntimeVersion, RuntimeVersionApi, StorageChangeSet } from '@polkadot/types/interfaces/state';
|
||||
import { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
|
||||
import { AccountInfo, ChainProperties, ChainType, DigestOf, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, EventRecordTo76, Health, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, Phase, RefCount } from '@polkadot/types/interfaces/system';
|
||||
@@ -265,6 +265,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
PhantomData: PhantomData;
|
||||
'Option<PhantomData>': Option<PhantomData>;
|
||||
'Vec<PhantomData>': Vec<PhantomData>;
|
||||
ProxyType: ProxyType;
|
||||
'Option<ProxyType>': Option<ProxyType>;
|
||||
'Vec<ProxyType>': Vec<ProxyType>;
|
||||
RuntimeDbWeight: RuntimeDbWeight;
|
||||
'Option<RuntimeDbWeight>': Option<RuntimeDbWeight>;
|
||||
'Vec<RuntimeDbWeight>': Vec<RuntimeDbWeight>;
|
||||
@@ -381,6 +384,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
BalanceLock: BalanceLock;
|
||||
'Option<BalanceLock>': Option<BalanceLock>;
|
||||
'Vec<BalanceLock>': Vec<BalanceLock>;
|
||||
BalanceStatus: BalanceStatus;
|
||||
'Option<BalanceStatus>': Option<BalanceStatus>;
|
||||
'Vec<BalanceStatus>': Vec<BalanceStatus>;
|
||||
ReleasesBalances: ReleasesBalances;
|
||||
'Option<ReleasesBalances>': Option<ReleasesBalances>;
|
||||
'Vec<ReleasesBalances>': Vec<ReleasesBalances>;
|
||||
@@ -888,6 +894,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
ElectionResult: ElectionResult;
|
||||
'Option<ElectionResult>': Option<ElectionResult>;
|
||||
'Vec<ElectionResult>': Vec<ElectionResult>;
|
||||
ElectionScore: ElectionScore;
|
||||
'Option<ElectionScore>': Option<ElectionScore>;
|
||||
'Vec<ElectionScore>': Vec<ElectionScore>;
|
||||
ElectionSize: ElectionSize;
|
||||
'Option<ElectionSize>': Option<ElectionSize>;
|
||||
'Vec<ElectionSize>': Vec<ElectionSize>;
|
||||
@@ -1130,6 +1139,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
StatementKind: StatementKind;
|
||||
'Option<StatementKind>': Option<StatementKind>;
|
||||
'Vec<StatementKind>': Vec<StatementKind>;
|
||||
AbridgedCandidateReceipt: AbridgedCandidateReceipt;
|
||||
'Option<AbridgedCandidateReceipt>': Option<AbridgedCandidateReceipt>;
|
||||
'Vec<AbridgedCandidateReceipt>': Vec<AbridgedCandidateReceipt>;
|
||||
AttestedCandidate: AttestedCandidate;
|
||||
'Option<AttestedCandidate>': Option<AttestedCandidate>;
|
||||
'Vec<AttestedCandidate>': Vec<AttestedCandidate>;
|
||||
@@ -1140,6 +1152,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
Bidder: Bidder;
|
||||
'Option<Bidder>': Option<Bidder>;
|
||||
'Vec<Bidder>': Vec<Bidder>;
|
||||
CandidateCommitments: CandidateCommitments;
|
||||
'Option<CandidateCommitments>': Option<CandidateCommitments>;
|
||||
'Vec<CandidateCommitments>': Vec<CandidateCommitments>;
|
||||
CandidateReceipt: CandidateReceipt;
|
||||
'Option<CandidateReceipt>': Option<CandidateReceipt>;
|
||||
'Vec<CandidateReceipt>': Vec<CandidateReceipt>;
|
||||
@@ -1152,58 +1167,61 @@ declare module '@polkadot/types/types/registry' {
|
||||
DoubleVoteReport: DoubleVoteReport;
|
||||
'Option<DoubleVoteReport>': Option<DoubleVoteReport>;
|
||||
'Vec<DoubleVoteReport>': Vec<DoubleVoteReport>;
|
||||
DoubleVoteReportProof: DoubleVoteReportProof;
|
||||
'Option<DoubleVoteReportProof>': Option<DoubleVoteReportProof>;
|
||||
'Vec<DoubleVoteReportProof>': Vec<DoubleVoteReportProof>;
|
||||
DoubleVoteReportStatement: DoubleVoteReportStatement;
|
||||
'Option<DoubleVoteReportStatement>': Option<DoubleVoteReportStatement>;
|
||||
'Vec<DoubleVoteReportStatement>': Vec<DoubleVoteReportStatement>;
|
||||
EgressQueueRoot: EgressQueueRoot;
|
||||
'Option<EgressQueueRoot>': Option<EgressQueueRoot>;
|
||||
'Vec<EgressQueueRoot>': Vec<EgressQueueRoot>;
|
||||
DownwardMessage: DownwardMessage;
|
||||
'Option<DownwardMessage>': Option<DownwardMessage>;
|
||||
'Vec<DownwardMessage>': Vec<DownwardMessage>;
|
||||
GlobalValidationSchedule: GlobalValidationSchedule;
|
||||
'Option<GlobalValidationSchedule>': Option<GlobalValidationSchedule>;
|
||||
'Vec<GlobalValidationSchedule>': Vec<GlobalValidationSchedule>;
|
||||
HeadData: HeadData;
|
||||
'Option<HeadData>': Option<HeadData>;
|
||||
'Vec<HeadData>': Vec<HeadData>;
|
||||
IncomingParachainDeploy: IncomingParachainDeploy;
|
||||
'Option<IncomingParachainDeploy>': Option<IncomingParachainDeploy>;
|
||||
'Vec<IncomingParachainDeploy>': Vec<IncomingParachainDeploy>;
|
||||
IncomingParachainFixed: IncomingParachainFixed;
|
||||
'Option<IncomingParachainFixed>': Option<IncomingParachainFixed>;
|
||||
'Vec<IncomingParachainFixed>': Vec<IncomingParachainFixed>;
|
||||
IncomingParachain: IncomingParachain;
|
||||
'Option<IncomingParachain>': Option<IncomingParachain>;
|
||||
'Vec<IncomingParachain>': Vec<IncomingParachain>;
|
||||
IncomingParachainFixed: IncomingParachainFixed;
|
||||
'Option<IncomingParachainFixed>': Option<IncomingParachainFixed>;
|
||||
'Vec<IncomingParachainFixed>': Vec<IncomingParachainFixed>;
|
||||
IncomingParachainDeploy: IncomingParachainDeploy;
|
||||
'Option<IncomingParachainDeploy>': Option<IncomingParachainDeploy>;
|
||||
'Vec<IncomingParachainDeploy>': Vec<IncomingParachainDeploy>;
|
||||
LeasePeriod: LeasePeriod;
|
||||
'Option<LeasePeriod>': Option<LeasePeriod>;
|
||||
'Vec<LeasePeriod>': Vec<LeasePeriod>;
|
||||
LeasePeriodOf: LeasePeriodOf;
|
||||
'Option<LeasePeriodOf>': Option<LeasePeriodOf>;
|
||||
'Vec<LeasePeriodOf>': Vec<LeasePeriodOf>;
|
||||
LocalValidationData: LocalValidationData;
|
||||
'Option<LocalValidationData>': Option<LocalValidationData>;
|
||||
'Vec<LocalValidationData>': Vec<LocalValidationData>;
|
||||
NewBidder: NewBidder;
|
||||
'Option<NewBidder>': Option<NewBidder>;
|
||||
'Vec<NewBidder>': Vec<NewBidder>;
|
||||
ParachainDispatchOrigin: ParachainDispatchOrigin;
|
||||
'Option<ParachainDispatchOrigin>': Option<ParachainDispatchOrigin>;
|
||||
'Vec<ParachainDispatchOrigin>': Vec<ParachainDispatchOrigin>;
|
||||
ParaId: ParaId;
|
||||
'Compact<ParaId>': Compact<ParaId>;
|
||||
'Option<ParaId>': Option<ParaId>;
|
||||
'Vec<ParaId>': Vec<ParaId>;
|
||||
ParaIdOf: ParaIdOf;
|
||||
'Option<ParaIdOf>': Option<ParaIdOf>;
|
||||
'Vec<ParaIdOf>': Vec<ParaIdOf>;
|
||||
ParaInfo: ParaInfo;
|
||||
'Option<ParaInfo>': Option<ParaInfo>;
|
||||
'Vec<ParaInfo>': Vec<ParaInfo>;
|
||||
ParaPastCodeMeta: ParaPastCodeMeta;
|
||||
'Option<ParaPastCodeMeta>': Option<ParaPastCodeMeta>;
|
||||
'Vec<ParaPastCodeMeta>': Vec<ParaPastCodeMeta>;
|
||||
ParachainDispatchOrigin: ParachainDispatchOrigin;
|
||||
'Option<ParachainDispatchOrigin>': Option<ParachainDispatchOrigin>;
|
||||
'Vec<ParachainDispatchOrigin>': Vec<ParachainDispatchOrigin>;
|
||||
ParaScheduling: ParaScheduling;
|
||||
'Option<ParaScheduling>': Option<ParaScheduling>;
|
||||
'Vec<ParaScheduling>': Vec<ParaScheduling>;
|
||||
Remark: Remark;
|
||||
'Option<Remark>': Option<Remark>;
|
||||
'Vec<Remark>': Vec<Remark>;
|
||||
Retriable: Retriable;
|
||||
'Option<Retriable>': Option<Retriable>;
|
||||
'Vec<Retriable>': Vec<Retriable>;
|
||||
Scheduling: Scheduling;
|
||||
'Option<Scheduling>': Option<Scheduling>;
|
||||
'Vec<Scheduling>': Vec<Scheduling>;
|
||||
SigningContext: SigningContext;
|
||||
'Option<SigningContext>': Option<SigningContext>;
|
||||
'Vec<SigningContext>': Vec<SigningContext>;
|
||||
@@ -1223,18 +1241,18 @@ declare module '@polkadot/types/types/registry' {
|
||||
ValidationCode: ValidationCode;
|
||||
'Option<ValidationCode>': Option<ValidationCode>;
|
||||
'Vec<ValidationCode>': Vec<ValidationCode>;
|
||||
ValidityAttestation: ValidityAttestation;
|
||||
'Option<ValidityAttestation>': Option<ValidityAttestation>;
|
||||
'Vec<ValidityAttestation>': Vec<ValidityAttestation>;
|
||||
ValidatorSignature: ValidatorSignature;
|
||||
'Option<ValidatorSignature>': Option<ValidatorSignature>;
|
||||
'Vec<ValidatorSignature>': Vec<ValidatorSignature>;
|
||||
WinningDataEntry: WinningDataEntry;
|
||||
'Option<WinningDataEntry>': Option<WinningDataEntry>;
|
||||
'Vec<WinningDataEntry>': Vec<WinningDataEntry>;
|
||||
ValidityAttestation: ValidityAttestation;
|
||||
'Option<ValidityAttestation>': Option<ValidityAttestation>;
|
||||
'Vec<ValidityAttestation>': Vec<ValidityAttestation>;
|
||||
WinningData: WinningData;
|
||||
'Option<WinningData>': Option<WinningData>;
|
||||
'Vec<WinningData>': Vec<WinningData>;
|
||||
WinningDataEntry: WinningDataEntry;
|
||||
'Option<WinningDataEntry>': Option<WinningDataEntry>;
|
||||
'Vec<WinningDataEntry>': Vec<WinningDataEntry>;
|
||||
CallMetadataV0: CallMetadataV0;
|
||||
'Option<CallMetadataV0>': Option<CallMetadataV0>;
|
||||
'Vec<CallMetadataV0>': Vec<CallMetadataV0>;
|
||||
|
||||
@@ -194,6 +194,13 @@ export default class Call extends Struct implements IMethod {
|
||||
return this.registry.findMetaCall(this.callIndex).method;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Returns the name of the method
|
||||
*/
|
||||
public get method (): string {
|
||||
return this.methodName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Returns the module containing the method
|
||||
*/
|
||||
@@ -201,6 +208,13 @@ export default class Call extends Struct implements IMethod {
|
||||
return this.registry.findMetaCall(this.callIndex).section;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Returns the module containing the method
|
||||
*/
|
||||
public get section (): string {
|
||||
return this.sectionName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
|
||||
*/
|
||||
|
||||
@@ -27,6 +27,9 @@ export default {
|
||||
amount: 'Balance',
|
||||
reasons: 'Reasons'
|
||||
},
|
||||
BalanceStatus: {
|
||||
_enum: ['Free', 'Reserved']
|
||||
},
|
||||
ReleasesBalances: {
|
||||
_enum: ['V1_0_0', 'V2_0_0']
|
||||
},
|
||||
|
||||
@@ -27,6 +27,12 @@ export interface BalanceLockTo212 extends Struct {
|
||||
readonly reasons: WithdrawReasons;
|
||||
}
|
||||
|
||||
/** @name BalanceStatus */
|
||||
export interface BalanceStatus extends Enum {
|
||||
readonly isFree: boolean;
|
||||
readonly isReserved: boolean;
|
||||
}
|
||||
|
||||
/** @name Reasons */
|
||||
export interface Reasons extends Enum {
|
||||
readonly isFee: boolean;
|
||||
|
||||
@@ -7,11 +7,22 @@
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
const SLOT_RANGE_COUNT = 10;
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
AbridgedCandidateReceipt: {
|
||||
parachainIndex: 'ParaId',
|
||||
relayParent: 'Hash',
|
||||
headData: 'HeadData',
|
||||
collator: 'CollatorId',
|
||||
signature: 'CollatorSignature',
|
||||
povBlockHash: 'Hash',
|
||||
commitments: 'CandidateCommitments'
|
||||
},
|
||||
AttestedCandidate: {
|
||||
candidate: 'CandidateReceipt',
|
||||
candidate: 'AbridgedCandidateReceipt',
|
||||
validityVotes: 'Vec<ValidityAttestation>',
|
||||
validatorIndices: 'BitVec'
|
||||
},
|
||||
@@ -22,42 +33,45 @@ export default {
|
||||
Existing: 'ParaId'
|
||||
}
|
||||
},
|
||||
CandidateCommitments: {
|
||||
fees: 'Balance',
|
||||
upwardMessages: 'Vec<UpwardMessage>',
|
||||
erasureRoot: 'Hash',
|
||||
newValidationCode: 'Option<ValidationCode>',
|
||||
processedDownwardMessages: 'u32'
|
||||
},
|
||||
CandidateReceipt: {
|
||||
parachainIndex: 'ParaId',
|
||||
relayParent: 'Hash',
|
||||
head_data: 'HeadData',
|
||||
collator: 'CollatorId',
|
||||
signature: 'CollatorSignature',
|
||||
headData: 'HeadData',
|
||||
egressQueueRoots: 'Vec<(ParaId, Hash)>',
|
||||
fees: 'Balance',
|
||||
blockDataHash: 'Hash',
|
||||
upwardMessages: 'Vec<UpwardMessage>',
|
||||
erasureRoot: 'Hash'
|
||||
povBlockHash: 'Hash',
|
||||
globalValidation: 'GlobalValidationSchedule',
|
||||
localValidation: 'LocalValidationData',
|
||||
commitments: 'CandidateCommitments'
|
||||
},
|
||||
CollatorId: 'H256',
|
||||
CollatorId: '[u8; 32]',
|
||||
CollatorSignature: 'Signature',
|
||||
DoubleVoteReport: {
|
||||
identity: 'ValidatorId',
|
||||
first: 'DoubleVoteReportStatement',
|
||||
second: 'DoubleVoteReportStatement',
|
||||
proof: 'DoubleVoteReportProof',
|
||||
first: '(Statement, ValidatorSignature)',
|
||||
second: '(Statement, ValidatorSignature)',
|
||||
proof: 'MembershipProof',
|
||||
signingContext: 'SigningContext'
|
||||
},
|
||||
// session::historical::Proof
|
||||
DoubleVoteReportProof: {
|
||||
session: 'SessionIndex',
|
||||
trieNodes: 'Vec<Bytes>'
|
||||
DownwardMessage: {
|
||||
_enum: {
|
||||
TransferInto: '(AccountId, Balance, Remark)',
|
||||
Opaque: 'Vec<u8>'
|
||||
}
|
||||
},
|
||||
GlobalValidationSchedule: {
|
||||
maxCodeSize: 'u32',
|
||||
maxHeadDataSize: 'u32',
|
||||
blockNumber: 'BlockNumber'
|
||||
},
|
||||
DoubleVoteReportStatement: '(Statement, ValidatorSignature)',
|
||||
EgressQueueRoot: '(ParaId, Hash)',
|
||||
HeadData: 'Bytes',
|
||||
IncomingParachainDeploy: {
|
||||
code: 'Bytes',
|
||||
initialHeadData: 'Bytes'
|
||||
},
|
||||
IncomingParachainFixed: {
|
||||
codeHash: 'Hash',
|
||||
initialHeadData: 'Bytes'
|
||||
},
|
||||
IncomingParachain: {
|
||||
_enum: {
|
||||
Unset: 'NewBidder',
|
||||
@@ -65,55 +79,60 @@ export default {
|
||||
Deploy: 'IncomingParachainDeploy'
|
||||
}
|
||||
},
|
||||
IncomingParachainFixed: {
|
||||
codeHash: 'Hash',
|
||||
codeSize: 'u32',
|
||||
initialHeadData: 'HeadData'
|
||||
},
|
||||
IncomingParachainDeploy: {
|
||||
code: 'ValidationCode',
|
||||
initialHeadData: 'HeadData'
|
||||
},
|
||||
LeasePeriod: 'BlockNumber',
|
||||
LeasePeriodOf: 'LeasePeriod',
|
||||
LocalValidationData: {
|
||||
parentHead: 'HeadData',
|
||||
balance: 'Balance',
|
||||
codeUpgradeAllowed: 'Option<BlockNumber>'
|
||||
},
|
||||
NewBidder: {
|
||||
who: 'AccountId',
|
||||
sub: 'SubId'
|
||||
},
|
||||
ParachainDispatchOrigin: {
|
||||
_enum: ['Signed', 'Parachain', 'Root']
|
||||
},
|
||||
ParaId: 'u32',
|
||||
ParaIdOf: 'ParaId',
|
||||
ParaInfo: {
|
||||
scheduling: 'ParaScheduling'
|
||||
scheduling: 'Scheduling'
|
||||
},
|
||||
ParaPastCodeMeta: {
|
||||
upgradeTimes: 'Vec<BlockNumber>',
|
||||
lastPruned: 'Option<BlockNumber>'
|
||||
},
|
||||
ParachainDispatchOrigin: {
|
||||
_enum: ['Signed', 'Parachain']
|
||||
},
|
||||
ParaScheduling: {
|
||||
_enum: ['Always', 'Dynamic']
|
||||
},
|
||||
Remark: '[u8; 32]',
|
||||
Retriable: {
|
||||
_enum: {
|
||||
Never: 'Null',
|
||||
WithRetries: 'u32'
|
||||
}
|
||||
},
|
||||
Scheduling: {
|
||||
_enum: ['Always', 'Dynamic']
|
||||
},
|
||||
SigningContext: {
|
||||
sessionIndex: 'SessionIndex',
|
||||
parentHash: 'Hash'
|
||||
},
|
||||
SlotRange: {
|
||||
_enum: [
|
||||
'ZeroZero', // 0
|
||||
'ZeroOne', // 1,
|
||||
'ZeroTwo', // 2,
|
||||
'ZeroThree', // 3,
|
||||
'OneOne', // 4,
|
||||
'OneTwo', // 5,
|
||||
'OneThree', // 6,
|
||||
'TwoTwo', // 7,
|
||||
'TwoThree', // 8,
|
||||
'ThreeThree' // 9
|
||||
]
|
||||
_enum: ['ZeroZero', 'ZeroOne', 'ZeroTwo', 'ZeroThree', 'OneOne', 'OneTwo', 'OneThree', 'TwoTwo', 'TwoThree', 'ThreeThree']
|
||||
},
|
||||
Statement: {
|
||||
_enum: {
|
||||
// This Null is not in the original, however indexes start at 1
|
||||
Never: 'Null',
|
||||
Never: 'Null', // starts at 1
|
||||
Candidate: 'Hash',
|
||||
Valid: 'Hash',
|
||||
Invalid: 'Hash'
|
||||
@@ -122,19 +141,18 @@ export default {
|
||||
SubId: 'u32',
|
||||
UpwardMessage: {
|
||||
origin: 'ParachainDispatchOrigin',
|
||||
data: 'Bytes'
|
||||
data: 'Vec<u8>'
|
||||
},
|
||||
ValidationCode: 'Bytes',
|
||||
ValidatorSignature: 'Signature',
|
||||
ValidityAttestation: {
|
||||
_enum: {
|
||||
// This Null is not in the original, however indexes start at 1
|
||||
Never: 'Null',
|
||||
Implicit: 'ValidatorSignature', // 1
|
||||
Explicit: 'ValidatorSignature' // 2
|
||||
Never: 'Null', // starts at 1
|
||||
Implicit: 'ValidatorSignature',
|
||||
Explicit: 'ValidatorSignature'
|
||||
}
|
||||
},
|
||||
ValidatorSignature: 'Signature',
|
||||
WinningDataEntry: '(AccountId, ParaIdOf, BalanceOf)',
|
||||
WinningData: '[WinningDataEntry; 10]'
|
||||
WinningData: `[WinningDataEntry; ${SLOT_RANGE_COUNT}]`,
|
||||
WinningDataEntry: 'Option<Bidder>'
|
||||
}
|
||||
} as Definitions;
|
||||
|
||||
@@ -2,15 +2,26 @@
|
||||
/* eslint-disable */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
import { Enum, Option, Struct, Vec } from '@polkadot/types/codec';
|
||||
import { Enum, Option, Struct, U8aFixed, Vec } from '@polkadot/types/codec';
|
||||
import { BitVec, Bytes, u32 } from '@polkadot/types/primitive';
|
||||
import { Signature } from '@polkadot/types/interfaces/extrinsics';
|
||||
import { AccountId, Balance, BalanceOf, BlockNumber, H256, Hash, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
||||
import { SessionIndex } from '@polkadot/types/interfaces/session';
|
||||
import { AccountId, Balance, BlockNumber, Hash, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
||||
import { MembershipProof, SessionIndex } from '@polkadot/types/interfaces/session';
|
||||
|
||||
/** @name AbridgedCandidateReceipt */
|
||||
export interface AbridgedCandidateReceipt extends Struct {
|
||||
readonly parachainIndex: ParaId;
|
||||
readonly relayParent: Hash;
|
||||
readonly headData: HeadData;
|
||||
readonly collator: CollatorId;
|
||||
readonly signature: CollatorSignature;
|
||||
readonly povBlockHash: Hash;
|
||||
readonly commitments: CandidateCommitments;
|
||||
}
|
||||
|
||||
/** @name AttestedCandidate */
|
||||
export interface AttestedCandidate extends Struct {
|
||||
readonly candidate: CandidateReceipt;
|
||||
readonly candidate: AbridgedCandidateReceipt;
|
||||
readonly validityVotes: Vec<ValidityAttestation>;
|
||||
readonly validatorIndices: BitVec;
|
||||
}
|
||||
@@ -26,21 +37,30 @@ export interface Bidder extends Enum {
|
||||
readonly asExisting: ParaId;
|
||||
}
|
||||
|
||||
/** @name CandidateCommitments */
|
||||
export interface CandidateCommitments extends Struct {
|
||||
readonly fees: Balance;
|
||||
readonly upwardMessages: Vec<UpwardMessage>;
|
||||
readonly erasureRoot: Hash;
|
||||
readonly newValidationCode: Option<ValidationCode>;
|
||||
readonly processedDownwardMessages: u32;
|
||||
}
|
||||
|
||||
/** @name CandidateReceipt */
|
||||
export interface CandidateReceipt extends Struct {
|
||||
readonly parachainIndex: ParaId;
|
||||
readonly relayParent: Hash;
|
||||
readonly head_data: HeadData;
|
||||
readonly collator: CollatorId;
|
||||
readonly signature: CollatorSignature;
|
||||
readonly headData: HeadData;
|
||||
readonly egressQueueRoots: Vec<ITuple<[ParaId, Hash]>>;
|
||||
readonly fees: Balance;
|
||||
readonly blockDataHash: Hash;
|
||||
readonly upwardMessages: Vec<UpwardMessage>;
|
||||
readonly erasureRoot: Hash;
|
||||
readonly povBlockHash: Hash;
|
||||
readonly globalValidation: GlobalValidationSchedule;
|
||||
readonly localValidation: LocalValidationData;
|
||||
readonly commitments: CandidateCommitments;
|
||||
}
|
||||
|
||||
/** @name CollatorId */
|
||||
export interface CollatorId extends H256 {}
|
||||
export interface CollatorId extends U8aFixed {}
|
||||
|
||||
/** @name CollatorSignature */
|
||||
export interface CollatorSignature extends Signature {}
|
||||
@@ -48,23 +68,26 @@ export interface CollatorSignature extends Signature {}
|
||||
/** @name DoubleVoteReport */
|
||||
export interface DoubleVoteReport extends Struct {
|
||||
readonly identity: ValidatorId;
|
||||
readonly first: DoubleVoteReportStatement;
|
||||
readonly second: DoubleVoteReportStatement;
|
||||
readonly proof: DoubleVoteReportProof;
|
||||
readonly first: ITuple<[Statement, ValidatorSignature]>;
|
||||
readonly second: ITuple<[Statement, ValidatorSignature]>;
|
||||
readonly proof: MembershipProof;
|
||||
readonly signingContext: SigningContext;
|
||||
}
|
||||
|
||||
/** @name DoubleVoteReportProof */
|
||||
export interface DoubleVoteReportProof extends Struct {
|
||||
readonly session: SessionIndex;
|
||||
readonly trieNodes: Vec<Bytes>;
|
||||
/** @name DownwardMessage */
|
||||
export interface DownwardMessage extends Enum {
|
||||
readonly isTransferInto: boolean;
|
||||
readonly asTransferInto: ITuple<[AccountId, Balance, Remark]>;
|
||||
readonly isOpaque: boolean;
|
||||
readonly asOpaque: Bytes;
|
||||
}
|
||||
|
||||
/** @name DoubleVoteReportStatement */
|
||||
export interface DoubleVoteReportStatement extends ITuple<[Statement, ValidatorSignature]> {}
|
||||
|
||||
/** @name EgressQueueRoot */
|
||||
export interface EgressQueueRoot extends ITuple<[ParaId, Hash]> {}
|
||||
/** @name GlobalValidationSchedule */
|
||||
export interface GlobalValidationSchedule extends Struct {
|
||||
readonly maxCodeSize: u32;
|
||||
readonly maxHeadDataSize: u32;
|
||||
readonly blockNumber: BlockNumber;
|
||||
}
|
||||
|
||||
/** @name HeadData */
|
||||
export interface HeadData extends Bytes {}
|
||||
@@ -81,14 +104,15 @@ export interface IncomingParachain extends Enum {
|
||||
|
||||
/** @name IncomingParachainDeploy */
|
||||
export interface IncomingParachainDeploy extends Struct {
|
||||
readonly code: Bytes;
|
||||
readonly initialHeadData: Bytes;
|
||||
readonly code: ValidationCode;
|
||||
readonly initialHeadData: HeadData;
|
||||
}
|
||||
|
||||
/** @name IncomingParachainFixed */
|
||||
export interface IncomingParachainFixed extends Struct {
|
||||
readonly codeHash: Hash;
|
||||
readonly initialHeadData: Bytes;
|
||||
readonly codeSize: u32;
|
||||
readonly initialHeadData: HeadData;
|
||||
}
|
||||
|
||||
/** @name LeasePeriod */
|
||||
@@ -97,6 +121,13 @@ export interface LeasePeriod extends BlockNumber {}
|
||||
/** @name LeasePeriodOf */
|
||||
export interface LeasePeriodOf extends LeasePeriod {}
|
||||
|
||||
/** @name LocalValidationData */
|
||||
export interface LocalValidationData extends Struct {
|
||||
readonly parentHead: HeadData;
|
||||
readonly balance: Balance;
|
||||
readonly codeUpgradeAllowed: Option<BlockNumber>;
|
||||
}
|
||||
|
||||
/** @name NewBidder */
|
||||
export interface NewBidder extends Struct {
|
||||
readonly who: AccountId;
|
||||
@@ -107,17 +138,15 @@ export interface NewBidder extends Struct {
|
||||
export interface ParachainDispatchOrigin extends Enum {
|
||||
readonly isSigned: boolean;
|
||||
readonly isParachain: boolean;
|
||||
readonly isRoot: boolean;
|
||||
}
|
||||
|
||||
/** @name ParaId */
|
||||
export interface ParaId extends u32 {}
|
||||
|
||||
/** @name ParaIdOf */
|
||||
export interface ParaIdOf extends ParaId {}
|
||||
|
||||
/** @name ParaInfo */
|
||||
export interface ParaInfo extends Struct {
|
||||
readonly scheduling: ParaScheduling;
|
||||
readonly scheduling: Scheduling;
|
||||
}
|
||||
|
||||
/** @name ParaPastCodeMeta */
|
||||
@@ -132,6 +161,9 @@ export interface ParaScheduling extends Enum {
|
||||
readonly isDynamic: boolean;
|
||||
}
|
||||
|
||||
/** @name Remark */
|
||||
export interface Remark extends U8aFixed {}
|
||||
|
||||
/** @name Retriable */
|
||||
export interface Retriable extends Enum {
|
||||
readonly isNever: boolean;
|
||||
@@ -139,6 +171,12 @@ export interface Retriable extends Enum {
|
||||
readonly asWithRetries: u32;
|
||||
}
|
||||
|
||||
/** @name Scheduling */
|
||||
export interface Scheduling extends Enum {
|
||||
readonly isAlways: boolean;
|
||||
readonly isDynamic: boolean;
|
||||
}
|
||||
|
||||
/** @name SigningContext */
|
||||
export interface SigningContext extends Struct {
|
||||
readonly sessionIndex: SessionIndex;
|
||||
@@ -198,6 +236,6 @@ export interface ValidityAttestation extends Enum {
|
||||
export interface WinningData extends Vec<WinningDataEntry> {}
|
||||
|
||||
/** @name WinningDataEntry */
|
||||
export interface WinningDataEntry extends ITuple<[AccountId, ParaIdOf, BalanceOf]> {}
|
||||
export interface WinningDataEntry extends Option<Bidder> {}
|
||||
|
||||
export type PHANTOM_PARACHAINS = 'parachains';
|
||||
|
||||
@@ -92,6 +92,9 @@ export default {
|
||||
Perquintill: 'u64',
|
||||
Phantom: 'Null',
|
||||
PhantomData: 'Null',
|
||||
ProxyType: {
|
||||
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking']
|
||||
},
|
||||
RuntimeDbWeight: {
|
||||
read: 'Weight',
|
||||
write: 'Weight'
|
||||
|
||||
@@ -190,6 +190,14 @@ export interface PhantomData extends Null {}
|
||||
/** @name PreRuntime */
|
||||
export interface PreRuntime extends ITuple<[ConsensusEngineId, Bytes]> {}
|
||||
|
||||
/** @name ProxyType */
|
||||
export interface ProxyType extends Enum {
|
||||
readonly isAny: boolean;
|
||||
readonly isNonTransfer: boolean;
|
||||
readonly isGovernance: boolean;
|
||||
readonly isStaking: boolean;
|
||||
}
|
||||
|
||||
/** @name RuntimeDbWeight */
|
||||
export interface RuntimeDbWeight extends Struct {
|
||||
readonly read: Weight;
|
||||
|
||||
@@ -51,6 +51,7 @@ export default {
|
||||
electedStashes: 'Vec<AccountId>',
|
||||
exposures: 'Vec<(AccountId, Exposure)>'
|
||||
},
|
||||
ElectionScore: '[u128; 3]',
|
||||
ElectionSize: {
|
||||
validators: 'Compact<ValidatorIndex>',
|
||||
nominators: 'Compact<NominatorIndex>'
|
||||
@@ -100,7 +101,7 @@ export default {
|
||||
PhragmenScore: '[u128; 3]',
|
||||
Points: 'u32',
|
||||
ReleasesStaking: {
|
||||
_enum: ['V1_0_0', 'V2_0_0', 'V3_0_0']
|
||||
_enum: ['V1_0_0', 'V2_0_0', 'V3_0_0', 'V4_0_0']
|
||||
},
|
||||
RewardDestination: {
|
||||
_enum: [
|
||||
|
||||
@@ -50,6 +50,9 @@ export interface ElectionResult extends Struct {
|
||||
readonly exposures: Vec<ITuple<[AccountId, Exposure]>>;
|
||||
}
|
||||
|
||||
/** @name ElectionScore */
|
||||
export interface ElectionScore extends Vec<u128> {}
|
||||
|
||||
/** @name ElectionSize */
|
||||
export interface ElectionSize extends Struct {
|
||||
readonly validators: Compact<ValidatorIndex>;
|
||||
@@ -138,6 +141,7 @@ export interface ReleasesStaking extends Enum {
|
||||
readonly isV100: boolean;
|
||||
readonly isV200: boolean;
|
||||
readonly isV300: boolean;
|
||||
readonly isV400: boolean;
|
||||
}
|
||||
|
||||
/** @name RewardDestination */
|
||||
|
||||
Reference in New Issue
Block a user