Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
25288f664a | ||
|
|
879c5d7b44 | ||
|
|
cdaec1953c | ||
|
|
f4bf7a9c52 | ||
|
|
7b46c6aa15 | ||
|
|
d28f4ccfa0 | ||
|
|
e5b05dc700 | ||
|
|
bf9831753e | ||
|
|
5e1670dbae | ||
|
|
0d0a230c86 | ||
|
|
9989b69b46 | ||
|
|
66693253ef | ||
|
|
cbffc37dcf | ||
|
|
74ee42ed66 | ||
|
|
f642e2399f | ||
|
|
8cefb055db | ||
|
|
1f31756019 | ||
|
|
4d6a1da6d5 | ||
|
|
d62e720627 | ||
|
|
4af4470998 | ||
|
|
8bb6218132 | ||
|
|
f4197f8752 | ||
|
|
7cfad3b1c4 | ||
|
|
ff67a659b6 | ||
|
|
a5c69a42fc | ||
|
|
3facbf00eb | ||
|
|
5a6eece6d6 | ||
|
|
9219fa3197 | ||
|
|
32b9a39b1e | ||
|
|
61a7fe6307 | ||
|
|
ca755d3e0d | ||
|
|
442dba42ba | ||
|
|
ba80dd8873 | ||
|
|
1d35302dca | ||
|
|
39c3121437 | ||
|
|
d7de1d84fb | ||
|
|
0ee1dfb353 | ||
|
|
0a6f1d87d4 | ||
|
|
b7c563391c | ||
|
|
b648c4ba6c | ||
|
|
0eb995c9a1 | ||
|
|
936d14ffea | ||
|
|
72c7a0a34b | ||
|
|
8402013e97 | ||
|
|
fde6b72974 | ||
|
|
d98d4d6908 | ||
|
|
ed384666ee | ||
|
|
4e64e3d654 | ||
|
|
72b4b51915 | ||
|
|
81f5bf96f5 | ||
|
|
e935281b77 | ||
|
|
e132330c0b | ||
|
|
21594aa660 | ||
|
|
6fb7989b41 | ||
|
|
1f38a38bd5 | ||
|
|
e918aa8b14 | ||
|
|
4a33b18ac4 | ||
|
|
cb97fd1a48 | ||
|
|
51600bc560 | ||
|
|
12344ed980 | ||
|
|
0b6773a744 | ||
|
|
17a38e9c09 | ||
|
|
70499fe6ac | ||
|
|
64493e0091 | ||
|
|
ae3efb31f8 | ||
|
|
6da58d0698 | ||
|
|
07f40c1429 | ||
|
|
f5f67e795e | ||
|
|
5b0652c272 | ||
|
|
53ef5f7c56 | ||
|
|
71f99875e4 | ||
|
|
a097075bfe | ||
|
|
527f840950 | ||
|
|
7fadc7eedb | ||
|
|
35663319d9 | ||
|
|
b9d9670d18 | ||
|
|
fd027f452c | ||
|
|
10a6e03f85 | ||
|
|
522eb8359f | ||
|
|
d1fd7f75af | ||
|
|
bb61b1e6ac | ||
|
|
7c17baa5be | ||
|
|
9e7c0a1959 |
+2
-1
@@ -41,4 +41,5 @@
|
|||||||
6.1.2
|
6.1.2
|
||||||
|
|
||||||
6.4.2
|
6.4.2
|
||||||
6.5.2
|
6.5.2
|
||||||
|
6.7.2
|
||||||
+48
-1
@@ -1,8 +1,55 @@
|
|||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
## 6.8.1 Nov 11, 2021
|
||||||
|
|
||||||
|
Upgrade priority: Low. Recommended for chains with non-MultiSignature variants where `paymentInfo` is required.
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Adjust `paymentInfo` signatures to cater for non-MultiSignature variants
|
||||||
|
- Remove `::generic::` from names & namespaces under metadata v14
|
||||||
|
- Add Polkadot 9122 upgrade block
|
||||||
|
- Cleanup Polkadot/Kusama/Westend/Rococo known types (>= v14 metadata)
|
||||||
|
- Internal `decorateMethod{Promise, Rx}` renamed to `to{Promise, Rx}Method`
|
||||||
|
- Add RPC provider-level LRU for historic requests
|
||||||
|
- Add optional known runtime version param to internal `rx.queryAt`
|
||||||
|
|
||||||
|
|
||||||
|
## 6.7.2 Nov 9, 2021
|
||||||
|
|
||||||
|
Upgrade priority: Low. Recommended for chains on metadata v14 with non-default `Address` implementations.
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Detect `AccountId` & `Address` types via `SpRuntime*` definitions
|
||||||
|
- Adjust api-derive call ordering when using `.queryAt`
|
||||||
|
|
||||||
|
|
||||||
|
## 6.7.1 Nov 7, 2021
|
||||||
|
|
||||||
|
Upgrade priority: Low. Internal maintenance updates, focussed on internal optimizations.
|
||||||
|
|
||||||
|
Changelog:
|
||||||
|
|
||||||
|
- Optimize Extrinsic & block handling (Thanks to https://github.com/nazar-pc)
|
||||||
|
- Add `account::AccountId20` mapping (Thanks to https://github.com/joelamouche)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Use new-gen `voteLockingPeriod` in democracy derives (as available)
|
||||||
|
- Dynamically inject getters for `Extrinsic` payloads
|
||||||
|
- Optimize caching for complex constructed type classes per registry
|
||||||
|
- Convert metadata, rpc and api to use lazy decoration
|
||||||
|
- Split u8a decoding paths for `Vec` (different from general path)
|
||||||
|
- Keep track of initial u8a decoded length inside base Codecs
|
||||||
|
- Extract multi property assignments for `Struct`, `Set`, `Json` & `Enum`
|
||||||
|
- Move `PortableRegistry` location inside `@polkadot/types/metadata`
|
||||||
|
- Bump static metadata for latest Substrate, Polkadot & Kusama
|
||||||
|
|
||||||
|
|
||||||
## 6.6.1 Nov 1, 2021
|
## 6.6.1 Nov 1, 2021
|
||||||
|
|
||||||
Upgrade priority: Low. Internal maintennce updates.
|
Upgrade priority: Low. Internal maintenance updates.
|
||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"version": "6.6.1",
|
"version": "6.8.1",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
],
|
],
|
||||||
@@ -31,11 +31,11 @@
|
|||||||
"test:watch": "polkadot-dev-run-test --watch"
|
"test:watch": "polkadot-dev-run-test --watch"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.15.8",
|
"@babel/core": "^7.16.0",
|
||||||
"@babel/register": "^7.15.3",
|
"@babel/register": "^7.16.0",
|
||||||
"@babel/runtime": "^7.15.4",
|
"@babel/runtime": "^7.16.0",
|
||||||
"@polkadot/dev": "^0.63.18",
|
"@polkadot/dev": "^0.63.27",
|
||||||
"@polkadot/ts": "^0.4.12",
|
"@polkadot/ts": "^0.4.13",
|
||||||
"@polkadot/typegen": "workspace:packages/typegen",
|
"@polkadot/typegen": "workspace:packages/typegen",
|
||||||
"@types/jest": "^27.0.2",
|
"@types/jest": "^27.0.2",
|
||||||
"copyfiles": "^2.4.1"
|
"copyfiles": "^2.4.1"
|
||||||
|
|||||||
@@ -20,13 +20,13 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "6.6.1",
|
"version": "6.8.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.15.4",
|
"@babel/runtime": "^7.16.0",
|
||||||
"@polkadot/api": "6.6.1",
|
"@polkadot/api": "6.8.1",
|
||||||
"@polkadot/types": "6.6.1",
|
"@polkadot/types": "6.8.1",
|
||||||
"@polkadot/util": "^7.7.1",
|
"@polkadot/util": "^7.8.2",
|
||||||
"rxjs": "^7.4.0"
|
"rxjs": "^7.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
|
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { Bytes } from '@polkadot/types';
|
import type { Bytes, PortableRegistry } from '@polkadot/types';
|
||||||
import type { ChainProperties, ContractConstructorSpec, ContractEventSpec, ContractMessageParamSpec, ContractMessageSpec, ContractMetadataLatest, ContractProjectInfo } from '@polkadot/types/interfaces';
|
import type { ChainProperties, ContractConstructorSpec, ContractEventSpec, ContractMessageParamSpec, ContractMessageSpec, ContractMetadataLatest, ContractProjectInfo } from '@polkadot/types/interfaces';
|
||||||
import type { AnyJson, Codec, Registry } from '@polkadot/types/types';
|
import type { AnyJson, Codec, Registry } from '@polkadot/types/types';
|
||||||
import type { AbiConstructor, AbiEvent, AbiMessage, AbiParam, DecodedEvent, DecodedMessage } from '../types';
|
import type { AbiConstructor, AbiEvent, AbiMessage, AbiParam, DecodedEvent, DecodedMessage } from '../types';
|
||||||
@@ -45,7 +45,7 @@ function parseJson (json: AnyJson, chainProperties?: ChainProperties): [AnyJson,
|
|||||||
const latest = metadata.isV0
|
const latest = metadata.isV0
|
||||||
? toLatest(registry, metadata.asV0)
|
? toLatest(registry, metadata.asV0)
|
||||||
: metadata.asV1;
|
: metadata.asV1;
|
||||||
const lookup = registry.createType('PortableRegistry', { types: latest.types });
|
const lookup = registry.createType<PortableRegistry>('PortableRegistry', { types: latest.types });
|
||||||
|
|
||||||
// attach the lookup to the registry - now the types are known
|
// attach the lookup to the registry - now the types are known
|
||||||
registry.setLookup(lookup);
|
registry.setLookup(lookup);
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ export abstract class Base<ApiType extends ApiTypes> {
|
|||||||
this.api = api;
|
this.api = api;
|
||||||
this._decorateMethod = decorateMethod;
|
this._decorateMethod = decorateMethod;
|
||||||
|
|
||||||
assert(!!(api && api.isConnected && api.tx && api.tx.contracts && Object.keys(api.tx.contracts).length), 'Your API has not been initialized correctly and it not decorated with the runtime interfaces for contracts as retrieved from the on-chain runtime');
|
assert(!!(api && api.isConnected && api.tx), 'Your API has not been initialized correctly and is not connected to a chain');
|
||||||
|
assert(!!(api.tx.contracts && Object.keys(api.tx.contracts).length), 'You need to connect to a chain with a runtime that supports contracts');
|
||||||
assert(isFunction(api.tx.contracts.instantiateWithCode), 'You need to connect to a chain with a runtime with a V3 contracts module. The runtime does not expose api.tx.contracts.instantiateWithCode');
|
assert(isFunction(api.tx.contracts.instantiateWithCode), 'You need to connect to a chain with a runtime with a V3 contracts module. The runtime does not expose api.tx.contracts.instantiateWithCode');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import type { AnyJson } from '@polkadot/types/types';
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
import { decorateMethodPromise } from '@polkadot/api';
|
import { toPromiseMethod } from '@polkadot/api';
|
||||||
|
|
||||||
import v0contractFlipper from '../../test/contracts/ink/v0/flipper.contract.json';
|
import v0contractFlipper from '../../test/contracts/ink/v0/flipper.contract.json';
|
||||||
import v0abiFlipper from '../../test/contracts/ink/v0/flipper.json';
|
import v0abiFlipper from '../../test/contracts/ink/v0/flipper.json';
|
||||||
@@ -19,19 +19,19 @@ const v0wasmFlipper = fs.readFileSync(path.join(__dirname, '../../test/contracts
|
|||||||
describe('Code', (): void => {
|
describe('Code', (): void => {
|
||||||
it('can construct with an individual ABI/WASM combo', (): void => {
|
it('can construct with an individual ABI/WASM combo', (): void => {
|
||||||
expect(
|
expect(
|
||||||
() => new Code(mockApi, v0abiFlipper as AnyJson, v0wasmFlipper, decorateMethodPromise)
|
() => new Code(mockApi, v0abiFlipper as AnyJson, v0wasmFlipper, toPromiseMethod)
|
||||||
).not.toThrow();
|
).not.toThrow();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can construct with an .contract ABI (v0)', (): void => {
|
it('can construct with an .contract ABI (v0)', (): void => {
|
||||||
expect(
|
expect(
|
||||||
() => new Code(mockApi, v0contractFlipper as AnyJson, null, decorateMethodPromise)
|
() => new Code(mockApi, v0contractFlipper as AnyJson, null, toPromiseMethod)
|
||||||
).not.toThrow();
|
).not.toThrow();
|
||||||
});
|
});
|
||||||
|
|
||||||
it.only('can construct with an .contract ABI (v1)', (): void => {
|
it.only('can construct with an .contract ABI (v1)', (): void => {
|
||||||
expect(
|
expect(
|
||||||
() => new Code(mockApi, v1contractFlipper as AnyJson, null, decorateMethodPromise)
|
() => new Code(mockApi, v1contractFlipper as AnyJson, null, toPromiseMethod)
|
||||||
).not.toThrow();
|
).not.toThrow();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Auto-generated by @polkadot/dev, do not edit
|
// Auto-generated by @polkadot/dev, do not edit
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api-contract', version: '6.6.1' };
|
export const packageInfo = { name: '@polkadot/api-contract', version: '6.8.1' };
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
import type { Hash } from '@polkadot/types/interfaces';
|
import type { Hash } from '@polkadot/types/interfaces';
|
||||||
import type { AnyJson } from '@polkadot/types/types';
|
import type { AnyJson } from '@polkadot/types/types';
|
||||||
|
|
||||||
import { ApiPromise, decorateMethodPromise } from '@polkadot/api';
|
import { ApiPromise, toPromiseMethod } from '@polkadot/api';
|
||||||
|
|
||||||
import { Abi } from '../Abi';
|
import { Abi } from '../Abi';
|
||||||
import { Blueprint as BaseBlueprint } from '../base';
|
import { Blueprint as BaseBlueprint } from '../base';
|
||||||
|
|
||||||
export class Blueprint extends BaseBlueprint<'promise'> {
|
export class Blueprint extends BaseBlueprint<'promise'> {
|
||||||
constructor (api: ApiPromise, abi: AnyJson | Abi, codeHash: string | Hash) {
|
constructor (api: ApiPromise, abi: AnyJson | Abi, codeHash: string | Hash) {
|
||||||
super(api, abi, codeHash, decorateMethodPromise);
|
super(api, abi, codeHash, toPromiseMethod);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
import type { ApiPromise } from '@polkadot/api';
|
import type { ApiPromise } from '@polkadot/api';
|
||||||
import type { AnyJson } from '@polkadot/types/types';
|
import type { AnyJson } from '@polkadot/types/types';
|
||||||
|
|
||||||
import { decorateMethodPromise } from '@polkadot/api';
|
import { toPromiseMethod } from '@polkadot/api';
|
||||||
|
|
||||||
import { Abi } from '../Abi';
|
import { Abi } from '../Abi';
|
||||||
import { Code as BaseCode } from '../base';
|
import { Code as BaseCode } from '../base';
|
||||||
|
|
||||||
export class Code extends BaseCode<'promise'> {
|
export class Code extends BaseCode<'promise'> {
|
||||||
constructor (api: ApiPromise, abi: AnyJson | Abi, wasm: Uint8Array | string | Buffer | null | undefined) {
|
constructor (api: ApiPromise, abi: AnyJson | Abi, wasm: Uint8Array | string | Buffer | null | undefined) {
|
||||||
super(api, abi, wasm, decorateMethodPromise);
|
super(api, abi, wasm, toPromiseMethod);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
import type { AccountId } from '@polkadot/types/interfaces';
|
import type { AccountId } from '@polkadot/types/interfaces';
|
||||||
import type { AnyJson } from '@polkadot/types/types';
|
import type { AnyJson } from '@polkadot/types/types';
|
||||||
|
|
||||||
import { ApiPromise, decorateMethodPromise } from '@polkadot/api';
|
import { ApiPromise, toPromiseMethod } from '@polkadot/api';
|
||||||
|
|
||||||
import { Abi } from '../Abi';
|
import { Abi } from '../Abi';
|
||||||
import { Contract as BaseContract } from '../base';
|
import { Contract as BaseContract } from '../base';
|
||||||
|
|
||||||
export class Contract extends BaseContract<'promise'> {
|
export class Contract extends BaseContract<'promise'> {
|
||||||
constructor (api: ApiPromise, abi: AnyJson | Abi, address: string | AccountId) {
|
constructor (api: ApiPromise, abi: AnyJson | Abi, address: string | AccountId) {
|
||||||
super(api, abi, address, decorateMethodPromise);
|
super(api, abi, address, toPromiseMethod);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
import type { Hash } from '@polkadot/types/interfaces';
|
import type { Hash } from '@polkadot/types/interfaces';
|
||||||
import type { AnyJson } from '@polkadot/types/types';
|
import type { AnyJson } from '@polkadot/types/types';
|
||||||
|
|
||||||
import { ApiRx, decorateMethodRx } from '@polkadot/api';
|
import { ApiRx, toRxMethod } from '@polkadot/api';
|
||||||
|
|
||||||
import { Abi } from '../Abi';
|
import { Abi } from '../Abi';
|
||||||
import { Blueprint as BaseBlueprint } from '../base';
|
import { Blueprint as BaseBlueprint } from '../base';
|
||||||
|
|
||||||
export class Blueprint extends BaseBlueprint<'rxjs'> {
|
export class Blueprint extends BaseBlueprint<'rxjs'> {
|
||||||
constructor (api: ApiRx, abi: AnyJson | Abi, codeHash: string | Hash) {
|
constructor (api: ApiRx, abi: AnyJson | Abi, codeHash: string | Hash) {
|
||||||
super(api, abi, codeHash, decorateMethodRx);
|
super(api, abi, codeHash, toRxMethod);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
import type { ApiRx } from '@polkadot/api';
|
import type { ApiRx } from '@polkadot/api';
|
||||||
import type { AnyJson } from '@polkadot/types/types';
|
import type { AnyJson } from '@polkadot/types/types';
|
||||||
|
|
||||||
import { decorateMethodRx } from '@polkadot/api';
|
import { toRxMethod } from '@polkadot/api';
|
||||||
|
|
||||||
import { Abi } from '../Abi';
|
import { Abi } from '../Abi';
|
||||||
import { Code as BaseCode } from '../base';
|
import { Code as BaseCode } from '../base';
|
||||||
|
|
||||||
export class Code extends BaseCode<'rxjs'> {
|
export class Code extends BaseCode<'rxjs'> {
|
||||||
constructor (api: ApiRx, abi: AnyJson | Abi, wasm: Uint8Array | string | Buffer | null | undefined) {
|
constructor (api: ApiRx, abi: AnyJson | Abi, wasm: Uint8Array | string | Buffer | null | undefined) {
|
||||||
super(api, abi, wasm, decorateMethodRx);
|
super(api, abi, wasm, toRxMethod);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
import type { AccountId } from '@polkadot/types/interfaces';
|
import type { AccountId } from '@polkadot/types/interfaces';
|
||||||
import type { AnyJson } from '@polkadot/types/types';
|
import type { AnyJson } from '@polkadot/types/types';
|
||||||
|
|
||||||
import { ApiRx, decorateMethodRx } from '@polkadot/api';
|
import { ApiRx, toRxMethod } from '@polkadot/api';
|
||||||
|
|
||||||
import { Abi } from '../Abi';
|
import { Abi } from '../Abi';
|
||||||
import { Contract as BaseContract } from '../base';
|
import { Contract as BaseContract } from '../base';
|
||||||
|
|
||||||
export class Contract extends BaseContract<'rxjs'> {
|
export class Contract extends BaseContract<'rxjs'> {
|
||||||
constructor (api: ApiRx, abi: AnyJson | Abi, address: string | AccountId) {
|
constructor (api: ApiRx, abi: AnyJson | Abi, address: string | AccountId) {
|
||||||
super(api, abi, address, decorateMethodRx);
|
super(api, abi, address, toRxMethod);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,19 +20,19 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "6.6.1",
|
"version": "6.8.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.15.4",
|
"@babel/runtime": "^7.16.0",
|
||||||
"@polkadot/api": "6.6.1",
|
"@polkadot/api": "6.8.1",
|
||||||
"@polkadot/rpc-core": "6.6.1",
|
"@polkadot/rpc-core": "6.8.1",
|
||||||
"@polkadot/types": "6.6.1",
|
"@polkadot/types": "6.8.1",
|
||||||
"@polkadot/util": "^7.7.1",
|
"@polkadot/util": "^7.8.2",
|
||||||
"@polkadot/util-crypto": "^7.7.1",
|
"@polkadot/util-crypto": "^7.8.2",
|
||||||
"rxjs": "^7.4.0"
|
"rxjs": "^7.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/keyring": "^7.7.1",
|
"@polkadot/keyring": "^7.8.2",
|
||||||
"@polkadot/rpc-provider": "6.6.1"
|
"@polkadot/rpc-provider": "6.8.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import type { Observable } from 'rxjs';
|
|||||||
import type { ApiInterfaceRx } from '@polkadot/api/types';
|
import type { ApiInterfaceRx } from '@polkadot/api/types';
|
||||||
import type { AnyFunction } from '@polkadot/types/types';
|
import type { AnyFunction } from '@polkadot/types/types';
|
||||||
|
|
||||||
|
import { lazyDeriveSection } from './util/lazy';
|
||||||
import * as accounts from './accounts';
|
import * as accounts from './accounts';
|
||||||
import * as balances from './balances';
|
import * as balances from './balances';
|
||||||
import * as bounties from './bounties';
|
import * as bounties from './bounties';
|
||||||
@@ -32,6 +33,8 @@ interface Avail {
|
|||||||
withDetect?: boolean;
|
withDetect?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export { lazyDeriveSection };
|
||||||
|
|
||||||
export const derive = { accounts, balances, bounties, chain, contracts, council, crowdloan, democracy, elections, imOnline, membership, parachains, session, society, staking, technicalCommittee, treasury, tx };
|
export const derive = { accounts, balances, bounties, chain, contracts, council, crowdloan, democracy, elections, imOnline, membership, parachains, session, society, staking, technicalCommittee, treasury, tx };
|
||||||
|
|
||||||
type DeriveSection<Section> = {
|
type DeriveSection<Section> = {
|
||||||
@@ -66,49 +69,60 @@ const checks: Record<string, Avail> = {
|
|||||||
treasury: { instances: ['treasury'] }
|
treasury: { instances: ['treasury'] }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function getModuleInstances (api: ApiInterfaceRx, specName: string, moduleName: string): string[] {
|
||||||
|
return api.registry.getModuleInstances(specName, moduleName) || [];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an object that will inject `api` into all the functions inside
|
* Returns an object that will inject `api` into all the functions inside
|
||||||
* `allSections`, and keep the object architecture of `allSections`.
|
* `allSections`, and keep the object architecture of `allSections`.
|
||||||
*/
|
*/
|
||||||
/** @internal */
|
/** @internal */
|
||||||
function injectFunctions<AllSections> (instanceId: string, api: ApiInterfaceRx, allSections: AllSections): DeriveAllSections<AllSections> {
|
function injectFunctions (instanceId: string, api: ApiInterfaceRx, derives: DeriveCustom): ExactDerive {
|
||||||
const queryKeys = Object.keys(api.query);
|
const queryKeys = Object.keys(api.query);
|
||||||
const specName = api.runtimeVersion.specName.toString();
|
const specName = api.runtimeVersion.specName.toString();
|
||||||
|
|
||||||
return Object
|
const filterQueryKeys = (q: string) =>
|
||||||
.keys(allSections)
|
queryKeys.includes(q);
|
||||||
.filter((sectionName) =>
|
|
||||||
!checks[sectionName] ||
|
const filterInstances = (q: string) =>
|
||||||
checks[sectionName].instances.some((q) => queryKeys.includes(q)) ||
|
getModuleInstances(api, specName, q).some(filterQueryKeys);
|
||||||
(
|
|
||||||
checks[sectionName].withDetect &&
|
const isIncluded = (s: string) => (
|
||||||
checks[sectionName].instances.some((q) =>
|
!checks[s] ||
|
||||||
(api.registry.getModuleInstances(specName, q) || []).some((q) => queryKeys.includes(q))
|
checks[s].instances.some(filterQueryKeys) ||
|
||||||
)
|
(
|
||||||
)
|
checks[s].withDetect &&
|
||||||
|
checks[s].instances.some(filterInstances)
|
||||||
)
|
)
|
||||||
.reduce((derives, sectionName): DeriveAllSections<AllSections> => {
|
);
|
||||||
const section = allSections[sectionName as keyof AllSections];
|
|
||||||
|
|
||||||
derives[sectionName as keyof AllSections] = Object
|
const getKeys = (section: string) =>
|
||||||
.entries(section)
|
Object.keys(derives[section]);
|
||||||
.reduce((methods, [methodName, creator]): DeriveSection<typeof section> => {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call
|
|
||||||
methods[methodName as keyof typeof section] = creator(instanceId, api);
|
|
||||||
|
|
||||||
return methods;
|
const creator = (section: string, method: string) =>
|
||||||
}, {} as DeriveSection<typeof section>);
|
derives[section][method](instanceId, api);
|
||||||
|
|
||||||
return derives;
|
const result: Record<string, Record<string, AnyFunction>> = {};
|
||||||
}, {} as DeriveAllSections<AllSections>);
|
const names = Object.keys(derives);
|
||||||
|
|
||||||
|
for (let i = 0; i < names.length; i++) {
|
||||||
|
const name = names[i];
|
||||||
|
|
||||||
|
if (isIncluded(name)) {
|
||||||
|
lazyDeriveSection(result, name, getKeys, creator);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result as ExactDerive;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME The return type of this function should be {...ExactDerive, ...DeriveCustom}
|
// FIXME The return type of this function should be {...ExactDerive, ...DeriveCustom}
|
||||||
// For now we just drop the custom derive typings
|
// For now we just drop the custom derive typings
|
||||||
/** @internal */
|
/** @internal */
|
||||||
export function decorateDerive (instanceId: string, api: ApiInterfaceRx, custom: DeriveCustom = {}): ExactDerive {
|
export function getAvailableDerives (instanceId: string, api: ApiInterfaceRx, custom: DeriveCustom = {}): ExactDerive {
|
||||||
return {
|
return {
|
||||||
...injectFunctions(instanceId, api, derive),
|
...injectFunctions(instanceId, api, derive as DeriveCustom),
|
||||||
...injectFunctions(instanceId, api, custom)
|
...injectFunctions(instanceId, api, custom)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,17 +25,20 @@ import { memo } from '../util';
|
|||||||
*/
|
*/
|
||||||
export function getBlock (instanceId: string, api: ApiInterfaceRx): (hash: Uint8Array | string) => Observable<SignedBlockExtended | undefined> {
|
export function getBlock (instanceId: string, api: ApiInterfaceRx): (hash: Uint8Array | string) => Observable<SignedBlockExtended | undefined> {
|
||||||
return memo(instanceId, (blockHash: Uint8Array | string): Observable<SignedBlockExtended | undefined> =>
|
return memo(instanceId, (blockHash: Uint8Array | string): Observable<SignedBlockExtended | undefined> =>
|
||||||
api.queryAt(blockHash).pipe(
|
combineLatest([
|
||||||
switchMap((queryAt) =>
|
api.rpc.chain.getBlock(blockHash),
|
||||||
combineLatest([
|
api.queryAt(blockHash).pipe(
|
||||||
api.rpc.chain.getBlock(blockHash),
|
switchMap((queryAt) =>
|
||||||
queryAt.system.events(),
|
combineLatest([
|
||||||
queryAt.session
|
queryAt.system.events(),
|
||||||
? queryAt.session.validators()
|
queryAt.session
|
||||||
: of([])
|
? queryAt.session.validators()
|
||||||
])
|
: of([])
|
||||||
),
|
])
|
||||||
map(([signedBlock, events, validators]) =>
|
)
|
||||||
|
)
|
||||||
|
]).pipe(
|
||||||
|
map(([signedBlock, [events, validators]]) =>
|
||||||
createSignedBlockExtended(api.registry, signedBlock, events, validators)
|
createSignedBlockExtended(api.registry, signedBlock, events, validators)
|
||||||
),
|
),
|
||||||
catchError((): Observable<undefined> =>
|
catchError((): Observable<undefined> =>
|
||||||
|
|||||||
@@ -25,17 +25,18 @@ import { memo } from '../util';
|
|||||||
* console.log(`block #${number} was authored by ${author}`);
|
* console.log(`block #${number} was authored by ${author}`);
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
export function getHeader (instanceId: string, api: ApiInterfaceRx): (hash: Uint8Array | string) => Observable<HeaderExtended | undefined> {
|
export function getHeader (instanceId: string, api: ApiInterfaceRx): (blockHash: Uint8Array | string) => Observable<HeaderExtended | undefined> {
|
||||||
return memo(instanceId, (hash: Uint8Array | string): Observable<HeaderExtended | undefined> =>
|
return memo(instanceId, (blockHash: Uint8Array | string): Observable<HeaderExtended | undefined> =>
|
||||||
api.queryAt(hash).pipe(
|
combineLatest([
|
||||||
switchMap((queryAt) =>
|
api.rpc.chain.getHeader(blockHash),
|
||||||
combineLatest([
|
api.queryAt(blockHash).pipe(
|
||||||
api.rpc.chain.getHeader(hash),
|
switchMap((queryAt) =>
|
||||||
queryAt.session
|
queryAt.session
|
||||||
? queryAt.session.validators()
|
? queryAt.session.validators()
|
||||||
: of([] as AccountId[])
|
: of([] as AccountId[])
|
||||||
])
|
)
|
||||||
),
|
)
|
||||||
|
]).pipe(
|
||||||
map(([header, validators]) =>
|
map(([header, validators]) =>
|
||||||
createHeaderExtended(header.registry, header, validators)
|
createHeaderExtended(header.registry, header, validators)
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -21,15 +21,15 @@ export function subscribeNewBlocks (instanceId: string, api: ApiInterfaceRx): ()
|
|||||||
const blockHash = header.createdAtHash || header.hash;
|
const blockHash = header.createdAtHash || header.hash;
|
||||||
|
|
||||||
// we get the block first, setting up the registry
|
// we get the block first, setting up the registry
|
||||||
return api.queryAt(blockHash).pipe(
|
return combineLatest([
|
||||||
switchMap((queryAt) =>
|
of(header),
|
||||||
combineLatest([
|
api.rpc.chain.getBlock(blockHash),
|
||||||
of(header),
|
api.queryAt(blockHash).pipe(
|
||||||
api.rpc.chain.getBlock(blockHash),
|
switchMap((queryAt) =>
|
||||||
queryAt.system.events()
|
queryAt.system.events()
|
||||||
])
|
)
|
||||||
)
|
)
|
||||||
);
|
]);
|
||||||
}),
|
}),
|
||||||
map(([header, block, events]) =>
|
map(([header, block, events]) =>
|
||||||
createSignedBlockExtended(block.registry, block, events, header.validators)
|
createSignedBlockExtended(block.registry, block, events, header.validators)
|
||||||
|
|||||||
@@ -25,7 +25,11 @@ function parseEnd (api: ApiInterfaceRx, vote: Vote, { approved, end }: Referendu
|
|||||||
return [
|
return [
|
||||||
end,
|
end,
|
||||||
(approved.isTrue && vote.isAye) || (approved.isFalse && vote.isNay)
|
(approved.isTrue && vote.isAye) || (approved.isFalse && vote.isNay)
|
||||||
? end.add(api.consts.democracy.enactmentPeriod.muln(LOCKUPS[vote.conviction.index]))
|
? end.add(
|
||||||
|
(
|
||||||
|
api.consts.democracy.voteLockingPeriod ||
|
||||||
|
api.consts.democracy.enactmentPeriod
|
||||||
|
).muln(LOCKUPS[vote.conviction.index]))
|
||||||
: BN_ZERO
|
: BN_ZERO
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -50,7 +54,11 @@ function delegateLocks (api: ApiInterfaceRx, { balance, conviction, target }: Vo
|
|||||||
referendumId,
|
referendumId,
|
||||||
unlockAt: unlockAt.isZero()
|
unlockAt: unlockAt.isZero()
|
||||||
? unlockAt
|
? unlockAt
|
||||||
: referendumEnd.add(api.consts.democracy.enactmentPeriod.muln(LOCKUPS[conviction.index])),
|
: referendumEnd.add(
|
||||||
|
(
|
||||||
|
api.consts.democracy.voteLockingPeriod ||
|
||||||
|
api.consts.democracy.enactmentPeriod
|
||||||
|
).muln(LOCKUPS[conviction.index])),
|
||||||
vote: api.registry.createType('Vote', { aye: vote.isAye, conviction })
|
vote: api.registry.createType('Vote', { aye: vote.isAye, conviction })
|
||||||
}))
|
}))
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Auto-generated by @polkadot/dev, do not edit
|
// Auto-generated by @polkadot/dev, do not edit
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api-derive', version: '6.6.1' };
|
export const packageInfo = { name: '@polkadot/api-derive', version: '6.8.1' };
|
||||||
|
|||||||
@@ -16,13 +16,14 @@ interface Result {
|
|||||||
|
|
||||||
export function events (instanceId: string, api: ApiInterfaceRx): (at: Hash) => Observable<Result> {
|
export function events (instanceId: string, api: ApiInterfaceRx): (at: Hash) => Observable<Result> {
|
||||||
return memo(instanceId, (blockHash: Hash) =>
|
return memo(instanceId, (blockHash: Hash) =>
|
||||||
api.queryAt(blockHash).pipe(
|
combineLatest([
|
||||||
switchMap((queryAt) =>
|
api.rpc.chain.getBlock(blockHash),
|
||||||
combineLatest([
|
api.queryAt(blockHash).pipe(
|
||||||
api.rpc.chain.getBlock(blockHash),
|
switchMap((queryAt) =>
|
||||||
queryAt.system.events()
|
queryAt.system.events()
|
||||||
])
|
)
|
||||||
),
|
)
|
||||||
|
]).pipe(
|
||||||
map(([block, events]): Result => ({ block, events }))
|
map(([block, events]): Result => ({ block, events }))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -32,20 +32,23 @@ function nextNonce (api: ApiInterfaceRx, address: string): Observable<Index> {
|
|||||||
|
|
||||||
function signingHeader (api: ApiInterfaceRx): Observable<Header> {
|
function signingHeader (api: ApiInterfaceRx): Observable<Header> {
|
||||||
return combineLatest([
|
return combineLatest([
|
||||||
api.rpc.chain.getHeader(),
|
api.rpc.chain.getHeader().pipe(
|
||||||
api.rpc.chain.getFinalizedHead()
|
switchMap((header) =>
|
||||||
]).pipe(
|
// check for chains at genesis (until block 1 is produced, e.g. 6s), since
|
||||||
switchMap(([bestHeader, finHash]) =>
|
// we do need to allow transactions at chain start (also dev/seal chains)
|
||||||
// retrieve the headers - in the case of the current block, we use the parent
|
header.parentHash.isEmpty
|
||||||
// to minimize (not completely remove) the impact that forks do have on the system
|
? of(header)
|
||||||
// (when at genesis, just return the current header as the last known)
|
// in the case of the current block, we use the parent to minimize the
|
||||||
bestHeader.parentHash.isEmpty
|
// impact of forks on the system, but not completely remove it
|
||||||
? of([bestHeader, bestHeader])
|
: api.rpc.chain.getHeader(header.parentHash)
|
||||||
: combineLatest([
|
)
|
||||||
api.rpc.chain.getHeader(bestHeader.parentHash),
|
|
||||||
api.rpc.chain.getHeader(finHash)
|
|
||||||
])
|
|
||||||
),
|
),
|
||||||
|
api.rpc.chain.getFinalizedHead().pipe(
|
||||||
|
switchMap((hash) =>
|
||||||
|
api.rpc.chain.getHeader(hash)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
]).pipe(
|
||||||
map(([current, finalized]) =>
|
map(([current, finalized]) =>
|
||||||
// determine the hash to use, current when lag > max, else finalized
|
// determine the hash to use, current when lag > max, else finalized
|
||||||
current.number.unwrap().sub(finalized.number.unwrap()).gt(MAX_FINALITY_LAG)
|
current.number.unwrap().sub(finalized.number.unwrap()).gt(MAX_FINALITY_LAG)
|
||||||
|
|||||||
@@ -8,14 +8,14 @@ import type { ApprovalFlag } from '@polkadot/types/interfaces/elections';
|
|||||||
export function approvalFlagsToBools (flags: Vec<ApprovalFlag> | ApprovalFlag[]): boolean[] {
|
export function approvalFlagsToBools (flags: Vec<ApprovalFlag> | ApprovalFlag[]): boolean[] {
|
||||||
const bools: boolean[] = [];
|
const bools: boolean[] = [];
|
||||||
|
|
||||||
flags.forEach((flag: ApprovalFlag): void => {
|
for (let i = 0; i < flags.length; i++) {
|
||||||
const str = flag.toString(2);
|
const str = flags[i].toString(2);
|
||||||
|
|
||||||
// read from lowest bit to highest
|
// read from lowest bit to highest
|
||||||
for (const bit of str.split('').reverse()) {
|
for (const bit of str.split('').reverse()) {
|
||||||
bools.push(!!parseInt(bit, 10));
|
bools.push(!!parseInt(bit, 10));
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
// slice off trailing "false" values, as in substrate
|
// slice off trailing "false" values, as in substrate
|
||||||
const lastApproval = bools.lastIndexOf(true);
|
const lastApproval = bools.lastIndexOf(true);
|
||||||
|
|||||||
@@ -10,10 +10,8 @@ export const deriveMapCache: DeriveCache = {
|
|||||||
mapCache.delete(key);
|
mapCache.delete(key);
|
||||||
},
|
},
|
||||||
forEach: (cb: (key: string, value: any) => void): void => {
|
forEach: (cb: (key: string, value: any) => void): void => {
|
||||||
const entries = mapCache.entries();
|
for (const [k, v] of mapCache.entries()) {
|
||||||
|
cb(k, v);
|
||||||
for (const entry in entries) {
|
|
||||||
cb(entry[0], entry[1]);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
get: <T = any> (key: string): T | undefined => {
|
get: <T = any> (key: string): T | undefined => {
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// Copyright 2017-2021 @polkadot/api-derive authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import { lazyMethod, lazyMethods } from '@polkadot/util';
|
||||||
|
|
||||||
|
type LazySection <T> = Record<string, T>;
|
||||||
|
|
||||||
|
type LazyRecord <T> = Record<string, LazySection<T>>;
|
||||||
|
|
||||||
|
export function lazyDeriveSection <T> (result: LazyRecord<T>, section: string, getKeys: (s: string) => string[], creator: (s: string, m: string) => T): void {
|
||||||
|
lazyMethod(result, section, () =>
|
||||||
|
lazyMethods({}, getKeys(section), (method: string) =>
|
||||||
|
creator(section, method)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
+10
-10
@@ -20,18 +20,18 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "6.6.1",
|
"version": "6.8.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.15.4",
|
"@babel/runtime": "^7.16.0",
|
||||||
"@polkadot/api-derive": "6.6.1",
|
"@polkadot/api-derive": "6.8.1",
|
||||||
"@polkadot/keyring": "^7.7.1",
|
"@polkadot/keyring": "^7.8.2",
|
||||||
"@polkadot/rpc-core": "6.6.1",
|
"@polkadot/rpc-core": "6.8.1",
|
||||||
"@polkadot/rpc-provider": "6.6.1",
|
"@polkadot/rpc-provider": "6.8.1",
|
||||||
"@polkadot/types": "6.6.1",
|
"@polkadot/types": "6.8.1",
|
||||||
"@polkadot/types-known": "6.6.1",
|
"@polkadot/types-known": "6.8.1",
|
||||||
"@polkadot/util": "^7.7.1",
|
"@polkadot/util": "^7.8.2",
|
||||||
"@polkadot/util-crypto": "^7.7.1",
|
"@polkadot/util-crypto": "^7.8.2",
|
||||||
"eventemitter3": "^4.0.7",
|
"eventemitter3": "^4.0.7",
|
||||||
"rxjs": "^7.4.0"
|
"rxjs": "^7.4.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1237,6 +1237,10 @@ declare module '@polkadot/api/types/errors' {
|
|||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
system: {
|
system: {
|
||||||
|
/**
|
||||||
|
* The origin filter prevent the call to be dispatched.
|
||||||
|
**/
|
||||||
|
CallFiltered: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Failed to extract the runtime version from the new runtime.
|
* Failed to extract the runtime version from the new runtime.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -582,7 +582,7 @@ declare module '@polkadot/api/types/events' {
|
|||||||
**/
|
**/
|
||||||
MultisigApproval: AugmentedEvent<ApiType, [AccountId32, PalletMultisigTimepoint, AccountId32, U8aFixed]>;
|
MultisigApproval: AugmentedEvent<ApiType, [AccountId32, PalletMultisigTimepoint, AccountId32, U8aFixed]>;
|
||||||
/**
|
/**
|
||||||
* A multisig operation has been cancelled. \[cancelling, timepoint, multisig, call_hash\]
|
* A multisig operation has been cancelled. \[canceling, timepoint, multisig, call_hash\]
|
||||||
**/
|
**/
|
||||||
MultisigCancelled: AugmentedEvent<ApiType, [AccountId32, PalletMultisigTimepoint, AccountId32, U8aFixed]>;
|
MultisigCancelled: AugmentedEvent<ApiType, [AccountId32, PalletMultisigTimepoint, AccountId32, U8aFixed]>;
|
||||||
/**
|
/**
|
||||||
@@ -1146,6 +1146,10 @@ declare module '@polkadot/api/types/events' {
|
|||||||
* well as the error. \[index, error\]
|
* well as the error. \[index, error\]
|
||||||
**/
|
**/
|
||||||
BatchInterrupted: AugmentedEvent<ApiType, [u32, SpRuntimeDispatchError]>;
|
BatchInterrupted: AugmentedEvent<ApiType, [u32, SpRuntimeDispatchError]>;
|
||||||
|
/**
|
||||||
|
* A call was dispatched. \[result\]
|
||||||
|
**/
|
||||||
|
DispatchedAs: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;
|
||||||
/**
|
/**
|
||||||
* A single item within a Batch of dispatches has completed with no error.
|
* A single item within a Batch of dispatches has completed with no error.
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import type { ApiTypes } from '@polkadot/api/types';
|
import type { ApiTypes } from '@polkadot/api/types';
|
||||||
import type { BTreeMap, Bytes, Data, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u32, u64, u8 } from '@polkadot/types';
|
import type { BTreeMap, Bytes, Data, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u32, u64, u8 } from '@polkadot/types';
|
||||||
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, NodeRuntimeSessionKeys, PalletAssetsApproval, PalletAssetsAssetBalance, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletCollectiveVotes, PalletContractsStorageDeletedContract, PalletContractsStorageRawContractInfo, PalletContractsWasmPrefabWasmModule, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerReleases, PalletSchedulerScheduledV2, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesClassDetails, PalletUniquesClassMetadata, PalletUniquesInstanceDetails, PalletUniquesInstanceMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeGenericDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
|
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, NodeRuntimeSessionKeys, PalletAssetsApproval, PalletAssetsAssetBalance, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletCollectiveVotes, PalletContractsStorageDeletedContract, PalletContractsStorageRawContractInfo, PalletContractsWasmPrefabWasmModule, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerReleases, PalletSchedulerScheduledV2, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesClassDetails, PalletUniquesClassMetadata, PalletUniquesInstanceDetails, PalletUniquesInstanceMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
|
||||||
import type { AnyNumber, ITuple, Observable } from '@polkadot/types/types';
|
import type { AnyNumber, ITuple, Observable } from '@polkadot/types/types';
|
||||||
|
|
||||||
declare module '@polkadot/api/types/storage' {
|
declare module '@polkadot/api/types/storage' {
|
||||||
@@ -33,6 +33,20 @@ declare module '@polkadot/api/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
|
authorityDiscovery: {
|
||||||
|
/**
|
||||||
|
* Keys of the current authority set.
|
||||||
|
**/
|
||||||
|
keys: AugmentedQuery<ApiType, () => Observable<Vec<SpAuthorityDiscoveryAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Keys of the next authority set.
|
||||||
|
**/
|
||||||
|
nextKeys: AugmentedQuery<ApiType, () => Observable<Vec<SpAuthorityDiscoveryAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Generic query
|
||||||
|
**/
|
||||||
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
|
};
|
||||||
authorship: {
|
authorship: {
|
||||||
/**
|
/**
|
||||||
* Author of current block.
|
* Author of current block.
|
||||||
@@ -135,7 +149,7 @@ declare module '@polkadot/api/types/storage' {
|
|||||||
/**
|
/**
|
||||||
* Randomness under construction.
|
* Randomness under construction.
|
||||||
*
|
*
|
||||||
* We make a tradeoff between storage accesses and list length.
|
* We make a trade-off between storage accesses and list length.
|
||||||
* We store the under-construction randomness in segments of up to
|
* We store the under-construction randomness in segments of up to
|
||||||
* `UNDER_CONSTRUCTION_SEGMENT_LENGTH`.
|
* `UNDER_CONSTRUCTION_SEGMENT_LENGTH`.
|
||||||
*
|
*
|
||||||
@@ -1149,7 +1163,7 @@ declare module '@polkadot/api/types/storage' {
|
|||||||
/**
|
/**
|
||||||
* Digest of the current block, also part of the block header.
|
* Digest of the current block, also part of the block header.
|
||||||
**/
|
**/
|
||||||
digest: AugmentedQuery<ApiType, () => Observable<SpRuntimeGenericDigest>, []> & QueryableStorageEntry<ApiType, []>;
|
digest: AugmentedQuery<ApiType, () => Observable<SpRuntimeDigest>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* The number of events in the `Events<T>` list.
|
* The number of events in the `Events<T>` list.
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import type { ApiTypes, SubmittableExtrinsic } from '@polkadot/api/types';
|
|||||||
import type { Bytes, Compact, Data, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types';
|
import type { Bytes, Compact, Data, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types';
|
||||||
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
||||||
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { NodeRuntimeProxyType, NodeRuntimeSessionKeys, PalletAssetsDestroyWitness, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletSocietyJudgement, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpCoreChangesTrieChangesTrieConfiguration, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeGenericHeader, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof } from '@polkadot/types/lookup';
|
import type { NodeRuntimeOriginCaller, NodeRuntimeProxyType, NodeRuntimeSessionKeys, PalletAssetsDestroyWitness, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletSocietyJudgement, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpCoreChangesTrieChangesTrieConfiguration, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeHeader, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof } from '@polkadot/types/lookup';
|
||||||
import type { AnyNumber, ITuple } from '@polkadot/types/types';
|
import type { AnyNumber, ITuple } from '@polkadot/types/types';
|
||||||
|
|
||||||
declare module '@polkadot/api/types/submittable' {
|
declare module '@polkadot/api/types/submittable' {
|
||||||
@@ -425,7 +425,7 @@ declare module '@polkadot/api/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* Provide a set of uncles.
|
* Provide a set of uncles.
|
||||||
**/
|
**/
|
||||||
setUncles: AugmentedSubmittable<(newUncles: Vec<SpRuntimeGenericHeader> | (SpRuntimeGenericHeader | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<SpRuntimeGenericHeader>]>;
|
setUncles: AugmentedSubmittable<(newUncles: Vec<SpRuntimeHeader> | (SpRuntimeHeader | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<SpRuntimeHeader>]>;
|
||||||
/**
|
/**
|
||||||
* Generic tx
|
* Generic tx
|
||||||
**/
|
**/
|
||||||
@@ -4392,6 +4392,19 @@ declare module '@polkadot/api/types/submittable' {
|
|||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
batchAll: AugmentedSubmittable<(calls: Vec<Call> | (Call | { callIndex?: any; args?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>;
|
batchAll: AugmentedSubmittable<(calls: Vec<Call> | (Call | { callIndex?: any; args?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>;
|
||||||
|
/**
|
||||||
|
* Dispatches a function call with a provided origin.
|
||||||
|
*
|
||||||
|
* The dispatch origin for this call must be _Root_.
|
||||||
|
*
|
||||||
|
* # <weight>
|
||||||
|
* - O(1).
|
||||||
|
* - Limited storage reads.
|
||||||
|
* - One DB write (event).
|
||||||
|
* - Weight of derivative `call` execution + T::WeightInfo::dispatch_as().
|
||||||
|
* # </weight>
|
||||||
|
**/
|
||||||
|
dispatchAs: AugmentedSubmittable<(asOrigin: NodeRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [NodeRuntimeOriginCaller, Call]>;
|
||||||
/**
|
/**
|
||||||
* Generic tx
|
* Generic tx
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { Observable } from 'rxjs';
|
import type { Observable } from 'rxjs';
|
||||||
|
import type { DeriveCustom } from '@polkadot/api-derive';
|
||||||
import type { RpcInterface } from '@polkadot/rpc-core/types';
|
import type { RpcInterface } from '@polkadot/rpc-core/types';
|
||||||
import type { Option, Raw, StorageKey, Text, u64 } from '@polkadot/types';
|
import type { Option, Raw, StorageKey, Text, u64 } from '@polkadot/types';
|
||||||
import type { Call, Hash, RuntimeVersion } from '@polkadot/types/interfaces';
|
import type { Call, Hash, RuntimeVersion } from '@polkadot/types/interfaces';
|
||||||
@@ -9,20 +10,20 @@ import type { DecoratedMeta } from '@polkadot/types/metadata/decorate/types';
|
|||||||
import type { StorageEntry } from '@polkadot/types/primitive/types';
|
import type { StorageEntry } from '@polkadot/types/primitive/types';
|
||||||
import type { AnyFunction, AnyTuple, CallFunction, Codec, DefinitionRpc, DefinitionRpcSub, DetectCodec, IMethod, IStorageKey, Registry, RegistryError, RegistryTypes } from '@polkadot/types/types';
|
import type { AnyFunction, AnyTuple, CallFunction, Codec, DefinitionRpc, DefinitionRpcSub, DetectCodec, IMethod, IStorageKey, Registry, RegistryError, RegistryTypes } from '@polkadot/types/types';
|
||||||
import type { SubmittableExtrinsic } from '../submittable/types';
|
import type { SubmittableExtrinsic } from '../submittable/types';
|
||||||
import type { ApiDecoration, ApiInterfaceRx, ApiOptions, ApiTypes, AugmentedQuery, DecoratedErrors, DecoratedEvents, DecoratedRpc, DecoratedRpcSection, DecorateMethod, GenericStorageEntryFunction, PaginationOptions, QueryableConsts, QueryableModuleStorage, QueryableModuleStorageAt, QueryableStorage, QueryableStorageAt, QueryableStorageEntry, QueryableStorageEntryAt, QueryableStorageMulti, QueryableStorageMultiArg, SubmittableExtrinsicFunction, SubmittableExtrinsics, SubmittableModuleExtrinsics } from '../types';
|
import type { ApiDecoration, ApiInterfaceRx, ApiOptions, ApiTypes, AugmentedQuery, DecoratedErrors, DecoratedEvents, DecoratedRpc, DecorateMethod, GenericStorageEntryFunction, PaginationOptions, QueryableConsts, QueryableStorage, QueryableStorageEntry, QueryableStorageEntryAt, QueryableStorageMulti, QueryableStorageMultiArg, SubmittableExtrinsicFunction, SubmittableExtrinsics } from '../types';
|
||||||
import type { VersionedRegistry } from './types';
|
import type { VersionedRegistry } from './types';
|
||||||
|
|
||||||
import { BehaviorSubject, combineLatest, from, map, of, switchMap, tap, toArray } from 'rxjs';
|
import { BehaviorSubject, combineLatest, from, map, of, switchMap, tap, toArray } from 'rxjs';
|
||||||
|
|
||||||
import { decorateDerive, ExactDerive } from '@polkadot/api-derive';
|
import { ExactDerive, getAvailableDerives } from '@polkadot/api-derive';
|
||||||
import { memo, RpcCore } from '@polkadot/rpc-core';
|
import { memo, RpcCore } from '@polkadot/rpc-core';
|
||||||
import { WsProvider } from '@polkadot/rpc-provider';
|
import { WsProvider } from '@polkadot/rpc-provider';
|
||||||
import { expandMetadata, Metadata, TypeRegistry, unwrapStorageType } from '@polkadot/types';
|
import { expandMetadata, Metadata, TypeRegistry, unwrapStorageType } from '@polkadot/types';
|
||||||
import { arrayChunk, arrayFlatten, assert, BN, BN_ZERO, compactStripLength, logger, u8aToHex } from '@polkadot/util';
|
import { arrayChunk, arrayFlatten, assert, BN, BN_ZERO, compactStripLength, lazyMethod, lazyMethods, logger, objectSpread, u8aToHex } from '@polkadot/util';
|
||||||
|
|
||||||
import { createSubmittable } from '../submittable';
|
import { createSubmittable } from '../submittable';
|
||||||
import { augmentObject } from '../util/augmentObject';
|
import { augmentObject } from '../util/augmentObject';
|
||||||
import { decorateSections, DeriveAllSections } from '../util/decorate';
|
import { decorateDeriveSections, DeriveAllSections } from '../util/decorate';
|
||||||
import { extractStorageArgs } from '../util/validate';
|
import { extractStorageArgs } from '../util/validate';
|
||||||
import { Events } from './Events';
|
import { Events } from './Events';
|
||||||
import { findCall, findError } from './find';
|
import { findCall, findError } from './find';
|
||||||
@@ -145,8 +146,8 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
|
|
||||||
this.#instanceId = `${++instanceCounter}`;
|
this.#instanceId = `${++instanceCounter}`;
|
||||||
this.#registry = options.source?.registry || options.registry || new TypeRegistry();
|
this.#registry = options.source?.registry || options.registry || new TypeRegistry();
|
||||||
this._rx.queryAt = (blockHash: Uint8Array | string) =>
|
this._rx.queryAt = (blockHash: Uint8Array | string, knownVersion?: RuntimeVersion) =>
|
||||||
from(this.at(blockHash)).pipe(map((a) => a.rx.query));
|
from(this.at(blockHash, knownVersion)).pipe(map((a) => a.rx.query));
|
||||||
this._rx.registry = this.#registry;
|
this._rx.registry = this.#registry;
|
||||||
|
|
||||||
const thisProvider = options.source
|
const thisProvider = options.source
|
||||||
@@ -200,7 +201,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
return this._rpcCore.provider.hasSubscriptions || !!this._rpcCore.state.queryStorageAt;
|
return this._rpcCore.provider.hasSubscriptions || !!this._rpcCore.state.queryStorageAt;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected _createDecorated (registry: VersionedRegistry<ApiType>, fromEmpty?: boolean, blockHash?: Uint8Array | null, decoratedApi?: ApiDecoration<ApiType>): FullDecoration<ApiType> {
|
protected _createDecorated (registry: VersionedRegistry<ApiType>, fromEmpty: boolean, decoratedApi: ApiDecoration<ApiType> | null, blockHash?: Uint8Array): FullDecoration<ApiType> {
|
||||||
if (!decoratedApi) {
|
if (!decoratedApi) {
|
||||||
decoratedApi = {
|
decoratedApi = {
|
||||||
consts: {},
|
consts: {},
|
||||||
@@ -218,18 +219,12 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
registry.decoratedMeta = expandMetadata(registry.registry, registry.metadata);
|
registry.decoratedMeta = expandMetadata(registry.registry, registry.metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
// adjust the versioned registry
|
const storage = this._decorateStorage(registry.decoratedMeta, this._decorateMethod, blockHash);
|
||||||
|
const storageRx = this._decorateStorage(registry.decoratedMeta, this._rxDecorateMethod, blockHash);
|
||||||
|
|
||||||
augmentObject('consts', registry.decoratedMeta.consts, decoratedApi.consts, fromEmpty);
|
augmentObject('consts', registry.decoratedMeta.consts, decoratedApi.consts, fromEmpty);
|
||||||
augmentObject('errors', registry.decoratedMeta.errors, decoratedApi.errors, fromEmpty);
|
augmentObject('errors', registry.decoratedMeta.errors, decoratedApi.errors, fromEmpty);
|
||||||
augmentObject('events', registry.decoratedMeta.events, decoratedApi.events, fromEmpty);
|
augmentObject('events', registry.decoratedMeta.events, decoratedApi.events, fromEmpty);
|
||||||
|
|
||||||
const storage = blockHash
|
|
||||||
? this._decorateStorageAt(registry.decoratedMeta, this._decorateMethod, blockHash)
|
|
||||||
: this._decorateStorage(registry.decoratedMeta, this._decorateMethod);
|
|
||||||
const storageRx = blockHash
|
|
||||||
? this._decorateStorageAt(registry.decoratedMeta, this._rxDecorateMethod, blockHash)
|
|
||||||
: this._decorateStorage(registry.decoratedMeta, this._rxDecorateMethod);
|
|
||||||
|
|
||||||
augmentObject('query', storage, decoratedApi.query, fromEmpty);
|
augmentObject('query', storage, decoratedApi.query, fromEmpty);
|
||||||
augmentObject('query', storageRx, decoratedApi.rx.query, fromEmpty);
|
augmentObject('query', storageRx, decoratedApi.rx.query, fromEmpty);
|
||||||
|
|
||||||
@@ -247,7 +242,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected _injectMetadata (registry: VersionedRegistry<ApiType>, fromEmpty?: boolean): void {
|
protected _injectMetadata (registry: VersionedRegistry<ApiType>, fromEmpty = false): void {
|
||||||
// clear the decoration, we are redoing it here
|
// clear the decoration, we are redoing it here
|
||||||
if (fromEmpty || !registry.decoratedApi) {
|
if (fromEmpty || !registry.decoratedApi) {
|
||||||
registry.decoratedApi = {
|
registry.decoratedApi = {
|
||||||
@@ -262,7 +257,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
} as ApiDecoration<ApiType>;
|
} as ApiDecoration<ApiType>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { decoratedApi, decoratedMeta } = this._createDecorated(registry, fromEmpty, null, registry.decoratedApi);
|
const { decoratedApi, decoratedMeta } = this._createDecorated(registry, fromEmpty, registry.decoratedApi);
|
||||||
|
|
||||||
this._consts = decoratedApi.consts;
|
this._consts = decoratedApi.consts;
|
||||||
this._errors = decoratedApi.errors;
|
this._errors = decoratedApi.errors;
|
||||||
@@ -270,12 +265,15 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
this._query = decoratedApi.query;
|
this._query = decoratedApi.query;
|
||||||
this._rx.query = decoratedApi.rx.query;
|
this._rx.query = decoratedApi.rx.query;
|
||||||
|
|
||||||
|
const tx = this._decorateExtrinsics(decoratedMeta, this._decorateMethod);
|
||||||
|
const rxtx = this._decorateExtrinsics(decoratedMeta, this._rxDecorateMethod);
|
||||||
|
|
||||||
if (fromEmpty || !this._extrinsics) {
|
if (fromEmpty || !this._extrinsics) {
|
||||||
this._extrinsics = this._decorateExtrinsics(decoratedMeta, this._decorateMethod);
|
this._extrinsics = tx;
|
||||||
this._rx.tx = this._decorateExtrinsics(decoratedMeta, this._rxDecorateMethod);
|
this._rx.tx = rxtx;
|
||||||
} else {
|
} else {
|
||||||
augmentObject('tx', this._decorateExtrinsics(decoratedMeta, this._decorateMethod), this._extrinsics, false);
|
augmentObject('tx', tx, this._extrinsics, false);
|
||||||
augmentObject(null, this._decorateExtrinsics(decoratedMeta, this._rxDecorateMethod), this._rx.tx, false);
|
augmentObject(null, rxtx, this._rx.tx, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
augmentObject(null, decoratedMeta.consts, this._rx.consts, fromEmpty);
|
augmentObject(null, decoratedMeta.consts, this._rx.consts, fromEmpty);
|
||||||
@@ -363,30 +361,43 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected _decorateRpc<ApiType extends ApiTypes> (rpc: RpcCore & RpcInterface, decorateMethod: DecorateMethod<ApiType>, input: Partial<DecoratedRpc<ApiType, RpcInterface>> = {}): DecoratedRpc<ApiType, RpcInterface> {
|
protected _decorateRpc<ApiType extends ApiTypes> (rpc: RpcCore & RpcInterface, decorateMethod: DecorateMethod<ApiType>, input: Partial<DecoratedRpc<ApiType, RpcInterface>> = {}): DecoratedRpc<ApiType, RpcInterface> {
|
||||||
const out = input as DecoratedRpc<ApiType, RpcInterface>;
|
const out: Record<string, Record<string, unknown>> = input;
|
||||||
|
|
||||||
|
const decorateFn = (section: string, method: string): unknown => {
|
||||||
|
const source = rpc[section as 'chain'][method as 'getHeader'];
|
||||||
|
const fn = decorateMethod(source, { methodName: method }) as Record<string, unknown>;
|
||||||
|
|
||||||
|
fn.meta = source.meta;
|
||||||
|
fn.raw = decorateMethod(source.raw, { methodName: method }) as unknown;
|
||||||
|
|
||||||
|
return fn;
|
||||||
|
};
|
||||||
|
|
||||||
for (let s = 0; s < rpc.sections.length; s++) {
|
for (let s = 0; s < rpc.sections.length; s++) {
|
||||||
const sectionName = rpc.sections[s] as keyof DecoratedRpc<ApiType, RpcInterface>;
|
const section = rpc.sections[s];
|
||||||
|
|
||||||
if (!(out as Record<string, unknown>)[sectionName]) {
|
if (!Object.prototype.hasOwnProperty.call(out, section)) {
|
||||||
const section = {} as DecoratedRpcSection<ApiType, RpcInterface[typeof sectionName]>;
|
const methods = Object.keys(rpc[section as 'chain']);
|
||||||
|
|
||||||
|
const decorateInternal = (method: string) =>
|
||||||
|
decorateFn(section, method);
|
||||||
|
|
||||||
|
for (let m = 0; m < methods.length; m++) {
|
||||||
|
const method = methods[m];
|
||||||
|
|
||||||
for (const [methodName, method] of Object.entries(rpc[sectionName])) {
|
|
||||||
// skip subscriptions where we have a non-subscribe interface
|
// skip subscriptions where we have a non-subscribe interface
|
||||||
if (this.hasSubscriptions || !(methodName.startsWith('subscribe') || methodName.startsWith('unsubscribe'))) {
|
if (this.hasSubscriptions || !(method.startsWith('subscribe') || method.startsWith('unsubscribe'))) {
|
||||||
(section as Record<string, unknown>)[methodName] = decorateMethod(method, { methodName }) as unknown;
|
if (!Object.prototype.hasOwnProperty.call(out, section)) {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
out[section] = {};
|
||||||
(section as Record<string, { raw: unknown }>)[methodName].raw = decorateMethod(method.raw, { methodName }) as unknown;
|
}
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
||||||
(section as Record<string, { meta: unknown }>)[methodName].meta = method.meta;
|
lazyMethod(out[section], method, decorateInternal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(out as Record<string, unknown>)[sectionName] = section;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return out;
|
return out as DecoratedRpc<ApiType, RpcInterface>;
|
||||||
}
|
}
|
||||||
|
|
||||||
// only be called if supportMulti is true
|
// only be called if supportMulti is true
|
||||||
@@ -427,19 +438,20 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected _decorateExtrinsics<ApiType extends ApiTypes> ({ tx }: DecoratedMeta, decorateMethod: DecorateMethod<ApiType>): SubmittableExtrinsics<ApiType> {
|
protected _decorateExtrinsics<ApiType extends ApiTypes> ({ tx }: DecoratedMeta, decorateMethod: DecorateMethod<ApiType>): SubmittableExtrinsics<ApiType> {
|
||||||
const creator = createSubmittable(this._type, this._rx, decorateMethod) as SubmittableExtrinsics<ApiType>;
|
const result = createSubmittable(this._type, this._rx, decorateMethod) as SubmittableExtrinsics<ApiType>;
|
||||||
|
|
||||||
for (const [name, section] of Object.entries(tx)) {
|
const lazySection = (section: string) =>
|
||||||
const methods: SubmittableModuleExtrinsics<ApiType> = {};
|
lazyMethods({}, Object.keys(tx[section]), (method: string) =>
|
||||||
|
this._decorateExtrinsicEntry(tx[section][method], result)
|
||||||
|
);
|
||||||
|
|
||||||
for (const [name, method] of Object.entries(section)) {
|
const sections = Object.keys(tx);
|
||||||
methods[name] = this._decorateExtrinsicEntry(method, creator);
|
|
||||||
}
|
|
||||||
|
|
||||||
creator[name] = methods;
|
for (let i = 0; i < sections.length; i++) {
|
||||||
|
lazyMethod(result, sections[i], lazySection);
|
||||||
}
|
}
|
||||||
|
|
||||||
return creator;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _decorateExtrinsicEntry<ApiType extends ApiTypes> (method: CallFunction, creator: (value: Call | Uint8Array | string) => SubmittableExtrinsic<ApiType>): SubmittableExtrinsicFunction<ApiType> {
|
private _decorateExtrinsicEntry<ApiType extends ApiTypes> (method: CallFunction, creator: (value: Call | Uint8Array | string) => SubmittableExtrinsic<ApiType>): SubmittableExtrinsicFunction<ApiType> {
|
||||||
@@ -454,33 +466,20 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
return this._decorateFunctionMeta(method as unknown as MetaDecoration, decorated as unknown as MetaDecoration) as unknown as SubmittableExtrinsicFunction<ApiType>;
|
return this._decorateFunctionMeta(method as unknown as MetaDecoration, decorated as unknown as MetaDecoration) as unknown as SubmittableExtrinsicFunction<ApiType>;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected _decorateStorage<ApiType extends ApiTypes> ({ query }: DecoratedMeta, decorateMethod: DecorateMethod<ApiType>): QueryableStorage<ApiType> {
|
protected _decorateStorage<ApiType extends ApiTypes> ({ query, registry }: DecoratedMeta, decorateMethod: DecorateMethod<ApiType>, blockHash?: Uint8Array): QueryableStorage<ApiType> {
|
||||||
const result = {} as QueryableStorage<ApiType>;
|
const result = {} as QueryableStorage<ApiType>;
|
||||||
|
|
||||||
for (const [name, section] of Object.entries(query)) {
|
const lazySection = (section: string) =>
|
||||||
const methods: QueryableModuleStorage<ApiType> = {};
|
lazyMethods({}, Object.keys(query[section]), (method: string) =>
|
||||||
|
blockHash
|
||||||
|
? this._decorateStorageEntryAt(registry, query[section][method], decorateMethod, blockHash)
|
||||||
|
: this._decorateStorageEntry(query[section][method], decorateMethod)
|
||||||
|
);
|
||||||
|
|
||||||
for (const [name, method] of Object.entries(section)) {
|
const sections = Object.keys(query);
|
||||||
methods[name] = this._decorateStorageEntry(method, decorateMethod);
|
|
||||||
}
|
|
||||||
|
|
||||||
result[name] = methods;
|
for (let i = 0; i < sections.length; i++) {
|
||||||
}
|
lazyMethod(result, sections[i], lazySection);
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected _decorateStorageAt<ApiType extends ApiTypes> ({ query, registry }: DecoratedMeta, decorateMethod: DecorateMethod<ApiType>, blockHash: Uint8Array): QueryableStorageAt<ApiType> {
|
|
||||||
const result = {} as QueryableStorageAt<ApiType>;
|
|
||||||
|
|
||||||
for (const [name, section] of Object.entries(query)) {
|
|
||||||
const methods: QueryableModuleStorageAt<ApiType> = {};
|
|
||||||
|
|
||||||
for (const [name, method] of Object.entries(section)) {
|
|
||||||
methods[name] = this._decorateStorageEntryAt(registry, method, decorateMethod, blockHash);
|
|
||||||
}
|
|
||||||
|
|
||||||
result[name] = methods;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@@ -734,19 +733,15 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
|
|
||||||
protected _decorateDeriveRx (decorateMethod: DecorateMethod<ApiType>): DeriveAllSections<'rxjs', ExactDerive> {
|
protected _decorateDeriveRx (decorateMethod: DecorateMethod<ApiType>): DeriveAllSections<'rxjs', ExactDerive> {
|
||||||
const specName = this._runtimeVersion?.specName.toString();
|
const specName = this._runtimeVersion?.specName.toString();
|
||||||
const derives = {
|
|
||||||
...this._options.derives,
|
|
||||||
...(this._options.typesBundle?.spec?.[specName || '']?.derives || {})
|
|
||||||
};
|
|
||||||
|
|
||||||
// Pull in derive from api-derive
|
// Pull in derive from api-derive
|
||||||
const derive = decorateDerive(this.#instanceId, this._rx, derives);
|
const available = getAvailableDerives(this.#instanceId, this._rx, objectSpread<DeriveCustom>({}, this._options.derives, this._options.typesBundle?.spec?.[specName || '']?.derives));
|
||||||
|
|
||||||
return decorateSections<'rxjs', ExactDerive>(derive, decorateMethod);
|
return decorateDeriveSections<'rxjs', ExactDerive>(decorateMethod, available);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected _decorateDerive (decorateMethod: DecorateMethod<ApiType>): DeriveAllSections<ApiType, ExactDerive> {
|
protected _decorateDerive (decorateMethod: DecorateMethod<ApiType>): DeriveAllSections<ApiType, ExactDerive> {
|
||||||
return decorateSections<ApiType, ExactDerive>(this._rx.derive, decorateMethod);
|
return decorateDeriveSections<ApiType, ExactDerive>(decorateMethod, this._rx.derive);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
import type { Observable, Subscription } from 'rxjs';
|
import type { Observable, Subscription } from 'rxjs';
|
||||||
import type { Text } from '@polkadot/types';
|
import type { Text } from '@polkadot/types';
|
||||||
|
import type { ExtDef } from '@polkadot/types/extrinsic/signedExtensions/types';
|
||||||
import type { ChainProperties, Hash, RuntimeVersion, RuntimeVersionPartial } from '@polkadot/types/interfaces';
|
import type { ChainProperties, Hash, RuntimeVersion, RuntimeVersionPartial } from '@polkadot/types/interfaces';
|
||||||
import type { Registry } from '@polkadot/types/types';
|
import type { Registry } from '@polkadot/types/types';
|
||||||
import type { BN } from '@polkadot/util';
|
import type { BN } from '@polkadot/util';
|
||||||
@@ -13,7 +14,7 @@ import { firstValueFrom, map, of, switchMap } from 'rxjs';
|
|||||||
|
|
||||||
import { Metadata, TypeRegistry } from '@polkadot/types';
|
import { Metadata, TypeRegistry } from '@polkadot/types';
|
||||||
import { getSpecAlias, getSpecExtensions, getSpecHasher, getSpecRpc, getSpecTypes, getUpgradeVersion } from '@polkadot/types-known';
|
import { getSpecAlias, getSpecExtensions, getSpecHasher, getSpecRpc, getSpecTypes, getUpgradeVersion } from '@polkadot/types-known';
|
||||||
import { assert, BN_ZERO, isUndefined, logger, stringify, u8aEq, u8aToHex, u8aToU8a } from '@polkadot/util';
|
import { assert, BN_ZERO, isUndefined, logger, objectSpread, stringify, u8aEq, u8aToHex, u8aToU8a } from '@polkadot/util';
|
||||||
import { cryptoWaitReady } from '@polkadot/util-crypto';
|
import { cryptoWaitReady } from '@polkadot/util-crypto';
|
||||||
|
|
||||||
import { detectedCapabilities } from './capabilities';
|
import { detectedCapabilities } from './capabilities';
|
||||||
@@ -94,10 +95,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
|||||||
registry.knownTypes.typesAlias = getSpecAlias(registry, chain, version.specName);
|
registry.knownTypes.typesAlias = getSpecAlias(registry, chain, version.specName);
|
||||||
}
|
}
|
||||||
|
|
||||||
registry.setMetadata(metadata, undefined, {
|
registry.setMetadata(metadata, undefined, objectSpread<ExtDef>({}, getSpecExtensions(registry, chain, version.specName), this._options.signedExtensions));
|
||||||
...getSpecExtensions(registry, chain, version.specName),
|
|
||||||
...(this._options.signedExtensions || {})
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -121,7 +119,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
|||||||
|
|
||||||
// always create a new decoration - since we are pointing to a specific hash, this
|
// always create a new decoration - since we are pointing to a specific hash, this
|
||||||
// means that all queries needs to use that hash (not a previous one already existing)
|
// means that all queries needs to use that hash (not a previous one already existing)
|
||||||
return this._createDecorated(registry, true, u8aHash).decoratedApi;
|
return this._createDecorated(registry, true, null, u8aHash).decoratedApi;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _getBlockRegistryViaVersion (blockHash: Uint8Array, version?: RuntimeVersionPartial): VersionedRegistry<ApiType> | null {
|
private _getBlockRegistryViaVersion (blockHash: Uint8Array, version?: RuntimeVersionPartial): VersionedRegistry<ApiType> | null {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import type { SignerPayloadRawBase } from '@polkadot/types/types';
|
import type { SignerPayloadRawBase } from '@polkadot/types/types';
|
||||||
import type { ApiOptions, ApiTypes, DecorateMethod, Signer } from '../types';
|
import type { ApiOptions, ApiTypes, DecorateMethod, Signer } from '../types';
|
||||||
|
|
||||||
import { assert, isString, u8aToHex, u8aToU8a } from '@polkadot/util';
|
import { assert, isString, objectSpread, u8aToHex, u8aToU8a } from '@polkadot/util';
|
||||||
|
|
||||||
import { Getters } from './Getters';
|
import { Getters } from './Getters';
|
||||||
|
|
||||||
@@ -72,11 +72,9 @@ export abstract class ApiBase<ApiType extends ApiTypes> extends Getters<ApiType>
|
|||||||
assert(_signer?.signRaw, 'No signer exists with a signRaw interface. You possibly need to pass through an explicit keypair for the origin so it can be used for signing.');
|
assert(_signer?.signRaw, 'No signer exists with a signRaw interface. You possibly need to pass through an explicit keypair for the origin so it can be used for signing.');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await _signer.signRaw({
|
await _signer.signRaw(
|
||||||
type: 'bytes',
|
objectSpread({ type: 'bytes' }, data, { address })
|
||||||
...data,
|
)
|
||||||
address
|
|
||||||
})
|
|
||||||
).signature;
|
).signature;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ export { Keyring } from '@polkadot/keyring';
|
|||||||
export { WsProvider, HttpProvider } from '@polkadot/rpc-provider';
|
export { WsProvider, HttpProvider } from '@polkadot/rpc-provider';
|
||||||
|
|
||||||
export { packageInfo } from './packageInfo';
|
export { packageInfo } from './packageInfo';
|
||||||
export { ApiPromise, decorateMethod as decorateMethodPromise } from './promise';
|
export * from './promise';
|
||||||
export { SubmittableResult } from './submittable';
|
export { SubmittableResult } from './submittable';
|
||||||
export { ApiRx, decorateMethod as decorateMethodRx } from './rx';
|
export * from './rx';
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Auto-generated by @polkadot/dev, do not edit
|
// Auto-generated by @polkadot/dev, do not edit
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api', version: '6.6.1' };
|
export const packageInfo = { name: '@polkadot/api', version: '6.8.1' };
|
||||||
|
|||||||
@@ -0,0 +1,215 @@
|
|||||||
|
// Copyright 2017-2021 @polkadot/api authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import type { ApiOptions, UnsubscribePromise } from '../types';
|
||||||
|
|
||||||
|
import { objectSpread } from '@polkadot/util';
|
||||||
|
|
||||||
|
import { ApiBase } from '../base';
|
||||||
|
import { Combinator, CombinatorCallback, CombinatorFunction } from './Combinator';
|
||||||
|
import { promiseTracker, toPromiseMethod } from './decorateMethod';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* # @polkadot/api/promise
|
||||||
|
*
|
||||||
|
* ## Overview
|
||||||
|
*
|
||||||
|
* @name ApiPromise
|
||||||
|
* @description
|
||||||
|
* ApiPromise is a standard JavaScript wrapper around the RPC and interfaces on the Polkadot network. As a full Promise-based, all interface calls return Promises, including the static `.create(...)`. Subscription calls utilise `(value) => {}` callbacks to pass through the latest values.
|
||||||
|
*
|
||||||
|
* The API is well suited to real-time applications where either the single-shot state is needed or use is to be made of the subscription-based features of Polkadot (and Substrate) clients.
|
||||||
|
*
|
||||||
|
* @see [[ApiRx]]
|
||||||
|
*
|
||||||
|
* ## Usage
|
||||||
|
*
|
||||||
|
* Making rpc calls -
|
||||||
|
* <BR>
|
||||||
|
*
|
||||||
|
* ```javascript
|
||||||
|
* import ApiPromise from '@polkadot/api/promise';
|
||||||
|
*
|
||||||
|
* // initialise via static create
|
||||||
|
* const api = await ApiPromise.create();
|
||||||
|
*
|
||||||
|
* // make a subscription to the network head
|
||||||
|
* api.rpc.chain.subscribeNewHeads((header) => {
|
||||||
|
* console.log(`Chain is at #${header.number}`);
|
||||||
|
* });
|
||||||
|
* ```
|
||||||
|
* <BR>
|
||||||
|
*
|
||||||
|
* Subscribing to chain state -
|
||||||
|
* <BR>
|
||||||
|
*
|
||||||
|
* ```javascript
|
||||||
|
* import { ApiPromise, WsProvider } from '@polkadot/api';
|
||||||
|
*
|
||||||
|
* // initialise a provider with a specific endpoint
|
||||||
|
* const provider = new WsProvider('wss://example.com:9944')
|
||||||
|
*
|
||||||
|
* // initialise via isReady & new with specific provider
|
||||||
|
* const api = await new ApiPromise({ provider }).isReady;
|
||||||
|
*
|
||||||
|
* // retrieve the block target time
|
||||||
|
* const blockPeriod = await api.query.timestamp.blockPeriod().toNumber();
|
||||||
|
* let last = 0;
|
||||||
|
*
|
||||||
|
* // subscribe to the current block timestamp, updates automatically (callback provided)
|
||||||
|
* api.query.timestamp.now((timestamp) => {
|
||||||
|
* const elapsed = last
|
||||||
|
* ? `, ${timestamp.toNumber() - last}s since last`
|
||||||
|
* : '';
|
||||||
|
*
|
||||||
|
* last = timestamp.toNumber();
|
||||||
|
* console.log(`timestamp ${timestamp}${elapsed} (${blockPeriod}s target)`);
|
||||||
|
* });
|
||||||
|
* ```
|
||||||
|
* <BR>
|
||||||
|
*
|
||||||
|
* Submitting a transaction -
|
||||||
|
* <BR>
|
||||||
|
*
|
||||||
|
* ```javascript
|
||||||
|
* import ApiPromise from '@polkadot/api/promise';
|
||||||
|
*
|
||||||
|
* ApiPromise.create().then((api) => {
|
||||||
|
* const [nonce] = await api.query.system.account(keyring.alice.address);
|
||||||
|
*
|
||||||
|
* api.tx.balances
|
||||||
|
* // create transfer
|
||||||
|
* transfer(keyring.bob.address, 12345)
|
||||||
|
* // sign the transcation
|
||||||
|
* .sign(keyring.alice, { nonce })
|
||||||
|
* // send the transaction (optional status callback)
|
||||||
|
* .send((status) => {
|
||||||
|
* console.log(`current status ${status.type}`);
|
||||||
|
* })
|
||||||
|
* // retrieve the submitted extrinsic hash
|
||||||
|
* .then((hash) => {
|
||||||
|
* console.log(`submitted with hash ${hash}`);
|
||||||
|
* });
|
||||||
|
* });
|
||||||
|
* ```
|
||||||
|
*/
|
||||||
|
export class ApiPromise extends ApiBase<'promise'> {
|
||||||
|
#isReadyPromise: Promise<ApiPromise>;
|
||||||
|
#isReadyOrErrorPromise: Promise<ApiPromise>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Creates an instance of the ApiPromise class
|
||||||
|
* @param options Options to create an instance. This can be either [[ApiOptions]] or
|
||||||
|
* an [[WsProvider]].
|
||||||
|
* @example
|
||||||
|
* <BR>
|
||||||
|
*
|
||||||
|
* ```javascript
|
||||||
|
* import Api from '@polkadot/api/promise';
|
||||||
|
*
|
||||||
|
* new Api().isReady.then((api) => {
|
||||||
|
* api.rpc.subscribeNewHeads((header) => {
|
||||||
|
* console.log(`new block #${header.number.toNumber()}`);
|
||||||
|
* });
|
||||||
|
* });
|
||||||
|
* ```
|
||||||
|
*/
|
||||||
|
constructor (options?: ApiOptions) {
|
||||||
|
super(options, 'promise', toPromiseMethod);
|
||||||
|
|
||||||
|
this.#isReadyPromise = new Promise((resolve): void => {
|
||||||
|
super.once('ready', () => resolve(this));
|
||||||
|
});
|
||||||
|
|
||||||
|
this.#isReadyOrErrorPromise = new Promise((resolve, reject): void => {
|
||||||
|
const tracker = promiseTracker(resolve, reject);
|
||||||
|
|
||||||
|
super.once('ready', () => tracker.resolve(this));
|
||||||
|
super.once('error', (error: Error) => tracker.reject(error));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Creates an ApiPromise instance using the supplied provider. Returns an Promise containing the actual Api instance.
|
||||||
|
* @param options options that is passed to the class contructor. Can be either [[ApiOptions]] or a
|
||||||
|
* provider (see the constructor arguments)
|
||||||
|
* @example
|
||||||
|
* <BR>
|
||||||
|
*
|
||||||
|
* ```javascript
|
||||||
|
* import Api from '@polkadot/api/promise';
|
||||||
|
*
|
||||||
|
* Api.create().then(async (api) => {
|
||||||
|
* const timestamp = await api.query.timestamp.now();
|
||||||
|
*
|
||||||
|
* console.log(`lastest block timestamp ${timestamp}`);
|
||||||
|
* });
|
||||||
|
* ```
|
||||||
|
*/
|
||||||
|
public static create (options?: ApiOptions): Promise<ApiPromise> {
|
||||||
|
const instance = new ApiPromise(options);
|
||||||
|
|
||||||
|
if (options && options.throwOnConnect) {
|
||||||
|
return instance.isReadyOrError;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Swallow any rejections on isReadyOrError
|
||||||
|
// (in Node 15.x this creates issues, when not being looked at)
|
||||||
|
instance.isReadyOrError.catch(() => {
|
||||||
|
// ignore
|
||||||
|
});
|
||||||
|
|
||||||
|
return instance.isReady;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Promise that resolves the first time we are connected and loaded
|
||||||
|
*/
|
||||||
|
public get isReady (): Promise<ApiPromise> {
|
||||||
|
return this.#isReadyPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Promise that resolves if we can connect, or reject if there is an error
|
||||||
|
*/
|
||||||
|
public get isReadyOrError (): Promise<ApiPromise> {
|
||||||
|
return this.#isReadyOrErrorPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Returns a clone of this ApiPromise instance (new underlying provider connection)
|
||||||
|
*/
|
||||||
|
public clone (): ApiPromise {
|
||||||
|
return new ApiPromise(
|
||||||
|
objectSpread({}, this._options, { source: this })
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Creates a combinator that can be used to combine the latest results from multiple subscriptions
|
||||||
|
* @param fns An array of function to combine, each in the form of `(cb: (value: void)) => void`
|
||||||
|
* @param callback A callback that will return an Array of all the values this combinator has been applied to
|
||||||
|
* @example
|
||||||
|
* <BR>
|
||||||
|
*
|
||||||
|
* ```javascript
|
||||||
|
* const address = '5DTestUPts3kjeXSTMyerHihn1uwMfLj8vU8sqF7qYrFacT7';
|
||||||
|
*
|
||||||
|
* // combines values from balance & nonce as it updates
|
||||||
|
* api.combineLatest([
|
||||||
|
* api.rpc.chain.subscribeNewHeads,
|
||||||
|
* (cb) => api.query.system.account(address, cb)
|
||||||
|
* ], ([head, [balance, nonce]]) => {
|
||||||
|
* console.log(`#${head.number}: You have ${balance.free} units, with ${nonce} transactions sent`);
|
||||||
|
* });
|
||||||
|
* ```
|
||||||
|
*/
|
||||||
|
// eslint-disable-next-line @typescript-eslint/require-await
|
||||||
|
public async combineLatest <T extends any[] = any[]> (fns: (CombinatorFunction | [CombinatorFunction, ...any[]])[], callback: CombinatorCallback<T>): UnsubscribePromise {
|
||||||
|
const combinator = new Combinator(fns, callback);
|
||||||
|
|
||||||
|
return (): void => {
|
||||||
|
combinator.unsubscribe();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
// Copyright 2017-2021 @polkadot/api authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import type { Observable } from 'rxjs';
|
||||||
|
import type { Callback, Codec } from '@polkadot/types/types';
|
||||||
|
import type { DecorateFn, DecorateMethodOptions, ObsInnerType, StorageEntryPromiseOverloads, UnsubscribePromise, VoidFn } from '../types';
|
||||||
|
|
||||||
|
import { catchError, EMPTY, Subscription, tap } from 'rxjs';
|
||||||
|
|
||||||
|
import { assert, isFunction } from '@polkadot/util';
|
||||||
|
|
||||||
|
interface Tracker<T> {
|
||||||
|
reject: (value: Error) => Observable<never>;
|
||||||
|
resolve: (value: T) => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// a Promise completion tracker, wrapping an isComplete variable that ensures the promise only resolves once
|
||||||
|
export function promiseTracker<T> (resolve: (value: T) => void, reject: (value: Error) => void): Tracker<T> {
|
||||||
|
let isCompleted = false;
|
||||||
|
|
||||||
|
return {
|
||||||
|
reject: (error: Error): Observable<never> => {
|
||||||
|
if (!isCompleted) {
|
||||||
|
isCompleted = true;
|
||||||
|
|
||||||
|
reject(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
return EMPTY;
|
||||||
|
},
|
||||||
|
resolve: (value: T): void => {
|
||||||
|
if (!isCompleted) {
|
||||||
|
isCompleted = true;
|
||||||
|
|
||||||
|
resolve(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// extract the arguments and callback params from a value array possibly containing a callback
|
||||||
|
function extractArgs (args: unknown[], needsCallback: boolean): [unknown[], Callback<Codec> | undefined] {
|
||||||
|
let callback: Callback<Codec> | undefined;
|
||||||
|
const actualArgs = args.slice();
|
||||||
|
|
||||||
|
// If the last arg is a function, we pop it, put it into callback.
|
||||||
|
// actualArgs will then hold the actual arguments to be passed to `method`
|
||||||
|
if (args.length && isFunction(args[args.length - 1])) {
|
||||||
|
callback = actualArgs.pop() as Callback<Codec>;
|
||||||
|
}
|
||||||
|
|
||||||
|
// When we need a subscription, ensure that a valid callback is actually passed
|
||||||
|
assert(!needsCallback || isFunction(callback), 'Expected a callback to be passed with subscriptions');
|
||||||
|
|
||||||
|
return [actualArgs, callback];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Decorate a call for a single-shot result - retrieve and then immediate unsubscribe
|
||||||
|
function decorateCall<M extends DecorateFn<ObsInnerType<ReturnType<M>>>> (method: M, args: unknown[]): Promise<ObsInnerType<ReturnType<M>>> {
|
||||||
|
return new Promise((resolve, reject): void => {
|
||||||
|
// single result tracker - either reject with Error or resolve with Codec result
|
||||||
|
const tracker = promiseTracker(resolve, reject);
|
||||||
|
|
||||||
|
// encoding errors reject immediately, any result unsubscribes and resolves
|
||||||
|
const subscription: Subscription = method(...args)
|
||||||
|
.pipe(
|
||||||
|
catchError((error: Error) => tracker.reject(error))
|
||||||
|
)
|
||||||
|
.subscribe((result): void => {
|
||||||
|
tracker.resolve(result);
|
||||||
|
setTimeout(() => subscription.unsubscribe(), 0);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Decorate a subscription where we have a result callback specified
|
||||||
|
function decorateSubscribe<M extends DecorateFn<ObsInnerType<ReturnType<M>>>> (method: M, args: unknown[], resultCb: Callback<Codec>): UnsubscribePromise {
|
||||||
|
return new Promise<VoidFn>((resolve, reject): void => {
|
||||||
|
// either reject with error or resolve with unsubscribe callback
|
||||||
|
const tracker = promiseTracker(resolve, reject);
|
||||||
|
|
||||||
|
// errors reject immediately, the first result resolves with an unsubscribe promise, all results via callback
|
||||||
|
const subscription: Subscription = method(...args)
|
||||||
|
.pipe(
|
||||||
|
catchError((error: Error) => tracker.reject(error)),
|
||||||
|
tap(() => tracker.resolve(() => subscription.unsubscribe()))
|
||||||
|
)
|
||||||
|
.subscribe((result): void => {
|
||||||
|
// queue result (back of queue to clear current)
|
||||||
|
setTimeout(() => resultCb(result) as void, 0);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Decorate method for ApiPromise, where the results are converted to the Promise equivalent
|
||||||
|
*/
|
||||||
|
export function toPromiseMethod<M extends DecorateFn<ObsInnerType<ReturnType<M>>>> (method: M, options?: DecorateMethodOptions): StorageEntryPromiseOverloads {
|
||||||
|
const needsCallback = !!(options && options.methodName && options.methodName.includes('subscribe'));
|
||||||
|
|
||||||
|
return function (...args: unknown[]): Promise<ObsInnerType<ReturnType<M>>> | UnsubscribePromise {
|
||||||
|
const [actualArgs, resultCb] = extractArgs(args, needsCallback);
|
||||||
|
|
||||||
|
return resultCb
|
||||||
|
? decorateSubscribe(method, actualArgs, resultCb)
|
||||||
|
: decorateCall((options?.overrideNoSub as M) || method, actualArgs);
|
||||||
|
} as StorageEntryPromiseOverloads;
|
||||||
|
}
|
||||||
@@ -1,313 +1,5 @@
|
|||||||
// Copyright 2017-2021 @polkadot/api authors & contributors
|
// Copyright 2017-2021 @polkadot/api authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { Observable } from 'rxjs';
|
export { ApiPromise } from './Api';
|
||||||
import type { Callback, Codec } from '@polkadot/types/types';
|
export { toPromiseMethod } from './decorateMethod';
|
||||||
import type { ApiOptions, DecorateFn, DecorateMethodOptions, ObsInnerType, StorageEntryPromiseOverloads, UnsubscribePromise, VoidFn } from '../types';
|
|
||||||
|
|
||||||
import { catchError, EMPTY, Subscription, tap } from 'rxjs';
|
|
||||||
|
|
||||||
import { assert, isFunction } from '@polkadot/util';
|
|
||||||
|
|
||||||
import { ApiBase } from '../base';
|
|
||||||
import { Combinator, CombinatorCallback, CombinatorFunction } from './Combinator';
|
|
||||||
|
|
||||||
interface Tracker<T> {
|
|
||||||
reject: (value: Error) => Observable<never>;
|
|
||||||
resolve: (value: T) => void;
|
|
||||||
}
|
|
||||||
|
|
||||||
// extract the arguments and callback params from a value array possibly containing a callback
|
|
||||||
function extractArgs (args: unknown[], needsCallback: boolean): [unknown[], Callback<Codec> | undefined] {
|
|
||||||
let callback: Callback<Codec> | undefined;
|
|
||||||
const actualArgs = args.slice();
|
|
||||||
|
|
||||||
// If the last arg is a function, we pop it, put it into callback.
|
|
||||||
// actualArgs will then hold the actual arguments to be passed to `method`
|
|
||||||
if (args.length && isFunction(args[args.length - 1])) {
|
|
||||||
callback = actualArgs.pop() as Callback<Codec>;
|
|
||||||
}
|
|
||||||
|
|
||||||
// When we need a subscription, ensure that a valid callback is actually passed
|
|
||||||
assert(!needsCallback || isFunction(callback), 'Expected a callback to be passed with subscriptions');
|
|
||||||
|
|
||||||
return [actualArgs, callback];
|
|
||||||
}
|
|
||||||
|
|
||||||
// a Promise completion tracker, wrapping an isComplete variable that ensures the promise only resolves once
|
|
||||||
function promiseTracker<T> (resolve: (value: T) => void, reject: (value: Error) => void): Tracker<T> {
|
|
||||||
let isCompleted = false;
|
|
||||||
|
|
||||||
return {
|
|
||||||
reject: (error: Error): Observable<never> => {
|
|
||||||
if (!isCompleted) {
|
|
||||||
isCompleted = true;
|
|
||||||
|
|
||||||
reject(error);
|
|
||||||
}
|
|
||||||
|
|
||||||
return EMPTY;
|
|
||||||
},
|
|
||||||
resolve: (value: T): void => {
|
|
||||||
if (!isCompleted) {
|
|
||||||
isCompleted = true;
|
|
||||||
|
|
||||||
resolve(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// Decorate a call for a single-shot result - retrieve and then immediate unsubscribe
|
|
||||||
function decorateCall<Method extends DecorateFn<ObsInnerType<ReturnType<Method>>>> (method: Method, actualArgs: unknown[]): Promise<ObsInnerType<ReturnType<Method>>> {
|
|
||||||
return new Promise((resolve, reject): void => {
|
|
||||||
// single result tracker - either reject with Error or resolve with Codec result
|
|
||||||
const tracker = promiseTracker(resolve, reject);
|
|
||||||
|
|
||||||
// encoding errors reject immediately, any result unsubscribes and resolves
|
|
||||||
const subscription: Subscription = method(...actualArgs).pipe(
|
|
||||||
catchError((error: Error) => tracker.reject(error))
|
|
||||||
).subscribe((result): void => {
|
|
||||||
tracker.resolve(result);
|
|
||||||
setTimeout(() => subscription.unsubscribe(), 0);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Decorate a subscription where we have a result callback specified
|
|
||||||
function decorateSubscribe<Method extends DecorateFn<ObsInnerType<ReturnType<Method>>>> (method: Method, actualArgs: unknown[], resultCb: Callback<Codec>): UnsubscribePromise {
|
|
||||||
return new Promise<VoidFn>((resolve, reject): void => {
|
|
||||||
// either reject with error or resolve with unsubscribe callback
|
|
||||||
const tracker = promiseTracker(resolve, reject);
|
|
||||||
|
|
||||||
// errors reject immediately, the first result resolves with an unsubscribe promise, all results via callback
|
|
||||||
const subscription: Subscription = method(...actualArgs).pipe(
|
|
||||||
catchError((error: Error) => tracker.reject(error)),
|
|
||||||
tap(() => tracker.resolve(() => subscription.unsubscribe()))
|
|
||||||
).subscribe((result): void => {
|
|
||||||
// queue result (back of queue to clear current)
|
|
||||||
setTimeout(() => resultCb(result) as void, 0);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description Decorate method for ApiPromise, where the results are converted to the Promise equivalent
|
|
||||||
*/
|
|
||||||
export function decorateMethod<Method extends DecorateFn<ObsInnerType<ReturnType<Method>>>> (method: Method, options?: DecorateMethodOptions): StorageEntryPromiseOverloads {
|
|
||||||
const needsCallback = options && options.methodName && options.methodName.includes('subscribe');
|
|
||||||
|
|
||||||
return function (...args: unknown[]): Promise<ObsInnerType<ReturnType<Method>>> | UnsubscribePromise {
|
|
||||||
const [actualArgs, resultCb] = extractArgs(args, !!needsCallback);
|
|
||||||
|
|
||||||
return resultCb
|
|
||||||
? decorateSubscribe(method, actualArgs, resultCb)
|
|
||||||
: decorateCall((options?.overrideNoSub as Method) || method, actualArgs);
|
|
||||||
} as StorageEntryPromiseOverloads;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* # @polkadot/api/promise
|
|
||||||
*
|
|
||||||
* ## Overview
|
|
||||||
*
|
|
||||||
* @name ApiPromise
|
|
||||||
* @description
|
|
||||||
* ApiPromise is a standard JavaScript wrapper around the RPC and interfaces on the Polkadot network. As a full Promise-based, all interface calls return Promises, including the static `.create(...)`. Subscription calls utilise `(value) => {}` callbacks to pass through the latest values.
|
|
||||||
*
|
|
||||||
* The API is well suited to real-time applications where either the single-shot state is needed or use is to be made of the subscription-based features of Polkadot (and Substrate) clients.
|
|
||||||
*
|
|
||||||
* @see [[ApiRx]]
|
|
||||||
*
|
|
||||||
* ## Usage
|
|
||||||
*
|
|
||||||
* Making rpc calls -
|
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
|
||||||
* import ApiPromise from '@polkadot/api/promise';
|
|
||||||
*
|
|
||||||
* // initialise via static create
|
|
||||||
* const api = await ApiPromise.create();
|
|
||||||
*
|
|
||||||
* // make a subscription to the network head
|
|
||||||
* api.rpc.chain.subscribeNewHeads((header) => {
|
|
||||||
* console.log(`Chain is at #${header.number}`);
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* Subscribing to chain state -
|
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
|
||||||
* import { ApiPromise, WsProvider } from '@polkadot/api';
|
|
||||||
*
|
|
||||||
* // initialise a provider with a specific endpoint
|
|
||||||
* const provider = new WsProvider('wss://example.com:9944')
|
|
||||||
*
|
|
||||||
* // initialise via isReady & new with specific provider
|
|
||||||
* const api = await new ApiPromise({ provider }).isReady;
|
|
||||||
*
|
|
||||||
* // retrieve the block target time
|
|
||||||
* const blockPeriod = await api.query.timestamp.blockPeriod().toNumber();
|
|
||||||
* let last = 0;
|
|
||||||
*
|
|
||||||
* // subscribe to the current block timestamp, updates automatically (callback provided)
|
|
||||||
* api.query.timestamp.now((timestamp) => {
|
|
||||||
* const elapsed = last
|
|
||||||
* ? `, ${timestamp.toNumber() - last}s since last`
|
|
||||||
* : '';
|
|
||||||
*
|
|
||||||
* last = timestamp.toNumber();
|
|
||||||
* console.log(`timestamp ${timestamp}${elapsed} (${blockPeriod}s target)`);
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* Submitting a transaction -
|
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
|
||||||
* import ApiPromise from '@polkadot/api/promise';
|
|
||||||
*
|
|
||||||
* ApiPromise.create().then((api) => {
|
|
||||||
* const [nonce] = await api.query.system.account(keyring.alice.address);
|
|
||||||
*
|
|
||||||
* api.tx.balances
|
|
||||||
* // create transfer
|
|
||||||
* transfer(keyring.bob.address, 12345)
|
|
||||||
* // sign the transcation
|
|
||||||
* .sign(keyring.alice, { nonce })
|
|
||||||
* // send the transaction (optional status callback)
|
|
||||||
* .send((status) => {
|
|
||||||
* console.log(`current status ${status.type}`);
|
|
||||||
* })
|
|
||||||
* // retrieve the submitted extrinsic hash
|
|
||||||
* .then((hash) => {
|
|
||||||
* console.log(`submitted with hash ${hash}`);
|
|
||||||
* });
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
export class ApiPromise extends ApiBase<'promise'> {
|
|
||||||
#isReadyPromise: Promise<ApiPromise>;
|
|
||||||
#isReadyOrErrorPromise: Promise<ApiPromise>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description Creates an ApiPromise instance using the supplied provider. Returns an Promise containing the actual Api instance.
|
|
||||||
* @param options options that is passed to the class contructor. Can be either [[ApiOptions]] or a
|
|
||||||
* provider (see the constructor arguments)
|
|
||||||
* @example
|
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
|
||||||
* import Api from '@polkadot/api/promise';
|
|
||||||
*
|
|
||||||
* Api.create().then(async (api) => {
|
|
||||||
* const timestamp = await api.query.timestamp.now();
|
|
||||||
*
|
|
||||||
* console.log(`lastest block timestamp ${timestamp}`);
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
public static create (options?: ApiOptions): Promise<ApiPromise> {
|
|
||||||
const instance = new ApiPromise(options);
|
|
||||||
|
|
||||||
if (options && options.throwOnConnect) {
|
|
||||||
return instance.isReadyOrError;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Swallow any rejections on isReadyOrError
|
|
||||||
// (in Node 15.x this creates issues, when not being looked at)
|
|
||||||
instance.isReadyOrError.catch(() => {
|
|
||||||
// ignore
|
|
||||||
});
|
|
||||||
|
|
||||||
return instance.isReady;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description Creates an instance of the ApiPromise class
|
|
||||||
* @param options Options to create an instance. This can be either [[ApiOptions]] or
|
|
||||||
* an [[WsProvider]].
|
|
||||||
* @example
|
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
|
||||||
* import Api from '@polkadot/api/promise';
|
|
||||||
*
|
|
||||||
* new Api().isReady.then((api) => {
|
|
||||||
* api.rpc.subscribeNewHeads((header) => {
|
|
||||||
* console.log(`new block #${header.number.toNumber()}`);
|
|
||||||
* });
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
constructor (options?: ApiOptions) {
|
|
||||||
super(options, 'promise', decorateMethod);
|
|
||||||
|
|
||||||
this.#isReadyPromise = new Promise((resolve): void => {
|
|
||||||
super.once('ready', () => resolve(this));
|
|
||||||
});
|
|
||||||
|
|
||||||
this.#isReadyOrErrorPromise = new Promise((resolve, reject): void => {
|
|
||||||
const tracker = promiseTracker(resolve, reject);
|
|
||||||
|
|
||||||
super.once('ready', () => tracker.resolve(this));
|
|
||||||
super.once('error', (error: Error) => tracker.reject(error));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description Promise that resolves the first time we are connected and loaded
|
|
||||||
*/
|
|
||||||
public get isReady (): Promise<ApiPromise> {
|
|
||||||
return this.#isReadyPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description Promise that resolves if we can connect, or reject if there is an error
|
|
||||||
*/
|
|
||||||
public get isReadyOrError (): Promise<ApiPromise> {
|
|
||||||
return this.#isReadyOrErrorPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description Returns a clone of this ApiPromise instance (new underlying provider connection)
|
|
||||||
*/
|
|
||||||
public clone (): ApiPromise {
|
|
||||||
return new ApiPromise({
|
|
||||||
...this._options,
|
|
||||||
source: this
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description Creates a combinator that can be used to combine the latest results from multiple subscriptions
|
|
||||||
* @param fns An array of function to combine, each in the form of `(cb: (value: void)) => void`
|
|
||||||
* @param callback A callback that will return an Array of all the values this combinator has been applied to
|
|
||||||
* @example
|
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
|
||||||
* const address = '5DTestUPts3kjeXSTMyerHihn1uwMfLj8vU8sqF7qYrFacT7';
|
|
||||||
*
|
|
||||||
* // combines values from balance & nonce as it updates
|
|
||||||
* api.combineLatest([
|
|
||||||
* api.rpc.chain.subscribeNewHeads,
|
|
||||||
* (cb) => api.query.system.account(address, cb)
|
|
||||||
* ], ([head, [balance, nonce]]) => {
|
|
||||||
* console.log(`#${head.number}: You have ${balance.free} units, with ${nonce} transactions sent`);
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
// eslint-disable-next-line @typescript-eslint/require-await
|
|
||||||
public async combineLatest <T extends any[] = any[]> (fns: (CombinatorFunction | [CombinatorFunction, ...any[]])[], callback: CombinatorCallback<T>): UnsubscribePromise {
|
|
||||||
const combinator = new Combinator(fns, callback);
|
|
||||||
|
|
||||||
return (): void => {
|
|
||||||
combinator.unsubscribe();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -0,0 +1,185 @@
|
|||||||
|
// Copyright 2017-2021 @polkadot/api authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import type { ApiOptions } from '../types';
|
||||||
|
|
||||||
|
import { from, Observable } from 'rxjs';
|
||||||
|
|
||||||
|
import { objectSpread } from '@polkadot/util';
|
||||||
|
|
||||||
|
import { ApiBase } from '../base';
|
||||||
|
import { toRxMethod } from './decorateMethod';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* # @polkadot/api/rx
|
||||||
|
*
|
||||||
|
* ## Overview
|
||||||
|
*
|
||||||
|
* @name ApiRx
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* ApiRx is a powerful RxJS Observable wrapper around the RPC and interfaces on the Polkadot network. As a full Observable API, all interface calls return RxJS Observables, including the static `.create(...)`. In the same fashion and subscription-based methods return long-running Observables that update with the latest values.
|
||||||
|
*
|
||||||
|
* The API is well suited to real-time applications where the latest state is needed, unlocking the subscription-based features of Polkadot (and Substrate) clients. Some familiarity with RxJS is a requirement to use the API, however just understanding `.subscribe` and `.pipe` on Observables will unlock full-scale use thereof.
|
||||||
|
*
|
||||||
|
* @see [[ApiPromise]]
|
||||||
|
*
|
||||||
|
* ## Usage
|
||||||
|
*
|
||||||
|
* Making rpc calls -
|
||||||
|
* <BR>
|
||||||
|
*
|
||||||
|
* ```javascript
|
||||||
|
* import ApiRx from '@polkadot/api/rx';
|
||||||
|
*
|
||||||
|
* // initialize via Promise & static create
|
||||||
|
* const api = await ApiRx.create().toPromise();
|
||||||
|
*
|
||||||
|
* // make a call to retrieve the current network head
|
||||||
|
* api.rpc.chain.subscribeNewHeads().subscribe((header) => {
|
||||||
|
* console.log(`Chain is at #${header.number}`);
|
||||||
|
* });
|
||||||
|
* ```
|
||||||
|
* <BR>
|
||||||
|
*
|
||||||
|
* Subscribing to chain state -
|
||||||
|
* <BR>
|
||||||
|
*
|
||||||
|
* ```javascript
|
||||||
|
* import { combineLatest, pairwise, switchMap } from 'rxjs';
|
||||||
|
* import { ApiRx, WsProvider } from '@polkadot/api';
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* // initialize a provider with a specific endpoint
|
||||||
|
* const provider = new WsProvider('wss://example.com:9944')
|
||||||
|
*
|
||||||
|
* // initialize via isReady & new with specific provider
|
||||||
|
* new ApiRx({ provider })
|
||||||
|
* .isReady
|
||||||
|
* .pipe(
|
||||||
|
* switchMap((api) =>
|
||||||
|
* combineLatest([
|
||||||
|
* api.query.timestamp.blockPeriod(),
|
||||||
|
* api.query.timestamp.now().pipe(pairwise())
|
||||||
|
* ])
|
||||||
|
* )
|
||||||
|
* )
|
||||||
|
* .subscribe(([blockPeriod, timestamp]) => {
|
||||||
|
* const elapsed = timestamp[1].toNumber() - timestamp[0].toNumber();
|
||||||
|
* console.log(`timestamp ${timestamp[1]} \nelapsed ${elapsed} \n(${blockPeriod}s target)`);
|
||||||
|
* });
|
||||||
|
* ```
|
||||||
|
* <BR>
|
||||||
|
*
|
||||||
|
* Submitting a transaction -
|
||||||
|
* <BR>
|
||||||
|
*
|
||||||
|
* ```javascript
|
||||||
|
* import { first, switchMap } from 'rxjs';
|
||||||
|
* import ApiRx from '@polkadot/api/rx';
|
||||||
|
*
|
||||||
|
* // import the test keyring (already has dev keys for Alice, Bob, Charlie, Eve & Ferdie)
|
||||||
|
* import testingPairs from '@polkadot/keyring/testingPairs';
|
||||||
|
* const keyring = testingPairs();
|
||||||
|
*
|
||||||
|
* // get api via Promise
|
||||||
|
* const api = await ApiRx.create().toPromise();
|
||||||
|
*
|
||||||
|
* // retrieve nonce for the account
|
||||||
|
* api.query.system
|
||||||
|
* .account(keyring.alice.address)
|
||||||
|
* .pipe(
|
||||||
|
* first(),
|
||||||
|
* // pipe nonce into transfer
|
||||||
|
* switchMap(([nonce]) =>
|
||||||
|
* api.tx.balances
|
||||||
|
* // create transfer
|
||||||
|
* .transfer(keyring.bob.address, 12345)
|
||||||
|
* // sign the transaction
|
||||||
|
* .sign(keyring.alice, { nonce })
|
||||||
|
* // send the transaction
|
||||||
|
* .send()
|
||||||
|
* )
|
||||||
|
* )
|
||||||
|
* // subscribe to overall result
|
||||||
|
* .subscribe(({ status }) => {
|
||||||
|
* if (status.isInBlock) {
|
||||||
|
* console.log('Completed at block hash', status.asFinalized.toHex());
|
||||||
|
* }
|
||||||
|
* });
|
||||||
|
* ```
|
||||||
|
*/
|
||||||
|
export class ApiRx extends ApiBase<'rxjs'> {
|
||||||
|
#isReadyRx: Observable<ApiRx>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Create an instance of the ApiRx class
|
||||||
|
* @param options Options to create an instance. Can be either [[ApiOptions]] or [[WsProvider]]
|
||||||
|
* @example
|
||||||
|
* <BR>
|
||||||
|
*
|
||||||
|
* ```javascript
|
||||||
|
* import { switchMap } from 'rxjs';
|
||||||
|
* import Api from '@polkadot/api/rx';
|
||||||
|
*
|
||||||
|
* new Api().isReady
|
||||||
|
* .pipe(
|
||||||
|
* switchMap((api) =>
|
||||||
|
* api.rpc.chain.subscribeNewHeads()
|
||||||
|
* ))
|
||||||
|
* .subscribe((header) => {
|
||||||
|
* console.log(`new block #${header.number.toNumber()}`);
|
||||||
|
* });
|
||||||
|
* ```
|
||||||
|
*/
|
||||||
|
constructor (options?: ApiOptions) {
|
||||||
|
super(options, 'rxjs', toRxMethod);
|
||||||
|
|
||||||
|
this.#isReadyRx = from<Promise<ApiRx>>(
|
||||||
|
// You can create an observable from an event, however my mind groks this form better
|
||||||
|
new Promise((resolve): void => {
|
||||||
|
super.on('ready', () => resolve(this));
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Creates an ApiRx instance using the supplied provider. Returns an Observable containing the actual Api instance.
|
||||||
|
* @param options options that is passed to the class constructor. Can be either [[ApiOptions]] or [[WsProvider]]
|
||||||
|
* @example
|
||||||
|
* <BR>
|
||||||
|
*
|
||||||
|
* ```javascript
|
||||||
|
* import { switchMap } from 'rxjs';
|
||||||
|
* import Api from '@polkadot/api/rx';
|
||||||
|
*
|
||||||
|
* Api.create()
|
||||||
|
* .pipe(
|
||||||
|
* switchMap((api) =>
|
||||||
|
* api.rpc.chain.subscribeNewHeads()
|
||||||
|
* ))
|
||||||
|
* .subscribe((header) => {
|
||||||
|
* console.log(`new block #${header.number.toNumber()}`);
|
||||||
|
* });
|
||||||
|
* ```
|
||||||
|
*/
|
||||||
|
public static create (options?: ApiOptions): Observable<ApiRx> {
|
||||||
|
return new ApiRx(options).isReady;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Observable that returns the first time we are connected and loaded
|
||||||
|
*/
|
||||||
|
public get isReady (): Observable<ApiRx> {
|
||||||
|
return this.#isReadyRx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Returns a clone of this ApiRx instance (new underlying provider connection)
|
||||||
|
*/
|
||||||
|
public clone (): ApiRx {
|
||||||
|
return new ApiRx(
|
||||||
|
objectSpread({}, this._options, { source: this })
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
// Copyright 2017-2021 @polkadot/api authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import type { Codec } from '@polkadot/types/types';
|
||||||
|
import type { DecorateFn } from '../types';
|
||||||
|
|
||||||
|
export function toRxMethod <M extends DecorateFn<Codec>> (method: M): M {
|
||||||
|
return method;
|
||||||
|
}
|
||||||
@@ -1,188 +1,5 @@
|
|||||||
// Copyright 2017-2021 @polkadot/api authors & contributors
|
// Copyright 2017-2021 @polkadot/api authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { Codec } from '@polkadot/types/types';
|
export { ApiRx } from './Api';
|
||||||
import type { ApiOptions, DecorateFn } from '../types';
|
export { toRxMethod } from './decorateMethod';
|
||||||
|
|
||||||
import { from, Observable } from 'rxjs';
|
|
||||||
|
|
||||||
import { ApiBase } from '../base';
|
|
||||||
|
|
||||||
export function decorateMethod <Method extends DecorateFn<Codec>> (method: Method): Method {
|
|
||||||
return method;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* # @polkadot/api/rx
|
|
||||||
*
|
|
||||||
* ## Overview
|
|
||||||
*
|
|
||||||
* @name ApiRx
|
|
||||||
*
|
|
||||||
* @description
|
|
||||||
* ApiRx is a powerful RxJS Observable wrapper around the RPC and interfaces on the Polkadot network. As a full Observable API, all interface calls return RxJS Observables, including the static `.create(...)`. In the same fashion and subscription-based methods return long-running Observables that update with the latest values.
|
|
||||||
*
|
|
||||||
* The API is well suited to real-time applications where the latest state is needed, unlocking the subscription-based features of Polkadot (and Substrate) clients. Some familiarity with RxJS is a requirement to use the API, however just understanding `.subscribe` and `.pipe` on Observables will unlock full-scale use thereof.
|
|
||||||
*
|
|
||||||
* @see [[ApiPromise]]
|
|
||||||
*
|
|
||||||
* ## Usage
|
|
||||||
*
|
|
||||||
* Making rpc calls -
|
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
|
||||||
* import ApiRx from '@polkadot/api/rx';
|
|
||||||
*
|
|
||||||
* // initialize via Promise & static create
|
|
||||||
* const api = await ApiRx.create().toPromise();
|
|
||||||
*
|
|
||||||
* // make a call to retrieve the current network head
|
|
||||||
* api.rpc.chain.subscribeNewHeads().subscribe((header) => {
|
|
||||||
* console.log(`Chain is at #${header.number}`);
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* Subscribing to chain state -
|
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
|
||||||
* import { combineLatest, pairwise, switchMap } from 'rxjs';
|
|
||||||
* import { ApiRx, WsProvider } from '@polkadot/api';
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* // initialize a provider with a specific endpoint
|
|
||||||
* const provider = new WsProvider('wss://example.com:9944')
|
|
||||||
*
|
|
||||||
* // initialize via isReady & new with specific provider
|
|
||||||
* new ApiRx({ provider })
|
|
||||||
* .isReady
|
|
||||||
* .pipe(
|
|
||||||
* switchMap((api) =>
|
|
||||||
* combineLatest([
|
|
||||||
* api.query.timestamp.blockPeriod(),
|
|
||||||
* api.query.timestamp.now().pipe(pairwise())
|
|
||||||
* ])
|
|
||||||
* )
|
|
||||||
* )
|
|
||||||
* .subscribe(([blockPeriod, timestamp]) => {
|
|
||||||
* const elapsed = timestamp[1].toNumber() - timestamp[0].toNumber();
|
|
||||||
* console.log(`timestamp ${timestamp[1]} \nelapsed ${elapsed} \n(${blockPeriod}s target)`);
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* Submitting a transaction -
|
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
|
||||||
* import { first, switchMap } from 'rxjs';
|
|
||||||
* import ApiRx from '@polkadot/api/rx';
|
|
||||||
*
|
|
||||||
* // import the test keyring (already has dev keys for Alice, Bob, Charlie, Eve & Ferdie)
|
|
||||||
* import testingPairs from '@polkadot/keyring/testingPairs';
|
|
||||||
* const keyring = testingPairs();
|
|
||||||
*
|
|
||||||
* // get api via Promise
|
|
||||||
* const api = await ApiRx.create().toPromise();
|
|
||||||
*
|
|
||||||
* // retrieve nonce for the account
|
|
||||||
* api.query.system
|
|
||||||
* .account(keyring.alice.address)
|
|
||||||
* .pipe(
|
|
||||||
* first(),
|
|
||||||
* // pipe nonce into transfer
|
|
||||||
* switchMap(([nonce]) =>
|
|
||||||
* api.tx.balances
|
|
||||||
* // create transfer
|
|
||||||
* .transfer(keyring.bob.address, 12345)
|
|
||||||
* // sign the transaction
|
|
||||||
* .sign(keyring.alice, { nonce })
|
|
||||||
* // send the transaction
|
|
||||||
* .send()
|
|
||||||
* )
|
|
||||||
* )
|
|
||||||
* // subscribe to overall result
|
|
||||||
* .subscribe(({ status }) => {
|
|
||||||
* if (status.isInBlock) {
|
|
||||||
* console.log('Completed at block hash', status.asFinalized.toHex());
|
|
||||||
* }
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
export class ApiRx extends ApiBase<'rxjs'> {
|
|
||||||
#isReadyRx: Observable<ApiRx>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description Creates an ApiRx instance using the supplied provider. Returns an Observable containing the actual Api instance.
|
|
||||||
* @param options options that is passed to the class constructor. Can be either [[ApiOptions]] or [[WsProvider]]
|
|
||||||
* @example
|
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
|
||||||
* import { switchMap } from 'rxjs';
|
|
||||||
* import Api from '@polkadot/api/rx';
|
|
||||||
*
|
|
||||||
* Api.create()
|
|
||||||
* .pipe(
|
|
||||||
* switchMap((api) =>
|
|
||||||
* api.rpc.chain.subscribeNewHeads()
|
|
||||||
* ))
|
|
||||||
* .subscribe((header) => {
|
|
||||||
* console.log(`new block #${header.number.toNumber()}`);
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
public static create (options?: ApiOptions): Observable<ApiRx> {
|
|
||||||
return new ApiRx(options).isReady;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description Create an instance of the ApiRx class
|
|
||||||
* @param options Options to create an instance. Can be either [[ApiOptions]] or [[WsProvider]]
|
|
||||||
* @example
|
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
|
||||||
* import { switchMap } from 'rxjs';
|
|
||||||
* import Api from '@polkadot/api/rx';
|
|
||||||
*
|
|
||||||
* new Api().isReady
|
|
||||||
* .pipe(
|
|
||||||
* switchMap((api) =>
|
|
||||||
* api.rpc.chain.subscribeNewHeads()
|
|
||||||
* ))
|
|
||||||
* .subscribe((header) => {
|
|
||||||
* console.log(`new block #${header.number.toNumber()}`);
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
constructor (options?: ApiOptions) {
|
|
||||||
super(options, 'rxjs', decorateMethod);
|
|
||||||
|
|
||||||
this.#isReadyRx = from<Promise<ApiRx>>(
|
|
||||||
// You can create an observable from an event, however my mind groks this form better
|
|
||||||
new Promise((resolve): void => {
|
|
||||||
super.on('ready', () => resolve(this));
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description Observable that returns the first time we are connected and loaded
|
|
||||||
*/
|
|
||||||
public get isReady (): Observable<ApiRx> {
|
|
||||||
return this.#isReadyRx;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description Returns a clone of this ApiRx instance (new underlying provider connection)
|
|
||||||
*/
|
|
||||||
public clone (): ApiRx {
|
|
||||||
return new ApiRx({
|
|
||||||
...this._options,
|
|
||||||
source: this
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -9,22 +9,29 @@ const recordIdentity = (record: EventRecord) => record;
|
|||||||
|
|
||||||
function filterAndApply <T> (events: EventRecord[], section: string, methods: string[], onFound: (record: EventRecord) => T): T[] {
|
function filterAndApply <T> (events: EventRecord[], section: string, methods: string[], onFound: (record: EventRecord) => T): T[] {
|
||||||
return events
|
return events
|
||||||
.filter(({ event }) => section === event.section && methods.includes(event.method))
|
.filter(({ event }) =>
|
||||||
|
section === event.section &&
|
||||||
|
methods.includes(event.method)
|
||||||
|
)
|
||||||
.map((record) => onFound(record));
|
.map((record) => onFound(record));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getDispatchError ({ event: { data: [dispatchError] } }: EventRecord): DispatchError {
|
||||||
|
return dispatchError as DispatchError;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getDispatchInfo ({ event: { data, method } }: EventRecord): DispatchInfo {
|
||||||
|
return method === 'ExtrinsicSuccess'
|
||||||
|
? data[0] as DispatchInfo
|
||||||
|
: data[1] as DispatchInfo;
|
||||||
|
}
|
||||||
|
|
||||||
function extractError (events: EventRecord[] = []): DispatchError | undefined {
|
function extractError (events: EventRecord[] = []): DispatchError | undefined {
|
||||||
return filterAndApply(events, 'system', ['ExtrinsicFailed'], ({ event: { data } }) =>
|
return filterAndApply(events, 'system', ['ExtrinsicFailed'], getDispatchError)[0];
|
||||||
data[0] as DispatchError
|
|
||||||
)[0];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function extractInfo (events: EventRecord[] = []): DispatchInfo | undefined {
|
function extractInfo (events: EventRecord[] = []): DispatchInfo | undefined {
|
||||||
return filterAndApply(events, 'system', ['ExtrinsicFailed', 'ExtrinsicSuccess'], ({ event: { data, method } }) =>
|
return filterAndApply(events, 'system', ['ExtrinsicFailed', 'ExtrinsicSuccess'], getDispatchInfo)[0];
|
||||||
method === 'ExtrinsicSuccess'
|
|
||||||
? data[0] as DispatchInfo
|
|
||||||
: data[1] as DispatchInfo
|
|
||||||
)[0];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SubmittableResult implements ISubmittableResult {
|
export class SubmittableResult implements ISubmittableResult {
|
||||||
@@ -87,7 +94,7 @@ export class SubmittableResult implements ISubmittableResult {
|
|||||||
return {
|
return {
|
||||||
dispatchError: this.dispatchError?.toHuman(),
|
dispatchError: this.dispatchError?.toHuman(),
|
||||||
dispatchInfo: this.dispatchInfo?.toHuman(),
|
dispatchInfo: this.dispatchInfo?.toHuman(),
|
||||||
events: this.events.map((event) => event.toHuman(isExtended)),
|
events: this.events.map((e) => e.toHuman(isExtended)),
|
||||||
internalError: this.internalError?.message.toString(),
|
internalError: this.internalError?.message.toString(),
|
||||||
status: this.status.toHuman(isExtended)
|
status: this.status.toHuman(isExtended)
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import type { AddressOrPair, SignerOptions, SubmittableDryRunResult, Submittable
|
|||||||
|
|
||||||
import { catchError, first, map, mapTo, mergeMap, of, switchMap, tap } from 'rxjs';
|
import { catchError, first, map, mapTo, mergeMap, of, switchMap, tap } from 'rxjs';
|
||||||
|
|
||||||
import { assert, isBn, isFunction, isNumber, isString, isU8a } from '@polkadot/util';
|
import { assert, isBn, isFunction, isNumber, isString, isU8a, objectSpread } from '@polkadot/util';
|
||||||
|
|
||||||
import { ApiBase } from '../base';
|
import { ApiBase } from '../base';
|
||||||
import { filterEvents, isKeyringPair } from '../util';
|
import { filterEvents, isKeyringPair } from '../util';
|
||||||
@@ -25,6 +25,55 @@ interface SubmittableOptions<ApiType extends ApiTypes> {
|
|||||||
|
|
||||||
const identity = <T> (input: T): T => input;
|
const identity = <T> (input: T): T => input;
|
||||||
|
|
||||||
|
function makeEraOptions (api: ApiInterfaceRx, registry: Registry, partialOptions: Partial<SignerOptions>, { header, mortalLength, nonce }: { header: Header | null; mortalLength: number; nonce: Index }): SignatureOptions {
|
||||||
|
if (!header) {
|
||||||
|
if (isNumber(partialOptions.era)) {
|
||||||
|
// since we have no header, it is immortal, remove any option overrides
|
||||||
|
// so we only supply the genesisHash and no era to the construction
|
||||||
|
delete partialOptions.era;
|
||||||
|
delete partialOptions.blockHash;
|
||||||
|
}
|
||||||
|
|
||||||
|
return makeSignOptions(api, partialOptions, { nonce });
|
||||||
|
}
|
||||||
|
|
||||||
|
return makeSignOptions(api, partialOptions, {
|
||||||
|
blockHash: header.hash,
|
||||||
|
era: registry.createType('ExtrinsicEra', {
|
||||||
|
current: header.number,
|
||||||
|
period: partialOptions.era || mortalLength
|
||||||
|
}),
|
||||||
|
nonce
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function makeSignAndSendOptions (partialOptions?: Partial<SignerOptions> | Callback<ISubmittableResult>, statusCb?: Callback<ISubmittableResult>): [Partial<SignerOptions>, Callback<ISubmittableResult>?] {
|
||||||
|
let options: Partial<SignerOptions> = {};
|
||||||
|
|
||||||
|
if (isFunction(partialOptions)) {
|
||||||
|
statusCb = partialOptions;
|
||||||
|
} else {
|
||||||
|
options = objectSpread({}, partialOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
return [options, statusCb];
|
||||||
|
}
|
||||||
|
|
||||||
|
function makeSignOptions (api: ApiInterfaceRx, partialOptions: Partial<SignerOptions>, extras: { blockHash?: Hash; era?: ExtrinsicEra; nonce?: Index }): SignatureOptions {
|
||||||
|
return objectSpread(
|
||||||
|
{ blockHash: api.genesisHash, genesisHash: api.genesisHash },
|
||||||
|
partialOptions,
|
||||||
|
extras,
|
||||||
|
{ runtimeVersion: api.runtimeVersion, signedExtensions: api.registry.signedExtensions, version: api.extrinsicType }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function optionsOrNonce (partialOptions: Partial<SignerOptions> = {}): Partial<SignerOptions> {
|
||||||
|
return isBn(partialOptions) || isNumber(partialOptions)
|
||||||
|
? { nonce: partialOptions }
|
||||||
|
: partialOptions;
|
||||||
|
}
|
||||||
|
|
||||||
export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorateMethod }: SubmittableOptions<ApiType>): Constructor<SubmittableExtrinsic<ApiType>> {
|
export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorateMethod }: SubmittableOptions<ApiType>): Constructor<SubmittableExtrinsic<ApiType>> {
|
||||||
// an instance of the base extrinsic for us to extend
|
// an instance of the base extrinsic for us to extend
|
||||||
const ExtrinsicBase = api.registry.createClass('Extrinsic');
|
const ExtrinsicBase = api.registry.createClass('Extrinsic');
|
||||||
@@ -67,7 +116,7 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const [allOptions] = this.#makeSignAndSendOptions(optionsOrHash);
|
const [allOptions] = makeSignAndSendOptions(optionsOrHash);
|
||||||
const address = isKeyringPair(account) ? account.address : account.toString();
|
const address = isKeyringPair(account) ? account.address : account.toString();
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return,@typescript-eslint/no-unsafe-call
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return,@typescript-eslint/no-unsafe-call
|
||||||
@@ -77,8 +126,8 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
|
|||||||
first(),
|
first(),
|
||||||
switchMap((signingInfo): Observable<RuntimeDispatchInfo> => {
|
switchMap((signingInfo): Observable<RuntimeDispatchInfo> => {
|
||||||
// setup our options (same way as in signAndSend)
|
// setup our options (same way as in signAndSend)
|
||||||
const eraOptions = this.#makeEraOptions(allOptions, signingInfo);
|
const eraOptions = makeEraOptions(api, this.registry, allOptions, signingInfo);
|
||||||
const signOptions = this.#makeSignOptions(eraOptions, {});
|
const signOptions = makeSignOptions(api, eraOptions, {});
|
||||||
|
|
||||||
this.signFake(address, signOptions);
|
this.signFake(address, signOptions);
|
||||||
|
|
||||||
@@ -110,8 +159,8 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
|
|||||||
* @description Sign a transaction, returning the this to allow chaining, i.e. .sign(...).send(). When options, e.g. nonce/blockHash are not specified, it will be inferred. To retrieve eg. nonce use `signAsync` (the preferred interface, this is provided for backwards compatibility)
|
* @description Sign a transaction, returning the this to allow chaining, i.e. .sign(...).send(). When options, e.g. nonce/blockHash are not specified, it will be inferred. To retrieve eg. nonce use `signAsync` (the preferred interface, this is provided for backwards compatibility)
|
||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
public override sign (account: IKeyringPair, optionsOrNonce?: Partial<SignerOptions>): this {
|
public override sign (account: IKeyringPair, partialOptions?: Partial<SignerOptions>): this {
|
||||||
super.sign(account, this.#makeSignOptions(this.#optionsOrNonce(optionsOrNonce), {}));
|
super.sign(account, makeSignOptions(api, optionsOrNonce(partialOptions), {}));
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -119,26 +168,28 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
|
|||||||
/**
|
/**
|
||||||
* @description Signs a transaction, returning `this` to allow chaining. E.g.: `sign(...).send()`. Like `.signAndSend` this will retrieve the nonce and blockHash to send the tx with.
|
* @description Signs a transaction, returning `this` to allow chaining. E.g.: `sign(...).send()`. Like `.signAndSend` this will retrieve the nonce and blockHash to send the tx with.
|
||||||
*/
|
*/
|
||||||
public signAsync (account: AddressOrPair, optionsOrNonce?: Partial<SignerOptions>): SubmittableThis<ApiType, this> {
|
public signAsync (account: AddressOrPair, partialOptions?: Partial<SignerOptions>): SubmittableThis<ApiType, this> {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return,@typescript-eslint/no-unsafe-call
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return,@typescript-eslint/no-unsafe-call
|
||||||
return decorateMethod(
|
return decorateMethod(
|
||||||
(): Observable<this> =>
|
(): Observable<this> =>
|
||||||
this.#observeSign(account, optionsOrNonce).pipe(mapTo(this) as OperatorFunction<number | undefined, this>)
|
this.#observeSign(account, partialOptions).pipe(
|
||||||
|
mapTo<number | undefined, this>(this)
|
||||||
|
)
|
||||||
)();
|
)();
|
||||||
}
|
}
|
||||||
|
|
||||||
// signAndSend with an immediate Hash result
|
// signAndSend with an immediate Hash result
|
||||||
public signAndSend (account: AddressOrPair, options?: Partial<SignerOptions>): SubmittableResultResult<ApiType>;
|
public signAndSend (account: AddressOrPair, partialOptions?: Partial<SignerOptions>): SubmittableResultResult<ApiType>;
|
||||||
|
|
||||||
// signAndSend with a subscription, i.e. callback provided
|
// signAndSend with a subscription, i.e. callback provided
|
||||||
public signAndSend (account: AddressOrPair, statusCb: Callback<ISubmittableResult>): SubmittableResultSubscription<ApiType>;
|
public signAndSend (account: AddressOrPair, statusCb: Callback<ISubmittableResult>): SubmittableResultSubscription<ApiType>;
|
||||||
|
|
||||||
// signAndSend with options and a callback
|
// signAndSend with options and a callback
|
||||||
public signAndSend (account: AddressOrPair, options: Partial<SignerOptions>, statusCb?: Callback<ISubmittableResult>): SubmittableResultSubscription<ApiType>;
|
public signAndSend (account: AddressOrPair, partialOptions: Partial<SignerOptions>, statusCb?: Callback<ISubmittableResult>): SubmittableResultSubscription<ApiType>;
|
||||||
|
|
||||||
// signAndSend implementation for all 3 cases above
|
// signAndSend implementation for all 3 cases above
|
||||||
public signAndSend (account: AddressOrPair, optionsOrStatus?: Partial<SignerOptions> | Callback<ISubmittableResult>, optionalStatusCb?: Callback<ISubmittableResult>): SubmittableResultResult<ApiType> | SubmittableResultSubscription<ApiType> {
|
public signAndSend (account: AddressOrPair, partialOptions?: Partial<SignerOptions> | Callback<ISubmittableResult>, optionalStatusCb?: Callback<ISubmittableResult>): SubmittableResultResult<ApiType> | SubmittableResultSubscription<ApiType> {
|
||||||
const [options, statusCb] = this.#makeSignAndSendOptions(optionsOrStatus, optionalStatusCb);
|
const [options, statusCb] = makeSignAndSendOptions(partialOptions, optionalStatusCb);
|
||||||
const isSubscription = api.hasSubscriptions && (this.#ignoreStatusCb || !!statusCb);
|
const isSubscription = api.hasSubscriptions && (this.#ignoreStatusCb || !!statusCb);
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return,@typescript-eslint/no-unsafe-call
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return,@typescript-eslint/no-unsafe-call
|
||||||
@@ -161,61 +212,15 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#makeEraOptions = (options: Partial<SignerOptions>, { header, mortalLength, nonce }: { header: Header | null; mortalLength: number; nonce: Index }): SignatureOptions => {
|
#observeSign = (account: AddressOrPair, partialOptions?: Partial<SignerOptions>): Observable<number | undefined> => {
|
||||||
if (!header) {
|
|
||||||
if (isNumber(options.era)) {
|
|
||||||
// since we have no header, it is immortal, remove any option overrides
|
|
||||||
// so we only supply the genesisHash and no era to the construction
|
|
||||||
delete options.era;
|
|
||||||
delete options.blockHash;
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.#makeSignOptions(options, { nonce });
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.#makeSignOptions(options, {
|
|
||||||
blockHash: header.hash,
|
|
||||||
era: this.registry.createType('ExtrinsicEra', {
|
|
||||||
current: header.number,
|
|
||||||
period: options.era || mortalLength
|
|
||||||
}),
|
|
||||||
nonce
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
#makeSignOptions = (options: Partial<SignerOptions>, extras: { blockHash?: Hash; era?: ExtrinsicEra; nonce?: Index }): SignatureOptions => {
|
|
||||||
return {
|
|
||||||
blockHash: api.genesisHash,
|
|
||||||
genesisHash: api.genesisHash,
|
|
||||||
...options,
|
|
||||||
...extras,
|
|
||||||
runtimeVersion: api.runtimeVersion,
|
|
||||||
signedExtensions: api.registry.signedExtensions,
|
|
||||||
version: api.extrinsicType
|
|
||||||
} as SignatureOptions;
|
|
||||||
};
|
|
||||||
|
|
||||||
#makeSignAndSendOptions = (optionsOrStatus?: Partial<SignerOptions> | Callback<ISubmittableResult>, statusCb?: Callback<ISubmittableResult>): [Partial<SignerOptions>, Callback<ISubmittableResult>?] => {
|
|
||||||
let options: Partial<SignerOptions> = {};
|
|
||||||
|
|
||||||
if (isFunction(optionsOrStatus)) {
|
|
||||||
statusCb = optionsOrStatus;
|
|
||||||
} else {
|
|
||||||
options = { ...optionsOrStatus };
|
|
||||||
}
|
|
||||||
|
|
||||||
return [options, statusCb];
|
|
||||||
};
|
|
||||||
|
|
||||||
#observeSign = (account: AddressOrPair, optionsOrNonce?: Partial<SignerOptions>): Observable<number | undefined> => {
|
|
||||||
const address = isKeyringPair(account) ? account.address : account.toString();
|
const address = isKeyringPair(account) ? account.address : account.toString();
|
||||||
const options = this.#optionsOrNonce(optionsOrNonce);
|
const options = optionsOrNonce(partialOptions);
|
||||||
let updateId: number | undefined;
|
let updateId: number | undefined;
|
||||||
|
|
||||||
return api.derive.tx.signingInfo(address, options.nonce, options.era).pipe(
|
return api.derive.tx.signingInfo(address, options.nonce, options.era).pipe(
|
||||||
first(),
|
first(),
|
||||||
mergeMap(async (signingInfo): Promise<void> => {
|
mergeMap(async (signingInfo): Promise<void> => {
|
||||||
const eraOptions = this.#makeEraOptions(options, signingInfo);
|
const eraOptions = makeEraOptions(api, this.registry, options, signingInfo);
|
||||||
|
|
||||||
if (isKeyringPair(account)) {
|
if (isKeyringPair(account)) {
|
||||||
this.sign(account, eraOptions);
|
this.sign(account, eraOptions);
|
||||||
@@ -229,7 +234,9 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
|
|||||||
|
|
||||||
#observeStatus = (hash: Hash, status: ExtrinsicStatus): Observable<ISubmittableResult> => {
|
#observeStatus = (hash: Hash, status: ExtrinsicStatus): Observable<ISubmittableResult> => {
|
||||||
if (!status.isFinalized && !status.isInBlock) {
|
if (!status.isFinalized && !status.isInBlock) {
|
||||||
return of(this.#transformResult(new SubmittableResult({ status })));
|
return of(this.#transformResult(new SubmittableResult({
|
||||||
|
status
|
||||||
|
})));
|
||||||
}
|
}
|
||||||
|
|
||||||
const blockHash = status.isInBlock
|
const blockHash = status.isInBlock
|
||||||
@@ -244,7 +251,10 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
|
|||||||
}))
|
}))
|
||||||
),
|
),
|
||||||
catchError((internalError: Error) =>
|
catchError((internalError: Error) =>
|
||||||
of(this.#transformResult(new SubmittableResult({ internalError, status })))
|
of(this.#transformResult(new SubmittableResult({
|
||||||
|
internalError,
|
||||||
|
status
|
||||||
|
})))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -270,25 +280,16 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
// NOTE here we actually override nonce if it was specified (backwards compat for
|
|
||||||
// the previous signature - don't let user space break, but allow then time to upgrade)
|
|
||||||
#optionsOrNonce = (optionsOrNonce: Partial<SignerOptions> = {}): Partial<SignerOptions> => {
|
|
||||||
return isBn(optionsOrNonce) || isNumber(optionsOrNonce)
|
|
||||||
? { nonce: optionsOrNonce }
|
|
||||||
: optionsOrNonce;
|
|
||||||
};
|
|
||||||
|
|
||||||
#signViaSigner = async (address: Address | string | Uint8Array, options: SignatureOptions, header: Header | null): Promise<number> => {
|
#signViaSigner = async (address: Address | string | Uint8Array, options: SignatureOptions, header: Header | null): Promise<number> => {
|
||||||
const signer = options.signer || api.signer;
|
const signer = options.signer || api.signer;
|
||||||
|
|
||||||
assert(signer, 'No signer specified, either via api.setSigner or via sign options. You possibly need to pass through an explicit keypair for the origin so it can be used for signing.');
|
assert(signer, 'No signer specified, either via api.setSigner or via sign options. You possibly need to pass through an explicit keypair for the origin so it can be used for signing.');
|
||||||
|
|
||||||
const payload = this.registry.createType('SignerPayload', {
|
const payload = this.registry.createType('SignerPayload', objectSpread({}, options, {
|
||||||
...options,
|
|
||||||
address,
|
address,
|
||||||
blockNumber: header ? header.number : 0,
|
blockNumber: header ? header.number : 0,
|
||||||
method: this.method
|
method: this.method
|
||||||
});
|
}));
|
||||||
let result: SignerResult;
|
let result: SignerResult;
|
||||||
|
|
||||||
if (signer.signPayload) {
|
if (signer.signPayload) {
|
||||||
|
|||||||
@@ -64,4 +64,5 @@ export interface PaginationOptions<A = unknown> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
export type DecorateMethod<ApiType extends ApiTypes> = <Method extends (...args: any[]) => Observable<any>>(method: Method, options?: DecorateMethodOptions) => any;
|
export type DecorateMethod<ApiType extends ApiTypes, T = any> =
|
||||||
|
<M extends (...args: any[]) => Observable<any>>(method: M, options?: DecorateMethodOptions) => T;
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ export interface ApiInterfaceRx {
|
|||||||
runtimeMetadata: Metadata;
|
runtimeMetadata: Metadata;
|
||||||
runtimeVersion: RuntimeVersion;
|
runtimeVersion: RuntimeVersion;
|
||||||
query: QueryableStorage<'rxjs'>;
|
query: QueryableStorage<'rxjs'>;
|
||||||
queryAt: (blockHash: Uint8Array | string) => Observable<QueryableStorage<'rxjs'>>;
|
queryAt: (blockHash: Uint8Array | string, knownVersion?: RuntimeVersion) => Observable<QueryableStorage<'rxjs'>>;
|
||||||
queryMulti: QueryableStorageMulti<'rxjs'>;
|
queryMulti: QueryableStorageMulti<'rxjs'>;
|
||||||
rpc: DecoratedRpc<'rxjs', RpcInterface>;
|
rpc: DecoratedRpc<'rxjs', RpcInterface>;
|
||||||
tx: SubmittableExtrinsics<'rxjs'>;
|
tx: SubmittableExtrinsics<'rxjs'>;
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
// Copyright 2017-2021 @polkadot/api authors & contributors
|
// Copyright 2017-2021 @polkadot/api authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import { logger } from '@polkadot/util';
|
import { lazyMethod, logger, objectClear } from '@polkadot/util';
|
||||||
|
|
||||||
|
type Sections <T> = Record<string, Methods<T>>;
|
||||||
|
|
||||||
|
type Methods <T> = Record<string, T>;
|
||||||
|
|
||||||
type StringsStrings = [string[], string[]];
|
type StringsStrings = [string[], string[]];
|
||||||
|
|
||||||
@@ -34,7 +38,7 @@ function findSectionIncludes (a: string[], b: string[]): string[] {
|
|||||||
return a.filter((s) => b.includes(s));
|
return a.filter((s) => b.includes(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
function extractSections (src: Record<string, Record<string, any>>, dst: Record<string, Record<string, any>>): StringsStrings {
|
function extractSections <T> (src: Sections<T>, dst: Sections<T>): StringsStrings {
|
||||||
const srcSections = Object.keys(src);
|
const srcSections = Object.keys(src);
|
||||||
const dstSections = Object.keys(dst);
|
const dstSections = Object.keys(dst);
|
||||||
|
|
||||||
@@ -44,7 +48,7 @@ function extractSections (src: Record<string, Record<string, any>>, dst: Record<
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
function findMethodExcludes (src: Record<string, Record<string, any>>, dst: Record<string, Record<string, any>>): string[] {
|
function findMethodExcludes <T> (src: Sections<T>, dst: Sections<T>): string[] {
|
||||||
const srcSections = Object.keys(src);
|
const srcSections = Object.keys(src);
|
||||||
const dstSections = findSectionIncludes(Object.keys(dst), srcSections);
|
const dstSections = findSectionIncludes(Object.keys(dst), srcSections);
|
||||||
const excludes: string[] = [];
|
const excludes: string[] = [];
|
||||||
@@ -64,51 +68,57 @@ function findMethodExcludes (src: Record<string, Record<string, any>>, dst: Reco
|
|||||||
return excludes;
|
return excludes;
|
||||||
}
|
}
|
||||||
|
|
||||||
function extractMethods (src: Record<string, Record<string, any>>, dst: Record<string, Record<string, any>>): StringsStrings {
|
function extractMethods <T> (src: Sections<T>, dst: Sections<T>): StringsStrings {
|
||||||
return [
|
return [
|
||||||
findMethodExcludes(dst, src),
|
findMethodExcludes(dst, src),
|
||||||
findMethodExcludes(src, dst)
|
findMethodExcludes(src, dst)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
function lazySection <T> (src: Methods<T>, dst: Methods<T>): void {
|
||||||
* Takes a decorated api section (e.g. api.tx) and augment it with the details. It does not override what is
|
const creator = (m: string) => src[m];
|
||||||
* already available, but rather just adds new missing ites into the result object.
|
const methods = Object.keys(src);
|
||||||
* @internal
|
|
||||||
*/
|
|
||||||
export function augmentObject (prefix: string | null, src: Record<string, Record<string, unknown>>, dst: Record<string, Record<string, unknown>>, fromEmpty = false): Record<string, Record<string, any>> {
|
|
||||||
if (fromEmpty) {
|
|
||||||
const dstKeys = Object.keys(dst);
|
|
||||||
|
|
||||||
for (let k = 0; k < dstKeys.length; k++) {
|
for (let i = 0; i < methods.length; i++) {
|
||||||
delete dst[dstKeys[k]];
|
const method = methods[i];
|
||||||
|
|
||||||
|
// We use hasOwnproperty here to only check for the existence of the key,
|
||||||
|
// instead of reading dst[section][method] which will evaluate when already
|
||||||
|
// set as a lazy value previously
|
||||||
|
if (!Object.prototype.hasOwnProperty.call(dst, method)) {
|
||||||
|
lazyMethod(dst, method, creator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Takes a decorated api section (e.g. api.tx) and augment it with the details. It does not override what is
|
||||||
|
* already available, but rather just adds new missing items into the result object.
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
export function augmentObject <T> (prefix: string | null, src: Sections<T>, dst: Sections<T>, fromEmpty = false): Sections<T> {
|
||||||
|
fromEmpty && objectClear(dst);
|
||||||
|
|
||||||
|
// NOTE: This part is slightly problematic since it will get the
|
||||||
|
// values for at least all the sections and the names of the methods
|
||||||
|
// (Since methods won't be decorated before lazy, this _may_ be ok)
|
||||||
if (prefix && Object.keys(dst).length) {
|
if (prefix && Object.keys(dst).length) {
|
||||||
warn(prefix, 'modules', extractSections(src, dst));
|
warn(prefix, 'modules', extractSections(src, dst));
|
||||||
warn(prefix, 'calls', extractMethods(src, dst));
|
warn(prefix, 'calls', extractMethods(src, dst));
|
||||||
}
|
}
|
||||||
|
|
||||||
const srcKeys = Object.keys(src);
|
const sections = Object.keys(src);
|
||||||
|
|
||||||
for (let s = 0; s < srcKeys.length; s++) {
|
for (let i = 0; i < sections.length; i++) {
|
||||||
const section = srcKeys[s];
|
const section = sections[i];
|
||||||
|
|
||||||
|
// We don't set here with a lazy interface, we decorate based
|
||||||
|
// on the top-level structure (this bypasses adding lazy onto lazy)
|
||||||
if (!dst[section]) {
|
if (!dst[section]) {
|
||||||
dst[section] = {};
|
dst[section] = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
const methods = Object.keys(src[section]);
|
lazySection(src[section], dst[section]);
|
||||||
|
|
||||||
for (let m = 0; m < methods.length; m++) {
|
|
||||||
const method = methods[m];
|
|
||||||
|
|
||||||
// TODO When it does match, check the actual details and warn when there are differences
|
|
||||||
if (!dst[section][method]) {
|
|
||||||
dst[section][method] = src[section][method];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return dst;
|
return dst;
|
||||||
|
|||||||
@@ -4,11 +4,15 @@
|
|||||||
import type { AnyFunction } from '@polkadot/types/types';
|
import type { AnyFunction } from '@polkadot/types/types';
|
||||||
import type { ApiTypes, DecorateMethod, MethodResult } from '../types';
|
import type { ApiTypes, DecorateMethod, MethodResult } from '../types';
|
||||||
|
|
||||||
|
import { lazyDeriveSection } from '@polkadot/api-derive';
|
||||||
|
|
||||||
|
type AnyDeriveSection = Record<string, AnyFunction>;
|
||||||
|
|
||||||
// Most generic typings for `api.derive.*.*`
|
// Most generic typings for `api.derive.*.*`
|
||||||
type AnyDerive = Record<string, Record<string, AnyFunction>>;
|
type AnyDerive = Record<string, AnyDeriveSection>;
|
||||||
|
|
||||||
// Exact typings for a particular section `api.derive.section.*`
|
// Exact typings for a particular section `api.derive.section.*`
|
||||||
type DeriveSection<ApiType extends ApiTypes, Section extends Record<string, AnyFunction>> = {
|
type DeriveSection<ApiType extends ApiTypes, Section extends AnyDeriveSection> = {
|
||||||
[MethodName in keyof Section]: MethodResult<ApiType, Section[MethodName]>
|
[MethodName in keyof Section]: MethodResult<ApiType, Section[MethodName]>
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -17,37 +21,22 @@ export type DeriveAllSections<ApiType extends ApiTypes, AllSections extends AnyD
|
|||||||
[SectionName in keyof AllSections]: DeriveSection<ApiType, AllSections[SectionName]>
|
[SectionName in keyof AllSections]: DeriveSection<ApiType, AllSections[SectionName]>
|
||||||
};
|
};
|
||||||
|
|
||||||
// A technically unsafe version of Object.keys(obj) that assumes that
|
|
||||||
// obj only has known properties of T
|
|
||||||
function keys<T extends Record<string, unknown>> (obj: T): (keyof T)[] {
|
|
||||||
return Object.keys(obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is a methods decorator which keeps all type information.
|
|
||||||
*/
|
|
||||||
function decorateMethods<ApiType extends ApiTypes, Section extends Record<string, AnyFunction>> (section: Section, decorateMethod: DecorateMethod<ApiType>): DeriveSection<ApiType, Section> {
|
|
||||||
const result = {} as DeriveSection<ApiType, Section>;
|
|
||||||
const names = keys(section);
|
|
||||||
|
|
||||||
for (let k = 0; k < names.length; k++) {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
||||||
result[names[k]] = decorateMethod(section[names[k]]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a section decorator which keeps all type information.
|
* This is a section decorator which keeps all type information.
|
||||||
*/
|
*/
|
||||||
export function decorateSections<ApiType extends ApiTypes, AllSections extends AnyDerive> (allSections: AllSections, decorateMethod: DecorateMethod<ApiType>): DeriveAllSections<ApiType, AllSections> {
|
export function decorateDeriveSections<ApiType extends ApiTypes, A extends AnyDerive> (decorateMethod: DecorateMethod<ApiType>, derives: AnyDerive): DeriveAllSections<ApiType, A> {
|
||||||
const result = {} as DeriveAllSections<ApiType, AllSections>;
|
const getKeys = (s: string) =>
|
||||||
const names = keys(allSections);
|
Object.keys(derives[s]);
|
||||||
|
|
||||||
for (let k = 0; k < names.length; k++) {
|
const creator = (s: string, m: string) =>
|
||||||
result[names[k]] = decorateMethods(allSections[names[k]], decorateMethod);
|
decorateMethod(derives[s][m]) as AnyFunction;
|
||||||
|
|
||||||
|
const result: AnyDerive = {};
|
||||||
|
const names = Object.keys(derives);
|
||||||
|
|
||||||
|
for (let i = 0; i < names.length; i++) {
|
||||||
|
lazyDeriveSection(result, names[i], getKeys, creator);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result as DeriveAllSections<ApiType, A>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,24 +7,22 @@ import { l } from './logging';
|
|||||||
|
|
||||||
export function filterEvents (extHash: H256, { block: { extrinsics, header } }: SignedBlock, allEvents: EventRecord[], status: ExtrinsicStatus): EventRecord[] | undefined {
|
export function filterEvents (extHash: H256, { block: { extrinsics, header } }: SignedBlock, allEvents: EventRecord[], status: ExtrinsicStatus): EventRecord[] | undefined {
|
||||||
// extrinsics to hashes
|
// extrinsics to hashes
|
||||||
const myHash = extHash.toHex();
|
for (const [index, extrinsic] of extrinsics.entries()) {
|
||||||
const allHashes = extrinsics.map((ext): string => ext.hash.toHex());
|
if (extrinsic.hash.eq(extHash)) {
|
||||||
|
return allEvents.filter(({ phase }) =>
|
||||||
// find the index of our extrinsic in the block
|
// only ApplyExtrinsic has the extrinsic index
|
||||||
const index = allHashes.indexOf(myHash);
|
phase.isApplyExtrinsic && phase.asApplyExtrinsic.eqn(index)
|
||||||
|
);
|
||||||
// if we do get the block after finalized, it _should_ be there
|
|
||||||
if (index === -1) {
|
|
||||||
// only warn on filtering with isInBlock (finalization finalizes after)
|
|
||||||
if (status.isInBlock) {
|
|
||||||
l.warn(`block ${header.hash.toHex()}: Unable to find extrinsic ${myHash} inside ${allHashes.join(', ')}`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return allEvents.filter(({ phase }) =>
|
// if we do get the block after finalized, it _should_ be there
|
||||||
// only ApplyExtrinsic has the extrinsic index
|
// only warn on filtering with isInBlock (finalization finalizes after)
|
||||||
phase.isApplyExtrinsic && phase.asApplyExtrinsic.eqn(index)
|
if (status.isInBlock) {
|
||||||
);
|
const allHashes = extrinsics.map((ext): string => ext.hash.toHex());
|
||||||
|
|
||||||
|
l.warn(`block ${header.hash.toHex()}: Unable to find extrinsic ${extHash.toHex()} inside ${allHashes.join(', ')}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,16 +20,16 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "6.6.1",
|
"version": "6.8.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.15.4",
|
"@babel/runtime": "^7.16.0",
|
||||||
"@polkadot/rpc-provider": "6.6.1",
|
"@polkadot/rpc-provider": "6.8.1",
|
||||||
"@polkadot/types": "6.6.1",
|
"@polkadot/types": "6.8.1",
|
||||||
"@polkadot/util": "^7.7.1",
|
"@polkadot/util": "^7.8.2",
|
||||||
"rxjs": "^7.4.0"
|
"rxjs": "^7.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/keyring": "^7.7.1"
|
"@polkadot/keyring": "^7.8.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ import type { StorageKey, Vec } from '@polkadot/types';
|
|||||||
import type { Hash } from '@polkadot/types/interfaces';
|
import type { Hash } from '@polkadot/types/interfaces';
|
||||||
import type { AnyJson, Codec, DefinitionRpc, DefinitionRpcExt, DefinitionRpcSub, Registry } from '@polkadot/types/types';
|
import type { AnyJson, Codec, DefinitionRpc, DefinitionRpcExt, DefinitionRpcSub, Registry } from '@polkadot/types/types';
|
||||||
import type { Memoized } from '@polkadot/util/types';
|
import type { Memoized } from '@polkadot/util/types';
|
||||||
import type { RpcInterface, RpcInterfaceMethod } from './types';
|
import type { RpcInterfaceMethod } from './types';
|
||||||
|
|
||||||
import { Observable, publishReplay, refCount } from 'rxjs';
|
import { Observable, publishReplay, refCount } from 'rxjs';
|
||||||
|
|
||||||
import { rpcDefinitions } from '@polkadot/types';
|
import { rpcDefinitions } from '@polkadot/types';
|
||||||
import { assert, hexToU8a, isFunction, isNull, isUndefined, logger, memoize, u8aToU8a } from '@polkadot/util';
|
import { assert, hexToU8a, isFunction, isNull, isUndefined, lazyMethod, logger, memoize, objectSpread, u8aToU8a } from '@polkadot/util';
|
||||||
|
|
||||||
import { drr, refCountDelay } from './util';
|
import { drr, refCountDelay } from './util';
|
||||||
|
|
||||||
@@ -141,44 +141,37 @@ export class RpcCore {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public addUserInterfaces<Section extends keyof RpcInterface> (userRpc: Record<string, Record<string, DefinitionRpc | DefinitionRpcSub>>): void {
|
public addUserInterfaces (userRpc: Record<string, Record<string, DefinitionRpc | DefinitionRpcSub>>): void {
|
||||||
// add any extra user-defined sections
|
// add any extra user-defined sections
|
||||||
this.sections.push(...Object.keys(userRpc).filter((key) => !this.sections.includes(key)));
|
this.sections.push(...Object.keys(userRpc).filter((k) => !this.sections.includes(k)));
|
||||||
|
|
||||||
// decorate the sections with base and user methods
|
for (let s = 0; s < this.sections.length; s++) {
|
||||||
this.sections.forEach((sectionName): void => {
|
const section = this.sections[s];
|
||||||
(this as Record<string, unknown>)[sectionName as Section] ||= {};
|
const defs = objectSpread<Record<string, DefinitionRpc | DefinitionRpcSub>>({}, rpcDefinitions[section as 'babe'], userRpc[section]);
|
||||||
|
const methods = Object.keys(defs);
|
||||||
|
|
||||||
const section = (this as Record<string, unknown>)[sectionName as Section] as Record<string, unknown>;
|
for (let m = 0; m < methods.length; m++) {
|
||||||
|
const method = methods[m];
|
||||||
|
const def = defs[method];
|
||||||
|
const jsonrpc = def.endpoint || `${section}_${method}`;
|
||||||
|
|
||||||
Object
|
if (!this.mapping.has(jsonrpc)) {
|
||||||
.entries({
|
const isSubscription = !!(def as DefinitionRpcSub).pubsub;
|
||||||
...this._createInterface(sectionName, rpcDefinitions[sectionName as 'babe'] || {}),
|
|
||||||
...this._createInterface(sectionName, userRpc[sectionName] || {})
|
|
||||||
})
|
|
||||||
.forEach(([key, value]): void => {
|
|
||||||
section[key] ||= value;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private _createInterface<Section extends keyof RpcInterface> (section: string, methods: Record<string, DefinitionRpc | DefinitionRpcSub>): RpcInterface[Section] {
|
if (!(this as Record<string, unknown>)[section]) {
|
||||||
return Object
|
(this as Record<string, unknown>)[section] = {};
|
||||||
.entries(methods)
|
}
|
||||||
.filter(([method, { endpoint }]) => !this.mapping.has(endpoint || `${section}_${method}`))
|
|
||||||
.reduce((exposed, [method, { endpoint }]): RpcInterface[Section] => {
|
|
||||||
const def = methods[method];
|
|
||||||
const isSubscription = !!(def as DefinitionRpcSub).pubsub;
|
|
||||||
const jsonrpc = endpoint || `${section}_${method}`;
|
|
||||||
|
|
||||||
this.mapping.set(jsonrpc, { ...def, isSubscription, jsonrpc, method, section });
|
this.mapping.set(jsonrpc, objectSpread({}, def, { isSubscription, jsonrpc, method, section }));
|
||||||
|
|
||||||
(exposed as Record<string, unknown>)[method] = isSubscription
|
lazyMethod(this[section as 'connect'], method, () =>
|
||||||
? this._createMethodSubscribe(section, method, def as DefinitionRpcSub)
|
isSubscription
|
||||||
: this._createMethodSend(section, method, def);
|
? this._createMethodSubscribe(section, method, def as DefinitionRpcSub)
|
||||||
|
: this._createMethodSend(section, method, def)
|
||||||
return exposed;
|
);
|
||||||
}, {} as RpcInterface[Section]);
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private _memomize (creator: <T> (isScale: boolean) => (...values: unknown[]) => Observable<T>, def: DefinitionRpc): Memoized<RpcInterfaceMethod> {
|
private _memomize (creator: <T> (isScale: boolean) => (...values: unknown[]) => Observable<T>, def: DefinitionRpc): Memoized<RpcInterfaceMethod> {
|
||||||
@@ -211,7 +204,7 @@ export class RpcCore {
|
|||||||
? await this.#getBlockRegistry(u8aToU8a(blockHash))
|
? await this.#getBlockRegistry(u8aToU8a(blockHash))
|
||||||
: { registry: this.#registryDefault };
|
: { registry: this.#registryDefault };
|
||||||
const params = this._formatInputs(registry, null, def, values);
|
const params = this._formatInputs(registry, null, def, values);
|
||||||
const result = await this.provider.send<AnyJson>(rpcName, params.map((p) => p.toJSON()));
|
const result = await this.provider.send<AnyJson>(rpcName, params.map((p) => p.toJSON()), !!blockHash);
|
||||||
|
|
||||||
return this._formatResult(isScale, registry, blockHash, method, def, params, result);
|
return this._formatResult(isScale, registry, blockHash, method, def, params, result);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ describe('methodSend', (): void => {
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
|
||||||
method(new Uint8Array([2 << 2, 0x12, 0x34])).subscribe((): void => {
|
method(new Uint8Array([2 << 2, 0x12, 0x34])).subscribe((): void => {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||||
expect(provider.send).toHaveBeenCalledWith('test_blah', ['0x1234']);
|
expect(provider.send).toHaveBeenCalledWith('test_blah', ['0x1234'], false);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Auto-generated by @polkadot/dev, do not edit
|
// Auto-generated by @polkadot/dev, do not edit
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/rpc-core', version: '6.6.1' };
|
export const packageInfo = { name: '@polkadot/rpc-core', version: '6.8.1' };
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
// Copyright 2017-2021 @polkadot/rpc-core authors & contributors
|
// Copyright 2017-2021 @polkadot/rpc-core authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { Observable } from 'rxjs';
|
|
||||||
import type { RpcInterface } from '@polkadot/rpc-core/types.jsonrpc';
|
import type { RpcInterface } from '@polkadot/rpc-core/types.jsonrpc';
|
||||||
|
|
||||||
import { of } from 'rxjs';
|
|
||||||
|
|
||||||
import { MockProvider } from '@polkadot/rpc-provider/mock';
|
import { MockProvider } from '@polkadot/rpc-provider/mock';
|
||||||
import { TypeRegistry } from '@polkadot/types/create';
|
import { TypeRegistry } from '@polkadot/types/create';
|
||||||
|
|
||||||
@@ -25,21 +22,6 @@ describe('replay', (): void => {
|
|||||||
await provider.disconnect();
|
await provider.disconnect();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('subscribes via the rpc section', (done): void => {
|
|
||||||
// we don't honor types or number of params here
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
||||||
(rpc.chain as any).getBlockHash = jest.fn((): Observable<number> => of(1));
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
|
|
||||||
(rpc.chain as any).getBlockHash(123, false).subscribe((): void => {
|
|
||||||
expect(
|
|
||||||
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
||||||
rpc.chain.getBlockHash
|
|
||||||
).toHaveBeenCalledWith(123, false);
|
|
||||||
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('returns the observable value', (done): void => {
|
it('returns the observable value', (done): void => {
|
||||||
rpc.system.chain().subscribe((value: any): void => {
|
rpc.system.chain().subscribe((value: any): void => {
|
||||||
if (value) {
|
if (value) {
|
||||||
|
|||||||
@@ -4,11 +4,12 @@
|
|||||||
// FIXME, this whole file needs to move to API
|
// FIXME, this whole file needs to move to API
|
||||||
|
|
||||||
import type { Observable } from 'rxjs';
|
import type { Observable } from 'rxjs';
|
||||||
import type { AnyFunction } from '@polkadot/types/types';
|
import type { AnyFunction, DefinitionRpc } from '@polkadot/types/types';
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||||
export interface RpcInterface {}
|
export interface RpcInterface {}
|
||||||
|
|
||||||
export type AugmentedRpc<F extends AnyFunction> = F & {
|
export type AugmentedRpc<F extends AnyFunction> = F & {
|
||||||
raw: <T> (...params: Parameters<F>) => Observable<T>;
|
raw: <T> (...params: Parameters<F>) => Observable<T>;
|
||||||
|
meta: DefinitionRpc;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -20,22 +20,22 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "6.6.1",
|
"version": "6.8.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.15.4",
|
"@babel/runtime": "^7.16.0",
|
||||||
"@polkadot/types": "6.6.1",
|
"@polkadot/types": "6.8.1",
|
||||||
"@polkadot/util": "^7.7.1",
|
"@polkadot/util": "^7.8.2",
|
||||||
"@polkadot/util-crypto": "^7.7.1",
|
"@polkadot/util-crypto": "^7.8.2",
|
||||||
"@polkadot/x-fetch": "^7.7.1",
|
"@polkadot/x-fetch": "^7.8.2",
|
||||||
"@polkadot/x-global": "^7.7.1",
|
"@polkadot/x-global": "^7.8.2",
|
||||||
"@polkadot/x-ws": "^7.7.1",
|
"@polkadot/x-ws": "^7.8.2",
|
||||||
"eventemitter3": "^4.0.7"
|
"eventemitter3": "^4.0.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/keyring": "^7.7.1",
|
"@polkadot/keyring": "^7.8.2",
|
||||||
"@polkadot/types": "6.6.1",
|
"@polkadot/types": "6.8.1",
|
||||||
"mock-socket": "^9.0.6",
|
"mock-socket": "^9.0.7",
|
||||||
"nock": "^13.1.4"
|
"nock": "^13.1.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { fetch } from '@polkadot/x-fetch';
|
|||||||
|
|
||||||
import { RpcCoder } from '../coder';
|
import { RpcCoder } from '../coder';
|
||||||
import defaults from '../defaults';
|
import defaults from '../defaults';
|
||||||
|
import { LRUCache } from '../lru';
|
||||||
|
|
||||||
const ERROR_SUBSCRIBE = 'HTTP Provider does not have subscriptions, use WebSockets instead';
|
const ERROR_SUBSCRIBE = 'HTTP Provider does not have subscriptions, use WebSockets instead';
|
||||||
|
|
||||||
@@ -34,6 +35,8 @@ const l = logger('api-http');
|
|||||||
* @see [[WsProvider]]
|
* @see [[WsProvider]]
|
||||||
*/
|
*/
|
||||||
export class HttpProvider implements ProviderInterface {
|
export class HttpProvider implements ProviderInterface {
|
||||||
|
readonly #callCache = new LRUCache();
|
||||||
|
|
||||||
readonly #coder: RpcCoder;
|
readonly #coder: RpcCoder;
|
||||||
|
|
||||||
readonly #endpoint: string;
|
readonly #endpoint: string;
|
||||||
@@ -103,8 +106,24 @@ export class HttpProvider implements ProviderInterface {
|
|||||||
/**
|
/**
|
||||||
* @summary Send HTTP POST Request with Body to configured HTTP Endpoint.
|
* @summary Send HTTP POST Request with Body to configured HTTP Endpoint.
|
||||||
*/
|
*/
|
||||||
public async send <T> (method: string, params: unknown[]): Promise<T> {
|
public async send <T> (method: string, params: unknown[], isCacheable?: boolean): Promise<T> {
|
||||||
const body = this.#coder.encodeJson(method, params);
|
const body = this.#coder.encodeJson(method, params);
|
||||||
|
let resultPromise: Promise<T> | null = isCacheable
|
||||||
|
? this.#callCache.get(body) as Promise<T>
|
||||||
|
: null;
|
||||||
|
|
||||||
|
if (!resultPromise) {
|
||||||
|
resultPromise = this.#send(body);
|
||||||
|
|
||||||
|
if (isCacheable) {
|
||||||
|
this.#callCache.set(body, resultPromise);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return resultPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
async #send <T> (body: string): Promise<T> {
|
||||||
const response = await fetch(this.#endpoint, {
|
const response = await fetch(this.#endpoint, {
|
||||||
body,
|
body,
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
// Copyright 2017-2021 @polkadot/rpc-provider authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import { LRUCache } from './lru';
|
||||||
|
|
||||||
|
describe('LRUCache', (): void => {
|
||||||
|
it('allows getting of items below capacity', (): void => {
|
||||||
|
const keys = ['1', '2', '3', '4'];
|
||||||
|
const lru = new LRUCache(4);
|
||||||
|
|
||||||
|
keys.forEach((k) => lru.set(k, `${k}${k}${k}`));
|
||||||
|
|
||||||
|
expect(lru.keys().join(', ')).toEqual(keys.reverse().join(', '));
|
||||||
|
expect(lru.length === lru.lengthData && lru.length === lru.lengthRefs).toBe(true);
|
||||||
|
|
||||||
|
keys.forEach((k) => expect(lru.get(k)).toEqual(`${k}${k}${k}`));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('drops items when at capacity', (): void => {
|
||||||
|
const keys = ['1', '2', '3', '4', '5', '6'];
|
||||||
|
const lru = new LRUCache(4);
|
||||||
|
|
||||||
|
keys.forEach((k) => lru.set(k, `${k}${k}${k}`));
|
||||||
|
|
||||||
|
expect(lru.keys().join(', ')).toEqual(keys.slice(2).reverse().join(', '));
|
||||||
|
expect(lru.length === lru.lengthData && lru.length === lru.lengthRefs).toBe(true);
|
||||||
|
|
||||||
|
keys.slice(2).forEach((k) => expect(lru.get(k)).toEqual(`${k}${k}${k}`));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('adjusts the order as they are used', (): void => {
|
||||||
|
const keys = ['1', '2', '3', '4', '5'];
|
||||||
|
const lru = new LRUCache(4);
|
||||||
|
|
||||||
|
keys.forEach((k) => lru.set(k, `${k}${k}${k}`));
|
||||||
|
|
||||||
|
expect(lru.entries()).toEqual([['5', '555'], ['4', '444'], ['3', '333'], ['2', '222']]);
|
||||||
|
expect(lru.length === lru.lengthData && lru.length === lru.lengthRefs).toBe(true);
|
||||||
|
|
||||||
|
lru.get('3');
|
||||||
|
|
||||||
|
expect(lru.entries()).toEqual([['3', '333'], ['5', '555'], ['4', '444'], ['2', '222']]);
|
||||||
|
expect(lru.length === lru.lengthData && lru.length === lru.lengthRefs).toBe(true);
|
||||||
|
|
||||||
|
lru.set('4', '4433');
|
||||||
|
|
||||||
|
expect(lru.entries()).toEqual([['4', '4433'], ['3', '333'], ['5', '555'], ['2', '222']]);
|
||||||
|
expect(lru.length === lru.lengthData && lru.length === lru.lengthRefs).toBe(true);
|
||||||
|
|
||||||
|
lru.set('6', '666');
|
||||||
|
|
||||||
|
expect(lru.entries()).toEqual([['6', '666'], ['4', '4433'], ['3', '333'], ['5', '555']]);
|
||||||
|
expect(lru.length === lru.lengthData && lru.length === lru.lengthRefs).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
// Copyright 2017-2021 @polkadot/rpc-provider authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
const DEFAULT_CAPACITY = 2048;
|
||||||
|
|
||||||
|
class LRUNode {
|
||||||
|
public readonly key: string;
|
||||||
|
|
||||||
|
public next: LRUNode;
|
||||||
|
public prev: LRUNode;
|
||||||
|
|
||||||
|
constructor (key: string) {
|
||||||
|
this.key = key;
|
||||||
|
this.next = this.prev = this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://en.wikipedia.org/wiki/Cache_replacement_policies#LRU
|
||||||
|
export class LRUCache {
|
||||||
|
readonly capacity: number;
|
||||||
|
readonly #data: Map<string, unknown> = new Map();
|
||||||
|
readonly #refs: Map<string, LRUNode> = new Map();
|
||||||
|
|
||||||
|
#length = 0;
|
||||||
|
#head: LRUNode;
|
||||||
|
#tail: LRUNode;
|
||||||
|
|
||||||
|
constructor (capacity = DEFAULT_CAPACITY) {
|
||||||
|
this.capacity = capacity;
|
||||||
|
this.#head = this.#tail = new LRUNode('<empty>');
|
||||||
|
}
|
||||||
|
|
||||||
|
get length (): number {
|
||||||
|
return this.#length;
|
||||||
|
}
|
||||||
|
|
||||||
|
get lengthData (): number {
|
||||||
|
return this.#data.size;
|
||||||
|
}
|
||||||
|
|
||||||
|
get lengthRefs (): number {
|
||||||
|
return this.#refs.size;
|
||||||
|
}
|
||||||
|
|
||||||
|
entries (): [string, unknown][] {
|
||||||
|
const keys = this.keys();
|
||||||
|
const entries = new Array<[string, unknown]>(keys.length);
|
||||||
|
|
||||||
|
for (let i = 0; i < keys.length; i++) {
|
||||||
|
const key = keys[i];
|
||||||
|
|
||||||
|
entries[i] = [key, this.#data.get(key)];
|
||||||
|
}
|
||||||
|
|
||||||
|
return entries;
|
||||||
|
}
|
||||||
|
|
||||||
|
keys (): string[] {
|
||||||
|
const keys: string[] = [];
|
||||||
|
|
||||||
|
if (this.#length) {
|
||||||
|
let curr = this.#head;
|
||||||
|
|
||||||
|
while (curr !== this.#tail) {
|
||||||
|
keys.push(curr.key);
|
||||||
|
curr = curr.next;
|
||||||
|
}
|
||||||
|
|
||||||
|
keys.push(curr.key);
|
||||||
|
}
|
||||||
|
|
||||||
|
return keys;
|
||||||
|
}
|
||||||
|
|
||||||
|
get <T> (key: string): T | null {
|
||||||
|
const data = this.#data.get(key);
|
||||||
|
|
||||||
|
if (data) {
|
||||||
|
this.#toHead(key);
|
||||||
|
|
||||||
|
return data as T;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
set <T> (key: string, value: T): void {
|
||||||
|
if (this.#data.has(key)) {
|
||||||
|
this.#toHead(key);
|
||||||
|
} else {
|
||||||
|
const node = new LRUNode(key);
|
||||||
|
|
||||||
|
this.#refs.set(node.key, node);
|
||||||
|
|
||||||
|
if (this.length === 0) {
|
||||||
|
this.#head = this.#tail = node;
|
||||||
|
} else {
|
||||||
|
this.#head.prev = node;
|
||||||
|
node.next = this.#head;
|
||||||
|
this.#head = node;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.#length === this.capacity) {
|
||||||
|
this.#data.delete(this.#tail.key);
|
||||||
|
this.#refs.delete(this.#tail.key);
|
||||||
|
|
||||||
|
this.#tail = this.#tail.prev;
|
||||||
|
} else {
|
||||||
|
this.#length += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.#data.set(key, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
#toHead (key: string): void {
|
||||||
|
const ref = this.#refs.get(key);
|
||||||
|
|
||||||
|
if (ref && ref !== this.#head) {
|
||||||
|
ref.prev.next = ref.next;
|
||||||
|
ref.next.prev = ref.prev;
|
||||||
|
ref.next = this.#head;
|
||||||
|
|
||||||
|
this.#head.prev = ref;
|
||||||
|
this.#head = ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Auto-generated by @polkadot/dev, do not edit
|
// Auto-generated by @polkadot/dev, do not edit
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/rpc-provider', version: '6.6.1' };
|
export const packageInfo = { name: '@polkadot/rpc-provider', version: '6.8.1' };
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export interface ProviderInterface {
|
|||||||
connect (): Promise<void>;
|
connect (): Promise<void>;
|
||||||
disconnect (): Promise<void>;
|
disconnect (): Promise<void>;
|
||||||
on (type: ProviderInterfaceEmitted, sub: ProviderInterfaceEmitCb): () => void;
|
on (type: ProviderInterfaceEmitted, sub: ProviderInterfaceEmitCb): () => void;
|
||||||
send <T = any> (method: string, params: unknown[]): Promise<T>;
|
send <T = any> (method: string, params: unknown[], isCacheable?: boolean): Promise<T>;
|
||||||
subscribe (type: string, method: string, params: unknown[], cb: ProviderInterfaceCallback): Promise<number | string>;
|
subscribe (type: string, method: string, params: unknown[], cb: ProviderInterfaceCallback): Promise<number | string>;
|
||||||
unsubscribe (type: string, method: string, id: number | string): Promise<boolean>;
|
unsubscribe (type: string, method: string, id: number | string): Promise<boolean>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,12 +7,13 @@ import type { JsonRpcResponse, ProviderInterface, ProviderInterfaceCallback, Pro
|
|||||||
|
|
||||||
import EventEmitter from 'eventemitter3';
|
import EventEmitter from 'eventemitter3';
|
||||||
|
|
||||||
import { assert, isChildClass, isNull, isUndefined, logger } from '@polkadot/util';
|
import { assert, isChildClass, isNull, isUndefined, logger, objectSpread } from '@polkadot/util';
|
||||||
import { xglobal } from '@polkadot/x-global';
|
import { xglobal } from '@polkadot/x-global';
|
||||||
import { WebSocket } from '@polkadot/x-ws';
|
import { WebSocket } from '@polkadot/x-ws';
|
||||||
|
|
||||||
import { RpcCoder } from '../coder';
|
import { RpcCoder } from '../coder';
|
||||||
import defaults from '../defaults';
|
import defaults from '../defaults';
|
||||||
|
import { LRUCache } from '../lru';
|
||||||
import { getWSErrorString } from './errors';
|
import { getWSErrorString } from './errors';
|
||||||
|
|
||||||
interface SubscriptionHandler {
|
interface SubscriptionHandler {
|
||||||
@@ -75,6 +76,8 @@ function eraseRecord<T> (record: Record<string, T>, cb?: (item: T) => void): voi
|
|||||||
* @see [[HttpProvider]]
|
* @see [[HttpProvider]]
|
||||||
*/
|
*/
|
||||||
export class WsProvider implements ProviderInterface {
|
export class WsProvider implements ProviderInterface {
|
||||||
|
readonly #callCache = new LRUCache();
|
||||||
|
|
||||||
readonly #coder: RpcCoder;
|
readonly #coder: RpcCoder;
|
||||||
|
|
||||||
readonly #endpoints: string[];
|
readonly #endpoints: string[];
|
||||||
@@ -260,12 +263,28 @@ export class WsProvider implements ProviderInterface {
|
|||||||
* @param params Encoded parameters as applicable for the method
|
* @param params Encoded parameters as applicable for the method
|
||||||
* @param subscription Subscription details (internally used)
|
* @param subscription Subscription details (internally used)
|
||||||
*/
|
*/
|
||||||
public send <T = any> (method: string, params: unknown[], subscription?: SubscriptionHandler): Promise<T> {
|
public send <T = any> (method: string, params: unknown[], isCacheable?: boolean, subscription?: SubscriptionHandler): Promise<T> {
|
||||||
|
const body = this.#coder.encodeJson(method, params);
|
||||||
|
let resultPromise: Promise<T> | null = isCacheable
|
||||||
|
? this.#callCache.get(body) as Promise<T>
|
||||||
|
: null;
|
||||||
|
|
||||||
|
if (!resultPromise) {
|
||||||
|
resultPromise = this.#send(body, method, params, subscription);
|
||||||
|
|
||||||
|
if (isCacheable) {
|
||||||
|
this.#callCache.set(body, resultPromise);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return resultPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
async #send <T> (json: string, method: string, params: unknown[], subscription?: SubscriptionHandler): Promise<T> {
|
||||||
return new Promise<T>((resolve, reject): void => {
|
return new Promise<T>((resolve, reject): void => {
|
||||||
try {
|
try {
|
||||||
assert(this.isConnected && !isNull(this.#websocket), 'WebSocket is not connected');
|
assert(this.isConnected && !isNull(this.#websocket), 'WebSocket is not connected');
|
||||||
|
|
||||||
const json = this.#coder.encodeJson(method, params);
|
|
||||||
const id = this.#coder.getId();
|
const id = this.#coder.getId();
|
||||||
|
|
||||||
const callback = (error?: Error | null, result?: T): void => {
|
const callback = (error?: Error | null, result?: T): void => {
|
||||||
@@ -309,7 +328,7 @@ export class WsProvider implements ProviderInterface {
|
|||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
public subscribe (type: string, method: string, params: unknown[], callback: ProviderInterfaceCallback): Promise<number | string> {
|
public subscribe (type: string, method: string, params: unknown[], callback: ProviderInterfaceCallback): Promise<number | string> {
|
||||||
return this.send<number | string>(method, params, { callback, type });
|
return this.send<number | string>(method, params, false, { callback, type });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -410,11 +429,10 @@ export class WsProvider implements ProviderInterface {
|
|||||||
if (subscription) {
|
if (subscription) {
|
||||||
const subId = `${subscription.type}::${result}`;
|
const subId = `${subscription.type}::${result}`;
|
||||||
|
|
||||||
this.#subscriptions[subId] = {
|
this.#subscriptions[subId] = objectSpread({}, subscription, {
|
||||||
...subscription,
|
|
||||||
method,
|
method,
|
||||||
params
|
params
|
||||||
};
|
});
|
||||||
|
|
||||||
// if we have a result waiting for this subscription already
|
// if we have a result waiting for this subscription already
|
||||||
if (this.#waitingForId[subId]) {
|
if (this.#waitingForId[subId]) {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "6.6.1",
|
"version": "6.8.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.cjs",
|
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.cjs",
|
||||||
@@ -30,20 +30,20 @@
|
|||||||
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.cjs"
|
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.cjs"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.15.8",
|
"@babel/core": "^7.16.0",
|
||||||
"@babel/register": "^7.15.3",
|
"@babel/register": "^7.16.0",
|
||||||
"@babel/runtime": "^7.15.4",
|
"@babel/runtime": "^7.16.0",
|
||||||
"@polkadot/api": "6.6.1",
|
"@polkadot/api": "6.8.1",
|
||||||
"@polkadot/rpc-provider": "6.6.1",
|
"@polkadot/rpc-provider": "6.8.1",
|
||||||
"@polkadot/types": "6.6.1",
|
"@polkadot/types": "6.8.1",
|
||||||
"@polkadot/types-support": "6.6.1",
|
"@polkadot/types-support": "6.8.1",
|
||||||
"@polkadot/util": "^7.7.1",
|
"@polkadot/util": "^7.8.2",
|
||||||
"handlebars": "^4.7.7",
|
"handlebars": "^4.7.7",
|
||||||
"websocket": "^1.0.34",
|
"websocket": "^1.0.34",
|
||||||
"yargs": "^17.2.1"
|
"yargs": "^17.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/websocket": "^1.0.4",
|
"@types/websocket": "^1.0.4",
|
||||||
"@types/yargs": "^17.0.4"
|
"@types/yargs": "^17.0.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
// Copyright 2017-2021 @polkadot/typegen authors & contributors
|
// Copyright 2017-2021 @polkadot/typegen authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { PortableRegistry, PortableType, SiLookupTypeId, SiPath, SiTypeParameter } from '@polkadot/types/interfaces';
|
import type { PortableType, SiLookupTypeId, SiPath, SiTypeParameter } from '@polkadot/types/interfaces';
|
||||||
|
import type { PortableRegistry } from '@polkadot/types/metadata';
|
||||||
import type { TypeDef } from '@polkadot/types/types';
|
import type { TypeDef } from '@polkadot/types/types';
|
||||||
|
|
||||||
import Handlebars from 'handlebars';
|
import Handlebars from 'handlebars';
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
// Copyright 2017-2021 @polkadot/typegen authors & contributors
|
// Copyright 2017-2021 @polkadot/typegen authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { PortableRegistry, StorageEntryMetadataLatest } from '@polkadot/types/interfaces/metadata';
|
import type { StorageEntryMetadataLatest } from '@polkadot/types/interfaces';
|
||||||
import type { Metadata } from '@polkadot/types/metadata/Metadata';
|
import type { Metadata, PortableRegistry } from '@polkadot/types/metadata';
|
||||||
import type { Registry } from '@polkadot/types/types';
|
import type { Registry } from '@polkadot/types/types';
|
||||||
import type { ExtraTypes } from './types';
|
import type { ExtraTypes } from './types';
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
// Copyright 2017-2021 @polkadot/typegen authors & contributors
|
// Copyright 2017-2021 @polkadot/typegen authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { MetadataLatest, PortableRegistry, SiLookupTypeId } from '@polkadot/types/interfaces';
|
import type { MetadataLatest, SiLookupTypeId } from '@polkadot/types/interfaces';
|
||||||
|
import type { PortableRegistry } from '@polkadot/types/metadata';
|
||||||
import type { Codec, DefinitionRpcParam } from '@polkadot/types/types';
|
import type { Codec, DefinitionRpcParam } from '@polkadot/types/types';
|
||||||
|
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Auto-generated by @polkadot/dev, do not edit
|
// Auto-generated by @polkadot/dev, do not edit
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/typegen', version: '6.6.1' };
|
export const packageInfo = { name: '@polkadot/typegen', version: '6.8.1' };
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export function setImports (allDefs: Record<string, ModuleTypes>, imports: TypeI
|
|||||||
// do nothing
|
// do nothing
|
||||||
} else if (['AnyNumber', 'CallFunction', 'Codec', 'IExtrinsic', 'ITuple'].includes(type)) {
|
} else if (['AnyNumber', 'CallFunction', 'Codec', 'IExtrinsic', 'ITuple'].includes(type)) {
|
||||||
typesTypes[type] = true;
|
typesTypes[type] = true;
|
||||||
} else if (type === 'Metadata') {
|
} else if (['Metadata', 'PortableRegistry'].includes(type)) {
|
||||||
metadataTypes[type] = true;
|
metadataTypes[type] = true;
|
||||||
} else if ((codecClasses as Record<string, unknown>)[type]) {
|
} else if ((codecClasses as Record<string, unknown>)[type]) {
|
||||||
codecTypes[type] = true;
|
codecTypes[type] = true;
|
||||||
|
|||||||
@@ -20,12 +20,12 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "6.6.1",
|
"version": "6.8.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.15.4",
|
"@babel/runtime": "^7.16.0",
|
||||||
"@polkadot/networks": "^7.7.1",
|
"@polkadot/networks": "^7.8.2",
|
||||||
"@polkadot/types": "6.6.1",
|
"@polkadot/types": "6.8.1",
|
||||||
"@polkadot/util": "^7.7.1"
|
"@polkadot/util": "^7.8.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import type { Hash } from '@polkadot/types/interfaces';
|
|||||||
import type { ChainUpgradeVersion, CodecHasher, DefinitionRpc, DefinitionRpcSub, OverrideModuleType, OverrideVersionedType, Registry, RegistryTypes } from '@polkadot/types/types';
|
import type { ChainUpgradeVersion, CodecHasher, DefinitionRpc, DefinitionRpcSub, OverrideModuleType, OverrideVersionedType, Registry, RegistryTypes } from '@polkadot/types/types';
|
||||||
import type { BN } from '@polkadot/util';
|
import type { BN } from '@polkadot/util';
|
||||||
|
|
||||||
import { bnToBn, isNull, isUndefined } from '@polkadot/util';
|
import { bnToBn, isNull, isUndefined, objectSpread } from '@polkadot/util';
|
||||||
|
|
||||||
import typesChain from './chain';
|
import typesChain from './chain';
|
||||||
import typesModules from './modules';
|
import typesModules from './modules';
|
||||||
@@ -26,20 +26,16 @@ function filterVersions (versions: OverrideVersionedType[] = [], specVersion: nu
|
|||||||
(isUndefined(min) || isNull(min) || specVersion >= min) &&
|
(isUndefined(min) || isNull(min) || specVersion >= min) &&
|
||||||
(isUndefined(max) || isNull(max) || specVersion <= max)
|
(isUndefined(max) || isNull(max) || specVersion <= max)
|
||||||
)
|
)
|
||||||
.reduce((result: RegistryTypes, { types }): RegistryTypes => ({
|
.reduce((result: RegistryTypes, { types }): RegistryTypes =>
|
||||||
...result,
|
objectSpread(result, types), {}
|
||||||
...types
|
);
|
||||||
}), {});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Get types for specific modules (metadata override)
|
* @description Get types for specific modules (metadata override)
|
||||||
*/
|
*/
|
||||||
export function getModuleTypes ({ knownTypes }: Registry, section: string): OverrideModuleType {
|
export function getModuleTypes ({ knownTypes }: Registry, section: string): OverrideModuleType {
|
||||||
return {
|
return objectSpread({}, typesModules[section], knownTypes.typesAlias?.[section]);
|
||||||
...(typesModules[section] || {}),
|
|
||||||
...(knownTypes.typesAlias?.[section] || {})
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -49,10 +45,10 @@ export function getSpecExtensions ({ knownTypes }: Registry, chainName: Text | s
|
|||||||
const _chainName = chainName.toString();
|
const _chainName = chainName.toString();
|
||||||
const _specName = specName.toString();
|
const _specName = specName.toString();
|
||||||
|
|
||||||
return {
|
return objectSpread({},
|
||||||
...(knownTypes.typesBundle?.spec?.[_specName]?.signedExtensions || {}),
|
knownTypes.typesBundle?.spec?.[_specName]?.signedExtensions,
|
||||||
...(knownTypes.typesBundle?.chain?.[_chainName]?.signedExtensions || {})
|
knownTypes.typesBundle?.chain?.[_chainName]?.signedExtensions
|
||||||
};
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -67,15 +63,15 @@ export function getSpecTypes ({ knownTypes }: Registry, chainName: Text | string
|
|||||||
// - spec then chain
|
// - spec then chain
|
||||||
// - typesBundle takes higher precedence
|
// - typesBundle takes higher precedence
|
||||||
// - types is the final catch-all override
|
// - types is the final catch-all override
|
||||||
return {
|
return objectSpread({},
|
||||||
...filterVersions(typesSpec[_specName], _specVersion),
|
filterVersions(typesSpec[_specName], _specVersion),
|
||||||
...filterVersions(typesChain[_chainName], _specVersion),
|
filterVersions(typesChain[_chainName], _specVersion),
|
||||||
...filterVersions(knownTypes.typesBundle?.spec?.[_specName]?.types, _specVersion),
|
filterVersions(knownTypes.typesBundle?.spec?.[_specName]?.types, _specVersion),
|
||||||
...filterVersions(knownTypes.typesBundle?.chain?.[_chainName]?.types, _specVersion),
|
filterVersions(knownTypes.typesBundle?.chain?.[_chainName]?.types, _specVersion),
|
||||||
...(knownTypes.typesSpec?.[_specName] || {}),
|
knownTypes.typesSpec?.[_specName],
|
||||||
...(knownTypes.typesChain?.[_chainName] || {}),
|
knownTypes.typesChain?.[_chainName],
|
||||||
...(knownTypes.types || {})
|
knownTypes.types
|
||||||
};
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getSpecHasher ({ knownTypes }: Registry, chainName: Text | string, specName: Text | string): CodecHasher | null {
|
export function getSpecHasher ({ knownTypes }: Registry, chainName: Text | string, specName: Text | string): CodecHasher | null {
|
||||||
@@ -92,10 +88,10 @@ export function getSpecRpc ({ knownTypes }: Registry, chainName: Text | string,
|
|||||||
const _chainName = chainName.toString();
|
const _chainName = chainName.toString();
|
||||||
const _specName = specName.toString();
|
const _specName = specName.toString();
|
||||||
|
|
||||||
return {
|
return objectSpread({},
|
||||||
...(knownTypes.typesBundle?.spec?.[_specName]?.rpc || {}),
|
knownTypes.typesBundle?.spec?.[_specName]?.rpc,
|
||||||
...(knownTypes.typesBundle?.chain?.[_chainName]?.rpc || {})
|
knownTypes.typesBundle?.chain?.[_chainName]?.rpc
|
||||||
};
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -106,11 +102,11 @@ export function getSpecAlias ({ knownTypes }: Registry, chainName: Text | string
|
|||||||
const _specName = specName.toString();
|
const _specName = specName.toString();
|
||||||
|
|
||||||
// as per versions, first spec, then chain then finally non-versioned
|
// as per versions, first spec, then chain then finally non-versioned
|
||||||
return {
|
return objectSpread({},
|
||||||
...(knownTypes.typesBundle?.spec?.[_specName]?.alias || {}),
|
knownTypes.typesBundle?.spec?.[_specName]?.alias,
|
||||||
...(knownTypes.typesBundle?.chain?.[_chainName]?.alias || {}),
|
knownTypes.typesBundle?.chain?.[_chainName]?.alias,
|
||||||
...(knownTypes.typesAlias || {})
|
knownTypes.typesAlias
|
||||||
};
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Auto-generated by @polkadot/dev, do not edit
|
// Auto-generated by @polkadot/dev, do not edit
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/types-known', version: '6.6.1' };
|
export const packageInfo = { name: '@polkadot/types-known', version: '6.8.1' };
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
import type { OverrideVersionedType } from '@polkadot/types/types';
|
import type { OverrideVersionedType } from '@polkadot/types/types';
|
||||||
|
|
||||||
|
import { objectSpread } from '@polkadot/util';
|
||||||
|
|
||||||
const sharedTypes = {
|
const sharedTypes = {
|
||||||
// Anchor
|
// Anchor
|
||||||
AnchorData: {
|
AnchorData: {
|
||||||
@@ -79,20 +81,18 @@ const sharedTypes = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const standaloneTypes = {
|
const standaloneTypes = objectSpread({}, sharedTypes, {
|
||||||
...sharedTypes,
|
|
||||||
AccountInfo: 'AccountInfoWithRefCount',
|
AccountInfo: 'AccountInfoWithRefCount',
|
||||||
Address: 'LookupSource',
|
Address: 'LookupSource',
|
||||||
LookupSource: 'IndicesLookupSource',
|
LookupSource: 'IndicesLookupSource',
|
||||||
Multiplier: 'Fixed64',
|
Multiplier: 'Fixed64',
|
||||||
RefCount: 'RefCountTo259'
|
RefCount: 'RefCountTo259'
|
||||||
};
|
});
|
||||||
|
|
||||||
const versioned: OverrideVersionedType[] = [
|
const versioned: OverrideVersionedType[] = [
|
||||||
{
|
{
|
||||||
minmax: [240, 243],
|
minmax: [240, 243],
|
||||||
types: {
|
types: objectSpread({}, standaloneTypes, {
|
||||||
...standaloneTypes,
|
|
||||||
ProxyType: {
|
ProxyType: {
|
||||||
_enum: [
|
_enum: [
|
||||||
'Any',
|
'Any',
|
||||||
@@ -102,19 +102,15 @@ const versioned: OverrideVersionedType[] = [
|
|||||||
'Vesting'
|
'Vesting'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [244, 999],
|
minmax: [244, 999],
|
||||||
types: {
|
types: objectSpread({}, standaloneTypes)
|
||||||
...standaloneTypes
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [1000, undefined],
|
minmax: [1000, undefined],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes)
|
||||||
...sharedTypes
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
import type { OverrideVersionedType } from '@polkadot/types/types';
|
import type { OverrideVersionedType } from '@polkadot/types/types';
|
||||||
|
|
||||||
|
import { objectSpread } from '@polkadot/util';
|
||||||
|
|
||||||
import { mapXcmTypes } from '../xcm';
|
import { mapXcmTypes } from '../xcm';
|
||||||
|
|
||||||
const sharedTypes = {
|
const sharedTypes = {
|
||||||
@@ -40,8 +42,7 @@ const versioned: OverrideVersionedType[] = [
|
|||||||
{
|
{
|
||||||
// 1020 is first CC3
|
// 1020 is first CC3
|
||||||
minmax: [1019, 1031],
|
minmax: [1019, 1031],
|
||||||
types: {
|
types: objectSpread({}, addrIndicesTypes, {
|
||||||
...addrIndicesTypes,
|
|
||||||
BalanceLock: 'BalanceLockTo212',
|
BalanceLock: 'BalanceLockTo212',
|
||||||
CompactAssignments: 'CompactAssignmentsTo257',
|
CompactAssignments: 'CompactAssignmentsTo257',
|
||||||
DispatchError: 'DispatchErrorTo198',
|
DispatchError: 'DispatchErrorTo198',
|
||||||
@@ -57,12 +58,11 @@ const versioned: OverrideVersionedType[] = [
|
|||||||
StakingLedger: 'StakingLedgerTo223',
|
StakingLedger: 'StakingLedgerTo223',
|
||||||
Votes: 'VotesTo230',
|
Votes: 'VotesTo230',
|
||||||
Weight: 'u32'
|
Weight: 'u32'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [1032, 1042],
|
minmax: [1032, 1042],
|
||||||
types: {
|
types: objectSpread({}, addrIndicesTypes, {
|
||||||
...addrIndicesTypes,
|
|
||||||
BalanceLock: 'BalanceLockTo212',
|
BalanceLock: 'BalanceLockTo212',
|
||||||
CompactAssignments: 'CompactAssignmentsTo257',
|
CompactAssignments: 'CompactAssignmentsTo257',
|
||||||
DispatchInfo: 'DispatchInfoTo244',
|
DispatchInfo: 'DispatchInfoTo244',
|
||||||
@@ -76,13 +76,12 @@ const versioned: OverrideVersionedType[] = [
|
|||||||
StakingLedger: 'StakingLedgerTo223',
|
StakingLedger: 'StakingLedgerTo223',
|
||||||
Votes: 'VotesTo230',
|
Votes: 'VotesTo230',
|
||||||
Weight: 'u32'
|
Weight: 'u32'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// actual at 1045 (1043-1044 is dev)
|
// actual at 1045 (1043-1044 is dev)
|
||||||
minmax: [1043, 1045],
|
minmax: [1043, 1045],
|
||||||
types: {
|
types: objectSpread({}, addrIndicesTypes, {
|
||||||
...addrIndicesTypes,
|
|
||||||
BalanceLock: 'BalanceLockTo212',
|
BalanceLock: 'BalanceLockTo212',
|
||||||
CompactAssignments: 'CompactAssignmentsTo257',
|
CompactAssignments: 'CompactAssignmentsTo257',
|
||||||
DispatchInfo: 'DispatchInfoTo244',
|
DispatchInfo: 'DispatchInfoTo244',
|
||||||
@@ -95,14 +94,11 @@ const versioned: OverrideVersionedType[] = [
|
|||||||
StakingLedger: 'StakingLedgerTo223',
|
StakingLedger: 'StakingLedgerTo223',
|
||||||
Votes: 'VotesTo230',
|
Votes: 'VotesTo230',
|
||||||
Weight: 'u32'
|
Weight: 'u32'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [1046, 1054],
|
minmax: [1046, 1054],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
|
||||||
// Indices optional, not in transaction
|
|
||||||
...sharedTypes,
|
|
||||||
...addrAccountIdTypes,
|
|
||||||
CompactAssignments: 'CompactAssignmentsTo257',
|
CompactAssignments: 'CompactAssignmentsTo257',
|
||||||
DispatchInfo: 'DispatchInfoTo244',
|
DispatchInfo: 'DispatchInfoTo244',
|
||||||
Heartbeat: 'HeartbeatTo244',
|
Heartbeat: 'HeartbeatTo244',
|
||||||
@@ -112,13 +108,11 @@ const versioned: OverrideVersionedType[] = [
|
|||||||
ReferendumInfo: 'ReferendumInfoTo239',
|
ReferendumInfo: 'ReferendumInfoTo239',
|
||||||
StakingLedger: 'StakingLedgerTo240',
|
StakingLedger: 'StakingLedgerTo240',
|
||||||
Weight: 'u32'
|
Weight: 'u32'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [1055, 1056],
|
minmax: [1055, 1056],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
|
||||||
...sharedTypes,
|
|
||||||
...addrAccountIdTypes,
|
|
||||||
CompactAssignments: 'CompactAssignmentsTo257',
|
CompactAssignments: 'CompactAssignmentsTo257',
|
||||||
DispatchInfo: 'DispatchInfoTo244',
|
DispatchInfo: 'DispatchInfoTo244',
|
||||||
Heartbeat: 'HeartbeatTo244',
|
Heartbeat: 'HeartbeatTo244',
|
||||||
@@ -127,92 +121,71 @@ const versioned: OverrideVersionedType[] = [
|
|||||||
RefCount: 'RefCountTo259',
|
RefCount: 'RefCountTo259',
|
||||||
StakingLedger: 'StakingLedgerTo240',
|
StakingLedger: 'StakingLedgerTo240',
|
||||||
Weight: 'u32'
|
Weight: 'u32'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [1057, 1061],
|
minmax: [1057, 1061],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
|
||||||
...sharedTypes,
|
|
||||||
...addrAccountIdTypes,
|
|
||||||
CompactAssignments: 'CompactAssignmentsTo257',
|
CompactAssignments: 'CompactAssignmentsTo257',
|
||||||
DispatchInfo: 'DispatchInfoTo244',
|
DispatchInfo: 'DispatchInfoTo244',
|
||||||
Heartbeat: 'HeartbeatTo244',
|
Heartbeat: 'HeartbeatTo244',
|
||||||
OpenTip: 'OpenTipTo225',
|
OpenTip: 'OpenTipTo225',
|
||||||
RefCount: 'RefCountTo259'
|
RefCount: 'RefCountTo259'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [1062, 2012],
|
minmax: [1062, 2012],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
|
||||||
...sharedTypes,
|
|
||||||
...addrAccountIdTypes,
|
|
||||||
CompactAssignments: 'CompactAssignmentsTo257',
|
CompactAssignments: 'CompactAssignmentsTo257',
|
||||||
OpenTip: 'OpenTipTo225',
|
OpenTip: 'OpenTipTo225',
|
||||||
RefCount: 'RefCountTo259'
|
RefCount: 'RefCountTo259'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [2013, 2022],
|
minmax: [2013, 2022],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
|
||||||
...sharedTypes,
|
|
||||||
...addrAccountIdTypes,
|
|
||||||
CompactAssignments: 'CompactAssignmentsTo257',
|
CompactAssignments: 'CompactAssignmentsTo257',
|
||||||
RefCount: 'RefCountTo259'
|
RefCount: 'RefCountTo259'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [2023, 2024],
|
minmax: [2023, 2024],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
|
||||||
...sharedTypes,
|
|
||||||
...addrAccountIdTypes,
|
|
||||||
RefCount: 'RefCountTo259'
|
RefCount: 'RefCountTo259'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [2025, 2027],
|
minmax: [2025, 2027],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, addrAccountIdTypes)
|
||||||
...sharedTypes,
|
|
||||||
...addrAccountIdTypes
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [2028, 2029],
|
minmax: [2028, 2029],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, {
|
||||||
...sharedTypes,
|
|
||||||
AccountInfo: 'AccountInfoWithDualRefCount',
|
AccountInfo: 'AccountInfoWithDualRefCount',
|
||||||
CompactAssignments: 'CompactAssignmentsWith16',
|
CompactAssignments: 'CompactAssignmentsWith16',
|
||||||
RawSolution: 'RawSolutionWith16'
|
RawSolution: 'RawSolutionWith16'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [2030, 9000],
|
minmax: [2030, 9000],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, {
|
||||||
...sharedTypes,
|
|
||||||
CompactAssignments: 'CompactAssignmentsWith16',
|
CompactAssignments: 'CompactAssignmentsWith16',
|
||||||
RawSolution: 'RawSolutionWith16'
|
RawSolution: 'RawSolutionWith16'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [9010, 9099],
|
minmax: [9010, 9099],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, mapXcmTypes('V0'))
|
||||||
...sharedTypes,
|
|
||||||
...mapXcmTypes('V0')
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// jump from 9100 to 9110, however align with Rococo
|
// jump from 9100 to 9110, however align with Rococo
|
||||||
minmax: [9100, 9105],
|
minmax: [9100, 9105],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, mapXcmTypes('V1'))
|
||||||
...sharedTypes,
|
|
||||||
...mapXcmTypes('V1')
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// metadata v14
|
// metadata v14
|
||||||
minmax: [9106, undefined],
|
minmax: [9106, undefined],
|
||||||
types: {
|
types: {}
|
||||||
...sharedTypes
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
import type { OverrideVersionedType } from '@polkadot/types/types';
|
import type { OverrideVersionedType } from '@polkadot/types/types';
|
||||||
|
|
||||||
|
import { objectSpread } from '@polkadot/util';
|
||||||
|
|
||||||
const sharedTypes = {
|
const sharedTypes = {
|
||||||
CompactAssignments: 'CompactAssignmentsWith16',
|
CompactAssignments: 'CompactAssignmentsWith16',
|
||||||
RawSolution: 'RawSolutionWith16',
|
RawSolution: 'RawSolutionWith16',
|
||||||
@@ -35,57 +37,43 @@ const addrAccountIdTypes = {
|
|||||||
const versioned: OverrideVersionedType[] = [
|
const versioned: OverrideVersionedType[] = [
|
||||||
{
|
{
|
||||||
minmax: [0, 12],
|
minmax: [0, 12],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
|
||||||
...sharedTypes,
|
|
||||||
...addrAccountIdTypes,
|
|
||||||
CompactAssignments: 'CompactAssignmentsTo257',
|
CompactAssignments: 'CompactAssignmentsTo257',
|
||||||
OpenTip: 'OpenTipTo225',
|
OpenTip: 'OpenTipTo225',
|
||||||
RefCount: 'RefCountTo259'
|
RefCount: 'RefCountTo259'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [13, 22],
|
minmax: [13, 22],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
|
||||||
...sharedTypes,
|
|
||||||
...addrAccountIdTypes,
|
|
||||||
CompactAssignments: 'CompactAssignmentsTo257',
|
CompactAssignments: 'CompactAssignmentsTo257',
|
||||||
RefCount: 'RefCountTo259'
|
RefCount: 'RefCountTo259'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [23, 24],
|
minmax: [23, 24],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
|
||||||
...sharedTypes,
|
|
||||||
...addrAccountIdTypes,
|
|
||||||
RefCount: 'RefCountTo259'
|
RefCount: 'RefCountTo259'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [25, 27],
|
minmax: [25, 27],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, addrAccountIdTypes)
|
||||||
...sharedTypes,
|
|
||||||
...addrAccountIdTypes
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [28, 29],
|
minmax: [28, 29],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, {
|
||||||
...sharedTypes,
|
|
||||||
AccountInfo: 'AccountInfoWithDualRefCount'
|
AccountInfo: 'AccountInfoWithDualRefCount'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [30, 9109],
|
minmax: [30, 9109],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes)
|
||||||
...sharedTypes
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// metadata v14
|
// metadata v14
|
||||||
minmax: [9110, undefined],
|
minmax: [9110, undefined],
|
||||||
types: {
|
types: {}
|
||||||
...sharedTypes
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
import type { OverrideVersionedType } from '@polkadot/types/types';
|
import type { OverrideVersionedType } from '@polkadot/types/types';
|
||||||
|
|
||||||
|
import { objectSpread } from '@polkadot/util';
|
||||||
|
|
||||||
import { mapXcmTypes } from '../xcm';
|
import { mapXcmTypes } from '../xcm';
|
||||||
|
|
||||||
// structs need to be in order
|
// structs need to be in order
|
||||||
@@ -18,47 +20,36 @@ const sharedTypes = {
|
|||||||
const versioned: OverrideVersionedType[] = [
|
const versioned: OverrideVersionedType[] = [
|
||||||
{
|
{
|
||||||
minmax: [0, 200],
|
minmax: [0, 200],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, {
|
||||||
...sharedTypes,
|
|
||||||
AccountInfo: 'AccountInfoWithDualRefCount',
|
AccountInfo: 'AccountInfoWithDualRefCount',
|
||||||
Address: 'AccountId',
|
Address: 'AccountId',
|
||||||
LookupSource: 'AccountId'
|
LookupSource: 'AccountId'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [201, 214],
|
minmax: [201, 214],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, {
|
||||||
...sharedTypes,
|
|
||||||
AccountInfo: 'AccountInfoWithDualRefCount'
|
AccountInfo: 'AccountInfoWithDualRefCount'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [215, 228],
|
minmax: [215, 228],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, {
|
||||||
...sharedTypes,
|
|
||||||
Keys: 'SessionKeys6'
|
Keys: 'SessionKeys6'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [229, 9099],
|
minmax: [229, 9099],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, mapXcmTypes('V0'))
|
||||||
...sharedTypes,
|
|
||||||
...mapXcmTypes('V0')
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [9100, 9105],
|
minmax: [9100, 9105],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, mapXcmTypes('V1'))
|
||||||
...sharedTypes,
|
|
||||||
...mapXcmTypes('V1')
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// metadata v14
|
// metadata v14
|
||||||
minmax: [9106, undefined],
|
minmax: [9106, undefined],
|
||||||
types: {
|
types: {}
|
||||||
...sharedTypes
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
import type { OverrideVersionedType } from '@polkadot/types/types';
|
import type { OverrideVersionedType } from '@polkadot/types/types';
|
||||||
|
|
||||||
|
import { objectSpread } from '@polkadot/util';
|
||||||
|
|
||||||
import { mapXcmTypes } from '../xcm';
|
import { mapXcmTypes } from '../xcm';
|
||||||
|
|
||||||
const sharedTypes = {
|
const sharedTypes = {
|
||||||
@@ -26,24 +28,16 @@ const sharedTypes = {
|
|||||||
const versioned: OverrideVersionedType[] = [
|
const versioned: OverrideVersionedType[] = [
|
||||||
{
|
{
|
||||||
minmax: [0, 3],
|
minmax: [0, 3],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, mapXcmTypes('V0'))
|
||||||
...sharedTypes,
|
|
||||||
...mapXcmTypes('V0')
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [4, 5],
|
minmax: [4, 5],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, mapXcmTypes('V1'))
|
||||||
...sharedTypes,
|
|
||||||
...mapXcmTypes('V1')
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// metadata V14
|
// metadata V14
|
||||||
minmax: [500, undefined],
|
minmax: [500, undefined],
|
||||||
types: {
|
types: {}
|
||||||
...sharedTypes
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
import type { OverrideVersionedType } from '@polkadot/types/types';
|
import type { OverrideVersionedType } from '@polkadot/types/types';
|
||||||
|
|
||||||
|
import { objectSpread } from '@polkadot/util';
|
||||||
|
|
||||||
import { mapXcmTypes } from '../xcm';
|
import { mapXcmTypes } from '../xcm';
|
||||||
|
|
||||||
const sharedTypes = {
|
const sharedTypes = {
|
||||||
@@ -31,9 +33,7 @@ const addrAccountIdTypes = {
|
|||||||
const versioned: OverrideVersionedType[] = [
|
const versioned: OverrideVersionedType[] = [
|
||||||
{
|
{
|
||||||
minmax: [1, 2],
|
minmax: [1, 2],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
|
||||||
...sharedTypes,
|
|
||||||
...addrAccountIdTypes,
|
|
||||||
CompactAssignments: 'CompactAssignmentsTo257',
|
CompactAssignments: 'CompactAssignmentsTo257',
|
||||||
DispatchInfo: 'DispatchInfoTo244',
|
DispatchInfo: 'DispatchInfoTo244',
|
||||||
Heartbeat: 'HeartbeatTo244',
|
Heartbeat: 'HeartbeatTo244',
|
||||||
@@ -41,75 +41,57 @@ const versioned: OverrideVersionedType[] = [
|
|||||||
OpenTip: 'OpenTipTo225',
|
OpenTip: 'OpenTipTo225',
|
||||||
RefCount: 'RefCountTo259',
|
RefCount: 'RefCountTo259',
|
||||||
Weight: 'u32'
|
Weight: 'u32'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [3, 22],
|
minmax: [3, 22],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
|
||||||
...sharedTypes,
|
|
||||||
...addrAccountIdTypes,
|
|
||||||
CompactAssignments: 'CompactAssignmentsTo257',
|
CompactAssignments: 'CompactAssignmentsTo257',
|
||||||
DispatchInfo: 'DispatchInfoTo244',
|
DispatchInfo: 'DispatchInfoTo244',
|
||||||
Heartbeat: 'HeartbeatTo244',
|
Heartbeat: 'HeartbeatTo244',
|
||||||
OpenTip: 'OpenTipTo225',
|
OpenTip: 'OpenTipTo225',
|
||||||
RefCount: 'RefCountTo259'
|
RefCount: 'RefCountTo259'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [23, 42],
|
minmax: [23, 42],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
|
||||||
...sharedTypes,
|
|
||||||
...addrAccountIdTypes,
|
|
||||||
CompactAssignments: 'CompactAssignmentsTo257',
|
CompactAssignments: 'CompactAssignmentsTo257',
|
||||||
DispatchInfo: 'DispatchInfoTo244',
|
DispatchInfo: 'DispatchInfoTo244',
|
||||||
Heartbeat: 'HeartbeatTo244',
|
Heartbeat: 'HeartbeatTo244',
|
||||||
RefCount: 'RefCountTo259'
|
RefCount: 'RefCountTo259'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [43, 44],
|
minmax: [43, 44],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
|
||||||
...sharedTypes,
|
|
||||||
...addrAccountIdTypes,
|
|
||||||
DispatchInfo: 'DispatchInfoTo244',
|
DispatchInfo: 'DispatchInfoTo244',
|
||||||
Heartbeat: 'HeartbeatTo244',
|
Heartbeat: 'HeartbeatTo244',
|
||||||
RefCount: 'RefCountTo259'
|
RefCount: 'RefCountTo259'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [45, 47],
|
minmax: [45, 47],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, addrAccountIdTypes)
|
||||||
...sharedTypes,
|
|
||||||
...addrAccountIdTypes
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [48, 49],
|
minmax: [48, 49],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, {
|
||||||
...sharedTypes,
|
|
||||||
AccountInfo: 'AccountInfoWithDualRefCount'
|
AccountInfo: 'AccountInfoWithDualRefCount'
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [50, 9099],
|
minmax: [50, 9099],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, mapXcmTypes('V0'))
|
||||||
...sharedTypes,
|
|
||||||
...mapXcmTypes('V0')
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minmax: [9100, 9105],
|
minmax: [9100, 9105],
|
||||||
types: {
|
types: objectSpread({}, sharedTypes, mapXcmTypes('V1'))
|
||||||
...sharedTypes,
|
|
||||||
...mapXcmTypes('V1')
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// metadata v14
|
// metadata v14
|
||||||
minmax: [9106, undefined],
|
minmax: [9106, undefined],
|
||||||
types: {
|
types: {}
|
||||||
...sharedTypes
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const upgrades: ChainUpgradesRaw = [
|
|||||||
[528470, 13], [687751, 14], [746085, 15], [787923, 16], [799302, 17],
|
[528470, 13], [687751, 14], [746085, 15], [787923, 16], [799302, 17],
|
||||||
[1205128, 18], [1603423, 23], [1733218, 24], [2005673, 25], [2436698, 26],
|
[1205128, 18], [1603423, 23], [1733218, 24], [2005673, 25], [2436698, 26],
|
||||||
[3613564, 27], [3899547, 28], [4345767, 29], [4876134, 30], [5661442, 9050],
|
[3613564, 27], [3899547, 28], [4345767, 29], [4876134, 30], [5661442, 9050],
|
||||||
[6321619, 9080], [6713249, 9090], [7217907, 9100], [7229126, 9110]
|
[6321619, 9080], [6713249, 9090], [7217907, 9100], [7229126, 9110], [7560558, 9122]
|
||||||
];
|
];
|
||||||
|
|
||||||
export default upgrades;
|
export default upgrades;
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
// Copyright 2017-2021 @polkadot/types-known authors & contributors
|
// Copyright 2017-2021 @polkadot/types-known authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import { objectSpread } from '@polkadot/util';
|
||||||
|
|
||||||
export const XCM_MAPPINGS = ['AssetInstance', 'Fungibility', 'Junction', 'Junctions', 'MultiAsset', 'MultiAssetFilter', 'MultiLocation', 'Response', 'WildFungibility', 'WildMultiAsset', 'Xcm', 'XcmError', 'XcmOrder'];
|
export const XCM_MAPPINGS = ['AssetInstance', 'Fungibility', 'Junction', 'Junctions', 'MultiAsset', 'MultiAssetFilter', 'MultiLocation', 'Response', 'WildFungibility', 'WildMultiAsset', 'Xcm', 'XcmError', 'XcmOrder'];
|
||||||
|
|
||||||
export function mapXcmTypes (version: 'V0' | 'V1' | 'V2'): Record<string, string> {
|
export function mapXcmTypes (version: 'V0' | 'V1' | 'V2'): Record<string, string> {
|
||||||
return XCM_MAPPINGS.reduce<Record<string, string>>((all, key) => ({
|
return XCM_MAPPINGS.reduce<Record<string, string>>((all, key) =>
|
||||||
...all,
|
objectSpread(all, { [key]: `${key}${version}` }), {}
|
||||||
[key]: `${key}${version}`
|
);
|
||||||
}), {});
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,10 +20,10 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "6.6.1",
|
"version": "6.8.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.15.4",
|
"@babel/runtime": "^7.16.0",
|
||||||
"@polkadot/util": "^7.7.1"
|
"@polkadot/util": "^7.8.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Auto-generated by @polkadot/dev, do not edit
|
// Auto-generated by @polkadot/dev, do not edit
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/types-support', version: '6.6.1' };
|
export const packageInfo = { name: '@polkadot/types-support', version: '6.8.1' };
|
||||||
|
|||||||
@@ -20,17 +20,17 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "6.6.1",
|
"version": "6.8.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.15.4",
|
"@babel/runtime": "^7.16.0",
|
||||||
"@polkadot/util": "^7.7.1",
|
"@polkadot/util": "^7.8.2",
|
||||||
"@polkadot/util-crypto": "^7.7.1",
|
"@polkadot/util-crypto": "^7.8.2",
|
||||||
"rxjs": "^7.4.0"
|
"rxjs": "^7.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/keyring": "^7.7.1",
|
"@polkadot/keyring": "^7.8.2",
|
||||||
"@polkadot/types-support": "6.6.1",
|
"@polkadot/types-support": "6.8.1",
|
||||||
"@types/bn.js": "^4.11.6",
|
"@types/bn.js": "^4.11.6",
|
||||||
"bn.js": "^4.12.0"
|
"bn.js": "^4.12.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,17 +3,15 @@
|
|||||||
|
|
||||||
import type { Definitions } from '../../types';
|
import type { Definitions } from '../../types';
|
||||||
|
|
||||||
|
import { objectSpread } from '@polkadot/util';
|
||||||
|
|
||||||
import kusama from './kusama';
|
import kusama from './kusama';
|
||||||
import polkadot from './polkadot';
|
import polkadot from './polkadot';
|
||||||
import substrate from './substrate';
|
import substrate from './substrate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
rpc: {},
|
rpc: {},
|
||||||
types: {
|
// Not 100% sure it is relevant, however the order here is the same
|
||||||
// Not 100% sure it is relevant, however the order here is the same
|
// as exposed in the typegen lookup order
|
||||||
// as exposed in the typegen lookup order
|
types: objectSpread({}, substrate, polkadot, kusama)
|
||||||
...substrate,
|
|
||||||
...polkadot,
|
|
||||||
...kusama
|
|
||||||
}
|
|
||||||
} as Definitions;
|
} as Definitions;
|
||||||
|
|||||||
@@ -429,264 +429,7 @@ export default {
|
|||||||
authorityDiscovery: 'SpAuthorityDiscoveryAppPublic'
|
authorityDiscovery: 'SpAuthorityDiscoveryAppPublic'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup371: kusama_runtime::NposCompactSolution24
|
* Lookup316: kusama_runtime::OriginCaller
|
||||||
**/
|
|
||||||
KusamaRuntimeNposCompactSolution24: {
|
|
||||||
votes1: 'Vec<(Compact<u32>,Compact<u16>)>',
|
|
||||||
votes2: 'Vec<(Compact<u32>,(Compact<u16>,Compact<PerU16>),Compact<u16>)>',
|
|
||||||
votes3: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);2],Compact<u16>)>',
|
|
||||||
votes4: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);3],Compact<u16>)>',
|
|
||||||
votes5: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);4],Compact<u16>)>',
|
|
||||||
votes6: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);5],Compact<u16>)>',
|
|
||||||
votes7: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);6],Compact<u16>)>',
|
|
||||||
votes8: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);7],Compact<u16>)>',
|
|
||||||
votes9: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);8],Compact<u16>)>',
|
|
||||||
votes10: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);9],Compact<u16>)>',
|
|
||||||
votes11: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);10],Compact<u16>)>',
|
|
||||||
votes12: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);11],Compact<u16>)>',
|
|
||||||
votes13: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);12],Compact<u16>)>',
|
|
||||||
votes14: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);13],Compact<u16>)>',
|
|
||||||
votes15: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);14],Compact<u16>)>',
|
|
||||||
votes16: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);15],Compact<u16>)>',
|
|
||||||
votes17: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);16],Compact<u16>)>',
|
|
||||||
votes18: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);17],Compact<u16>)>',
|
|
||||||
votes19: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);18],Compact<u16>)>',
|
|
||||||
votes20: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);19],Compact<u16>)>',
|
|
||||||
votes21: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);20],Compact<u16>)>',
|
|
||||||
votes22: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);21],Compact<u16>)>',
|
|
||||||
votes23: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);22],Compact<u16>)>',
|
|
||||||
votes24: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);23],Compact<u16>)>'
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup504: xcm::VersionedXcm<Call>
|
|
||||||
**/
|
|
||||||
XcmVersionedXcm: {
|
|
||||||
_enum: {
|
|
||||||
V0: 'XcmV0Xcm',
|
|
||||||
V1: 'XcmV1Xcm',
|
|
||||||
V2: 'XcmV2Xcm'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup505: xcm::v0::Xcm<Call>
|
|
||||||
**/
|
|
||||||
XcmV0Xcm: {
|
|
||||||
_enum: {
|
|
||||||
WithdrawAsset: {
|
|
||||||
assets: 'Vec<XcmV0MultiAsset>',
|
|
||||||
effects: 'Vec<XcmV0Order>',
|
|
||||||
},
|
|
||||||
ReserveAssetDeposit: {
|
|
||||||
assets: 'Vec<XcmV0MultiAsset>',
|
|
||||||
effects: 'Vec<XcmV0Order>',
|
|
||||||
},
|
|
||||||
TeleportAsset: {
|
|
||||||
assets: 'Vec<XcmV0MultiAsset>',
|
|
||||||
effects: 'Vec<XcmV0Order>',
|
|
||||||
},
|
|
||||||
QueryResponse: {
|
|
||||||
queryId: 'Compact<u64>',
|
|
||||||
response: 'XcmV0Response',
|
|
||||||
},
|
|
||||||
TransferAsset: {
|
|
||||||
assets: 'Vec<XcmV0MultiAsset>',
|
|
||||||
dest: 'XcmV0MultiLocation',
|
|
||||||
},
|
|
||||||
TransferReserveAsset: {
|
|
||||||
assets: 'Vec<XcmV0MultiAsset>',
|
|
||||||
dest: 'XcmV0MultiLocation',
|
|
||||||
effects: 'Vec<XcmV0Order>',
|
|
||||||
},
|
|
||||||
Transact: {
|
|
||||||
originType: 'XcmV0OriginKind',
|
|
||||||
requireWeightAtMost: 'u64',
|
|
||||||
call: 'XcmDoubleEncoded',
|
|
||||||
},
|
|
||||||
HrmpNewChannelOpenRequest: {
|
|
||||||
sender: 'Compact<u32>',
|
|
||||||
maxMessageSize: 'Compact<u32>',
|
|
||||||
maxCapacity: 'Compact<u32>',
|
|
||||||
},
|
|
||||||
HrmpChannelAccepted: {
|
|
||||||
recipient: 'Compact<u32>',
|
|
||||||
},
|
|
||||||
HrmpChannelClosing: {
|
|
||||||
initiator: 'Compact<u32>',
|
|
||||||
sender: 'Compact<u32>',
|
|
||||||
recipient: 'Compact<u32>',
|
|
||||||
},
|
|
||||||
RelayedFrom: {
|
|
||||||
who: 'XcmV0MultiLocation',
|
|
||||||
message: 'XcmV0Xcm'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup507: xcm::v0::order::Order<Call>
|
|
||||||
**/
|
|
||||||
XcmV0Order: {
|
|
||||||
_enum: {
|
|
||||||
Null: 'Null',
|
|
||||||
DepositAsset: {
|
|
||||||
assets: 'Vec<XcmV0MultiAsset>',
|
|
||||||
dest: 'XcmV0MultiLocation',
|
|
||||||
},
|
|
||||||
DepositReserveAsset: {
|
|
||||||
assets: 'Vec<XcmV0MultiAsset>',
|
|
||||||
dest: 'XcmV0MultiLocation',
|
|
||||||
effects: 'Vec<XcmV0Order>',
|
|
||||||
},
|
|
||||||
ExchangeAsset: {
|
|
||||||
give: 'Vec<XcmV0MultiAsset>',
|
|
||||||
receive: 'Vec<XcmV0MultiAsset>',
|
|
||||||
},
|
|
||||||
InitiateReserveWithdraw: {
|
|
||||||
assets: 'Vec<XcmV0MultiAsset>',
|
|
||||||
reserve: 'XcmV0MultiLocation',
|
|
||||||
effects: 'Vec<XcmV0Order>',
|
|
||||||
},
|
|
||||||
InitiateTeleport: {
|
|
||||||
assets: 'Vec<XcmV0MultiAsset>',
|
|
||||||
dest: 'XcmV0MultiLocation',
|
|
||||||
effects: 'Vec<XcmV0Order>',
|
|
||||||
},
|
|
||||||
QueryHolding: {
|
|
||||||
queryId: 'Compact<u64>',
|
|
||||||
dest: 'XcmV0MultiLocation',
|
|
||||||
assets: 'Vec<XcmV0MultiAsset>',
|
|
||||||
},
|
|
||||||
BuyExecution: {
|
|
||||||
fees: 'XcmV0MultiAsset',
|
|
||||||
weight: 'u64',
|
|
||||||
debt: 'u64',
|
|
||||||
haltOnError: 'bool',
|
|
||||||
xcm: 'Vec<XcmV0Xcm>'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup509: xcm::v0::Response
|
|
||||||
**/
|
|
||||||
XcmV0Response: {
|
|
||||||
_enum: {
|
|
||||||
Assets: 'Vec<XcmV0MultiAsset>'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup510: xcm::v1::Xcm<Call>
|
|
||||||
**/
|
|
||||||
XcmV1Xcm: {
|
|
||||||
_enum: {
|
|
||||||
WithdrawAsset: {
|
|
||||||
assets: 'XcmV1MultiassetMultiAssets',
|
|
||||||
effects: 'Vec<XcmV1Order>',
|
|
||||||
},
|
|
||||||
ReserveAssetDeposited: {
|
|
||||||
assets: 'XcmV1MultiassetMultiAssets',
|
|
||||||
effects: 'Vec<XcmV1Order>',
|
|
||||||
},
|
|
||||||
ReceiveTeleportedAsset: {
|
|
||||||
assets: 'XcmV1MultiassetMultiAssets',
|
|
||||||
effects: 'Vec<XcmV1Order>',
|
|
||||||
},
|
|
||||||
QueryResponse: {
|
|
||||||
queryId: 'Compact<u64>',
|
|
||||||
response: 'XcmV1Response',
|
|
||||||
},
|
|
||||||
TransferAsset: {
|
|
||||||
assets: 'XcmV1MultiassetMultiAssets',
|
|
||||||
beneficiary: 'XcmV1MultiLocation',
|
|
||||||
},
|
|
||||||
TransferReserveAsset: {
|
|
||||||
assets: 'XcmV1MultiassetMultiAssets',
|
|
||||||
dest: 'XcmV1MultiLocation',
|
|
||||||
effects: 'Vec<XcmV1Order>',
|
|
||||||
},
|
|
||||||
Transact: {
|
|
||||||
originType: 'XcmV0OriginKind',
|
|
||||||
requireWeightAtMost: 'u64',
|
|
||||||
call: 'XcmDoubleEncoded',
|
|
||||||
},
|
|
||||||
HrmpNewChannelOpenRequest: {
|
|
||||||
sender: 'Compact<u32>',
|
|
||||||
maxMessageSize: 'Compact<u32>',
|
|
||||||
maxCapacity: 'Compact<u32>',
|
|
||||||
},
|
|
||||||
HrmpChannelAccepted: {
|
|
||||||
recipient: 'Compact<u32>',
|
|
||||||
},
|
|
||||||
HrmpChannelClosing: {
|
|
||||||
initiator: 'Compact<u32>',
|
|
||||||
sender: 'Compact<u32>',
|
|
||||||
recipient: 'Compact<u32>',
|
|
||||||
},
|
|
||||||
RelayedFrom: {
|
|
||||||
who: 'XcmV1MultilocationJunctions',
|
|
||||||
message: 'XcmV1Xcm',
|
|
||||||
},
|
|
||||||
SubscribeVersion: {
|
|
||||||
queryId: 'Compact<u64>',
|
|
||||||
maxResponseWeight: 'Compact<u64>',
|
|
||||||
},
|
|
||||||
UnsubscribeVersion: 'Null'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup512: xcm::v1::order::Order<Call>
|
|
||||||
**/
|
|
||||||
XcmV1Order: {
|
|
||||||
_enum: {
|
|
||||||
Noop: 'Null',
|
|
||||||
DepositAsset: {
|
|
||||||
assets: 'XcmV1MultiassetMultiAssetFilter',
|
|
||||||
maxAssets: 'u32',
|
|
||||||
beneficiary: 'XcmV1MultiLocation',
|
|
||||||
},
|
|
||||||
DepositReserveAsset: {
|
|
||||||
assets: 'XcmV1MultiassetMultiAssetFilter',
|
|
||||||
maxAssets: 'u32',
|
|
||||||
dest: 'XcmV1MultiLocation',
|
|
||||||
effects: 'Vec<XcmV1Order>',
|
|
||||||
},
|
|
||||||
ExchangeAsset: {
|
|
||||||
give: 'XcmV1MultiassetMultiAssetFilter',
|
|
||||||
receive: 'XcmV1MultiassetMultiAssets',
|
|
||||||
},
|
|
||||||
InitiateReserveWithdraw: {
|
|
||||||
assets: 'XcmV1MultiassetMultiAssetFilter',
|
|
||||||
reserve: 'XcmV1MultiLocation',
|
|
||||||
effects: 'Vec<XcmV1Order>',
|
|
||||||
},
|
|
||||||
InitiateTeleport: {
|
|
||||||
assets: 'XcmV1MultiassetMultiAssetFilter',
|
|
||||||
dest: 'XcmV1MultiLocation',
|
|
||||||
effects: 'Vec<XcmV1Order>',
|
|
||||||
},
|
|
||||||
QueryHolding: {
|
|
||||||
queryId: 'Compact<u64>',
|
|
||||||
dest: 'XcmV1MultiLocation',
|
|
||||||
assets: 'XcmV1MultiassetMultiAssetFilter',
|
|
||||||
},
|
|
||||||
BuyExecution: {
|
|
||||||
fees: 'XcmV1MultiAsset',
|
|
||||||
weight: 'u64',
|
|
||||||
debt: 'u64',
|
|
||||||
haltOnError: 'bool',
|
|
||||||
instructions: 'Vec<XcmV1Xcm>'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup514: xcm::v1::Response
|
|
||||||
**/
|
|
||||||
XcmV1Response: {
|
|
||||||
_enum: {
|
|
||||||
Assets: 'XcmV1MultiassetMultiAssets',
|
|
||||||
Version: 'u32'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup575: kusama_runtime::OriginCaller
|
|
||||||
**/
|
**/
|
||||||
KusamaRuntimeOriginCaller: {
|
KusamaRuntimeOriginCaller: {
|
||||||
_enum: {
|
_enum: {
|
||||||
@@ -793,7 +536,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup580: pallet_xcm::pallet::Origin
|
* Lookup321: pallet_xcm::pallet::Origin
|
||||||
**/
|
**/
|
||||||
PalletXcmOrigin: {
|
PalletXcmOrigin: {
|
||||||
_enum: {
|
_enum: {
|
||||||
@@ -802,7 +545,264 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup689: pallet_xcm::pallet::QueryStatus<BlockNumber>
|
* Lookup379: kusama_runtime::NposCompactSolution24
|
||||||
|
**/
|
||||||
|
KusamaRuntimeNposCompactSolution24: {
|
||||||
|
votes1: 'Vec<(Compact<u32>,Compact<u16>)>',
|
||||||
|
votes2: 'Vec<(Compact<u32>,(Compact<u16>,Compact<PerU16>),Compact<u16>)>',
|
||||||
|
votes3: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);2],Compact<u16>)>',
|
||||||
|
votes4: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);3],Compact<u16>)>',
|
||||||
|
votes5: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);4],Compact<u16>)>',
|
||||||
|
votes6: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);5],Compact<u16>)>',
|
||||||
|
votes7: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);6],Compact<u16>)>',
|
||||||
|
votes8: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);7],Compact<u16>)>',
|
||||||
|
votes9: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);8],Compact<u16>)>',
|
||||||
|
votes10: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);9],Compact<u16>)>',
|
||||||
|
votes11: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);10],Compact<u16>)>',
|
||||||
|
votes12: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);11],Compact<u16>)>',
|
||||||
|
votes13: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);12],Compact<u16>)>',
|
||||||
|
votes14: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);13],Compact<u16>)>',
|
||||||
|
votes15: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);14],Compact<u16>)>',
|
||||||
|
votes16: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);15],Compact<u16>)>',
|
||||||
|
votes17: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);16],Compact<u16>)>',
|
||||||
|
votes18: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);17],Compact<u16>)>',
|
||||||
|
votes19: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);18],Compact<u16>)>',
|
||||||
|
votes20: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);19],Compact<u16>)>',
|
||||||
|
votes21: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);20],Compact<u16>)>',
|
||||||
|
votes22: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);21],Compact<u16>)>',
|
||||||
|
votes23: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);22],Compact<u16>)>',
|
||||||
|
votes24: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);23],Compact<u16>)>'
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup512: xcm::VersionedXcm<Call>
|
||||||
|
**/
|
||||||
|
XcmVersionedXcm: {
|
||||||
|
_enum: {
|
||||||
|
V0: 'XcmV0Xcm',
|
||||||
|
V1: 'XcmV1Xcm',
|
||||||
|
V2: 'XcmV2Xcm'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup513: xcm::v0::Xcm<Call>
|
||||||
|
**/
|
||||||
|
XcmV0Xcm: {
|
||||||
|
_enum: {
|
||||||
|
WithdrawAsset: {
|
||||||
|
assets: 'Vec<XcmV0MultiAsset>',
|
||||||
|
effects: 'Vec<XcmV0Order>',
|
||||||
|
},
|
||||||
|
ReserveAssetDeposit: {
|
||||||
|
assets: 'Vec<XcmV0MultiAsset>',
|
||||||
|
effects: 'Vec<XcmV0Order>',
|
||||||
|
},
|
||||||
|
TeleportAsset: {
|
||||||
|
assets: 'Vec<XcmV0MultiAsset>',
|
||||||
|
effects: 'Vec<XcmV0Order>',
|
||||||
|
},
|
||||||
|
QueryResponse: {
|
||||||
|
queryId: 'Compact<u64>',
|
||||||
|
response: 'XcmV0Response',
|
||||||
|
},
|
||||||
|
TransferAsset: {
|
||||||
|
assets: 'Vec<XcmV0MultiAsset>',
|
||||||
|
dest: 'XcmV0MultiLocation',
|
||||||
|
},
|
||||||
|
TransferReserveAsset: {
|
||||||
|
assets: 'Vec<XcmV0MultiAsset>',
|
||||||
|
dest: 'XcmV0MultiLocation',
|
||||||
|
effects: 'Vec<XcmV0Order>',
|
||||||
|
},
|
||||||
|
Transact: {
|
||||||
|
originType: 'XcmV0OriginKind',
|
||||||
|
requireWeightAtMost: 'u64',
|
||||||
|
call: 'XcmDoubleEncoded',
|
||||||
|
},
|
||||||
|
HrmpNewChannelOpenRequest: {
|
||||||
|
sender: 'Compact<u32>',
|
||||||
|
maxMessageSize: 'Compact<u32>',
|
||||||
|
maxCapacity: 'Compact<u32>',
|
||||||
|
},
|
||||||
|
HrmpChannelAccepted: {
|
||||||
|
recipient: 'Compact<u32>',
|
||||||
|
},
|
||||||
|
HrmpChannelClosing: {
|
||||||
|
initiator: 'Compact<u32>',
|
||||||
|
sender: 'Compact<u32>',
|
||||||
|
recipient: 'Compact<u32>',
|
||||||
|
},
|
||||||
|
RelayedFrom: {
|
||||||
|
who: 'XcmV0MultiLocation',
|
||||||
|
message: 'XcmV0Xcm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup515: xcm::v0::order::Order<Call>
|
||||||
|
**/
|
||||||
|
XcmV0Order: {
|
||||||
|
_enum: {
|
||||||
|
Null: 'Null',
|
||||||
|
DepositAsset: {
|
||||||
|
assets: 'Vec<XcmV0MultiAsset>',
|
||||||
|
dest: 'XcmV0MultiLocation',
|
||||||
|
},
|
||||||
|
DepositReserveAsset: {
|
||||||
|
assets: 'Vec<XcmV0MultiAsset>',
|
||||||
|
dest: 'XcmV0MultiLocation',
|
||||||
|
effects: 'Vec<XcmV0Order>',
|
||||||
|
},
|
||||||
|
ExchangeAsset: {
|
||||||
|
give: 'Vec<XcmV0MultiAsset>',
|
||||||
|
receive: 'Vec<XcmV0MultiAsset>',
|
||||||
|
},
|
||||||
|
InitiateReserveWithdraw: {
|
||||||
|
assets: 'Vec<XcmV0MultiAsset>',
|
||||||
|
reserve: 'XcmV0MultiLocation',
|
||||||
|
effects: 'Vec<XcmV0Order>',
|
||||||
|
},
|
||||||
|
InitiateTeleport: {
|
||||||
|
assets: 'Vec<XcmV0MultiAsset>',
|
||||||
|
dest: 'XcmV0MultiLocation',
|
||||||
|
effects: 'Vec<XcmV0Order>',
|
||||||
|
},
|
||||||
|
QueryHolding: {
|
||||||
|
queryId: 'Compact<u64>',
|
||||||
|
dest: 'XcmV0MultiLocation',
|
||||||
|
assets: 'Vec<XcmV0MultiAsset>',
|
||||||
|
},
|
||||||
|
BuyExecution: {
|
||||||
|
fees: 'XcmV0MultiAsset',
|
||||||
|
weight: 'u64',
|
||||||
|
debt: 'u64',
|
||||||
|
haltOnError: 'bool',
|
||||||
|
xcm: 'Vec<XcmV0Xcm>'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup517: xcm::v0::Response
|
||||||
|
**/
|
||||||
|
XcmV0Response: {
|
||||||
|
_enum: {
|
||||||
|
Assets: 'Vec<XcmV0MultiAsset>'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup518: xcm::v1::Xcm<Call>
|
||||||
|
**/
|
||||||
|
XcmV1Xcm: {
|
||||||
|
_enum: {
|
||||||
|
WithdrawAsset: {
|
||||||
|
assets: 'XcmV1MultiassetMultiAssets',
|
||||||
|
effects: 'Vec<XcmV1Order>',
|
||||||
|
},
|
||||||
|
ReserveAssetDeposited: {
|
||||||
|
assets: 'XcmV1MultiassetMultiAssets',
|
||||||
|
effects: 'Vec<XcmV1Order>',
|
||||||
|
},
|
||||||
|
ReceiveTeleportedAsset: {
|
||||||
|
assets: 'XcmV1MultiassetMultiAssets',
|
||||||
|
effects: 'Vec<XcmV1Order>',
|
||||||
|
},
|
||||||
|
QueryResponse: {
|
||||||
|
queryId: 'Compact<u64>',
|
||||||
|
response: 'XcmV1Response',
|
||||||
|
},
|
||||||
|
TransferAsset: {
|
||||||
|
assets: 'XcmV1MultiassetMultiAssets',
|
||||||
|
beneficiary: 'XcmV1MultiLocation',
|
||||||
|
},
|
||||||
|
TransferReserveAsset: {
|
||||||
|
assets: 'XcmV1MultiassetMultiAssets',
|
||||||
|
dest: 'XcmV1MultiLocation',
|
||||||
|
effects: 'Vec<XcmV1Order>',
|
||||||
|
},
|
||||||
|
Transact: {
|
||||||
|
originType: 'XcmV0OriginKind',
|
||||||
|
requireWeightAtMost: 'u64',
|
||||||
|
call: 'XcmDoubleEncoded',
|
||||||
|
},
|
||||||
|
HrmpNewChannelOpenRequest: {
|
||||||
|
sender: 'Compact<u32>',
|
||||||
|
maxMessageSize: 'Compact<u32>',
|
||||||
|
maxCapacity: 'Compact<u32>',
|
||||||
|
},
|
||||||
|
HrmpChannelAccepted: {
|
||||||
|
recipient: 'Compact<u32>',
|
||||||
|
},
|
||||||
|
HrmpChannelClosing: {
|
||||||
|
initiator: 'Compact<u32>',
|
||||||
|
sender: 'Compact<u32>',
|
||||||
|
recipient: 'Compact<u32>',
|
||||||
|
},
|
||||||
|
RelayedFrom: {
|
||||||
|
who: 'XcmV1MultilocationJunctions',
|
||||||
|
message: 'XcmV1Xcm',
|
||||||
|
},
|
||||||
|
SubscribeVersion: {
|
||||||
|
queryId: 'Compact<u64>',
|
||||||
|
maxResponseWeight: 'Compact<u64>',
|
||||||
|
},
|
||||||
|
UnsubscribeVersion: 'Null'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup520: xcm::v1::order::Order<Call>
|
||||||
|
**/
|
||||||
|
XcmV1Order: {
|
||||||
|
_enum: {
|
||||||
|
Noop: 'Null',
|
||||||
|
DepositAsset: {
|
||||||
|
assets: 'XcmV1MultiassetMultiAssetFilter',
|
||||||
|
maxAssets: 'u32',
|
||||||
|
beneficiary: 'XcmV1MultiLocation',
|
||||||
|
},
|
||||||
|
DepositReserveAsset: {
|
||||||
|
assets: 'XcmV1MultiassetMultiAssetFilter',
|
||||||
|
maxAssets: 'u32',
|
||||||
|
dest: 'XcmV1MultiLocation',
|
||||||
|
effects: 'Vec<XcmV1Order>',
|
||||||
|
},
|
||||||
|
ExchangeAsset: {
|
||||||
|
give: 'XcmV1MultiassetMultiAssetFilter',
|
||||||
|
receive: 'XcmV1MultiassetMultiAssets',
|
||||||
|
},
|
||||||
|
InitiateReserveWithdraw: {
|
||||||
|
assets: 'XcmV1MultiassetMultiAssetFilter',
|
||||||
|
reserve: 'XcmV1MultiLocation',
|
||||||
|
effects: 'Vec<XcmV1Order>',
|
||||||
|
},
|
||||||
|
InitiateTeleport: {
|
||||||
|
assets: 'XcmV1MultiassetMultiAssetFilter',
|
||||||
|
dest: 'XcmV1MultiLocation',
|
||||||
|
effects: 'Vec<XcmV1Order>',
|
||||||
|
},
|
||||||
|
QueryHolding: {
|
||||||
|
queryId: 'Compact<u64>',
|
||||||
|
dest: 'XcmV1MultiLocation',
|
||||||
|
assets: 'XcmV1MultiassetMultiAssetFilter',
|
||||||
|
},
|
||||||
|
BuyExecution: {
|
||||||
|
fees: 'XcmV1MultiAsset',
|
||||||
|
weight: 'u64',
|
||||||
|
debt: 'u64',
|
||||||
|
haltOnError: 'bool',
|
||||||
|
instructions: 'Vec<XcmV1Xcm>'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup522: xcm::v1::Response
|
||||||
|
**/
|
||||||
|
XcmV1Response: {
|
||||||
|
_enum: {
|
||||||
|
Assets: 'XcmV1MultiassetMultiAssets',
|
||||||
|
Version: 'u32'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup690: pallet_xcm::pallet::QueryStatus<BlockNumber>
|
||||||
**/
|
**/
|
||||||
PalletXcmQueryStatus: {
|
PalletXcmQueryStatus: {
|
||||||
_enum: {
|
_enum: {
|
||||||
@@ -822,7 +822,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup692: xcm::VersionedResponse
|
* Lookup693: xcm::VersionedResponse
|
||||||
**/
|
**/
|
||||||
XcmVersionedResponse: {
|
XcmVersionedResponse: {
|
||||||
_enum: {
|
_enum: {
|
||||||
@@ -832,7 +832,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup698: pallet_xcm::pallet::VersionMigrationStage
|
* Lookup699: pallet_xcm::pallet::VersionMigrationStage
|
||||||
**/
|
**/
|
||||||
PalletXcmVersionMigrationStage: {
|
PalletXcmVersionMigrationStage: {
|
||||||
_enum: {
|
_enum: {
|
||||||
@@ -843,7 +843,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup710: kusama_runtime::Runtime
|
* Lookup711: kusama_runtime::Runtime
|
||||||
**/
|
**/
|
||||||
KusamaRuntimeRuntime: 'Null'
|
KusamaRuntimeRuntime: 'Null'
|
||||||
} as DefinitionsTypes;
|
} as DefinitionsTypes;
|
||||||
|
|||||||
@@ -121,144 +121,7 @@ export default {
|
|||||||
_enum: ['Regular', 'Saft']
|
_enum: ['Regular', 'Saft']
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup254: polkadot_runtime::NposCompactSolution16
|
* Lookup206: polkadot_runtime::OriginCaller
|
||||||
**/
|
|
||||||
PolkadotRuntimeNposCompactSolution16: {
|
|
||||||
votes1: 'Vec<(Compact<u32>,Compact<u16>)>',
|
|
||||||
votes2: 'Vec<(Compact<u32>,(Compact<u16>,Compact<PerU16>),Compact<u16>)>',
|
|
||||||
votes3: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);2],Compact<u16>)>',
|
|
||||||
votes4: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);3],Compact<u16>)>',
|
|
||||||
votes5: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);4],Compact<u16>)>',
|
|
||||||
votes6: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);5],Compact<u16>)>',
|
|
||||||
votes7: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);6],Compact<u16>)>',
|
|
||||||
votes8: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);7],Compact<u16>)>',
|
|
||||||
votes9: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);8],Compact<u16>)>',
|
|
||||||
votes10: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);9],Compact<u16>)>',
|
|
||||||
votes11: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);10],Compact<u16>)>',
|
|
||||||
votes12: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);11],Compact<u16>)>',
|
|
||||||
votes13: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);12],Compact<u16>)>',
|
|
||||||
votes14: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);13],Compact<u16>)>',
|
|
||||||
votes15: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);14],Compact<u16>)>',
|
|
||||||
votes16: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);15],Compact<u16>)>'
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup316: polkadot_primitives::v1::InherentData<sp_runtime::generic::header::Header<Number, sp_runtime::traits::BlakeTwo256>>
|
|
||||||
**/
|
|
||||||
PolkadotPrimitivesV1InherentData: {
|
|
||||||
bitfields: 'Vec<PolkadotPrimitivesV1SignedUncheckedSigned>',
|
|
||||||
backedCandidates: 'Vec<PolkadotPrimitivesV1BackedCandidate>',
|
|
||||||
disputes: 'Vec<PolkadotPrimitivesV1DisputeStatementSet>',
|
|
||||||
parentHeader: 'SpRuntimeGenericHeader'
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup318: polkadot_primitives::v1::signed::UncheckedSigned<polkadot_primitives::v1::AvailabilityBitfield, polkadot_primitives::v1::AvailabilityBitfield>
|
|
||||||
**/
|
|
||||||
PolkadotPrimitivesV1SignedUncheckedSigned: {
|
|
||||||
payload: 'BitVec',
|
|
||||||
validatorIndex: 'u32',
|
|
||||||
signature: 'PolkadotPrimitivesV0ValidatorAppSignature'
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup321: bitvec::order::Lsb0
|
|
||||||
**/
|
|
||||||
BitvecOrderLsb0: 'Null',
|
|
||||||
/**
|
|
||||||
* Lookup323: polkadot_primitives::v0::validator_app::Signature
|
|
||||||
**/
|
|
||||||
PolkadotPrimitivesV0ValidatorAppSignature: 'SpCoreSr25519Signature',
|
|
||||||
/**
|
|
||||||
* Lookup325: polkadot_primitives::v1::BackedCandidate<primitive_types::H256>
|
|
||||||
**/
|
|
||||||
PolkadotPrimitivesV1BackedCandidate: {
|
|
||||||
candidate: 'PolkadotPrimitivesV1CommittedCandidateReceipt',
|
|
||||||
validityVotes: 'Vec<PolkadotPrimitivesV0ValidityAttestation>',
|
|
||||||
validatorIndices: 'BitVec'
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup326: polkadot_primitives::v1::CommittedCandidateReceipt<primitive_types::H256>
|
|
||||||
**/
|
|
||||||
PolkadotPrimitivesV1CommittedCandidateReceipt: {
|
|
||||||
descriptor: 'PolkadotPrimitivesV1CandidateDescriptor',
|
|
||||||
commitments: 'PolkadotPrimitivesV1CandidateCommitments'
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup327: polkadot_primitives::v1::CandidateCommitments<N>
|
|
||||||
**/
|
|
||||||
PolkadotPrimitivesV1CandidateCommitments: {
|
|
||||||
upwardMessages: 'Vec<Bytes>',
|
|
||||||
horizontalMessages: 'Vec<PolkadotCorePrimitivesOutboundHrmpMessage>',
|
|
||||||
newValidationCode: 'Option<Bytes>',
|
|
||||||
headData: 'Bytes',
|
|
||||||
processedDownwardMessages: 'u32',
|
|
||||||
hrmpWatermark: 'u32'
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup329: polkadot_core_primitives::OutboundHrmpMessage<polkadot_parachain::primitives::Id>
|
|
||||||
**/
|
|
||||||
PolkadotCorePrimitivesOutboundHrmpMessage: {
|
|
||||||
recipient: 'u32',
|
|
||||||
data: 'Bytes'
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup333: polkadot_primitives::v0::ValidityAttestation
|
|
||||||
**/
|
|
||||||
PolkadotPrimitivesV0ValidityAttestation: {
|
|
||||||
_enum: {
|
|
||||||
__Unused0: 'Null',
|
|
||||||
Implicit: 'PolkadotPrimitivesV0ValidatorAppSignature',
|
|
||||||
Explicit: 'PolkadotPrimitivesV0ValidatorAppSignature'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup335: polkadot_primitives::v1::DisputeStatementSet
|
|
||||||
**/
|
|
||||||
PolkadotPrimitivesV1DisputeStatementSet: {
|
|
||||||
candidateHash: 'H256',
|
|
||||||
session: 'u32',
|
|
||||||
statements: 'Vec<(PolkadotPrimitivesV1DisputeStatement,u32,PolkadotPrimitivesV0ValidatorAppSignature)>'
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup339: polkadot_primitives::v1::DisputeStatement
|
|
||||||
**/
|
|
||||||
PolkadotPrimitivesV1DisputeStatement: {
|
|
||||||
_enum: {
|
|
||||||
Valid: 'PolkadotPrimitivesV1ValidDisputeStatementKind',
|
|
||||||
Invalid: 'PolkadotPrimitivesV1InvalidDisputeStatementKind'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup340: polkadot_primitives::v1::ValidDisputeStatementKind
|
|
||||||
**/
|
|
||||||
PolkadotPrimitivesV1ValidDisputeStatementKind: {
|
|
||||||
_enum: {
|
|
||||||
Explicit: 'Null',
|
|
||||||
BackingSeconded: 'H256',
|
|
||||||
BackingValid: 'H256',
|
|
||||||
ApprovalChecking: 'Null'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup341: polkadot_primitives::v1::InvalidDisputeStatementKind
|
|
||||||
**/
|
|
||||||
PolkadotPrimitivesV1InvalidDisputeStatementKind: {
|
|
||||||
_enum: ['Explicit']
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup353: sp_runtime::MultiSigner
|
|
||||||
**/
|
|
||||||
SpRuntimeMultiSigner: {
|
|
||||||
_enum: {
|
|
||||||
Ed25519: 'SpCoreEd25519Public',
|
|
||||||
Sr25519: 'SpCoreSr25519Public',
|
|
||||||
Ecdsa: 'SpCoreEcdsaPublic'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup354: sp_core::ecdsa::Public
|
|
||||||
**/
|
|
||||||
SpCoreEcdsaPublic: '[u8;33]',
|
|
||||||
/**
|
|
||||||
* Lookup359: polkadot_runtime::OriginCaller
|
|
||||||
**/
|
**/
|
||||||
PolkadotRuntimeOriginCaller: {
|
PolkadotRuntimeOriginCaller: {
|
||||||
_enum: {
|
_enum: {
|
||||||
@@ -316,7 +179,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup363: polkadot_runtime_parachains::origin::pallet::Origin
|
* Lookup210: polkadot_runtime_parachains::origin::pallet::Origin
|
||||||
**/
|
**/
|
||||||
PolkadotRuntimeParachainsOriginPalletOrigin: {
|
PolkadotRuntimeParachainsOriginPalletOrigin: {
|
||||||
_enum: {
|
_enum: {
|
||||||
@@ -324,7 +187,144 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup513: polkadot_runtime_parachains::configuration::HostConfiguration<BlockNumber>
|
* Lookup261: polkadot_runtime::NposCompactSolution16
|
||||||
|
**/
|
||||||
|
PolkadotRuntimeNposCompactSolution16: {
|
||||||
|
votes1: 'Vec<(Compact<u32>,Compact<u16>)>',
|
||||||
|
votes2: 'Vec<(Compact<u32>,(Compact<u16>,Compact<PerU16>),Compact<u16>)>',
|
||||||
|
votes3: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);2],Compact<u16>)>',
|
||||||
|
votes4: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);3],Compact<u16>)>',
|
||||||
|
votes5: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);4],Compact<u16>)>',
|
||||||
|
votes6: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);5],Compact<u16>)>',
|
||||||
|
votes7: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);6],Compact<u16>)>',
|
||||||
|
votes8: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);7],Compact<u16>)>',
|
||||||
|
votes9: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);8],Compact<u16>)>',
|
||||||
|
votes10: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);9],Compact<u16>)>',
|
||||||
|
votes11: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);10],Compact<u16>)>',
|
||||||
|
votes12: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);11],Compact<u16>)>',
|
||||||
|
votes13: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);12],Compact<u16>)>',
|
||||||
|
votes14: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);13],Compact<u16>)>',
|
||||||
|
votes15: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);14],Compact<u16>)>',
|
||||||
|
votes16: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);15],Compact<u16>)>'
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup323: polkadot_primitives::v1::InherentData<sp_runtime::generic::header::Header<Number, sp_runtime::traits::BlakeTwo256>>
|
||||||
|
**/
|
||||||
|
PolkadotPrimitivesV1InherentData: {
|
||||||
|
bitfields: 'Vec<PolkadotPrimitivesV1SignedUncheckedSigned>',
|
||||||
|
backedCandidates: 'Vec<PolkadotPrimitivesV1BackedCandidate>',
|
||||||
|
disputes: 'Vec<PolkadotPrimitivesV1DisputeStatementSet>',
|
||||||
|
parentHeader: 'SpRuntimeHeader'
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup325: polkadot_primitives::v1::signed::UncheckedSigned<polkadot_primitives::v1::AvailabilityBitfield, polkadot_primitives::v1::AvailabilityBitfield>
|
||||||
|
**/
|
||||||
|
PolkadotPrimitivesV1SignedUncheckedSigned: {
|
||||||
|
payload: 'BitVec',
|
||||||
|
validatorIndex: 'u32',
|
||||||
|
signature: 'PolkadotPrimitivesV0ValidatorAppSignature'
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup328: bitvec::order::Lsb0
|
||||||
|
**/
|
||||||
|
BitvecOrderLsb0: 'Null',
|
||||||
|
/**
|
||||||
|
* Lookup330: polkadot_primitives::v0::validator_app::Signature
|
||||||
|
**/
|
||||||
|
PolkadotPrimitivesV0ValidatorAppSignature: 'SpCoreSr25519Signature',
|
||||||
|
/**
|
||||||
|
* Lookup332: polkadot_primitives::v1::BackedCandidate<primitive_types::H256>
|
||||||
|
**/
|
||||||
|
PolkadotPrimitivesV1BackedCandidate: {
|
||||||
|
candidate: 'PolkadotPrimitivesV1CommittedCandidateReceipt',
|
||||||
|
validityVotes: 'Vec<PolkadotPrimitivesV0ValidityAttestation>',
|
||||||
|
validatorIndices: 'BitVec'
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup333: polkadot_primitives::v1::CommittedCandidateReceipt<primitive_types::H256>
|
||||||
|
**/
|
||||||
|
PolkadotPrimitivesV1CommittedCandidateReceipt: {
|
||||||
|
descriptor: 'PolkadotPrimitivesV1CandidateDescriptor',
|
||||||
|
commitments: 'PolkadotPrimitivesV1CandidateCommitments'
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup334: polkadot_primitives::v1::CandidateCommitments<N>
|
||||||
|
**/
|
||||||
|
PolkadotPrimitivesV1CandidateCommitments: {
|
||||||
|
upwardMessages: 'Vec<Bytes>',
|
||||||
|
horizontalMessages: 'Vec<PolkadotCorePrimitivesOutboundHrmpMessage>',
|
||||||
|
newValidationCode: 'Option<Bytes>',
|
||||||
|
headData: 'Bytes',
|
||||||
|
processedDownwardMessages: 'u32',
|
||||||
|
hrmpWatermark: 'u32'
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup336: polkadot_core_primitives::OutboundHrmpMessage<polkadot_parachain::primitives::Id>
|
||||||
|
**/
|
||||||
|
PolkadotCorePrimitivesOutboundHrmpMessage: {
|
||||||
|
recipient: 'u32',
|
||||||
|
data: 'Bytes'
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup340: polkadot_primitives::v0::ValidityAttestation
|
||||||
|
**/
|
||||||
|
PolkadotPrimitivesV0ValidityAttestation: {
|
||||||
|
_enum: {
|
||||||
|
__Unused0: 'Null',
|
||||||
|
Implicit: 'PolkadotPrimitivesV0ValidatorAppSignature',
|
||||||
|
Explicit: 'PolkadotPrimitivesV0ValidatorAppSignature'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup342: polkadot_primitives::v1::DisputeStatementSet
|
||||||
|
**/
|
||||||
|
PolkadotPrimitivesV1DisputeStatementSet: {
|
||||||
|
candidateHash: 'H256',
|
||||||
|
session: 'u32',
|
||||||
|
statements: 'Vec<(PolkadotPrimitivesV1DisputeStatement,u32,PolkadotPrimitivesV0ValidatorAppSignature)>'
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup346: polkadot_primitives::v1::DisputeStatement
|
||||||
|
**/
|
||||||
|
PolkadotPrimitivesV1DisputeStatement: {
|
||||||
|
_enum: {
|
||||||
|
Valid: 'PolkadotPrimitivesV1ValidDisputeStatementKind',
|
||||||
|
Invalid: 'PolkadotPrimitivesV1InvalidDisputeStatementKind'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup347: polkadot_primitives::v1::ValidDisputeStatementKind
|
||||||
|
**/
|
||||||
|
PolkadotPrimitivesV1ValidDisputeStatementKind: {
|
||||||
|
_enum: {
|
||||||
|
Explicit: 'Null',
|
||||||
|
BackingSeconded: 'H256',
|
||||||
|
BackingValid: 'H256',
|
||||||
|
ApprovalChecking: 'Null'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup348: polkadot_primitives::v1::InvalidDisputeStatementKind
|
||||||
|
**/
|
||||||
|
PolkadotPrimitivesV1InvalidDisputeStatementKind: {
|
||||||
|
_enum: ['Explicit']
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup360: sp_runtime::MultiSigner
|
||||||
|
**/
|
||||||
|
SpRuntimeMultiSigner: {
|
||||||
|
_enum: {
|
||||||
|
Ed25519: 'SpCoreEd25519Public',
|
||||||
|
Sr25519: 'SpCoreSr25519Public',
|
||||||
|
Ecdsa: 'SpCoreEcdsaPublic'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup361: sp_core::ecdsa::Public
|
||||||
|
**/
|
||||||
|
SpCoreEcdsaPublic: '[u8;33]',
|
||||||
|
/**
|
||||||
|
* Lookup514: polkadot_runtime_parachains::configuration::HostConfiguration<BlockNumber>
|
||||||
**/
|
**/
|
||||||
PolkadotRuntimeParachainsConfigurationHostConfiguration: {
|
PolkadotRuntimeParachainsConfigurationHostConfiguration: {
|
||||||
maxCodeSize: 'u32',
|
maxCodeSize: 'u32',
|
||||||
@@ -369,14 +369,14 @@ export default {
|
|||||||
umpMaxIndividualWeight: 'u64'
|
umpMaxIndividualWeight: 'u64'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup517: polkadot_runtime_parachains::inclusion::AvailabilityBitfieldRecord<N>
|
* Lookup518: polkadot_runtime_parachains::inclusion::AvailabilityBitfieldRecord<N>
|
||||||
**/
|
**/
|
||||||
PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord: {
|
PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord: {
|
||||||
bitfield: 'BitVec',
|
bitfield: 'BitVec',
|
||||||
submittedAt: 'u32'
|
submittedAt: 'u32'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup518: polkadot_runtime_parachains::inclusion::CandidatePendingAvailability<primitive_types::H256, N>
|
* Lookup519: polkadot_runtime_parachains::inclusion::CandidatePendingAvailability<primitive_types::H256, N>
|
||||||
**/
|
**/
|
||||||
PolkadotRuntimeParachainsInclusionCandidatePendingAvailability: {
|
PolkadotRuntimeParachainsInclusionCandidatePendingAvailability: {
|
||||||
_alias: {
|
_alias: {
|
||||||
@@ -392,7 +392,7 @@ export default {
|
|||||||
backingGroup: 'u32'
|
backingGroup: 'u32'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup520: polkadot_primitives::v1::ScrapedOnChainVotes<primitive_types::H256>
|
* Lookup521: polkadot_primitives::v1::ScrapedOnChainVotes<primitive_types::H256>
|
||||||
**/
|
**/
|
||||||
PolkadotPrimitivesV1ScrapedOnChainVotes: {
|
PolkadotPrimitivesV1ScrapedOnChainVotes: {
|
||||||
session: 'u32',
|
session: 'u32',
|
||||||
@@ -400,32 +400,32 @@ export default {
|
|||||||
disputes: 'Vec<PolkadotPrimitivesV1DisputeStatementSet>'
|
disputes: 'Vec<PolkadotPrimitivesV1DisputeStatementSet>'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup527: polkadot_runtime_parachains::scheduler::ParathreadClaimQueue
|
* Lookup528: polkadot_runtime_parachains::scheduler::ParathreadClaimQueue
|
||||||
**/
|
**/
|
||||||
PolkadotRuntimeParachainsSchedulerParathreadClaimQueue: {
|
PolkadotRuntimeParachainsSchedulerParathreadClaimQueue: {
|
||||||
queue: 'Vec<PolkadotRuntimeParachainsSchedulerQueuedParathread>',
|
queue: 'Vec<PolkadotRuntimeParachainsSchedulerQueuedParathread>',
|
||||||
nextCoreOffset: 'u32'
|
nextCoreOffset: 'u32'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup529: polkadot_runtime_parachains::scheduler::QueuedParathread
|
* Lookup530: polkadot_runtime_parachains::scheduler::QueuedParathread
|
||||||
**/
|
**/
|
||||||
PolkadotRuntimeParachainsSchedulerQueuedParathread: {
|
PolkadotRuntimeParachainsSchedulerQueuedParathread: {
|
||||||
claim: 'PolkadotPrimitivesV1ParathreadEntry',
|
claim: 'PolkadotPrimitivesV1ParathreadEntry',
|
||||||
coreOffset: 'u32'
|
coreOffset: 'u32'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup530: polkadot_primitives::v1::ParathreadEntry
|
* Lookup531: polkadot_primitives::v1::ParathreadEntry
|
||||||
**/
|
**/
|
||||||
PolkadotPrimitivesV1ParathreadEntry: {
|
PolkadotPrimitivesV1ParathreadEntry: {
|
||||||
claim: 'PolkadotPrimitivesV1ParathreadClaim',
|
claim: 'PolkadotPrimitivesV1ParathreadClaim',
|
||||||
retries: 'u32'
|
retries: 'u32'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup531: polkadot_primitives::v1::ParathreadClaim
|
* Lookup532: polkadot_primitives::v1::ParathreadClaim
|
||||||
**/
|
**/
|
||||||
PolkadotPrimitivesV1ParathreadClaim: '(u32,PolkadotPrimitivesV0CollatorAppPublic)',
|
PolkadotPrimitivesV1ParathreadClaim: '(u32,PolkadotPrimitivesV0CollatorAppPublic)',
|
||||||
/**
|
/**
|
||||||
* Lookup534: polkadot_primitives::v1::CoreOccupied
|
* Lookup535: polkadot_primitives::v1::CoreOccupied
|
||||||
**/
|
**/
|
||||||
PolkadotPrimitivesV1CoreOccupied: {
|
PolkadotPrimitivesV1CoreOccupied: {
|
||||||
_enum: {
|
_enum: {
|
||||||
@@ -434,7 +434,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup537: polkadot_runtime_parachains::scheduler::CoreAssignment
|
* Lookup538: polkadot_runtime_parachains::scheduler::CoreAssignment
|
||||||
**/
|
**/
|
||||||
PolkadotRuntimeParachainsSchedulerCoreAssignment: {
|
PolkadotRuntimeParachainsSchedulerCoreAssignment: {
|
||||||
core: 'u32',
|
core: 'u32',
|
||||||
@@ -443,7 +443,7 @@ export default {
|
|||||||
groupIdx: 'u32'
|
groupIdx: 'u32'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup538: polkadot_runtime_parachains::scheduler::AssignmentKind
|
* Lookup539: polkadot_runtime_parachains::scheduler::AssignmentKind
|
||||||
**/
|
**/
|
||||||
PolkadotRuntimeParachainsSchedulerAssignmentKind: {
|
PolkadotRuntimeParachainsSchedulerAssignmentKind: {
|
||||||
_enum: {
|
_enum: {
|
||||||
@@ -452,39 +452,39 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup539: polkadot_runtime_parachains::paras::ParaLifecycle
|
* Lookup540: polkadot_runtime_parachains::paras::ParaLifecycle
|
||||||
**/
|
**/
|
||||||
PolkadotRuntimeParachainsParasParaLifecycle: {
|
PolkadotRuntimeParachainsParasParaLifecycle: {
|
||||||
_enum: ['Onboarding', 'Parathread', 'Parachain', 'UpgradingParathread', 'DowngradingParachain', 'OffboardingParathread', 'OffboardingParachain']
|
_enum: ['Onboarding', 'Parathread', 'Parachain', 'UpgradingParathread', 'DowngradingParachain', 'OffboardingParathread', 'OffboardingParachain']
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup541: polkadot_runtime_parachains::paras::ParaPastCodeMeta<N>
|
* Lookup542: polkadot_runtime_parachains::paras::ParaPastCodeMeta<N>
|
||||||
**/
|
**/
|
||||||
PolkadotRuntimeParachainsParasParaPastCodeMeta: {
|
PolkadotRuntimeParachainsParasParaPastCodeMeta: {
|
||||||
upgradeTimes: 'Vec<PolkadotRuntimeParachainsParasReplacementTimes>',
|
upgradeTimes: 'Vec<PolkadotRuntimeParachainsParasReplacementTimes>',
|
||||||
lastPruned: 'Option<u32>'
|
lastPruned: 'Option<u32>'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup543: polkadot_runtime_parachains::paras::ReplacementTimes<N>
|
* Lookup544: polkadot_runtime_parachains::paras::ReplacementTimes<N>
|
||||||
**/
|
**/
|
||||||
PolkadotRuntimeParachainsParasReplacementTimes: {
|
PolkadotRuntimeParachainsParasReplacementTimes: {
|
||||||
expectedAt: 'u32',
|
expectedAt: 'u32',
|
||||||
activatedAt: 'u32'
|
activatedAt: 'u32'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup545: polkadot_primitives::v1::UpgradeGoAhead
|
* Lookup546: polkadot_primitives::v1::UpgradeGoAhead
|
||||||
**/
|
**/
|
||||||
PolkadotPrimitivesV1UpgradeGoAhead: {
|
PolkadotPrimitivesV1UpgradeGoAhead: {
|
||||||
_enum: ['Abort', 'GoAhead']
|
_enum: ['Abort', 'GoAhead']
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup546: polkadot_primitives::v1::UpgradeRestriction
|
* Lookup547: polkadot_primitives::v1::UpgradeRestriction
|
||||||
**/
|
**/
|
||||||
PolkadotPrimitivesV1UpgradeRestriction: {
|
PolkadotPrimitivesV1UpgradeRestriction: {
|
||||||
_enum: ['Present']
|
_enum: ['Present']
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup547: polkadot_runtime_parachains::paras::ParaGenesisArgs
|
* Lookup548: polkadot_runtime_parachains::paras::ParaGenesisArgs
|
||||||
**/
|
**/
|
||||||
PolkadotRuntimeParachainsParasParaGenesisArgs: {
|
PolkadotRuntimeParachainsParasParaGenesisArgs: {
|
||||||
genesisHead: 'Bytes',
|
genesisHead: 'Bytes',
|
||||||
@@ -492,7 +492,7 @@ export default {
|
|||||||
parachain: 'bool'
|
parachain: 'bool'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup550: polkadot_runtime_parachains::initializer::BufferedSessionChange
|
* Lookup551: polkadot_runtime_parachains::initializer::BufferedSessionChange
|
||||||
**/
|
**/
|
||||||
PolkadotRuntimeParachainsInitializerBufferedSessionChange: {
|
PolkadotRuntimeParachainsInitializerBufferedSessionChange: {
|
||||||
validators: 'Vec<PolkadotPrimitivesV0ValidatorAppPublic>',
|
validators: 'Vec<PolkadotPrimitivesV0ValidatorAppPublic>',
|
||||||
@@ -500,14 +500,14 @@ export default {
|
|||||||
sessionIndex: 'u32'
|
sessionIndex: 'u32'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup552: polkadot_core_primitives::InboundDownwardMessage<BlockNumber>
|
* Lookup553: polkadot_core_primitives::InboundDownwardMessage<BlockNumber>
|
||||||
**/
|
**/
|
||||||
PolkadotCorePrimitivesInboundDownwardMessage: {
|
PolkadotCorePrimitivesInboundDownwardMessage: {
|
||||||
sentAt: 'u32',
|
sentAt: 'u32',
|
||||||
msg: 'Bytes'
|
msg: 'Bytes'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup555: polkadot_runtime_parachains::hrmp::HrmpOpenChannelRequest
|
* Lookup556: polkadot_runtime_parachains::hrmp::HrmpOpenChannelRequest
|
||||||
**/
|
**/
|
||||||
PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest: {
|
PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest: {
|
||||||
confirmed: 'bool',
|
confirmed: 'bool',
|
||||||
@@ -518,7 +518,7 @@ export default {
|
|||||||
maxTotalSize: 'u32'
|
maxTotalSize: 'u32'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup557: polkadot_runtime_parachains::hrmp::HrmpChannel
|
* Lookup558: polkadot_runtime_parachains::hrmp::HrmpChannel
|
||||||
**/
|
**/
|
||||||
PolkadotRuntimeParachainsHrmpHrmpChannel: {
|
PolkadotRuntimeParachainsHrmpHrmpChannel: {
|
||||||
maxCapacity: 'u32',
|
maxCapacity: 'u32',
|
||||||
@@ -531,14 +531,14 @@ export default {
|
|||||||
recipientDeposit: 'u128'
|
recipientDeposit: 'u128'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup560: polkadot_core_primitives::InboundHrmpMessage<BlockNumber>
|
* Lookup561: polkadot_core_primitives::InboundHrmpMessage<BlockNumber>
|
||||||
**/
|
**/
|
||||||
PolkadotCorePrimitivesInboundHrmpMessage: {
|
PolkadotCorePrimitivesInboundHrmpMessage: {
|
||||||
sentAt: 'u32',
|
sentAt: 'u32',
|
||||||
data: 'Bytes'
|
data: 'Bytes'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup565: polkadot_primitives::v1::SessionInfo
|
* Lookup566: polkadot_primitives::v1::SessionInfo
|
||||||
**/
|
**/
|
||||||
PolkadotPrimitivesV1SessionInfo: {
|
PolkadotPrimitivesV1SessionInfo: {
|
||||||
validators: 'Vec<PolkadotPrimitivesV0ValidatorAppPublic>',
|
validators: 'Vec<PolkadotPrimitivesV0ValidatorAppPublic>',
|
||||||
@@ -553,7 +553,7 @@ export default {
|
|||||||
neededApprovals: 'u32'
|
neededApprovals: 'u32'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup567: polkadot_runtime_common::paras_registrar::ParaInfo<sp_core::crypto::AccountId32, Balance>
|
* Lookup568: polkadot_runtime_common::paras_registrar::ParaInfo<sp_core::crypto::AccountId32, Balance>
|
||||||
**/
|
**/
|
||||||
PolkadotRuntimeCommonParasRegistrarParaInfo: {
|
PolkadotRuntimeCommonParasRegistrarParaInfo: {
|
||||||
manager: 'AccountId32',
|
manager: 'AccountId32',
|
||||||
@@ -561,7 +561,7 @@ export default {
|
|||||||
locked: 'bool'
|
locked: 'bool'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup577: polkadot_runtime_common::crowdloan::FundInfo<sp_core::crypto::AccountId32, Balance, BlockNumber, LeasePeriod>
|
* Lookup578: polkadot_runtime_common::crowdloan::FundInfo<sp_core::crypto::AccountId32, Balance, BlockNumber, LeasePeriod>
|
||||||
**/
|
**/
|
||||||
PolkadotRuntimeCommonCrowdloanFundInfo: {
|
PolkadotRuntimeCommonCrowdloanFundInfo: {
|
||||||
depositor: 'AccountId32',
|
depositor: 'AccountId32',
|
||||||
@@ -576,7 +576,7 @@ export default {
|
|||||||
trieIndex: 'u32'
|
trieIndex: 'u32'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup578: polkadot_runtime_common::crowdloan::LastContribution<BlockNumber>
|
* Lookup579: polkadot_runtime_common::crowdloan::LastContribution<BlockNumber>
|
||||||
**/
|
**/
|
||||||
PolkadotRuntimeCommonCrowdloanLastContribution: {
|
PolkadotRuntimeCommonCrowdloanLastContribution: {
|
||||||
_enum: {
|
_enum: {
|
||||||
@@ -586,11 +586,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup590: polkadot_runtime_common::claims::PrevalidateAttests<T>
|
* Lookup591: polkadot_runtime_common::claims::PrevalidateAttests<T>
|
||||||
**/
|
**/
|
||||||
PolkadotRuntimeCommonClaimsPrevalidateAttests: 'Null',
|
PolkadotRuntimeCommonClaimsPrevalidateAttests: 'Null',
|
||||||
/**
|
/**
|
||||||
* Lookup591: polkadot_runtime::Runtime
|
* Lookup592: polkadot_runtime::Runtime
|
||||||
**/
|
**/
|
||||||
PolkadotRuntimeRuntime: 'Null'
|
PolkadotRuntimeRuntime: 'Null'
|
||||||
} as DefinitionsTypes;
|
} as DefinitionsTypes;
|
||||||
|
|||||||
@@ -36,13 +36,13 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* Lookup11: sp_runtime::generic::digest::Digest<primitive_types::H256>
|
* Lookup11: sp_runtime::generic::digest::Digest<primitive_types::H256>
|
||||||
**/
|
**/
|
||||||
SpRuntimeGenericDigest: {
|
SpRuntimeDigest: {
|
||||||
logs: 'Vec<SpRuntimeGenericDigestDigestItem>'
|
logs: 'Vec<SpRuntimeDigestDigestItem>'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup13: sp_runtime::generic::digest::DigestItem<primitive_types::H256>
|
* Lookup13: sp_runtime::generic::digest::DigestItem<primitive_types::H256>
|
||||||
**/
|
**/
|
||||||
SpRuntimeGenericDigestDigestItem: {
|
SpRuntimeDigestDigestItem: {
|
||||||
_enum: {
|
_enum: {
|
||||||
Other: 'Bytes',
|
Other: 'Bytes',
|
||||||
__Unused1: 'Null',
|
__Unused1: 'Null',
|
||||||
@@ -51,14 +51,14 @@ export default {
|
|||||||
Consensus: '([u8;4],Bytes)',
|
Consensus: '([u8;4],Bytes)',
|
||||||
Seal: '([u8;4],Bytes)',
|
Seal: '([u8;4],Bytes)',
|
||||||
PreRuntime: '([u8;4],Bytes)',
|
PreRuntime: '([u8;4],Bytes)',
|
||||||
ChangesTrieSignal: 'SpRuntimeGenericDigestChangesTrieSignal',
|
ChangesTrieSignal: 'SpRuntimeDigestChangesTrieSignal',
|
||||||
RuntimeEnvironmentUpdated: 'Null'
|
RuntimeEnvironmentUpdated: 'Null'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup15: sp_runtime::generic::digest::ChangesTrieSignal
|
* Lookup15: sp_runtime::generic::digest::ChangesTrieSignal
|
||||||
**/
|
**/
|
||||||
SpRuntimeGenericDigestChangesTrieSignal: {
|
SpRuntimeDigestChangesTrieSignal: {
|
||||||
_enum: {
|
_enum: {
|
||||||
NewConfiguration: 'Option<SpCoreChangesTrieChangesTrieConfiguration>'
|
NewConfiguration: 'Option<SpCoreChangesTrieChangesTrieConfiguration>'
|
||||||
}
|
}
|
||||||
@@ -129,19 +129,19 @@ export default {
|
|||||||
_enum: ['Underflow', 'Overflow', 'DivisionByZero']
|
_enum: ['Underflow', 'Overflow', 'DivisionByZero']
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup31: frame_support::traits::tokens::misc::BalanceStatus
|
* Lookup33: frame_support::traits::tokens::misc::BalanceStatus
|
||||||
**/
|
**/
|
||||||
FrameSupportTokensMiscBalanceStatus: {
|
FrameSupportTokensMiscBalanceStatus: {
|
||||||
_enum: ['Free', 'Reserved']
|
_enum: ['Free', 'Reserved']
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup33: pallet_election_provider_multi_phase::ElectionCompute
|
* Lookup35: pallet_election_provider_multi_phase::ElectionCompute
|
||||||
**/
|
**/
|
||||||
PalletElectionProviderMultiPhaseElectionCompute: {
|
PalletElectionProviderMultiPhaseElectionCompute: {
|
||||||
_enum: ['OnChain', 'Signed', 'Unsigned', 'Fallback', 'Emergency']
|
_enum: ['OnChain', 'Signed', 'Unsigned', 'Fallback', 'Emergency']
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup40: pallet_democracy::vote_threshold::VoteThreshold
|
* Lookup42: pallet_democracy::vote_threshold::VoteThreshold
|
||||||
**/
|
**/
|
||||||
PalletDemocracyVoteThreshold: {
|
PalletDemocracyVoteThreshold: {
|
||||||
_enum: ['SuperMajorityApprove', 'SuperMajorityAgainst', 'SimpleMajority']
|
_enum: ['SuperMajorityApprove', 'SuperMajorityAgainst', 'SimpleMajority']
|
||||||
@@ -271,18 +271,18 @@ export default {
|
|||||||
SpConsensusSlotsEquivocationProof: {
|
SpConsensusSlotsEquivocationProof: {
|
||||||
offender: 'SpConsensusBabeAppPublic',
|
offender: 'SpConsensusBabeAppPublic',
|
||||||
slot: 'u64',
|
slot: 'u64',
|
||||||
firstHeader: 'SpRuntimeGenericHeader',
|
firstHeader: 'SpRuntimeHeader',
|
||||||
secondHeader: 'SpRuntimeGenericHeader'
|
secondHeader: 'SpRuntimeHeader'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup123: sp_runtime::generic::header::Header<Number, sp_runtime::traits::BlakeTwo256>
|
* Lookup123: sp_runtime::generic::header::Header<Number, sp_runtime::traits::BlakeTwo256>
|
||||||
**/
|
**/
|
||||||
SpRuntimeGenericHeader: {
|
SpRuntimeHeader: {
|
||||||
parentHash: 'H256',
|
parentHash: 'H256',
|
||||||
number: 'Compact<u32>',
|
number: 'Compact<u32>',
|
||||||
stateRoot: 'H256',
|
stateRoot: 'H256',
|
||||||
extrinsicsRoot: 'H256',
|
extrinsicsRoot: 'H256',
|
||||||
digest: 'SpRuntimeGenericDigest'
|
digest: 'SpRuntimeDigest'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup124: sp_runtime::traits::BlakeTwo256
|
* Lookup124: sp_runtime::traits::BlakeTwo256
|
||||||
@@ -591,14 +591,59 @@ export default {
|
|||||||
proof: 'Vec<Bytes>'
|
proof: 'Vec<Bytes>'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup314: sp_consensus_babe::BabeEpochConfiguration
|
* Lookup307: node_runtime::OriginCaller
|
||||||
|
**/
|
||||||
|
NodeRuntimeOriginCaller: {
|
||||||
|
_enum: {
|
||||||
|
system: 'FrameSystemRawOrigin',
|
||||||
|
__Unused1: 'Null',
|
||||||
|
__Unused2: 'Null',
|
||||||
|
Void: 'SpCoreVoid',
|
||||||
|
__Unused4: 'Null',
|
||||||
|
__Unused5: 'Null',
|
||||||
|
__Unused6: 'Null',
|
||||||
|
__Unused7: 'Null',
|
||||||
|
__Unused8: 'Null',
|
||||||
|
__Unused9: 'Null',
|
||||||
|
__Unused10: 'Null',
|
||||||
|
__Unused11: 'Null',
|
||||||
|
Council: 'PalletCollectiveRawOrigin',
|
||||||
|
TechnicalCommittee: 'PalletCollectiveRawOrigin'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup308: frame_system::RawOrigin<sp_core::crypto::AccountId32>
|
||||||
|
**/
|
||||||
|
FrameSystemRawOrigin: {
|
||||||
|
_enum: {
|
||||||
|
Root: 'Null',
|
||||||
|
Signed: 'AccountId32',
|
||||||
|
None: 'Null'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup309: pallet_collective::RawOrigin<sp_core::crypto::AccountId32, I>
|
||||||
|
**/
|
||||||
|
PalletCollectiveRawOrigin: {
|
||||||
|
_enum: {
|
||||||
|
Members: '(u32,u32)',
|
||||||
|
Member: 'AccountId32',
|
||||||
|
_Phantom: 'Null'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Lookup311: sp_core::Void
|
||||||
|
**/
|
||||||
|
SpCoreVoid: 'Null',
|
||||||
|
/**
|
||||||
|
* Lookup319: sp_consensus_babe::BabeEpochConfiguration
|
||||||
**/
|
**/
|
||||||
SpConsensusBabeBabeEpochConfiguration: {
|
SpConsensusBabeBabeEpochConfiguration: {
|
||||||
c: '(u64,u64)',
|
c: '(u64,u64)',
|
||||||
allowedSlots: 'SpConsensusBabeAllowedSlots'
|
allowedSlots: 'SpConsensusBabeAllowedSlots'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup317: pallet_authorship::UncleEntryItem<BlockNumber, primitive_types::H256, sp_core::crypto::AccountId32>
|
* Lookup322: pallet_authorship::UncleEntryItem<BlockNumber, primitive_types::H256, sp_core::crypto::AccountId32>
|
||||||
**/
|
**/
|
||||||
PalletAuthorshipUncleEntryItem: {
|
PalletAuthorshipUncleEntryItem: {
|
||||||
_enum: {
|
_enum: {
|
||||||
@@ -607,7 +652,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup322: pallet_balances::BalanceLock<Balance>
|
* Lookup327: pallet_balances::BalanceLock<Balance>
|
||||||
**/
|
**/
|
||||||
PalletBalancesBalanceLock: {
|
PalletBalancesBalanceLock: {
|
||||||
id: '[u8;8]',
|
id: '[u8;8]',
|
||||||
@@ -615,32 +660,32 @@ export default {
|
|||||||
reasons: 'PalletBalancesReasons'
|
reasons: 'PalletBalancesReasons'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup323: pallet_balances::Reasons
|
* Lookup328: pallet_balances::Reasons
|
||||||
**/
|
**/
|
||||||
PalletBalancesReasons: {
|
PalletBalancesReasons: {
|
||||||
_enum: ['Fee', 'Misc', 'All']
|
_enum: ['Fee', 'Misc', 'All']
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup326: pallet_balances::ReserveData<ReserveIdentifier, Balance>
|
* Lookup331: pallet_balances::ReserveData<ReserveIdentifier, Balance>
|
||||||
**/
|
**/
|
||||||
PalletBalancesReserveData: {
|
PalletBalancesReserveData: {
|
||||||
id: '[u8;8]',
|
id: '[u8;8]',
|
||||||
amount: 'u128'
|
amount: 'u128'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup328: pallet_balances::Releases
|
* Lookup333: pallet_balances::Releases
|
||||||
**/
|
**/
|
||||||
PalletBalancesReleases: {
|
PalletBalancesReleases: {
|
||||||
_enum: ['V1_0_0', 'V2_0_0']
|
_enum: ['V1_0_0', 'V2_0_0']
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup331: pallet_transaction_payment::Releases
|
* Lookup336: pallet_transaction_payment::Releases
|
||||||
**/
|
**/
|
||||||
PalletTransactionPaymentReleases: {
|
PalletTransactionPaymentReleases: {
|
||||||
_enum: ['V1Ancient', 'V2']
|
_enum: ['V1Ancient', 'V2']
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup333: frame_support::weights::WeightToFeeCoefficient<Balance>
|
* Lookup338: frame_support::weights::WeightToFeeCoefficient<Balance>
|
||||||
**/
|
**/
|
||||||
FrameSupportWeightsWeightToFeeCoefficient: {
|
FrameSupportWeightsWeightToFeeCoefficient: {
|
||||||
coeffInteger: 'u128',
|
coeffInteger: 'u128',
|
||||||
@@ -649,7 +694,7 @@ export default {
|
|||||||
degree: 'u8'
|
degree: 'u8'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup334: pallet_election_provider_multi_phase::Phase<Bn>
|
* Lookup339: pallet_election_provider_multi_phase::Phase<Bn>
|
||||||
**/
|
**/
|
||||||
PalletElectionProviderMultiPhasePhase: {
|
PalletElectionProviderMultiPhasePhase: {
|
||||||
_enum: {
|
_enum: {
|
||||||
@@ -660,7 +705,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup336: pallet_election_provider_multi_phase::ReadySolution<sp_core::crypto::AccountId32>
|
* Lookup341: pallet_election_provider_multi_phase::ReadySolution<sp_core::crypto::AccountId32>
|
||||||
**/
|
**/
|
||||||
PalletElectionProviderMultiPhaseReadySolution: {
|
PalletElectionProviderMultiPhaseReadySolution: {
|
||||||
supports: 'Vec<(AccountId32,SpNposElectionsSupport)>',
|
supports: 'Vec<(AccountId32,SpNposElectionsSupport)>',
|
||||||
@@ -668,14 +713,14 @@ export default {
|
|||||||
compute: 'PalletElectionProviderMultiPhaseElectionCompute'
|
compute: 'PalletElectionProviderMultiPhaseElectionCompute'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup337: pallet_election_provider_multi_phase::RoundSnapshot<sp_core::crypto::AccountId32>
|
* Lookup342: pallet_election_provider_multi_phase::RoundSnapshot<sp_core::crypto::AccountId32>
|
||||||
**/
|
**/
|
||||||
PalletElectionProviderMultiPhaseRoundSnapshot: {
|
PalletElectionProviderMultiPhaseRoundSnapshot: {
|
||||||
voters: 'Vec<(AccountId32,u64,Vec<AccountId32>)>',
|
voters: 'Vec<(AccountId32,u64,Vec<AccountId32>)>',
|
||||||
targets: 'Vec<AccountId32>'
|
targets: 'Vec<AccountId32>'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup344: pallet_election_provider_multi_phase::signed::SignedSubmission<sp_core::crypto::AccountId32, Balance, node_runtime::NposSolution16>
|
* Lookup349: pallet_election_provider_multi_phase::signed::SignedSubmission<sp_core::crypto::AccountId32, Balance, node_runtime::NposSolution16>
|
||||||
**/
|
**/
|
||||||
PalletElectionProviderMultiPhaseSignedSignedSubmission: {
|
PalletElectionProviderMultiPhaseSignedSignedSubmission: {
|
||||||
who: 'AccountId32',
|
who: 'AccountId32',
|
||||||
@@ -684,7 +729,7 @@ export default {
|
|||||||
reward: 'u128'
|
reward: 'u128'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup346: pallet_staking::StakingLedger<sp_core::crypto::AccountId32, Balance>
|
* Lookup351: pallet_staking::StakingLedger<sp_core::crypto::AccountId32, Balance>
|
||||||
**/
|
**/
|
||||||
PalletStakingStakingLedger: {
|
PalletStakingStakingLedger: {
|
||||||
stash: 'AccountId32',
|
stash: 'AccountId32',
|
||||||
@@ -694,14 +739,14 @@ export default {
|
|||||||
claimedRewards: 'Vec<u32>'
|
claimedRewards: 'Vec<u32>'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup348: pallet_staking::UnlockChunk<Balance>
|
* Lookup353: pallet_staking::UnlockChunk<Balance>
|
||||||
**/
|
**/
|
||||||
PalletStakingUnlockChunk: {
|
PalletStakingUnlockChunk: {
|
||||||
value: 'Compact<u128>',
|
value: 'Compact<u128>',
|
||||||
era: 'Compact<u32>'
|
era: 'Compact<u32>'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup349: pallet_staking::Nominations<sp_core::crypto::AccountId32>
|
* Lookup354: pallet_staking::Nominations<sp_core::crypto::AccountId32>
|
||||||
**/
|
**/
|
||||||
PalletStakingNominations: {
|
PalletStakingNominations: {
|
||||||
targets: 'Vec<AccountId32>',
|
targets: 'Vec<AccountId32>',
|
||||||
@@ -709,27 +754,27 @@ export default {
|
|||||||
suppressed: 'bool'
|
suppressed: 'bool'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup350: pallet_staking::ActiveEraInfo
|
* Lookup355: pallet_staking::ActiveEraInfo
|
||||||
**/
|
**/
|
||||||
PalletStakingActiveEraInfo: {
|
PalletStakingActiveEraInfo: {
|
||||||
index: 'u32',
|
index: 'u32',
|
||||||
start: 'Option<u64>'
|
start: 'Option<u64>'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup352: pallet_staking::EraRewardPoints<sp_core::crypto::AccountId32>
|
* Lookup357: pallet_staking::EraRewardPoints<sp_core::crypto::AccountId32>
|
||||||
**/
|
**/
|
||||||
PalletStakingEraRewardPoints: {
|
PalletStakingEraRewardPoints: {
|
||||||
total: 'u32',
|
total: 'u32',
|
||||||
individual: 'BTreeMap<AccountId32, u32>'
|
individual: 'BTreeMap<AccountId32, u32>'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup356: pallet_staking::Forcing
|
* Lookup361: pallet_staking::Forcing
|
||||||
**/
|
**/
|
||||||
PalletStakingForcing: {
|
PalletStakingForcing: {
|
||||||
_enum: ['NotForcing', 'ForceNew', 'ForceNone', 'ForceAlways']
|
_enum: ['NotForcing', 'ForceNew', 'ForceNone', 'ForceAlways']
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup358: pallet_staking::UnappliedSlash<sp_core::crypto::AccountId32, Balance>
|
* Lookup363: pallet_staking::UnappliedSlash<sp_core::crypto::AccountId32, Balance>
|
||||||
**/
|
**/
|
||||||
PalletStakingUnappliedSlash: {
|
PalletStakingUnappliedSlash: {
|
||||||
validator: 'AccountId32',
|
validator: 'AccountId32',
|
||||||
@@ -739,7 +784,7 @@ export default {
|
|||||||
payout: 'u128'
|
payout: 'u128'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup360: pallet_staking::slashing::SlashingSpans
|
* Lookup365: pallet_staking::slashing::SlashingSpans
|
||||||
**/
|
**/
|
||||||
PalletStakingSlashingSlashingSpans: {
|
PalletStakingSlashingSlashingSpans: {
|
||||||
spanIndex: 'u32',
|
spanIndex: 'u32',
|
||||||
@@ -748,24 +793,24 @@ export default {
|
|||||||
prior: 'Vec<u32>'
|
prior: 'Vec<u32>'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup361: pallet_staking::slashing::SpanRecord<Balance>
|
* Lookup366: pallet_staking::slashing::SpanRecord<Balance>
|
||||||
**/
|
**/
|
||||||
PalletStakingSlashingSpanRecord: {
|
PalletStakingSlashingSpanRecord: {
|
||||||
slashed: 'u128',
|
slashed: 'u128',
|
||||||
paidOut: 'u128'
|
paidOut: 'u128'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup364: pallet_staking::Releases
|
* Lookup369: pallet_staking::Releases
|
||||||
**/
|
**/
|
||||||
PalletStakingReleases: {
|
PalletStakingReleases: {
|
||||||
_enum: ['V1_0_0Ancient', 'V2_0_0', 'V3_0_0', 'V4_0_0', 'V5_0_0', 'V6_0_0', 'V7_0_0', 'V8_0_0']
|
_enum: ['V1_0_0Ancient', 'V2_0_0', 'V3_0_0', 'V4_0_0', 'V5_0_0', 'V6_0_0', 'V7_0_0', 'V8_0_0']
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup369: sp_core::crypto::KeyTypeId
|
* Lookup374: sp_core::crypto::KeyTypeId
|
||||||
**/
|
**/
|
||||||
SpCoreCryptoKeyTypeId: '[u8;4]',
|
SpCoreCryptoKeyTypeId: '[u8;4]',
|
||||||
/**
|
/**
|
||||||
* Lookup374: pallet_democracy::PreimageStatus<sp_core::crypto::AccountId32, Balance, BlockNumber>
|
* Lookup379: pallet_democracy::PreimageStatus<sp_core::crypto::AccountId32, Balance, BlockNumber>
|
||||||
**/
|
**/
|
||||||
PalletDemocracyPreimageStatus: {
|
PalletDemocracyPreimageStatus: {
|
||||||
_enum: {
|
_enum: {
|
||||||
@@ -780,7 +825,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup375: pallet_democracy::types::ReferendumInfo<BlockNumber, primitive_types::H256, Balance>
|
* Lookup380: pallet_democracy::types::ReferendumInfo<BlockNumber, primitive_types::H256, Balance>
|
||||||
**/
|
**/
|
||||||
PalletDemocracyReferendumInfo: {
|
PalletDemocracyReferendumInfo: {
|
||||||
_enum: {
|
_enum: {
|
||||||
@@ -792,7 +837,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup376: pallet_democracy::types::ReferendumStatus<BlockNumber, primitive_types::H256, Balance>
|
* Lookup381: pallet_democracy::types::ReferendumStatus<BlockNumber, primitive_types::H256, Balance>
|
||||||
**/
|
**/
|
||||||
PalletDemocracyReferendumStatus: {
|
PalletDemocracyReferendumStatus: {
|
||||||
end: 'u32',
|
end: 'u32',
|
||||||
@@ -802,7 +847,7 @@ export default {
|
|||||||
tally: 'PalletDemocracyTally'
|
tally: 'PalletDemocracyTally'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup377: pallet_democracy::types::Tally<Balance>
|
* Lookup382: pallet_democracy::types::Tally<Balance>
|
||||||
**/
|
**/
|
||||||
PalletDemocracyTally: {
|
PalletDemocracyTally: {
|
||||||
ayes: 'u128',
|
ayes: 'u128',
|
||||||
@@ -810,7 +855,7 @@ export default {
|
|||||||
turnout: 'u128'
|
turnout: 'u128'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup378: pallet_democracy::vote::Voting<Balance, sp_core::crypto::AccountId32, BlockNumber>
|
* Lookup383: pallet_democracy::vote::Voting<Balance, sp_core::crypto::AccountId32, BlockNumber>
|
||||||
**/
|
**/
|
||||||
PalletDemocracyVoteVoting: {
|
PalletDemocracyVoteVoting: {
|
||||||
_enum: {
|
_enum: {
|
||||||
@@ -829,24 +874,24 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup381: pallet_democracy::types::Delegations<Balance>
|
* Lookup386: pallet_democracy::types::Delegations<Balance>
|
||||||
**/
|
**/
|
||||||
PalletDemocracyDelegations: {
|
PalletDemocracyDelegations: {
|
||||||
votes: 'u128',
|
votes: 'u128',
|
||||||
capital: 'u128'
|
capital: 'u128'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup382: pallet_democracy::vote::PriorLock<BlockNumber, Balance>
|
* Lookup387: pallet_democracy::vote::PriorLock<BlockNumber, Balance>
|
||||||
**/
|
**/
|
||||||
PalletDemocracyVotePriorLock: '(u32,u128)',
|
PalletDemocracyVotePriorLock: '(u32,u128)',
|
||||||
/**
|
/**
|
||||||
* Lookup385: pallet_democracy::Releases
|
* Lookup390: pallet_democracy::Releases
|
||||||
**/
|
**/
|
||||||
PalletDemocracyReleases: {
|
PalletDemocracyReleases: {
|
||||||
_enum: ['V1']
|
_enum: ['V1']
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup388: pallet_collective::Votes<sp_core::crypto::AccountId32, BlockNumber>
|
* Lookup393: pallet_collective::Votes<sp_core::crypto::AccountId32, BlockNumber>
|
||||||
**/
|
**/
|
||||||
PalletCollectiveVotes: {
|
PalletCollectiveVotes: {
|
||||||
index: 'u32',
|
index: 'u32',
|
||||||
@@ -856,7 +901,7 @@ export default {
|
|||||||
end: 'u32'
|
end: 'u32'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup393: pallet_elections_phragmen::SeatHolder<sp_core::crypto::AccountId32, Balance>
|
* Lookup398: pallet_elections_phragmen::SeatHolder<sp_core::crypto::AccountId32, Balance>
|
||||||
**/
|
**/
|
||||||
PalletElectionsPhragmenSeatHolder: {
|
PalletElectionsPhragmenSeatHolder: {
|
||||||
who: 'AccountId32',
|
who: 'AccountId32',
|
||||||
@@ -864,7 +909,7 @@ export default {
|
|||||||
deposit: 'u128'
|
deposit: 'u128'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup394: pallet_elections_phragmen::Voter<sp_core::crypto::AccountId32, Balance>
|
* Lookup399: pallet_elections_phragmen::Voter<sp_core::crypto::AccountId32, Balance>
|
||||||
**/
|
**/
|
||||||
PalletElectionsPhragmenVoter: {
|
PalletElectionsPhragmenVoter: {
|
||||||
votes: 'Vec<AccountId32>',
|
votes: 'Vec<AccountId32>',
|
||||||
@@ -872,7 +917,7 @@ export default {
|
|||||||
deposit: 'u128'
|
deposit: 'u128'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup397: pallet_grandpa::StoredState<N>
|
* Lookup402: pallet_grandpa::StoredState<N>
|
||||||
**/
|
**/
|
||||||
PalletGrandpaStoredState: {
|
PalletGrandpaStoredState: {
|
||||||
_enum: {
|
_enum: {
|
||||||
@@ -889,7 +934,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup398: pallet_grandpa::StoredPendingChange<N, Limit>
|
* Lookup403: pallet_grandpa::StoredPendingChange<N, Limit>
|
||||||
**/
|
**/
|
||||||
PalletGrandpaStoredPendingChange: {
|
PalletGrandpaStoredPendingChange: {
|
||||||
scheduledAt: 'u32',
|
scheduledAt: 'u32',
|
||||||
@@ -898,7 +943,7 @@ export default {
|
|||||||
forced: 'Option<u32>'
|
forced: 'Option<u32>'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup401: pallet_treasury::Proposal<sp_core::crypto::AccountId32, Balance>
|
* Lookup406: pallet_treasury::Proposal<sp_core::crypto::AccountId32, Balance>
|
||||||
**/
|
**/
|
||||||
PalletTreasuryProposal: {
|
PalletTreasuryProposal: {
|
||||||
proposer: 'AccountId32',
|
proposer: 'AccountId32',
|
||||||
@@ -907,11 +952,11 @@ export default {
|
|||||||
bond: 'u128'
|
bond: 'u128'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup404: frame_support::PalletId
|
* Lookup409: frame_support::PalletId
|
||||||
**/
|
**/
|
||||||
FrameSupportPalletId: '[u8;8]',
|
FrameSupportPalletId: '[u8;8]',
|
||||||
/**
|
/**
|
||||||
* Lookup406: pallet_contracts::wasm::PrefabWasmModule<T>
|
* Lookup411: pallet_contracts::wasm::PrefabWasmModule<T>
|
||||||
**/
|
**/
|
||||||
PalletContractsWasmPrefabWasmModule: {
|
PalletContractsWasmPrefabWasmModule: {
|
||||||
instructionWeightsVersion: 'Compact<u32>',
|
instructionWeightsVersion: 'Compact<u32>',
|
||||||
@@ -923,7 +968,7 @@ export default {
|
|||||||
originalCodeLen: 'u32'
|
originalCodeLen: 'u32'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup408: pallet_contracts::storage::RawContractInfo<primitive_types::H256>
|
* Lookup413: pallet_contracts::storage::RawContractInfo<primitive_types::H256>
|
||||||
**/
|
**/
|
||||||
PalletContractsStorageRawContractInfo: {
|
PalletContractsStorageRawContractInfo: {
|
||||||
trieId: 'Bytes',
|
trieId: 'Bytes',
|
||||||
@@ -931,13 +976,13 @@ export default {
|
|||||||
reserved: 'Option<Null>'
|
reserved: 'Option<Null>'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup410: pallet_contracts::storage::DeletedContract
|
* Lookup415: pallet_contracts::storage::DeletedContract
|
||||||
**/
|
**/
|
||||||
PalletContractsStorageDeletedContract: {
|
PalletContractsStorageDeletedContract: {
|
||||||
trieId: 'Bytes'
|
trieId: 'Bytes'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup411: pallet_contracts::schedule::Schedule<T>
|
* Lookup416: pallet_contracts::schedule::Schedule<T>
|
||||||
**/
|
**/
|
||||||
PalletContractsSchedule: {
|
PalletContractsSchedule: {
|
||||||
limits: 'PalletContractsScheduleLimits',
|
limits: 'PalletContractsScheduleLimits',
|
||||||
@@ -945,7 +990,7 @@ export default {
|
|||||||
hostFnWeights: 'PalletContractsScheduleHostFnWeights'
|
hostFnWeights: 'PalletContractsScheduleHostFnWeights'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup412: pallet_contracts::schedule::Limits
|
* Lookup417: pallet_contracts::schedule::Limits
|
||||||
**/
|
**/
|
||||||
PalletContractsScheduleLimits: {
|
PalletContractsScheduleLimits: {
|
||||||
eventTopics: 'u32',
|
eventTopics: 'u32',
|
||||||
@@ -961,7 +1006,7 @@ export default {
|
|||||||
codeLen: 'u32'
|
codeLen: 'u32'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup413: pallet_contracts::schedule::InstructionWeights<T>
|
* Lookup418: pallet_contracts::schedule::InstructionWeights<T>
|
||||||
**/
|
**/
|
||||||
PalletContractsScheduleInstructionWeights: {
|
PalletContractsScheduleInstructionWeights: {
|
||||||
_alias: {
|
_alias: {
|
||||||
@@ -1021,7 +1066,7 @@ export default {
|
|||||||
i64Rotr: 'u32'
|
i64Rotr: 'u32'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup414: pallet_contracts::schedule::HostFnWeights<T>
|
* Lookup419: pallet_contracts::schedule::HostFnWeights<T>
|
||||||
**/
|
**/
|
||||||
PalletContractsScheduleHostFnWeights: {
|
PalletContractsScheduleHostFnWeights: {
|
||||||
_alias: {
|
_alias: {
|
||||||
@@ -1073,21 +1118,21 @@ export default {
|
|||||||
ecdsaRecover: 'u64'
|
ecdsaRecover: 'u64'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup420: pallet_im_online::BoundedOpaqueNetworkState<PeerIdEncodingLimit, MultiAddrEncodingLimit, AddressesLimit>
|
* Lookup425: pallet_im_online::BoundedOpaqueNetworkState<PeerIdEncodingLimit, MultiAddrEncodingLimit, AddressesLimit>
|
||||||
**/
|
**/
|
||||||
PalletImOnlineBoundedOpaqueNetworkState: {
|
PalletImOnlineBoundedOpaqueNetworkState: {
|
||||||
peerId: 'Bytes',
|
peerId: 'Bytes',
|
||||||
externalAddresses: 'Vec<Bytes>'
|
externalAddresses: 'Vec<Bytes>'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup425: sp_staking::offence::OffenceDetails<sp_core::crypto::AccountId32, Offender>
|
* Lookup432: sp_staking::offence::OffenceDetails<sp_core::crypto::AccountId32, Offender>
|
||||||
**/
|
**/
|
||||||
SpStakingOffenceOffenceDetails: {
|
SpStakingOffenceOffenceDetails: {
|
||||||
offender: '(AccountId32,PalletStakingExposure)',
|
offender: '(AccountId32,PalletStakingExposure)',
|
||||||
reporters: 'Vec<AccountId32>'
|
reporters: 'Vec<AccountId32>'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup427: pallet_identity::types::Registration<Balance, MaxJudgements, MaxAdditionalFields>
|
* Lookup434: pallet_identity::types::Registration<Balance, MaxJudgements, MaxAdditionalFields>
|
||||||
**/
|
**/
|
||||||
PalletIdentityRegistration: {
|
PalletIdentityRegistration: {
|
||||||
judgements: 'Vec<(u32,PalletIdentityJudgement)>',
|
judgements: 'Vec<(u32,PalletIdentityJudgement)>',
|
||||||
@@ -1095,7 +1140,7 @@ export default {
|
|||||||
info: 'PalletIdentityIdentityInfo'
|
info: 'PalletIdentityIdentityInfo'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup435: pallet_identity::types::RegistrarInfo<Balance, sp_core::crypto::AccountId32>
|
* Lookup442: pallet_identity::types::RegistrarInfo<Balance, sp_core::crypto::AccountId32>
|
||||||
**/
|
**/
|
||||||
PalletIdentityRegistrarInfo: {
|
PalletIdentityRegistrarInfo: {
|
||||||
account: 'AccountId32',
|
account: 'AccountId32',
|
||||||
@@ -1103,7 +1148,7 @@ export default {
|
|||||||
fields: 'PalletIdentityBitFlags'
|
fields: 'PalletIdentityBitFlags'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup439: pallet_society::Bid<sp_core::crypto::AccountId32, Balance>
|
* Lookup446: pallet_society::Bid<sp_core::crypto::AccountId32, Balance>
|
||||||
**/
|
**/
|
||||||
PalletSocietyBid: {
|
PalletSocietyBid: {
|
||||||
who: 'AccountId32',
|
who: 'AccountId32',
|
||||||
@@ -1111,7 +1156,7 @@ export default {
|
|||||||
value: 'u128'
|
value: 'u128'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup440: pallet_society::BidKind<sp_core::crypto::AccountId32, Balance>
|
* Lookup447: pallet_society::BidKind<sp_core::crypto::AccountId32, Balance>
|
||||||
**/
|
**/
|
||||||
PalletSocietyBidKind: {
|
PalletSocietyBidKind: {
|
||||||
_enum: {
|
_enum: {
|
||||||
@@ -1120,19 +1165,19 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup442: pallet_society::VouchingStatus
|
* Lookup449: pallet_society::VouchingStatus
|
||||||
**/
|
**/
|
||||||
PalletSocietyVouchingStatus: {
|
PalletSocietyVouchingStatus: {
|
||||||
_enum: ['Vouching', 'Banned']
|
_enum: ['Vouching', 'Banned']
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup446: pallet_society::Vote
|
* Lookup453: pallet_society::Vote
|
||||||
**/
|
**/
|
||||||
PalletSocietyVote: {
|
PalletSocietyVote: {
|
||||||
_enum: ['Skeptic', 'Reject', 'Approve']
|
_enum: ['Skeptic', 'Reject', 'Approve']
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup448: pallet_recovery::RecoveryConfig<BlockNumber, Balance, sp_core::crypto::AccountId32>
|
* Lookup455: pallet_recovery::RecoveryConfig<BlockNumber, Balance, sp_core::crypto::AccountId32>
|
||||||
**/
|
**/
|
||||||
PalletRecoveryRecoveryConfig: {
|
PalletRecoveryRecoveryConfig: {
|
||||||
delayPeriod: 'u32',
|
delayPeriod: 'u32',
|
||||||
@@ -1141,7 +1186,7 @@ export default {
|
|||||||
threshold: 'u16'
|
threshold: 'u16'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup449: pallet_recovery::ActiveRecovery<BlockNumber, Balance, sp_core::crypto::AccountId32>
|
* Lookup456: pallet_recovery::ActiveRecovery<BlockNumber, Balance, sp_core::crypto::AccountId32>
|
||||||
**/
|
**/
|
||||||
PalletRecoveryActiveRecovery: {
|
PalletRecoveryActiveRecovery: {
|
||||||
created: 'u32',
|
created: 'u32',
|
||||||
@@ -1149,13 +1194,13 @@ export default {
|
|||||||
friends: 'Vec<AccountId32>'
|
friends: 'Vec<AccountId32>'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup453: pallet_vesting::Releases
|
* Lookup460: pallet_vesting::Releases
|
||||||
**/
|
**/
|
||||||
PalletVestingReleases: {
|
PalletVestingReleases: {
|
||||||
_enum: ['V0', 'V1']
|
_enum: ['V0', 'V1']
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup457: pallet_scheduler::ScheduledV2<node_runtime::Call, BlockNumber, node_runtime::OriginCaller, sp_core::crypto::AccountId32>
|
* Lookup464: pallet_scheduler::ScheduledV2<node_runtime::Call, BlockNumber, node_runtime::OriginCaller, sp_core::crypto::AccountId32>
|
||||||
**/
|
**/
|
||||||
PalletSchedulerScheduledV2: {
|
PalletSchedulerScheduledV2: {
|
||||||
maybeId: 'Option<Bytes>',
|
maybeId: 'Option<Bytes>',
|
||||||
@@ -1165,58 +1210,13 @@ export default {
|
|||||||
origin: 'NodeRuntimeOriginCaller'
|
origin: 'NodeRuntimeOriginCaller'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup458: node_runtime::OriginCaller
|
* Lookup465: pallet_scheduler::Releases
|
||||||
**/
|
|
||||||
NodeRuntimeOriginCaller: {
|
|
||||||
_enum: {
|
|
||||||
system: 'FrameSystemRawOrigin',
|
|
||||||
__Unused1: 'Null',
|
|
||||||
__Unused2: 'Null',
|
|
||||||
Void: 'SpCoreVoid',
|
|
||||||
__Unused4: 'Null',
|
|
||||||
__Unused5: 'Null',
|
|
||||||
__Unused6: 'Null',
|
|
||||||
__Unused7: 'Null',
|
|
||||||
__Unused8: 'Null',
|
|
||||||
__Unused9: 'Null',
|
|
||||||
__Unused10: 'Null',
|
|
||||||
__Unused11: 'Null',
|
|
||||||
Council: 'PalletCollectiveRawOrigin',
|
|
||||||
TechnicalCommittee: 'PalletCollectiveRawOrigin'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup459: frame_system::RawOrigin<sp_core::crypto::AccountId32>
|
|
||||||
**/
|
|
||||||
FrameSystemRawOrigin: {
|
|
||||||
_enum: {
|
|
||||||
Root: 'Null',
|
|
||||||
Signed: 'AccountId32',
|
|
||||||
None: 'Null'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup460: pallet_collective::RawOrigin<sp_core::crypto::AccountId32, I>
|
|
||||||
**/
|
|
||||||
PalletCollectiveRawOrigin: {
|
|
||||||
_enum: {
|
|
||||||
Members: '(u32,u32)',
|
|
||||||
Member: 'AccountId32',
|
|
||||||
_Phantom: 'Null'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup462: sp_core::Void
|
|
||||||
**/
|
|
||||||
SpCoreVoid: 'Null',
|
|
||||||
/**
|
|
||||||
* Lookup463: pallet_scheduler::Releases
|
|
||||||
**/
|
**/
|
||||||
PalletSchedulerReleases: {
|
PalletSchedulerReleases: {
|
||||||
_enum: ['V1', 'V2']
|
_enum: ['V1', 'V2']
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup467: pallet_proxy::ProxyDefinition<sp_core::crypto::AccountId32, node_runtime::ProxyType, BlockNumber>
|
* Lookup469: pallet_proxy::ProxyDefinition<sp_core::crypto::AccountId32, node_runtime::ProxyType, BlockNumber>
|
||||||
**/
|
**/
|
||||||
PalletProxyProxyDefinition: {
|
PalletProxyProxyDefinition: {
|
||||||
delegate: 'AccountId32',
|
delegate: 'AccountId32',
|
||||||
@@ -1224,7 +1224,7 @@ export default {
|
|||||||
delay: 'u32'
|
delay: 'u32'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup471: pallet_proxy::Announcement<sp_core::crypto::AccountId32, primitive_types::H256, BlockNumber>
|
* Lookup473: pallet_proxy::Announcement<sp_core::crypto::AccountId32, primitive_types::H256, BlockNumber>
|
||||||
**/
|
**/
|
||||||
PalletProxyAnnouncement: {
|
PalletProxyAnnouncement: {
|
||||||
real: 'AccountId32',
|
real: 'AccountId32',
|
||||||
@@ -1232,7 +1232,7 @@ export default {
|
|||||||
height: 'u32'
|
height: 'u32'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup475: pallet_multisig::Multisig<BlockNumber, Balance, sp_core::crypto::AccountId32>
|
* Lookup477: pallet_multisig::Multisig<BlockNumber, Balance, sp_core::crypto::AccountId32>
|
||||||
**/
|
**/
|
||||||
PalletMultisigMultisig: {
|
PalletMultisigMultisig: {
|
||||||
when: 'PalletMultisigTimepoint',
|
when: 'PalletMultisigTimepoint',
|
||||||
@@ -1241,7 +1241,7 @@ export default {
|
|||||||
approvals: 'Vec<AccountId32>'
|
approvals: 'Vec<AccountId32>'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup478: pallet_bounties::Bounty<sp_core::crypto::AccountId32, Balance, BlockNumber>
|
* Lookup480: pallet_bounties::Bounty<sp_core::crypto::AccountId32, Balance, BlockNumber>
|
||||||
**/
|
**/
|
||||||
PalletBountiesBounty: {
|
PalletBountiesBounty: {
|
||||||
proposer: 'AccountId32',
|
proposer: 'AccountId32',
|
||||||
@@ -1252,7 +1252,7 @@ export default {
|
|||||||
status: 'PalletBountiesBountyStatus'
|
status: 'PalletBountiesBountyStatus'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup479: pallet_bounties::BountyStatus<sp_core::crypto::AccountId32, BlockNumber>
|
* Lookup481: pallet_bounties::BountyStatus<sp_core::crypto::AccountId32, BlockNumber>
|
||||||
**/
|
**/
|
||||||
PalletBountiesBountyStatus: {
|
PalletBountiesBountyStatus: {
|
||||||
_enum: {
|
_enum: {
|
||||||
@@ -1274,7 +1274,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup481: pallet_tips::OpenTip<sp_core::crypto::AccountId32, Balance, BlockNumber, primitive_types::H256>
|
* Lookup483: pallet_tips::OpenTip<sp_core::crypto::AccountId32, Balance, BlockNumber, primitive_types::H256>
|
||||||
**/
|
**/
|
||||||
PalletTipsOpenTip: {
|
PalletTipsOpenTip: {
|
||||||
reason: 'H256',
|
reason: 'H256',
|
||||||
@@ -1286,7 +1286,7 @@ export default {
|
|||||||
findersFee: 'bool'
|
findersFee: 'bool'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup483: pallet_assets::types::AssetDetails<Balance, sp_core::crypto::AccountId32, DepositBalance>
|
* Lookup485: pallet_assets::types::AssetDetails<Balance, sp_core::crypto::AccountId32, DepositBalance>
|
||||||
**/
|
**/
|
||||||
PalletAssetsAssetDetails: {
|
PalletAssetsAssetDetails: {
|
||||||
owner: 'AccountId32',
|
owner: 'AccountId32',
|
||||||
@@ -1303,7 +1303,7 @@ export default {
|
|||||||
isFrozen: 'bool'
|
isFrozen: 'bool'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup484: pallet_assets::types::AssetBalance<Balance, Extra>
|
* Lookup486: pallet_assets::types::AssetBalance<Balance, Extra>
|
||||||
**/
|
**/
|
||||||
PalletAssetsAssetBalance: {
|
PalletAssetsAssetBalance: {
|
||||||
balance: 'u64',
|
balance: 'u64',
|
||||||
@@ -1312,14 +1312,14 @@ export default {
|
|||||||
extra: 'Null'
|
extra: 'Null'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup486: pallet_assets::types::Approval<Balance, DepositBalance>
|
* Lookup488: pallet_assets::types::Approval<Balance, DepositBalance>
|
||||||
**/
|
**/
|
||||||
PalletAssetsApproval: {
|
PalletAssetsApproval: {
|
||||||
amount: 'u64',
|
amount: 'u64',
|
||||||
deposit: 'u128'
|
deposit: 'u128'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup487: pallet_assets::types::AssetMetadata<DepositBalance, frame_support::storage::bounded_vec::BoundedVec<T, S>>
|
* Lookup489: pallet_assets::types::AssetMetadata<DepositBalance, frame_support::storage::bounded_vec::BoundedVec<T, S>>
|
||||||
**/
|
**/
|
||||||
PalletAssetsAssetMetadata: {
|
PalletAssetsAssetMetadata: {
|
||||||
deposit: 'u128',
|
deposit: 'u128',
|
||||||
@@ -1329,7 +1329,7 @@ export default {
|
|||||||
isFrozen: 'bool'
|
isFrozen: 'bool'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup489: pallet_lottery::LotteryConfig<BlockNumber, Balance>
|
* Lookup491: pallet_lottery::LotteryConfig<BlockNumber, Balance>
|
||||||
**/
|
**/
|
||||||
PalletLotteryLotteryConfig: {
|
PalletLotteryLotteryConfig: {
|
||||||
price: 'u128',
|
price: 'u128',
|
||||||
@@ -1339,14 +1339,14 @@ export default {
|
|||||||
repeat: 'bool'
|
repeat: 'bool'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup494: pallet_gilt::pallet::GiltBid<Balance, sp_core::crypto::AccountId32>
|
* Lookup496: pallet_gilt::pallet::GiltBid<Balance, sp_core::crypto::AccountId32>
|
||||||
**/
|
**/
|
||||||
PalletGiltGiltBid: {
|
PalletGiltGiltBid: {
|
||||||
amount: 'u128',
|
amount: 'u128',
|
||||||
who: 'AccountId32'
|
who: 'AccountId32'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup495: pallet_gilt::pallet::ActiveGiltsTotal<Balance>
|
* Lookup497: pallet_gilt::pallet::ActiveGiltsTotal<Balance>
|
||||||
**/
|
**/
|
||||||
PalletGiltActiveGiltsTotal: {
|
PalletGiltActiveGiltsTotal: {
|
||||||
frozen: 'u128',
|
frozen: 'u128',
|
||||||
@@ -1355,7 +1355,7 @@ export default {
|
|||||||
target: 'Perquintill'
|
target: 'Perquintill'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup496: pallet_gilt::pallet::ActiveGilt<Balance, sp_core::crypto::AccountId32, BlockNumber>
|
* Lookup498: pallet_gilt::pallet::ActiveGilt<Balance, sp_core::crypto::AccountId32, BlockNumber>
|
||||||
**/
|
**/
|
||||||
PalletGiltActiveGilt: {
|
PalletGiltActiveGilt: {
|
||||||
proportion: 'Perquintill',
|
proportion: 'Perquintill',
|
||||||
@@ -1364,7 +1364,7 @@ export default {
|
|||||||
expiry: 'u32'
|
expiry: 'u32'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup498: pallet_uniques::types::ClassDetails<sp_core::crypto::AccountId32, DepositBalance>
|
* Lookup500: pallet_uniques::types::ClassDetails<sp_core::crypto::AccountId32, DepositBalance>
|
||||||
**/
|
**/
|
||||||
PalletUniquesClassDetails: {
|
PalletUniquesClassDetails: {
|
||||||
owner: 'AccountId32',
|
owner: 'AccountId32',
|
||||||
@@ -1379,7 +1379,7 @@ export default {
|
|||||||
isFrozen: 'bool'
|
isFrozen: 'bool'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup500: pallet_uniques::types::InstanceDetails<sp_core::crypto::AccountId32, DepositBalance>
|
* Lookup502: pallet_uniques::types::InstanceDetails<sp_core::crypto::AccountId32, DepositBalance>
|
||||||
**/
|
**/
|
||||||
PalletUniquesInstanceDetails: {
|
PalletUniquesInstanceDetails: {
|
||||||
owner: 'AccountId32',
|
owner: 'AccountId32',
|
||||||
@@ -1388,7 +1388,7 @@ export default {
|
|||||||
deposit: 'u128'
|
deposit: 'u128'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup501: pallet_uniques::types::ClassMetadata<DepositBalance, StringLimit>
|
* Lookup503: pallet_uniques::types::ClassMetadata<DepositBalance, StringLimit>
|
||||||
**/
|
**/
|
||||||
PalletUniquesClassMetadata: {
|
PalletUniquesClassMetadata: {
|
||||||
deposit: 'u128',
|
deposit: 'u128',
|
||||||
@@ -1396,7 +1396,7 @@ export default {
|
|||||||
isFrozen: 'bool'
|
isFrozen: 'bool'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup502: pallet_uniques::types::InstanceMetadata<DepositBalance, StringLimit>
|
* Lookup504: pallet_uniques::types::InstanceMetadata<DepositBalance, StringLimit>
|
||||||
**/
|
**/
|
||||||
PalletUniquesInstanceMetadata: {
|
PalletUniquesInstanceMetadata: {
|
||||||
deposit: 'u128',
|
deposit: 'u128',
|
||||||
@@ -1404,7 +1404,7 @@ export default {
|
|||||||
isFrozen: 'bool'
|
isFrozen: 'bool'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup507: pallet_transaction_storage::TransactionInfo
|
* Lookup509: pallet_transaction_storage::TransactionInfo
|
||||||
**/
|
**/
|
||||||
PalletTransactionStorageTransactionInfo: {
|
PalletTransactionStorageTransactionInfo: {
|
||||||
_alias: {
|
_alias: {
|
||||||
@@ -1416,7 +1416,7 @@ export default {
|
|||||||
blockChunks: 'u32'
|
blockChunks: 'u32'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup509: pallet_bags_list::list::Node<T>
|
* Lookup511: pallet_bags_list::list::Node<T>
|
||||||
**/
|
**/
|
||||||
PalletBagsListListNode: {
|
PalletBagsListListNode: {
|
||||||
id: 'AccountId32',
|
id: 'AccountId32',
|
||||||
@@ -1425,14 +1425,14 @@ export default {
|
|||||||
bagUpper: 'u64'
|
bagUpper: 'u64'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup510: pallet_bags_list::list::Bag<T>
|
* Lookup512: pallet_bags_list::list::Bag<T>
|
||||||
**/
|
**/
|
||||||
PalletBagsListListBag: {
|
PalletBagsListListBag: {
|
||||||
head: 'Option<AccountId32>',
|
head: 'Option<AccountId32>',
|
||||||
tail: 'Option<AccountId32>'
|
tail: 'Option<AccountId32>'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup513: sp_runtime::MultiSignature
|
* Lookup515: sp_runtime::MultiSignature
|
||||||
**/
|
**/
|
||||||
SpRuntimeMultiSignature: {
|
SpRuntimeMultiSignature: {
|
||||||
_enum: {
|
_enum: {
|
||||||
@@ -1442,35 +1442,35 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup514: sp_core::ecdsa::Signature
|
* Lookup516: sp_core::ecdsa::Signature
|
||||||
**/
|
**/
|
||||||
SpCoreEcdsaSignature: '[u8;65]',
|
SpCoreEcdsaSignature: '[u8;65]',
|
||||||
/**
|
/**
|
||||||
* Lookup517: frame_system::extensions::check_spec_version::CheckSpecVersion<T>
|
* Lookup519: frame_system::extensions::check_spec_version::CheckSpecVersion<T>
|
||||||
**/
|
**/
|
||||||
FrameSystemExtensionsCheckSpecVersion: 'Null',
|
FrameSystemExtensionsCheckSpecVersion: 'Null',
|
||||||
/**
|
/**
|
||||||
* Lookup518: frame_system::extensions::check_tx_version::CheckTxVersion<T>
|
* Lookup520: frame_system::extensions::check_tx_version::CheckTxVersion<T>
|
||||||
**/
|
**/
|
||||||
FrameSystemExtensionsCheckTxVersion: 'Null',
|
FrameSystemExtensionsCheckTxVersion: 'Null',
|
||||||
/**
|
/**
|
||||||
* Lookup519: frame_system::extensions::check_genesis::CheckGenesis<T>
|
* Lookup521: frame_system::extensions::check_genesis::CheckGenesis<T>
|
||||||
**/
|
**/
|
||||||
FrameSystemExtensionsCheckGenesis: 'Null',
|
FrameSystemExtensionsCheckGenesis: 'Null',
|
||||||
/**
|
/**
|
||||||
* Lookup522: frame_system::extensions::check_nonce::CheckNonce<T>
|
* Lookup524: frame_system::extensions::check_nonce::CheckNonce<T>
|
||||||
**/
|
**/
|
||||||
FrameSystemExtensionsCheckNonce: 'Compact<u32>',
|
FrameSystemExtensionsCheckNonce: 'Compact<u32>',
|
||||||
/**
|
/**
|
||||||
* Lookup523: frame_system::extensions::check_weight::CheckWeight<T>
|
* Lookup525: frame_system::extensions::check_weight::CheckWeight<T>
|
||||||
**/
|
**/
|
||||||
FrameSystemExtensionsCheckWeight: 'Null',
|
FrameSystemExtensionsCheckWeight: 'Null',
|
||||||
/**
|
/**
|
||||||
* Lookup524: pallet_transaction_payment::ChargeTransactionPayment<T>
|
* Lookup526: pallet_transaction_payment::ChargeTransactionPayment<T>
|
||||||
**/
|
**/
|
||||||
PalletTransactionPaymentChargeTransactionPayment: 'Compact<u128>',
|
PalletTransactionPaymentChargeTransactionPayment: 'Compact<u128>',
|
||||||
/**
|
/**
|
||||||
* Lookup525: node_runtime::Runtime
|
* Lookup527: node_runtime::Runtime
|
||||||
**/
|
**/
|
||||||
NodeRuntimeRuntime: 'Null'
|
NodeRuntimeRuntime: 'Null'
|
||||||
} as DefinitionsTypes;
|
} as DefinitionsTypes;
|
||||||
|
|||||||
@@ -468,7 +468,30 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly authorityDiscovery: SpAuthorityDiscoveryAppPublic;
|
readonly authorityDiscovery: SpAuthorityDiscoveryAppPublic;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name KusamaRuntimeNposCompactSolution24 (371) */
|
/** @name KusamaRuntimeOriginCaller (316) */
|
||||||
|
export interface KusamaRuntimeOriginCaller extends Enum {
|
||||||
|
readonly isSystem: boolean;
|
||||||
|
readonly asSystem: FrameSystemRawOrigin;
|
||||||
|
readonly isVoid: boolean;
|
||||||
|
readonly isCouncil: boolean;
|
||||||
|
readonly asCouncil: PalletCollectiveRawOrigin;
|
||||||
|
readonly isTechnicalCommittee: boolean;
|
||||||
|
readonly asTechnicalCommittee: PalletCollectiveRawOrigin;
|
||||||
|
readonly isParachainsOrigin: boolean;
|
||||||
|
readonly asParachainsOrigin: PolkadotRuntimeParachainsOriginPalletOrigin;
|
||||||
|
readonly isXcmPallet: boolean;
|
||||||
|
readonly asXcmPallet: PalletXcmOrigin;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @name PalletXcmOrigin (321) */
|
||||||
|
export interface PalletXcmOrigin extends Enum {
|
||||||
|
readonly isXcm: boolean;
|
||||||
|
readonly asXcm: XcmV1MultiLocation;
|
||||||
|
readonly isResponse: boolean;
|
||||||
|
readonly asResponse: XcmV1MultiLocation;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @name KusamaRuntimeNposCompactSolution24 (379) */
|
||||||
export interface KusamaRuntimeNposCompactSolution24 extends Struct {
|
export interface KusamaRuntimeNposCompactSolution24 extends Struct {
|
||||||
readonly votes1: Vec<ITuple<[Compact<u32>, Compact<u16>]>>;
|
readonly votes1: Vec<ITuple<[Compact<u32>, Compact<u16>]>>;
|
||||||
readonly votes2: Vec<ITuple<[Compact<u32>, ITuple<[Compact<u16>, Compact<PerU16>]>, Compact<u16>]>>;
|
readonly votes2: Vec<ITuple<[Compact<u32>, ITuple<[Compact<u16>, Compact<PerU16>]>, Compact<u16>]>>;
|
||||||
@@ -496,7 +519,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly votes24: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
readonly votes24: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name XcmVersionedXcm (504) */
|
/** @name XcmVersionedXcm (512) */
|
||||||
export interface XcmVersionedXcm extends Enum {
|
export interface XcmVersionedXcm extends Enum {
|
||||||
readonly isV0: boolean;
|
readonly isV0: boolean;
|
||||||
readonly asV0: XcmV0Xcm;
|
readonly asV0: XcmV0Xcm;
|
||||||
@@ -506,7 +529,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly asV2: XcmV2Xcm;
|
readonly asV2: XcmV2Xcm;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name XcmV0Xcm (505) */
|
/** @name XcmV0Xcm (513) */
|
||||||
export interface XcmV0Xcm extends Enum {
|
export interface XcmV0Xcm extends Enum {
|
||||||
readonly isWithdrawAsset: boolean;
|
readonly isWithdrawAsset: boolean;
|
||||||
readonly asWithdrawAsset: {
|
readonly asWithdrawAsset: {
|
||||||
@@ -568,7 +591,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
} & Struct;
|
} & Struct;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name XcmV0Order (507) */
|
/** @name XcmV0Order (515) */
|
||||||
export interface XcmV0Order extends Enum {
|
export interface XcmV0Order extends Enum {
|
||||||
readonly isNull: boolean;
|
readonly isNull: boolean;
|
||||||
readonly isDepositAsset: boolean;
|
readonly isDepositAsset: boolean;
|
||||||
@@ -615,13 +638,13 @@ declare module '@polkadot/types/lookup' {
|
|||||||
} & Struct;
|
} & Struct;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name XcmV0Response (509) */
|
/** @name XcmV0Response (517) */
|
||||||
export interface XcmV0Response extends Enum {
|
export interface XcmV0Response extends Enum {
|
||||||
readonly isAssets: boolean;
|
readonly isAssets: boolean;
|
||||||
readonly asAssets: Vec<XcmV0MultiAsset>;
|
readonly asAssets: Vec<XcmV0MultiAsset>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name XcmV1Xcm (510) */
|
/** @name XcmV1Xcm (518) */
|
||||||
export interface XcmV1Xcm extends Enum {
|
export interface XcmV1Xcm extends Enum {
|
||||||
readonly isWithdrawAsset: boolean;
|
readonly isWithdrawAsset: boolean;
|
||||||
readonly asWithdrawAsset: {
|
readonly asWithdrawAsset: {
|
||||||
@@ -689,7 +712,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly isUnsubscribeVersion: boolean;
|
readonly isUnsubscribeVersion: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name XcmV1Order (512) */
|
/** @name XcmV1Order (520) */
|
||||||
export interface XcmV1Order extends Enum {
|
export interface XcmV1Order extends Enum {
|
||||||
readonly isNoop: boolean;
|
readonly isNoop: boolean;
|
||||||
readonly isDepositAsset: boolean;
|
readonly isDepositAsset: boolean;
|
||||||
@@ -738,7 +761,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
} & Struct;
|
} & Struct;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name XcmV1Response (514) */
|
/** @name XcmV1Response (522) */
|
||||||
export interface XcmV1Response extends Enum {
|
export interface XcmV1Response extends Enum {
|
||||||
readonly isAssets: boolean;
|
readonly isAssets: boolean;
|
||||||
readonly asAssets: XcmV1MultiassetMultiAssets;
|
readonly asAssets: XcmV1MultiassetMultiAssets;
|
||||||
@@ -746,30 +769,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly asVersion: u32;
|
readonly asVersion: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name KusamaRuntimeOriginCaller (575) */
|
/** @name PalletXcmQueryStatus (690) */
|
||||||
export interface KusamaRuntimeOriginCaller extends Enum {
|
|
||||||
readonly isSystem: boolean;
|
|
||||||
readonly asSystem: FrameSystemRawOrigin;
|
|
||||||
readonly isVoid: boolean;
|
|
||||||
readonly isCouncil: boolean;
|
|
||||||
readonly asCouncil: PalletCollectiveRawOrigin;
|
|
||||||
readonly isTechnicalCommittee: boolean;
|
|
||||||
readonly asTechnicalCommittee: PalletCollectiveRawOrigin;
|
|
||||||
readonly isParachainsOrigin: boolean;
|
|
||||||
readonly asParachainsOrigin: PolkadotRuntimeParachainsOriginPalletOrigin;
|
|
||||||
readonly isXcmPallet: boolean;
|
|
||||||
readonly asXcmPallet: PalletXcmOrigin;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @name PalletXcmOrigin (580) */
|
|
||||||
export interface PalletXcmOrigin extends Enum {
|
|
||||||
readonly isXcm: boolean;
|
|
||||||
readonly asXcm: XcmV1MultiLocation;
|
|
||||||
readonly isResponse: boolean;
|
|
||||||
readonly asResponse: XcmV1MultiLocation;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @name PalletXcmQueryStatus (689) */
|
|
||||||
export interface PalletXcmQueryStatus extends Enum {
|
export interface PalletXcmQueryStatus extends Enum {
|
||||||
readonly isPending: boolean;
|
readonly isPending: boolean;
|
||||||
readonly asPending: {
|
readonly asPending: {
|
||||||
@@ -789,7 +789,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
} & Struct;
|
} & Struct;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name XcmVersionedResponse (692) */
|
/** @name XcmVersionedResponse (693) */
|
||||||
export interface XcmVersionedResponse extends Enum {
|
export interface XcmVersionedResponse extends Enum {
|
||||||
readonly isV0: boolean;
|
readonly isV0: boolean;
|
||||||
readonly asV0: XcmV0Response;
|
readonly asV0: XcmV0Response;
|
||||||
@@ -799,7 +799,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly asV2: XcmV2Response;
|
readonly asV2: XcmV2Response;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletXcmVersionMigrationStage (698) */
|
/** @name PalletXcmVersionMigrationStage (699) */
|
||||||
export interface PalletXcmVersionMigrationStage extends Enum {
|
export interface PalletXcmVersionMigrationStage extends Enum {
|
||||||
readonly isMigrateSupportedVersion: boolean;
|
readonly isMigrateSupportedVersion: boolean;
|
||||||
readonly isMigrateVersionNotifiers: boolean;
|
readonly isMigrateVersionNotifiers: boolean;
|
||||||
@@ -808,7 +808,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly isMigrateAndNotifyOldTargets: boolean;
|
readonly isMigrateAndNotifyOldTargets: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name KusamaRuntimeRuntime (710) */
|
/** @name KusamaRuntimeRuntime (711) */
|
||||||
export type KusamaRuntimeRuntime = Null;
|
export type KusamaRuntimeRuntime = Null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,26 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly isSaft: boolean;
|
readonly isSaft: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotRuntimeNposCompactSolution16 (254) */
|
/** @name PolkadotRuntimeOriginCaller (206) */
|
||||||
|
export interface PolkadotRuntimeOriginCaller extends Enum {
|
||||||
|
readonly isSystem: boolean;
|
||||||
|
readonly asSystem: FrameSystemRawOrigin;
|
||||||
|
readonly isVoid: boolean;
|
||||||
|
readonly isCouncil: boolean;
|
||||||
|
readonly asCouncil: PalletCollectiveRawOrigin;
|
||||||
|
readonly isTechnicalCommittee: boolean;
|
||||||
|
readonly asTechnicalCommittee: PalletCollectiveRawOrigin;
|
||||||
|
readonly isParachainsOrigin: boolean;
|
||||||
|
readonly asParachainsOrigin: PolkadotRuntimeParachainsOriginPalletOrigin;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @name PolkadotRuntimeParachainsOriginPalletOrigin (210) */
|
||||||
|
export interface PolkadotRuntimeParachainsOriginPalletOrigin extends Enum {
|
||||||
|
readonly isParachain: boolean;
|
||||||
|
readonly asParachain: u32;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @name PolkadotRuntimeNposCompactSolution16 (261) */
|
||||||
export interface PolkadotRuntimeNposCompactSolution16 extends Struct {
|
export interface PolkadotRuntimeNposCompactSolution16 extends Struct {
|
||||||
readonly votes1: Vec<ITuple<[Compact<u32>, Compact<u16>]>>;
|
readonly votes1: Vec<ITuple<[Compact<u32>, Compact<u16>]>>;
|
||||||
readonly votes2: Vec<ITuple<[Compact<u32>, ITuple<[Compact<u16>, Compact<PerU16>]>, Compact<u16>]>>;
|
readonly votes2: Vec<ITuple<[Compact<u32>, ITuple<[Compact<u16>, Compact<PerU16>]>, Compact<u16>]>>;
|
||||||
@@ -136,41 +155,41 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly votes16: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
readonly votes16: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotPrimitivesV1InherentData (316) */
|
/** @name PolkadotPrimitivesV1InherentData (323) */
|
||||||
export interface PolkadotPrimitivesV1InherentData extends Struct {
|
export interface PolkadotPrimitivesV1InherentData extends Struct {
|
||||||
readonly bitfields: Vec<PolkadotPrimitivesV1SignedUncheckedSigned>;
|
readonly bitfields: Vec<PolkadotPrimitivesV1SignedUncheckedSigned>;
|
||||||
readonly backedCandidates: Vec<PolkadotPrimitivesV1BackedCandidate>;
|
readonly backedCandidates: Vec<PolkadotPrimitivesV1BackedCandidate>;
|
||||||
readonly disputes: Vec<PolkadotPrimitivesV1DisputeStatementSet>;
|
readonly disputes: Vec<PolkadotPrimitivesV1DisputeStatementSet>;
|
||||||
readonly parentHeader: SpRuntimeGenericHeader;
|
readonly parentHeader: SpRuntimeHeader;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotPrimitivesV1SignedUncheckedSigned (318) */
|
/** @name PolkadotPrimitivesV1SignedUncheckedSigned (325) */
|
||||||
export interface PolkadotPrimitivesV1SignedUncheckedSigned extends Struct {
|
export interface PolkadotPrimitivesV1SignedUncheckedSigned extends Struct {
|
||||||
readonly payload: BitVec;
|
readonly payload: BitVec;
|
||||||
readonly validatorIndex: u32;
|
readonly validatorIndex: u32;
|
||||||
readonly signature: PolkadotPrimitivesV0ValidatorAppSignature;
|
readonly signature: PolkadotPrimitivesV0ValidatorAppSignature;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name BitvecOrderLsb0 (321) */
|
/** @name BitvecOrderLsb0 (328) */
|
||||||
export type BitvecOrderLsb0 = Null;
|
export type BitvecOrderLsb0 = Null;
|
||||||
|
|
||||||
/** @name PolkadotPrimitivesV0ValidatorAppSignature (323) */
|
/** @name PolkadotPrimitivesV0ValidatorAppSignature (330) */
|
||||||
export interface PolkadotPrimitivesV0ValidatorAppSignature extends SpCoreSr25519Signature {}
|
export interface PolkadotPrimitivesV0ValidatorAppSignature extends SpCoreSr25519Signature {}
|
||||||
|
|
||||||
/** @name PolkadotPrimitivesV1BackedCandidate (325) */
|
/** @name PolkadotPrimitivesV1BackedCandidate (332) */
|
||||||
export interface PolkadotPrimitivesV1BackedCandidate extends Struct {
|
export interface PolkadotPrimitivesV1BackedCandidate extends Struct {
|
||||||
readonly candidate: PolkadotPrimitivesV1CommittedCandidateReceipt;
|
readonly candidate: PolkadotPrimitivesV1CommittedCandidateReceipt;
|
||||||
readonly validityVotes: Vec<PolkadotPrimitivesV0ValidityAttestation>;
|
readonly validityVotes: Vec<PolkadotPrimitivesV0ValidityAttestation>;
|
||||||
readonly validatorIndices: BitVec;
|
readonly validatorIndices: BitVec;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotPrimitivesV1CommittedCandidateReceipt (326) */
|
/** @name PolkadotPrimitivesV1CommittedCandidateReceipt (333) */
|
||||||
export interface PolkadotPrimitivesV1CommittedCandidateReceipt extends Struct {
|
export interface PolkadotPrimitivesV1CommittedCandidateReceipt extends Struct {
|
||||||
readonly descriptor: PolkadotPrimitivesV1CandidateDescriptor;
|
readonly descriptor: PolkadotPrimitivesV1CandidateDescriptor;
|
||||||
readonly commitments: PolkadotPrimitivesV1CandidateCommitments;
|
readonly commitments: PolkadotPrimitivesV1CandidateCommitments;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotPrimitivesV1CandidateCommitments (327) */
|
/** @name PolkadotPrimitivesV1CandidateCommitments (334) */
|
||||||
export interface PolkadotPrimitivesV1CandidateCommitments extends Struct {
|
export interface PolkadotPrimitivesV1CandidateCommitments extends Struct {
|
||||||
readonly upwardMessages: Vec<Bytes>;
|
readonly upwardMessages: Vec<Bytes>;
|
||||||
readonly horizontalMessages: Vec<PolkadotCorePrimitivesOutboundHrmpMessage>;
|
readonly horizontalMessages: Vec<PolkadotCorePrimitivesOutboundHrmpMessage>;
|
||||||
@@ -180,13 +199,13 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly hrmpWatermark: u32;
|
readonly hrmpWatermark: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotCorePrimitivesOutboundHrmpMessage (329) */
|
/** @name PolkadotCorePrimitivesOutboundHrmpMessage (336) */
|
||||||
export interface PolkadotCorePrimitivesOutboundHrmpMessage extends Struct {
|
export interface PolkadotCorePrimitivesOutboundHrmpMessage extends Struct {
|
||||||
readonly recipient: u32;
|
readonly recipient: u32;
|
||||||
readonly data: Bytes;
|
readonly data: Bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotPrimitivesV0ValidityAttestation (333) */
|
/** @name PolkadotPrimitivesV0ValidityAttestation (340) */
|
||||||
export interface PolkadotPrimitivesV0ValidityAttestation extends Enum {
|
export interface PolkadotPrimitivesV0ValidityAttestation extends Enum {
|
||||||
readonly isImplicit: boolean;
|
readonly isImplicit: boolean;
|
||||||
readonly asImplicit: PolkadotPrimitivesV0ValidatorAppSignature;
|
readonly asImplicit: PolkadotPrimitivesV0ValidatorAppSignature;
|
||||||
@@ -194,14 +213,14 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly asExplicit: PolkadotPrimitivesV0ValidatorAppSignature;
|
readonly asExplicit: PolkadotPrimitivesV0ValidatorAppSignature;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotPrimitivesV1DisputeStatementSet (335) */
|
/** @name PolkadotPrimitivesV1DisputeStatementSet (342) */
|
||||||
export interface PolkadotPrimitivesV1DisputeStatementSet extends Struct {
|
export interface PolkadotPrimitivesV1DisputeStatementSet extends Struct {
|
||||||
readonly candidateHash: H256;
|
readonly candidateHash: H256;
|
||||||
readonly session: u32;
|
readonly session: u32;
|
||||||
readonly statements: Vec<ITuple<[PolkadotPrimitivesV1DisputeStatement, u32, PolkadotPrimitivesV0ValidatorAppSignature]>>;
|
readonly statements: Vec<ITuple<[PolkadotPrimitivesV1DisputeStatement, u32, PolkadotPrimitivesV0ValidatorAppSignature]>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotPrimitivesV1DisputeStatement (339) */
|
/** @name PolkadotPrimitivesV1DisputeStatement (346) */
|
||||||
export interface PolkadotPrimitivesV1DisputeStatement extends Enum {
|
export interface PolkadotPrimitivesV1DisputeStatement extends Enum {
|
||||||
readonly isValid: boolean;
|
readonly isValid: boolean;
|
||||||
readonly asValid: PolkadotPrimitivesV1ValidDisputeStatementKind;
|
readonly asValid: PolkadotPrimitivesV1ValidDisputeStatementKind;
|
||||||
@@ -209,7 +228,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly asInvalid: PolkadotPrimitivesV1InvalidDisputeStatementKind;
|
readonly asInvalid: PolkadotPrimitivesV1InvalidDisputeStatementKind;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotPrimitivesV1ValidDisputeStatementKind (340) */
|
/** @name PolkadotPrimitivesV1ValidDisputeStatementKind (347) */
|
||||||
export interface PolkadotPrimitivesV1ValidDisputeStatementKind extends Enum {
|
export interface PolkadotPrimitivesV1ValidDisputeStatementKind extends Enum {
|
||||||
readonly isExplicit: boolean;
|
readonly isExplicit: boolean;
|
||||||
readonly isBackingSeconded: boolean;
|
readonly isBackingSeconded: boolean;
|
||||||
@@ -219,12 +238,12 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly isApprovalChecking: boolean;
|
readonly isApprovalChecking: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotPrimitivesV1InvalidDisputeStatementKind (341) */
|
/** @name PolkadotPrimitivesV1InvalidDisputeStatementKind (348) */
|
||||||
export interface PolkadotPrimitivesV1InvalidDisputeStatementKind extends Enum {
|
export interface PolkadotPrimitivesV1InvalidDisputeStatementKind extends Enum {
|
||||||
readonly isExplicit: boolean;
|
readonly isExplicit: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name SpRuntimeMultiSigner (353) */
|
/** @name SpRuntimeMultiSigner (360) */
|
||||||
export interface SpRuntimeMultiSigner extends Enum {
|
export interface SpRuntimeMultiSigner extends Enum {
|
||||||
readonly isEd25519: boolean;
|
readonly isEd25519: boolean;
|
||||||
readonly asEd25519: SpCoreEd25519Public;
|
readonly asEd25519: SpCoreEd25519Public;
|
||||||
@@ -234,29 +253,10 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly asEcdsa: SpCoreEcdsaPublic;
|
readonly asEcdsa: SpCoreEcdsaPublic;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name SpCoreEcdsaPublic (354) */
|
/** @name SpCoreEcdsaPublic (361) */
|
||||||
export interface SpCoreEcdsaPublic extends U8aFixed {}
|
export interface SpCoreEcdsaPublic extends U8aFixed {}
|
||||||
|
|
||||||
/** @name PolkadotRuntimeOriginCaller (359) */
|
/** @name PolkadotRuntimeParachainsConfigurationHostConfiguration (514) */
|
||||||
export interface PolkadotRuntimeOriginCaller extends Enum {
|
|
||||||
readonly isSystem: boolean;
|
|
||||||
readonly asSystem: FrameSystemRawOrigin;
|
|
||||||
readonly isVoid: boolean;
|
|
||||||
readonly isCouncil: boolean;
|
|
||||||
readonly asCouncil: PalletCollectiveRawOrigin;
|
|
||||||
readonly isTechnicalCommittee: boolean;
|
|
||||||
readonly asTechnicalCommittee: PalletCollectiveRawOrigin;
|
|
||||||
readonly isParachainsOrigin: boolean;
|
|
||||||
readonly asParachainsOrigin: PolkadotRuntimeParachainsOriginPalletOrigin;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @name PolkadotRuntimeParachainsOriginPalletOrigin (363) */
|
|
||||||
export interface PolkadotRuntimeParachainsOriginPalletOrigin extends Enum {
|
|
||||||
readonly isParachain: boolean;
|
|
||||||
readonly asParachain: u32;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @name PolkadotRuntimeParachainsConfigurationHostConfiguration (513) */
|
|
||||||
export interface PolkadotRuntimeParachainsConfigurationHostConfiguration extends Struct {
|
export interface PolkadotRuntimeParachainsConfigurationHostConfiguration extends Struct {
|
||||||
readonly maxCodeSize: u32;
|
readonly maxCodeSize: u32;
|
||||||
readonly maxHeadDataSize: u32;
|
readonly maxHeadDataSize: u32;
|
||||||
@@ -300,13 +300,13 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly umpMaxIndividualWeight: u64;
|
readonly umpMaxIndividualWeight: u64;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord (517) */
|
/** @name PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord (518) */
|
||||||
export interface PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord extends Struct {
|
export interface PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord extends Struct {
|
||||||
readonly bitfield: BitVec;
|
readonly bitfield: BitVec;
|
||||||
readonly submittedAt: u32;
|
readonly submittedAt: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotRuntimeParachainsInclusionCandidatePendingAvailability (518) */
|
/** @name PolkadotRuntimeParachainsInclusionCandidatePendingAvailability (519) */
|
||||||
export interface PolkadotRuntimeParachainsInclusionCandidatePendingAvailability extends Struct {
|
export interface PolkadotRuntimeParachainsInclusionCandidatePendingAvailability extends Struct {
|
||||||
readonly core: u32;
|
readonly core: u32;
|
||||||
readonly hash_: H256;
|
readonly hash_: H256;
|
||||||
@@ -318,42 +318,42 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly backingGroup: u32;
|
readonly backingGroup: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotPrimitivesV1ScrapedOnChainVotes (520) */
|
/** @name PolkadotPrimitivesV1ScrapedOnChainVotes (521) */
|
||||||
export interface PolkadotPrimitivesV1ScrapedOnChainVotes extends Struct {
|
export interface PolkadotPrimitivesV1ScrapedOnChainVotes extends Struct {
|
||||||
readonly session: u32;
|
readonly session: u32;
|
||||||
readonly backingValidatorsPerCandidate: Vec<ITuple<[PolkadotPrimitivesV1CandidateReceipt, Vec<ITuple<[u32, PolkadotPrimitivesV0ValidityAttestation]>>]>>;
|
readonly backingValidatorsPerCandidate: Vec<ITuple<[PolkadotPrimitivesV1CandidateReceipt, Vec<ITuple<[u32, PolkadotPrimitivesV0ValidityAttestation]>>]>>;
|
||||||
readonly disputes: Vec<PolkadotPrimitivesV1DisputeStatementSet>;
|
readonly disputes: Vec<PolkadotPrimitivesV1DisputeStatementSet>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotRuntimeParachainsSchedulerParathreadClaimQueue (527) */
|
/** @name PolkadotRuntimeParachainsSchedulerParathreadClaimQueue (528) */
|
||||||
export interface PolkadotRuntimeParachainsSchedulerParathreadClaimQueue extends Struct {
|
export interface PolkadotRuntimeParachainsSchedulerParathreadClaimQueue extends Struct {
|
||||||
readonly queue: Vec<PolkadotRuntimeParachainsSchedulerQueuedParathread>;
|
readonly queue: Vec<PolkadotRuntimeParachainsSchedulerQueuedParathread>;
|
||||||
readonly nextCoreOffset: u32;
|
readonly nextCoreOffset: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotRuntimeParachainsSchedulerQueuedParathread (529) */
|
/** @name PolkadotRuntimeParachainsSchedulerQueuedParathread (530) */
|
||||||
export interface PolkadotRuntimeParachainsSchedulerQueuedParathread extends Struct {
|
export interface PolkadotRuntimeParachainsSchedulerQueuedParathread extends Struct {
|
||||||
readonly claim: PolkadotPrimitivesV1ParathreadEntry;
|
readonly claim: PolkadotPrimitivesV1ParathreadEntry;
|
||||||
readonly coreOffset: u32;
|
readonly coreOffset: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotPrimitivesV1ParathreadEntry (530) */
|
/** @name PolkadotPrimitivesV1ParathreadEntry (531) */
|
||||||
export interface PolkadotPrimitivesV1ParathreadEntry extends Struct {
|
export interface PolkadotPrimitivesV1ParathreadEntry extends Struct {
|
||||||
readonly claim: PolkadotPrimitivesV1ParathreadClaim;
|
readonly claim: PolkadotPrimitivesV1ParathreadClaim;
|
||||||
readonly retries: u32;
|
readonly retries: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotPrimitivesV1ParathreadClaim (531) */
|
/** @name PolkadotPrimitivesV1ParathreadClaim (532) */
|
||||||
export interface PolkadotPrimitivesV1ParathreadClaim extends ITuple<[u32, PolkadotPrimitivesV0CollatorAppPublic]> {}
|
export interface PolkadotPrimitivesV1ParathreadClaim extends ITuple<[u32, PolkadotPrimitivesV0CollatorAppPublic]> {}
|
||||||
|
|
||||||
/** @name PolkadotPrimitivesV1CoreOccupied (534) */
|
/** @name PolkadotPrimitivesV1CoreOccupied (535) */
|
||||||
export interface PolkadotPrimitivesV1CoreOccupied extends Enum {
|
export interface PolkadotPrimitivesV1CoreOccupied extends Enum {
|
||||||
readonly isParathread: boolean;
|
readonly isParathread: boolean;
|
||||||
readonly asParathread: PolkadotPrimitivesV1ParathreadEntry;
|
readonly asParathread: PolkadotPrimitivesV1ParathreadEntry;
|
||||||
readonly isParachain: boolean;
|
readonly isParachain: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotRuntimeParachainsSchedulerCoreAssignment (537) */
|
/** @name PolkadotRuntimeParachainsSchedulerCoreAssignment (538) */
|
||||||
export interface PolkadotRuntimeParachainsSchedulerCoreAssignment extends Struct {
|
export interface PolkadotRuntimeParachainsSchedulerCoreAssignment extends Struct {
|
||||||
readonly core: u32;
|
readonly core: u32;
|
||||||
readonly paraId: u32;
|
readonly paraId: u32;
|
||||||
@@ -361,14 +361,14 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly groupIdx: u32;
|
readonly groupIdx: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotRuntimeParachainsSchedulerAssignmentKind (538) */
|
/** @name PolkadotRuntimeParachainsSchedulerAssignmentKind (539) */
|
||||||
export interface PolkadotRuntimeParachainsSchedulerAssignmentKind extends Enum {
|
export interface PolkadotRuntimeParachainsSchedulerAssignmentKind extends Enum {
|
||||||
readonly isParachain: boolean;
|
readonly isParachain: boolean;
|
||||||
readonly isParathread: boolean;
|
readonly isParathread: boolean;
|
||||||
readonly asParathread: ITuple<[PolkadotPrimitivesV0CollatorAppPublic, u32]>;
|
readonly asParathread: ITuple<[PolkadotPrimitivesV0CollatorAppPublic, u32]>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotRuntimeParachainsParasParaLifecycle (539) */
|
/** @name PolkadotRuntimeParachainsParasParaLifecycle (540) */
|
||||||
export interface PolkadotRuntimeParachainsParasParaLifecycle extends Enum {
|
export interface PolkadotRuntimeParachainsParasParaLifecycle extends Enum {
|
||||||
readonly isOnboarding: boolean;
|
readonly isOnboarding: boolean;
|
||||||
readonly isParathread: boolean;
|
readonly isParathread: boolean;
|
||||||
@@ -379,50 +379,50 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly isOffboardingParachain: boolean;
|
readonly isOffboardingParachain: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotRuntimeParachainsParasParaPastCodeMeta (541) */
|
/** @name PolkadotRuntimeParachainsParasParaPastCodeMeta (542) */
|
||||||
export interface PolkadotRuntimeParachainsParasParaPastCodeMeta extends Struct {
|
export interface PolkadotRuntimeParachainsParasParaPastCodeMeta extends Struct {
|
||||||
readonly upgradeTimes: Vec<PolkadotRuntimeParachainsParasReplacementTimes>;
|
readonly upgradeTimes: Vec<PolkadotRuntimeParachainsParasReplacementTimes>;
|
||||||
readonly lastPruned: Option<u32>;
|
readonly lastPruned: Option<u32>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotRuntimeParachainsParasReplacementTimes (543) */
|
/** @name PolkadotRuntimeParachainsParasReplacementTimes (544) */
|
||||||
export interface PolkadotRuntimeParachainsParasReplacementTimes extends Struct {
|
export interface PolkadotRuntimeParachainsParasReplacementTimes extends Struct {
|
||||||
readonly expectedAt: u32;
|
readonly expectedAt: u32;
|
||||||
readonly activatedAt: u32;
|
readonly activatedAt: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotPrimitivesV1UpgradeGoAhead (545) */
|
/** @name PolkadotPrimitivesV1UpgradeGoAhead (546) */
|
||||||
export interface PolkadotPrimitivesV1UpgradeGoAhead extends Enum {
|
export interface PolkadotPrimitivesV1UpgradeGoAhead extends Enum {
|
||||||
readonly isAbort: boolean;
|
readonly isAbort: boolean;
|
||||||
readonly isGoAhead: boolean;
|
readonly isGoAhead: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotPrimitivesV1UpgradeRestriction (546) */
|
/** @name PolkadotPrimitivesV1UpgradeRestriction (547) */
|
||||||
export interface PolkadotPrimitivesV1UpgradeRestriction extends Enum {
|
export interface PolkadotPrimitivesV1UpgradeRestriction extends Enum {
|
||||||
readonly isPresent: boolean;
|
readonly isPresent: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotRuntimeParachainsParasParaGenesisArgs (547) */
|
/** @name PolkadotRuntimeParachainsParasParaGenesisArgs (548) */
|
||||||
export interface PolkadotRuntimeParachainsParasParaGenesisArgs extends Struct {
|
export interface PolkadotRuntimeParachainsParasParaGenesisArgs extends Struct {
|
||||||
readonly genesisHead: Bytes;
|
readonly genesisHead: Bytes;
|
||||||
readonly validationCode: Bytes;
|
readonly validationCode: Bytes;
|
||||||
readonly parachain: bool;
|
readonly parachain: bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotRuntimeParachainsInitializerBufferedSessionChange (550) */
|
/** @name PolkadotRuntimeParachainsInitializerBufferedSessionChange (551) */
|
||||||
export interface PolkadotRuntimeParachainsInitializerBufferedSessionChange extends Struct {
|
export interface PolkadotRuntimeParachainsInitializerBufferedSessionChange extends Struct {
|
||||||
readonly validators: Vec<PolkadotPrimitivesV0ValidatorAppPublic>;
|
readonly validators: Vec<PolkadotPrimitivesV0ValidatorAppPublic>;
|
||||||
readonly queued: Vec<PolkadotPrimitivesV0ValidatorAppPublic>;
|
readonly queued: Vec<PolkadotPrimitivesV0ValidatorAppPublic>;
|
||||||
readonly sessionIndex: u32;
|
readonly sessionIndex: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotCorePrimitivesInboundDownwardMessage (552) */
|
/** @name PolkadotCorePrimitivesInboundDownwardMessage (553) */
|
||||||
export interface PolkadotCorePrimitivesInboundDownwardMessage extends Struct {
|
export interface PolkadotCorePrimitivesInboundDownwardMessage extends Struct {
|
||||||
readonly sentAt: u32;
|
readonly sentAt: u32;
|
||||||
readonly msg: Bytes;
|
readonly msg: Bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest (555) */
|
/** @name PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest (556) */
|
||||||
export interface PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest extends Struct {
|
export interface PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest extends Struct {
|
||||||
readonly confirmed: bool;
|
readonly confirmed: bool;
|
||||||
readonly age: u32;
|
readonly age: u32;
|
||||||
@@ -432,7 +432,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly maxTotalSize: u32;
|
readonly maxTotalSize: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotRuntimeParachainsHrmpHrmpChannel (557) */
|
/** @name PolkadotRuntimeParachainsHrmpHrmpChannel (558) */
|
||||||
export interface PolkadotRuntimeParachainsHrmpHrmpChannel extends Struct {
|
export interface PolkadotRuntimeParachainsHrmpHrmpChannel extends Struct {
|
||||||
readonly maxCapacity: u32;
|
readonly maxCapacity: u32;
|
||||||
readonly maxTotalSize: u32;
|
readonly maxTotalSize: u32;
|
||||||
@@ -444,13 +444,13 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly recipientDeposit: u128;
|
readonly recipientDeposit: u128;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotCorePrimitivesInboundHrmpMessage (560) */
|
/** @name PolkadotCorePrimitivesInboundHrmpMessage (561) */
|
||||||
export interface PolkadotCorePrimitivesInboundHrmpMessage extends Struct {
|
export interface PolkadotCorePrimitivesInboundHrmpMessage extends Struct {
|
||||||
readonly sentAt: u32;
|
readonly sentAt: u32;
|
||||||
readonly data: Bytes;
|
readonly data: Bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotPrimitivesV1SessionInfo (565) */
|
/** @name PolkadotPrimitivesV1SessionInfo (566) */
|
||||||
export interface PolkadotPrimitivesV1SessionInfo extends Struct {
|
export interface PolkadotPrimitivesV1SessionInfo extends Struct {
|
||||||
readonly validators: Vec<PolkadotPrimitivesV0ValidatorAppPublic>;
|
readonly validators: Vec<PolkadotPrimitivesV0ValidatorAppPublic>;
|
||||||
readonly discoveryKeys: Vec<SpAuthorityDiscoveryAppPublic>;
|
readonly discoveryKeys: Vec<SpAuthorityDiscoveryAppPublic>;
|
||||||
@@ -464,14 +464,14 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly neededApprovals: u32;
|
readonly neededApprovals: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotRuntimeCommonParasRegistrarParaInfo (567) */
|
/** @name PolkadotRuntimeCommonParasRegistrarParaInfo (568) */
|
||||||
export interface PolkadotRuntimeCommonParasRegistrarParaInfo extends Struct {
|
export interface PolkadotRuntimeCommonParasRegistrarParaInfo extends Struct {
|
||||||
readonly manager: AccountId32;
|
readonly manager: AccountId32;
|
||||||
readonly deposit: u128;
|
readonly deposit: u128;
|
||||||
readonly locked: bool;
|
readonly locked: bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotRuntimeCommonCrowdloanFundInfo (577) */
|
/** @name PolkadotRuntimeCommonCrowdloanFundInfo (578) */
|
||||||
export interface PolkadotRuntimeCommonCrowdloanFundInfo extends Struct {
|
export interface PolkadotRuntimeCommonCrowdloanFundInfo extends Struct {
|
||||||
readonly depositor: AccountId32;
|
readonly depositor: AccountId32;
|
||||||
readonly verifier: Option<SpRuntimeMultiSigner>;
|
readonly verifier: Option<SpRuntimeMultiSigner>;
|
||||||
@@ -485,7 +485,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly trieIndex: u32;
|
readonly trieIndex: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotRuntimeCommonCrowdloanLastContribution (578) */
|
/** @name PolkadotRuntimeCommonCrowdloanLastContribution (579) */
|
||||||
export interface PolkadotRuntimeCommonCrowdloanLastContribution extends Enum {
|
export interface PolkadotRuntimeCommonCrowdloanLastContribution extends Enum {
|
||||||
readonly isNever: boolean;
|
readonly isNever: boolean;
|
||||||
readonly isPreEnding: boolean;
|
readonly isPreEnding: boolean;
|
||||||
@@ -494,10 +494,10 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly asEnding: u32;
|
readonly asEnding: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotRuntimeCommonClaimsPrevalidateAttests (590) */
|
/** @name PolkadotRuntimeCommonClaimsPrevalidateAttests (591) */
|
||||||
export type PolkadotRuntimeCommonClaimsPrevalidateAttests = Null;
|
export type PolkadotRuntimeCommonClaimsPrevalidateAttests = Null;
|
||||||
|
|
||||||
/** @name PolkadotRuntimeRuntime (591) */
|
/** @name PolkadotRuntimeRuntime (592) */
|
||||||
export type PolkadotRuntimeRuntime = Null;
|
export type PolkadotRuntimeRuntime = Null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,13 +33,13 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly mandatory: u64;
|
readonly mandatory: u64;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name SpRuntimeGenericDigest (11) */
|
/** @name SpRuntimeDigest (11) */
|
||||||
export interface SpRuntimeGenericDigest extends Struct {
|
export interface SpRuntimeDigest extends Struct {
|
||||||
readonly logs: Vec<SpRuntimeGenericDigestDigestItem>;
|
readonly logs: Vec<SpRuntimeDigestDigestItem>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name SpRuntimeGenericDigestDigestItem (13) */
|
/** @name SpRuntimeDigestDigestItem (13) */
|
||||||
export interface SpRuntimeGenericDigestDigestItem extends Enum {
|
export interface SpRuntimeDigestDigestItem extends Enum {
|
||||||
readonly isOther: boolean;
|
readonly isOther: boolean;
|
||||||
readonly asOther: Bytes;
|
readonly asOther: Bytes;
|
||||||
readonly isChangesTrieRoot: boolean;
|
readonly isChangesTrieRoot: boolean;
|
||||||
@@ -51,12 +51,12 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly isPreRuntime: boolean;
|
readonly isPreRuntime: boolean;
|
||||||
readonly asPreRuntime: ITuple<[U8aFixed, Bytes]>;
|
readonly asPreRuntime: ITuple<[U8aFixed, Bytes]>;
|
||||||
readonly isChangesTrieSignal: boolean;
|
readonly isChangesTrieSignal: boolean;
|
||||||
readonly asChangesTrieSignal: SpRuntimeGenericDigestChangesTrieSignal;
|
readonly asChangesTrieSignal: SpRuntimeDigestChangesTrieSignal;
|
||||||
readonly isRuntimeEnvironmentUpdated: boolean;
|
readonly isRuntimeEnvironmentUpdated: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name SpRuntimeGenericDigestChangesTrieSignal (15) */
|
/** @name SpRuntimeDigestChangesTrieSignal (15) */
|
||||||
export interface SpRuntimeGenericDigestChangesTrieSignal extends Enum {
|
export interface SpRuntimeDigestChangesTrieSignal extends Enum {
|
||||||
readonly isNewConfiguration: boolean;
|
readonly isNewConfiguration: boolean;
|
||||||
readonly asNewConfiguration: Option<SpCoreChangesTrieChangesTrieConfiguration>;
|
readonly asNewConfiguration: Option<SpCoreChangesTrieChangesTrieConfiguration>;
|
||||||
}
|
}
|
||||||
@@ -130,13 +130,13 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly isDivisionByZero: boolean;
|
readonly isDivisionByZero: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name FrameSupportTokensMiscBalanceStatus (31) */
|
/** @name FrameSupportTokensMiscBalanceStatus (33) */
|
||||||
export interface FrameSupportTokensMiscBalanceStatus extends Enum {
|
export interface FrameSupportTokensMiscBalanceStatus extends Enum {
|
||||||
readonly isFree: boolean;
|
readonly isFree: boolean;
|
||||||
readonly isReserved: boolean;
|
readonly isReserved: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletElectionProviderMultiPhaseElectionCompute (33) */
|
/** @name PalletElectionProviderMultiPhaseElectionCompute (35) */
|
||||||
export interface PalletElectionProviderMultiPhaseElectionCompute extends Enum {
|
export interface PalletElectionProviderMultiPhaseElectionCompute extends Enum {
|
||||||
readonly isOnChain: boolean;
|
readonly isOnChain: boolean;
|
||||||
readonly isSigned: boolean;
|
readonly isSigned: boolean;
|
||||||
@@ -145,7 +145,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly isEmergency: boolean;
|
readonly isEmergency: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletDemocracyVoteThreshold (40) */
|
/** @name PalletDemocracyVoteThreshold (42) */
|
||||||
export interface PalletDemocracyVoteThreshold extends Enum {
|
export interface PalletDemocracyVoteThreshold extends Enum {
|
||||||
readonly isSuperMajorityApprove: boolean;
|
readonly isSuperMajorityApprove: boolean;
|
||||||
readonly isSuperMajorityAgainst: boolean;
|
readonly isSuperMajorityAgainst: boolean;
|
||||||
@@ -260,17 +260,17 @@ declare module '@polkadot/types/lookup' {
|
|||||||
export interface SpConsensusSlotsEquivocationProof extends Struct {
|
export interface SpConsensusSlotsEquivocationProof extends Struct {
|
||||||
readonly offender: SpConsensusBabeAppPublic;
|
readonly offender: SpConsensusBabeAppPublic;
|
||||||
readonly slot: u64;
|
readonly slot: u64;
|
||||||
readonly firstHeader: SpRuntimeGenericHeader;
|
readonly firstHeader: SpRuntimeHeader;
|
||||||
readonly secondHeader: SpRuntimeGenericHeader;
|
readonly secondHeader: SpRuntimeHeader;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name SpRuntimeGenericHeader (123) */
|
/** @name SpRuntimeHeader (123) */
|
||||||
export interface SpRuntimeGenericHeader extends Struct {
|
export interface SpRuntimeHeader extends Struct {
|
||||||
readonly parentHash: H256;
|
readonly parentHash: H256;
|
||||||
readonly number: Compact<u32>;
|
readonly number: Compact<u32>;
|
||||||
readonly stateRoot: H256;
|
readonly stateRoot: H256;
|
||||||
readonly extrinsicsRoot: H256;
|
readonly extrinsicsRoot: H256;
|
||||||
readonly digest: SpRuntimeGenericDigest;
|
readonly digest: SpRuntimeDigest;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name SpRuntimeBlakeTwo256 (124) */
|
/** @name SpRuntimeBlakeTwo256 (124) */
|
||||||
@@ -553,13 +553,44 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly proof: Vec<Bytes>;
|
readonly proof: Vec<Bytes>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name SpConsensusBabeBabeEpochConfiguration (314) */
|
/** @name NodeRuntimeOriginCaller (307) */
|
||||||
|
export interface NodeRuntimeOriginCaller extends Enum {
|
||||||
|
readonly isSystem: boolean;
|
||||||
|
readonly asSystem: FrameSystemRawOrigin;
|
||||||
|
readonly isVoid: boolean;
|
||||||
|
readonly isCouncil: boolean;
|
||||||
|
readonly asCouncil: PalletCollectiveRawOrigin;
|
||||||
|
readonly isTechnicalCommittee: boolean;
|
||||||
|
readonly asTechnicalCommittee: PalletCollectiveRawOrigin;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @name FrameSystemRawOrigin (308) */
|
||||||
|
export interface FrameSystemRawOrigin extends Enum {
|
||||||
|
readonly isRoot: boolean;
|
||||||
|
readonly isSigned: boolean;
|
||||||
|
readonly asSigned: AccountId32;
|
||||||
|
readonly isNone: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @name PalletCollectiveRawOrigin (309) */
|
||||||
|
export interface PalletCollectiveRawOrigin extends Enum {
|
||||||
|
readonly isMembers: boolean;
|
||||||
|
readonly asMembers: ITuple<[u32, u32]>;
|
||||||
|
readonly isMember: boolean;
|
||||||
|
readonly asMember: AccountId32;
|
||||||
|
readonly isPhantom: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @name SpCoreVoid (311) */
|
||||||
|
export type SpCoreVoid = Null;
|
||||||
|
|
||||||
|
/** @name SpConsensusBabeBabeEpochConfiguration (319) */
|
||||||
export interface SpConsensusBabeBabeEpochConfiguration extends Struct {
|
export interface SpConsensusBabeBabeEpochConfiguration extends Struct {
|
||||||
readonly c: ITuple<[u64, u64]>;
|
readonly c: ITuple<[u64, u64]>;
|
||||||
readonly allowedSlots: SpConsensusBabeAllowedSlots;
|
readonly allowedSlots: SpConsensusBabeAllowedSlots;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletAuthorshipUncleEntryItem (317) */
|
/** @name PalletAuthorshipUncleEntryItem (322) */
|
||||||
export interface PalletAuthorshipUncleEntryItem extends Enum {
|
export interface PalletAuthorshipUncleEntryItem extends Enum {
|
||||||
readonly isInclusionHeight: boolean;
|
readonly isInclusionHeight: boolean;
|
||||||
readonly asInclusionHeight: u32;
|
readonly asInclusionHeight: u32;
|
||||||
@@ -567,39 +598,39 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly asUncle: ITuple<[H256, Option<AccountId32>]>;
|
readonly asUncle: ITuple<[H256, Option<AccountId32>]>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletBalancesBalanceLock (322) */
|
/** @name PalletBalancesBalanceLock (327) */
|
||||||
export interface PalletBalancesBalanceLock extends Struct {
|
export interface PalletBalancesBalanceLock extends Struct {
|
||||||
readonly id: U8aFixed;
|
readonly id: U8aFixed;
|
||||||
readonly amount: u128;
|
readonly amount: u128;
|
||||||
readonly reasons: PalletBalancesReasons;
|
readonly reasons: PalletBalancesReasons;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletBalancesReasons (323) */
|
/** @name PalletBalancesReasons (328) */
|
||||||
export interface PalletBalancesReasons extends Enum {
|
export interface PalletBalancesReasons extends Enum {
|
||||||
readonly isFee: boolean;
|
readonly isFee: boolean;
|
||||||
readonly isMisc: boolean;
|
readonly isMisc: boolean;
|
||||||
readonly isAll: boolean;
|
readonly isAll: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletBalancesReserveData (326) */
|
/** @name PalletBalancesReserveData (331) */
|
||||||
export interface PalletBalancesReserveData extends Struct {
|
export interface PalletBalancesReserveData extends Struct {
|
||||||
readonly id: U8aFixed;
|
readonly id: U8aFixed;
|
||||||
readonly amount: u128;
|
readonly amount: u128;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletBalancesReleases (328) */
|
/** @name PalletBalancesReleases (333) */
|
||||||
export interface PalletBalancesReleases extends Enum {
|
export interface PalletBalancesReleases extends Enum {
|
||||||
readonly isV100: boolean;
|
readonly isV100: boolean;
|
||||||
readonly isV200: boolean;
|
readonly isV200: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletTransactionPaymentReleases (331) */
|
/** @name PalletTransactionPaymentReleases (336) */
|
||||||
export interface PalletTransactionPaymentReleases extends Enum {
|
export interface PalletTransactionPaymentReleases extends Enum {
|
||||||
readonly isV1Ancient: boolean;
|
readonly isV1Ancient: boolean;
|
||||||
readonly isV2: boolean;
|
readonly isV2: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name FrameSupportWeightsWeightToFeeCoefficient (333) */
|
/** @name FrameSupportWeightsWeightToFeeCoefficient (338) */
|
||||||
export interface FrameSupportWeightsWeightToFeeCoefficient extends Struct {
|
export interface FrameSupportWeightsWeightToFeeCoefficient extends Struct {
|
||||||
readonly coeffInteger: u128;
|
readonly coeffInteger: u128;
|
||||||
readonly coeffFrac: Perbill;
|
readonly coeffFrac: Perbill;
|
||||||
@@ -607,7 +638,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly degree: u8;
|
readonly degree: u8;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletElectionProviderMultiPhasePhase (334) */
|
/** @name PalletElectionProviderMultiPhasePhase (339) */
|
||||||
export interface PalletElectionProviderMultiPhasePhase extends Enum {
|
export interface PalletElectionProviderMultiPhasePhase extends Enum {
|
||||||
readonly isOff: boolean;
|
readonly isOff: boolean;
|
||||||
readonly isSigned: boolean;
|
readonly isSigned: boolean;
|
||||||
@@ -616,20 +647,20 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly isEmergency: boolean;
|
readonly isEmergency: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletElectionProviderMultiPhaseReadySolution (336) */
|
/** @name PalletElectionProviderMultiPhaseReadySolution (341) */
|
||||||
export interface PalletElectionProviderMultiPhaseReadySolution extends Struct {
|
export interface PalletElectionProviderMultiPhaseReadySolution extends Struct {
|
||||||
readonly supports: Vec<ITuple<[AccountId32, SpNposElectionsSupport]>>;
|
readonly supports: Vec<ITuple<[AccountId32, SpNposElectionsSupport]>>;
|
||||||
readonly score: Vec<u128>;
|
readonly score: Vec<u128>;
|
||||||
readonly compute: PalletElectionProviderMultiPhaseElectionCompute;
|
readonly compute: PalletElectionProviderMultiPhaseElectionCompute;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletElectionProviderMultiPhaseRoundSnapshot (337) */
|
/** @name PalletElectionProviderMultiPhaseRoundSnapshot (342) */
|
||||||
export interface PalletElectionProviderMultiPhaseRoundSnapshot extends Struct {
|
export interface PalletElectionProviderMultiPhaseRoundSnapshot extends Struct {
|
||||||
readonly voters: Vec<ITuple<[AccountId32, u64, Vec<AccountId32>]>>;
|
readonly voters: Vec<ITuple<[AccountId32, u64, Vec<AccountId32>]>>;
|
||||||
readonly targets: Vec<AccountId32>;
|
readonly targets: Vec<AccountId32>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletElectionProviderMultiPhaseSignedSignedSubmission (344) */
|
/** @name PalletElectionProviderMultiPhaseSignedSignedSubmission (349) */
|
||||||
export interface PalletElectionProviderMultiPhaseSignedSignedSubmission extends Struct {
|
export interface PalletElectionProviderMultiPhaseSignedSignedSubmission extends Struct {
|
||||||
readonly who: AccountId32;
|
readonly who: AccountId32;
|
||||||
readonly deposit: u128;
|
readonly deposit: u128;
|
||||||
@@ -637,7 +668,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly reward: u128;
|
readonly reward: u128;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletStakingStakingLedger (346) */
|
/** @name PalletStakingStakingLedger (351) */
|
||||||
export interface PalletStakingStakingLedger extends Struct {
|
export interface PalletStakingStakingLedger extends Struct {
|
||||||
readonly stash: AccountId32;
|
readonly stash: AccountId32;
|
||||||
readonly total: Compact<u128>;
|
readonly total: Compact<u128>;
|
||||||
@@ -646,32 +677,32 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly claimedRewards: Vec<u32>;
|
readonly claimedRewards: Vec<u32>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletStakingUnlockChunk (348) */
|
/** @name PalletStakingUnlockChunk (353) */
|
||||||
export interface PalletStakingUnlockChunk extends Struct {
|
export interface PalletStakingUnlockChunk extends Struct {
|
||||||
readonly value: Compact<u128>;
|
readonly value: Compact<u128>;
|
||||||
readonly era: Compact<u32>;
|
readonly era: Compact<u32>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletStakingNominations (349) */
|
/** @name PalletStakingNominations (354) */
|
||||||
export interface PalletStakingNominations extends Struct {
|
export interface PalletStakingNominations extends Struct {
|
||||||
readonly targets: Vec<AccountId32>;
|
readonly targets: Vec<AccountId32>;
|
||||||
readonly submittedIn: u32;
|
readonly submittedIn: u32;
|
||||||
readonly suppressed: bool;
|
readonly suppressed: bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletStakingActiveEraInfo (350) */
|
/** @name PalletStakingActiveEraInfo (355) */
|
||||||
export interface PalletStakingActiveEraInfo extends Struct {
|
export interface PalletStakingActiveEraInfo extends Struct {
|
||||||
readonly index: u32;
|
readonly index: u32;
|
||||||
readonly start: Option<u64>;
|
readonly start: Option<u64>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletStakingEraRewardPoints (352) */
|
/** @name PalletStakingEraRewardPoints (357) */
|
||||||
export interface PalletStakingEraRewardPoints extends Struct {
|
export interface PalletStakingEraRewardPoints extends Struct {
|
||||||
readonly total: u32;
|
readonly total: u32;
|
||||||
readonly individual: BTreeMap<AccountId32, u32>;
|
readonly individual: BTreeMap<AccountId32, u32>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletStakingForcing (356) */
|
/** @name PalletStakingForcing (361) */
|
||||||
export interface PalletStakingForcing extends Enum {
|
export interface PalletStakingForcing extends Enum {
|
||||||
readonly isNotForcing: boolean;
|
readonly isNotForcing: boolean;
|
||||||
readonly isForceNew: boolean;
|
readonly isForceNew: boolean;
|
||||||
@@ -679,7 +710,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly isForceAlways: boolean;
|
readonly isForceAlways: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletStakingUnappliedSlash (358) */
|
/** @name PalletStakingUnappliedSlash (363) */
|
||||||
export interface PalletStakingUnappliedSlash extends Struct {
|
export interface PalletStakingUnappliedSlash extends Struct {
|
||||||
readonly validator: AccountId32;
|
readonly validator: AccountId32;
|
||||||
readonly own: u128;
|
readonly own: u128;
|
||||||
@@ -688,7 +719,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly payout: u128;
|
readonly payout: u128;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletStakingSlashingSlashingSpans (360) */
|
/** @name PalletStakingSlashingSlashingSpans (365) */
|
||||||
export interface PalletStakingSlashingSlashingSpans extends Struct {
|
export interface PalletStakingSlashingSlashingSpans extends Struct {
|
||||||
readonly spanIndex: u32;
|
readonly spanIndex: u32;
|
||||||
readonly lastStart: u32;
|
readonly lastStart: u32;
|
||||||
@@ -696,13 +727,13 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly prior: Vec<u32>;
|
readonly prior: Vec<u32>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletStakingSlashingSpanRecord (361) */
|
/** @name PalletStakingSlashingSpanRecord (366) */
|
||||||
export interface PalletStakingSlashingSpanRecord extends Struct {
|
export interface PalletStakingSlashingSpanRecord extends Struct {
|
||||||
readonly slashed: u128;
|
readonly slashed: u128;
|
||||||
readonly paidOut: u128;
|
readonly paidOut: u128;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletStakingReleases (364) */
|
/** @name PalletStakingReleases (369) */
|
||||||
export interface PalletStakingReleases extends Enum {
|
export interface PalletStakingReleases extends Enum {
|
||||||
readonly isV100Ancient: boolean;
|
readonly isV100Ancient: boolean;
|
||||||
readonly isV200: boolean;
|
readonly isV200: boolean;
|
||||||
@@ -714,10 +745,10 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly isV800: boolean;
|
readonly isV800: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name SpCoreCryptoKeyTypeId (369) */
|
/** @name SpCoreCryptoKeyTypeId (374) */
|
||||||
export interface SpCoreCryptoKeyTypeId extends U8aFixed {}
|
export interface SpCoreCryptoKeyTypeId extends U8aFixed {}
|
||||||
|
|
||||||
/** @name PalletDemocracyPreimageStatus (374) */
|
/** @name PalletDemocracyPreimageStatus (379) */
|
||||||
export interface PalletDemocracyPreimageStatus extends Enum {
|
export interface PalletDemocracyPreimageStatus extends Enum {
|
||||||
readonly isMissing: boolean;
|
readonly isMissing: boolean;
|
||||||
readonly asMissing: u32;
|
readonly asMissing: u32;
|
||||||
@@ -731,7 +762,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
} & Struct;
|
} & Struct;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletDemocracyReferendumInfo (375) */
|
/** @name PalletDemocracyReferendumInfo (380) */
|
||||||
export interface PalletDemocracyReferendumInfo extends Enum {
|
export interface PalletDemocracyReferendumInfo extends Enum {
|
||||||
readonly isOngoing: boolean;
|
readonly isOngoing: boolean;
|
||||||
readonly asOngoing: PalletDemocracyReferendumStatus;
|
readonly asOngoing: PalletDemocracyReferendumStatus;
|
||||||
@@ -742,7 +773,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
} & Struct;
|
} & Struct;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletDemocracyReferendumStatus (376) */
|
/** @name PalletDemocracyReferendumStatus (381) */
|
||||||
export interface PalletDemocracyReferendumStatus extends Struct {
|
export interface PalletDemocracyReferendumStatus extends Struct {
|
||||||
readonly end: u32;
|
readonly end: u32;
|
||||||
readonly proposalHash: H256;
|
readonly proposalHash: H256;
|
||||||
@@ -751,14 +782,14 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly tally: PalletDemocracyTally;
|
readonly tally: PalletDemocracyTally;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletDemocracyTally (377) */
|
/** @name PalletDemocracyTally (382) */
|
||||||
export interface PalletDemocracyTally extends Struct {
|
export interface PalletDemocracyTally extends Struct {
|
||||||
readonly ayes: u128;
|
readonly ayes: u128;
|
||||||
readonly nays: u128;
|
readonly nays: u128;
|
||||||
readonly turnout: u128;
|
readonly turnout: u128;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletDemocracyVoteVoting (378) */
|
/** @name PalletDemocracyVoteVoting (383) */
|
||||||
export interface PalletDemocracyVoteVoting extends Enum {
|
export interface PalletDemocracyVoteVoting extends Enum {
|
||||||
readonly isDirect: boolean;
|
readonly isDirect: boolean;
|
||||||
readonly asDirect: {
|
readonly asDirect: {
|
||||||
@@ -776,21 +807,21 @@ declare module '@polkadot/types/lookup' {
|
|||||||
} & Struct;
|
} & Struct;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletDemocracyDelegations (381) */
|
/** @name PalletDemocracyDelegations (386) */
|
||||||
export interface PalletDemocracyDelegations extends Struct {
|
export interface PalletDemocracyDelegations extends Struct {
|
||||||
readonly votes: u128;
|
readonly votes: u128;
|
||||||
readonly capital: u128;
|
readonly capital: u128;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletDemocracyVotePriorLock (382) */
|
/** @name PalletDemocracyVotePriorLock (387) */
|
||||||
export interface PalletDemocracyVotePriorLock extends ITuple<[u32, u128]> {}
|
export interface PalletDemocracyVotePriorLock extends ITuple<[u32, u128]> {}
|
||||||
|
|
||||||
/** @name PalletDemocracyReleases (385) */
|
/** @name PalletDemocracyReleases (390) */
|
||||||
export interface PalletDemocracyReleases extends Enum {
|
export interface PalletDemocracyReleases extends Enum {
|
||||||
readonly isV1: boolean;
|
readonly isV1: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletCollectiveVotes (388) */
|
/** @name PalletCollectiveVotes (393) */
|
||||||
export interface PalletCollectiveVotes extends Struct {
|
export interface PalletCollectiveVotes extends Struct {
|
||||||
readonly index: u32;
|
readonly index: u32;
|
||||||
readonly threshold: u32;
|
readonly threshold: u32;
|
||||||
@@ -799,21 +830,21 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly end: u32;
|
readonly end: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletElectionsPhragmenSeatHolder (393) */
|
/** @name PalletElectionsPhragmenSeatHolder (398) */
|
||||||
export interface PalletElectionsPhragmenSeatHolder extends Struct {
|
export interface PalletElectionsPhragmenSeatHolder extends Struct {
|
||||||
readonly who: AccountId32;
|
readonly who: AccountId32;
|
||||||
readonly stake: u128;
|
readonly stake: u128;
|
||||||
readonly deposit: u128;
|
readonly deposit: u128;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletElectionsPhragmenVoter (394) */
|
/** @name PalletElectionsPhragmenVoter (399) */
|
||||||
export interface PalletElectionsPhragmenVoter extends Struct {
|
export interface PalletElectionsPhragmenVoter extends Struct {
|
||||||
readonly votes: Vec<AccountId32>;
|
readonly votes: Vec<AccountId32>;
|
||||||
readonly stake: u128;
|
readonly stake: u128;
|
||||||
readonly deposit: u128;
|
readonly deposit: u128;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletGrandpaStoredState (397) */
|
/** @name PalletGrandpaStoredState (402) */
|
||||||
export interface PalletGrandpaStoredState extends Enum {
|
export interface PalletGrandpaStoredState extends Enum {
|
||||||
readonly isLive: boolean;
|
readonly isLive: boolean;
|
||||||
readonly isPendingPause: boolean;
|
readonly isPendingPause: boolean;
|
||||||
@@ -829,7 +860,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
} & Struct;
|
} & Struct;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletGrandpaStoredPendingChange (398) */
|
/** @name PalletGrandpaStoredPendingChange (403) */
|
||||||
export interface PalletGrandpaStoredPendingChange extends Struct {
|
export interface PalletGrandpaStoredPendingChange extends Struct {
|
||||||
readonly scheduledAt: u32;
|
readonly scheduledAt: u32;
|
||||||
readonly delay: u32;
|
readonly delay: u32;
|
||||||
@@ -837,7 +868,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly forced: Option<u32>;
|
readonly forced: Option<u32>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletTreasuryProposal (401) */
|
/** @name PalletTreasuryProposal (406) */
|
||||||
export interface PalletTreasuryProposal extends Struct {
|
export interface PalletTreasuryProposal extends Struct {
|
||||||
readonly proposer: AccountId32;
|
readonly proposer: AccountId32;
|
||||||
readonly value: u128;
|
readonly value: u128;
|
||||||
@@ -845,10 +876,10 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly bond: u128;
|
readonly bond: u128;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name FrameSupportPalletId (404) */
|
/** @name FrameSupportPalletId (409) */
|
||||||
export interface FrameSupportPalletId extends U8aFixed {}
|
export interface FrameSupportPalletId extends U8aFixed {}
|
||||||
|
|
||||||
/** @name PalletContractsWasmPrefabWasmModule (406) */
|
/** @name PalletContractsWasmPrefabWasmModule (411) */
|
||||||
export interface PalletContractsWasmPrefabWasmModule extends Struct {
|
export interface PalletContractsWasmPrefabWasmModule extends Struct {
|
||||||
readonly instructionWeightsVersion: Compact<u32>;
|
readonly instructionWeightsVersion: Compact<u32>;
|
||||||
readonly initial: Compact<u32>;
|
readonly initial: Compact<u32>;
|
||||||
@@ -859,26 +890,26 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly originalCodeLen: u32;
|
readonly originalCodeLen: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletContractsStorageRawContractInfo (408) */
|
/** @name PalletContractsStorageRawContractInfo (413) */
|
||||||
export interface PalletContractsStorageRawContractInfo extends Struct {
|
export interface PalletContractsStorageRawContractInfo extends Struct {
|
||||||
readonly trieId: Bytes;
|
readonly trieId: Bytes;
|
||||||
readonly codeHash: H256;
|
readonly codeHash: H256;
|
||||||
readonly reserved: Option<Null>;
|
readonly reserved: Option<Null>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletContractsStorageDeletedContract (410) */
|
/** @name PalletContractsStorageDeletedContract (415) */
|
||||||
export interface PalletContractsStorageDeletedContract extends Struct {
|
export interface PalletContractsStorageDeletedContract extends Struct {
|
||||||
readonly trieId: Bytes;
|
readonly trieId: Bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletContractsSchedule (411) */
|
/** @name PalletContractsSchedule (416) */
|
||||||
export interface PalletContractsSchedule extends Struct {
|
export interface PalletContractsSchedule extends Struct {
|
||||||
readonly limits: PalletContractsScheduleLimits;
|
readonly limits: PalletContractsScheduleLimits;
|
||||||
readonly instructionWeights: PalletContractsScheduleInstructionWeights;
|
readonly instructionWeights: PalletContractsScheduleInstructionWeights;
|
||||||
readonly hostFnWeights: PalletContractsScheduleHostFnWeights;
|
readonly hostFnWeights: PalletContractsScheduleHostFnWeights;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletContractsScheduleLimits (412) */
|
/** @name PalletContractsScheduleLimits (417) */
|
||||||
export interface PalletContractsScheduleLimits extends Struct {
|
export interface PalletContractsScheduleLimits extends Struct {
|
||||||
readonly eventTopics: u32;
|
readonly eventTopics: u32;
|
||||||
readonly stackHeight: u32;
|
readonly stackHeight: u32;
|
||||||
@@ -893,7 +924,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly codeLen: u32;
|
readonly codeLen: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletContractsScheduleInstructionWeights (413) */
|
/** @name PalletContractsScheduleInstructionWeights (418) */
|
||||||
export interface PalletContractsScheduleInstructionWeights extends Struct {
|
export interface PalletContractsScheduleInstructionWeights extends Struct {
|
||||||
readonly version: u32;
|
readonly version: u32;
|
||||||
readonly i64Const: u32;
|
readonly i64Const: u32;
|
||||||
@@ -949,7 +980,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly i64Rotr: u32;
|
readonly i64Rotr: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletContractsScheduleHostFnWeights (414) */
|
/** @name PalletContractsScheduleHostFnWeights (419) */
|
||||||
export interface PalletContractsScheduleHostFnWeights extends Struct {
|
export interface PalletContractsScheduleHostFnWeights extends Struct {
|
||||||
readonly caller: u64;
|
readonly caller: u64;
|
||||||
readonly address: u64;
|
readonly address: u64;
|
||||||
@@ -997,40 +1028,40 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly ecdsaRecover: u64;
|
readonly ecdsaRecover: u64;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletImOnlineBoundedOpaqueNetworkState (420) */
|
/** @name PalletImOnlineBoundedOpaqueNetworkState (425) */
|
||||||
export interface PalletImOnlineBoundedOpaqueNetworkState extends Struct {
|
export interface PalletImOnlineBoundedOpaqueNetworkState extends Struct {
|
||||||
readonly peerId: Bytes;
|
readonly peerId: Bytes;
|
||||||
readonly externalAddresses: Vec<Bytes>;
|
readonly externalAddresses: Vec<Bytes>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name SpStakingOffenceOffenceDetails (425) */
|
/** @name SpStakingOffenceOffenceDetails (432) */
|
||||||
export interface SpStakingOffenceOffenceDetails extends Struct {
|
export interface SpStakingOffenceOffenceDetails extends Struct {
|
||||||
readonly offender: ITuple<[AccountId32, PalletStakingExposure]>;
|
readonly offender: ITuple<[AccountId32, PalletStakingExposure]>;
|
||||||
readonly reporters: Vec<AccountId32>;
|
readonly reporters: Vec<AccountId32>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletIdentityRegistration (427) */
|
/** @name PalletIdentityRegistration (434) */
|
||||||
export interface PalletIdentityRegistration extends Struct {
|
export interface PalletIdentityRegistration extends Struct {
|
||||||
readonly judgements: Vec<ITuple<[u32, PalletIdentityJudgement]>>;
|
readonly judgements: Vec<ITuple<[u32, PalletIdentityJudgement]>>;
|
||||||
readonly deposit: u128;
|
readonly deposit: u128;
|
||||||
readonly info: PalletIdentityIdentityInfo;
|
readonly info: PalletIdentityIdentityInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletIdentityRegistrarInfo (435) */
|
/** @name PalletIdentityRegistrarInfo (442) */
|
||||||
export interface PalletIdentityRegistrarInfo extends Struct {
|
export interface PalletIdentityRegistrarInfo extends Struct {
|
||||||
readonly account: AccountId32;
|
readonly account: AccountId32;
|
||||||
readonly fee: u128;
|
readonly fee: u128;
|
||||||
readonly fields: PalletIdentityBitFlags;
|
readonly fields: PalletIdentityBitFlags;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletSocietyBid (439) */
|
/** @name PalletSocietyBid (446) */
|
||||||
export interface PalletSocietyBid extends Struct {
|
export interface PalletSocietyBid extends Struct {
|
||||||
readonly who: AccountId32;
|
readonly who: AccountId32;
|
||||||
readonly kind: PalletSocietyBidKind;
|
readonly kind: PalletSocietyBidKind;
|
||||||
readonly value: u128;
|
readonly value: u128;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletSocietyBidKind (440) */
|
/** @name PalletSocietyBidKind (447) */
|
||||||
export interface PalletSocietyBidKind extends Enum {
|
export interface PalletSocietyBidKind extends Enum {
|
||||||
readonly isDeposit: boolean;
|
readonly isDeposit: boolean;
|
||||||
readonly asDeposit: u128;
|
readonly asDeposit: u128;
|
||||||
@@ -1038,20 +1069,20 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly asVouch: ITuple<[AccountId32, u128]>;
|
readonly asVouch: ITuple<[AccountId32, u128]>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletSocietyVouchingStatus (442) */
|
/** @name PalletSocietyVouchingStatus (449) */
|
||||||
export interface PalletSocietyVouchingStatus extends Enum {
|
export interface PalletSocietyVouchingStatus extends Enum {
|
||||||
readonly isVouching: boolean;
|
readonly isVouching: boolean;
|
||||||
readonly isBanned: boolean;
|
readonly isBanned: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletSocietyVote (446) */
|
/** @name PalletSocietyVote (453) */
|
||||||
export interface PalletSocietyVote extends Enum {
|
export interface PalletSocietyVote extends Enum {
|
||||||
readonly isSkeptic: boolean;
|
readonly isSkeptic: boolean;
|
||||||
readonly isReject: boolean;
|
readonly isReject: boolean;
|
||||||
readonly isApprove: boolean;
|
readonly isApprove: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletRecoveryRecoveryConfig (448) */
|
/** @name PalletRecoveryRecoveryConfig (455) */
|
||||||
export interface PalletRecoveryRecoveryConfig extends Struct {
|
export interface PalletRecoveryRecoveryConfig extends Struct {
|
||||||
readonly delayPeriod: u32;
|
readonly delayPeriod: u32;
|
||||||
readonly deposit: u128;
|
readonly deposit: u128;
|
||||||
@@ -1059,20 +1090,20 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly threshold: u16;
|
readonly threshold: u16;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletRecoveryActiveRecovery (449) */
|
/** @name PalletRecoveryActiveRecovery (456) */
|
||||||
export interface PalletRecoveryActiveRecovery extends Struct {
|
export interface PalletRecoveryActiveRecovery extends Struct {
|
||||||
readonly created: u32;
|
readonly created: u32;
|
||||||
readonly deposit: u128;
|
readonly deposit: u128;
|
||||||
readonly friends: Vec<AccountId32>;
|
readonly friends: Vec<AccountId32>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletVestingReleases (453) */
|
/** @name PalletVestingReleases (460) */
|
||||||
export interface PalletVestingReleases extends Enum {
|
export interface PalletVestingReleases extends Enum {
|
||||||
readonly isV0: boolean;
|
readonly isV0: boolean;
|
||||||
readonly isV1: boolean;
|
readonly isV1: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletSchedulerScheduledV2 (457) */
|
/** @name PalletSchedulerScheduledV2 (464) */
|
||||||
export interface PalletSchedulerScheduledV2 extends Struct {
|
export interface PalletSchedulerScheduledV2 extends Struct {
|
||||||
readonly maybeId: Option<Bytes>;
|
readonly maybeId: Option<Bytes>;
|
||||||
readonly priority: u8;
|
readonly priority: u8;
|
||||||
@@ -1081,58 +1112,27 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly origin: NodeRuntimeOriginCaller;
|
readonly origin: NodeRuntimeOriginCaller;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name NodeRuntimeOriginCaller (458) */
|
/** @name PalletSchedulerReleases (465) */
|
||||||
export interface NodeRuntimeOriginCaller extends Enum {
|
|
||||||
readonly isSystem: boolean;
|
|
||||||
readonly asSystem: FrameSystemRawOrigin;
|
|
||||||
readonly isVoid: boolean;
|
|
||||||
readonly isCouncil: boolean;
|
|
||||||
readonly asCouncil: PalletCollectiveRawOrigin;
|
|
||||||
readonly isTechnicalCommittee: boolean;
|
|
||||||
readonly asTechnicalCommittee: PalletCollectiveRawOrigin;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @name FrameSystemRawOrigin (459) */
|
|
||||||
export interface FrameSystemRawOrigin extends Enum {
|
|
||||||
readonly isRoot: boolean;
|
|
||||||
readonly isSigned: boolean;
|
|
||||||
readonly asSigned: AccountId32;
|
|
||||||
readonly isNone: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @name PalletCollectiveRawOrigin (460) */
|
|
||||||
export interface PalletCollectiveRawOrigin extends Enum {
|
|
||||||
readonly isMembers: boolean;
|
|
||||||
readonly asMembers: ITuple<[u32, u32]>;
|
|
||||||
readonly isMember: boolean;
|
|
||||||
readonly asMember: AccountId32;
|
|
||||||
readonly isPhantom: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @name SpCoreVoid (462) */
|
|
||||||
export type SpCoreVoid = Null;
|
|
||||||
|
|
||||||
/** @name PalletSchedulerReleases (463) */
|
|
||||||
export interface PalletSchedulerReleases extends Enum {
|
export interface PalletSchedulerReleases extends Enum {
|
||||||
readonly isV1: boolean;
|
readonly isV1: boolean;
|
||||||
readonly isV2: boolean;
|
readonly isV2: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletProxyProxyDefinition (467) */
|
/** @name PalletProxyProxyDefinition (469) */
|
||||||
export interface PalletProxyProxyDefinition extends Struct {
|
export interface PalletProxyProxyDefinition extends Struct {
|
||||||
readonly delegate: AccountId32;
|
readonly delegate: AccountId32;
|
||||||
readonly proxyType: NodeRuntimeProxyType;
|
readonly proxyType: NodeRuntimeProxyType;
|
||||||
readonly delay: u32;
|
readonly delay: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletProxyAnnouncement (471) */
|
/** @name PalletProxyAnnouncement (473) */
|
||||||
export interface PalletProxyAnnouncement extends Struct {
|
export interface PalletProxyAnnouncement extends Struct {
|
||||||
readonly real: AccountId32;
|
readonly real: AccountId32;
|
||||||
readonly callHash: H256;
|
readonly callHash: H256;
|
||||||
readonly height: u32;
|
readonly height: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletMultisigMultisig (475) */
|
/** @name PalletMultisigMultisig (477) */
|
||||||
export interface PalletMultisigMultisig extends Struct {
|
export interface PalletMultisigMultisig extends Struct {
|
||||||
readonly when: PalletMultisigTimepoint;
|
readonly when: PalletMultisigTimepoint;
|
||||||
readonly deposit: u128;
|
readonly deposit: u128;
|
||||||
@@ -1140,7 +1140,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly approvals: Vec<AccountId32>;
|
readonly approvals: Vec<AccountId32>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletBountiesBounty (478) */
|
/** @name PalletBountiesBounty (480) */
|
||||||
export interface PalletBountiesBounty extends Struct {
|
export interface PalletBountiesBounty extends Struct {
|
||||||
readonly proposer: AccountId32;
|
readonly proposer: AccountId32;
|
||||||
readonly value: u128;
|
readonly value: u128;
|
||||||
@@ -1150,7 +1150,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly status: PalletBountiesBountyStatus;
|
readonly status: PalletBountiesBountyStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletBountiesBountyStatus (479) */
|
/** @name PalletBountiesBountyStatus (481) */
|
||||||
export interface PalletBountiesBountyStatus extends Enum {
|
export interface PalletBountiesBountyStatus extends Enum {
|
||||||
readonly isProposed: boolean;
|
readonly isProposed: boolean;
|
||||||
readonly isApproved: boolean;
|
readonly isApproved: boolean;
|
||||||
@@ -1172,7 +1172,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
} & Struct;
|
} & Struct;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletTipsOpenTip (481) */
|
/** @name PalletTipsOpenTip (483) */
|
||||||
export interface PalletTipsOpenTip extends Struct {
|
export interface PalletTipsOpenTip extends Struct {
|
||||||
readonly reason: H256;
|
readonly reason: H256;
|
||||||
readonly who: AccountId32;
|
readonly who: AccountId32;
|
||||||
@@ -1183,7 +1183,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly findersFee: bool;
|
readonly findersFee: bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletAssetsAssetDetails (483) */
|
/** @name PalletAssetsAssetDetails (485) */
|
||||||
export interface PalletAssetsAssetDetails extends Struct {
|
export interface PalletAssetsAssetDetails extends Struct {
|
||||||
readonly owner: AccountId32;
|
readonly owner: AccountId32;
|
||||||
readonly issuer: AccountId32;
|
readonly issuer: AccountId32;
|
||||||
@@ -1199,7 +1199,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly isFrozen: bool;
|
readonly isFrozen: bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletAssetsAssetBalance (484) */
|
/** @name PalletAssetsAssetBalance (486) */
|
||||||
export interface PalletAssetsAssetBalance extends Struct {
|
export interface PalletAssetsAssetBalance extends Struct {
|
||||||
readonly balance: u64;
|
readonly balance: u64;
|
||||||
readonly isFrozen: bool;
|
readonly isFrozen: bool;
|
||||||
@@ -1207,13 +1207,13 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly extra: Null;
|
readonly extra: Null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletAssetsApproval (486) */
|
/** @name PalletAssetsApproval (488) */
|
||||||
export interface PalletAssetsApproval extends Struct {
|
export interface PalletAssetsApproval extends Struct {
|
||||||
readonly amount: u64;
|
readonly amount: u64;
|
||||||
readonly deposit: u128;
|
readonly deposit: u128;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletAssetsAssetMetadata (487) */
|
/** @name PalletAssetsAssetMetadata (489) */
|
||||||
export interface PalletAssetsAssetMetadata extends Struct {
|
export interface PalletAssetsAssetMetadata extends Struct {
|
||||||
readonly deposit: u128;
|
readonly deposit: u128;
|
||||||
readonly name: Bytes;
|
readonly name: Bytes;
|
||||||
@@ -1222,7 +1222,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly isFrozen: bool;
|
readonly isFrozen: bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletLotteryLotteryConfig (489) */
|
/** @name PalletLotteryLotteryConfig (491) */
|
||||||
export interface PalletLotteryLotteryConfig extends Struct {
|
export interface PalletLotteryLotteryConfig extends Struct {
|
||||||
readonly price: u128;
|
readonly price: u128;
|
||||||
readonly start: u32;
|
readonly start: u32;
|
||||||
@@ -1231,13 +1231,13 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly repeat: bool;
|
readonly repeat: bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletGiltGiltBid (494) */
|
/** @name PalletGiltGiltBid (496) */
|
||||||
export interface PalletGiltGiltBid extends Struct {
|
export interface PalletGiltGiltBid extends Struct {
|
||||||
readonly amount: u128;
|
readonly amount: u128;
|
||||||
readonly who: AccountId32;
|
readonly who: AccountId32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletGiltActiveGiltsTotal (495) */
|
/** @name PalletGiltActiveGiltsTotal (497) */
|
||||||
export interface PalletGiltActiveGiltsTotal extends Struct {
|
export interface PalletGiltActiveGiltsTotal extends Struct {
|
||||||
readonly frozen: u128;
|
readonly frozen: u128;
|
||||||
readonly proportion: Perquintill;
|
readonly proportion: Perquintill;
|
||||||
@@ -1245,7 +1245,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly target: Perquintill;
|
readonly target: Perquintill;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletGiltActiveGilt (496) */
|
/** @name PalletGiltActiveGilt (498) */
|
||||||
export interface PalletGiltActiveGilt extends Struct {
|
export interface PalletGiltActiveGilt extends Struct {
|
||||||
readonly proportion: Perquintill;
|
readonly proportion: Perquintill;
|
||||||
readonly amount: u128;
|
readonly amount: u128;
|
||||||
@@ -1253,7 +1253,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly expiry: u32;
|
readonly expiry: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletUniquesClassDetails (498) */
|
/** @name PalletUniquesClassDetails (500) */
|
||||||
export interface PalletUniquesClassDetails extends Struct {
|
export interface PalletUniquesClassDetails extends Struct {
|
||||||
readonly owner: AccountId32;
|
readonly owner: AccountId32;
|
||||||
readonly issuer: AccountId32;
|
readonly issuer: AccountId32;
|
||||||
@@ -1267,7 +1267,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly isFrozen: bool;
|
readonly isFrozen: bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletUniquesInstanceDetails (500) */
|
/** @name PalletUniquesInstanceDetails (502) */
|
||||||
export interface PalletUniquesInstanceDetails extends Struct {
|
export interface PalletUniquesInstanceDetails extends Struct {
|
||||||
readonly owner: AccountId32;
|
readonly owner: AccountId32;
|
||||||
readonly approved: Option<AccountId32>;
|
readonly approved: Option<AccountId32>;
|
||||||
@@ -1275,21 +1275,21 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly deposit: u128;
|
readonly deposit: u128;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletUniquesClassMetadata (501) */
|
/** @name PalletUniquesClassMetadata (503) */
|
||||||
export interface PalletUniquesClassMetadata extends Struct {
|
export interface PalletUniquesClassMetadata extends Struct {
|
||||||
readonly deposit: u128;
|
readonly deposit: u128;
|
||||||
readonly data: Bytes;
|
readonly data: Bytes;
|
||||||
readonly isFrozen: bool;
|
readonly isFrozen: bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletUniquesInstanceMetadata (502) */
|
/** @name PalletUniquesInstanceMetadata (504) */
|
||||||
export interface PalletUniquesInstanceMetadata extends Struct {
|
export interface PalletUniquesInstanceMetadata extends Struct {
|
||||||
readonly deposit: u128;
|
readonly deposit: u128;
|
||||||
readonly data: Bytes;
|
readonly data: Bytes;
|
||||||
readonly isFrozen: bool;
|
readonly isFrozen: bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletTransactionStorageTransactionInfo (507) */
|
/** @name PalletTransactionStorageTransactionInfo (509) */
|
||||||
export interface PalletTransactionStorageTransactionInfo extends Struct {
|
export interface PalletTransactionStorageTransactionInfo extends Struct {
|
||||||
readonly chunkRoot: H256;
|
readonly chunkRoot: H256;
|
||||||
readonly contentHash: H256;
|
readonly contentHash: H256;
|
||||||
@@ -1297,7 +1297,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly blockChunks: u32;
|
readonly blockChunks: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletBagsListListNode (509) */
|
/** @name PalletBagsListListNode (511) */
|
||||||
export interface PalletBagsListListNode extends Struct {
|
export interface PalletBagsListListNode extends Struct {
|
||||||
readonly id: AccountId32;
|
readonly id: AccountId32;
|
||||||
readonly prev: Option<AccountId32>;
|
readonly prev: Option<AccountId32>;
|
||||||
@@ -1305,13 +1305,13 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly bagUpper: u64;
|
readonly bagUpper: u64;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PalletBagsListListBag (510) */
|
/** @name PalletBagsListListBag (512) */
|
||||||
export interface PalletBagsListListBag extends Struct {
|
export interface PalletBagsListListBag extends Struct {
|
||||||
readonly head: Option<AccountId32>;
|
readonly head: Option<AccountId32>;
|
||||||
readonly tail: Option<AccountId32>;
|
readonly tail: Option<AccountId32>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name SpRuntimeMultiSignature (513) */
|
/** @name SpRuntimeMultiSignature (515) */
|
||||||
export interface SpRuntimeMultiSignature extends Enum {
|
export interface SpRuntimeMultiSignature extends Enum {
|
||||||
readonly isEd25519: boolean;
|
readonly isEd25519: boolean;
|
||||||
readonly asEd25519: SpCoreEd25519Signature;
|
readonly asEd25519: SpCoreEd25519Signature;
|
||||||
@@ -1321,28 +1321,28 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly asEcdsa: SpCoreEcdsaSignature;
|
readonly asEcdsa: SpCoreEcdsaSignature;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name SpCoreEcdsaSignature (514) */
|
/** @name SpCoreEcdsaSignature (516) */
|
||||||
export interface SpCoreEcdsaSignature extends U8aFixed {}
|
export interface SpCoreEcdsaSignature extends U8aFixed {}
|
||||||
|
|
||||||
/** @name FrameSystemExtensionsCheckSpecVersion (517) */
|
/** @name FrameSystemExtensionsCheckSpecVersion (519) */
|
||||||
export type FrameSystemExtensionsCheckSpecVersion = Null;
|
export type FrameSystemExtensionsCheckSpecVersion = Null;
|
||||||
|
|
||||||
/** @name FrameSystemExtensionsCheckTxVersion (518) */
|
/** @name FrameSystemExtensionsCheckTxVersion (520) */
|
||||||
export type FrameSystemExtensionsCheckTxVersion = Null;
|
export type FrameSystemExtensionsCheckTxVersion = Null;
|
||||||
|
|
||||||
/** @name FrameSystemExtensionsCheckGenesis (519) */
|
/** @name FrameSystemExtensionsCheckGenesis (521) */
|
||||||
export type FrameSystemExtensionsCheckGenesis = Null;
|
export type FrameSystemExtensionsCheckGenesis = Null;
|
||||||
|
|
||||||
/** @name FrameSystemExtensionsCheckNonce (522) */
|
/** @name FrameSystemExtensionsCheckNonce (524) */
|
||||||
export interface FrameSystemExtensionsCheckNonce extends Compact<u32> {}
|
export interface FrameSystemExtensionsCheckNonce extends Compact<u32> {}
|
||||||
|
|
||||||
/** @name FrameSystemExtensionsCheckWeight (523) */
|
/** @name FrameSystemExtensionsCheckWeight (525) */
|
||||||
export type FrameSystemExtensionsCheckWeight = Null;
|
export type FrameSystemExtensionsCheckWeight = Null;
|
||||||
|
|
||||||
/** @name PalletTransactionPaymentChargeTransactionPayment (524) */
|
/** @name PalletTransactionPaymentChargeTransactionPayment (526) */
|
||||||
export interface PalletTransactionPaymentChargeTransactionPayment extends Compact<u128> {}
|
export interface PalletTransactionPaymentChargeTransactionPayment extends Compact<u128> {}
|
||||||
|
|
||||||
/** @name NodeRuntimeRuntime (525) */
|
/** @name NodeRuntimeRuntime (527) */
|
||||||
export type NodeRuntimeRuntime = Null;
|
export type NodeRuntimeRuntime = Null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import type { AuthorityIndex, AuthorityList, AuthoritySet, AuthoritySetChange, A
|
|||||||
import type { IdentityFields, IdentityInfo, IdentityInfoAdditional, IdentityInfoTo198, IdentityJudgement, RegistrarIndex, RegistrarInfo, Registration, RegistrationJudgement, RegistrationTo198 } from '@polkadot/types/interfaces/identity';
|
import type { IdentityFields, IdentityInfo, IdentityInfoAdditional, IdentityInfoTo198, IdentityJudgement, RegistrarIndex, RegistrarInfo, Registration, RegistrationJudgement, RegistrationTo198 } from '@polkadot/types/interfaces/identity';
|
||||||
import type { AuthIndex, AuthoritySignature, Heartbeat, HeartbeatTo244, OpaqueMultiaddr, OpaqueNetworkState, OpaquePeerId } from '@polkadot/types/interfaces/imOnline';
|
import type { AuthIndex, AuthoritySignature, Heartbeat, HeartbeatTo244, OpaqueMultiaddr, OpaqueNetworkState, OpaquePeerId } from '@polkadot/types/interfaces/imOnline';
|
||||||
import type { CallIndex, LotteryConfig } from '@polkadot/types/interfaces/lottery';
|
import type { CallIndex, LotteryConfig } from '@polkadot/types/interfaces/lottery';
|
||||||
import type { ErrorMetadataLatest, ErrorMetadataV10, ErrorMetadataV11, ErrorMetadataV12, ErrorMetadataV13, ErrorMetadataV14, ErrorMetadataV9, EventMetadataLatest, EventMetadataV10, EventMetadataV11, EventMetadataV12, EventMetadataV13, EventMetadataV14, EventMetadataV9, ExtrinsicMetadataLatest, ExtrinsicMetadataV11, ExtrinsicMetadataV12, ExtrinsicMetadataV13, ExtrinsicMetadataV14, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV10, FunctionArgumentMetadataV11, FunctionArgumentMetadataV12, FunctionArgumentMetadataV13, FunctionArgumentMetadataV14, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV10, FunctionMetadataV11, FunctionMetadataV12, FunctionMetadataV13, FunctionMetadataV14, FunctionMetadataV9, MetadataAll, MetadataLatest, MetadataV10, MetadataV11, MetadataV12, MetadataV13, MetadataV14, MetadataV9, ModuleConstantMetadataV10, ModuleConstantMetadataV11, ModuleConstantMetadataV12, ModuleConstantMetadataV13, ModuleConstantMetadataV9, ModuleMetadataV10, ModuleMetadataV11, ModuleMetadataV12, ModuleMetadataV13, ModuleMetadataV9, PalletCallMetadataLatest, PalletCallMetadataV14, PalletConstantMetadataLatest, PalletConstantMetadataV14, PalletErrorMetadataLatest, PalletErrorMetadataV14, PalletEventMetadataLatest, PalletEventMetadataV14, PalletMetadataLatest, PalletMetadataV14, PalletStorageMetadataLatest, PalletStorageMetadataV14, PortableRegistry, PortableRegistryV14, PortableType, PortableTypeV14, SignedExtensionMetadataLatest, SignedExtensionMetadataV14, StorageEntryMetadataLatest, StorageEntryMetadataV10, StorageEntryMetadataV11, StorageEntryMetadataV12, StorageEntryMetadataV13, StorageEntryMetadataV14, StorageEntryMetadataV9, StorageEntryModifierLatest, StorageEntryModifierV10, StorageEntryModifierV11, StorageEntryModifierV12, StorageEntryModifierV13, StorageEntryModifierV14, StorageEntryModifierV9, StorageEntryTypeLatest, StorageEntryTypeV10, StorageEntryTypeV11, StorageEntryTypeV12, StorageEntryTypeV13, StorageEntryTypeV14, StorageEntryTypeV9, StorageHasher, StorageHasherV10, StorageHasherV11, StorageHasherV12, StorageHasherV13, StorageHasherV14, StorageHasherV9, StorageMetadataV10, StorageMetadataV11, StorageMetadataV12, StorageMetadataV13, StorageMetadataV9 } from '@polkadot/types/interfaces/metadata';
|
import type { ErrorMetadataLatest, ErrorMetadataV10, ErrorMetadataV11, ErrorMetadataV12, ErrorMetadataV13, ErrorMetadataV14, ErrorMetadataV9, EventMetadataLatest, EventMetadataV10, EventMetadataV11, EventMetadataV12, EventMetadataV13, EventMetadataV14, EventMetadataV9, ExtrinsicMetadataLatest, ExtrinsicMetadataV11, ExtrinsicMetadataV12, ExtrinsicMetadataV13, ExtrinsicMetadataV14, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV10, FunctionArgumentMetadataV11, FunctionArgumentMetadataV12, FunctionArgumentMetadataV13, FunctionArgumentMetadataV14, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV10, FunctionMetadataV11, FunctionMetadataV12, FunctionMetadataV13, FunctionMetadataV14, FunctionMetadataV9, MetadataAll, MetadataLatest, MetadataV10, MetadataV11, MetadataV12, MetadataV13, MetadataV14, MetadataV9, ModuleConstantMetadataV10, ModuleConstantMetadataV11, ModuleConstantMetadataV12, ModuleConstantMetadataV13, ModuleConstantMetadataV9, ModuleMetadataV10, ModuleMetadataV11, ModuleMetadataV12, ModuleMetadataV13, ModuleMetadataV9, PalletCallMetadataLatest, PalletCallMetadataV14, PalletConstantMetadataLatest, PalletConstantMetadataV14, PalletErrorMetadataLatest, PalletErrorMetadataV14, PalletEventMetadataLatest, PalletEventMetadataV14, PalletMetadataLatest, PalletMetadataV14, PalletStorageMetadataLatest, PalletStorageMetadataV14, PortableType, PortableTypeV14, SignedExtensionMetadataLatest, SignedExtensionMetadataV14, StorageEntryMetadataLatest, StorageEntryMetadataV10, StorageEntryMetadataV11, StorageEntryMetadataV12, StorageEntryMetadataV13, StorageEntryMetadataV14, StorageEntryMetadataV9, StorageEntryModifierLatest, StorageEntryModifierV10, StorageEntryModifierV11, StorageEntryModifierV12, StorageEntryModifierV13, StorageEntryModifierV14, StorageEntryModifierV9, StorageEntryTypeLatest, StorageEntryTypeV10, StorageEntryTypeV11, StorageEntryTypeV12, StorageEntryTypeV13, StorageEntryTypeV14, StorageEntryTypeV9, StorageHasher, StorageHasherV10, StorageHasherV11, StorageHasherV12, StorageHasherV13, StorageHasherV14, StorageHasherV9, StorageMetadataV10, StorageMetadataV11, StorageMetadataV12, StorageMetadataV13, StorageMetadataV9 } from '@polkadot/types/interfaces/metadata';
|
||||||
import type { MmrLeafProof } from '@polkadot/types/interfaces/mmr';
|
import type { MmrLeafProof } from '@polkadot/types/interfaces/mmr';
|
||||||
import type { StorageKind } from '@polkadot/types/interfaces/offchain';
|
import type { StorageKind } from '@polkadot/types/interfaces/offchain';
|
||||||
import type { DeferredOffenceOf, Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';
|
import type { DeferredOffenceOf, Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';
|
||||||
@@ -698,8 +698,6 @@ declare module '@polkadot/types/types/registry' {
|
|||||||
Phase: Phase;
|
Phase: Phase;
|
||||||
PhragmenScore: PhragmenScore;
|
PhragmenScore: PhragmenScore;
|
||||||
Points: Points;
|
Points: Points;
|
||||||
PortableRegistry: PortableRegistry;
|
|
||||||
PortableRegistryV14: PortableRegistryV14;
|
|
||||||
PortableType: PortableType;
|
PortableType: PortableType;
|
||||||
PortableTypeV14: PortableTypeV14;
|
PortableTypeV14: PortableTypeV14;
|
||||||
Precommits: Precommits;
|
Precommits: Precommits;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export * from './index.types';
|
|||||||
export * from './metadata';
|
export * from './metadata';
|
||||||
|
|
||||||
export { TypeDefInfo } from './create/types';
|
export { TypeDefInfo } from './create/types';
|
||||||
export { convertSiV0toV1 } from './generic/PortableRegistry';
|
export { convertSiV0toV1 } from './metadata/PortableRegistry';
|
||||||
export { packageInfo } from './packageInfo';
|
export { packageInfo } from './packageInfo';
|
||||||
export { unwrapStorageType } from './primitive/StorageKey';
|
export { unwrapStorageType } from './primitive/StorageKey';
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user