Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
999dc6f8a5 | ||
|
|
724574afe7 | ||
|
|
0352a30b6b | ||
|
|
41b4cd5c55 | ||
|
|
89f16f3123 | ||
|
|
261a4eede3 | ||
|
|
f623b382f7 | ||
|
|
51537c619a | ||
|
|
3df943572f | ||
|
|
aa10804f6f | ||
|
|
981407f00f | ||
|
|
74f7098e0a | ||
|
|
c2e46bf16d | ||
|
|
78b26d2d40 | ||
|
|
e4d5be85f6 | ||
|
|
23b5601eeb | ||
|
|
859679ce09 | ||
|
|
71543c2351 | ||
|
|
edae5057c8 | ||
|
|
8dd450ded4 | ||
|
|
bc2061723e | ||
|
|
5753e37307 | ||
|
|
e74da70a9d | ||
|
|
737bbc225a | ||
|
|
9313551559 | ||
|
|
5b8f53f050 | ||
|
|
7358e4715b | ||
|
|
a9005d86d6 | ||
|
|
788c05d86e | ||
|
|
de6ba69631 | ||
|
|
4153fed250 | ||
|
|
c68b89831e | ||
|
|
01c9c5ed53 | ||
|
|
573fb135a7 | ||
|
|
0ee7256e37 | ||
|
|
9829ee558c | ||
|
|
34b563dd48 | ||
|
|
f6bb200146 | ||
|
|
af36e3a52c | ||
|
|
c50c7ae6ef | ||
|
|
61739d5ba1 | ||
|
|
34c4a6055e | ||
|
|
27dabdaf52 | ||
|
|
2ee3242f41 |
+6
-1
@@ -9,4 +9,9 @@
|
||||
3.2.2
|
||||
3.2.3
|
||||
|
||||
3.3.2
|
||||
3.3.2
|
||||
3.6.2
|
||||
3.6.3
|
||||
3.6.4
|
||||
3.7.2
|
||||
3.7.3
|
||||
@@ -1,5 +1,43 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 3.7.3 Feb 2, 2021
|
||||
|
||||
Changes:
|
||||
|
||||
- Added Polkadot upgrade block for runtime 27 (known checkpoint optimization)
|
||||
|
||||
|
||||
## 3.7.2 Feb 2, 2021
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjusted the `Keys` type for the 28 runtime on Kusama, Polkadot & Westend
|
||||
|
||||
|
||||
## 3.7.1 Feb 1, 2021
|
||||
|
||||
Upgrade priority: Low. However recommended for current Substrate master, Polkadot and Rococo users and those wishing to support the upcoming Polkadot 28 runtime with the new `MultiAddress`.
|
||||
|
||||
- **Breaking change** As indicated in the 3.5.1 release notes, the `Address`/`LookupSource` defaults have now been adjusted for `MultiAddress`. If your chain does not use these types, explicitly add the correct `Address`/`LookupSource` types. This new extensible format is mean to cater for all address types into the future, removing a lot of discrepancies between chains.
|
||||
|
||||
Contributed:
|
||||
|
||||
- Extraction of the block author on Moonbeam (Thanks to https://github.com/joelamouche)
|
||||
- Cleanup logs with HTTP providers, no subs (Thanks to https://github.com/Tbaut)
|
||||
|
||||
Changes:
|
||||
|
||||
- Allow `.slice` operator on the `Vec` type
|
||||
- Apply `MultiAddress` as a default
|
||||
- Adds support for the upcoming Polkadot 28 and Kusama 2028 runtimes
|
||||
- Add checkpoint for Kusama 2027 upgrade
|
||||
- Update all parachain types (as per latest Rococo)
|
||||
- Correctly use relay blockNumber in parachain validation data
|
||||
- remove information log for capabilities detection (creates confusion)
|
||||
- Remove explicit references to `global`, use the `x-global` detection
|
||||
- Remove explicit `module` in `package.json` (exports map available)
|
||||
|
||||
|
||||
## 3.6.1 Jan 24, 2020
|
||||
|
||||
Upgrade priority: Medium if not already on at least 3.3.1. The next upgrade of Kusama/Polkadot requires it.
|
||||
|
||||
+1
-1
@@ -34,5 +34,5 @@
|
||||
"@types/jest": "^26.0.20",
|
||||
"copyfiles": "^2.4.1"
|
||||
},
|
||||
"version": "3.6.1"
|
||||
"version": "3.7.3"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api-contract",
|
||||
"version": "3.6.1",
|
||||
"version": "3.7.3",
|
||||
"description": "Interfaces for interacting with contracts and contract ABIs",
|
||||
"main": "index.js",
|
||||
"sideEffects": false,
|
||||
@@ -13,10 +13,10 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.12.5",
|
||||
"@polkadot/api": "3.6.1",
|
||||
"@polkadot/types": "3.6.1",
|
||||
"@polkadot/util": "^5.4.2",
|
||||
"@polkadot/x-rxjs": "^5.4.2",
|
||||
"@polkadot/api": "3.7.3",
|
||||
"@polkadot/types": "3.7.3",
|
||||
"@polkadot/util": "^5.5.2",
|
||||
"@polkadot/x-rxjs": "^5.5.2",
|
||||
"bn.js": "^4.11.9"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api-derive",
|
||||
"version": "3.6.1",
|
||||
"version": "3.7.3",
|
||||
"description": "Common functions used across Polkadot, derived from RPC calls and storage queries.",
|
||||
"main": "index.js",
|
||||
"sideEffects": false,
|
||||
@@ -13,16 +13,16 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.12.5",
|
||||
"@polkadot/api": "3.6.1",
|
||||
"@polkadot/rpc-core": "3.6.1",
|
||||
"@polkadot/types": "3.6.1",
|
||||
"@polkadot/util": "^5.4.2",
|
||||
"@polkadot/util-crypto": "^5.4.2",
|
||||
"@polkadot/x-rxjs": "^5.4.2",
|
||||
"@polkadot/api": "3.7.3",
|
||||
"@polkadot/rpc-core": "3.7.3",
|
||||
"@polkadot/types": "3.7.3",
|
||||
"@polkadot/util": "^5.5.2",
|
||||
"@polkadot/util-crypto": "^5.5.2",
|
||||
"@polkadot/x-rxjs": "^5.5.2",
|
||||
"bn.js": "^4.11.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^5.4.2",
|
||||
"@polkadot/rpc-provider": "3.6.1"
|
||||
"@polkadot/keyring": "^5.5.2",
|
||||
"@polkadot/rpc-provider": "3.7.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import type { DeriveStakingQuery } from './types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { isFunction } from '@polkadot/util';
|
||||
import { BN_BILLION, BN_ZERO, isFunction } from '@polkadot/util';
|
||||
import { combineLatest, of } from '@polkadot/x-rxjs';
|
||||
import { map, switchMap } from '@polkadot/x-rxjs/operators';
|
||||
|
||||
@@ -18,29 +18,27 @@ import { memo } from '../util';
|
||||
|
||||
type ErasResult = [{ unwrapOr: (value: BN) => BN }, DeriveEraPoints[], DeriveEraPrefs[], DeriveEraRewards[]];
|
||||
|
||||
const ZERO = new BN(0);
|
||||
const MIN_ONE = new BN(-1);
|
||||
const COMM_DIV = new BN(1_000_000_000);
|
||||
|
||||
function parseRewards (api: ApiInterfaceRx, stashId: AccountId, [, erasPoints, erasPrefs, erasRewards]: ErasResult, exposures: DeriveStakerExposure[]): DeriveStakerReward[] {
|
||||
return exposures.map(({ era, isEmpty, isValidator, nominating, validators: eraValidators }): DeriveStakerReward => {
|
||||
const { eraPoints, validators: allValPoints } = erasPoints.find((p) => p.era.eq(era)) || { eraPoints: ZERO, validators: {} };
|
||||
const { eraPoints, validators: allValPoints } = erasPoints.find((p) => p.era.eq(era)) || { eraPoints: BN_ZERO, validators: {} };
|
||||
const { eraReward } = erasRewards.find((r) => r.era.eq(era)) || { eraReward: api.registry.createType('Balance') };
|
||||
const { validators: allValPrefs } = erasPrefs.find((p) => p.era.eq(era)) || { validators: {} as DeriveEraValPrefs };
|
||||
const validators: Record<string, DeriveStakerRewardValidator> = {};
|
||||
const stakerId = stashId.toString();
|
||||
|
||||
Object.entries(eraValidators).forEach(([validatorId, exposure]): void => {
|
||||
const valPoints = allValPoints[validatorId] || ZERO;
|
||||
const valComm = allValPrefs[validatorId]?.commission.unwrap() || ZERO;
|
||||
const valPoints = allValPoints[validatorId] || BN_ZERO;
|
||||
const valComm = allValPrefs[validatorId]?.commission.unwrap() || BN_ZERO;
|
||||
const expTotal = exposure.total.unwrap();
|
||||
let avail = ZERO;
|
||||
let avail = BN_ZERO;
|
||||
let value: BN | undefined;
|
||||
|
||||
if (!(expTotal.isZero() || valPoints.isZero() || eraPoints.isZero())) {
|
||||
avail = eraReward.mul(valPoints).div(eraPoints);
|
||||
|
||||
const valCut = valComm.mul(avail).div(COMM_DIV);
|
||||
const valCut = valComm.mul(avail).div(BN_BILLION);
|
||||
let staked: BN;
|
||||
|
||||
if (validatorId === stakerId) {
|
||||
@@ -50,10 +48,10 @@ function parseRewards (api: ApiInterfaceRx, stashId: AccountId, [, erasPoints, e
|
||||
|
||||
staked = stakerExp
|
||||
? stakerExp.value.unwrap()
|
||||
: ZERO;
|
||||
: BN_ZERO;
|
||||
}
|
||||
|
||||
value = avail.sub(valCut).imul(staked).div(expTotal).iadd(validatorId === stakerId ? valCut : ZERO);
|
||||
value = avail.sub(valCut).imul(staked).div(expTotal).iadd(validatorId === stakerId ? valCut : BN_ZERO);
|
||||
}
|
||||
|
||||
validators[validatorId] = {
|
||||
@@ -181,7 +179,7 @@ export function _stakerRewards (instanceId: string, api: ApiInterfaceRx): (accou
|
||||
|
||||
return withActive
|
||||
? of(rewards)
|
||||
: filterRewards(api, eras, { migrateEra: erasResult[0].unwrapOr(ZERO), rewards, stakingLedger });
|
||||
: filterRewards(api, eras, { migrateEra: erasResult[0].unwrapOr(BN_ZERO), rewards, stakingLedger });
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
@@ -4,19 +4,17 @@
|
||||
import type { AccountId, Digest } from '@polkadot/types/interfaces';
|
||||
|
||||
export function extractAuthor (digest: Digest, sessionValidators: AccountId[] = []): AccountId | undefined {
|
||||
const [pitem] = digest.logs.filter(({ type }) => type === 'PreRuntime');
|
||||
const [citem] = digest.logs.filter(({ type }) => type === 'Consensus');
|
||||
|
||||
// extract from the substrate 2.0 PreRuntime digest
|
||||
if (pitem) {
|
||||
const [engine, data] = pitem.asPreRuntime;
|
||||
if (citem) {
|
||||
const [engine, data] = citem.asConsensus;
|
||||
|
||||
return engine.extractAuthor(data, sessionValidators);
|
||||
} else {
|
||||
const [citem] = digest.logs.filter(({ type }) => type === 'Consensus');
|
||||
const [pitem] = digest.logs.filter(({ type }) => type === 'PreRuntime');
|
||||
|
||||
// extract author from the consensus (substrate 1.0, digest)
|
||||
if (citem) {
|
||||
const [engine, data] = citem.asConsensus;
|
||||
if (pitem) {
|
||||
const [engine, data] = pitem.asPreRuntime;
|
||||
|
||||
return engine.extractAuthor(data, sessionValidators);
|
||||
}
|
||||
|
||||
+11
-11
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api",
|
||||
"version": "3.6.1",
|
||||
"version": "3.7.3",
|
||||
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
|
||||
"main": "index.js",
|
||||
"sideEffects": [
|
||||
@@ -16,16 +16,16 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.12.5",
|
||||
"@polkadot/api-derive": "3.6.1",
|
||||
"@polkadot/keyring": "^5.4.2",
|
||||
"@polkadot/metadata": "3.6.1",
|
||||
"@polkadot/rpc-core": "3.6.1",
|
||||
"@polkadot/rpc-provider": "3.6.1",
|
||||
"@polkadot/types": "3.6.1",
|
||||
"@polkadot/types-known": "3.6.1",
|
||||
"@polkadot/util": "^5.4.2",
|
||||
"@polkadot/util-crypto": "^5.4.2",
|
||||
"@polkadot/x-rxjs": "^5.4.2",
|
||||
"@polkadot/api-derive": "3.7.3",
|
||||
"@polkadot/keyring": "^5.5.2",
|
||||
"@polkadot/metadata": "3.7.3",
|
||||
"@polkadot/rpc-core": "3.7.3",
|
||||
"@polkadot/rpc-provider": "3.7.3",
|
||||
"@polkadot/types": "3.7.3",
|
||||
"@polkadot/types-known": "3.7.3",
|
||||
"@polkadot/util": "^5.5.2",
|
||||
"@polkadot/util-crypto": "^5.5.2",
|
||||
"@polkadot/x-rxjs": "^5.5.2",
|
||||
"bn.js": "^4.11.9",
|
||||
"eventemitter3": "^4.0.7"
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import type { GrandpaEquivocationProof, KeyOwnerProof } from '@polkadot/types/in
|
||||
import type { IdentityFields, IdentityInfo, IdentityJudgement, RegistrarIndex } from '@polkadot/types/interfaces/identity';
|
||||
import type { Heartbeat } from '@polkadot/types/interfaces/imOnline';
|
||||
import type { ProxyType } from '@polkadot/types/interfaces/proxy';
|
||||
import type { AccountId, AccountIndex, Address, AssetId, Balance, BalanceOf, BlockNumber, Call, CallHashOf, ChangesTrieConfiguration, Hash, Header, KeyValue, LookupSource, Moment, OpaqueCall, Perbill, Percent, Weight } from '@polkadot/types/interfaces/runtime';
|
||||
import type { AccountId, AccountIndex, AssetId, Balance, BalanceOf, BlockNumber, Call, CallHashOf, ChangesTrieConfiguration, Hash, Header, KeyValue, LookupSource, Moment, OpaqueCall, Perbill, Percent, Weight } from '@polkadot/types/interfaces/runtime';
|
||||
import type { Period, Priority } from '@polkadot/types/interfaces/scheduler';
|
||||
import type { Keys } from '@polkadot/types/interfaces/session';
|
||||
import type { SocietyJudgement } from '@polkadot/types/interfaces/society';
|
||||
@@ -46,7 +46,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* Weight: `O(1)`
|
||||
* Modes: Post-existence of `who`; Pre & post Zombie-status of `who`.
|
||||
**/
|
||||
burn: AugmentedSubmittable<(id: Compact<AssetId> | AnyNumber | Uint8Array, who: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, amount: Compact<TAssetBalance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<AssetId>, LookupSource, Compact<TAssetBalance>]>;
|
||||
burn: AugmentedSubmittable<(id: Compact<AssetId> | AnyNumber | Uint8Array, who: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, amount: Compact<TAssetBalance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<AssetId>, LookupSource, Compact<TAssetBalance>]>;
|
||||
/**
|
||||
* Issue a new class of fungible assets from a public origin.
|
||||
*
|
||||
@@ -72,7 +72,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
create: AugmentedSubmittable<(id: Compact<AssetId> | AnyNumber | Uint8Array, admin: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, maxZombies: u32 | AnyNumber | Uint8Array, minBalance: TAssetBalance | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<AssetId>, LookupSource, u32, TAssetBalance]>;
|
||||
create: AugmentedSubmittable<(id: Compact<AssetId> | AnyNumber | Uint8Array, admin: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, maxZombies: u32 | AnyNumber | Uint8Array, minBalance: TAssetBalance | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<AssetId>, LookupSource, u32, TAssetBalance]>;
|
||||
/**
|
||||
* Destroy a class of fungible assets owned by the sender.
|
||||
*
|
||||
@@ -109,7 +109,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
forceCreate: AugmentedSubmittable<(id: Compact<AssetId> | AnyNumber | Uint8Array, owner: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, maxZombies: Compact<u32> | AnyNumber | Uint8Array, minBalance: Compact<TAssetBalance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<AssetId>, LookupSource, Compact<u32>, Compact<TAssetBalance>]>;
|
||||
forceCreate: AugmentedSubmittable<(id: Compact<AssetId> | AnyNumber | Uint8Array, owner: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, maxZombies: Compact<u32> | AnyNumber | Uint8Array, minBalance: Compact<TAssetBalance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<AssetId>, LookupSource, Compact<u32>, Compact<TAssetBalance>]>;
|
||||
/**
|
||||
* Destroy a class of fungible assets.
|
||||
*
|
||||
@@ -144,7 +144,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* Modes: Pre-existence of `dest`; Post-existence of `source`; Prior & post zombie-status
|
||||
* of `source`; Account pre-existence of `dest`.
|
||||
**/
|
||||
forceTransfer: AugmentedSubmittable<(id: Compact<AssetId> | AnyNumber | Uint8Array, source: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, dest: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, amount: Compact<TAssetBalance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<AssetId>, LookupSource, LookupSource, Compact<TAssetBalance>]>;
|
||||
forceTransfer: AugmentedSubmittable<(id: Compact<AssetId> | AnyNumber | Uint8Array, source: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, dest: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, amount: Compact<TAssetBalance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<AssetId>, LookupSource, LookupSource, Compact<TAssetBalance>]>;
|
||||
/**
|
||||
* Disallow further unprivileged transfers from an account.
|
||||
*
|
||||
@@ -157,7 +157,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
freeze: AugmentedSubmittable<(id: Compact<AssetId> | AnyNumber | Uint8Array, who: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<AssetId>, LookupSource]>;
|
||||
freeze: AugmentedSubmittable<(id: Compact<AssetId> | AnyNumber | Uint8Array, who: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<AssetId>, LookupSource]>;
|
||||
/**
|
||||
* Disallow further unprivileged transfers for the asset class.
|
||||
*
|
||||
@@ -184,7 +184,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* Weight: `O(1)`
|
||||
* Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`.
|
||||
**/
|
||||
mint: AugmentedSubmittable<(id: Compact<AssetId> | AnyNumber | Uint8Array, beneficiary: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, amount: Compact<TAssetBalance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<AssetId>, LookupSource, Compact<TAssetBalance>]>;
|
||||
mint: AugmentedSubmittable<(id: Compact<AssetId> | AnyNumber | Uint8Array, beneficiary: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, amount: Compact<TAssetBalance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<AssetId>, LookupSource, Compact<TAssetBalance>]>;
|
||||
/**
|
||||
* Set the maximum number of zombie accounts for an asset.
|
||||
*
|
||||
@@ -239,7 +239,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
setTeam: AugmentedSubmittable<(id: Compact<AssetId> | AnyNumber | Uint8Array, issuer: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, admin: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, freezer: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<AssetId>, LookupSource, LookupSource, LookupSource]>;
|
||||
setTeam: AugmentedSubmittable<(id: Compact<AssetId> | AnyNumber | Uint8Array, issuer: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, admin: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, freezer: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<AssetId>, LookupSource, LookupSource, LookupSource]>;
|
||||
/**
|
||||
* Allow unprivileged transfers from an account again.
|
||||
*
|
||||
@@ -252,7 +252,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
thaw: AugmentedSubmittable<(id: Compact<AssetId> | AnyNumber | Uint8Array, who: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<AssetId>, LookupSource]>;
|
||||
thaw: AugmentedSubmittable<(id: Compact<AssetId> | AnyNumber | Uint8Array, who: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<AssetId>, LookupSource]>;
|
||||
/**
|
||||
* Allow unprivileged transfers for the asset again.
|
||||
*
|
||||
@@ -285,7 +285,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* Modes: Pre-existence of `target`; Post-existence of sender; Prior & post zombie-status
|
||||
* of sender; Account pre-existence of `target`.
|
||||
**/
|
||||
transfer: AugmentedSubmittable<(id: Compact<AssetId> | AnyNumber | Uint8Array, target: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, amount: Compact<TAssetBalance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<AssetId>, LookupSource, Compact<TAssetBalance>]>;
|
||||
transfer: AugmentedSubmittable<(id: Compact<AssetId> | AnyNumber | Uint8Array, target: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, amount: Compact<TAssetBalance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<AssetId>, LookupSource, Compact<TAssetBalance>]>;
|
||||
/**
|
||||
* Change the Owner of an asset.
|
||||
*
|
||||
@@ -298,7 +298,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
transferOwnership: AugmentedSubmittable<(id: Compact<AssetId> | AnyNumber | Uint8Array, owner: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<AssetId>, LookupSource]>;
|
||||
transferOwnership: AugmentedSubmittable<(id: Compact<AssetId> | AnyNumber | Uint8Array, owner: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<AssetId>, LookupSource]>;
|
||||
};
|
||||
authorship: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
@@ -338,7 +338,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* not assumed to be in the overlay.
|
||||
* # </weight>
|
||||
**/
|
||||
forceTransfer: AugmentedSubmittable<(source: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, dest: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, value: Compact<Balance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, LookupSource, Compact<Balance>]>;
|
||||
forceTransfer: AugmentedSubmittable<(source: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, dest: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: Compact<Balance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, LookupSource, Compact<Balance>]>;
|
||||
/**
|
||||
* Set the balances of a given account.
|
||||
*
|
||||
@@ -359,7 +359,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - DB Weight: 1 Read, 1 Write to `who`
|
||||
* # </weight>
|
||||
**/
|
||||
setBalance: AugmentedSubmittable<(who: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, newFree: Compact<Balance> | AnyNumber | Uint8Array, newReserved: Compact<Balance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Compact<Balance>, Compact<Balance>]>;
|
||||
setBalance: AugmentedSubmittable<(who: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, newFree: Compact<Balance> | AnyNumber | Uint8Array, newReserved: Compact<Balance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Compact<Balance>, Compact<Balance>]>;
|
||||
/**
|
||||
* Transfer some liquid free balance to another account.
|
||||
*
|
||||
@@ -389,7 +389,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - Origin account is already in memory, so no DB operations for them.
|
||||
* # </weight>
|
||||
**/
|
||||
transfer: AugmentedSubmittable<(dest: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, value: Compact<Balance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Compact<Balance>]>;
|
||||
transfer: AugmentedSubmittable<(dest: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: Compact<Balance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Compact<Balance>]>;
|
||||
/**
|
||||
* Same as the [`transfer`] call, but with a check that the transfer will not kill the
|
||||
* origin account.
|
||||
@@ -403,7 +403,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already)
|
||||
* #</weight>
|
||||
**/
|
||||
transferKeepAlive: AugmentedSubmittable<(dest: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, value: Compact<Balance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Compact<Balance>]>;
|
||||
transferKeepAlive: AugmentedSubmittable<(dest: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: Compact<Balance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Compact<Balance>]>;
|
||||
};
|
||||
bounties: {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
@@ -441,7 +441,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - O(1).
|
||||
* # </weight>
|
||||
**/
|
||||
awardBounty: AugmentedSubmittable<(bountyId: Compact<BountyIndex> | AnyNumber | Uint8Array, beneficiary: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<BountyIndex>, LookupSource]>;
|
||||
awardBounty: AugmentedSubmittable<(bountyId: Compact<BountyIndex> | AnyNumber | Uint8Array, beneficiary: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<BountyIndex>, LookupSource]>;
|
||||
/**
|
||||
* Claim the payout from an awarded bounty after payout delay.
|
||||
*
|
||||
@@ -504,7 +504,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - O(1).
|
||||
* # </weight>
|
||||
**/
|
||||
proposeCurator: AugmentedSubmittable<(bountyId: Compact<BountyIndex> | AnyNumber | Uint8Array, curator: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, fee: Compact<BalanceOf> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<BountyIndex>, LookupSource, Compact<BalanceOf>]>;
|
||||
proposeCurator: AugmentedSubmittable<(bountyId: Compact<BountyIndex> | AnyNumber | Uint8Array, curator: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, fee: Compact<BalanceOf> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<BountyIndex>, LookupSource, Compact<BalanceOf>]>;
|
||||
/**
|
||||
* Unassign curator from a bounty.
|
||||
*
|
||||
@@ -538,7 +538,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* * If no account exists and the call value is not less than `existential_deposit`,
|
||||
* a regular account will be created and any value will be transferred.
|
||||
**/
|
||||
call: AugmentedSubmittable<(dest: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, value: Compact<BalanceOf> | AnyNumber | Uint8Array, gasLimit: Compact<Gas> | AnyNumber | Uint8Array, data: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Compact<BalanceOf>, Compact<Gas>, Bytes]>;
|
||||
call: AugmentedSubmittable<(dest: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: Compact<BalanceOf> | AnyNumber | Uint8Array, gasLimit: Compact<Gas> | AnyNumber | Uint8Array, data: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Compact<BalanceOf>, Compact<Gas>, Bytes]>;
|
||||
/**
|
||||
* Allows block producers to claim a small reward for evicting a contract. If a block
|
||||
* producer fails to do so, a regular users will be allowed to claim the reward.
|
||||
@@ -1082,7 +1082,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* will go into phragmen, we assume full block for now.
|
||||
* # </weight>
|
||||
**/
|
||||
removeMember: AugmentedSubmittable<(who: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, hasReplacement: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, bool]>;
|
||||
removeMember: AugmentedSubmittable<(who: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, hasReplacement: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, bool]>;
|
||||
/**
|
||||
* Remove `origin` as a voter.
|
||||
*
|
||||
@@ -1215,7 +1215,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* The dispatch origin for this call must be _Signed_ and the sender must have a registered
|
||||
* sub identity of `sub`.
|
||||
**/
|
||||
addSub: AugmentedSubmittable<(sub: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, data: Data | { None: any } | { Raw: any } | { BlakeTwo256: any } | { Sha256: any } | { Keccak256: any } | { ShaThree256: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Data]>;
|
||||
addSub: AugmentedSubmittable<(sub: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, data: Data | { None: any } | { Raw: any } | { BlakeTwo256: any } | { Sha256: any } | { Keccak256: any } | { ShaThree256: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Data]>;
|
||||
/**
|
||||
* Cancel a previous request.
|
||||
*
|
||||
@@ -1278,7 +1278,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - One event.
|
||||
* # </weight>
|
||||
**/
|
||||
killIdentity: AugmentedSubmittable<(target: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource]>;
|
||||
killIdentity: AugmentedSubmittable<(target: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource]>;
|
||||
/**
|
||||
* Provide a judgement for an account's identity.
|
||||
*
|
||||
@@ -1300,7 +1300,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - One event.
|
||||
* # </weight>
|
||||
**/
|
||||
provideJudgement: AugmentedSubmittable<(regIndex: Compact<RegistrarIndex> | AnyNumber | Uint8Array, target: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, judgement: IdentityJudgement | { Unknown: any } | { FeePaid: any } | { Reasonable: any } | { KnownGood: any } | { OutOfDate: any } | { LowQuality: any } | { Erroneous: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<RegistrarIndex>, LookupSource, IdentityJudgement]>;
|
||||
provideJudgement: AugmentedSubmittable<(regIndex: Compact<RegistrarIndex> | AnyNumber | Uint8Array, target: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, judgement: IdentityJudgement | { Unknown: any } | { FeePaid: any } | { Reasonable: any } | { KnownGood: any } | { OutOfDate: any } | { LowQuality: any } | { Erroneous: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<RegistrarIndex>, LookupSource, IdentityJudgement]>;
|
||||
/**
|
||||
* Remove the sender as a sub-account.
|
||||
*
|
||||
@@ -1323,14 +1323,14 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* The dispatch origin for this call must be _Signed_ and the sender must have a registered
|
||||
* sub identity of `sub`.
|
||||
**/
|
||||
removeSub: AugmentedSubmittable<(sub: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource]>;
|
||||
removeSub: AugmentedSubmittable<(sub: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource]>;
|
||||
/**
|
||||
* Alter the associated name of the given sub-account.
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_ and the sender must have a registered
|
||||
* sub identity of `sub`.
|
||||
**/
|
||||
renameSub: AugmentedSubmittable<(sub: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, data: Data | { None: any } | { Raw: any } | { BlakeTwo256: any } | { Sha256: any } | { Keccak256: any } | { ShaThree256: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Data]>;
|
||||
renameSub: AugmentedSubmittable<(sub: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, data: Data | { None: any } | { Raw: any } | { BlakeTwo256: any } | { Sha256: any } | { Keccak256: any } | { ShaThree256: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Data]>;
|
||||
/**
|
||||
* Request a judgement from a registrar.
|
||||
*
|
||||
@@ -2538,7 +2538,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* Total Complexity: O(M + logM + C)
|
||||
* # </weight>
|
||||
**/
|
||||
vote: AugmentedSubmittable<(candidate: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, approve: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, bool]>;
|
||||
vote: AugmentedSubmittable<(candidate: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, approve: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, bool]>;
|
||||
/**
|
||||
* As a member, vouch for someone to join society by placing a bid on their behalf.
|
||||
*
|
||||
@@ -2613,7 +2613,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - Write: Bonded, Payee, [Origin Account], Locks, Ledger
|
||||
* # </weight>
|
||||
**/
|
||||
bond: AugmentedSubmittable<(controller: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, value: Compact<BalanceOf> | AnyNumber | Uint8Array, payee: RewardDestination | { Staked: any } | { Stash: any } | { Controller: any } | { Account: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Compact<BalanceOf>, RewardDestination]>;
|
||||
bond: AugmentedSubmittable<(controller: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: Compact<BalanceOf> | AnyNumber | Uint8Array, payee: RewardDestination | { Staked: any } | { Stash: any } | { Controller: any } | { Account: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Compact<BalanceOf>, RewardDestination]>;
|
||||
/**
|
||||
* Add some extra amount that have appeared in the stash `free_balance` into the balance up
|
||||
* for staking.
|
||||
@@ -2748,7 +2748,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* Note: Making this call only makes sense if you first set the validator preferences to
|
||||
* block any further nominations.
|
||||
**/
|
||||
kick: AugmentedSubmittable<(who: Vec<LookupSource> | (LookupSource | Address | AccountId | AccountIndex | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<LookupSource>]>;
|
||||
kick: AugmentedSubmittable<(who: Vec<LookupSource> | (LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<LookupSource>]>;
|
||||
/**
|
||||
* Declare the desire to nominate `targets` for the origin controller.
|
||||
*
|
||||
@@ -2770,7 +2770,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - Writes: Validators, Nominators
|
||||
* # </weight>
|
||||
**/
|
||||
nominate: AugmentedSubmittable<(targets: Vec<LookupSource> | (LookupSource | Address | AccountId | AccountIndex | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<LookupSource>]>;
|
||||
nominate: AugmentedSubmittable<(targets: Vec<LookupSource> | (LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<LookupSource>]>;
|
||||
/**
|
||||
* Pay out all the stakers behind a single validator for a single era.
|
||||
*
|
||||
@@ -2865,7 +2865,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - Write: Bonded, Ledger New Controller, Ledger Old Controller
|
||||
* # </weight>
|
||||
**/
|
||||
setController: AugmentedSubmittable<(controller: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource]>;
|
||||
setController: AugmentedSubmittable<(controller: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource]>;
|
||||
/**
|
||||
* Set `HistoryDepth` value. This function will delete any history information
|
||||
* when `HistoryDepth` is reduced.
|
||||
@@ -3098,7 +3098,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - One DB change.
|
||||
* # </weight>
|
||||
**/
|
||||
setKey: AugmentedSubmittable<(updated: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource]>;
|
||||
setKey: AugmentedSubmittable<(updated: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource]>;
|
||||
/**
|
||||
* Authenticates the sudo key and dispatches a function call with `Root` origin.
|
||||
*
|
||||
@@ -3125,7 +3125,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - Weight of derivative `call` execution + 10,000.
|
||||
* # </weight>
|
||||
**/
|
||||
sudoAs: AugmentedSubmittable<(who: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Call]>;
|
||||
sudoAs: AugmentedSubmittable<(who: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Call]>;
|
||||
/**
|
||||
* Authenticates the sudo key and dispatches a function call with `Root` origin.
|
||||
* This function does not check the weight of the call, and instead allows the
|
||||
@@ -3612,7 +3612,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - DbWrites: `ProposalCount`, `Proposals`, `origin account`
|
||||
* # </weight>
|
||||
**/
|
||||
proposeSpend: AugmentedSubmittable<(value: Compact<BalanceOf> | AnyNumber | Uint8Array, beneficiary: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<BalanceOf>, LookupSource]>;
|
||||
proposeSpend: AugmentedSubmittable<(value: Compact<BalanceOf> | AnyNumber | Uint8Array, beneficiary: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<BalanceOf>, LookupSource]>;
|
||||
/**
|
||||
* Reject a proposed spend. The original deposit will be slashed.
|
||||
*
|
||||
@@ -3703,7 +3703,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - Writes: Vesting Storage, Balances Locks, Target Account, Source Account
|
||||
* # </weight>
|
||||
**/
|
||||
forceVestedTransfer: AugmentedSubmittable<(source: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, target: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, schedule: VestingInfo | { locked?: any; perBlock?: any; startingBlock?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, LookupSource, VestingInfo]>;
|
||||
forceVestedTransfer: AugmentedSubmittable<(source: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, target: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, schedule: VestingInfo | { locked?: any; perBlock?: any; startingBlock?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, LookupSource, VestingInfo]>;
|
||||
/**
|
||||
* Unlock any vested funds of the sender account.
|
||||
*
|
||||
@@ -3737,7 +3737,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - Writes: Vesting Storage, Balances Locks, Target Account
|
||||
* # </weight>
|
||||
**/
|
||||
vestOther: AugmentedSubmittable<(target: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource]>;
|
||||
vestOther: AugmentedSubmittable<(target: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource]>;
|
||||
/**
|
||||
* Create a vested transfer.
|
||||
*
|
||||
@@ -3756,7 +3756,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]
|
||||
* # </weight>
|
||||
**/
|
||||
vestedTransfer: AugmentedSubmittable<(target: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, schedule: VestingInfo | { locked?: any; perBlock?: any; startingBlock?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, VestingInfo]>;
|
||||
vestedTransfer: AugmentedSubmittable<(target: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, schedule: VestingInfo | { locked?: any; perBlock?: any; startingBlock?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, VestingInfo]>;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -37,10 +37,6 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
||||
constructor (options: ApiOptions, type: ApiTypes, decorateMethod: DecorateMethod<ApiType>) {
|
||||
super(options, type, decorateMethod);
|
||||
|
||||
if (!this.hasSubscriptions) {
|
||||
l.warn('Api will be available in a limited mode since the provider does not support subscriptions');
|
||||
}
|
||||
|
||||
// all injected types added to the registry for overrides
|
||||
this.registry.setKnownTypes(options);
|
||||
|
||||
@@ -64,9 +60,14 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
||||
this._rx.signer = options.signer;
|
||||
|
||||
this._rpcCore.setRegistrySwap((hash: string | Uint8Array) => this.getBlockRegistry(hash));
|
||||
this._rpcCore.provider.on('disconnected', this.#onProviderDisconnect);
|
||||
this._rpcCore.provider.on('error', this.#onProviderError);
|
||||
this._rpcCore.provider.on('connected', this.#onProviderConnect);
|
||||
|
||||
if (this.hasSubscriptions) {
|
||||
this._rpcCore.provider.on('disconnected', this.#onProviderDisconnect);
|
||||
this._rpcCore.provider.on('error', this.#onProviderError);
|
||||
this._rpcCore.provider.on('connected', this.#onProviderConnect);
|
||||
} else {
|
||||
l.warn('Api will be available in a limited mode since the provider does not support subscriptions');
|
||||
}
|
||||
|
||||
// If the provider was instantiated earlier, and has already emitted a
|
||||
// 'connected' event, then the `on('connected')` won't fire anymore. To
|
||||
@@ -193,7 +194,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
||||
if (Object.keys(types).length) {
|
||||
(registry || this.registry).register(types as Record<string, string>);
|
||||
|
||||
l.log(`Capabilities detected${blockHash ? ` (${u8aToHex(u8aToU8a(blockHash))})` : ''}: ${JSON.stringify(types)}`);
|
||||
l.debug(`Capabilities detected${blockHash ? ` (${u8aToHex(u8aToU8a(blockHash))})` : ''}: ${JSON.stringify(types)}`);
|
||||
}
|
||||
})
|
||||
.catch(l.error);
|
||||
|
||||
@@ -12,7 +12,7 @@ import { hexToU8a } from '@polkadot/util';
|
||||
import { SingleAccountSigner } from '../../test/util';
|
||||
import { ApiPromise } from '.';
|
||||
|
||||
const TRANSFER_SIG = '0x7a10e5ed9a14284eca7bea53f81631981dddda5a3d2dee973b136475947264801465726e4829ae3994d9058df638d959d4e043c7f1924299546790dda1dea20a';
|
||||
const TRANSFER_SIG = '0x54f39e43f32376a5ab6cdfd4d0ce57802aa9ff85514a7ffa9f2a949078f02beca16af87427c45fe60d54aa847fd241d127ed39e21b101806f6b1f50f7a82500b';
|
||||
|
||||
describe('ApiPromise', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/metadata",
|
||||
"version": "3.6.1",
|
||||
"version": "3.7.3",
|
||||
"description": "Helpers to extract information from runtime metadata",
|
||||
"main": "index.js",
|
||||
"sideEffects": [
|
||||
@@ -16,13 +16,13 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.12.5",
|
||||
"@polkadot/types": "3.6.1",
|
||||
"@polkadot/types-known": "3.6.1",
|
||||
"@polkadot/util": "^5.4.2",
|
||||
"@polkadot/util-crypto": "^5.4.2",
|
||||
"@polkadot/types": "3.7.3",
|
||||
"@polkadot/types-known": "3.7.3",
|
||||
"@polkadot/util": "^5.5.2",
|
||||
"@polkadot/util-crypto": "^5.5.2",
|
||||
"bn.js": "^4.11.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^5.4.2"
|
||||
"@polkadot/keyring": "^5.5.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ const registry = new TypeRegistry();
|
||||
const metadata = new Metadata(registry, metadataStatic);
|
||||
|
||||
registry.setMetadata(metadata);
|
||||
registry.register({ Address: 'IndicesLookupSource', LookupSource: 'IndicesLookupSource' });
|
||||
|
||||
const extrinsics = decorateExtrinsics(registry, metadata.asLatest, metadata.version);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/rpc-core",
|
||||
"version": "3.6.1",
|
||||
"version": "3.7.3",
|
||||
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
|
||||
"main": "index.js",
|
||||
"sideEffects": false,
|
||||
@@ -13,13 +13,13 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.12.5",
|
||||
"@polkadot/metadata": "3.6.1",
|
||||
"@polkadot/rpc-provider": "3.6.1",
|
||||
"@polkadot/types": "3.6.1",
|
||||
"@polkadot/util": "^5.4.2",
|
||||
"@polkadot/x-rxjs": "^5.4.2"
|
||||
"@polkadot/metadata": "3.7.3",
|
||||
"@polkadot/rpc-provider": "3.7.3",
|
||||
"@polkadot/types": "3.7.3",
|
||||
"@polkadot/util": "^5.5.2",
|
||||
"@polkadot/x-rxjs": "^5.5.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^5.4.2"
|
||||
"@polkadot/keyring": "^5.5.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/rpc-provider",
|
||||
"version": "3.6.1",
|
||||
"version": "3.7.3",
|
||||
"description": "Transport providers for the API",
|
||||
"main": "index.js",
|
||||
"sideEffects": false,
|
||||
@@ -13,18 +13,19 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.12.5",
|
||||
"@polkadot/types": "3.6.1",
|
||||
"@polkadot/util": "^5.4.2",
|
||||
"@polkadot/util-crypto": "^5.4.2",
|
||||
"@polkadot/x-fetch": "^5.4.2",
|
||||
"@polkadot/x-ws": "^5.4.2",
|
||||
"@polkadot/types": "3.7.3",
|
||||
"@polkadot/util": "^5.5.2",
|
||||
"@polkadot/util-crypto": "^5.5.2",
|
||||
"@polkadot/x-fetch": "^5.5.2",
|
||||
"@polkadot/x-global": "^5.5.2",
|
||||
"@polkadot/x-ws": "^5.5.2",
|
||||
"bn.js": "^4.11.9",
|
||||
"eventemitter3": "^4.0.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^5.4.2",
|
||||
"@polkadot/metadata": "3.6.1",
|
||||
"@polkadot/keyring": "^5.5.2",
|
||||
"@polkadot/metadata": "3.7.3",
|
||||
"mock-socket": "^9.0.3",
|
||||
"nock": "^13.0.6"
|
||||
"nock": "^13.0.7"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import type { JsonRpcResponse, ProviderInterface, ProviderInterfaceCallback, Pro
|
||||
import EventEmitter from 'eventemitter3';
|
||||
|
||||
import { assert, isChildClass, isNull, isUndefined, logger } from '@polkadot/util';
|
||||
import { xglobal } from '@polkadot/x-global';
|
||||
import { WebSocket } from '@polkadot/x-ws';
|
||||
|
||||
import { RpcCoder } from '../coder';
|
||||
@@ -160,7 +161,7 @@ export class WsProvider implements ProviderInterface {
|
||||
public async connect (): Promise<void> {
|
||||
try {
|
||||
this.#endpointIndex = (this.#endpointIndex + 1) % this.#endpoints.length;
|
||||
this.#websocket = typeof global.WebSocket !== 'undefined' && isChildClass(global.WebSocket, WebSocket)
|
||||
this.#websocket = typeof xglobal.WebSocket !== 'undefined' && isChildClass(xglobal.WebSocket, WebSocket)
|
||||
? new WebSocket(this.#endpoints[this.#endpointIndex])
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore - WS may be an instance of w3cwebsocket, which supports headers
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/typegen",
|
||||
"version": "3.6.1",
|
||||
"version": "3.7.3",
|
||||
"description": "Type generation scripts",
|
||||
"main": "index.js",
|
||||
"sideEffects": false,
|
||||
@@ -22,17 +22,17 @@
|
||||
"@babel/core": "^7.12.10",
|
||||
"@babel/register": "^7.12.10",
|
||||
"@babel/runtime": "^7.12.5",
|
||||
"@polkadot/api": "3.6.1",
|
||||
"@polkadot/metadata": "3.6.1",
|
||||
"@polkadot/rpc-provider": "3.6.1",
|
||||
"@polkadot/types": "3.6.1",
|
||||
"@polkadot/util": "^5.4.2",
|
||||
"@polkadot/api": "3.7.3",
|
||||
"@polkadot/metadata": "3.7.3",
|
||||
"@polkadot/rpc-provider": "3.7.3",
|
||||
"@polkadot/types": "3.7.3",
|
||||
"@polkadot/util": "^5.5.2",
|
||||
"handlebars": "^4.7.6",
|
||||
"websocket": "^1.0.33",
|
||||
"yargs": "^16.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/websocket": "^1.0.1",
|
||||
"@types/yargs": "^15.0.12"
|
||||
"@types/yargs": "^15.0.13"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/types-known",
|
||||
"version": "3.6.1",
|
||||
"version": "3.7.3",
|
||||
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
|
||||
"main": "index.js",
|
||||
"sideEffects": false,
|
||||
@@ -13,8 +13,9 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-known#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.12.5",
|
||||
"@polkadot/types": "3.6.1",
|
||||
"@polkadot/util": "^5.4.2",
|
||||
"@polkadot/networks": "^5.5.2",
|
||||
"@polkadot/types": "3.7.3",
|
||||
"@polkadot/util": "^5.5.2",
|
||||
"bn.js": "^4.11.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -6,19 +6,30 @@
|
||||
import type { OverrideVersionedType } from '@polkadot/types/types';
|
||||
|
||||
const sharedTypes = {
|
||||
AccountInfo: 'AccountInfoWithProviders',
|
||||
Address: 'MultiAddress',
|
||||
Keys: 'SessionKeys6',
|
||||
LookupSource: 'MultiAddress',
|
||||
ProxyType: {
|
||||
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'IdentityJudgement']
|
||||
},
|
||||
ValidatorPrefs: 'ValidatorPrefsWithBlocked'
|
||||
};
|
||||
|
||||
const addrIndicesTypes = {
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'LookupSource',
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'IndicesLookupSource',
|
||||
ValidatorPrefs: 'ValidatorPrefsWithCommission'
|
||||
};
|
||||
|
||||
const addrAccountIdTypes = {
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'AccountId',
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'AccountId',
|
||||
ProxyType: {
|
||||
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'IdentityJudgement']
|
||||
}
|
||||
};
|
||||
|
||||
const indicesTypes = {
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'LookupSource',
|
||||
LookupSource: 'IndicesLookupSource'
|
||||
ValidatorPrefs: 'ValidatorPrefsWithCommission'
|
||||
};
|
||||
|
||||
const versioned: OverrideVersionedType[] = [
|
||||
@@ -26,7 +37,7 @@ const versioned: OverrideVersionedType[] = [
|
||||
// 1020 is first CC3
|
||||
minmax: [1019, 1031],
|
||||
types: {
|
||||
...indicesTypes,
|
||||
...addrIndicesTypes,
|
||||
BalanceLock: 'BalanceLockTo212',
|
||||
CompactAssignments: 'CompactAssignmentsTo257',
|
||||
DispatchError: 'DispatchErrorTo198',
|
||||
@@ -46,7 +57,7 @@ const versioned: OverrideVersionedType[] = [
|
||||
{
|
||||
minmax: [1032, 1042],
|
||||
types: {
|
||||
...indicesTypes,
|
||||
...addrIndicesTypes,
|
||||
BalanceLock: 'BalanceLockTo212',
|
||||
CompactAssignments: 'CompactAssignmentsTo257',
|
||||
DispatchInfo: 'DispatchInfoTo244',
|
||||
@@ -66,7 +77,7 @@ const versioned: OverrideVersionedType[] = [
|
||||
// actual at 1045 (1043-1044 is dev)
|
||||
minmax: [1043, 1045],
|
||||
types: {
|
||||
...indicesTypes,
|
||||
...addrIndicesTypes,
|
||||
BalanceLock: 'BalanceLockTo212',
|
||||
CompactAssignments: 'CompactAssignmentsTo257',
|
||||
DispatchInfo: 'DispatchInfoTo244',
|
||||
@@ -86,6 +97,7 @@ const versioned: OverrideVersionedType[] = [
|
||||
types: {
|
||||
// Indices optional, not in transaction
|
||||
...sharedTypes,
|
||||
...addrAccountIdTypes,
|
||||
CompactAssignments: 'CompactAssignmentsTo257',
|
||||
DispatchInfo: 'DispatchInfoTo244',
|
||||
Multiplier: 'Fixed64',
|
||||
@@ -101,6 +113,7 @@ const versioned: OverrideVersionedType[] = [
|
||||
minmax: [1055, 1056],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
...addrAccountIdTypes,
|
||||
CompactAssignments: 'CompactAssignmentsTo257',
|
||||
DispatchInfo: 'DispatchInfoTo244',
|
||||
Multiplier: 'Fixed64',
|
||||
@@ -115,6 +128,7 @@ const versioned: OverrideVersionedType[] = [
|
||||
minmax: [1057, 1061],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
...addrAccountIdTypes,
|
||||
CompactAssignments: 'CompactAssignmentsTo257',
|
||||
DispatchInfo: 'DispatchInfoTo244',
|
||||
OpenTip: 'OpenTipTo225',
|
||||
@@ -126,6 +140,7 @@ const versioned: OverrideVersionedType[] = [
|
||||
minmax: [1062, 2012],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
...addrAccountIdTypes,
|
||||
CompactAssignments: 'CompactAssignmentsTo257',
|
||||
OpenTip: 'OpenTipTo225',
|
||||
RefCount: 'RefCountTo259',
|
||||
@@ -136,6 +151,7 @@ const versioned: OverrideVersionedType[] = [
|
||||
minmax: [2013, 2022],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
...addrAccountIdTypes,
|
||||
CompactAssignments: 'CompactAssignmentsTo257',
|
||||
RefCount: 'RefCountTo259',
|
||||
RewardDestination: 'RewardDestinationTo257'
|
||||
@@ -145,11 +161,19 @@ const versioned: OverrideVersionedType[] = [
|
||||
minmax: [2023, 2024],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
...addrAccountIdTypes,
|
||||
RefCount: 'RefCountTo259'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [2025, undefined],
|
||||
minmax: [2025, 2027],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
...addrAccountIdTypes
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [2028, undefined],
|
||||
types: {
|
||||
...sharedTypes
|
||||
}
|
||||
|
||||
@@ -7,14 +7,7 @@ import type { OverrideVersionedType } from '@polkadot/types/types';
|
||||
|
||||
const versioned: OverrideVersionedType[] = [
|
||||
{
|
||||
minmax: [0, 99],
|
||||
types: {
|
||||
Address: 'AccountId',
|
||||
LookupSource: 'AccountId'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [100, undefined],
|
||||
minmax: [0, undefined],
|
||||
types: {
|
||||
Address: 'MultiAddress',
|
||||
LookupSource: 'MultiAddress'
|
||||
|
||||
@@ -8,21 +8,13 @@ import type { OverrideVersionedType } from '@polkadot/types/types';
|
||||
// these are override types for Polkadot
|
||||
const versioned: OverrideVersionedType[] = [
|
||||
{
|
||||
minmax: [0, 259],
|
||||
minmax: [0, 260],
|
||||
types: {
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'LookupSource',
|
||||
LookupSource: 'IndicesLookupSource'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [260, 260],
|
||||
types: {
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'MultiAddress',
|
||||
LookupSource: 'MultiAddress'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [261, undefined],
|
||||
types: {
|
||||
|
||||
@@ -6,14 +6,23 @@
|
||||
import type { OverrideVersionedType } from '@polkadot/types/types';
|
||||
|
||||
const sharedTypes = {
|
||||
AccountInfo: 'AccountInfoWithProviders',
|
||||
Address: 'MultiAddress',
|
||||
Keys: 'SessionKeys6',
|
||||
LookupSource: 'MultiAddress',
|
||||
ProxyType: {
|
||||
// was: SudoBalances
|
||||
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'Unused', 'IdentityJudgement']
|
||||
},
|
||||
ValidatorPrefs: 'ValidatorPrefsWithBlocked'
|
||||
};
|
||||
|
||||
const addrAccountIdTypes = {
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'AccountId',
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'AccountId',
|
||||
ProxyType: {
|
||||
// was: SudoBalances
|
||||
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'Unused', 'IdentityJudgement']
|
||||
}
|
||||
ValidatorPrefs: 'ValidatorPrefsWithCommission'
|
||||
};
|
||||
|
||||
// these are override types for Polkadot
|
||||
@@ -22,6 +31,7 @@ const versioned: OverrideVersionedType[] = [
|
||||
minmax: [0, 12],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
...addrAccountIdTypes,
|
||||
CompactAssignments: 'CompactAssignmentsTo257',
|
||||
OpenTip: 'OpenTipTo225',
|
||||
RefCount: 'RefCountTo259',
|
||||
@@ -32,6 +42,7 @@ const versioned: OverrideVersionedType[] = [
|
||||
minmax: [13, 22],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
...addrAccountIdTypes,
|
||||
CompactAssignments: 'CompactAssignmentsTo257',
|
||||
RefCount: 'RefCountTo259',
|
||||
RewardDestination: 'RewardDestinationTo257'
|
||||
@@ -41,11 +52,19 @@ const versioned: OverrideVersionedType[] = [
|
||||
minmax: [23, 24],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
...addrAccountIdTypes,
|
||||
RefCount: 'RefCountTo259'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [25, undefined],
|
||||
minmax: [25, 27],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
...addrAccountIdTypes
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [28, undefined],
|
||||
types: {
|
||||
...sharedTypes
|
||||
}
|
||||
|
||||
@@ -9,10 +9,10 @@ import type { OverrideVersionedType } from '@polkadot/types/types';
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
const sharedTypes = {
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'AccountId',
|
||||
AccountInfo: 'AccountInfoWithProviders',
|
||||
Address: 'MultiAddress',
|
||||
FullIdentification: '()', // No staking, only session (as per config)
|
||||
LookupSource: 'AccountId',
|
||||
LookupSource: 'MultiAddress',
|
||||
Keys: 'SessionKeys6'
|
||||
};
|
||||
|
||||
@@ -21,7 +21,10 @@ const versioned: OverrideVersionedType[] = [
|
||||
minmax: [0, 9],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'AccountId',
|
||||
CompactAssignments: 'CompactAssignmentsTo257',
|
||||
LookupSource: 'AccountId',
|
||||
RefCount: 'RefCountTo259',
|
||||
RewardDestination: 'RewardDestinationTo257',
|
||||
Keys: 'SessionKeys5'
|
||||
@@ -31,11 +34,23 @@ const versioned: OverrideVersionedType[] = [
|
||||
minmax: [10, 12],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
Keys: 'SessionKeys5'
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'AccountId',
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'AccountId'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [13, undefined],
|
||||
minmax: [13, 201],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'AccountId',
|
||||
LookupSource: 'AccountId'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [202, undefined],
|
||||
types: {
|
||||
...sharedTypes
|
||||
}
|
||||
|
||||
@@ -6,14 +6,23 @@
|
||||
import type { OverrideVersionedType } from '@polkadot/types/types';
|
||||
|
||||
const sharedTypes = {
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'AccountId',
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'AccountId',
|
||||
AccountInfo: 'AccountInfoWithProviders',
|
||||
Address: 'MultiAddress',
|
||||
Keys: 'SessionKeys6',
|
||||
LookupSource: 'MultiAddress',
|
||||
ProxyType: {
|
||||
// was: SudoBalances
|
||||
_enum: ['Any', 'NonTransfer', 'Staking', 'Unused', 'IdentityJudgement']
|
||||
}
|
||||
},
|
||||
ValidatorPrefs: 'ValidatorPrefsWithBlocked'
|
||||
};
|
||||
|
||||
const addrAccountIdTypes = {
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'AccountId',
|
||||
LookupSource: 'AccountId',
|
||||
Keys: 'SessionKeys5',
|
||||
ValidatorPrefs: 'ValidatorPrefsWithCommission'
|
||||
};
|
||||
|
||||
const versioned: OverrideVersionedType[] = [
|
||||
@@ -21,6 +30,7 @@ const versioned: OverrideVersionedType[] = [
|
||||
minmax: [1, 2],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
...addrAccountIdTypes,
|
||||
CompactAssignments: 'CompactAssignmentsTo257',
|
||||
Multiplier: 'Fixed64',
|
||||
OpenTip: 'OpenTipTo225',
|
||||
@@ -33,6 +43,7 @@ const versioned: OverrideVersionedType[] = [
|
||||
minmax: [3, 22],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
...addrAccountIdTypes,
|
||||
CompactAssignments: 'CompactAssignmentsTo257',
|
||||
OpenTip: 'OpenTipTo225',
|
||||
RefCount: 'RefCountTo259',
|
||||
@@ -43,6 +54,7 @@ const versioned: OverrideVersionedType[] = [
|
||||
minmax: [23, 42],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
...addrAccountIdTypes,
|
||||
CompactAssignments: 'CompactAssignmentsTo257',
|
||||
RefCount: 'RefCountTo259',
|
||||
RewardDestination: 'RewardDestinationTo257'
|
||||
@@ -52,11 +64,19 @@ const versioned: OverrideVersionedType[] = [
|
||||
minmax: [43, 44],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
...addrAccountIdTypes,
|
||||
RefCount: 'RefCountTo259'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [45, undefined],
|
||||
minmax: [45, 47],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
...addrAccountIdTypes
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [48, undefined],
|
||||
types: {
|
||||
...sharedTypes
|
||||
}
|
||||
|
||||
@@ -1,10 +1,62 @@
|
||||
// Copyright 2017-2021 @polkadot/types-known authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { assert, u8aEq } from '@polkadot/util';
|
||||
|
||||
import all from '.';
|
||||
|
||||
interface TestDef {
|
||||
genesisHash: string;
|
||||
network: string;
|
||||
versions: [number, [number, number]][];
|
||||
}
|
||||
|
||||
const TESTS: TestDef[] = [
|
||||
{
|
||||
genesisHash: '0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe',
|
||||
network: 'kusama',
|
||||
versions: [
|
||||
[0, [0, 1020]],
|
||||
[17, [901442, 1045]]
|
||||
]
|
||||
},
|
||||
{
|
||||
genesisHash: '0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3',
|
||||
network: 'polkadot',
|
||||
versions: [
|
||||
[0, [0, 0]],
|
||||
[19, [2436698, 26]]
|
||||
]
|
||||
},
|
||||
{
|
||||
genesisHash: '0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e',
|
||||
network: 'westend',
|
||||
versions: [
|
||||
[0, [214356, 4]],
|
||||
[23, [4207800, 48]]
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
describe('upgrades', (): void => {
|
||||
it('is valid', (): void => {
|
||||
expect(all).toBeDefined();
|
||||
TESTS.forEach(({ genesisHash, network, versions }): void => {
|
||||
describe(network, (): void => {
|
||||
const chain = all.find((n) => n.network === network);
|
||||
|
||||
assert(chain, `Unable to find the entry for ${network}`);
|
||||
|
||||
it('has a valid genesisHash', (): void => {
|
||||
expect(u8aEq(chain.genesisHash, genesisHash)).toBe(true);
|
||||
});
|
||||
|
||||
versions.forEach(([index, [blockNumber, specVersion]]): void => {
|
||||
it(`has a valid entry at index ${index}`, (): void => {
|
||||
const version = chain.versions[index];
|
||||
|
||||
expect(version.blockNumber.eqn(blockNumber)).toBe(true);
|
||||
expect(version.specVersion.eqn(specVersion)).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -6,14 +6,22 @@ import type { ChainUpgradesRaw } from './types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import networks from '@polkadot/networks';
|
||||
import { assert, hexToU8a } from '@polkadot/util';
|
||||
|
||||
import kusama from './kusama';
|
||||
import polkadot from './polkadot';
|
||||
import westend from './westend';
|
||||
|
||||
// testnets are not available in the networks map
|
||||
const NET_EXTRA: Record<string, { genesisHash: string[] }> = {
|
||||
westend: {
|
||||
genesisHash: ['0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e']
|
||||
}
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
function checkOrder (network: string, versions: [number, number][]): [number, number][] {
|
||||
function checkOrder (network: string, versions: ChainUpgradesRaw): [number, number][] {
|
||||
const ooo = versions.filter((curr, index): boolean => {
|
||||
const prev = versions[index - 1];
|
||||
|
||||
@@ -28,9 +36,13 @@ function checkOrder (network: string, versions: [number, number][]): [number, nu
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
function rawToFinal (network: string, { genesisHash, versions }: ChainUpgradesRaw): ChainUpgrades {
|
||||
function mapRaw ([network, versions]: [string, ChainUpgradesRaw]): ChainUpgrades {
|
||||
const chain = networks.find((n) => n.network === network) || NET_EXTRA[network];
|
||||
|
||||
assert(chain, `Unable to find info for chain ${network}`);
|
||||
|
||||
return {
|
||||
genesisHash: hexToU8a(genesisHash),
|
||||
genesisHash: hexToU8a(chain.genesisHash[0]),
|
||||
network,
|
||||
versions: checkOrder(network, versions).map(([blockNumber, specVersion]) => ({
|
||||
blockNumber: new BN(blockNumber),
|
||||
@@ -40,10 +52,6 @@ function rawToFinal (network: string, { genesisHash, versions }: ChainUpgradesRa
|
||||
}
|
||||
|
||||
// Type overrides for specific spec types & versions as given in runtimeVersion
|
||||
const upgrades: ChainUpgrades[] = [
|
||||
rawToFinal('kusama', kusama),
|
||||
rawToFinal('polkadot', polkadot),
|
||||
rawToFinal('westend', westend)
|
||||
];
|
||||
const upgrades = Object.entries({ kusama, polkadot, westend }).map(mapRaw);
|
||||
|
||||
export default upgrades;
|
||||
|
||||
@@ -3,18 +3,15 @@
|
||||
|
||||
import type { ChainUpgradesRaw } from './types';
|
||||
|
||||
const upgrades: ChainUpgradesRaw = {
|
||||
genesisHash: '0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe',
|
||||
versions: [
|
||||
[0, 1020], [26669, 1021], [38245, 1022], [54248, 1023], [59659, 1024],
|
||||
[67651, 1025], [82191, 1027], [83238, 1028], [101503, 1029], [203466, 1030],
|
||||
[295787, 1031], [461692, 1032], [504329, 1033], [569327, 1038], [587687, 1039],
|
||||
[653183, 1040], [693488, 1042], [901442, 1045], [1375086, 1050], [1445458, 1051],
|
||||
[1472960, 1052], [1475648, 1053], [1491596, 1054], [1574408, 1055], [2064961, 1058],
|
||||
[2201991, 1062], [2671528, 2005], [2704202, 2007], [2728002, 2008], [2832534, 2011],
|
||||
[2962294, 2012], [3240000, 2013], [3274408, 2015], [3323565, 2019], [3534175, 2022],
|
||||
[3860281, 2023], [4143129, 2024], [4401242, 2025], [4841367, 2026]
|
||||
]
|
||||
};
|
||||
const upgrades: ChainUpgradesRaw = [
|
||||
[0, 1020], [26669, 1021], [38245, 1022], [54248, 1023], [59659, 1024],
|
||||
[67651, 1025], [82191, 1027], [83238, 1028], [101503, 1029], [203466, 1030],
|
||||
[295787, 1031], [461692, 1032], [504329, 1033], [569327, 1038], [587687, 1039],
|
||||
[653183, 1040], [693488, 1042], [901442, 1045], [1375086, 1050], [1445458, 1051],
|
||||
[1472960, 1052], [1475648, 1053], [1491596, 1054], [1574408, 1055], [2064961, 1058],
|
||||
[2201991, 1062], [2671528, 2005], [2704202, 2007], [2728002, 2008], [2832534, 2011],
|
||||
[2962294, 2012], [3240000, 2013], [3274408, 2015], [3323565, 2019], [3534175, 2022],
|
||||
[3860281, 2023], [4143129, 2024], [4401242, 2025], [4841367, 2026], [5961600, 2027]
|
||||
];
|
||||
|
||||
export default upgrades;
|
||||
|
||||
@@ -3,14 +3,12 @@
|
||||
|
||||
import type { ChainUpgradesRaw } from './types';
|
||||
|
||||
const upgrades: ChainUpgradesRaw = {
|
||||
genesisHash: '0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3',
|
||||
versions: [
|
||||
[0, 0], [29231, 1], [188836, 5], [199405, 6], [214264, 7],
|
||||
[244358, 8], [303079, 9], [314201, 10], [342400, 11], [443963, 12],
|
||||
[528470, 13], [687751, 14], [746085, 15], [787923, 16], [799302, 17],
|
||||
[1205128, 18], [1603423, 23], [1733218, 24], [2005673, 25]
|
||||
]
|
||||
};
|
||||
const upgrades: ChainUpgradesRaw = [
|
||||
[0, 0], [29231, 1], [188836, 5], [199405, 6], [214264, 7],
|
||||
[244358, 8], [303079, 9], [314201, 10], [342400, 11], [443963, 12],
|
||||
[528470, 13], [687751, 14], [746085, 15], [787923, 16], [799302, 17],
|
||||
[1205128, 18], [1603423, 23], [1733218, 24], [2005673, 25], [2436698, 26],
|
||||
[3613564, 27]
|
||||
];
|
||||
|
||||
export default upgrades;
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
// Copyright 2017-2021 @polkadot/types-known authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export interface ChainUpgradesRaw {
|
||||
genesisHash: string;
|
||||
versions: [number, number][];
|
||||
}
|
||||
export type ChainUpgradesRaw = [number, number][];
|
||||
|
||||
@@ -3,15 +3,12 @@
|
||||
|
||||
import type { ChainUpgradesRaw } from './types';
|
||||
|
||||
const upgrades: ChainUpgradesRaw = {
|
||||
genesisHash: '0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e',
|
||||
versions: [
|
||||
[214356, 4], [392764, 7], [409740, 8], [809976, 20], [877581, 24],
|
||||
[879238, 25], [889472, 26], [902937, 27], [932751, 28], [991142, 29],
|
||||
[1030162, 31], [1119657, 32], [1199282, 33], [1342534, 34], [1392263, 35],
|
||||
[1431703, 36], [1433369, 37], [1490972, 41], [2087397, 43], [2316688, 44],
|
||||
[2549864, 45], [3925782, 46], [3925843, 47]
|
||||
]
|
||||
};
|
||||
const upgrades: ChainUpgradesRaw = [
|
||||
[214356, 4], [392764, 7], [409740, 8], [809976, 20], [877581, 24],
|
||||
[879238, 25], [889472, 26], [902937, 27], [932751, 28], [991142, 29],
|
||||
[1030162, 31], [1119657, 32], [1199282, 33], [1342534, 34], [1392263, 35],
|
||||
[1431703, 36], [1433369, 37], [1490972, 41], [2087397, 43], [2316688, 44],
|
||||
[2549864, 45], [3925782, 46], [3925843, 47], [4207800, 48]
|
||||
];
|
||||
|
||||
export default upgrades;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/types",
|
||||
"version": "3.6.1",
|
||||
"version": "3.7.3",
|
||||
"description": "Implementation of the Parity codec",
|
||||
"main": "index.js",
|
||||
"sideEffects": [
|
||||
@@ -16,14 +16,14 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.12.5",
|
||||
"@polkadot/metadata": "3.6.1",
|
||||
"@polkadot/util": "^5.4.2",
|
||||
"@polkadot/util-crypto": "^5.4.2",
|
||||
"@polkadot/x-rxjs": "^5.4.2",
|
||||
"@polkadot/metadata": "3.7.3",
|
||||
"@polkadot/util": "^5.5.2",
|
||||
"@polkadot/util-crypto": "^5.5.2",
|
||||
"@polkadot/x-rxjs": "^5.5.2",
|
||||
"@types/bn.js": "^4.11.6",
|
||||
"bn.js": "^4.11.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^5.4.2"
|
||||
"@polkadot/keyring": "^5.5.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,14 +31,14 @@ import type { CallIndex, LotteryConfig } from '@polkadot/types/interfaces/lotter
|
||||
import type { DoubleMapTypeLatest, DoubleMapTypeV10, DoubleMapTypeV11, DoubleMapTypeV12, DoubleMapTypeV9, ErrorMetadataLatest, ErrorMetadataV10, ErrorMetadataV11, ErrorMetadataV12, ErrorMetadataV9, EventMetadataLatest, EventMetadataV10, EventMetadataV11, EventMetadataV12, EventMetadataV9, ExtrinsicMetadataLatest, ExtrinsicMetadataV11, ExtrinsicMetadataV12, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV10, FunctionArgumentMetadataV11, FunctionArgumentMetadataV12, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV10, FunctionMetadataV11, FunctionMetadataV12, FunctionMetadataV9, MapTypeLatest, MapTypeV10, MapTypeV11, MapTypeV12, MapTypeV9, MetadataAll, MetadataLatest, MetadataV10, MetadataV11, MetadataV12, MetadataV9, ModuleConstantMetadataLatest, ModuleConstantMetadataV10, ModuleConstantMetadataV11, ModuleConstantMetadataV12, ModuleConstantMetadataV9, ModuleMetadataLatest, ModuleMetadataV10, ModuleMetadataV11, ModuleMetadataV12, ModuleMetadataV9, StorageEntryMetadataLatest, StorageEntryMetadataV10, StorageEntryMetadataV11, StorageEntryMetadataV12, StorageEntryMetadataV9, StorageEntryModifierLatest, StorageEntryModifierV10, StorageEntryModifierV11, StorageEntryModifierV12, StorageEntryModifierV9, StorageEntryTypeLatest, StorageEntryTypeV10, StorageEntryTypeV11, StorageEntryTypeV12, StorageEntryTypeV9, StorageHasher, StorageHasherV10, StorageHasherV11, StorageHasherV12, StorageHasherV9, StorageMetadataLatest, StorageMetadataV10, StorageMetadataV11, StorageMetadataV12, StorageMetadataV9 } from '@polkadot/types/interfaces/metadata';
|
||||
import type { StorageKind } from '@polkadot/types/interfaces/offchain';
|
||||
import type { DeferredOffenceOf, Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';
|
||||
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AbstractFungible, AbstractNonFungible, AccountId32Junction, AccountIndex64Junction, AccountKey20Junction, AssetInstance, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Balances, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, ConcreteFungible, ConcreteNonFungible, CoreAssignment, CoreIndex, CoreOccupied, DepositAsset, DepositReserveAsset, DoubleVoteReport, DownwardMessage, ExchangeAsset, GlobalValidationSchedule, GroupIndex, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InitiateReserveWithdraw, InitiateTeleport, Junction, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MultiAsset, MultiLocation, NetworkId, NewBidder, NewBidderOption, Order, OriginKind, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainProposal, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, QueryHolding, QueuedParathread, RegisteredParachainInfo, RelayChainBlockNumber, RelayTo, RelayedFrom, Remark, ReserveAssetDeposit, Retriable, Scheduling, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, Statement, SubId, TeleportAsset, Transact, TransientValidationData, UpwardMessage, ValidationCode, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VersionedMultiAsset, VersionedMultiLocation, VersionedXcm, WinnersData, WinnersDataTuple, WinningData, WinningDataEntry, WithdrawAsset, Xcm, XcmError, XcmResult } from '@polkadot/types/interfaces/parachains';
|
||||
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AbstractFungible, AbstractNonFungible, AccountId32Junction, AccountIndex64Junction, AccountKey20Junction, AssetInstance, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Balances, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, ConcreteFungible, ConcreteNonFungible, CoreAssignment, CoreIndex, CoreOccupied, DepositAsset, DepositReserveAsset, DoubleVoteReport, DownwardMessage, ExchangeAsset, GlobalValidationSchedule, GroupIndex, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InitiateReserveWithdraw, InitiateTeleport, Junction, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiAsset, MultiLocation, NetworkId, NewBidder, NewBidderOption, Order, OriginKind, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainProposal, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, QueryHolding, QueuedParathread, RegisteredParachainInfo, RelayChainBlockNumber, RelayTo, RelayedFrom, Remark, ReserveAssetDeposit, Retriable, Scheduling, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, Statement, SubId, SystemInherentData, TeleportAsset, Transact, TransientValidationData, UpwardMessage, ValidationCode, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, VersionedMultiAsset, VersionedMultiLocation, VersionedXcm, WinnersData, WinnersDataTuple, WinningData, WinningDataEntry, WithdrawAsset, Xcm, XcmError, XcmResult } from '@polkadot/types/interfaces/parachains';
|
||||
import type { FeeDetails, InclusionFee, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import type { Approvals } from '@polkadot/types/interfaces/poll';
|
||||
import type { ProxyAnnouncement, ProxyDefinition, ProxyType } from '@polkadot/types/interfaces/proxy';
|
||||
import type { AccountStatus, AccountValidity } from '@polkadot/types/interfaces/purchase';
|
||||
import type { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
|
||||
import type { RpcMethods } from '@polkadot/types/interfaces/rpc';
|
||||
import type { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, CallHash, CallHashOf, ChangesTrieConfiguration, Consensus, ConsensusEngineId, Digest, DigestItem, ExtrinsicsWeight, Fixed128, Fixed64, FixedI128, FixedI64, FixedU128, FixedU64, H1024, H128, H160, H2048, H256, H512, H64, Hash, Header, I32F32, Index, IndicesLookupSource, Justification, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, MultiAddress, OpaqueCall, Origin, OriginCaller, PalletVersion, PalletsOrigin, Pays, PerU16, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Releases, RuntimeDbWeight, Seal, SealV0, SignedBlock, StorageData, TransactionPriority, U32F32, ValidatorId, ValidatorIdOf, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
|
||||
import type { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, CallHash, CallHashOf, ChangesTrieConfiguration, Consensus, ConsensusEngineId, Digest, DigestItem, ExtrinsicsWeight, Fixed128, Fixed64, FixedI128, FixedI64, FixedU128, FixedU64, H1024, H128, H160, H2048, H256, H512, H64, Hash, Header, I32F32, Index, IndicesLookupSource, Justification, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, MultiAddress, OpaqueCall, Origin, OriginCaller, PalletVersion, PalletsOrigin, Pays, PerU16, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Releases, RuntimeDbWeight, Seal, SealV0, SignedBlock, Slot, StorageData, StorageProof, TransactionPriority, U32F32, ValidatorId, ValidatorIdOf, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
|
||||
import type { SiField, SiLookupTypeId, SiPath, SiType, SiTypeDef, SiTypeDefArray, SiTypeDefComposite, SiTypeDefPrimitive, SiTypeDefSequence, SiTypeDefTuple, SiTypeDefVariant, SiVariant } from '@polkadot/types/interfaces/scaleInfo';
|
||||
import type { Period, Priority, SchedulePeriod, SchedulePriority, Scheduled, ScheduledTo254, TaskAddress } from '@polkadot/types/interfaces/scheduler';
|
||||
import type { FullIdentification, IdentificationTuple, Keys, MembershipProof, SessionIndex, SessionKeys1, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6, SessionKeys7, SessionKeys8, SessionKeys9, ValidatorCount } from '@polkadot/types/interfaces/session';
|
||||
@@ -109,6 +109,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Compact<SetId>': Compact<SetId>;
|
||||
'Compact<SetIndex>': Compact<SetIndex>;
|
||||
'Compact<SiLookupTypeId>': Compact<SiLookupTypeId>;
|
||||
'Compact<Slot>': Compact<Slot>;
|
||||
'Compact<SlotNumber>': Compact<SlotNumber>;
|
||||
'Compact<SpanIndex>': Compact<SpanIndex>;
|
||||
'Compact<StrikeCount>': Compact<StrikeCount>;
|
||||
@@ -506,6 +507,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<MemberCount>': Option<MemberCount>;
|
||||
'Option<MembershipProof>': Option<MembershipProof>;
|
||||
'Option<MessageIngestionType>': Option<MessageIngestionType>;
|
||||
'Option<MessagingStateSnapshot>': Option<MessagingStateSnapshot>;
|
||||
'Option<MessagingStateSnapshotEgressEntry>': Option<MessagingStateSnapshotEgressEntry>;
|
||||
'Option<MetadataAll>': Option<MetadataAll>;
|
||||
'Option<MetadataLatest>': Option<MetadataLatest>;
|
||||
'Option<MetadataV10>': Option<MetadataV10>;
|
||||
@@ -719,6 +722,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<SlashingSpans>': Option<SlashingSpans>;
|
||||
'Option<SlashingSpansTo204>': Option<SlashingSpansTo204>;
|
||||
'Option<SlashJournalEntry>': Option<SlashJournalEntry>;
|
||||
'Option<Slot>': Option<Slot>;
|
||||
'Option<SlotNumber>': Option<SlotNumber>;
|
||||
'Option<SlotRange>': Option<SlotRange>;
|
||||
'Option<SocietyJudgement>': Option<SocietyJudgement>;
|
||||
@@ -760,11 +764,13 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<StorageMetadataV11>': Option<StorageMetadataV11>;
|
||||
'Option<StorageMetadataV12>': Option<StorageMetadataV12>;
|
||||
'Option<StorageMetadataV9>': Option<StorageMetadataV9>;
|
||||
'Option<StorageProof>': Option<StorageProof>;
|
||||
'Option<StoredPendingChange>': Option<StoredPendingChange>;
|
||||
'Option<StoredState>': Option<StoredState>;
|
||||
'Option<StrikeCount>': Option<StrikeCount>;
|
||||
'Option<SubId>': Option<SubId>;
|
||||
'Option<SyncState>': Option<SyncState>;
|
||||
'Option<SystemInherentData>': Option<SystemInherentData>;
|
||||
'Option<SystemOrigin>': Option<SystemOrigin>;
|
||||
'Option<Tally>': Option<Tally>;
|
||||
'Option<TaskAddress>': Option<TaskAddress>;
|
||||
@@ -818,6 +824,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<ValidatorPrefsWithCommission>': Option<ValidatorPrefsWithCommission>;
|
||||
'Option<ValidatorSignature>': Option<ValidatorSignature>;
|
||||
'Option<ValidityAttestation>': Option<ValidityAttestation>;
|
||||
'Option<VecInboundHrmpMessage>': Option<VecInboundHrmpMessage>;
|
||||
'Option<VersionedMultiAsset>': Option<VersionedMultiAsset>;
|
||||
'Option<VersionedMultiLocation>': Option<VersionedMultiLocation>;
|
||||
'Option<VersionedXcm>': Option<VersionedXcm>;
|
||||
@@ -1222,6 +1229,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<MemberCount>': Vec<MemberCount>;
|
||||
'Vec<MembershipProof>': Vec<MembershipProof>;
|
||||
'Vec<MessageIngestionType>': Vec<MessageIngestionType>;
|
||||
'Vec<MessagingStateSnapshot>': Vec<MessagingStateSnapshot>;
|
||||
'Vec<MessagingStateSnapshotEgressEntry>': Vec<MessagingStateSnapshotEgressEntry>;
|
||||
'Vec<MetadataAll>': Vec<MetadataAll>;
|
||||
'Vec<MetadataLatest>': Vec<MetadataLatest>;
|
||||
'Vec<MetadataV10>': Vec<MetadataV10>;
|
||||
@@ -1435,6 +1444,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<SlashingSpans>': Vec<SlashingSpans>;
|
||||
'Vec<SlashingSpansTo204>': Vec<SlashingSpansTo204>;
|
||||
'Vec<SlashJournalEntry>': Vec<SlashJournalEntry>;
|
||||
'Vec<Slot>': Vec<Slot>;
|
||||
'Vec<SlotNumber>': Vec<SlotNumber>;
|
||||
'Vec<SlotRange>': Vec<SlotRange>;
|
||||
'Vec<SocietyJudgement>': Vec<SocietyJudgement>;
|
||||
@@ -1476,11 +1486,13 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<StorageMetadataV11>': Vec<StorageMetadataV11>;
|
||||
'Vec<StorageMetadataV12>': Vec<StorageMetadataV12>;
|
||||
'Vec<StorageMetadataV9>': Vec<StorageMetadataV9>;
|
||||
'Vec<StorageProof>': Vec<StorageProof>;
|
||||
'Vec<StoredPendingChange>': Vec<StoredPendingChange>;
|
||||
'Vec<StoredState>': Vec<StoredState>;
|
||||
'Vec<StrikeCount>': Vec<StrikeCount>;
|
||||
'Vec<SubId>': Vec<SubId>;
|
||||
'Vec<SyncState>': Vec<SyncState>;
|
||||
'Vec<SystemInherentData>': Vec<SystemInherentData>;
|
||||
'Vec<SystemOrigin>': Vec<SystemOrigin>;
|
||||
'Vec<Tally>': Vec<Tally>;
|
||||
'Vec<TaskAddress>': Vec<TaskAddress>;
|
||||
@@ -1534,6 +1546,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<ValidatorPrefsWithCommission>': Vec<ValidatorPrefsWithCommission>;
|
||||
'Vec<ValidatorSignature>': Vec<ValidatorSignature>;
|
||||
'Vec<ValidityAttestation>': Vec<ValidityAttestation>;
|
||||
'Vec<VecInboundHrmpMessage>': Vec<VecInboundHrmpMessage>;
|
||||
'Vec<VersionedMultiAsset>': Vec<VersionedMultiAsset>;
|
||||
'Vec<VersionedMultiLocation>': Vec<VersionedMultiLocation>;
|
||||
'Vec<VersionedXcm>': Vec<VersionedXcm>;
|
||||
@@ -1938,6 +1951,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
MemberCount: MemberCount;
|
||||
MembershipProof: MembershipProof;
|
||||
MessageIngestionType: MessageIngestionType;
|
||||
MessagingStateSnapshot: MessagingStateSnapshot;
|
||||
MessagingStateSnapshotEgressEntry: MessagingStateSnapshotEgressEntry;
|
||||
MetadataAll: MetadataAll;
|
||||
MetadataLatest: MetadataLatest;
|
||||
MetadataV10: MetadataV10;
|
||||
@@ -2151,6 +2166,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
SlashingSpans: SlashingSpans;
|
||||
SlashingSpansTo204: SlashingSpansTo204;
|
||||
SlashJournalEntry: SlashJournalEntry;
|
||||
Slot: Slot;
|
||||
SlotNumber: SlotNumber;
|
||||
SlotRange: SlotRange;
|
||||
SocietyJudgement: SocietyJudgement;
|
||||
@@ -2192,11 +2208,13 @@ declare module '@polkadot/types/types/registry' {
|
||||
StorageMetadataV11: StorageMetadataV11;
|
||||
StorageMetadataV12: StorageMetadataV12;
|
||||
StorageMetadataV9: StorageMetadataV9;
|
||||
StorageProof: StorageProof;
|
||||
StoredPendingChange: StoredPendingChange;
|
||||
StoredState: StoredState;
|
||||
StrikeCount: StrikeCount;
|
||||
SubId: SubId;
|
||||
SyncState: SyncState;
|
||||
SystemInherentData: SystemInherentData;
|
||||
SystemOrigin: SystemOrigin;
|
||||
Tally: Tally;
|
||||
TaskAddress: TaskAddress;
|
||||
@@ -2250,6 +2268,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
ValidatorPrefsWithCommission: ValidatorPrefsWithCommission;
|
||||
ValidatorSignature: ValidatorSignature;
|
||||
ValidityAttestation: ValidityAttestation;
|
||||
VecInboundHrmpMessage: VecInboundHrmpMessage;
|
||||
VersionedMultiAsset: VersionedMultiAsset;
|
||||
VersionedMultiLocation: VersionedMultiLocation;
|
||||
VersionedXcm: VersionedXcm;
|
||||
|
||||
@@ -159,4 +159,11 @@ export abstract class AbstractArray<T extends Codec> extends Array<T> implements
|
||||
public includes (check: unknown): boolean {
|
||||
return this.some((value: T) => value.eq(check));
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Returns a slice of an array
|
||||
*/
|
||||
public slice (start?: number, end?: number): T[] {
|
||||
return this.toArray().slice(start, end);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { UIntBitLength } from './types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { assert, BN_ZERO, bnToBn, bnToHex, bnToU8a, formatBalance, formatNumber, hexToBn, isHex, isString, isU8a, u8aToBn } from '@polkadot/util';
|
||||
import { assert, BN_BILLION, BN_HUNDRED, BN_MILLION, BN_ZERO, bnToBn, bnToHex, bnToU8a, formatBalance, formatNumber, hexToBn, isHex, isString, isU8a, u8aToBn } from '@polkadot/util';
|
||||
|
||||
export const DEFAULT_UINT_BITS = 64;
|
||||
|
||||
@@ -18,9 +18,9 @@ const MUL_P = new BN(1_00_00);
|
||||
|
||||
const FORMATTERS: [string, BN][] = [
|
||||
['Perquintill', new BN(1_000_000_000_000)],
|
||||
['Perbill', new BN(1_000_000_000)],
|
||||
['Permill', new BN(1_000_000)],
|
||||
['Percent', new BN(100)]
|
||||
['Perbill', BN_BILLION],
|
||||
['Permill', BN_MILLION],
|
||||
['Percent', BN_HUNDRED]
|
||||
];
|
||||
|
||||
function toPercentage (value: BN, divisor: BN): string {
|
||||
|
||||
@@ -389,7 +389,7 @@ describe('Enum', (): void => {
|
||||
expect(test.toHex()).toEqual(
|
||||
'0x' +
|
||||
'00' + // index
|
||||
'ff' + // Address indicating an embedded AccountId
|
||||
'00' + // MultiAddress indicating an embedded AccountId
|
||||
'0001020304050607080910111213141516171819202122232425262728293031' // AccountId
|
||||
);
|
||||
});
|
||||
|
||||
@@ -6,6 +6,7 @@ import type { Codec, CodecTo } from '../types';
|
||||
|
||||
import { Metadata } from '@polkadot/metadata';
|
||||
import rpcMetadata from '@polkadot/metadata/static';
|
||||
import { randomAsU8a } from '@polkadot/util-crypto';
|
||||
|
||||
import { createTypeUnsafe, TypeRegistry } from '../create';
|
||||
import { GenericAccountId as AccountId } from '../generic';
|
||||
@@ -170,5 +171,14 @@ describe('Vec', (): void => {
|
||||
|
||||
expect(vec.indexOf(myId)).toEqual(2);
|
||||
});
|
||||
|
||||
it('allows a slice operator', (): void => {
|
||||
const vec = registry.createType('Vec<AccountId>', [
|
||||
randomAsU8a(), randomAsU8a(), randomAsU8a(), randomAsU8a(), randomAsU8a(), randomAsU8a(), randomAsU8a(), randomAsU8a(), randomAsU8a(), randomAsU8a()
|
||||
]);
|
||||
|
||||
expect(vec).toHaveLength(10);
|
||||
expect(vec.slice(2, 7)).toHaveLength(5);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -20,7 +20,7 @@ describe('Extrinsic', (): void => {
|
||||
'0x' +
|
||||
'5d02' + // length
|
||||
'84' + // V4, signing bit set
|
||||
'ff' + // lookup, AccountId of sender follows
|
||||
'00' + // MultiAddress, AccountId of sender follows
|
||||
'fcc4910cb536b4333db4bccb40e2cf6427b4766518e754b91e70c97e4a87dbb3' + // sender
|
||||
'00' + // multisig, type ed25519
|
||||
'd99ffe3e610ad234e1414bda5831395a6df9098bf80b01561ce89a5065ae89d5' + // sig first 32
|
||||
@@ -29,7 +29,7 @@ describe('Extrinsic', (): void => {
|
||||
'1101' + // nonce, compact 68
|
||||
'0700ac23fc06' + // tip, 0.03 KSM
|
||||
'0600' + // balances.transfer (on Kusama this was 0400, changed here to match metadata)
|
||||
'ff' + // lookup, AccountId of recipient follows
|
||||
'00' + // MultiAddress, AccountId of recipient follows
|
||||
'495e1e506f266418af07fa0c5c108dd436f2faa59fe7d9e54403779f5bbd7718' + // recipient
|
||||
'0bc01eb1fc185f' // value, 104.560 KSM
|
||||
);
|
||||
@@ -38,7 +38,7 @@ describe('Extrinsic', (): void => {
|
||||
expect(extrinsic.nonce.toNumber()).toEqual(68);
|
||||
expect(extrinsic.tip.toHuman()).toEqual('30.0000 mUnit');
|
||||
expect(extrinsic.callIndex).toEqual(new Uint8Array([6, 0]));
|
||||
expect(extrinsic.args[0].toHex()).toEqual('0xff495e1e506f266418af07fa0c5c108dd436f2faa59fe7d9e54403779f5bbd7718');
|
||||
expect(extrinsic.args[0].toHex()).toEqual('0x00495e1e506f266418af07fa0c5c108dd436f2faa59fe7d9e54403779f5bbd7718');
|
||||
expect(extrinsic.args[1].toHuman()).toEqual('104.5609 Unit');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -19,7 +19,7 @@ describe('SignerPayload', (): void => {
|
||||
blockNumber: '0x00231d30',
|
||||
era: '0x0703',
|
||||
genesisHash: '0xdcd1346701ca8396496e52aa2785b1748deb6db09551b72159dcb3e08991025b',
|
||||
method: '0x0600ffd7568e5f0a7eda67a82691ff379ac4bba4f9c9b859fe779b5d46363b61ad2db9e56c',
|
||||
method: '0x060000d7568e5f0a7eda67a82691ff379ac4bba4f9c9b859fe779b5d46363b61ad2db9e56c',
|
||||
nonce: '0x00001234',
|
||||
signedExtensions: ['CheckNonce', 'CheckWeight'],
|
||||
specVersion: '0x00000006',
|
||||
@@ -36,7 +36,7 @@ describe('SignerPayload', (): void => {
|
||||
blockNumber: '0x231d30',
|
||||
era: registry.createType('ExtrinsicEra', { current: 2301232, period: 200 }),
|
||||
genesisHash: '0xdcd1346701ca8396496e52aa2785b1748deb6db09551b72159dcb3e08991025b',
|
||||
method: registry.createType('Call', '0x0600ffd7568e5f0a7eda67a82691ff379ac4bba4f9c9b859fe779b5d46363b61ad2db9e56c'),
|
||||
method: registry.createType('Call', '0x060000d7568e5f0a7eda67a82691ff379ac4bba4f9c9b859fe779b5d46363b61ad2db9e56c'),
|
||||
nonce: 0x1234,
|
||||
signedExtensions: ['CheckNonce'],
|
||||
tip: 0x5678,
|
||||
@@ -48,7 +48,7 @@ describe('SignerPayload', (): void => {
|
||||
blockNumber: '0x00231d30',
|
||||
era: '0x0703',
|
||||
genesisHash: '0xdcd1346701ca8396496e52aa2785b1748deb6db09551b72159dcb3e08991025b',
|
||||
method: '0x0600ffd7568e5f0a7eda67a82691ff379ac4bba4f9c9b859fe779b5d46363b61ad2db9e56c',
|
||||
method: '0x060000d7568e5f0a7eda67a82691ff379ac4bba4f9c9b859fe779b5d46363b61ad2db9e56c',
|
||||
nonce: '0x00001234',
|
||||
signedExtensions: ['CheckNonce'],
|
||||
specVersion: '0x00000000',
|
||||
|
||||
@@ -32,7 +32,7 @@ describe('ExtrinsicSignatureV4', (): void => {
|
||||
|
||||
const u8a = new Uint8Array([
|
||||
// signer as an AccountIndex
|
||||
0x09,
|
||||
0x01, 0x08, // 4 << 2
|
||||
// signature type
|
||||
0x01,
|
||||
// signature
|
||||
@@ -65,7 +65,7 @@ describe('ExtrinsicSignatureV4', (): void => {
|
||||
).toHex()
|
||||
).toEqual(
|
||||
'0x' +
|
||||
'ff' +
|
||||
'00' + // MultiAddress
|
||||
'd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d' +
|
||||
'01' +
|
||||
'4242424242424242424242424242424242424242424242424242424242424242' +
|
||||
@@ -93,7 +93,7 @@ describe('ExtrinsicSignatureV4', (): void => {
|
||||
).toEqual(
|
||||
'0x' +
|
||||
// Address = AccountId
|
||||
// 'ff' +
|
||||
// '00' +
|
||||
'd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d' +
|
||||
// This is a prefix-less signature, anySignture as opposed to Multi above
|
||||
// '01' +
|
||||
|
||||
@@ -19,12 +19,16 @@ describe('Call', (): void => {
|
||||
args: [],
|
||||
callIndex: [6, 1] // balances.setBalance
|
||||
}).toU8a()
|
||||
).toEqual(new Uint8Array([6, 1, 0, 0, 0]));
|
||||
).toEqual(
|
||||
new Uint8Array([6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
|
||||
);
|
||||
});
|
||||
|
||||
it('handles creation from a hex value properly', (): void => {
|
||||
expect(
|
||||
new Call(registry, '0x0601').toU8a()
|
||||
).toEqual(new Uint8Array([6, 1, 0, 0, 0])); // balances.setBalance
|
||||
).toEqual(
|
||||
new Uint8Array([6, 1, 1, 110, 7, 17, 0, 0, 0])
|
||||
); // balances.setBalance
|
||||
});
|
||||
});
|
||||
|
||||
@@ -88,6 +88,10 @@ export class GenericConsensusEngineId extends u32 {
|
||||
return this.registry.createType('AccountId', bytes);
|
||||
}
|
||||
|
||||
private _getH160Author (bytes: Bytes): AccountId {
|
||||
return this.registry.createType('AccountId', bytes);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description From the input bytes, decode into an author
|
||||
*/
|
||||
@@ -104,6 +108,11 @@ export class GenericConsensusEngineId extends u32 {
|
||||
return this._getPowAuthor(bytes);
|
||||
}
|
||||
|
||||
// Moonbeam is neither Aura nor Babe nor Pow and uses h160 addresses
|
||||
if (bytes.length === 20) {
|
||||
return this._getH160Author(bytes);
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ describe('LookupSource', (): void => {
|
||||
|
||||
const testDecode = (type: string, input: LookupSource | AccountId | AccountIndex | number[] | Uint8Array, expected: string): void =>
|
||||
it(`can decode from ${type}`, (): void => {
|
||||
const a = registry.createType('Address', input);
|
||||
const a = registry.createType('IndicesLookupSource', input);
|
||||
|
||||
expect(a.toString()).toBe(expected);
|
||||
});
|
||||
@@ -18,19 +18,19 @@ describe('LookupSource', (): void => {
|
||||
it('equals on AccountId', (): void => {
|
||||
const addr = '5DkQbYAExs3M2sZgT1Ec3mKfZnAQCL4Dt9beTCknkCUn5jzo';
|
||||
|
||||
expect(registry.createType('LookupSource', addr).eq(addr)).toBe(true);
|
||||
expect(registry.createType('IndicesLookupSource', addr).eq(addr)).toBe(true);
|
||||
});
|
||||
|
||||
it('equals on AccountIndex', (): void => {
|
||||
// see the test below - these are equivalent (with different prefix encoding)
|
||||
expect(registry.createType('LookupSource', '2jpAFn').eq('25GUyv')).toBe(true);
|
||||
expect(registry.createType('IndicesLookupSource', '2jpAFn').eq('25GUyv')).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('decoding', (): void => {
|
||||
testDecode(
|
||||
'Address',
|
||||
registry.createType('LookupSource', '5C62W7ELLAAfix9LYrcx5smtcffbhvThkM5x7xfMeYXCtGwF'),
|
||||
registry.createType('IndicesLookupSource', '5C62W7ELLAAfix9LYrcx5smtcffbhvThkM5x7xfMeYXCtGwF'),
|
||||
'5C62W7ELLAAfix9LYrcx5smtcffbhvThkM5x7xfMeYXCtGwF'
|
||||
);
|
||||
testDecode(
|
||||
@@ -40,7 +40,7 @@ describe('LookupSource', (): void => {
|
||||
);
|
||||
testDecode(
|
||||
'AccountIndex (mixed prefixes)',
|
||||
registry.createType('LookupSource', '2jpAFn'),
|
||||
registry.createType('IndicesLookupSource', '2jpAFn'),
|
||||
// NOTE Expected adress here is encoded with prefix 42, input above with 68
|
||||
'25GUyv'
|
||||
);
|
||||
@@ -95,7 +95,7 @@ describe('LookupSource', (): void => {
|
||||
describe('encoding', (): void => {
|
||||
const testEncode = (to: 'toHex' | 'toString' | 'toU8a', expected: string | Uint8Array): void =>
|
||||
it(`can encode ${to}`, (): void => {
|
||||
const a = registry.createType('Address', '5C62W7ELLAAfix9LYrcx5smtcffbhvThkM5x7xfMeYXCtGwF');
|
||||
const a = registry.createType('IndicesLookupSource', '5C62W7ELLAAfix9LYrcx5smtcffbhvThkM5x7xfMeYXCtGwF');
|
||||
|
||||
expect(a[to]()).toEqual(expected);
|
||||
});
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { TypeRegistry } from '../../create';
|
||||
|
||||
const KILT = '0x8d01d51627af4cb8414b6ad454e7204424e7e8489738c5fabe20cee3256bd69b7534d12b2798b04e574d05fb8a4b163745b1e610fb75de59399271bd57e49738506a7a93ee0038dd6a1b3bfbb58f747a7b2052058620839a8e2d03f5a43b48ca6000c66a00299600004412f5d19eed1a0cbafadd3b050b6e87fbcdff0a4b2ab0dce498d2180f7d7fe40000000000000000000000000000000000000000000000000000000000000000000000200318f49e207f03cfdce586301014700e2c25930041585f078d434d6125b40443fe11fd292d13a410000008004c5f0ec2d17a76153ff51817f12d9cfc3c7f0400c106807ff6802ca40549562ffe6b52b99b82732a11693a9f94e719eb6091a28361553b7e1d6f8071c05107fa3ba69c860039b5eaf97de7405f1b96f158678ce0581618e4cb00ed8020617372d0786928a794bc2168d93a97c9934583395972b4d4ab49c99242035380947dbbbf1d13550ebd1c60bdad2e6e4905e72acf2135a3ecf9539b14ac336a1e8048b33fdf9c46b272d66e2467dba4fa4709dd3e560183d5ef462c8bdf09aa14e58083a5a2c804e9dbc8839a7d520a726c0518a82ff872d1ec2932c1142866c945648090bbb5b7644e54d533f3630580cb8074409ddcc510eab64ecc32216c912ac87a8071959a3ccb6903f9fb571c5eb87649e1a4d7fc095b7a9d88fd6941dadf0d251280ba7052563c97b91cccc3a3762e0a8d73a0fd2018bd63932fdf6e6dfb8e998705807970bd80ad702930fe83ab570956c242563c1ea2560e5bed94456168ded1ec2e801c3452fb59635b2a0def7e3a91cd071d57beb4d92294484ee948728d72a8a2ed80974da04ec2f2a432413995b1c30d9903e6c69b63d25ea3564c3fd604513c045480365249e4644cac1c396b92b70c2d8daa355a87236ca6ff3fdcf0e0039351fa911501802100803d7774397092a7bd12ebb498311ea37c46eeeec8460cbf88e03f55bfa109817f80f2ce141c02c934f343545350b70e54c8c2a0bb12f886462797399672b145ff0cad019e0da05ca59913bc38a8630590f2627c014180412934e1ef5da416397acfe5b81b2c604c81fd696fabcb082451b88dd46feafc585f078d434d6125b40443fe11fd292d13a410000008008077b468c9a59a67ed7ae15442240aba9ae23e7b632fe6e5bdb97b2b40b4aa10a135037f0006de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385a50200005000008000000800000000200000000400000500000005000000580200002c010000000020030004000000286bee0000000004000000040000000500000000000000000000000000000000000000000000000000000000000000000000000800000000200000040000000400000000040000b004000000000000000000001400000004000000040000000000000000000000000a000000000000000000000000000000000000009901801804800fcf38b60d2719964e4c4cc392848e51c8ce99e85efc57368586ed54938b6bf180aebb1dfa081e0f528a33c48cc0d64717ff2e6de6f73e001bc0c608d24f5b79b7809ee0a05d790e73768b384a037678e8cdc4fcfcb90ca782824c5119294de00fdb0000';
|
||||
|
||||
describe('SystemInherentData', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
registry.register({ BlockNumber: 'u64' });
|
||||
|
||||
it('can decode Kilt', (): void => {
|
||||
const value = registry.createType('SystemInherentData', KILT);
|
||||
|
||||
console.log(JSON.stringify(value.toHuman(), null, 2));
|
||||
|
||||
expect(value).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -13,7 +13,6 @@ import slotTypes from './slots';
|
||||
const proposeTypes = {
|
||||
ParachainProposal: {
|
||||
proposer: 'AccountId',
|
||||
validationCode: 'ValidationCode',
|
||||
genesisHead: 'HeadData',
|
||||
validators: 'Vec<ValidatorId>',
|
||||
name: 'Bytes',
|
||||
@@ -103,7 +102,8 @@ export default {
|
||||
persistedValidationDataHash: 'Hash',
|
||||
povHash: 'Hash',
|
||||
erasureRoot: 'Hash',
|
||||
signature: 'CollatorSignature'
|
||||
signature: 'CollatorSignature',
|
||||
paraHead: 'Hash'
|
||||
},
|
||||
CandidateHash: 'Hash',
|
||||
CandidatePendingAvailability: {
|
||||
@@ -244,13 +244,13 @@ export default {
|
||||
ParaValidatorIndex: 'u32',
|
||||
PersistedValidationData: {
|
||||
parentHead: 'HeadData',
|
||||
blockNumber: 'BlockNumber',
|
||||
blockNumber: 'RelayChainBlockNumber',
|
||||
relayStorageRoot: 'Hash',
|
||||
hrmpMqcHeads: 'Vec<(u32, Hash)>',
|
||||
dmqMqcHead: 'Hash',
|
||||
maxPovSize: 'u32'
|
||||
},
|
||||
RelayChainBlockNumber: 'BlockNumber',
|
||||
RelayChainBlockNumber: 'u32',
|
||||
QueuedParathread: {
|
||||
claim: 'ParathreadEntry',
|
||||
coreOffset: 'u32'
|
||||
@@ -519,6 +519,18 @@ export default {
|
||||
InitiateTeleport: 'InitiateTeleport',
|
||||
QueryHolding: 'QueryHolding'
|
||||
}
|
||||
}
|
||||
},
|
||||
MessagingStateSnapshot: {
|
||||
relayDispatchQueueSize: '(u32, u32)',
|
||||
egressChannels: 'Vec<MessagingStateSnapshotEgressEntry>'
|
||||
},
|
||||
MessagingStateSnapshotEgressEntry: '(ParaId, AbridgedHrmpChannel)',
|
||||
SystemInherentData: {
|
||||
validationData: 'PersistedValidationData',
|
||||
relayChainState: 'StorageProof',
|
||||
downwardMessages: 'Vec<InboundDownwardMessage>',
|
||||
horizontalMessages: 'BTreeMap<ParaId, VecInboundHrmpMessage>'
|
||||
},
|
||||
VecInboundHrmpMessage: 'Vec<InboundHrmpMessage>'
|
||||
}
|
||||
} as Definitions;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import type { BTreeMap, BitVec, Bytes, Compact, Enum, Option, Struct, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types';
|
||||
import type { ITuple } from '@polkadot/types/types';
|
||||
import type { Signature } from '@polkadot/types/interfaces/extrinsics';
|
||||
import type { AccountId, Balance, BalanceOf, BlockNumber, H256, Hash, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime';
|
||||
import type { AccountId, Balance, BalanceOf, BlockNumber, H256, Hash, StorageProof, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime';
|
||||
import type { MembershipProof, SessionIndex } from '@polkadot/types/interfaces/session';
|
||||
|
||||
/** @name AbridgedCandidateReceipt */
|
||||
@@ -176,6 +176,7 @@ export interface CandidateDescriptor extends Struct {
|
||||
readonly povHash: Hash;
|
||||
readonly erasureRoot: Hash;
|
||||
readonly signature: CollatorSignature;
|
||||
readonly paraHead: Hash;
|
||||
}
|
||||
|
||||
/** @name CandidateHash */
|
||||
@@ -443,6 +444,15 @@ export interface MessageIngestionType extends Struct {
|
||||
readonly horizontalMessages: BTreeMap<ParaId, InboundHrmpMessages>;
|
||||
}
|
||||
|
||||
/** @name MessagingStateSnapshot */
|
||||
export interface MessagingStateSnapshot extends Struct {
|
||||
readonly relayDispatchQueueSize: ITuple<[u32, u32]>;
|
||||
readonly egressChannels: Vec<MessagingStateSnapshotEgressEntry>;
|
||||
}
|
||||
|
||||
/** @name MessagingStateSnapshotEgressEntry */
|
||||
export interface MessagingStateSnapshotEgressEntry extends ITuple<[ParaId, AbridgedHrmpChannel]> {}
|
||||
|
||||
/** @name MultiAsset */
|
||||
export interface MultiAsset extends Enum {
|
||||
readonly isNone: boolean;
|
||||
@@ -538,7 +548,6 @@ export interface ParachainDispatchOrigin extends Enum {
|
||||
/** @name ParachainProposal */
|
||||
export interface ParachainProposal extends Struct {
|
||||
readonly proposer: AccountId;
|
||||
readonly validationCode: ValidationCode;
|
||||
readonly genesisHead: HeadData;
|
||||
readonly validators: Vec<ValidatorId>;
|
||||
readonly name: Bytes;
|
||||
@@ -593,7 +602,7 @@ export interface ParaValidatorIndex extends u32 {}
|
||||
/** @name PersistedValidationData */
|
||||
export interface PersistedValidationData extends Struct {
|
||||
readonly parentHead: HeadData;
|
||||
readonly blockNumber: BlockNumber;
|
||||
readonly blockNumber: RelayChainBlockNumber;
|
||||
readonly relayStorageRoot: Hash;
|
||||
readonly hrmpMqcHeads: Vec<ITuple<[u32, Hash]>>;
|
||||
readonly dmqMqcHead: Hash;
|
||||
@@ -620,7 +629,7 @@ export interface RegisteredParachainInfo extends Struct {
|
||||
}
|
||||
|
||||
/** @name RelayChainBlockNumber */
|
||||
export interface RelayChainBlockNumber extends BlockNumber {}
|
||||
export interface RelayChainBlockNumber extends u32 {}
|
||||
|
||||
/** @name RelayedFrom */
|
||||
export interface RelayedFrom extends Struct {
|
||||
@@ -717,6 +726,14 @@ export interface Statement extends Enum {
|
||||
/** @name SubId */
|
||||
export interface SubId extends u32 {}
|
||||
|
||||
/** @name SystemInherentData */
|
||||
export interface SystemInherentData extends Struct {
|
||||
readonly validationData: PersistedValidationData;
|
||||
readonly relayChainState: StorageProof;
|
||||
readonly downwardMessages: Vec<InboundDownwardMessage>;
|
||||
readonly horizontalMessages: BTreeMap<ParaId, VecInboundHrmpMessage>;
|
||||
}
|
||||
|
||||
/** @name TeleportAsset */
|
||||
export interface TeleportAsset extends Struct {
|
||||
readonly assets: Vec<MultiAsset>;
|
||||
@@ -775,6 +792,9 @@ export interface ValidityAttestation extends Enum {
|
||||
readonly asExplicit: ValidatorSignature;
|
||||
}
|
||||
|
||||
/** @name VecInboundHrmpMessage */
|
||||
export interface VecInboundHrmpMessage extends Vec<InboundHrmpMessage> {}
|
||||
|
||||
/** @name VersionedMultiAsset */
|
||||
export interface VersionedMultiAsset extends Enum {
|
||||
readonly isV0: boolean;
|
||||
|
||||
@@ -29,7 +29,7 @@ export default {
|
||||
AccountId: 'GenericAccountId',
|
||||
AccountIdOf: 'AccountId',
|
||||
AccountIndex: 'GenericAccountIndex',
|
||||
Address: 'LookupSource',
|
||||
Address: 'MultiAddress',
|
||||
AssetId: 'u32',
|
||||
Balance: 'UInt<128, Balance>',
|
||||
BalanceOf: 'Balance',
|
||||
@@ -82,7 +82,7 @@ export default {
|
||||
KeyValue: '(StorageKey, StorageData)',
|
||||
KeyTypeId: 'u32',
|
||||
LockIdentifier: '[u8; 8]',
|
||||
LookupSource: 'IndicesLookupSource',
|
||||
LookupSource: 'MultiAddress',
|
||||
LookupTarget: 'AccountId',
|
||||
ModuleId: 'LockIdentifier',
|
||||
MultiAddress: 'GenericMultiAddress',
|
||||
@@ -117,7 +117,11 @@ export default {
|
||||
block: 'Block',
|
||||
justification: 'Justification'
|
||||
},
|
||||
Slot: 'u64',
|
||||
StorageData: 'Bytes',
|
||||
StorageProof: {
|
||||
trieNodes: 'Vec<Bytes>'
|
||||
},
|
||||
TransactionPriority: 'u64',
|
||||
ValidatorId: 'AccountId',
|
||||
ValidatorIdOf: 'ValidatorId',
|
||||
|
||||
@@ -17,7 +17,7 @@ export interface AccountIdOf extends AccountId {}
|
||||
export interface AccountIndex extends GenericAccountIndex {}
|
||||
|
||||
/** @name Address */
|
||||
export interface Address extends LookupSource {}
|
||||
export interface Address extends MultiAddress {}
|
||||
|
||||
/** @name AssetId */
|
||||
export interface AssetId extends u32 {}
|
||||
@@ -157,7 +157,7 @@ export interface KeyValue extends ITuple<[StorageKey, StorageData]> {}
|
||||
export interface LockIdentifier extends U8aFixed {}
|
||||
|
||||
/** @name LookupSource */
|
||||
export interface LookupSource extends IndicesLookupSource {}
|
||||
export interface LookupSource extends MultiAddress {}
|
||||
|
||||
/** @name LookupTarget */
|
||||
export interface LookupTarget extends AccountId {}
|
||||
@@ -255,9 +255,17 @@ export interface SignedBlock extends Struct {
|
||||
readonly justification: Justification;
|
||||
}
|
||||
|
||||
/** @name Slot */
|
||||
export interface Slot extends u64 {}
|
||||
|
||||
/** @name StorageData */
|
||||
export interface StorageData extends Bytes {}
|
||||
|
||||
/** @name StorageProof */
|
||||
export interface StorageProof extends Struct {
|
||||
readonly trieNodes: Vec<Bytes>;
|
||||
}
|
||||
|
||||
/** @name TransactionPriority */
|
||||
export interface TransactionPriority extends u64 {}
|
||||
|
||||
|
||||
@@ -1622,46 +1622,46 @@ __metadata:
|
||||
resolution: "@polkadot/api-contract@workspace:packages/api-contract"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
"@polkadot/api": 3.6.1
|
||||
"@polkadot/types": 3.6.1
|
||||
"@polkadot/util": ^5.4.2
|
||||
"@polkadot/x-rxjs": ^5.4.2
|
||||
"@polkadot/api": 3.7.3
|
||||
"@polkadot/types": 3.7.3
|
||||
"@polkadot/util": ^5.5.2
|
||||
"@polkadot/x-rxjs": ^5.5.2
|
||||
bn.js: ^4.11.9
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/api-derive@3.6.1, @polkadot/api-derive@workspace:packages/api-derive":
|
||||
"@polkadot/api-derive@3.7.3, @polkadot/api-derive@workspace:packages/api-derive":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/api-derive@workspace:packages/api-derive"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
"@polkadot/api": 3.6.1
|
||||
"@polkadot/keyring": ^5.4.2
|
||||
"@polkadot/rpc-core": 3.6.1
|
||||
"@polkadot/rpc-provider": 3.6.1
|
||||
"@polkadot/types": 3.6.1
|
||||
"@polkadot/util": ^5.4.2
|
||||
"@polkadot/util-crypto": ^5.4.2
|
||||
"@polkadot/x-rxjs": ^5.4.2
|
||||
"@polkadot/api": 3.7.3
|
||||
"@polkadot/keyring": ^5.5.2
|
||||
"@polkadot/rpc-core": 3.7.3
|
||||
"@polkadot/rpc-provider": 3.7.3
|
||||
"@polkadot/types": 3.7.3
|
||||
"@polkadot/util": ^5.5.2
|
||||
"@polkadot/util-crypto": ^5.5.2
|
||||
"@polkadot/x-rxjs": ^5.5.2
|
||||
bn.js: ^4.11.9
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/api@3.6.1, @polkadot/api@workspace:packages/api":
|
||||
"@polkadot/api@3.7.3, @polkadot/api@workspace:packages/api":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/api@workspace:packages/api"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
"@polkadot/api-derive": 3.6.1
|
||||
"@polkadot/keyring": ^5.4.2
|
||||
"@polkadot/metadata": 3.6.1
|
||||
"@polkadot/rpc-core": 3.6.1
|
||||
"@polkadot/rpc-provider": 3.6.1
|
||||
"@polkadot/types": 3.6.1
|
||||
"@polkadot/types-known": 3.6.1
|
||||
"@polkadot/util": ^5.4.2
|
||||
"@polkadot/util-crypto": ^5.4.2
|
||||
"@polkadot/x-rxjs": ^5.4.2
|
||||
"@polkadot/api-derive": 3.7.3
|
||||
"@polkadot/keyring": ^5.5.2
|
||||
"@polkadot/metadata": 3.7.3
|
||||
"@polkadot/rpc-core": 3.7.3
|
||||
"@polkadot/rpc-provider": 3.7.3
|
||||
"@polkadot/types": 3.7.3
|
||||
"@polkadot/types-known": 3.7.3
|
||||
"@polkadot/util": ^5.5.2
|
||||
"@polkadot/util-crypto": ^5.5.2
|
||||
"@polkadot/x-rxjs": ^5.5.2
|
||||
bn.js: ^4.11.9
|
||||
eventemitter3: ^4.0.7
|
||||
languageName: unknown
|
||||
@@ -1758,73 +1758,74 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/keyring@npm:^5.4.2":
|
||||
version: 5.4.2
|
||||
resolution: "@polkadot/keyring@npm:5.4.2"
|
||||
"@polkadot/keyring@npm:^5.5.2":
|
||||
version: 5.5.2
|
||||
resolution: "@polkadot/keyring@npm:5.5.2"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
"@polkadot/util": 5.4.2
|
||||
"@polkadot/util-crypto": 5.4.2
|
||||
"@polkadot/util": 5.5.2
|
||||
"@polkadot/util-crypto": 5.5.2
|
||||
peerDependencies:
|
||||
"@polkadot/util": 5.4.2
|
||||
"@polkadot/util-crypto": 5.4.2
|
||||
checksum: 9f68a3606809df329506aa4df7da286a755c47e961268d406a6e2d226cb8cb95aa444c2043e1aeb55ff75766c3385d5c6e588535b5633b4b262d36ce33034d44
|
||||
"@polkadot/util": 5.5.2
|
||||
"@polkadot/util-crypto": 5.5.2
|
||||
checksum: 7b21d5e92c34edf4bd619168af7381e43775c82996d9be6bd22a86b136da816ba2352dfb79b563b6f939ff823c2955c8fa00c4d6828c382437d22a07a72bfd74
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/metadata@3.6.1, @polkadot/metadata@workspace:packages/metadata":
|
||||
"@polkadot/metadata@3.7.3, @polkadot/metadata@workspace:packages/metadata":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/metadata@workspace:packages/metadata"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
"@polkadot/keyring": ^5.4.2
|
||||
"@polkadot/types": 3.6.1
|
||||
"@polkadot/types-known": 3.6.1
|
||||
"@polkadot/util": ^5.4.2
|
||||
"@polkadot/util-crypto": ^5.4.2
|
||||
"@polkadot/keyring": ^5.5.2
|
||||
"@polkadot/types": 3.7.3
|
||||
"@polkadot/types-known": 3.7.3
|
||||
"@polkadot/util": ^5.5.2
|
||||
"@polkadot/util-crypto": ^5.5.2
|
||||
bn.js: ^4.11.9
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/networks@npm:5.4.2":
|
||||
version: 5.4.2
|
||||
resolution: "@polkadot/networks@npm:5.4.2"
|
||||
"@polkadot/networks@npm:5.5.2, @polkadot/networks@npm:^5.5.2":
|
||||
version: 5.5.2
|
||||
resolution: "@polkadot/networks@npm:5.5.2"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
checksum: 4bc40a3925364e9f95c1cecfd3ac82b50cf50fafee2a8ba2d535099500822812dfc3c8ba31dc43c11fe992f5aec93afabd5bd0863e610faef0e1bd86d45f7c46
|
||||
checksum: 8203fb953a8fca6e0a9bf7863c8d8262c714c2aed32f1dfedc0af08ee3c4224a51de56be832b6def94517d7cddcb33ca0a318bb8940500fd73cfc009404a4a6f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/rpc-core@3.6.1, @polkadot/rpc-core@workspace:packages/rpc-core":
|
||||
"@polkadot/rpc-core@3.7.3, @polkadot/rpc-core@workspace:packages/rpc-core":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/rpc-core@workspace:packages/rpc-core"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
"@polkadot/keyring": ^5.4.2
|
||||
"@polkadot/metadata": 3.6.1
|
||||
"@polkadot/rpc-provider": 3.6.1
|
||||
"@polkadot/types": 3.6.1
|
||||
"@polkadot/util": ^5.4.2
|
||||
"@polkadot/x-rxjs": ^5.4.2
|
||||
"@polkadot/keyring": ^5.5.2
|
||||
"@polkadot/metadata": 3.7.3
|
||||
"@polkadot/rpc-provider": 3.7.3
|
||||
"@polkadot/types": 3.7.3
|
||||
"@polkadot/util": ^5.5.2
|
||||
"@polkadot/x-rxjs": ^5.5.2
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/rpc-provider@3.6.1, @polkadot/rpc-provider@workspace:packages/rpc-provider":
|
||||
"@polkadot/rpc-provider@3.7.3, @polkadot/rpc-provider@workspace:packages/rpc-provider":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/rpc-provider@workspace:packages/rpc-provider"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
"@polkadot/keyring": ^5.4.2
|
||||
"@polkadot/metadata": 3.6.1
|
||||
"@polkadot/types": 3.6.1
|
||||
"@polkadot/util": ^5.4.2
|
||||
"@polkadot/util-crypto": ^5.4.2
|
||||
"@polkadot/x-fetch": ^5.4.2
|
||||
"@polkadot/x-ws": ^5.4.2
|
||||
"@polkadot/keyring": ^5.5.2
|
||||
"@polkadot/metadata": 3.7.3
|
||||
"@polkadot/types": 3.7.3
|
||||
"@polkadot/util": ^5.5.2
|
||||
"@polkadot/util-crypto": ^5.5.2
|
||||
"@polkadot/x-fetch": ^5.5.2
|
||||
"@polkadot/x-global": ^5.5.2
|
||||
"@polkadot/x-ws": ^5.5.2
|
||||
bn.js: ^4.11.9
|
||||
eventemitter3: ^4.0.7
|
||||
mock-socket: ^9.0.3
|
||||
nock: ^13.0.6
|
||||
nock: ^13.0.7
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
@@ -1844,13 +1845,13 @@ __metadata:
|
||||
"@babel/core": ^7.12.10
|
||||
"@babel/register": ^7.12.10
|
||||
"@babel/runtime": ^7.12.5
|
||||
"@polkadot/api": 3.6.1
|
||||
"@polkadot/metadata": 3.6.1
|
||||
"@polkadot/rpc-provider": 3.6.1
|
||||
"@polkadot/types": 3.6.1
|
||||
"@polkadot/util": ^5.4.2
|
||||
"@polkadot/api": 3.7.3
|
||||
"@polkadot/metadata": 3.7.3
|
||||
"@polkadot/rpc-provider": 3.7.3
|
||||
"@polkadot/types": 3.7.3
|
||||
"@polkadot/util": ^5.5.2
|
||||
"@types/websocket": ^1.0.1
|
||||
"@types/yargs": ^15.0.12
|
||||
"@types/yargs": ^15.0.13
|
||||
handlebars: ^4.7.6
|
||||
websocket: ^1.0.33
|
||||
yargs: ^16.2.0
|
||||
@@ -1863,42 +1864,43 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/types-known@3.6.1, @polkadot/types-known@workspace:packages/types-known":
|
||||
"@polkadot/types-known@3.7.3, @polkadot/types-known@workspace:packages/types-known":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/types-known@workspace:packages/types-known"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
"@polkadot/types": 3.6.1
|
||||
"@polkadot/util": ^5.4.2
|
||||
"@polkadot/networks": ^5.5.2
|
||||
"@polkadot/types": 3.7.3
|
||||
"@polkadot/util": ^5.5.2
|
||||
"@types/bn.js": ^4.11.6
|
||||
bn.js: ^4.11.9
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/types@3.6.1, @polkadot/types@workspace:packages/types":
|
||||
"@polkadot/types@3.7.3, @polkadot/types@workspace:packages/types":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/types@workspace:packages/types"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
"@polkadot/keyring": ^5.4.2
|
||||
"@polkadot/metadata": 3.6.1
|
||||
"@polkadot/util": ^5.4.2
|
||||
"@polkadot/util-crypto": ^5.4.2
|
||||
"@polkadot/x-rxjs": ^5.4.2
|
||||
"@polkadot/keyring": ^5.5.2
|
||||
"@polkadot/metadata": 3.7.3
|
||||
"@polkadot/util": ^5.5.2
|
||||
"@polkadot/util-crypto": ^5.5.2
|
||||
"@polkadot/x-rxjs": ^5.5.2
|
||||
"@types/bn.js": ^4.11.6
|
||||
bn.js: ^4.11.9
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/util-crypto@npm:5.4.2, @polkadot/util-crypto@npm:^5.4.2":
|
||||
version: 5.4.2
|
||||
resolution: "@polkadot/util-crypto@npm:5.4.2"
|
||||
"@polkadot/util-crypto@npm:5.5.2, @polkadot/util-crypto@npm:^5.5.2":
|
||||
version: 5.5.2
|
||||
resolution: "@polkadot/util-crypto@npm:5.5.2"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
"@polkadot/networks": 5.4.2
|
||||
"@polkadot/util": 5.4.2
|
||||
"@polkadot/networks": 5.5.2
|
||||
"@polkadot/util": 5.5.2
|
||||
"@polkadot/wasm-crypto": ^3.2.2
|
||||
"@polkadot/x-randomvalues": 5.4.2
|
||||
"@polkadot/x-randomvalues": 5.5.2
|
||||
base-x: ^3.0.8
|
||||
blakejs: ^1.1.0
|
||||
bn.js: ^4.11.9
|
||||
@@ -1910,23 +1912,23 @@ __metadata:
|
||||
tweetnacl: ^1.0.3
|
||||
xxhashjs: ^0.2.2
|
||||
peerDependencies:
|
||||
"@polkadot/util": 5.4.2
|
||||
checksum: d1f5b2f77f5da524039c8e3b15cb90c2d1c0d8f284db4833e4f202c7ea0b2c74553052f96dea30e3c8d91bcf6b30f4e25fe90dbe17d044a861d082363754201e
|
||||
"@polkadot/util": 5.5.2
|
||||
checksum: ba1e67ecfdacc3818d0146cdc83ae720506d4803cd95c45b324479896050ddd264f98f3ceb573e0754d19aac6e9272bbbe3945eff4d2fd1088e605a36e5fdb6f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/util@npm:5.4.2, @polkadot/util@npm:^5.4.2":
|
||||
version: 5.4.2
|
||||
resolution: "@polkadot/util@npm:5.4.2"
|
||||
"@polkadot/util@npm:5.5.2, @polkadot/util@npm:^5.5.2":
|
||||
version: 5.5.2
|
||||
resolution: "@polkadot/util@npm:5.5.2"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
"@polkadot/x-textdecoder": 5.4.2
|
||||
"@polkadot/x-textencoder": 5.4.2
|
||||
"@polkadot/x-textdecoder": 5.5.2
|
||||
"@polkadot/x-textencoder": 5.5.2
|
||||
"@types/bn.js": ^4.11.6
|
||||
bn.js: ^4.11.9
|
||||
camelcase: ^5.3.1
|
||||
ip-regex: ^4.3.0
|
||||
checksum: ebc157c8cada88719dd8f78977de3186da55232be886159473c6395a9d6619115e6abd1655c6e62f5412f2abb9cc0db99bce7c8872dfc568275472cbd2b46a58
|
||||
checksum: ed44349e0484962f58b34a411d7217684bcacad461a306f0164e75deb8c239dfd2f36f8c1490ccaa5e3d3fe11f81fb69be717f170155e27c1d68f259c4e6ad64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -1962,62 +1964,78 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/x-fetch@npm:^5.4.2":
|
||||
version: 5.4.2
|
||||
resolution: "@polkadot/x-fetch@npm:5.4.2"
|
||||
"@polkadot/x-fetch@npm:^5.5.2":
|
||||
version: 5.5.2
|
||||
resolution: "@polkadot/x-fetch@npm:5.5.2"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
"@polkadot/x-global": 5.5.2
|
||||
"@types/node-fetch": ^2.5.8
|
||||
node-fetch: ^2.6.1
|
||||
checksum: db2e12c97d5cd1c64e8dec868ddd75f121c7a412943d1b48b0759e262763120bc1623e2d8770542b94a3a473323e4f1e1a85ec8996dac0e75749f5cdc6e46d4e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/x-global@npm:5.5.2, @polkadot/x-global@npm:^5.5.2":
|
||||
version: 5.5.2
|
||||
resolution: "@polkadot/x-global@npm:5.5.2"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
"@types/node-fetch": ^2.5.8
|
||||
node-fetch: ^2.6.1
|
||||
checksum: 95219bc6d58a07892a846d105bedffc7ba9eaccf6434dc8f136bdecc22add4fd05484f5528cee4a4d1787d2c9ca7f03499b72d3e5be7511b7122ca73777b7434
|
||||
checksum: 7b89e9d1e47d8bd314754e5dc84a2010420edee4a5fad495392f87d72a0f37118a7cc7ba441fde0392bf3c58241def9b9103766ef23fb50065f4d9bd9f1a4382
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/x-randomvalues@npm:5.4.2":
|
||||
version: 5.4.2
|
||||
resolution: "@polkadot/x-randomvalues@npm:5.4.2"
|
||||
"@polkadot/x-randomvalues@npm:5.5.2":
|
||||
version: 5.5.2
|
||||
resolution: "@polkadot/x-randomvalues@npm:5.5.2"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
checksum: 916cfb49d29b2638291b5a8be892c5776690dec4d5ca951c32b1ae1e0fd050764a1df5f028d6926c571131b0e5336c81c76fd1c949db46922649754a1a81a12d
|
||||
"@polkadot/x-global": 5.5.2
|
||||
checksum: efdf4d21e90bc14de13e243fb268a568bf799dced767dba25dfe54ad10d6e040c7970f43722b2fd8fe3caefba07ac4ccd0a2d86bc8ee586ad06e7fb208ac5fd3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/x-rxjs@npm:^5.4.2":
|
||||
version: 5.4.2
|
||||
resolution: "@polkadot/x-rxjs@npm:5.4.2"
|
||||
"@polkadot/x-rxjs@npm:^5.5.2":
|
||||
version: 5.5.2
|
||||
resolution: "@polkadot/x-rxjs@npm:5.5.2"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
rxjs: ^6.6.3
|
||||
checksum: 2662da5c2195db7d40e67b7da2eb5e9558120f7e274b5dc6045ec06ff67178cec39ee6c17cac0c9cc885635e36a3b266569500fb215925b786d57f3bbc25fdb0
|
||||
checksum: a523a49c1472474ebe80f0b2724cff4b864099b624e13e399a772c7cfa7baf1173d5fcaafd539ab6b88dc24d9826fafb8df4ba8401caade582fa2943b6e31b07
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/x-textdecoder@npm:5.4.2":
|
||||
version: 5.4.2
|
||||
resolution: "@polkadot/x-textdecoder@npm:5.4.2"
|
||||
"@polkadot/x-textdecoder@npm:5.5.2":
|
||||
version: 5.5.2
|
||||
resolution: "@polkadot/x-textdecoder@npm:5.5.2"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
checksum: 3da6962155441a1e68843d69b3813049f073e315da27999cc47ca3498689957b32651b8aff6f635406ad4864c2a054faa49bc8f06840508b44e535f3d43b765f
|
||||
"@polkadot/x-global": 5.5.2
|
||||
checksum: 167a99fb2d21da65292d3111ca46e41f94b3776caaeff86aae7b3633b8861df8011973a21703876e50da46a58024aaff42b66125f51b4503423a3f823db7846b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/x-textencoder@npm:5.4.2":
|
||||
version: 5.4.2
|
||||
resolution: "@polkadot/x-textencoder@npm:5.4.2"
|
||||
"@polkadot/x-textencoder@npm:5.5.2":
|
||||
version: 5.5.2
|
||||
resolution: "@polkadot/x-textencoder@npm:5.5.2"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
checksum: 6f9b77c77c41f5ebbc754ca6b252d3b3e4655c0c35d39e2624c2948d0bb27016277b2eb56eafdf1b0d8b75d2c796b6825629f7a95cf2b61684182705bfdebad8
|
||||
"@polkadot/x-global": 5.5.2
|
||||
checksum: a2e5a653639131c9e915260ee452ee10435a464242f6304ce9a78f1427d73c70955f6c7964a2c06a6e75123a624bc8203c5ccc1297a97f7306c85456d07d8c86
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/x-ws@npm:^5.4.2":
|
||||
version: 5.4.2
|
||||
resolution: "@polkadot/x-ws@npm:5.4.2"
|
||||
"@polkadot/x-ws@npm:^5.5.2":
|
||||
version: 5.5.2
|
||||
resolution: "@polkadot/x-ws@npm:5.5.2"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.12.5
|
||||
"@polkadot/x-global": 5.5.2
|
||||
"@types/websocket": ^1.0.1
|
||||
websocket: ^1.0.33
|
||||
checksum: 5fdbf1c86373dc8790ca60ddbbbe7cdb87df541982e4d009ea7692c49082e0793782652e39ebaf6a74730fa8ed4d02f791fd1d68bd1b604425e61e1595aab939
|
||||
checksum: b17ff626a73b73b87207fa24c0245fa5dfed32375b37b46413388b15cdaf978dffaea2e785eab29bd6ea4557c1695a54f83a538d922d3aa9074fa1721896ded7
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -2275,12 +2293,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/yargs@npm:^15.0.0, @types/yargs@npm:^15.0.12":
|
||||
version: 15.0.12
|
||||
resolution: "@types/yargs@npm:15.0.12"
|
||||
"@types/yargs@npm:^15.0.0, @types/yargs@npm:^15.0.13":
|
||||
version: 15.0.13
|
||||
resolution: "@types/yargs@npm:15.0.13"
|
||||
dependencies:
|
||||
"@types/yargs-parser": "*"
|
||||
checksum: b67cf9e8f25865a6d6e72196fe7f47c6f328d2b7a54ed9fa0e60f9693abb332fec1a826f90310804f231bca28a2f71367956b3be2fdba2d4bf316f0394d84f4d
|
||||
checksum: fa1a5b0a07dbbff1657a27d1191d586632412d170321000f6f417f279547a8c191d7058dbf4d4187c188a5a1aeb2473ddb25fe316b206fccdfe1de6fad976619
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -7671,15 +7689,15 @@ fsevents@~2.1.2:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"nock@npm:^13.0.6":
|
||||
version: 13.0.6
|
||||
resolution: "nock@npm:13.0.6"
|
||||
"nock@npm:^13.0.7":
|
||||
version: 13.0.7
|
||||
resolution: "nock@npm:13.0.7"
|
||||
dependencies:
|
||||
debug: ^4.1.0
|
||||
json-stringify-safe: ^5.0.1
|
||||
lodash.set: ^4.3.2
|
||||
propagate: ^2.0.0
|
||||
checksum: 48fae5537e8b5d994d2b989f3c4ae3ab3893aff676ffa086605a8c2b1292b9bc8c879eae62330578b8dd832e1e011edcfc4a5317d5bc093c43b7c95e41c4acf0
|
||||
checksum: db77afdd757bb9f5496783a9f7cc30eb0664195c469d0b01e2e956545e6c08b24482a4a3fcdf4eef1713da30baa880bde244bac6c546733d5b3a59c6838d24b1
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in New Issue
Block a user