Compare commits

..
61 Commits
Author SHA1 Message Date
Github Actions 5f13a634e5 [CI Skip] release/stable 4.5.1
skip-checks: true
2021-04-12 06:30:52 +00:00
Jaco Greeff 40af520fe7 4.5.1 (#3390) 2021-04-12 08:21:37 +02:00
Github Actions 1e506e0f8c [CI Skip] release/beta 4.4.2-7
skip-checks: true
2021-04-11 13:29:10 +00:00
Jaco Greeff 96ea5803d4 Adjust Westend known & detection (#3386) 2021-04-11 15:19:05 +02:00
Jaco Greeff 7d99459f50 Bump deps (#3389) 2021-04-11 15:15:01 +02:00
Github Actions 8fa090f435 [CI Skip] release/beta 4.4.2-6
skip-checks: true
2021-04-09 20:11:40 +00:00
Jaco Greeff d3c60d197c PalletId type 2021-04-09 23:01:11 +03:00
Github Actions ad8550f7f5 [CI Skip] release/beta 4.4.2-5
skip-checks: true
2021-04-09 19:51:56 +00:00
Jaco Greeff a899aa439d Adjust slot types based on constants (#3385) 2021-04-09 21:40:24 +02:00
Github Actions e0e075b350 [CI Skip] release/beta 4.4.2-4
skip-checks: true
2021-04-09 04:48:56 +00:00
Jaco Greeff 34ff14547e Westend runtime 50 upgrade block (& v30 session keys) (#3382)
* Westend runtime 50 upgrade block (& v30 session keys)

* Revery beefy keys

* Defer 7B keys to 51
2021-04-09 06:39:40 +02:00
Github Actions 681a80d456 [CI Skip] release/beta 4.4.2-3
skip-checks: true
2021-04-08 12:17:03 +00:00
Jaco Greeff ed5f2673ce Detect Keys, inject SessionKeys (#3380) 2021-04-08 14:07:39 +02:00
Github Actions 43e87603e2 [CI Skip] release/beta 4.4.2-2
skip-checks: true
2021-04-08 09:02:42 +00:00
Jaco Greeff d056416b47 Bump deps (#3379) 2021-04-08 10:52:20 +02:00
Github Actions 1bcf94131d [CI Skip] release/beta 4.4.2-1
skip-checks: true
2021-04-08 05:45:13 +00:00
Jaco Greeff 17b607b6c3 Update Rococo session key (& small para type cleanups) (#3378) 2021-04-08 08:35:24 +03:00
Github Actions 5a16d1dd8b [CI Skip] release/beta 4.4.2-0
skip-checks: true
2021-04-07 14:18:01 +00:00
Jaco Greeff 144b74306a Update parachain types (#3376)
* Update parachain types

* Remove retiring flag
2021-04-07 16:09:38 +02:00
Jaco Greeff 16b9fa956d Adjust ParaInfo types (#3372) 2021-04-07 15:53:57 +02:00
Github Actions b6af4b9877 [CI Skip] release/stable 4.4.1
skip-checks: true
2021-04-05 11:30:23 +00:00
Jaco Greeff 3f368e721d 4.4 (#3371)
* 4.4

* CHANGELOG
2021-04-05 13:20:18 +02:00
Github Actions 22b4257636 [CI Skip] release/beta 4.3.2-2
skip-checks: true
2021-04-03 06:15:11 +00:00
Jaco Greeff ca7a631032 Add cumulus ServiceQuality type (#3368) 2021-04-03 08:04:42 +02:00
Github Actions da5bbd17af [CI Skip] release/beta 4.3.2-1
skip-checks: true
2021-03-30 09:52:02 +00:00
Jaco Greeff b58f3f5c3e Multilocation update (X5-X8) (#3362) 2021-03-30 11:42:27 +02:00
Github Actions 8c30194f59 [CI Skip] release/beta 4.3.2-0
skip-checks: true
2021-03-30 09:03:06 +00:00
Jaco Greeff dc9ec37490 Add Polkadot 29 upgrade block (#3361) 2021-03-30 10:53:30 +02:00
Github Actions 5175e77eec [CI Skip] release/stable 4.3.1
skip-checks: true
2021-03-29 09:40:47 +00:00
Jaco Greeff 9553c5467c 4.3 (#3359) 2021-03-29 12:30:49 +03:00
Github Actions a1f07e3274 [CI Skip] release/beta 4.2.2-4
skip-checks: true
2021-03-24 11:04:59 +00:00
Jaco Greeff 58deb2eb14 Session index without staking (#3352)
* Session index without staking

* Fix ordering
2021-03-24 11:55:36 +01:00
Github Actions 83caad7f1b [CI Skip] release/beta 4.2.2-3
skip-checks: true
2021-03-24 10:08:26 +00:00
Jaco Greeff 26c3cc9126 Make council optional with treasury proposals (#3351) 2021-03-24 10:58:03 +01:00
Github Actions 1a231dfb0d [CI Skip] release/beta 4.2.2-2
skip-checks: true
2021-03-23 09:48:48 +00:00
Jaco Greeff 712d0425d0 Update ParaInfo types (#3348) 2021-03-23 10:38:28 +01:00
Github Actions eaa5db517f [CI Skip] release/beta 4.2.2-1
skip-checks: true
2021-03-22 16:12:29 +00:00
Jaco Greeff 88c3850d1b Warn on deprecated contracts interfaces (#3346) 2021-03-22 17:03:49 +01:00
Github Actions 943df72ae9 [CI Skip] release/beta 4.2.2-0
skip-checks: true
2021-03-22 15:58:36 +00:00
Veliko 67ab11a036 Abi constructor takes different parameters (#3347)
The Abi constructor used to take the registry as a parameter, now it takes registry.getChainProperties() and this change introduced hard to debug behaviour
2021-03-22 16:48:15 +01:00
Github Actions c87ef7526b [CI Skip] release/stable 4.2.1
skip-checks: true
2021-03-22 08:39:17 +00:00
Jaco Greeff bccf2d52ad 4.2 (#3344) 2021-03-22 09:29:38 +01:00
Github Actions be6dbdd3e4 [CI Skip] release/beta 4.1.2-8
skip-checks: true
2021-03-21 16:37:49 +00:00
Jaco Greeff 3c34ee9897 Bump metadata (#3343) 2021-03-21 17:27:41 +01:00
Github Actions 9ad97813e3 [CI Skip] release/beta 4.1.2-7
skip-checks: true
2021-03-20 17:28:19 +00:00
Jaco Greeff 028f04e47f Optimize society multi-derive (#3342)
* Optimize society multi-derive

* isVoting flag

* isDefenderVoter
2021-03-20 18:18:49 +01:00
Github Actions 4974c9247f [CI Skip] release/beta 4.1.2-6
skip-checks: true
2021-03-20 10:22:42 +00:00
Jaco Greeff 1ffe6a11bf SignedBlock (justifications field) (#3340) 2021-03-20 11:13:56 +01:00
Github Actions 19699ea445 [CI Skip] release/beta 4.1.2-5
skip-checks: true
2021-03-20 09:11:02 +00:00
Jaco Greeff d98ccfb12a Ensure metadata private fields are not accessed (#3341) 2021-03-20 10:01:03 +01:00
Github Actions 41cb056b0f [CI Skip] release/beta 4.1.2-4
skip-checks: true
2021-03-20 08:10:05 +00:00
Jaco Greeff 48bda0bdea Rococo types (detected, now explicit) (#3339)
* Rococo types (detected, now explicit)

* Bumps
2021-03-20 08:59:57 +01:00
Github Actions 1b393c7b67 [CI Skip] release/beta 4.1.2-3
skip-checks: true
2021-03-18 16:17:51 +00:00
Jaco Greeff f52e518b7b Adjust extended derives with as-defined instances (#3336) 2021-03-18 17:08:18 +01:00
Github Actions 08970cff88 [CI Skip] release/beta 4.1.2-2
skip-checks: true
2021-03-17 08:06:55 +00:00
Jaco Greeff 6d38ca6453 Update .123trigger 2021-03-17 08:57:36 +01:00
Github Actions 60db4bc66b [CI Skip] release/beta 4.1.2-1
skip-checks: true
2021-03-16 13:48:13 +00:00
Jaco Greeff 0661237b28 Bump deps (#3326) 2021-03-16 14:38:17 +01:00
Github Actions 6ccac712a8 [CI Skip] release/beta 4.1.2-0
skip-checks: true
2021-03-16 07:41:09 +00:00
Jaco Greeff 3d4877940c Update .123trigger 2021-03-16 08:31:40 +01:00
VelikoandJaco Greeff 70fc95ef27 Fix contractEvents in ContractSubmittableResult (#3324)
* fix the autoaggregation of contract events 

apparently, the system event for contract emitted events has had its name changed

* fix the autoaggregation of contract events

apparently, the system event for contract emitted events has had its name changed

* Update packages/api-contract/src/base/Contract.ts

* Apply suggestions from code review

Co-authored-by: Jaco Greeff <jacogr@gmail.com>
2021-03-15 22:16:35 +01:00
73 changed files with 1625 additions and 1446 deletions
+2 -3
View File
@@ -1,4 +1,4 @@
26
27
1.4.2
1.6.2
1.11.2
@@ -17,6 +17,5 @@
3.9.2
3.9.3
3.10.2
4.0.2
4.0.3
4.0.3
+59
View File
@@ -1,5 +1,64 @@
# CHANGELOG
## 4.5.1 Apr 12, 2021
Upgrade priority: Low. Recommended with usage with the Rococo testnet.
Changes:
- Update parachain types as per latest Polkadot
- Cater for `Keys` with `BEEFY` session keys
- Update `Keys` injection to allow for on-chain type detection
- Update `Westend` known upgrade points for runtime 50
- Align types with latest Substrate master
- Adjust keepalive `system_health` timer
## 4.4.1 Apr 5, 2021
Upgrade priority: Low. Recommended with usage with the Rococo testnet.
Changes:
- Add `ServiceQuality` type for Cumulus
- Adjust XCM MultiLocation type (X5 to X8 junctions)
- Add Polkadot 29 upgrade block
## 4.3.1 Mar 29, 2021
Upgrade priority: Low.
Contributed:
- Fix documentation on ABI parameters (Thanks to https://github.com/vminkov)
Changes:
- Warn on usage of deprecated contract interfaces
- Update `ParaInfo` type
- Council should be optional in treasury derives
- Allow extraction of session derives indexes with no staking
## 4.2.1 Mar 22, 2021
Upgrade priority: Low. Recommended when tracking the latest updates from Substrate.
Contributed:
- Fix contract even decoding on Substrate 3 (Thanks to https://github.com/vminkov)
Changes:
- Adjust `Extender{Header, SignedBlock}` types to ensure at-block `Header` types are used
- Explicit definition for new Rococo triple refcount `AccountData` types
- Convert metadata private class fields to ES-private
- Adjust `SignedBlock` type for new `justifications` field
- Optimize society derive for multi accounts
- Bump metadata to latest substrate version
## 4.1.1 Mar 15, 2021
Upgrade priority: Low. Recommended when tracking the latest updates from Substrate.
+7 -7
View File
@@ -8,7 +8,7 @@
"packages/*"
],
"resolutions": {
"typescript": "^4.2.3"
"typescript": "^4.2.4"
},
"scripts": {
"build": "yarn build:interfaces && polkadot-dev-build-ts",
@@ -25,14 +25,14 @@
"test:watch": "polkadot-dev-run-test --watch"
},
"devDependencies": {
"@babel/core": "^7.13.8",
"@babel/register": "^7.13.8",
"@babel/runtime": "^7.13.9",
"@polkadot/dev": "^0.62.5",
"@babel/core": "^7.13.15",
"@babel/register": "^7.13.14",
"@babel/runtime": "^7.13.10",
"@polkadot/dev": "^0.62.7",
"@polkadot/ts": "^0.3.62",
"@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^26.0.20",
"@types/jest": "^26.0.22",
"copyfiles": "^2.4.1"
},
"version": "4.1.1"
"version": "4.5.1"
}
+1 -1
View File
@@ -8,7 +8,7 @@ import { Abi } from '@polkadot/api-contract';
const wsProvider = new WsProvider(<...Node Url...>);
const api = await ApiPromise.create({ provider: wsProvider });
const abi = new Abi(api.registry, <...JSON ABI...>);
const abi = new Abi(<...JSON ABI...>, api.registry.getChainProperties());
api.tx.contracts
.call(<contract addr>, <value>, <max gas>, abi.messages.<method name>(<...params...>))
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api-contract",
"version": "4.1.1",
"version": "4.5.1",
"type": "module",
"description": "Interfaces for interacting with contracts and contract ABIs",
"main": "index.js",
@@ -16,11 +16,11 @@
"bugs": "https://github.com/polkadot-js/api/issues",
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
"dependencies": {
"@babel/runtime": "^7.13.9",
"@polkadot/api": "4.1.1",
"@polkadot/types": "4.1.1",
"@polkadot/util": "^6.0.5",
"@polkadot/x-rxjs": "^6.0.5",
"@babel/runtime": "^7.13.10",
"@polkadot/api": "4.5.1",
"@polkadot/types": "4.5.1",
"@polkadot/util": "^6.1.1",
"@polkadot/x-rxjs": "^6.1.1",
"bn.js": "^4.11.9"
}
}
+11 -5
View File
@@ -10,7 +10,7 @@ import type { MapConstructorExec } from './types';
import { SubmittableResult } from '@polkadot/api';
import { ApiBase } from '@polkadot/api/base';
import { assert, compactAddLength, isFunction, isUndefined, isWasm, stringCamelCase, u8aToU8a } from '@polkadot/util';
import { assert, compactAddLength, isFunction, isUndefined, isWasm, logger, stringCamelCase, u8aToU8a } from '@polkadot/util';
import { blake2AsU8a } from '@polkadot/util-crypto';
import { Abi } from '../Abi';
@@ -20,6 +20,8 @@ import { Blueprint } from './Blueprint';
import { Contract } from './Contract';
import { createBluePrintTx, EMPTY_SALT, encodeSalt } from './util';
const l = logger('Code');
export class CodeSubmittableResult<ApiType extends ApiTypes> extends SubmittableResult {
public readonly blueprint?: Blueprint<ApiType>;
public readonly contract?: Contract<ApiType>;
@@ -64,22 +66,26 @@ export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
* @deprecated Use the `code.tx.<constructor>(...) format to put code and deploy
*/
public createContract (constructorOrId: AbiConstructor | string | number, options: BlueprintOptions, params: CodecArg[]): SubmittableExtrinsic<ApiType, CodeSubmittableResult<ApiType>> {
l.warn('.createContract is deprecated, use code.tx.<constructorName>(...) instead (where code refers to this instance)');
return this.#instantiate(constructorOrId, options, params);
}
#instantiate = (constructorOrId: AbiConstructor | string | number, options: BlueprintOptions, params: CodecArg[]): SubmittableExtrinsic<ApiType, CodeSubmittableResult<ApiType>> => {
return isFunction(this.api.tx.contracts.instantiateWithCode)
? this.#instantiateSingle(constructorOrId, options, params)
: this.#instantiateBatch(constructorOrId, options, params);
? this.#instantiateCurrent(constructorOrId, options, params)
: this.#instantiatePrev(constructorOrId, options, params);
}
#instantiateSingle = (constructorOrId: AbiConstructor | string | number, { gasLimit = 0, salt, value = 0 }: BlueprintOptions, params: CodecArg[]): SubmittableExtrinsic<ApiType, CodeSubmittableResult<ApiType>> => {
#instantiateCurrent = (constructorOrId: AbiConstructor | string | number, { gasLimit = 0, salt, value = 0 }: BlueprintOptions, params: CodecArg[]): SubmittableExtrinsic<ApiType, CodeSubmittableResult<ApiType>> => {
return this.api.tx.contracts
.instantiateWithCode(value, gasLimit, compactAddLength(this.code), this.abi.findConstructor(constructorOrId).toU8a(params), encodeSalt(salt))
.withResultTransform(this.#transformEvents);
}
#instantiateBatch = (constructorOrId: AbiConstructor | string | number, { gasLimit = 0, salt, value = 0 }: BlueprintOptions, params: CodecArg[]): SubmittableExtrinsic<ApiType, CodeSubmittableResult<ApiType>> => {
#instantiatePrev = (constructorOrId: AbiConstructor | string | number, { gasLimit = 0, salt, value = 0 }: BlueprintOptions, params: CodecArg[]): SubmittableExtrinsic<ApiType, CodeSubmittableResult<ApiType>> => {
assert(isFunction(this.api.tx.utility?.batch), 'Your chain does not include the utility pallet, for contracts v2 deployment, this is required');
const encodedSalt = encodeSalt(salt);
const withSalt = this.api.tx.contracts.instantiate.meta.args.length === 5;
const encoded = this.abi.findConstructor(constructorOrId).toU8a(params, withSalt ? EMPTY_SALT : encodedSalt);
+11 -6
View File
@@ -23,6 +23,7 @@ import { Base } from './Base';
// As per Rust, 5 * GAS_PER_SEC
const MAX_CALL_GAS = new BN(5_000_000_000_000).subn(1);
const ERROR_NO_CALL = 'Your node does not expose the contracts.call RPC. This is most probably due to a runtime configuration.';
const l = logger('Contract');
function createQuery <ApiType extends ApiTypes> (fn: (origin: string | AccountId | Uint8Array, options: ContractOptions, params: CodecArg[]) => ContractCallResult<ApiType, ContractCallOutcome>): ContractQuery<ApiType> {
@@ -39,11 +40,14 @@ function createTx <ApiType extends ApiTypes> (fn: (options: ContractOptions, par
: fn(...extractOptions(options, params));
}
function createWithId <T> (fn: (messageOrId: AbiMessage | string | number, options: ContractOptions, params: CodecArg[]) => T): ContractGeneric<ContractOptions, T> {
return (messageOrId: AbiMessage | string | number, options: BigInt | string | number | BN | ContractOptions, ...params: CodecArg[]): T =>
isOptions(options)
function createWithId <T> (fn: (messageOrId: AbiMessage | string | number, options: ContractOptions, params: CodecArg[]) => T, warn?: string): ContractGeneric<ContractOptions, T> {
return (messageOrId: AbiMessage | string | number, options: BigInt | string | number | BN | ContractOptions, ...params: CodecArg[]): T => {
warn && l.warn(warn);
return isOptions(options)
? fn(messageOrId, options, params)
: fn(messageOrId, ...extractOptions(options, params));
};
}
export class ContractSubmittableResult extends SubmittableResult {
@@ -109,8 +113,8 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
super(api, abi, decorateMethod);
this.address = this.registry.createType('AccountId', address);
this.exec = createWithId(this.#exec);
this.read = createWithId(this.#read);
this.exec = createWithId(this.#exec, '.exec is deprecated, use contract.tx.<messageName>(...) instead (where contract refers to this instance)');
this.read = createWithId(this.#read, '.read is deprecated, use contract.query.<messageName>(...) instead (where contract refers to this instance)');
this.abi.messages.forEach((m): void => {
const messageName = stringCamelCase(m.identifier);
@@ -156,7 +160,8 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
return this.api.tx.contracts
.call(this.address, value, this.#getGas(gasLimit), this.abi.findMessage(messageOrId).toU8a(params))
.withResultTransform((result: ISubmittableResult) =>
new ContractSubmittableResult(result, applyOnEvent(result, ['ContractExecution'], (records: EventRecord[]) =>
// ContractEmitted is the current generation, ContractExecution is the previous generation
new ContractSubmittableResult(result, applyOnEvent(result, ['ContractEmitted', 'ContractExecution'], (records: EventRecord[]) =>
records
.map(({ event: { data: [, data] } }): DecodedEvent | null => {
try {
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api-contract', version: '4.1.1' };
export const packageInfo = { name: '@polkadot/api-contract', version: '4.5.1' };
+1 -1
View File
@@ -12,7 +12,7 @@ import BN from 'bn.js';
import { createTypeUnsafe } from '@polkadot/types/create';
import { isBigInt, isBn, isNumber, isString } from '@polkadot/util';
type ContractEvents = 'CodeStored' | 'ContractExecution' | 'Instantiated';
type ContractEvents = 'CodeStored' | 'ContractEmitted' | 'ContractExecution' | 'Instantiated';
type TOptions = BlueprintOptions | ContractOptions;
+10 -10
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api-derive",
"version": "4.1.1",
"version": "4.5.1",
"type": "module",
"description": "Common functions used across Polkadot, derived from RPC calls and storage queries.",
"main": "index.js",
@@ -16,17 +16,17 @@
"bugs": "https://github.com/polkadot-js/api/issues",
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
"dependencies": {
"@babel/runtime": "^7.13.9",
"@polkadot/api": "4.1.1",
"@polkadot/rpc-core": "4.1.1",
"@polkadot/types": "4.1.1",
"@polkadot/util": "^6.0.5",
"@polkadot/util-crypto": "^6.0.5",
"@polkadot/x-rxjs": "^6.0.5",
"@babel/runtime": "^7.13.10",
"@polkadot/api": "4.5.1",
"@polkadot/rpc-core": "4.5.1",
"@polkadot/types": "4.5.1",
"@polkadot/util": "^6.1.1",
"@polkadot/util-crypto": "^6.1.1",
"@polkadot/x-rxjs": "^6.1.1",
"bn.js": "^4.11.9"
},
"devDependencies": {
"@polkadot/keyring": "^6.0.5",
"@polkadot/rpc-provider": "4.1.1"
"@polkadot/keyring": "^6.1.1",
"@polkadot/rpc-provider": "4.5.1"
}
}
+6 -2
View File
@@ -37,12 +37,16 @@ export function bounties (instanceId: string, api: ApiInterfaceRx): () => Observ
return memo(instanceId, (): Observable<DeriveBounties> =>
combineLatest([
bountyBase.bountyCount<BountyIndex>(),
api.query.council ? api.query.council.proposalCount<ProposalIndex>() : of(0)
api.query.council
? api.query.council.proposalCount<ProposalIndex>()
: of(0)
]).pipe(
switchMap(() =>
combineLatest([
bountyBase.bounties.keys<[BountyIndex]>(),
api.derive.council ? api.derive.council.proposals() : of([])
api.derive.council
? api.derive.council.proposals()
: of([])
])
),
switchMap(([keys, proposals]): Observable<Result> => {
+3 -2
View File
@@ -3,11 +3,12 @@
import type { ApiInterfaceRx } from '@polkadot/api/types';
import type { Observable } from '@polkadot/x-rxjs';
import type { SignedBlockExtended } from '../type/types';
import { combineLatest, of } from '@polkadot/x-rxjs';
import { catchError, map } from '@polkadot/x-rxjs/operators';
import { SignedBlockExtended } from '../type';
import { createSignedBlockExtended } from '../type';
import { memo } from '../util';
/**
@@ -33,7 +34,7 @@ export function getBlock (instanceId: string, api: ApiInterfaceRx): (hash: Uint8
: of([])
]).pipe(
map(([signedBlock, events, validators]): SignedBlockExtended =>
new SignedBlockExtended(signedBlock.registry, signedBlock, events, validators)
createSignedBlockExtended(api.registry, signedBlock, events, validators)
),
catchError((): Observable<undefined> =>
// where rpc.chain.getHeader throws, we will land here - it can happen that
+3 -2
View File
@@ -3,11 +3,12 @@
import type { ApiInterfaceRx } from '@polkadot/api/types';
import type { Observable } from '@polkadot/x-rxjs';
import type { HeaderExtended } from '../type/types';
import { combineLatest, of } from '@polkadot/x-rxjs';
import { catchError, map } from '@polkadot/x-rxjs/operators';
import { HeaderExtended } from '../type';
import { createHeaderExtended } from '../type';
import { memo } from '../util';
/**
@@ -33,7 +34,7 @@ export function getHeader (instanceId: string, api: ApiInterfaceRx): (hash: Uint
: of([])
]).pipe(
map(([header, validators]): HeaderExtended =>
new HeaderExtended(header.registry, header, validators)
createHeaderExtended(header.registry, header, validators)
),
catchError((): Observable<undefined> =>
// where rpc.chain.getHeader throws, we will land here - it can happen that
@@ -5,12 +5,12 @@ import type { ApiInterfaceRx } from '@polkadot/api/types';
import type { Vec } from '@polkadot/types';
import type { EventRecord, SignedBlock } from '@polkadot/types/interfaces';
import type { Observable } from '@polkadot/x-rxjs';
import type { HeaderExtended } from '../type';
import type { HeaderExtended, SignedBlockExtended } from '../type/types';
import { combineLatest, of } from '@polkadot/x-rxjs';
import { map, switchMap } from '@polkadot/x-rxjs/operators';
import { SignedBlockExtended } from '../type';
import { createSignedBlockExtended } from '../type';
import { memo } from '../util';
/**
@@ -30,7 +30,7 @@ export function subscribeNewBlocks (instanceId: string, api: ApiInterfaceRx): ()
);
}),
map(([block, events, header]) =>
new SignedBlockExtended(block.registry, block, events, header.validators)
createSignedBlockExtended(block.registry, block, events, header.validators)
)
)
);
@@ -3,11 +3,12 @@
import type { ApiInterfaceRx } from '@polkadot/api/types';
import type { Observable } from '@polkadot/x-rxjs';
import type { HeaderExtended } from '../type/types';
import { combineLatest, of } from '@polkadot/x-rxjs';
import { map } from '@polkadot/x-rxjs/operators';
import { HeaderExtended } from '../type';
import { createHeaderExtended } from '../type';
import { memo } from '../util';
/**
@@ -34,7 +35,7 @@ export function subscribeNewHeads (instanceId: string, api: ApiInterfaceRx): ()
map(([header, validators]): HeaderExtended => {
header.createdAtHash = header.hash;
return new HeaderExtended(header.registry, header, validators);
return createHeaderExtended(header.registry, header, validators);
})
)
);
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api-derive', version: '4.1.1' };
export const packageInfo = { name: '@polkadot/api-derive', version: '4.5.1' };
+24 -9
View File
@@ -13,7 +13,7 @@ import { map } from '@polkadot/x-rxjs/operators';
import { memo } from '../util';
// parse into Indexes
function parse ([activeEra, activeEraStart, currentEra, currentIndex, validatorCount]: [EraIndex, Option<Moment>, EraIndex, SessionIndex, u32]): DeriveSessionIndexes {
function parse ([currentIndex, activeEra, activeEraStart, currentEra, validatorCount]: [SessionIndex, EraIndex, Option<Moment>, EraIndex, u32]): DeriveSessionIndexes {
return {
activeEra,
activeEraStart,
@@ -24,42 +24,57 @@ function parse ([activeEra, activeEraStart, currentEra, currentIndex, validatorC
}
// query based on latest
function query (api: ApiInterfaceRx): Observable<DeriveSessionIndexes> {
return api.queryMulti<[Option<ActiveEraInfo>, Option<EraIndex>, SessionIndex, u32]>([
function queryStaking (api: ApiInterfaceRx): Observable<DeriveSessionIndexes> {
return api.queryMulti<[SessionIndex, Option<ActiveEraInfo>, Option<EraIndex>, u32]>([
api.query.session.currentIndex,
api.query.staking.activeEra,
api.query.staking.currentEra,
api.query.session.currentIndex,
api.query.staking.validatorCount
]).pipe(
map(([activeOpt, currentEra, currentIndex, validatorCount]): DeriveSessionIndexes => {
map(([currentIndex, activeOpt, currentEra, validatorCount]): DeriveSessionIndexes => {
const { index, start } = activeOpt.unwrapOrDefault();
return parse([
currentIndex,
index,
start,
currentEra.unwrapOrDefault(),
currentIndex,
validatorCount
]);
})
);
}
// query based on latest
function querySession (api: ApiInterfaceRx): Observable<DeriveSessionIndexes> {
return api.query.session.currentIndex().pipe(
map((currentIndex): DeriveSessionIndexes => parse([
currentIndex,
api.registry.createType('EraIndex'),
api.registry.createType('Option<Moment>'),
api.registry.createType('EraIndex'),
api.registry.createType('u32')
]))
);
}
// empty set when none is available
function empty (api: ApiInterfaceRx): Observable<DeriveSessionIndexes> {
return of(parse([
api.registry.createType('SessionIndex', 1),
api.registry.createType('EraIndex'),
api.registry.createType('Option<Moment>'),
api.registry.createType('EraIndex'),
api.registry.createType('SessionIndex', 1),
api.registry.createType('u32')
]));
}
export function indexes (instanceId: string, api: ApiInterfaceRx): () => Observable<DeriveSessionIndexes> {
return memo(instanceId, (): Observable<DeriveSessionIndexes> =>
api.query.session && api.query.staking
? query(api)
api.query.session
? api.query.staking
? queryStaking(api)
: querySession(api)
: empty(api)
);
}
+3 -20
View File
@@ -2,9 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { ApiInterfaceRx } from '@polkadot/api/types';
import type { bool, Option, Vec } from '@polkadot/types';
import type { AccountId, Balance, BlockNumber, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces';
import type { ITuple } from '@polkadot/types/types';
import type { AccountId } from '@polkadot/types/interfaces';
import type { Observable } from '@polkadot/x-rxjs';
import type { DeriveSocietyMember } from '../types';
@@ -12,28 +10,13 @@ import { map } from '@polkadot/x-rxjs/operators';
import { memo } from '../util';
type Result = [Vec<ITuple<[BlockNumber, Balance]>>, StrikeCount, Option<SocietyVote>, bool, Option<VouchingStatus>];
/**
* @description Get the member info for a society
*/
export function member (instanceId: string, api: ApiInterfaceRx): (accountId: AccountId) => Observable<DeriveSocietyMember> {
return memo(instanceId, (accountId: AccountId): Observable<DeriveSocietyMember> =>
api.queryMulti<Result>([
[api.query.society.payouts, accountId],
[api.query.society.strikes, accountId],
[api.query.society.defenderVotes, accountId],
[api.query.society.suspendedMembers, accountId],
[api.query.society.vouching, accountId]
]).pipe(
map(([payouts, strikes, defenderVotes, suspended, vouching]: Result): DeriveSocietyMember => ({
accountId,
isSuspended: suspended.isTrue,
payouts,
strikes,
vote: defenderVotes.unwrapOr(undefined),
vouching: vouching.unwrapOr(undefined)
}))
api.derive.society._members([accountId]).pipe(
map(([result]) => result)
)
);
}
+33 -10
View File
@@ -2,28 +2,51 @@
// SPDX-License-Identifier: Apache-2.0
import type { ApiInterfaceRx } from '@polkadot/api/types';
import type { AccountId } from '@polkadot/types/interfaces';
import type { bool, Option, Vec } from '@polkadot/types';
import type { AccountId, Balance, BlockNumber, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces';
import type { ITuple } from '@polkadot/types/types';
import type { Observable } from '@polkadot/x-rxjs';
import type { DeriveSocietyMember } from '../types';
import { combineLatest } from '@polkadot/x-rxjs';
import { switchMap } from '@polkadot/x-rxjs/operators';
import { combineLatest, of } from '@polkadot/x-rxjs';
import { map, switchMap } from '@polkadot/x-rxjs/operators';
import { memo } from '../util';
type Result = [AccountId[], Vec<ITuple<[BlockNumber, Balance]>>[], StrikeCount[], Option<SocietyVote>[], bool[], Option<VouchingStatus>[]];
export function _members (instanceId: string, api: ApiInterfaceRx): (accountIds: AccountId[]) => Observable<DeriveSocietyMember[]> {
return memo(instanceId, (accountIds: AccountId[]): Observable<DeriveSocietyMember[]> =>
combineLatest<Result>([
of(accountIds),
api.query.society.payouts.multi(accountIds),
api.query.society.strikes.multi(accountIds),
api.query.society.defenderVotes.multi(accountIds),
api.query.society.suspendedMembers.multi(accountIds),
api.query.society.vouching.multi(accountIds)
]).pipe(
map(([accountIds, payouts, strikes, defenderVotes, suspended, vouching]) =>
accountIds.map((accountId, index) => ({
accountId,
isDefenderVoter: defenderVotes[index].isSome,
isSuspended: suspended[index].isTrue,
payouts: payouts[index],
strikes: strikes[index],
vote: defenderVotes[index].unwrapOr(undefined),
vouching: vouching[index].unwrapOr(undefined)
}))
)
)
);
}
/**
* @description Get the member info for a society
*/
export function members (instanceId: string, api: ApiInterfaceRx): () => Observable<DeriveSocietyMember[]> {
return memo(instanceId, (): Observable<DeriveSocietyMember[]> =>
api.query.society.members<AccountId[]>().pipe(
switchMap((members): Observable<DeriveSocietyMember[]> =>
combineLatest(
members.map((accountId): Observable<DeriveSocietyMember> =>
api.derive.society.member(accountId)
)
)
)
switchMap((members) => api.derive.society._members(members))
)
);
}
@@ -61,7 +61,9 @@ function retrieveProposals (api: ApiInterfaceRx, proposalCount: ProposalIndex, a
return combineLatest([
api.query.treasury.proposals.multi<Option<TreasuryProposal>>(allIds),
api.derive.council.proposals()
api.derive.council
? api.derive.council.proposals()
: of([] as DeriveCollectiveProposal[])
]).pipe(
map(([allProposals, councilProposals]: [Option<TreasuryProposal>[], DeriveCollectiveProposal[]]): DeriveTreasuryProposals =>
parseResult(api, { allIds, allProposals, approvalIds, councilProposals, proposalCount })
+29 -32
View File
@@ -2,44 +2,41 @@
// SPDX-License-Identifier: Apache-2.0
import type { AccountId, Header } from '@polkadot/types/interfaces';
import type { Constructor, Registry } from '@polkadot/types/types';
import { Struct } from '@polkadot/types';
import runtimeTypes from '@polkadot/types/interfaces/runtime/definitions';
import type { Registry } from '@polkadot/types/types';
import type { HeaderExtended } from './types';
import { extractAuthor } from './util';
// We can ignore the properties, added via Struct.with
const _Header = Struct.with(runtimeTypes.types.Header as any) as Constructor<Header>;
export function createHeaderExtended (registry: Registry, header?: Header, validators?: AccountId[]): HeaderExtended {
// an instance of the base extrinsic for us to extend
const HeaderBase = registry.createClass('Header');
/**
* @name HeaderExtended
* @description
* A [[Block]] header with an additional `author` field that indicates the block author
*/
export class HeaderExtended extends _Header {
readonly #author?: AccountId;
readonly #validators?: AccountId[];
class Implementation extends HeaderBase implements HeaderExtended {
readonly #author?: AccountId;
readonly #validators?: AccountId[];
constructor (registry: Registry, header?: Header, validators?: AccountId[]) {
super(registry, header);
constructor (registry: Registry, header?: Header, validators?: AccountId[]) {
super(registry, header);
this.#author = extractAuthor(this.digest, validators);
this.#validators = validators;
this.createdAtHash = header?.createdAtHash;
this.#author = extractAuthor(this.digest, validators);
this.#validators = validators;
this.createdAtHash = header?.createdAtHash;
}
/**
* @description Convenience method, returns the author for the block
*/
public get author (): AccountId | undefined {
return this.#author;
}
/**
* @description Convenience method, returns the validators for the block
*/
public get validators (): AccountId[] | undefined {
return this.#validators;
}
}
/**
* @description Convenience method, returns the author for the block
*/
public get author (): AccountId | undefined {
return this.#author;
}
/**
* @description Convenience method, returns the validators for the block
*/
public get validators (): AccountId[] | undefined {
return this.#validators;
}
return new Implementation(registry, header, validators);
}
@@ -1,24 +1,12 @@
// Copyright 2017-2021 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { AccountId, DispatchError, DispatchInfo, Event, EventRecord, Extrinsic, SignedBlock } from '@polkadot/types/interfaces';
import type { Constructor, Registry } from '@polkadot/types/types';
import { Struct } from '@polkadot/types';
import runtimeTypes from '@polkadot/types/interfaces/runtime/definitions';
import type { AccountId, DispatchError, DispatchInfo, EventRecord, Extrinsic, SignedBlock } from '@polkadot/types/interfaces';
import type { Registry } from '@polkadot/types/types';
import type { SignedBlockExtended, TxWithEvent } from './types';
import { extractAuthor } from './util';
// We can ignore the properties, added via Struct.with
const _SignedBlock = Struct.with(runtimeTypes.types.SignedBlock as any) as Constructor<SignedBlock>;
interface TxWithEvent {
dispatchError?: DispatchError;
dispatchInfo?: DispatchInfo;
events: Event[];
extrinsic: Extrinsic;
}
function mapExtrinsics (extrinsics: Extrinsic[], records: EventRecord[]): TxWithEvent[] {
return extrinsics.map((extrinsic, index): TxWithEvent => {
let dispatchError: DispatchError | undefined;
@@ -43,43 +31,45 @@ function mapExtrinsics (extrinsics: Extrinsic[], records: EventRecord[]): TxWith
});
}
/**
* @name SignedBlockExtended
* @description
* A [[Block]] header with an additional `author` field that indicates the block author
*/
export class SignedBlockExtended extends _SignedBlock {
readonly #author?: AccountId;
readonly #events: EventRecord[];
readonly #extrinsics: TxWithEvent[];
export function createSignedBlockExtended (registry: Registry, block?: SignedBlock, events?: EventRecord[], validators?: AccountId[]): SignedBlockExtended {
// an instance of the base extrinsic for us to extend
const SignedBlockBase = registry.createClass('SignedBlock');
constructor (registry: Registry, block?: SignedBlock, events?: EventRecord[], validators?: AccountId[]) {
super(registry, block);
class Implementation extends SignedBlockBase implements SignedBlockExtended {
readonly #author?: AccountId;
readonly #events: EventRecord[];
readonly #extrinsics: TxWithEvent[];
this.#author = extractAuthor(this.block.header.digest, validators);
this.#events = events || ([] as EventRecord[]);
this.#extrinsics = mapExtrinsics(this.block.extrinsics, this.#events);
this.createdAtHash = block?.createdAtHash;
constructor (registry: Registry, block?: SignedBlock, events?: EventRecord[], validators?: AccountId[]) {
super(registry, block);
this.#author = extractAuthor(this.block.header.digest, validators);
this.#events = events || ([] as EventRecord[]);
this.#extrinsics = mapExtrinsics(this.block.extrinsics, this.#events);
this.createdAtHash = block?.createdAtHash;
}
/**
* @description Convenience method, returns the author for the block
*/
public get author (): AccountId | undefined {
return this.#author;
}
/**
* @description Convenience method, returns the events associated with the block
*/
public get events (): EventRecord[] {
return this.#events;
}
/**
* @description Returns the extrinsics and their events, mapped
*/
public get extrinsics (): TxWithEvent[] {
return this.#extrinsics;
}
}
/**
* @description Convenience method, returns the author for the block
*/
public get author (): AccountId | undefined {
return this.#author;
}
/**
* @description Convenience method, returns the events associated with the block
*/
public get events (): EventRecord[] {
return this.#events;
}
/**
* @description Returns the extrinsics and their events, mapped
*/
public get extrinsics (): TxWithEvent[] {
return this.#extrinsics;
}
return new Implementation(registry, block, events, validators);
}
+2 -2
View File
@@ -1,5 +1,5 @@
// Copyright 2017-2021 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
export { HeaderExtended } from './HeaderExtended';
export { SignedBlockExtended } from './SignedBlockExtended';
export { createHeaderExtended } from './HeaderExtended';
export { createSignedBlockExtended } from './SignedBlockExtended';
+22
View File
@@ -0,0 +1,22 @@
// Copyright 2017-2021 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { AccountId, DispatchError, DispatchInfo, Event, EventRecord, Extrinsic, Header, SignedBlock } from '@polkadot/types/interfaces';
export interface HeaderExtended extends Header {
readonly author: AccountId | undefined;
readonly validators: AccountId[] | undefined;
}
export interface SignedBlockExtended extends SignedBlock {
readonly author: AccountId | undefined;
readonly events: EventRecord[];
readonly extrinsics: TxWithEvent[];
}
export interface TxWithEvent {
dispatchError?: DispatchError;
dispatchInfo?: DispatchInfo;
events: Event[];
extrinsic: Extrinsic;
}
+2
View File
@@ -12,6 +12,7 @@ export * from './elections/types';
export * from './parachains/types';
export * from './session/types';
export * from './staking/types';
export * from './type/types';
export interface DeriveBalancesAccountData {
freeBalance: Balance;
@@ -107,6 +108,7 @@ export interface DeriveSocietyCandidate {
export interface DeriveSocietyMember {
accountId: AccountId;
isDefenderVoter: boolean;
isSuspended: boolean;
payouts: [BlockNumber, Balance][];
strikes: StrikeCount;
+12 -12
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api",
"version": "4.1.1",
"version": "4.5.1",
"type": "module",
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
"main": "index.js",
@@ -16,17 +16,17 @@
"bugs": "https://github.com/polkadot-js/api/issues",
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
"dependencies": {
"@babel/runtime": "^7.13.9",
"@polkadot/api-derive": "4.1.1",
"@polkadot/keyring": "^6.0.5",
"@polkadot/metadata": "4.1.1",
"@polkadot/rpc-core": "4.1.1",
"@polkadot/rpc-provider": "4.1.1",
"@polkadot/types": "4.1.1",
"@polkadot/types-known": "4.1.1",
"@polkadot/util": "^6.0.5",
"@polkadot/util-crypto": "^6.0.5",
"@polkadot/x-rxjs": "^6.0.5",
"@babel/runtime": "^7.13.10",
"@polkadot/api-derive": "4.5.1",
"@polkadot/keyring": "^6.1.1",
"@polkadot/metadata": "4.5.1",
"@polkadot/rpc-core": "4.5.1",
"@polkadot/rpc-provider": "4.5.1",
"@polkadot/types": "4.5.1",
"@polkadot/types-known": "4.5.1",
"@polkadot/util": "^6.1.1",
"@polkadot/util-crypto": "^6.1.1",
"@polkadot/x-rxjs": "^6.1.1",
"bn.js": "^4.11.9",
"eventemitter3": "^4.0.7"
}
+30 -32
View File
@@ -3,7 +3,7 @@
import type { Vec, u16, u32, u64, u8 } from '@polkadot/types';
import type { Codec } from '@polkadot/types/types';
import type { Balance, BalanceOf, BlockNumber, LockIdentifier, ModuleId, Moment, Perbill, Percent, Permill, RuntimeDbWeight, Weight } from '@polkadot/types/interfaces/runtime';
import type { Balance, BalanceOf, BlockNumber, LockIdentifier, Moment, PalletId, Perbill, Percent, Permill, RuntimeDbWeight, Weight } from '@polkadot/types/interfaces/runtime';
import type { SessionIndex } from '@polkadot/types/interfaces/session';
import type { EraIndex } from '@polkadot/types/interfaces/staking';
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
@@ -16,11 +16,9 @@ declare module '@polkadot/api/types/consts' {
babe: {
[key: string]: Codec;
/**
* The number of **slots** that an epoch takes. We couple sessions to
* epochs, i.e. we start a new session once the new epoch begins.
* NOTE: Currently it is not possible to change the epoch duration
* after the chain has started. Attempting to do so will brick block
* production.
* The amount of time, in slots, that each epoch should last.
* NOTE: Currently it is not possible to change the epoch duration after
* the chain has started. Attempting to do so will brick block production.
**/
epochDuration: u64 & AugmentedConst<ApiType>;
/**
@@ -205,7 +203,7 @@ declare module '@polkadot/api/types/consts' {
candidacyBond: BalanceOf & AugmentedConst<ApiType>;
desiredMembers: u32 & AugmentedConst<ApiType>;
desiredRunnersUp: u32 & AugmentedConst<ApiType>;
moduleId: LockIdentifier & AugmentedConst<ApiType>;
palletId: LockIdentifier & AugmentedConst<ApiType>;
termDuration: BlockNumber & AugmentedConst<ApiType>;
votingBondBase: BalanceOf & AugmentedConst<ApiType>;
votingBondFactor: BalanceOf & AugmentedConst<ApiType>;
@@ -297,7 +295,7 @@ declare module '@polkadot/api/types/consts' {
lottery: {
[key: string]: Codec;
maxCalls: u32 & AugmentedConst<ApiType>;
moduleId: ModuleId & AugmentedConst<ApiType>;
palletId: PalletId & AugmentedConst<ApiType>;
};
multisig: {
[key: string]: Codec;
@@ -318,15 +316,20 @@ declare module '@polkadot/api/types/consts' {
proxy: {
[key: string]: Codec;
/**
* `AnnouncementDepositBase` metadata shadow.
* The base amount of currency needed to reserve for creating an announcement.
*
* This is held when a new storage item holding a `Balance` is created (typically 16 bytes).
**/
announcementDepositBase: BalanceOf & AugmentedConst<ApiType>;
/**
* `AnnouncementDepositFactor` metadata shadow.
* The amount of currency needed per announcement made.
*
* This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes)
* into a pre-existing storage value.
**/
announcementDepositFactor: BalanceOf & AugmentedConst<ApiType>;
/**
* `MaxPending` metadata shadow.
* The maximum amount of time-delayed announcements that are allowed to be pending.
**/
maxPending: u32 & AugmentedConst<ApiType>;
/**
@@ -335,10 +338,17 @@ declare module '@polkadot/api/types/consts' {
maxProxies: u16 & AugmentedConst<ApiType>;
/**
* The base amount of currency needed to reserve for creating a proxy.
*
* This is held for an additional storage item whose value size is
* `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes.
**/
proxyDepositBase: BalanceOf & AugmentedConst<ApiType>;
/**
* The amount of currency needed per proxy added.
*
* This is held for adding 32 bytes plus an instance of `ProxyType` more into a pre-existing
* storage value. Thus, when configuring `ProxyDepositFactor` one should take into account
* `32 + proxy_type.encode().len()` bytes of data.
**/
proxyDepositFactor: BalanceOf & AugmentedConst<ApiType>;
};
@@ -371,6 +381,10 @@ declare module '@polkadot/api/types/consts' {
* The number of blocks between membership challenges.
**/
challengePeriod: BlockNumber & AugmentedConst<ApiType>;
/**
* Maximum candidate intake per round.
**/
maxCandidateIntake: u32 & AugmentedConst<ApiType>;
/**
* The number of times a member may vote the wrong way (or not at all, when they are a skeptic)
* before they become suspended.
@@ -379,7 +393,7 @@ declare module '@polkadot/api/types/consts' {
/**
* The societies's module id
**/
moduleId: ModuleId & AugmentedConst<ApiType>;
palletId: PalletId & AugmentedConst<ApiType>;
/**
* The amount of incentive paid within each period. Doesn't include VoterTip.
**/
@@ -401,21 +415,9 @@ declare module '@polkadot/api/types/consts' {
**/
bondingDuration: EraIndex & AugmentedConst<ApiType>;
/**
* The number of blocks before the end of the era from which election submissions are allowed.
*
* Setting this to zero will disable the offchain compute and only on-chain seq-phragmen will
* be used.
*
* This is bounded by being within the last session. Hence, setting it to a value more than the
* length of a session will be pointless.
* Maximum number of nominations per nominator.
**/
electionLookahead: BlockNumber & AugmentedConst<ApiType>;
/**
* Maximum number of balancing iterations to run in the offchain submission.
*
* If set to 0, balance_solution will not be executed at all.
**/
maxIterations: u32 & AugmentedConst<ApiType>;
maxNominations: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators rewarded for each validator.
*
@@ -423,10 +425,6 @@ declare module '@polkadot/api/types/consts' {
* their reward. This used to limit the i/o cost for the nominator payout.
**/
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
/**
* The threshold of improvement that should be provided for a new solution to be accepted.
**/
minSolutionScoreBump: Perbill & AugmentedConst<ApiType>;
/**
* Number of sessions per era.
**/
@@ -524,7 +522,7 @@ declare module '@polkadot/api/types/consts' {
/**
* The treasury's module id, used for deriving its sovereign account ID.
**/
moduleId: ModuleId & AugmentedConst<ApiType>;
palletId: PalletId & AugmentedConst<ApiType>;
/**
* Fraction of a proposal's value that should be bonded in order to place the proposal.
* An accepted proposal gets these back. A rejected proposal does not.
@@ -542,7 +540,7 @@ declare module '@polkadot/api/types/consts' {
vesting: {
[key: string]: Codec;
/**
* The minimum amount to be transferred to create a new vesting schedule.
* The minimum amount transferred to call `vested_transfer`.
**/
minVestedTransfer: BalanceOf & AugmentedConst<ApiType>;
};
+84 -59
View File
@@ -91,6 +91,21 @@ declare module '@polkadot/api/types/errors' {
**/
UnclesAlreadySet: AugmentedError<ApiType>;
};
babe: {
[key: string]: AugmentedError<ApiType>;
/**
* A given equivocation report is valid but already previously reported.
**/
DuplicateOffenceReport: AugmentedError<ApiType>;
/**
* An equivocation proof provided as part of an equivocation report is invalid.
**/
InvalidEquivocationProof: AugmentedError<ApiType>;
/**
* A key ownership proof provided as part of an equivocation report is invalid.
**/
InvalidKeyOwnershipProof: AugmentedError<ApiType>;
};
balances: {
[key: string]: AugmentedError<ApiType>;
/**
@@ -728,6 +743,64 @@ declare module '@polkadot/api/types/errors' {
**/
InvalidKey: AugmentedError<ApiType>;
};
indices: {
[key: string]: AugmentedError<ApiType>;
/**
* The index was not available.
**/
InUse: AugmentedError<ApiType>;
/**
* The index was not already assigned.
**/
NotAssigned: AugmentedError<ApiType>;
/**
* The index is assigned to another account.
**/
NotOwner: AugmentedError<ApiType>;
/**
* The source and destination accounts are identical.
**/
NotTransfer: AugmentedError<ApiType>;
/**
* The index is permanent and may not be freed/changed.
**/
Permanent: AugmentedError<ApiType>;
};
lottery: {
[key: string]: AugmentedError<ApiType>;
/**
* A lottery has already ended.
**/
AlreadyEnded: AugmentedError<ApiType>;
/**
* You are already participating in the lottery with this call.
**/
AlreadyParticipating: AugmentedError<ApiType>;
/**
* Failed to encode calls
**/
EncodingFailed: AugmentedError<ApiType>;
/**
* A lottery is already in progress.
**/
InProgress: AugmentedError<ApiType>;
/**
* The call is not valid for an open lottery.
**/
InvalidCall: AugmentedError<ApiType>;
/**
* A lottery has not been configured.
**/
NotConfigured: AugmentedError<ApiType>;
/**
* An overflow has occurred.
**/
Overflow: AugmentedError<ApiType>;
/**
* Too many calls for a single lottery.
**/
TooManyCalls: AugmentedError<ApiType>;
};
multisig: {
[key: string]: AugmentedError<ApiType>;
/**
@@ -1032,10 +1105,6 @@ declare module '@polkadot/api/types/errors' {
* A nomination target was supplied that was blocked or otherwise not a validator.
**/
BadTarget: AugmentedError<ApiType>;
/**
* The call is not allowed at the given time due to restrictions of election period.
**/
CallNotAllowed: AugmentedError<ApiType>;
/**
* Duplicate index.
**/
@@ -1092,61 +1161,6 @@ declare module '@polkadot/api/types/errors' {
* Can not rebond without unlocking chunks.
**/
NoUnlockChunk: AugmentedError<ApiType>;
/**
* Error while building the assignment type from the compact. This can happen if an index
* is invalid, or if the weights _overflow_.
**/
OffchainElectionBogusCompact: AugmentedError<ApiType>;
/**
* The submitted result has unknown edges that are not among the presented winners.
**/
OffchainElectionBogusEdge: AugmentedError<ApiType>;
/**
* The election size is invalid.
**/
OffchainElectionBogusElectionSize: AugmentedError<ApiType>;
/**
* One of the submitted nominators has an edge to which they have not voted on chain.
**/
OffchainElectionBogusNomination: AugmentedError<ApiType>;
/**
* One of the submitted nominators is not an active nominator on chain.
**/
OffchainElectionBogusNominator: AugmentedError<ApiType>;
/**
* The claimed score does not match with the one computed from the data.
**/
OffchainElectionBogusScore: AugmentedError<ApiType>;
/**
* A self vote must only be originated from a validator to ONLY themselves.
**/
OffchainElectionBogusSelfVote: AugmentedError<ApiType>;
/**
* One of the submitted winners is not an active candidate on chain (index is out of range
* in snapshot).
**/
OffchainElectionBogusWinner: AugmentedError<ApiType>;
/**
* Incorrect number of winners were presented.
**/
OffchainElectionBogusWinnerCount: AugmentedError<ApiType>;
/**
* The submitted result is received out of the open window.
**/
OffchainElectionEarlySubmission: AugmentedError<ApiType>;
/**
* One of the submitted nominators has an edge which is submitted before the last non-zero
* slash of the target.
**/
OffchainElectionSlashedNomination: AugmentedError<ApiType>;
/**
* The submitted result is not as good as the one stored on chain.
**/
OffchainElectionWeakSubmission: AugmentedError<ApiType>;
/**
* The snapshot data of the current window is missing.
**/
SnapshotUnavailable: AugmentedError<ApiType>;
/**
* Too many nomination targets supplied.
**/
@@ -1229,6 +1243,17 @@ declare module '@polkadot/api/types/errors' {
**/
WrongProposalWeight: AugmentedError<ApiType>;
};
technicalMembership: {
[key: string]: AugmentedError<ApiType>;
/**
* Already a member.
**/
AlreadyMember: AugmentedError<ApiType>;
/**
* Not a member.
**/
NotMember: AugmentedError<ApiType>;
};
tips: {
[key: string]: AugmentedError<ApiType>;
/**
+2 -6
View File
@@ -769,13 +769,9 @@ declare module '@polkadot/api/types/events' {
**/
Slash: AugmentedEvent<ApiType, [AccountId, Balance]>;
/**
* A new solution for the upcoming election has been stored. \[compute\]
* A new set of stakers was elected.
**/
SolutionStored: AugmentedEvent<ApiType, [ElectionCompute]>;
/**
* A new set of stakers was elected with the given \[compute\].
**/
StakingElection: AugmentedEvent<ApiType, [ElectionCompute]>;
StakingElection: AugmentedEvent<ApiType, []>;
/**
* An account has unbonded this amount. \[stash, amount\]
**/
+2 -44
View File
@@ -24,7 +24,7 @@ import type { AccountId, AccountIndex, AssetId, Balance, BalanceOf, BlockNumber,
import type { Scheduled, TaskAddress } from '@polkadot/types/interfaces/scheduler';
import type { Keys, SessionIndex } from '@polkadot/types/interfaces/session';
import type { Bid, BidKind, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
import type { ActiveEraInfo, ElectionPhase, ElectionResult, ElectionScore, ElectionStatus, EraIndex, EraRewardPoints, Exposure, Forcing, Nominations, ReadySolution, RewardDestination, RoundSnapshot, SeatHolder, SlashingSpans, SolutionOrSnapshotSize, SpanIndex, SpanRecord, StakingLedger, UnappliedSlash, ValidatorPrefs, Voter } from '@polkadot/types/interfaces/staking';
import type { ActiveEraInfo, ElectionPhase, EraIndex, EraRewardPoints, Exposure, Forcing, Nominations, ReadySolution, RewardDestination, RoundSnapshot, SeatHolder, SlashingSpans, SolutionOrSnapshotSize, SpanIndex, SpanRecord, StakingLedger, UnappliedSlash, ValidatorPrefs, Voter } from '@polkadot/types/interfaces/staking';
import type { AccountInfo, ConsumedWeight, DigestOf, EventIndex, EventRecord, LastRuntimeUpgradeInfo, Phase } from '@polkadot/types/interfaces/system';
import type { Bounty, BountyIndex, OpenTip, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
import type { Multiplier } from '@polkadot/types/interfaces/txpayment';
@@ -822,13 +822,6 @@ declare module '@polkadot/api/types/storage' {
* The earliest era for which we have a pending, unapplied slash.
**/
earliestUnappliedSlash: AugmentedQuery<ApiType, () => Observable<Option<EraIndex>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Flag to control the execution of the offchain election. When `Open(_)`, we accept
* solutions to be submitted.
*
* TWO_PHASE_NOTE: should be removed once we switch to multi-phase.
**/
eraElectionStatus: AugmentedQuery<ApiType, () => Observable<ElectionStatus>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Rewards for the last `HISTORY_DEPTH` eras.
* If reward hasn't been set or has been removed then 0 reward is returned.
@@ -903,13 +896,6 @@ declare module '@polkadot/api/types/storage' {
* invulnerables) and restricted to testnets.
**/
invulnerables: AugmentedQuery<ApiType, () => Observable<Vec<AccountId>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* True if the current **planned** session is final. Note that this does not take era
* forcing into account.
*
* TWO_PHASE_NOTE: should be removed once we switch to multi-phase.
**/
isCurrentSessionFinal: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Map from all (unlocked) "controller" accounts to the info regarding the staking.
**/
@@ -930,20 +916,6 @@ declare module '@polkadot/api/types/storage' {
* Where the reward payment should be made. Keyed by stash.
**/
payee: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<RewardDestination>, [AccountId]> & QueryableStorageEntry<ApiType, [AccountId]>;
/**
* The next validator set. At the end of an era, if this is available (potentially from the
* result of an offchain worker), it is immediately used. Otherwise, the on-chain election
* is executed.
*
* TWO_PHASE_NOTE: should be removed once we switch to multi-phase.
**/
queuedElected: AugmentedQuery<ApiType, () => Observable<Option<ElectionResult>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The score of the current [`QueuedElected`].
*
* TWO_PHASE_NOTE: should be removed once we switch to multi-phase.
**/
queuedScore: AugmentedQuery<ApiType, () => Observable<Option<ElectionScore>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Slashing spans for stash accounts.
**/
@@ -954,20 +926,6 @@ declare module '@polkadot/api/types/storage' {
* The rest of the slashed value is handled by the `Slash`.
**/
slashRewardFraction: AugmentedQuery<ApiType, () => Observable<Perbill>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Snapshot of nominators at the beginning of the current election window. This should only
* have a value when [`EraElectionStatus`] == `ElectionStatus::Open(_)`.
*
* TWO_PHASE_NOTE: should be removed once we switch to multi-phase.
**/
snapshotNominators: AugmentedQuery<ApiType, () => Observable<Option<Vec<AccountId>>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Snapshot of validators at the beginning of the current election window. This should only
* have a value when [`EraElectionStatus`] == `ElectionStatus::Open(_)`.
*
* TWO_PHASE_NOTE: should be removed once we switch to multi-phase.
**/
snapshotValidators: AugmentedQuery<ApiType, () => Observable<Option<Vec<AccountId>>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Records information about the maximum slash of a stash within a slashing span,
* as well as how much reward has been paid out.
@@ -977,7 +935,7 @@ declare module '@polkadot/api/types/storage' {
* True if network has been upgraded to this version.
* Storage version of the pallet.
*
* This is set to v5.0.0 for new networks.
* This is set to v6.0.0 for new networks.
**/
storageVersion: AugmentedQuery<ApiType, () => Observable<Releases>, []> & QueryableStorageEntry<ApiType, []>;
/**
+1 -1
View File
@@ -134,7 +134,7 @@ declare module '@polkadot/rpc-core/types.jsonrpc' {
/**
* Instructs the manual-seal authorship task to finalize a block
**/
finalizeBlock: AugmentedRpc<(hash: BlockHash | string | Uint8Array, justification?: Justification | string | Uint8Array) => Observable<bool>>;
finalizeBlock: AugmentedRpc<(hash: BlockHash | string | Uint8Array, justification?: Justification) => Observable<bool>>;
};
eth: {
/**
+6 -71
View File
@@ -19,7 +19,7 @@ import type { AccountId, AccountIndex, AssetId, Balance, BalanceOf, BlockNumber,
import type { Period, Priority } from '@polkadot/types/interfaces/scheduler';
import type { Keys } from '@polkadot/types/interfaces/session';
import type { SocietyJudgement } from '@polkadot/types/interfaces/society';
import type { CompactAssignments, ElectionScore, ElectionSize, EraIndex, RawSolution, RewardDestination, SolutionOrSnapshotSize, ValidatorIndex, ValidatorPrefs } from '@polkadot/types/interfaces/staking';
import type { EraIndex, RawSolution, RewardDestination, SolutionOrSnapshotSize, ValidatorPrefs } from '@polkadot/types/interfaces/staking';
import type { Key } from '@polkadot/types/interfaces/system';
import type { BountyIndex } from '@polkadot/types/interfaces/treasury';
import type { Timepoint } from '@polkadot/types/interfaces/utility';
@@ -108,8 +108,7 @@ declare module '@polkadot/api/types/submittable' {
*
* The origin must be Signed and the sender must have sufficient funds free.
*
* Funds of sender are reserved according to the formula:
* `AssetDepositBase + AssetDepositPerZombie * max_zombies`.
* Funds of sender are reserved by `AssetDeposit`.
*
* Parameters:
* - `id`: The identifier of the new asset. This must not be currently in use to identify
@@ -713,7 +712,7 @@ declare module '@polkadot/api/types/submittable' {
* * `gas_limit`: The gas limit enforced when executing the constructor.
* * `code`: The contract code to deploy in raw bytes.
* * `data`: The input data to pass to the contract constructor.
* * `salt`: Used for the address derivation. See [`Self::contract_address`].
* * `salt`: Used for the address derivation. See [`Pallet::contract_address`].
*
* Instantiation is executed as follows:
*
@@ -2098,7 +2097,7 @@ declare module '@polkadot/api/types/submittable' {
**/
proxy: AugmentedSubmittable<(real: AccountId | string | Uint8Array, forceProxyType: Option<ProxyType> | null | object | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId, Option<ProxyType>, Call]>;
/**
* Dispatch the given `call` from an account that the sender is authorised for through
* Dispatch the given `call` from an account that the sender is authorized for through
* `add_proxy`.
*
* Removes any corresponding announcement(s).
@@ -3155,70 +3154,6 @@ declare module '@polkadot/api/types/submittable' {
* # </weight>
**/
setValidatorCount: AugmentedSubmittable<(updated: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* Submit an election result to the chain. If the solution:
*
* 1. is valid.
* 2. has a better score than a potentially existing solution on chain.
*
* then, it will be _put_ on chain.
*
* A solution consists of two pieces of data:
*
* 1. `winners`: a flat vector of all the winners of the round.
* 2. `assignments`: the compact version of an assignment vector that encodes the edge
* weights.
*
* Both of which may be computed using _phragmen_, or any other algorithm.
*
* Additionally, the submitter must provide:
*
* - The `score` that they claim their solution has.
*
* Both validators and nominators will be represented by indices in the solution. The
* indices should respect the corresponding types ([`ValidatorIndex`] and
* [`NominatorIndex`]). Moreover, they should be valid when used to index into
* [`SnapshotValidators`] and [`SnapshotNominators`]. Any invalid index will cause the
* solution to be rejected. These two storage items are set during the election window and
* may be used to determine the indices.
*
* A solution is valid if:
*
* 0. It is submitted when [`EraElectionStatus`] is `Open`.
* 1. Its claimed score is equal to the score computed on-chain.
* 2. Presents the correct number of winners.
* 3. All indexes must be value according to the snapshot vectors. All edge values must
* also be correct and should not overflow the granularity of the ratio type (i.e. 256
* or billion).
* 4. For each edge, all targets are actually nominated by the voter.
* 5. Has correct self-votes.
*
* A solutions score is consisted of 3 parameters:
*
* 1. `min { support.total }` for each support of a winner. This value should be maximized.
* 2. `sum { support.total }` for each support of a winner. This value should be minimized.
* 3. `sum { support.total^2 }` for each support of a winner. This value should be
* minimized (to ensure less variance)
*
* # <weight>
* The transaction is assumed to be the longest path, a better solution.
* - Initial solution is almost the same.
* - Worse solution is retraced in pre-dispatch-checks which sets its own weight.
* # </weight>
**/
submitElectionSolution: AugmentedSubmittable<(winners: Vec<ValidatorIndex> | (ValidatorIndex | AnyNumber | Uint8Array)[], compact: CompactAssignments | { votes1?: any; votes2?: any; votes3?: any; votes4?: any; votes5?: any; votes6?: any; votes7?: any; votes8?: any; votes9?: any; votes10?: any; votes11?: any; votes12?: any; votes13?: any; votes14?: any; votes15?: any; votes16?: any } | string | Uint8Array, score: ElectionScore, era: EraIndex | AnyNumber | Uint8Array, size: ElectionSize | { validators?: any; nominators?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<ValidatorIndex>, CompactAssignments, ElectionScore, EraIndex, ElectionSize]>;
/**
* Unsigned version of `submit_election_solution`.
*
* Note that this must pass the [`ValidateUnsigned`] check which only allows transactions
* from the local node to be included. In other words, only the block author can include a
* transaction in the block.
*
* # <weight>
* See [`submit_election_solution`].
* # </weight>
**/
submitElectionSolutionUnsigned: AugmentedSubmittable<(winners: Vec<ValidatorIndex> | (ValidatorIndex | AnyNumber | Uint8Array)[], compact: CompactAssignments | { votes1?: any; votes2?: any; votes3?: any; votes4?: any; votes5?: any; votes6?: any; votes7?: any; votes8?: any; votes9?: any; votes10?: any; votes11?: any; votes12?: any; votes13?: any; votes14?: any; votes15?: any; votes16?: any } | string | Uint8Array, score: ElectionScore, era: EraIndex | AnyNumber | Uint8Array, size: ElectionSize | { validators?: any; nominators?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<ValidatorIndex>, CompactAssignments, ElectionScore, EraIndex, ElectionSize]>;
/**
* Schedule a portion of the stash to be unlocked ready for transfer out after the bond
* period ends. If this leaves an amount actively bonded less than
@@ -3939,7 +3874,7 @@ declare module '@polkadot/api/types/submittable' {
* Unlock any vested funds of the sender account.
*
* The dispatch origin for this call must be _Signed_ and the sender must have funds still
* locked under this module.
* locked under this pallet.
*
* Emits either `VestingCompleted` or `VestingUpdated`.
*
@@ -3957,7 +3892,7 @@ declare module '@polkadot/api/types/submittable' {
* The dispatch origin for this call must be _Signed_.
*
* - `target`: The account whose vested funds should be unlocked. Must have funds still
* locked under this module.
* locked under this pallet.
*
* Emits either `VestingCompleted` or `VestingUpdated`.
*
+3 -3
View File
@@ -18,10 +18,10 @@ import { cryptoWaitReady } from '@polkadot/util-crypto';
import { of } from '@polkadot/x-rxjs';
import { map, switchMap } from '@polkadot/x-rxjs/operators';
import { detectedCapabilities } from './capabilities';
import { Decorate } from './Decorate';
import { detectedCapabilities } from './util';
const KEEPALIVE_INTERVAL = 15000;
const KEEPALIVE_INTERVAL = 10000;
const DEFAULT_BLOCKNUMBER = { unwrap: () => BN_ZERO };
const l = logger('api/init');
@@ -321,7 +321,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
}
this.#healthTimer = setInterval((): void => {
this._rpcCore.system.health().toPromise().catch(() => null);
this._rpcCore.system.health().toPromise().catch((error) => l.warn(`Health keepalive check failed: ${(error as Error).message}`));
}, KEEPALIVE_INTERVAL);
} catch (_error) {
const error = new Error(`FATAL: Unable to initialize the API: ${(_error as Error).message}`);
+181
View File
@@ -0,0 +1,181 @@
// Copyright 2017-2021 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ApiInterfaceRx } from '@polkadot/api/types';
import type { bool, Raw, u32 } from '@polkadot/types';
import type { Releases } from '@polkadot/types/interfaces';
import type { InterfaceTypes } from '@polkadot/types/types';
import { assert, compactFromU8a } from '@polkadot/util';
import { combineLatest, Observable, of } from '@polkadot/x-rxjs';
import { map, take } from '@polkadot/x-rxjs/operators';
// the order and types needs to map with the all array setup below
type ExtractedQ = [bool | null, bool | null, bool | null, Releases | null];
type ExtractedR = [Raw | null];
type ExtractedC = [u32 | null, u32 | null];
type DetectedKeys = keyof Pick<InterfaceTypes, 'AccountInfo' | 'ValidatorPrefs'>;
type DetectedValues = keyof InterfaceTypes;
interface DetectedTypes extends Record<DetectedKeys, DetectedValues> {
AccountInfo: 'AccountInfoWithRefCount' | 'AccountInfoWithDualRefCount' | 'AccountInfoWithTripleRefCount',
Keys: 'SessionKeys1' | 'SessionKeys2' | 'SessionKeys3' | 'SessionKeys4' | 'SessionKeys5' | 'SessionKeys6' | 'SessionKeys7' | 'SessionKeys8' | 'SessionKeys9' | 'SessionKeys10';
RefCount: 'u8' | 'u32',
SlotRange: Record<string, unknown>;
ValidatorPrefs: 'ValidatorPrefsWithBlocked' | 'ValidatorPrefsWithCommission';
WinningData: string;
}
interface AvailableMap<T> {
filtered: T[];
included: boolean[];
original: T[];
}
interface Constants {
accountIdLength: number;
}
const NumberMap = ['Zero', 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten'];
function mapCapabilities ({ accountIdLength }: Constants, [leasePeriodsPerSlot, slotRangeCount]: ExtractedC, [systemRefcount32, systemRefcountDual, systemRefcountTriple, stakingVersion]: ExtractedQ, [keys]: ExtractedR): Partial<DetectedTypes> {
const types: Partial<DetectedTypes> = {};
// AccountInfo
if (systemRefcountTriple && systemRefcountTriple.isTrue) {
types.AccountInfo = 'AccountInfoWithTripleRefCount';
} else if (systemRefcountDual && systemRefcountDual.isTrue) {
types.AccountInfo = 'AccountInfoWithDualRefCount';
} else {
types.AccountInfo = 'AccountInfoWithRefCount';
if (!systemRefcount32 || systemRefcount32.isFalse) {
types.RefCount = 'u8';
}
}
// ValidatorPrefs
if (stakingVersion) {
if (stakingVersion.index >= 4) { // v1 = index 0, V5 = index 4
types.ValidatorPrefs = 'ValidatorPrefsWithBlocked';
} else {
types.ValidatorPrefs = 'ValidatorPrefsWithCommission';
}
}
// Keys
if (keys) {
try {
const [offset, numItems] = compactFromU8a(keys);
const tupleLength = (keys.length - offset) / numItems.toNumber();
const numIds = tupleLength / accountIdLength;
const numIdsRound = Math.floor(numIds);
assert(numIds >= 2 && numIds <= 11, `Detected ${numIds} in Keys, should be >= 2 and <= 11`);
if (numIdsRound !== numIds) {
// Beefy?
if ((((numIdsRound - 1) * accountIdLength) + 33) === tupleLength) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
types.Keys = `SessionKeys${numIdsRound - 1}B`;
} else {
assert(false, `Expected integer number of keys, found ${numIds.toFixed(2)}`);
}
} else {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
types.Keys = `SessionKeys${numIds - 1}`;
}
} catch (error) {
console.error(error);
}
}
// auctions
if (leasePeriodsPerSlot && slotRangeCount) {
const _enum: string[] = [];
for (let i = 0; leasePeriodsPerSlot.gtn(i); i++) {
for (let j = i; leasePeriodsPerSlot.gtn(j); j++) {
_enum.push(`${NumberMap[i]}${NumberMap[j]}`);
}
}
types.SlotRange = { _enum };
types.WinningData = `[WinningDataEntry; ${slotRangeCount.toNumber()}]`;
}
return types;
}
function filterEntries <T> (original: T[]): AvailableMap<T> {
const included = original.map((c) => !!c);
const filtered = original.filter((_, index) => included[index]);
return { filtered, included, original };
}
function extractResults <R, T = unknown> (results: unknown[], map: AvailableMap<T>): R {
let offset = -1;
return map.included.map((isIncluded) =>
isIncluded
? results[++offset]
: null
) as unknown as R;
}
/**
* @description Query the chain for the specific capabilities
*/
export function detectedCapabilities (api: ApiInterfaceRx, blockHash?: Uint8Array | string | undefined): Observable<Partial<DetectedTypes>> {
const consts = filterEntries([
api.consts.auctions?.leasePeriodsPerSlot,
api.consts.auctions?.slotRangeCount
]);
const queries = filterEntries([
api.query.system?.upgradedToU32RefCount,
api.query.system?.upgradedToDualRefCount,
api.query.system?.upgradedToTripleRefCount,
api.query.staking?.storageVersion
]);
const raws = filterEntries([
api.query.session?.queuedKeys
]);
return combineLatest([
consts.filtered.length
? blockHash
// FIXME consts don't have .at as of yet...
? of([])
: of(consts.filtered)
: of([]),
queries.filtered.length
? blockHash
? combineLatest(queries.filtered.map((c) => c.at(blockHash)))
: api.queryMulti(queries.filtered)
: of([]),
raws.filtered.length
? blockHash
? combineLatest(raws.filtered.map((k) => api.rpc.state.getStorage.raw(k.key(), blockHash)))
: combineLatest(raws.filtered.map((k) => api.rpc.state.getStorage.raw(k.key())))
: of([])
]).pipe(
map(([cResults, qResults, rResults]): Partial<DetectedTypes> =>
mapCapabilities(
{
accountIdLength: api.registry.createType('AccountId').encodedLength
},
extractResults<ExtractedC>(cResults, consts),
extractResults<ExtractedQ>(qResults, queries),
extractResults<ExtractedR>(rResults, raws)
)
),
take(1)
);
}
-82
View File
@@ -1,82 +0,0 @@
// Copyright 2017-2021 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ApiInterfaceRx } from '@polkadot/api/types';
import type { bool } from '@polkadot/types';
import type { Releases } from '@polkadot/types/interfaces';
import type { InterfaceTypes } from '@polkadot/types/types';
import { combineLatest, Observable, of } from '@polkadot/x-rxjs';
import { map, take } from '@polkadot/x-rxjs/operators';
// the order and types needs to map with the all array setup below
type Extracted = [bool | null, bool | null, bool | null, Releases | null];
type DetectedKeys = keyof Pick<InterfaceTypes, 'AccountInfo' | 'ValidatorPrefs'>;
type DetectedValues = keyof InterfaceTypes;
interface DetectedTypes extends Record<DetectedKeys, DetectedValues> {
AccountInfo: 'AccountInfoWithRefCount' | 'AccountInfoWithDualRefCount' | 'AccountInfoWithTripleRefCount',
RefCount: 'u8' | 'u32',
ValidatorPrefs: 'ValidatorPrefsWithBlocked' | 'ValidatorPrefsWithCommission';
}
function mapCapabilities ([systemRefcount32, systemRefcountDual, systemRefcountTriple, stakingVersion]: Extracted): Partial<DetectedTypes> {
const types: Partial<DetectedTypes> = {};
// AccountInfo
if (systemRefcountTriple && systemRefcountTriple.isTrue) {
types.AccountInfo = 'AccountInfoWithTripleRefCount';
} else if (systemRefcountDual && systemRefcountDual.isTrue) {
types.AccountInfo = 'AccountInfoWithDualRefCount';
} else {
types.AccountInfo = 'AccountInfoWithRefCount';
if (!systemRefcount32 || systemRefcount32.isFalse) {
types.RefCount = 'u8';
}
}
// ValidatorPrefs
if (stakingVersion) {
if (stakingVersion.index >= 4) { // v1 = index 0, V5 = index 4
types.ValidatorPrefs = 'ValidatorPrefsWithBlocked';
} else {
types.ValidatorPrefs = 'ValidatorPrefsWithCommission';
}
}
return types;
}
/**
* @description Query the chain for the specific capabilities
*/
export function detectedCapabilities (api: ApiInterfaceRx, blockHash?: Uint8Array | string | undefined): Observable<Partial<DetectedTypes>> {
const all = [
api.query.system?.upgradedToU32RefCount,
api.query.system?.upgradedToDualRefCount,
api.query.system?.upgradedToTripleRefCount,
api.query.staking?.storageVersion
];
const included = all.map((c) => !!c);
const filtered = all.filter((_, index) => included[index]);
return (
filtered.length
? blockHash
? combineLatest(filtered.map((c) => c.at(blockHash)))
: api.queryMulti(filtered)
: of([])
).pipe(
map((results): Partial<DetectedTypes> => {
let offset = -1;
return mapCapabilities(
included.map((isIncluded) => isIncluded ? results[++offset] : null) as Extracted
);
}),
take(1)
);
}
+1 -1
View File
@@ -3,12 +3,12 @@
// Simple non-runnable checks to test type definitions in the editor itself
import type { HeaderExtended } from '@polkadot/api-derive/types';
import type { StorageKey } from '@polkadot/types';
import type { AccountId, Balance, DispatchErrorModule, Event, Header, Index } from '@polkadot/types/interfaces';
import type { AnyTuple, IExtrinsic, IMethod } from '@polkadot/types/types';
import { ApiPromise } from '@polkadot/api';
import { HeaderExtended } from '@polkadot/api-derive';
import { createTestPairs, TestKeyringMap } from '@polkadot/keyring/testingPairs';
import { createTypeUnsafe, TypeRegistry } from '@polkadot/types/create';
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api', version: '4.1.1' };
export const packageInfo = { name: '@polkadot/api', version: '4.5.1' };
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/metadata",
"version": "4.1.1",
"version": "4.5.1",
"type": "module",
"description": "Helpers to extract information from runtime metadata",
"main": "index.js",
@@ -16,14 +16,14 @@
"bugs": "https://github.com/polkadot-js/api/issues",
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme",
"dependencies": {
"@babel/runtime": "^7.13.9",
"@polkadot/types": "4.1.1",
"@polkadot/types-known": "4.1.1",
"@polkadot/util": "^6.0.5",
"@polkadot/util-crypto": "^6.0.5",
"@babel/runtime": "^7.13.10",
"@polkadot/types": "4.5.1",
"@polkadot/types-known": "4.5.1",
"@polkadot/util": "^6.1.1",
"@polkadot/util-crypto": "^6.1.1",
"bn.js": "^4.11.9"
},
"devDependencies": {
"@polkadot/keyring": "^6.0.5"
"@polkadot/keyring": "^6.1.1"
}
}
+19 -19
View File
@@ -33,18 +33,18 @@ export class MetadataVersioned extends Struct {
}, value as Map<unknown, unknown>);
}
private _assertVersion (version: number): boolean {
#assertVersion = (version: number): boolean => {
assert(this.version <= version, `Cannot convert metadata from v${this.version} to v${version}`);
return this.version === version;
}
};
private _getVersion<T extends MetaMapped, F extends MetaMapped> (version: MetaVersions, fromPrev: (registry: Registry, input: F, metaVersion: number) => T): T {
#getVersion = <T extends MetaMapped, F extends MetaMapped>(version: MetaVersions, fromPrev: (registry: Registry, input: F, metaVersion: number) => T): T => {
const asCurr = `asV${version}` as MetaAsX;
const asPrev = `asV${version - 1}` as MetaAsX;
if (this._assertVersion(version)) {
return this._metadata[asCurr] as T;
if (this.#assertVersion(version)) {
return this.#metadata()[asCurr] as T;
}
if (!this.#converted.has(version)) {
@@ -52,6 +52,13 @@ export class MetadataVersioned extends Struct {
}
return this.#converted.get(version) as T;
};
/**
* @description the metadata wrapped
*/
#metadata = (): MetadataAll => {
return this.get('metadata') as MetadataAll;
}
/**
@@ -68,30 +75,30 @@ export class MetadataVersioned extends Struct {
* @description Returns the wrapped metadata as a V9 object
*/
public get asV9 (): MetadataV9 {
this._assertVersion(9);
this.#assertVersion(9);
return this._metadata.asV9;
return this.#metadata().asV9;
}
/**
* @description Returns the wrapped values as a V10 object
*/
public get asV10 (): MetadataV10 {
return this._getVersion(10, toV10);
return this.#getVersion(10, toV10);
}
/**
* @description Returns the wrapped values as a V11 object
*/
public get asV11 (): MetadataV11 {
return this._getVersion(11, toV11);
return this.#getVersion(11, toV11);
}
/**
* @description Returns the wrapped values as a V12 object
*/
public get asV12 (): MetadataV12 {
return this._getVersion(12, toV12);
return this.#getVersion(12, toV12);
}
/**
@@ -99,7 +106,7 @@ export class MetadataVersioned extends Struct {
*/
public get asLatest (): MetadataLatest {
// This is non-existent & latest - applied here to do the module-specific type conversions
return this._getVersion(13, toLatest);
return this.#getVersion(13, toLatest);
}
/**
@@ -109,18 +116,11 @@ export class MetadataVersioned extends Struct {
return this.get('magicNumber') as MagicNumber;
}
/**
* @description the metadata wrapped
*/
private get _metadata (): MetadataAll {
return this.get('metadata') as MetadataAll;
}
/**
* @description the metadata version this structure represents
*/
public get version (): number {
return this._metadata.index;
return this.#metadata().index;
}
public getUniqTypes (throwError: boolean): string[] {
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/metadata', version: '4.1.1' };
export const packageInfo = { name: '@polkadot/metadata', version: '4.5.1' };
+174 -363
View File
@@ -499,7 +499,7 @@
{
"name": "Version",
"type": "RuntimeVersion",
"value": "0x106e6f6465387375627374726174652d6e6f64650a000000090100000000000034df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a04000000d2bc9897eed08f1502000000f78b278be53f454c02000000ed99c5acb25eedf502000000cbca25e39f14238702000000687ad44ad37f03c201000000bc9d89904f5b923f0100000068b66ba122c93fa70100000037c8bb1350a9a2a80100000091d5df18b0d2cf5801000000ab3c0572291feb8b0100000002000000",
"value": "0x106e6f6465387375627374726174652d6e6f64650a000000090100000100000034df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a04000000d2bc9897eed08f1502000000f78b278be53f454c02000000ed99c5acb25eedf502000000cbca25e39f14238702000000687ad44ad37f03c201000000bc9d89904f5b923f0100000068b66ba122c93fa70100000037c8bb1350a9a2a80100000091d5df18b0d2cf5801000000ab3c0572291feb8b0100000002000000",
"documentation": [
" Get the chain's current version."
]
@@ -947,13 +947,11 @@
{
"name": "EpochDuration",
"type": "u64",
"value": "0x1400000000000000",
"value": "0xc800000000000000",
"documentation": [
" The number of **slots** that an epoch takes. We couple sessions to",
" epochs, i.e. we start a new session once the new epoch begins.",
" NOTE: Currently it is not possible to change the epoch duration",
" after the chain has started. Attempting to do so will brick block",
" production."
" The amount of time, in slots, that each epoch should last.",
" NOTE: Currently it is not possible to change the epoch duration after",
" the chain has started. Attempting to do so will brick block production."
]
},
{
@@ -969,7 +967,26 @@
]
}
],
"errors": [],
"errors": [
{
"name": "InvalidEquivocationProof",
"documentation": [
" An equivocation proof provided as part of an equivocation report is invalid."
]
},
{
"name": "InvalidKeyOwnershipProof",
"documentation": [
" A key ownership proof provided as part of an equivocation report is invalid."
]
},
{
"name": "DuplicateOffenceReport",
"documentation": [
" A given equivocation report is valid but already previously reported."
]
}
],
"index": 2
},
{
@@ -1375,7 +1392,38 @@
]
}
],
"errors": [],
"errors": [
{
"name": "NotAssigned",
"documentation": [
" The index was not already assigned."
]
},
{
"name": "NotOwner",
"documentation": [
" The index is assigned to another account."
]
},
{
"name": "InUse",
"documentation": [
" The index was not available."
]
},
{
"name": "NotTransfer",
"documentation": [
" The source and destination accounts are identical."
]
},
{
"name": "Permanent",
"documentation": [
" The index is permanent and may not be freed/changed."
]
}
],
"index": 5
},
{
@@ -1954,7 +2002,7 @@
{
"name": "UnsignedPhase",
"type": "BlockNumber",
"value": "0x05000000",
"value": "0x32000000",
"documentation": [
" Duration of the unsigned phase."
]
@@ -1962,7 +2010,7 @@
{
"name": "SignedPhase",
"type": "BlockNumber",
"value": "0x05000000",
"value": "0x32000000",
"documentation": [
" Duration of the signed phase."
]
@@ -1970,7 +2018,7 @@
{
"name": "SolutionImprovementThreshold",
"type": "Perbill",
"value": "0x20a10700",
"value": "0xa0860100",
"documentation": [
" The minimum amount of improvement to the solution score that defines a solution as",
" \"better\" (in any phase)."
@@ -2463,102 +2511,18 @@
" This is basically in sync with the call to [`SessionManager::new_session`]."
]
},
{
"name": "SnapshotValidators",
"modifier": "Optional",
"type": {
"plain": "Vec<AccountId>"
},
"fallback": "0x00",
"documentation": [
" Snapshot of validators at the beginning of the current election window. This should only",
" have a value when [`EraElectionStatus`] == `ElectionStatus::Open(_)`.",
"",
" TWO_PHASE_NOTE: should be removed once we switch to multi-phase."
]
},
{
"name": "SnapshotNominators",
"modifier": "Optional",
"type": {
"plain": "Vec<AccountId>"
},
"fallback": "0x00",
"documentation": [
" Snapshot of nominators at the beginning of the current election window. This should only",
" have a value when [`EraElectionStatus`] == `ElectionStatus::Open(_)`.",
"",
" TWO_PHASE_NOTE: should be removed once we switch to multi-phase."
]
},
{
"name": "QueuedElected",
"modifier": "Optional",
"type": {
"plain": "ElectionResult"
},
"fallback": "0x00",
"documentation": [
" The next validator set. At the end of an era, if this is available (potentially from the",
" result of an offchain worker), it is immediately used. Otherwise, the on-chain election",
" is executed.",
"",
" TWO_PHASE_NOTE: should be removed once we switch to multi-phase."
]
},
{
"name": "QueuedScore",
"modifier": "Optional",
"type": {
"plain": "ElectionScore"
},
"fallback": "0x00",
"documentation": [
" The score of the current [`QueuedElected`].",
"",
" TWO_PHASE_NOTE: should be removed once we switch to multi-phase."
]
},
{
"name": "EraElectionStatus",
"modifier": "Default",
"type": {
"plain": "ElectionStatus"
},
"fallback": "0x00",
"documentation": [
" Flag to control the execution of the offchain election. When `Open(_)`, we accept",
" solutions to be submitted.",
"",
" TWO_PHASE_NOTE: should be removed once we switch to multi-phase."
]
},
{
"name": "IsCurrentSessionFinal",
"modifier": "Default",
"type": {
"plain": "bool"
},
"fallback": "0x00",
"documentation": [
" True if the current **planned** session is final. Note that this does not take era",
" forcing into account.",
"",
" TWO_PHASE_NOTE: should be removed once we switch to multi-phase."
]
},
{
"name": "StorageVersion",
"modifier": "Default",
"type": {
"plain": "Releases"
},
"fallback": "0x04",
"fallback": "0x05",
"documentation": [
" True if network has been upgraded to this version.",
" Storage version of the pallet.",
"",
" This is set to v5.0.0 for new networks."
" This is set to v6.0.0 for new networks."
]
}
]
@@ -3163,118 +3127,6 @@
" # </weight>"
]
},
{
"name": "submit_election_solution",
"args": [
{
"name": "winners",
"type": "Vec<ValidatorIndex>"
},
{
"name": "compact",
"type": "CompactAssignments"
},
{
"name": "score",
"type": "ElectionScore"
},
{
"name": "era",
"type": "EraIndex"
},
{
"name": "size",
"type": "ElectionSize"
}
],
"documentation": [
" Submit an election result to the chain. If the solution:",
"",
" 1. is valid.",
" 2. has a better score than a potentially existing solution on chain.",
"",
" then, it will be _put_ on chain.",
"",
" A solution consists of two pieces of data:",
"",
" 1. `winners`: a flat vector of all the winners of the round.",
" 2. `assignments`: the compact version of an assignment vector that encodes the edge",
" weights.",
"",
" Both of which may be computed using _phragmen_, or any other algorithm.",
"",
" Additionally, the submitter must provide:",
"",
" - The `score` that they claim their solution has.",
"",
" Both validators and nominators will be represented by indices in the solution. The",
" indices should respect the corresponding types ([`ValidatorIndex`] and",
" [`NominatorIndex`]). Moreover, they should be valid when used to index into",
" [`SnapshotValidators`] and [`SnapshotNominators`]. Any invalid index will cause the",
" solution to be rejected. These two storage items are set during the election window and",
" may be used to determine the indices.",
"",
" A solution is valid if:",
"",
" 0. It is submitted when [`EraElectionStatus`] is `Open`.",
" 1. Its claimed score is equal to the score computed on-chain.",
" 2. Presents the correct number of winners.",
" 3. All indexes must be value according to the snapshot vectors. All edge values must",
" also be correct and should not overflow the granularity of the ratio type (i.e. 256",
" or billion).",
" 4. For each edge, all targets are actually nominated by the voter.",
" 5. Has correct self-votes.",
"",
" A solutions score is consisted of 3 parameters:",
"",
" 1. `min { support.total }` for each support of a winner. This value should be maximized.",
" 2. `sum { support.total }` for each support of a winner. This value should be minimized.",
" 3. `sum { support.total^2 }` for each support of a winner. This value should be",
" minimized (to ensure less variance)",
"",
" # <weight>",
" The transaction is assumed to be the longest path, a better solution.",
" - Initial solution is almost the same.",
" - Worse solution is retraced in pre-dispatch-checks which sets its own weight.",
" # </weight>"
]
},
{
"name": "submit_election_solution_unsigned",
"args": [
{
"name": "winners",
"type": "Vec<ValidatorIndex>"
},
{
"name": "compact",
"type": "CompactAssignments"
},
{
"name": "score",
"type": "ElectionScore"
},
{
"name": "era",
"type": "EraIndex"
},
{
"name": "size",
"type": "ElectionSize"
}
],
"documentation": [
" Unsigned version of `submit_election_solution`.",
"",
" Note that this must pass the [`ValidateUnsigned`] check which only allows transactions",
" from the local node to be included. In other words, only the block author can include a",
" transaction in the block.",
"",
" # <weight>",
" See [`submit_election_solution`].",
" # </weight>"
]
},
{
"name": "kick",
"args": [
@@ -3347,20 +3199,9 @@
},
{
"name": "StakingElection",
"args": [
"ElectionCompute"
],
"args": [],
"documentation": [
" A new set of stakers was elected with the given \\[compute\\]."
]
},
{
"name": "SolutionStored",
"args": [
"ElectionCompute"
],
"documentation": [
" A new solution for the upcoming election has been stored. \\[compute\\]"
" A new set of stakers was elected."
]
},
{
@@ -3437,38 +3278,6 @@
" intervention."
]
},
{
"name": "ElectionLookahead",
"type": "BlockNumber",
"value": "0x05000000",
"documentation": [
" The number of blocks before the end of the era from which election submissions are allowed.",
"",
" Setting this to zero will disable the offchain compute and only on-chain seq-phragmen will",
" be used.",
"",
" This is bounded by being within the last session. Hence, setting it to a value more than the",
" length of a session will be pointless."
]
},
{
"name": "MaxIterations",
"type": "u32",
"value": "0x0a000000",
"documentation": [
" Maximum number of balancing iterations to run in the offchain submission.",
"",
" If set to 0, balance_solution will not be executed at all."
]
},
{
"name": "MinSolutionScoreBump",
"type": "Perbill",
"value": "0x20a10700",
"documentation": [
" The threshold of improvement that should be provided for a new solution to be accepted."
]
},
{
"name": "MaxNominatorRewardedPerValidator",
"type": "u32",
@@ -3479,6 +3288,14 @@
" For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can claim",
" their reward. This used to limit the i/o cost for the nominator payout."
]
},
{
"name": "MaxNominations",
"type": "u32",
"value": "0x10000000",
"documentation": [
" Maximum number of nominations per nominator."
]
}
],
"errors": [
@@ -3572,93 +3389,6 @@
" Rewards for this era have already been claimed for this validator."
]
},
{
"name": "OffchainElectionEarlySubmission",
"documentation": [
" The submitted result is received out of the open window."
]
},
{
"name": "OffchainElectionWeakSubmission",
"documentation": [
" The submitted result is not as good as the one stored on chain."
]
},
{
"name": "SnapshotUnavailable",
"documentation": [
" The snapshot data of the current window is missing."
]
},
{
"name": "OffchainElectionBogusWinnerCount",
"documentation": [
" Incorrect number of winners were presented."
]
},
{
"name": "OffchainElectionBogusWinner",
"documentation": [
" One of the submitted winners is not an active candidate on chain (index is out of range",
" in snapshot)."
]
},
{
"name": "OffchainElectionBogusCompact",
"documentation": [
" Error while building the assignment type from the compact. This can happen if an index",
" is invalid, or if the weights _overflow_."
]
},
{
"name": "OffchainElectionBogusNominator",
"documentation": [
" One of the submitted nominators is not an active nominator on chain."
]
},
{
"name": "OffchainElectionBogusNomination",
"documentation": [
" One of the submitted nominators has an edge to which they have not voted on chain."
]
},
{
"name": "OffchainElectionSlashedNomination",
"documentation": [
" One of the submitted nominators has an edge which is submitted before the last non-zero",
" slash of the target."
]
},
{
"name": "OffchainElectionBogusSelfVote",
"documentation": [
" A self vote must only be originated from a validator to ONLY themselves."
]
},
{
"name": "OffchainElectionBogusEdge",
"documentation": [
" The submitted result has unknown edges that are not among the presented winners."
]
},
{
"name": "OffchainElectionBogusScore",
"documentation": [
" The claimed score does not match with the one computed from the data."
]
},
{
"name": "OffchainElectionBogusElectionSize",
"documentation": [
" The election size is invalid."
]
},
{
"name": "CallNotAllowed",
"documentation": [
" The call is not allowed at the given time due to restrictions of election period."
]
},
{
"name": "IncorrectHistoryDepth",
"documentation": [
@@ -6400,7 +6130,7 @@
"documentation": []
},
{
"name": "ModuleId",
"name": "PalletId",
"type": "LockIdentifier",
"value": "0x706872656c656374",
"documentation": []
@@ -6692,7 +6422,20 @@
}
],
"constants": [],
"errors": [],
"errors": [
{
"name": "AlreadyMember",
"documentation": [
" Already a member."
]
},
{
"name": "NotMember",
"documentation": [
" Not a member."
]
}
],
"index": 15
},
{
@@ -7134,8 +6877,8 @@
]
},
{
"name": "ModuleId",
"type": "ModuleId",
"name": "PalletId",
"type": "PalletId",
"value": "0x70792f7472737279",
"documentation": [
" The treasury's module id, used for deriving its sovereign account ID."
@@ -7335,7 +7078,7 @@
" * `gas_limit`: The gas limit enforced when executing the constructor.",
" * `code`: The contract code to deploy in raw bytes.",
" * `data`: The input data to pass to the contract constructor.",
" * `salt`: Used for the address derivation. See [`Self::contract_address`].",
" * `salt`: Used for the address derivation. See [`Pallet::contract_address`].",
"",
" Instantiation is executed as follows:",
"",
@@ -9878,12 +9621,20 @@
]
},
{
"name": "ModuleId",
"type": "ModuleId",
"name": "PalletId",
"type": "PalletId",
"value": "0x70792f736f636965",
"documentation": [
" The societies's module id"
]
},
{
"name": "MaxCandidateIntake",
"type": "u32",
"value": "0x0a000000",
"documentation": [
" Maximum candidate intake per round."
]
}
],
"errors": [
@@ -10583,7 +10334,7 @@
" Unlock any vested funds of the sender account.",
"",
" The dispatch origin for this call must be _Signed_ and the sender must have funds still",
" locked under this module.",
" locked under this pallet.",
"",
" Emits either `VestingCompleted` or `VestingUpdated`.",
"",
@@ -10609,7 +10360,7 @@
" The dispatch origin for this call must be _Signed_.",
"",
" - `target`: The account whose vested funds should be unlocked. Must have funds still",
" locked under this module.",
" locked under this pallet.",
"",
" Emits either `VestingCompleted` or `VestingUpdated`.",
"",
@@ -10718,7 +10469,7 @@
"type": "BalanceOf",
"value": "0x0000c16ff28623000000000000000000",
"documentation": [
" The minimum amount to be transferred to create a new vesting schedule."
" The minimum amount transferred to call `vested_transfer`."
]
}
],
@@ -11397,7 +11148,7 @@
}
],
"documentation": [
" Dispatch the given `call` from an account that the sender is authorised for through",
" Dispatch the given `call` from an account that the sender is authorized for through",
" `add_proxy`.",
"",
" Removes any corresponding announcement(s).",
@@ -11458,7 +11209,10 @@
"type": "BalanceOf",
"value": "0x00f09e544c3900000000000000000000",
"documentation": [
" The base amount of currency needed to reserve for creating a proxy."
" The base amount of currency needed to reserve for creating a proxy.",
"",
" This is held for an additional storage item whose value size is",
" `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes."
]
},
{
@@ -11466,7 +11220,11 @@
"type": "BalanceOf",
"value": "0x0060aa7714b400000000000000000000",
"documentation": [
" The amount of currency needed per proxy added."
" The amount of currency needed per proxy added.",
"",
" This is held for adding 32 bytes plus an instance of `ProxyType` more into a pre-existing",
" storage value. Thus, when configuring `ProxyDepositFactor` one should take into account",
" `32 + proxy_type.encode().len()` bytes of data."
]
},
{
@@ -11482,7 +11240,7 @@
"type": "u32",
"value": "0x20000000",
"documentation": [
" `MaxPending` metadata shadow."
" The maximum amount of time-delayed announcements that are allowed to be pending."
]
},
{
@@ -11490,7 +11248,9 @@
"type": "BalanceOf",
"value": "0x00f09e544c3900000000000000000000",
"documentation": [
" `AnnouncementDepositBase` metadata shadow."
" The base amount of currency needed to reserve for creating an announcement.",
"",
" This is held when a new storage item holding a `Balance` is created (typically 16 bytes)."
]
},
{
@@ -11498,7 +11258,10 @@
"type": "BalanceOf",
"value": "0x00c054ef286801000000000000000000",
"documentation": [
" `AnnouncementDepositFactor` metadata shadow."
" The amount of currency needed per announcement made.",
"",
" This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes)",
" into a pre-existing storage value."
]
}
],
@@ -12911,8 +12674,7 @@
"",
" The origin must be Signed and the sender must have sufficient funds free.",
"",
" Funds of sender are reserved according to the formula:",
" `AssetDepositBase + AssetDepositPerZombie * max_zombies`.",
" Funds of sender are reserved by `AssetDeposit`.",
"",
" Parameters:",
" - `id`: The identifier of the new asset. This must not be currently in use to identify",
@@ -14199,8 +13961,8 @@
],
"constants": [
{
"name": "ModuleId",
"type": "ModuleId",
"name": "PalletId",
"type": "PalletId",
"value": "0x70792f6c6f74746f",
"documentation": []
},
@@ -14211,7 +13973,56 @@
"documentation": []
}
],
"errors": [],
"errors": [
{
"name": "Overflow",
"documentation": [
" An overflow has occurred."
]
},
{
"name": "NotConfigured",
"documentation": [
" A lottery has not been configured."
]
},
{
"name": "InProgress",
"documentation": [
" A lottery is already in progress."
]
},
{
"name": "AlreadyEnded",
"documentation": [
" A lottery has already ended."
]
},
{
"name": "InvalidCall",
"documentation": [
" The call is not valid for an open lottery."
]
},
{
"name": "AlreadyParticipating",
"documentation": [
" You are already participating in the lottery with this call."
]
},
{
"name": "TooManyCalls",
"documentation": [
" Too many calls for a single lottery."
]
},
{
"name": "EncodingFailed",
"documentation": [
" Failed to encode calls"
]
}
],
"index": 36
},
{
File diff suppressed because one or more lines are too long
+8 -8
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/rpc-core",
"version": "4.1.1",
"version": "4.5.1",
"type": "module",
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
"main": "index.js",
@@ -16,14 +16,14 @@
"bugs": "https://github.com/polkadot-js/api/issues",
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
"dependencies": {
"@babel/runtime": "^7.13.9",
"@polkadot/metadata": "4.1.1",
"@polkadot/rpc-provider": "4.1.1",
"@polkadot/types": "4.1.1",
"@polkadot/util": "^6.0.5",
"@polkadot/x-rxjs": "^6.0.5"
"@babel/runtime": "^7.13.10",
"@polkadot/metadata": "4.5.1",
"@polkadot/rpc-provider": "4.5.1",
"@polkadot/types": "4.5.1",
"@polkadot/util": "^6.1.1",
"@polkadot/x-rxjs": "^6.1.1"
},
"devDependencies": {
"@polkadot/keyring": "^6.0.5"
"@polkadot/keyring": "^6.1.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/rpc-core', version: '4.1.1' };
export const packageInfo = { name: '@polkadot/rpc-core', version: '4.5.1' };
+11 -11
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/rpc-provider",
"version": "4.1.1",
"version": "4.5.1",
"type": "module",
"description": "Transport providers for the API",
"main": "index.js",
@@ -16,20 +16,20 @@
"bugs": "https://github.com/polkadot-js/api/issues",
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
"dependencies": {
"@babel/runtime": "^7.13.9",
"@polkadot/types": "4.1.1",
"@polkadot/util": "^6.0.5",
"@polkadot/util-crypto": "^6.0.5",
"@polkadot/x-fetch": "^6.0.5",
"@polkadot/x-global": "^6.0.5",
"@polkadot/x-ws": "^6.0.5",
"@babel/runtime": "^7.13.10",
"@polkadot/types": "4.5.1",
"@polkadot/util": "^6.1.1",
"@polkadot/util-crypto": "^6.1.1",
"@polkadot/x-fetch": "^6.1.1",
"@polkadot/x-global": "^6.1.1",
"@polkadot/x-ws": "^6.1.1",
"bn.js": "^4.11.9",
"eventemitter3": "^4.0.7"
},
"devDependencies": {
"@polkadot/keyring": "^6.0.5",
"@polkadot/metadata": "4.1.1",
"@polkadot/keyring": "^6.1.1",
"@polkadot/metadata": "4.5.1",
"mock-socket": "^9.0.3",
"nock": "^13.0.10"
"nock": "^13.0.11"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/rpc-provider', version: '4.1.1' };
export const packageInfo = { name: '@polkadot/rpc-provider', version: '4.5.1' };
+10 -10
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/typegen",
"version": "4.1.1",
"version": "4.5.1",
"type": "module",
"description": "Type generation scripts",
"main": "index.js",
@@ -23,20 +23,20 @@
"bugs": "https://github.com/polkadot-js/api/issues",
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/typegen#readme",
"dependencies": {
"@babel/core": "^7.13.8",
"@babel/register": "^7.13.8",
"@babel/runtime": "^7.13.9",
"@polkadot/api": "4.1.1",
"@polkadot/metadata": "4.1.1",
"@polkadot/rpc-provider": "4.1.1",
"@polkadot/types": "4.1.1",
"@polkadot/util": "^6.0.5",
"@babel/core": "^7.13.15",
"@babel/register": "^7.13.14",
"@babel/runtime": "^7.13.10",
"@polkadot/api": "4.5.1",
"@polkadot/metadata": "4.5.1",
"@polkadot/rpc-provider": "4.5.1",
"@polkadot/types": "4.5.1",
"@polkadot/util": "^6.1.1",
"handlebars": "^4.7.7",
"websocket": "^1.0.33",
"yargs": "^16.2.0"
},
"devDependencies": {
"@types/websocket": "^1.0.2",
"@types/yargs": "^16.0.0"
"@types/yargs": "^16.0.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/typegen', version: '4.1.1' };
export const packageInfo = { name: '@polkadot/typegen', version: '4.5.1' };
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/types-known",
"version": "4.1.1",
"version": "4.5.1",
"type": "module",
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
"main": "index.js",
@@ -16,10 +16,10 @@
"bugs": "https://github.com/polkadot-js/api/issues",
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-known#readme",
"dependencies": {
"@babel/runtime": "^7.13.9",
"@polkadot/networks": "^6.0.5",
"@polkadot/types": "4.1.1",
"@polkadot/util": "^6.0.5",
"@babel/runtime": "^7.13.10",
"@polkadot/networks": "^6.1.1",
"@polkadot/types": "4.5.1",
"@polkadot/util": "^6.1.1",
"bn.js": "^4.11.9"
},
"devDependencies": {
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/types-known', version: '4.1.1' };
export const packageInfo = { name: '@polkadot/types-known', version: '4.5.1' };
+9 -2
View File
@@ -8,7 +8,7 @@ import type { OverrideVersionedType } from '@polkadot/types/types';
const sharedTypes = {
AccountInfo: 'AccountInfoWithDualRefCount',
Address: 'MultiAddress',
Keys: 'SessionKeys6',
Keys: 'SessionKeys7B',
LookupSource: 'MultiAddress',
ProxyType: {
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'IdentityJudgement', 'CancelProxy']
@@ -165,7 +165,14 @@ const versioned: OverrideVersionedType[] = [
}
},
{
minmax: [2028, undefined],
minmax: [2028, 2029],
types: {
...sharedTypes,
Keys: 'SessionKeys6'
}
},
{
minmax: [2030, undefined],
types: {
...sharedTypes
}
+9 -2
View File
@@ -8,7 +8,7 @@ import type { OverrideVersionedType } from '@polkadot/types/types';
const sharedTypes = {
AccountInfo: 'AccountInfoWithDualRefCount',
Address: 'MultiAddress',
Keys: 'SessionKeys6',
Keys: 'SessionKeys7B',
LookupSource: 'MultiAddress',
ProxyType: {
_enum: {
@@ -69,7 +69,14 @@ const versioned: OverrideVersionedType[] = [
}
},
{
minmax: [28, undefined],
minmax: [28, 29],
types: {
...sharedTypes,
Keys: 'SessionKeys6'
}
},
{
minmax: [30, undefined],
types: {
...sharedTypes
}
+17 -5
View File
@@ -9,11 +9,8 @@ import type { OverrideVersionedType } from '@polkadot/types/types';
/* eslint-disable sort-keys */
const sharedTypes = {
AccountInfo: 'AccountInfoWithDualRefCount',
Address: 'MultiAddress',
FullIdentification: '()', // No staking, only session (as per config)
LookupSource: 'MultiAddress',
Keys: 'SessionKeys6'
Keys: 'SessionKeys7B'
};
const versioned: OverrideVersionedType[] = [
@@ -21,12 +18,27 @@ const versioned: OverrideVersionedType[] = [
minmax: [0, 200],
types: {
...sharedTypes,
AccountInfo: 'AccountInfoWithDualRefCount',
Address: 'AccountId',
LookupSource: 'AccountId'
}
},
{
minmax: [201, undefined],
minmax: [201, 214],
types: {
...sharedTypes,
AccountInfo: 'AccountInfoWithDualRefCount'
}
},
{
minmax: [215, 228],
types: {
...sharedTypes,
Keys: 'SessionKeys6'
}
},
{
minmax: [229, undefined],
types: {
...sharedTypes
}
+20 -9
View File
@@ -6,15 +6,10 @@
import type { OverrideVersionedType } from '@polkadot/types/types';
const sharedTypes = {
AccountInfo: 'AccountInfoWithDualRefCount',
Address: 'MultiAddress',
Keys: 'SessionKeys6',
LookupSource: 'MultiAddress',
Keys: 'SessionKeys7B',
ProxyType: {
_enum: ['Any', 'NonTransfer', 'Staking', 'SudoBalances', 'IdentityJudgement', 'CancelProxy'
]
},
ValidatorPrefs: 'ValidatorPrefsWithBlocked'
_enum: ['Any', 'NonTransfer', 'Staking', 'SudoBalances', 'IdentityJudgement', 'CancelProxy']
}
};
const addrAccountIdTypes = {
@@ -73,7 +68,23 @@ const versioned: OverrideVersionedType[] = [
}
},
{
minmax: [48, undefined],
minmax: [48, 49],
types: {
...sharedTypes,
AccountInfo: 'AccountInfoWithDualRefCount',
Keys: 'SessionKeys6'
}
},
{
// 50 was supposed to have Beefy, didn't
minmax: [50, 50],
types: {
...sharedTypes,
Keys: 'SessionKeys6'
}
},
{
minmax: [51, undefined],
types: {
...sharedTypes
}
@@ -8,7 +8,7 @@ const upgrades: ChainUpgradesRaw = [
[244358, 8], [303079, 9], [314201, 10], [342400, 11], [443963, 12],
[528470, 13], [687751, 14], [746085, 15], [787923, 16], [799302, 17],
[1205128, 18], [1603423, 23], [1733218, 24], [2005673, 25], [2436698, 26],
[3613564, 27], [3899547, 28]
[3613564, 27], [3899547, 28], [4345767, 29]
];
export default upgrades;
+2 -1
View File
@@ -8,7 +8,8 @@ const upgrades: ChainUpgradesRaw = [
[879238, 25], [889472, 26], [902937, 27], [932751, 28], [991142, 29],
[1030162, 31], [1119657, 32], [1199282, 33], [1342534, 34], [1392263, 35],
[1431703, 36], [1433369, 37], [1490972, 41], [2087397, 43], [2316688, 44],
[2549864, 45], [3925782, 46], [3925843, 47], [4207800, 48], [4627944, 49]
[2549864, 45], [3925782, 46], [3925843, 47], [4207800, 48], [4627944, 49],
[5124076, 50]
];
export default upgrades;
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/types",
"version": "4.1.1",
"version": "4.5.1",
"type": "module",
"description": "Implementation of the Parity codec",
"main": "index.js",
@@ -16,15 +16,15 @@
"bugs": "https://github.com/polkadot-js/api/issues",
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
"dependencies": {
"@babel/runtime": "^7.13.9",
"@polkadot/metadata": "4.1.1",
"@polkadot/util": "^6.0.5",
"@polkadot/util-crypto": "^6.0.5",
"@polkadot/x-rxjs": "^6.0.5",
"@babel/runtime": "^7.13.10",
"@polkadot/metadata": "4.5.1",
"@polkadot/util": "^6.1.1",
"@polkadot/util-crypto": "^6.1.1",
"@polkadot/x-rxjs": "^6.1.1",
"@types/bn.js": "^4.11.6",
"bn.js": "^4.11.9"
},
"devDependencies": {
"@polkadot/keyring": "^6.0.5"
"@polkadot/keyring": "^6.1.1"
}
}
+74 -3
View File
@@ -9,6 +9,7 @@ import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interface
import type { UncleEntryItem } from '@polkadot/types/interfaces/authorship';
import type { AllowedSlots, BabeAuthorityWeight, BabeBlockWeight, BabeEpochConfiguration, BabeEquivocationProof, BabeWeight, EpochAuthorship, MaybeRandomness, MaybeVrf, NextConfigDescriptor, NextConfigDescriptorV1, Randomness, RawBabePreDigest, RawBabePreDigestCompat, RawBabePreDigestPrimary, RawBabePreDigestPrimaryTo159, RawBabePreDigestSecondaryPlain, RawBabePreDigestSecondaryTo159, RawBabePreDigestSecondaryVRF, RawBabePreDigestTo159, SlotNumber, VrfData, VrfOutput, VrfProof } from '@polkadot/types/interfaces/babe';
import type { AccountData, BalanceLock, BalanceLockTo212, BalanceStatus, Reasons, VestingSchedule, WithdrawReasons } from '@polkadot/types/interfaces/balances';
import type { BeefyNextAuthoritySet, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
import type { BlockHash } from '@polkadot/types/interfaces/chain';
import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
import type { EthereumAddress, StatementKind } from '@polkadot/types/interfaces/claims';
@@ -33,17 +34,17 @@ import type { DoubleMapTypeLatest, DoubleMapTypeV10, DoubleMapTypeV11, DoubleMap
import type { MmrLeafProof } from '@polkadot/types/interfaces/mmr';
import type { StorageKind } from '@polkadot/types/interfaces/offchain';
import type { DeferredOffenceOf, Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AbstractFungible, AbstractNonFungible, AccountId32Junction, AccountIndex64Junction, AccountKey20Junction, AssetInstance, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Balances, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, ConcreteFungible, ConcreteNonFungible, CoreAssignment, CoreIndex, CoreOccupied, DepositAsset, DepositReserveAsset, DoubleVoteReport, DownwardMessage, ExchangeAsset, GlobalValidationSchedule, GroupIndex, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InitiateReserveWithdraw, InitiateTeleport, Junction, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiAsset, MultiLocation, NetworkId, NewBidder, Order, OriginKind, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, QueryHolding, QueuedParathread, RegisteredParachainInfo, RelayChainBlockNumber, RelayChainHash, RelayTo, RelayedFrom, Remark, ReserveAssetDeposit, Retriable, Scheduling, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, Statement, SubId, SystemInherentData, TeleportAsset, Transact, TransientValidationData, UpwardMessage, ValidationCode, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, VersionedMultiAsset, VersionedMultiLocation, VersionedXcm, WinnersData, WinnersDataTuple, WinningData, WinningDataEntry, WithdrawAsset, Xcm, XcmError, XcmResult } from '@polkadot/types/interfaces/parachains';
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AbstractFungible, AbstractNonFungible, AccountId32Junction, AccountIndex64Junction, AccountKey20Junction, AssetInstance, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Balances, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, ConcreteFungible, ConcreteNonFungible, CoreAssignment, CoreIndex, CoreOccupied, DepositAsset, DepositReserveAsset, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExchangeAsset, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InitiateReserveWithdraw, InitiateTeleport, InvalidDisputeStatementKind, Junction, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiAsset, MultiDisputeStatementSet, MultiLocation, NetworkId, NewBidder, Order, OriginKind, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, QueryHolding, QueuedParathread, RegisteredParachainInfo, RelayChainBlockNumber, RelayChainHash, RelayTo, RelayedFrom, Remark, ReserveAssetDeposit, Retriable, Scheduling, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, Statement, SubId, SystemInherentData, TeleportAsset, Transact, TransientValidationData, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, VersionedMultiAsset, VersionedMultiLocation, VersionedXcm, WinnersData, WinnersDataTuple, WinningData, WinningDataEntry, WithdrawAsset, Xcm, XcmError, XcmResult } from '@polkadot/types/interfaces/parachains';
import type { FeeDetails, InclusionFee, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
import type { Approvals } from '@polkadot/types/interfaces/poll';
import type { ProxyAnnouncement, ProxyDefinition, ProxyType } from '@polkadot/types/interfaces/proxy';
import type { AccountStatus, AccountValidity } from '@polkadot/types/interfaces/purchase';
import type { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
import type { RpcMethods } from '@polkadot/types/interfaces/rpc';
import type { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, CallHash, CallHashOf, ChangesTrieConfiguration, CodecHash, Consensus, ConsensusEngineId, Digest, DigestItem, ExtrinsicsWeight, Fixed128, Fixed64, FixedI128, FixedI64, FixedU128, FixedU64, H1024, H128, H160, H2048, H256, H512, H64, Hash, Header, I32F32, Index, IndicesLookupSource, Justification, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, MultiAddress, MultiSigner, OpaqueCall, Origin, OriginCaller, PalletVersion, PalletsOrigin, Pays, PerU16, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Releases, RuntimeDbWeight, Seal, SealV0, SignedBlock, Slot, StorageData, StorageProof, TransactionPriority, U32F32, ValidatorId, ValidatorIdOf, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
import type { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, CallHash, CallHashOf, ChangesTrieConfiguration, CodecHash, Consensus, ConsensusEngineId, Digest, DigestItem, EncodedJustification, ExtrinsicsWeight, Fixed128, Fixed64, FixedI128, FixedI64, FixedU128, FixedU64, H1024, H128, H160, H2048, H256, H512, H64, Hash, Header, I32F32, Index, IndicesLookupSource, Justification, Justifications, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, MultiAddress, MultiSigner, OpaqueCall, Origin, OriginCaller, PalletId, PalletVersion, PalletsOrigin, Pays, PerU16, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Releases, RuntimeDbWeight, Seal, SealV0, SignedBlock, SignedBlockWithJustification, SignedBlockWithJustifications, Slot, StorageData, StorageProof, TransactionPriority, U32F32, ValidatorId, ValidatorIdOf, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
import type { SiField, SiLookupTypeId, SiPath, SiType, SiTypeDef, SiTypeDefArray, SiTypeDefComposite, SiTypeDefPrimitive, SiTypeDefSequence, SiTypeDefTuple, SiTypeDefVariant, SiVariant } from '@polkadot/types/interfaces/scaleInfo';
import type { Period, Priority, SchedulePeriod, SchedulePriority, Scheduled, ScheduledTo254, TaskAddress } from '@polkadot/types/interfaces/scheduler';
import type { FullIdentification, IdentificationTuple, Keys, MembershipProof, SessionIndex, SessionKeys1, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6, SessionKeys7, SessionKeys8, SessionKeys9, ValidatorCount } from '@polkadot/types/interfaces/session';
import type { BeefyKey, FullIdentification, IdentificationTuple, Keys, MembershipProof, SessionIndex, SessionKeys1, SessionKeys10, SessionKeys10B, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6, SessionKeys6B, SessionKeys7, SessionKeys7B, SessionKeys8, SessionKeys8B, SessionKeys9, SessionKeys9B, ValidatorCount } from '@polkadot/types/interfaces/session';
import type { Bid, BidKind, SocietyJudgement, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
import type { ActiveEraInfo, CompactAssignments, CompactAssignmentsTo257, CompactScore, CompactScoreCompact, ElectionCompute, ElectionPhase, ElectionResult, ElectionScore, ElectionSize, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, ExtendedBalance, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, NominatorIndex, NominatorIndexCompact, OffchainAccuracy, OffchainAccuracyCompact, PhragmenScore, Points, RawSolution, ReadySolution, RewardDestination, RewardPoint, RoundSnapshot, SeatHolder, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SolutionOrSnapshotSize, SolutionSupport, SolutionSupports, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, StakingLedgerTo240, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorIndexCompact, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196, ValidatorPrefsWithBlocked, ValidatorPrefsWithCommission, VoteWeight, Voter } from '@polkadot/types/interfaces/staking';
import type { ApiId, KeyValueOption, ReadProof, RuntimeVersion, RuntimeVersionApi, StorageChangeSet } from '@polkadot/types/interfaces/state';
@@ -139,6 +140,7 @@ declare module '@polkadot/types/types/registry' {
'Compact<USize>': Compact<USize>;
'Compact<ValidatorCount>': Compact<ValidatorCount>;
'Compact<ValidatorIndex>': Compact<ValidatorIndex>;
'Compact<ValidatorSetId>': Compact<ValidatorSetId>;
'Compact<VoteIndex>': Compact<VoteIndex>;
'Compact<VoteWeight>': Compact<VoteWeight>;
'Compact<Weight>': Compact<Weight>;
@@ -211,6 +213,8 @@ declare module '@polkadot/types/types/registry' {
'Option<BalanceOf>': Option<BalanceOf>;
'Option<Balances>': Option<Balances>;
'Option<BalanceStatus>': Option<BalanceStatus>;
'Option<BeefyKey>': Option<BeefyKey>;
'Option<BeefyNextAuthoritySet>': Option<BeefyNextAuthoritySet>;
'Option<Bid>': Option<Bid>;
'Option<Bidder>': Option<Bidder>;
'Option<BidKind>': Option<BidKind>;
@@ -319,6 +323,8 @@ declare module '@polkadot/types/types/registry' {
'Option<DispatchResult>': Option<DispatchResult>;
'Option<DispatchResultOf>': Option<DispatchResultOf>;
'Option<DispatchResultTo198>': Option<DispatchResultTo198>;
'Option<DisputeStatement>': Option<DisputeStatement>;
'Option<DisputeStatementSet>': Option<DisputeStatementSet>;
'Option<DoNotConstruct>': Option<DoNotConstruct>;
'Option<DoubleMapTypeLatest>': Option<DoubleMapTypeLatest>;
'Option<DoubleMapTypeV10>': Option<DoubleMapTypeV10>;
@@ -336,6 +342,7 @@ declare module '@polkadot/types/types/registry' {
'Option<ElectionSize>': Option<ElectionSize>;
'Option<ElectionStatus>': Option<ElectionStatus>;
'Option<EncodedFinalityProofs>': Option<EncodedFinalityProofs>;
'Option<EncodedJustification>': Option<EncodedJustification>;
'Option<EpochAuthorship>': Option<EpochAuthorship>;
'Option<EraIndex>': Option<EraIndex>;
'Option<EraPoints>': Option<EraPoints>;
@@ -395,6 +402,7 @@ declare module '@polkadot/types/types/registry' {
'Option<ExitReason>': Option<ExitReason>;
'Option<ExitRevert>': Option<ExitRevert>;
'Option<ExitSucceed>': Option<ExitSucceed>;
'Option<ExplicitDisputeStatement>': Option<ExplicitDisputeStatement>;
'Option<Exposure>': Option<Exposure>;
'Option<ExtendedBalance>': Option<ExtendedBalance>;
'Option<Extrinsic>': Option<Extrinsic>;
@@ -435,6 +443,7 @@ declare module '@polkadot/types/types/registry' {
'Option<FundInfo>': Option<FundInfo>;
'Option<Gas>': Option<Gas>;
'Option<GiltBid>': Option<GiltBid>;
'Option<GlobalValidationData>': Option<GlobalValidationData>;
'Option<GlobalValidationSchedule>': Option<GlobalValidationSchedule>;
'Option<GrandpaEquivocation>': Option<GrandpaEquivocation>;
'Option<GrandpaEquivocationProof>': Option<GrandpaEquivocationProof>;
@@ -494,11 +503,13 @@ declare module '@polkadot/types/types/registry' {
'Option<InitiateReserveWithdraw>': Option<InitiateReserveWithdraw>;
'Option<InitiateTeleport>': Option<InitiateTeleport>;
'Option<InstructionWeights>': Option<InstructionWeights>;
'Option<InvalidDisputeStatementKind>': Option<InvalidDisputeStatementKind>;
'Option<InvalidTransaction>': Option<InvalidTransaction>;
'Option<Json>': Option<Json>;
'Option<Junction>': Option<Junction>;
'Option<Justification>': Option<Justification>;
'Option<JustificationNotification>': Option<JustificationNotification>;
'Option<Justifications>': Option<Justifications>;
'Option<Key>': Option<Key>;
'Option<KeyOwnerProof>': Option<KeyOwnerProof>;
'Option<Keys>': Option<Keys>;
@@ -555,6 +566,7 @@ declare module '@polkadot/types/types/registry' {
'Option<MortalEra>': Option<MortalEra>;
'Option<MultiAddress>': Option<MultiAddress>;
'Option<MultiAsset>': Option<MultiAsset>;
'Option<MultiDisputeStatementSet>': Option<MultiDisputeStatementSet>;
'Option<MultiLocation>': Option<MultiLocation>;
'Option<Multiplier>': Option<Multiplier>;
'Option<Multisig>': Option<Multisig>;
@@ -593,11 +605,13 @@ declare module '@polkadot/types/types/registry' {
'Option<OriginKind>': Option<OriginKind>;
'Option<OutboundHrmpMessage>': Option<OutboundHrmpMessage>;
'Option<Owner>': Option<Owner>;
'Option<PalletId>': Option<PalletId>;
'Option<PalletsOrigin>': Option<PalletsOrigin>;
'Option<PalletVersion>': Option<PalletVersion>;
'Option<ParachainDispatchOrigin>': Option<ParachainDispatchOrigin>;
'Option<ParachainInherentData>': Option<ParachainInherentData>;
'Option<ParachainProposal>': Option<ParachainProposal>;
'Option<ParachainsInherentData>': Option<ParachainsInherentData>;
'Option<ParaGenesisArgs>': Option<ParaGenesisArgs>;
'Option<ParaId>': Option<ParaId>;
'Option<ParaInfo>': Option<ParaInfo>;
@@ -716,18 +730,25 @@ declare module '@polkadot/types/types/registry' {
'Option<SealV0>': Option<SealV0>;
'Option<SeatHolder>': Option<SeatHolder>;
'Option<SeedOf>': Option<SeedOf>;
'Option<ServiceQuality>': Option<ServiceQuality>;
'Option<SessionIndex>': Option<SessionIndex>;
'Option<SessionInfo>': Option<SessionInfo>;
'Option<SessionInfoValidatorGroup>': Option<SessionInfoValidatorGroup>;
'Option<SessionKeys1>': Option<SessionKeys1>;
'Option<SessionKeys10>': Option<SessionKeys10>;
'Option<SessionKeys10B>': Option<SessionKeys10B>;
'Option<SessionKeys2>': Option<SessionKeys2>;
'Option<SessionKeys3>': Option<SessionKeys3>;
'Option<SessionKeys4>': Option<SessionKeys4>;
'Option<SessionKeys5>': Option<SessionKeys5>;
'Option<SessionKeys6>': Option<SessionKeys6>;
'Option<SessionKeys6B>': Option<SessionKeys6B>;
'Option<SessionKeys7>': Option<SessionKeys7>;
'Option<SessionKeys7B>': Option<SessionKeys7B>;
'Option<SessionKeys8>': Option<SessionKeys8>;
'Option<SessionKeys8B>': Option<SessionKeys8B>;
'Option<SessionKeys9>': Option<SessionKeys9>;
'Option<SessionKeys9B>': Option<SessionKeys9B>;
'Option<SetId>': Option<SetId>;
'Option<SetIndex>': Option<SetIndex>;
'Option<SiField>': Option<SiField>;
@@ -735,6 +756,8 @@ declare module '@polkadot/types/types/registry' {
'Option<SignedAvailabilityBitfield>': Option<SignedAvailabilityBitfield>;
'Option<SignedAvailabilityBitfields>': Option<SignedAvailabilityBitfields>;
'Option<SignedBlock>': Option<SignedBlock>;
'Option<SignedBlockWithJustification>': Option<SignedBlockWithJustification>;
'Option<SignedBlockWithJustifications>': Option<SignedBlockWithJustifications>;
'Option<SignerPayload>': Option<SignerPayload>;
'Option<SigningContext>': Option<SigningContext>;
'Option<SiLookupTypeId>': Option<SiLookupTypeId>;
@@ -855,7 +878,9 @@ declare module '@polkadot/types/types/registry' {
'Option<ValidatorPrefsTo196>': Option<ValidatorPrefsTo196>;
'Option<ValidatorPrefsWithBlocked>': Option<ValidatorPrefsWithBlocked>;
'Option<ValidatorPrefsWithCommission>': Option<ValidatorPrefsWithCommission>;
'Option<ValidatorSetId>': Option<ValidatorSetId>;
'Option<ValidatorSignature>': Option<ValidatorSignature>;
'Option<ValidDisputeStatementKind>': Option<ValidDisputeStatementKind>;
'Option<ValidityAttestation>': Option<ValidityAttestation>;
'Option<VecInboundHrmpMessage>': Option<VecInboundHrmpMessage>;
'Option<VersionedMultiAsset>': Option<VersionedMultiAsset>;
@@ -961,6 +986,8 @@ declare module '@polkadot/types/types/registry' {
'Vec<BalanceOf>': Vec<BalanceOf>;
'Vec<Balances>': Vec<Balances>;
'Vec<BalanceStatus>': Vec<BalanceStatus>;
'Vec<BeefyKey>': Vec<BeefyKey>;
'Vec<BeefyNextAuthoritySet>': Vec<BeefyNextAuthoritySet>;
'Vec<Bid>': Vec<Bid>;
'Vec<Bidder>': Vec<Bidder>;
'Vec<BidKind>': Vec<BidKind>;
@@ -1069,6 +1096,8 @@ declare module '@polkadot/types/types/registry' {
'Vec<DispatchResult>': Vec<DispatchResult>;
'Vec<DispatchResultOf>': Vec<DispatchResultOf>;
'Vec<DispatchResultTo198>': Vec<DispatchResultTo198>;
'Vec<DisputeStatement>': Vec<DisputeStatement>;
'Vec<DisputeStatementSet>': Vec<DisputeStatementSet>;
'Vec<DoNotConstruct>': Vec<DoNotConstruct>;
'Vec<DoubleMapTypeLatest>': Vec<DoubleMapTypeLatest>;
'Vec<DoubleMapTypeV10>': Vec<DoubleMapTypeV10>;
@@ -1086,6 +1115,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<ElectionSize>': Vec<ElectionSize>;
'Vec<ElectionStatus>': Vec<ElectionStatus>;
'Vec<EncodedFinalityProofs>': Vec<EncodedFinalityProofs>;
'Vec<EncodedJustification>': Vec<EncodedJustification>;
'Vec<EpochAuthorship>': Vec<EpochAuthorship>;
'Vec<EraIndex>': Vec<EraIndex>;
'Vec<EraPoints>': Vec<EraPoints>;
@@ -1145,6 +1175,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<ExitReason>': Vec<ExitReason>;
'Vec<ExitRevert>': Vec<ExitRevert>;
'Vec<ExitSucceed>': Vec<ExitSucceed>;
'Vec<ExplicitDisputeStatement>': Vec<ExplicitDisputeStatement>;
'Vec<Exposure>': Vec<Exposure>;
'Vec<ExtendedBalance>': Vec<ExtendedBalance>;
'Vec<Extrinsic>': Vec<Extrinsic>;
@@ -1185,6 +1216,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<FundInfo>': Vec<FundInfo>;
'Vec<Gas>': Vec<Gas>;
'Vec<GiltBid>': Vec<GiltBid>;
'Vec<GlobalValidationData>': Vec<GlobalValidationData>;
'Vec<GlobalValidationSchedule>': Vec<GlobalValidationSchedule>;
'Vec<GrandpaEquivocation>': Vec<GrandpaEquivocation>;
'Vec<GrandpaEquivocationProof>': Vec<GrandpaEquivocationProof>;
@@ -1244,11 +1276,13 @@ declare module '@polkadot/types/types/registry' {
'Vec<InitiateReserveWithdraw>': Vec<InitiateReserveWithdraw>;
'Vec<InitiateTeleport>': Vec<InitiateTeleport>;
'Vec<InstructionWeights>': Vec<InstructionWeights>;
'Vec<InvalidDisputeStatementKind>': Vec<InvalidDisputeStatementKind>;
'Vec<InvalidTransaction>': Vec<InvalidTransaction>;
'Vec<Json>': Vec<Json>;
'Vec<Junction>': Vec<Junction>;
'Vec<Justification>': Vec<Justification>;
'Vec<JustificationNotification>': Vec<JustificationNotification>;
'Vec<Justifications>': Vec<Justifications>;
'Vec<Key>': Vec<Key>;
'Vec<KeyOwnerProof>': Vec<KeyOwnerProof>;
'Vec<Keys>': Vec<Keys>;
@@ -1305,6 +1339,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<MortalEra>': Vec<MortalEra>;
'Vec<MultiAddress>': Vec<MultiAddress>;
'Vec<MultiAsset>': Vec<MultiAsset>;
'Vec<MultiDisputeStatementSet>': Vec<MultiDisputeStatementSet>;
'Vec<MultiLocation>': Vec<MultiLocation>;
'Vec<Multiplier>': Vec<Multiplier>;
'Vec<Multisig>': Vec<Multisig>;
@@ -1343,11 +1378,13 @@ declare module '@polkadot/types/types/registry' {
'Vec<OriginKind>': Vec<OriginKind>;
'Vec<OutboundHrmpMessage>': Vec<OutboundHrmpMessage>;
'Vec<Owner>': Vec<Owner>;
'Vec<PalletId>': Vec<PalletId>;
'Vec<PalletsOrigin>': Vec<PalletsOrigin>;
'Vec<PalletVersion>': Vec<PalletVersion>;
'Vec<ParachainDispatchOrigin>': Vec<ParachainDispatchOrigin>;
'Vec<ParachainInherentData>': Vec<ParachainInherentData>;
'Vec<ParachainProposal>': Vec<ParachainProposal>;
'Vec<ParachainsInherentData>': Vec<ParachainsInherentData>;
'Vec<ParaGenesisArgs>': Vec<ParaGenesisArgs>;
'Vec<ParaId>': Vec<ParaId>;
'Vec<ParaInfo>': Vec<ParaInfo>;
@@ -1466,18 +1503,25 @@ declare module '@polkadot/types/types/registry' {
'Vec<SealV0>': Vec<SealV0>;
'Vec<SeatHolder>': Vec<SeatHolder>;
'Vec<SeedOf>': Vec<SeedOf>;
'Vec<ServiceQuality>': Vec<ServiceQuality>;
'Vec<SessionIndex>': Vec<SessionIndex>;
'Vec<SessionInfo>': Vec<SessionInfo>;
'Vec<SessionInfoValidatorGroup>': Vec<SessionInfoValidatorGroup>;
'Vec<SessionKeys1>': Vec<SessionKeys1>;
'Vec<SessionKeys10>': Vec<SessionKeys10>;
'Vec<SessionKeys10B>': Vec<SessionKeys10B>;
'Vec<SessionKeys2>': Vec<SessionKeys2>;
'Vec<SessionKeys3>': Vec<SessionKeys3>;
'Vec<SessionKeys4>': Vec<SessionKeys4>;
'Vec<SessionKeys5>': Vec<SessionKeys5>;
'Vec<SessionKeys6>': Vec<SessionKeys6>;
'Vec<SessionKeys6B>': Vec<SessionKeys6B>;
'Vec<SessionKeys7>': Vec<SessionKeys7>;
'Vec<SessionKeys7B>': Vec<SessionKeys7B>;
'Vec<SessionKeys8>': Vec<SessionKeys8>;
'Vec<SessionKeys8B>': Vec<SessionKeys8B>;
'Vec<SessionKeys9>': Vec<SessionKeys9>;
'Vec<SessionKeys9B>': Vec<SessionKeys9B>;
'Vec<SetId>': Vec<SetId>;
'Vec<SetIndex>': Vec<SetIndex>;
'Vec<SiField>': Vec<SiField>;
@@ -1485,6 +1529,8 @@ declare module '@polkadot/types/types/registry' {
'Vec<SignedAvailabilityBitfield>': Vec<SignedAvailabilityBitfield>;
'Vec<SignedAvailabilityBitfields>': Vec<SignedAvailabilityBitfields>;
'Vec<SignedBlock>': Vec<SignedBlock>;
'Vec<SignedBlockWithJustification>': Vec<SignedBlockWithJustification>;
'Vec<SignedBlockWithJustifications>': Vec<SignedBlockWithJustifications>;
'Vec<SignerPayload>': Vec<SignerPayload>;
'Vec<SigningContext>': Vec<SigningContext>;
'Vec<SiLookupTypeId>': Vec<SiLookupTypeId>;
@@ -1605,7 +1651,9 @@ declare module '@polkadot/types/types/registry' {
'Vec<ValidatorPrefsTo196>': Vec<ValidatorPrefsTo196>;
'Vec<ValidatorPrefsWithBlocked>': Vec<ValidatorPrefsWithBlocked>;
'Vec<ValidatorPrefsWithCommission>': Vec<ValidatorPrefsWithCommission>;
'Vec<ValidatorSetId>': Vec<ValidatorSetId>;
'Vec<ValidatorSignature>': Vec<ValidatorSignature>;
'Vec<ValidDisputeStatementKind>': Vec<ValidDisputeStatementKind>;
'Vec<ValidityAttestation>': Vec<ValidityAttestation>;
'Vec<VecInboundHrmpMessage>': Vec<VecInboundHrmpMessage>;
'Vec<VersionedMultiAsset>': Vec<VersionedMultiAsset>;
@@ -1711,6 +1759,8 @@ declare module '@polkadot/types/types/registry' {
BalanceOf: BalanceOf;
Balances: Balances;
BalanceStatus: BalanceStatus;
BeefyKey: BeefyKey;
BeefyNextAuthoritySet: BeefyNextAuthoritySet;
Bid: Bid;
Bidder: Bidder;
BidKind: BidKind;
@@ -1819,6 +1869,8 @@ declare module '@polkadot/types/types/registry' {
DispatchResult: DispatchResult;
DispatchResultOf: DispatchResultOf;
DispatchResultTo198: DispatchResultTo198;
DisputeStatement: DisputeStatement;
DisputeStatementSet: DisputeStatementSet;
DoNotConstruct: DoNotConstruct;
DoubleMapTypeLatest: DoubleMapTypeLatest;
DoubleMapTypeV10: DoubleMapTypeV10;
@@ -1836,6 +1888,7 @@ declare module '@polkadot/types/types/registry' {
ElectionSize: ElectionSize;
ElectionStatus: ElectionStatus;
EncodedFinalityProofs: EncodedFinalityProofs;
EncodedJustification: EncodedJustification;
EpochAuthorship: EpochAuthorship;
EraIndex: EraIndex;
EraPoints: EraPoints;
@@ -1895,6 +1948,7 @@ declare module '@polkadot/types/types/registry' {
ExitReason: ExitReason;
ExitRevert: ExitRevert;
ExitSucceed: ExitSucceed;
ExplicitDisputeStatement: ExplicitDisputeStatement;
Exposure: Exposure;
ExtendedBalance: ExtendedBalance;
Extrinsic: Extrinsic;
@@ -1935,6 +1989,7 @@ declare module '@polkadot/types/types/registry' {
FundInfo: FundInfo;
Gas: Gas;
GiltBid: GiltBid;
GlobalValidationData: GlobalValidationData;
GlobalValidationSchedule: GlobalValidationSchedule;
GrandpaEquivocation: GrandpaEquivocation;
GrandpaEquivocationProof: GrandpaEquivocationProof;
@@ -1994,11 +2049,13 @@ declare module '@polkadot/types/types/registry' {
InitiateReserveWithdraw: InitiateReserveWithdraw;
InitiateTeleport: InitiateTeleport;
InstructionWeights: InstructionWeights;
InvalidDisputeStatementKind: InvalidDisputeStatementKind;
InvalidTransaction: InvalidTransaction;
Json: Json;
Junction: Junction;
Justification: Justification;
JustificationNotification: JustificationNotification;
Justifications: Justifications;
Key: Key;
KeyOwnerProof: KeyOwnerProof;
Keys: Keys;
@@ -2055,6 +2112,7 @@ declare module '@polkadot/types/types/registry' {
MortalEra: MortalEra;
MultiAddress: MultiAddress;
MultiAsset: MultiAsset;
MultiDisputeStatementSet: MultiDisputeStatementSet;
MultiLocation: MultiLocation;
Multiplier: Multiplier;
Multisig: Multisig;
@@ -2093,11 +2151,13 @@ declare module '@polkadot/types/types/registry' {
OriginKind: OriginKind;
OutboundHrmpMessage: OutboundHrmpMessage;
Owner: Owner;
PalletId: PalletId;
PalletsOrigin: PalletsOrigin;
PalletVersion: PalletVersion;
ParachainDispatchOrigin: ParachainDispatchOrigin;
ParachainInherentData: ParachainInherentData;
ParachainProposal: ParachainProposal;
ParachainsInherentData: ParachainsInherentData;
ParaGenesisArgs: ParaGenesisArgs;
ParaId: ParaId;
ParaInfo: ParaInfo;
@@ -2216,18 +2276,25 @@ declare module '@polkadot/types/types/registry' {
SealV0: SealV0;
SeatHolder: SeatHolder;
SeedOf: SeedOf;
ServiceQuality: ServiceQuality;
SessionIndex: SessionIndex;
SessionInfo: SessionInfo;
SessionInfoValidatorGroup: SessionInfoValidatorGroup;
SessionKeys1: SessionKeys1;
SessionKeys10: SessionKeys10;
SessionKeys10B: SessionKeys10B;
SessionKeys2: SessionKeys2;
SessionKeys3: SessionKeys3;
SessionKeys4: SessionKeys4;
SessionKeys5: SessionKeys5;
SessionKeys6: SessionKeys6;
SessionKeys6B: SessionKeys6B;
SessionKeys7: SessionKeys7;
SessionKeys7B: SessionKeys7B;
SessionKeys8: SessionKeys8;
SessionKeys8B: SessionKeys8B;
SessionKeys9: SessionKeys9;
SessionKeys9B: SessionKeys9B;
SetId: SetId;
SetIndex: SetIndex;
SiField: SiField;
@@ -2235,6 +2302,8 @@ declare module '@polkadot/types/types/registry' {
SignedAvailabilityBitfield: SignedAvailabilityBitfield;
SignedAvailabilityBitfields: SignedAvailabilityBitfields;
SignedBlock: SignedBlock;
SignedBlockWithJustification: SignedBlockWithJustification;
SignedBlockWithJustifications: SignedBlockWithJustifications;
SignerPayload: SignerPayload;
SigningContext: SigningContext;
SiLookupTypeId: SiLookupTypeId;
@@ -2355,7 +2424,9 @@ declare module '@polkadot/types/types/registry' {
ValidatorPrefsTo196: ValidatorPrefsTo196;
ValidatorPrefsWithBlocked: ValidatorPrefsWithBlocked;
ValidatorPrefsWithCommission: ValidatorPrefsWithCommission;
ValidatorSetId: ValidatorSetId;
ValidatorSignature: ValidatorSignature;
ValidDisputeStatementKind: ValidDisputeStatementKind;
ValidityAttestation: ValidityAttestation;
VecInboundHrmpMessage: VecInboundHrmpMessage;
VersionedMultiAsset: VersionedMultiAsset;
@@ -0,0 +1,19 @@
// Copyright 2017-2021 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
// order important in structs... :)
/* eslint-disable sort-keys */
import type { Definitions } from '../../types';
export default {
rpc: {},
types: {
BeefyNextAuthoritySet: {
id: 'u64',
len: 'u32',
root: 'H256'
},
ValidatorSetId: 'u64'
}
} as Definitions;
@@ -0,0 +1,4 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
export * from './types';
@@ -0,0 +1,17 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import type { Struct, u32, u64 } from '@polkadot/types';
import type { H256 } from '@polkadot/types/interfaces/runtime';
/** @name BeefyNextAuthoritySet */
export interface BeefyNextAuthoritySet extends Struct {
readonly id: u64;
readonly len: u32;
readonly root: H256;
}
/** @name ValidatorSetId */
export interface ValidatorSetId extends u64 {}
export type PHANTOM_BEEFY = 'beefy';
@@ -18,7 +18,6 @@ export default {
}
},
FundInfo: {
retiring: 'bool',
depositor: 'AccountId',
verifier: 'Option<MultiSigner>',
deposit: 'Balance',
@@ -1,7 +1,7 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import type { Enum, Option, Struct, bool, u32 } from '@polkadot/types';
import type { Enum, Option, Struct, u32 } from '@polkadot/types';
import type { LeasePeriod } from '@polkadot/types/interfaces/parachains';
import type { AccountId, Balance, BlockNumber, MultiSigner } from '@polkadot/types/interfaces/runtime';
@@ -10,7 +10,6 @@ export interface FundIndex extends u32 {}
/** @name FundInfo */
export interface FundInfo extends Struct {
readonly retiring: bool;
readonly depositor: AccountId;
readonly verifier: Option<MultiSigner>;
readonly deposit: Balance;
@@ -42,6 +42,7 @@ export { default as vesting } from './vesting/definitions';
// polkadot-specific types
export { default as attestations } from './attestations/definitions';
export { default as beefy } from './beefy/definitions';
export { default as claims } from './claims/definitions';
export { default as crowdloan } from './crowdloan/definitions';
export { default as parachains } from './parachains/definitions';
@@ -24,11 +24,18 @@ const proposeTypes = {
}
};
const cumulusTypes = {
ServiceQuality: {
_enum: ['Ordered', 'Fast']
}
};
export default {
rpc: {},
types: {
...proposeTypes,
...cumulusTypes,
...hrmpTypes,
...proposeTypes,
...slotTypes,
AbridgedCandidateReceipt: {
parachainIndex: 'ParaId',
@@ -97,13 +104,14 @@ export default {
},
CandidateDescriptor: {
paraId: 'ParaId',
relayParent: 'Hash',
relayParent: 'RelayChainHash',
collatorId: 'CollatorId',
persistedValidationDataHash: 'Hash',
povHash: 'Hash',
erasureRoot: 'Hash',
signature: 'CollatorSignature',
paraHead: 'Hash'
paraHead: 'Hash',
validationCodeHash: 'Hash'
},
CandidateHash: 'Hash',
CandidatePendingAvailability: {
@@ -119,6 +127,11 @@ export default {
descriptor: 'CandidateDescriptor',
commitmentsHash: 'Hash'
},
GlobalValidationData: {
maxCodeSize: 'u32',
maxHeadDataSize: 'u32',
blockNumber: 'BlockNumber'
},
CollatorId: 'H256',
CollatorSignature: 'Signature',
CommittedCandidateReceipt: {
@@ -138,6 +151,36 @@ export default {
Parachain: 'Null'
}
},
DisputeStatementSet: {
candidateHash: 'CandidateHash',
session: 'SessionIndex',
statements: 'Vec<(DisputeStatement, ValidatorIndex, ValidatorSignature)>'
},
MultiDisputeStatementSet: 'Vec<DisputeStatementSet>',
DisputeStatement: {
_enum: {
Valid: 'ValidDisputeStatementKind',
Invalid: 'InvalidDisputeStatementKind'
}
},
ValidDisputeStatementKind: {
_enum: [
'Explicit',
'BackingSeconded',
'BackingValid',
'ApprovalChecking'
]
},
InvalidDisputeStatementKind: {
_enum: [
'Explicit'
]
},
ExplicitDisputeStatement: {
valid: 'bool',
candidateHash: 'CandidateHash',
session: 'SessionIndex'
},
DoubleVoteReport: {
identity: 'ValidatorId',
first: '(Statement, ValidatorSignature)',
@@ -224,6 +267,12 @@ export default {
downwardMessages: 'Vec<InboundDownwardMessage>',
horizontalMessages: 'BTreeMap<ParaId, VecInboundHrmpMessage>'
},
ParachainsInherentData: {
bitfields: 'SignedAvailabilityBitfields',
backedCandidates: 'Vec<BackedCandidate>',
disputes: 'MultiDisputeStatementSet',
parentHeader: 'Header'
},
ParaGenesisArgs: {
genesisHead: 'Bytes',
validationCode: 'Bytes',
@@ -231,7 +280,9 @@ export default {
},
ParaId: 'u32',
ParaInfo: {
scheduling: 'Scheduling'
manager: 'AccountId',
deposit: 'Balance',
locked: 'bool'
},
ParaLifecycle: {
_enum: ['Onboarding', 'Parathread', 'Parachain', 'UpgradingToParachain', 'DowngradingToParathread', 'OutgoingParathread', 'OutgoingParachain']
@@ -406,7 +457,11 @@ export default {
X1: 'Junction',
X2: '(Junction, Junction)',
X3: '(Junction, Junction, Junction)',
X4: '(Junction, Junction, Junction, Junction)'
X4: '(Junction, Junction, Junction, Junction)',
X5: '(Junction, Junction, Junction, Junction, Junction)',
X6: '(Junction, Junction, Junction, Junction, Junction, Junction)',
X7: '(Junction, Junction, Junction, Junction, Junction, Junction, Junction)',
X8: '(Junction, Junction, Junction, Junction, Junction, Junction, Junction, Junction)'
}
},
AccountId32Junction: {
@@ -4,8 +4,9 @@
import type { BTreeMap, BitVec, Bytes, Compact, Enum, Option, Struct, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types';
import type { ITuple } from '@polkadot/types/types';
import type { Signature } from '@polkadot/types/interfaces/extrinsics';
import type { AccountId, Balance, BalanceOf, BlockNumber, H256, Hash, StorageProof, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime';
import type { AccountId, Balance, BalanceOf, BlockNumber, H256, Hash, Header, StorageProof, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime';
import type { MembershipProof, SessionIndex } from '@polkadot/types/interfaces/session';
import type { ValidatorIndex } from '@polkadot/types/interfaces/staking';
/** @name AbridgedCandidateReceipt */
export interface AbridgedCandidateReceipt extends Struct {
@@ -170,13 +171,14 @@ export interface CandidateCommitments extends Struct {
/** @name CandidateDescriptor */
export interface CandidateDescriptor extends Struct {
readonly paraId: ParaId;
readonly relayParent: Hash;
readonly relayParent: RelayChainHash;
readonly collatorId: CollatorId;
readonly persistedValidationDataHash: Hash;
readonly povHash: Hash;
readonly erasureRoot: Hash;
readonly signature: CollatorSignature;
readonly paraHead: Hash;
readonly validationCodeHash: Hash;
}
/** @name CandidateHash */
@@ -254,6 +256,21 @@ export interface DepositReserveAsset extends Struct {
readonly effects: Vec<Order>;
}
/** @name DisputeStatement */
export interface DisputeStatement extends Enum {
readonly isValid: boolean;
readonly asValid: ValidDisputeStatementKind;
readonly isInvalid: boolean;
readonly asInvalid: InvalidDisputeStatementKind;
}
/** @name DisputeStatementSet */
export interface DisputeStatementSet extends Struct {
readonly candidateHash: CandidateHash;
readonly session: SessionIndex;
readonly statements: Vec<ITuple<[DisputeStatement, ValidatorIndex, ValidatorSignature]>>;
}
/** @name DoubleVoteReport */
export interface DoubleVoteReport extends Struct {
readonly identity: ValidatorId;
@@ -272,6 +289,20 @@ export interface ExchangeAsset extends Struct {
readonly receive: Vec<MultiAsset>;
}
/** @name ExplicitDisputeStatement */
export interface ExplicitDisputeStatement extends Struct {
readonly valid: bool;
readonly candidateHash: CandidateHash;
readonly session: SessionIndex;
}
/** @name GlobalValidationData */
export interface GlobalValidationData extends Struct {
readonly maxCodeSize: u32;
readonly maxHeadDataSize: u32;
readonly blockNumber: BlockNumber;
}
/** @name GlobalValidationSchedule */
export interface GlobalValidationSchedule extends Struct {
readonly maxCodeSize: u32;
@@ -406,6 +437,11 @@ export interface InitiateTeleport extends Struct {
readonly effects: Vec<Order>;
}
/** @name InvalidDisputeStatementKind */
export interface InvalidDisputeStatementKind extends Enum {
readonly isExplicit: boolean;
}
/** @name Junction */
export interface Junction extends Enum {
readonly isParent: boolean;
@@ -481,6 +517,9 @@ export interface MultiAsset extends Enum {
readonly asConcreteNonFungible: ConcreteNonFungible;
}
/** @name MultiDisputeStatementSet */
export interface MultiDisputeStatementSet extends Vec<DisputeStatementSet> {}
/** @name MultiLocation */
export interface MultiLocation extends Enum {
readonly isNull: boolean;
@@ -492,6 +531,14 @@ export interface MultiLocation extends Enum {
readonly asX3: ITuple<[Junction, Junction, Junction]>;
readonly isX4: boolean;
readonly asX4: ITuple<[Junction, Junction, Junction, Junction]>;
readonly isX5: boolean;
readonly asX5: ITuple<[Junction, Junction, Junction, Junction, Junction]>;
readonly isX6: boolean;
readonly asX6: ITuple<[Junction, Junction, Junction, Junction, Junction, Junction]>;
readonly isX7: boolean;
readonly asX7: ITuple<[Junction, Junction, Junction, Junction, Junction, Junction, Junction]>;
readonly isX8: boolean;
readonly asX8: ITuple<[Junction, Junction, Junction, Junction, Junction, Junction, Junction, Junction]>;
}
/** @name NetworkId */
@@ -563,6 +610,14 @@ export interface ParachainProposal extends Struct {
readonly balance: Balance;
}
/** @name ParachainsInherentData */
export interface ParachainsInherentData extends Struct {
readonly bitfields: SignedAvailabilityBitfields;
readonly backedCandidates: Vec<BackedCandidate>;
readonly disputes: MultiDisputeStatementSet;
readonly parentHeader: Header;
}
/** @name ParaGenesisArgs */
export interface ParaGenesisArgs extends Struct {
readonly genesisHead: Bytes;
@@ -575,7 +630,9 @@ export interface ParaId extends u32 {}
/** @name ParaInfo */
export interface ParaInfo extends Struct {
readonly scheduling: Scheduling;
readonly manager: AccountId;
readonly deposit: Balance;
readonly locked: bool;
}
/** @name ParaLifecycle */
@@ -686,6 +743,12 @@ export interface Scheduling extends Enum {
readonly isDynamic: boolean;
}
/** @name ServiceQuality */
export interface ServiceQuality extends Enum {
readonly isOrdered: boolean;
readonly isFast: boolean;
}
/** @name SessionInfo */
export interface SessionInfo extends Struct {
readonly validators: Vec<ValidatorId>;
@@ -799,6 +862,14 @@ export interface ValidationFunctionParams extends Struct {
/** @name ValidatorSignature */
export interface ValidatorSignature extends Signature {}
/** @name ValidDisputeStatementKind */
export interface ValidDisputeStatementKind extends Enum {
readonly isExplicit: boolean;
readonly isBackingSeconded: boolean;
readonly isBackingValid: boolean;
readonly isApprovalChecking: boolean;
}
/** @name ValidityAttestation */
export interface ValidityAttestation extends Enum {
readonly isNever: boolean;
@@ -79,7 +79,9 @@ export default {
},
IndicesLookupSource: 'GenericLookupSource',
Index: 'u32',
Justification: 'Bytes',
Justification: '(ConsensusEngineId, EncodedJustification)',
EncodedJustification: 'Bytes',
Justifications: 'Vec<Justification>',
KeyValue: '(StorageKey, StorageData)',
KeyTypeId: 'u32',
LockIdentifier: '[u8; 8]',
@@ -103,6 +105,7 @@ export default {
System: 'SystemOrigin'
}
},
PalletId: 'LockIdentifier',
PalletsOrigin: 'OriginCaller',
PalletVersion: {
major: 'u16',
@@ -121,9 +124,14 @@ export default {
read: 'Weight',
write: 'Weight'
},
SignedBlock: {
SignedBlock: 'SignedBlockWithJustifications',
SignedBlockWithJustification: {
block: 'Block',
justification: 'Justification'
justification: 'Option<EncodedJustification>'
},
SignedBlockWithJustifications: {
block: 'Block',
justifications: 'Option<Justifications>'
},
Slot: 'u64',
StorageData: 'Bytes',
+22 -4
View File
@@ -1,7 +1,7 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import type { Bytes, Compact, DoNotConstruct, Enum, GenericAccountId, GenericAccountIndex, GenericBlock, GenericCall, GenericConsensusEngineId, GenericLookupSource, GenericMultiAddress, Int, Null, StorageKey, Struct, U8aFixed, UInt, Vec, u16, u32, u64, u8 } from '@polkadot/types';
import type { Bytes, Compact, DoNotConstruct, Enum, GenericAccountId, GenericAccountIndex, GenericBlock, GenericCall, GenericConsensusEngineId, GenericLookupSource, GenericMultiAddress, Int, Null, Option, StorageKey, Struct, U8aFixed, UInt, Vec, u16, u32, u64, u8 } from '@polkadot/types';
import type { ITuple } from '@polkadot/types/types';
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
import type { Signature } from '@polkadot/types/interfaces/extrinsics';
@@ -81,6 +81,9 @@ export interface DigestItem extends Enum {
readonly asPreRuntime: PreRuntime;
}
/** @name EncodedJustification */
export interface EncodedJustification extends Bytes {}
/** @name ExtrinsicsWeight */
export interface ExtrinsicsWeight extends Struct {
readonly normal: Weight;
@@ -148,7 +151,10 @@ export interface Index extends u32 {}
export interface IndicesLookupSource extends GenericLookupSource {}
/** @name Justification */
export interface Justification extends Bytes {}
export interface Justification extends ITuple<[ConsensusEngineId, EncodedJustification]> {}
/** @name Justifications */
export interface Justifications extends Vec<Justification> {}
/** @name KeyTypeId */
export interface KeyTypeId extends u32 {}
@@ -196,6 +202,9 @@ export interface OriginCaller extends Enum {
readonly asSystem: SystemOrigin;
}
/** @name PalletId */
export interface PalletId extends LockIdentifier {}
/** @name PalletsOrigin */
export interface PalletsOrigin extends OriginCaller {}
@@ -263,9 +272,18 @@ export interface Seal extends ITuple<[ConsensusEngineId, Bytes]> {}
export interface SealV0 extends ITuple<[u64, Signature]> {}
/** @name SignedBlock */
export interface SignedBlock extends Struct {
export interface SignedBlock extends SignedBlockWithJustifications {}
/** @name SignedBlockWithJustification */
export interface SignedBlockWithJustification extends Struct {
readonly block: Block;
readonly justification: Justification;
readonly justification: Option<EncodedJustification>;
}
/** @name SignedBlockWithJustifications */
export interface SignedBlockWithJustifications extends Struct {
readonly block: Block;
readonly justifications: Option<Justifications>;
}
/** @name Slot */
@@ -12,22 +12,27 @@ import type { Definitions } from '../../types';
// pub struct SessionKeys {
// Here we revert to tuples to keep the interfaces "opaque", as per the use
const keyTypes = {
// key for beefy
BeefyKey: '[u8; 33]',
// default to Substrate master defaults, 4 keys (polkadot master, 5 keys)
Keys: 'SessionKeys4',
// shortcuts for 1-9 key tuples
SessionKeys1: '(AccountId)',
SessionKeys2: '(AccountId, AccountId)',
// older substrate master
SessionKeys3: '(AccountId, AccountId, AccountId)',
// CC2, Substrate master
SessionKeys4: '(AccountId, AccountId, AccountId, AccountId)',
// CC3
SessionKeys5: '(AccountId, AccountId, AccountId, AccountId, AccountId)',
SessionKeys6: '(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)',
SessionKeys6B: '(AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)',
SessionKeys7: '(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)',
SessionKeys7B: '(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)',
SessionKeys8: '(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)',
SessionKeys9: '(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)'
SessionKeys8B: '(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)',
SessionKeys9: '(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)',
SessionKeys9B: '(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)',
SessionKeys10: '(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)',
SessionKeys10B: '(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)'
};
export default {
+22 -1
View File
@@ -1,11 +1,14 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import type { Bytes, Struct, Vec, u32 } from '@polkadot/types';
import type { Bytes, Struct, U8aFixed, Vec, u32 } from '@polkadot/types';
import type { ITuple } from '@polkadot/types/types';
import type { AccountId, ValidatorId } from '@polkadot/types/interfaces/runtime';
import type { Exposure } from '@polkadot/types/interfaces/staking';
/** @name BeefyKey */
export interface BeefyKey extends U8aFixed {}
/** @name FullIdentification */
export interface FullIdentification extends Exposure {}
@@ -28,6 +31,12 @@ export interface SessionIndex extends u32 {}
/** @name SessionKeys1 */
export interface SessionKeys1 extends AccountId {}
/** @name SessionKeys10 */
export interface SessionKeys10 extends ITuple<[AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId]> {}
/** @name SessionKeys10B */
export interface SessionKeys10B extends ITuple<[AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey]> {}
/** @name SessionKeys2 */
export interface SessionKeys2 extends ITuple<[AccountId, AccountId]> {}
@@ -43,15 +52,27 @@ export interface SessionKeys5 extends ITuple<[AccountId, AccountId, AccountId, A
/** @name SessionKeys6 */
export interface SessionKeys6 extends ITuple<[AccountId, AccountId, AccountId, AccountId, AccountId, AccountId]> {}
/** @name SessionKeys6B */
export interface SessionKeys6B extends ITuple<[AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey]> {}
/** @name SessionKeys7 */
export interface SessionKeys7 extends ITuple<[AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId]> {}
/** @name SessionKeys7B */
export interface SessionKeys7B extends ITuple<[AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey]> {}
/** @name SessionKeys8 */
export interface SessionKeys8 extends ITuple<[AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId]> {}
/** @name SessionKeys8B */
export interface SessionKeys8B extends ITuple<[AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey]> {}
/** @name SessionKeys9 */
export interface SessionKeys9 extends ITuple<[AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId]> {}
/** @name SessionKeys9B */
export interface SessionKeys9B extends ITuple<[AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey]> {}
/** @name ValidatorCount */
export interface ValidatorCount extends u32 {}
+1
View File
@@ -37,6 +37,7 @@ export * from './txpayment/types';
export * from './utility/types';
export * from './vesting/types';
export * from './attestations/types';
export * from './beefy/types';
export * from './claims/types';
export * from './crowdloan/types';
export * from './parachains/types';
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/types', version: '4.1.1' };
export const packageInfo = { name: '@polkadot/types', version: '4.5.1' };
+394 -474
View File
File diff suppressed because it is too large Load Diff