Compare commits

..
18 Commits
Author SHA1 Message Date
Github Actions b9f82fc549 [CI Skip] release/stable 3.9.2
skip-checks: true
2021-02-15 09:05:52 +00:00
Jaco Greeff 25b8dba607 3.9.2 (#3176)
* 3.9.2

* Update CHANGELOG.md
2021-02-15 09:56:14 +01:00
Github Actions 1bc4f2c334 [CI Skip] release/beta 3.9.2-0
skip-checks: true
2021-02-15 06:47:13 +00:00
Nikos Kontakis aee8ac6b0a Update README.md (#3175)
Minor url link fixes (documentation portal and JSON-RPC methods link)
2021-02-15 07:37:11 +01:00
Github Actions aa7e30070f [CI Skip] release/stable 3.9.1
skip-checks: true
2021-02-14 17:46:51 +00:00
Jaco Greeff 64b5855f65 3.8 (#3174) 2021-02-14 18:39:44 +01:00
Github Actions d7ff9e706e [CI Skip] release/beta 3.8.2-5
skip-checks: true
2021-02-14 08:53:37 +00:00
Jaco Greeff 15ba6f6261 Adjust Result for Rust-compatible Err (w/ deprecation of is/asError) (#3172)
* Adjust Result for Rust-compatible Err (w/ deprecation of is/asError)

* Jsdoc comments

* test updates
2021-02-14 09:43:37 +01:00
Github Actions 8c88a880c6 [CI Skip] release/beta 3.8.2-4
skip-checks: true
2021-02-11 17:27:04 +00:00
Jaco Greeff 74566cce7b Update Rococo types (drop v0) (#3167) 2021-02-11 18:17:05 +01:00
Github Actions 16f6deed5e [CI Skip] release/beta 3.8.2-3
skip-checks: true
2021-02-10 12:14:16 +00:00
Jaco Greeff 40edc131fe Allow geneic args for keys/entries (#3165) 2021-02-10 13:04:23 +01:00
Github Actions 3e014b38e6 [CI Skip] release/beta 3.8.2-2
skip-checks: true
2021-02-10 08:49:29 +00:00
Jaco Greeff b4cfdbffab Fix council derives for seatholders (#3163)
* Fix council derives for setholders

* Fix vote retreival
2021-02-10 09:41:47 +01:00
Github Actions cbfb6f8f59 [CI Skip] release/beta 3.8.2-1
skip-checks: true
2021-02-09 19:00:05 +00:00
Jaco Greeff b5bc15ab8b Last Kusama upgrade block (#3160) 2021-02-09 19:50:24 +01:00
Github Actions 0b343fc0f8 [CI Skip] release/beta 3.8.2-0
skip-checks: true
2021-02-08 15:55:08 +00:00
Jaco Greeff e7f9693873 Add ParaLifecycle type (#3159) 2021-02-08 16:47:02 +01:00
39 changed files with 394 additions and 288 deletions
+2 -1
View File
@@ -14,4 +14,5 @@
3.6.3
3.6.4
3.7.2
3.7.3
3.7.3
3.9.2
+30
View File
@@ -1,5 +1,35 @@
# CHANGELOG
## 3.9.2 Feb 15, 2021
Upgrade priority: Low. Recommended for parachain builders since it contains the latest parachain types.
Contributed:
- Update README links (Thanks to https://github.com/wirednkod)
Changes:
- Added missing Culmulus `ParachainInherentData` & `MessageQueueChain` types
- Add alias for `system_unstable_networkState` RPC
## 3.9.1 Feb 14, 2021
Upgrade priority: Low.
- **Important** The `Result<T, E>` has been updated in the generation and the base types to follow the Rust version 100%. This means `{as, is}Error` is now available as `{as, is}Err` on the `Result` type. The older versions can still be used, but the `*Error` interfaces are now marked as deprecated.
Changes:
- Adjust `Result<T, E>` interface to be 100% compatible with the Rust version
- Add the `2028` upgrade to the known upgrades (optimizing certain `.at` queries)
- Adjust council derives to cater for latest Substrate & Polkadot
- Adjust Rococo know type definitions to cater for the latest update
- Update types for latest Polkadot/Substrate
- Add generic arguments for TypeScript users to `.entries/.keys` to deal with the key typings
## 3.8.1 Feb 7, 2021
Upgrade priority: Low. Recommended for users of the latest Substrate master, especially using contracts.
+2 -2
View File
@@ -7,7 +7,7 @@
# @polkadot/api
This library provides a clean wrapper around all the methods exposed by a Polkadot/Substrate network client and defines all the types exposed by a node. For complete documentation around the classes, interfaces and their use, visit the [documentation portal](https://polkadot.js.org/api/).
This library provides a clean wrapper around all the methods exposed by a Polkadot/Substrate network client and defines all the types exposed by a node. For complete documentation around the classes, interfaces and their use, visit the [documentation portal](https://polkadot.js.org/docs/api/).
If you are an existing user, please be sure to track the [CHANGELOG](CHANGELOG.md) and [UPGRADING](UPGRADING.md) guides when changing versions.
@@ -22,7 +22,7 @@ The API is split up into a number of internal packages -
- [@polkadot/api](packages/api/) The API library, providing both Promise and RxJS Observable-based interfaces. This is the main user-facing entry point.
- [@polkadot/api-derive](packages/api-derive/) Derived results that are injected into the API, allowing for combinations of various query results (only used internally and exposed on the Api instances via `api.derive.*`)
- [@polkadot/api-metadata](packages/api-metadata/) Base extrinsic, storage and constant injectors for injection
- [@polkadot/rpc-core](packages/rpc-core/) Wrapper around all [JSON-RPC methods](https://polkadot.js.org/api/substrate/rpc.html) exposed by a Polkadot network client
- [@polkadot/rpc-core](packages/rpc-core/) Wrapper around all [JSON-RPC methods](https://polkadot.js.org/docs/substrate/rpc) exposed by a Polkadot network client
- [@polkadot/rpc-provider](packages/rpc-provider/) Providers for connecting to nodes, including WebSockets and Http
Type definitions for interfaces as exposed by Polkadot & Substrate clients -
+1 -1
View File
@@ -34,5 +34,5 @@
"@types/jest": "^26.0.20",
"copyfiles": "^2.4.1"
},
"version": "3.8.1"
"version": "3.9.2"
}
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api-contract",
"version": "3.8.1",
"version": "3.9.2",
"description": "Interfaces for interacting with contracts and contract ABIs",
"main": "index.js",
"sideEffects": false,
@@ -13,10 +13,10 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
"dependencies": {
"@babel/runtime": "^7.12.13",
"@polkadot/api": "3.8.1",
"@polkadot/types": "3.8.1",
"@polkadot/util": "^5.6.1",
"@polkadot/x-rxjs": "^5.6.1",
"@polkadot/api": "3.9.2",
"@polkadot/types": "3.9.2",
"@polkadot/util": "^5.6.2",
"@polkadot/x-rxjs": "^5.6.2",
"bn.js": "^4.11.9"
}
}
+9 -9
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api-derive",
"version": "3.8.1",
"version": "3.9.2",
"description": "Common functions used across Polkadot, derived from RPC calls and storage queries.",
"main": "index.js",
"sideEffects": false,
@@ -13,16 +13,16 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
"dependencies": {
"@babel/runtime": "^7.12.13",
"@polkadot/api": "3.8.1",
"@polkadot/rpc-core": "3.8.1",
"@polkadot/types": "3.8.1",
"@polkadot/util": "^5.6.1",
"@polkadot/util-crypto": "^5.6.1",
"@polkadot/x-rxjs": "^5.6.1",
"@polkadot/api": "3.9.2",
"@polkadot/rpc-core": "3.9.2",
"@polkadot/types": "3.9.2",
"@polkadot/util": "^5.6.2",
"@polkadot/util-crypto": "^5.6.2",
"@polkadot/x-rxjs": "^5.6.2",
"bn.js": "^4.11.9"
},
"devDependencies": {
"@polkadot/keyring": "^5.6.1",
"@polkadot/rpc-provider": "3.8.1"
"@polkadot/keyring": "^5.6.2",
"@polkadot/rpc-provider": "3.9.2"
}
}
+4 -4
View File
@@ -3,7 +3,7 @@
import type { ApiInterfaceRx } from '@polkadot/api/types';
import type { DeriveBounties, DeriveCollectiveProposal } from '@polkadot/api-derive/types';
import type { Bytes, Option, StorageKey } from '@polkadot/types';
import type { Bytes, Option } from '@polkadot/types';
import type { Bounty, BountyIndex, ProposalIndex } from '@polkadot/types/interfaces';
import { memo } from '@polkadot/api-derive/util';
@@ -32,7 +32,7 @@ function parseResult ([maybeBounties, maybeDescriptions, ids, bountyProposals]:
}
export function bounties (instanceId: string, api: ApiInterfaceRx): () => Observable<DeriveBounties> {
const bountyBase = api.query.bounties ? api.query.bounties : api.query.treasury;
const bountyBase = api.query.bounties || api.query.treasury;
return memo(instanceId, (): Observable<DeriveBounties> =>
combineLatest([
@@ -41,12 +41,12 @@ export function bounties (instanceId: string, api: ApiInterfaceRx): () => Observ
]).pipe(
switchMap(() =>
combineLatest([
bountyBase.bounties.keys(),
bountyBase.bounties.keys<[BountyIndex]>(),
api.derive.council ? api.derive.council.proposals() : of([])
])
),
switchMap(([keys, proposals]): Observable<Result> => {
const ids = (keys as StorageKey<[BountyIndex]>[]).map(({ args: [id] }) => id);
const ids = keys.map(({ args: [id] }) => id);
return combineLatest([
bountyBase.bounties.multi<Option<Bounty>>(ids),
+19 -9
View File
@@ -3,7 +3,7 @@
import type { ApiInterfaceRx } from '@polkadot/api/types';
import type { Vec } from '@polkadot/types';
import type { AccountId, Balance } from '@polkadot/types/interfaces';
import type { AccountId, Balance, Voter } from '@polkadot/types/interfaces';
import type { ITuple } from '@polkadot/types/types';
import type { Observable } from '@polkadot/x-rxjs';
import type { DeriveCouncilVote, DeriveCouncilVotes } from '../types';
@@ -13,18 +13,25 @@ import { map } from '@polkadot/x-rxjs/operators';
import { memo } from '../util';
// Voter is current tuple is 2.x-era
type VoteEntry = Voter | ITuple<[Balance, Vec<AccountId>]>;
function isVoter (value: VoteEntry): value is Voter {
return !Array.isArray(value);
}
function retrieveStakeOf (api: ApiInterfaceRx): Observable<[AccountId, Balance][]> {
return (api.query.electionsPhragmen || api.query.elections).stakeOf.entries<Balance>().pipe(
return (api.query.electionsPhragmen || api.query.elections).stakeOf.entries<Balance, [AccountId]>().pipe(
map((entries) =>
entries.map(([key, stake]) => [key.args[0] as AccountId, stake])
entries.map(([{ args: [accountId] }, stake]) => [accountId, stake])
)
);
}
function retrieveVoteOf (api: ApiInterfaceRx): Observable<[AccountId, AccountId[]][]> {
return (api.query.electionsPhragmen || api.query.elections).votesOf.entries<Vec<AccountId>>().pipe(
return (api.query.electionsPhragmen || api.query.elections).votesOf.entries<Vec<AccountId>, [AccountId]>().pipe(
map((entries) =>
entries.map(([key, votes]) => [key.args[0] as AccountId, votes])
entries.map(([{ args: [accountId] }, votes]) => [accountId, votes])
)
);
}
@@ -56,11 +63,14 @@ function retrievePrev (api: ApiInterfaceRx): Observable<DeriveCouncilVotes> {
function retrieveCurrent (api: ApiInterfaceRx): Observable<DeriveCouncilVotes> {
const elections = (api.query.electionsPhragmen || api.query.elections);
return elections.voting.entries<ITuple<[Balance, Vec<AccountId>]>>().pipe(
return elections.voting.entries<VoteEntry, [AccountId]>().pipe(
map((entries): DeriveCouncilVotes =>
entries.map(([key, [stake, votes]]): [AccountId, DeriveCouncilVote] =>
[key.args[0] as AccountId, { stake, votes }]
)
entries.map(([{ args: [accountId] }, value]): [AccountId, DeriveCouncilVote] => [
accountId,
isVoter(value)
? { stake: value.stake, votes: value.votes }
: { stake: value[0], votes: value[1] }
])
)
);
}
@@ -51,7 +51,7 @@ function schedulerEntries (api: ApiInterfaceRx): Observable<[BlockNumber[], Opti
api.query.scheduler.agenda.keys()
),
switchMap((keys) => {
const blockNumbers = keys.map((key) => key.args[0]);
const blockNumbers = keys.map(({ args: [blockNumber] }) => blockNumber);
return combineLatest([
of(blockNumbers),
@@ -67,9 +67,9 @@ function extractVotes (mapped: [AccountId, Voting][], referendumId: BN): DeriveR
}
function votesCurr (api: ApiInterfaceRx, referendumId: BN): Observable<DeriveReferendumVote[]> {
return api.query.democracy.votingOf.entries<Voting>().pipe(
return api.query.democracy.votingOf.entries<Voting, [AccountId]>().pipe(
map((allVoting): DeriveReferendumVote[] => {
const mapped = allVoting.map(([key, voting]): [AccountId, Voting] => [key.args[0], voting]);
const mapped = allVoting.map(([{ args: [accountId] }, voting]): [AccountId, Voting] => [accountId, voting]);
const votes = extractVotes(mapped, referendumId);
const delegations = mapped
.filter(([, voting]) => voting.isDelegating)
+18 -5
View File
@@ -3,7 +3,7 @@
import type { ApiInterfaceRx } from '@polkadot/api/types';
import type { u32, Vec } from '@polkadot/types';
import type { AccountId, Balance, BlockNumber } from '@polkadot/types/interfaces';
import type { AccountId, Balance, BlockNumber, SeatHolder } from '@polkadot/types/interfaces';
import type { ITuple } from '@polkadot/types/types';
import type { Observable } from '@polkadot/x-rxjs';
import type { DeriveElectionsInfo } from './types';
@@ -12,14 +12,27 @@ import { map } from '@polkadot/x-rxjs/operators';
import { memo } from '../util';
function sortAccounts ([, balanceA]: ITuple<[AccountId, Balance]>, [, balanceB]: ITuple<[AccountId, Balance]>): number {
// SeatHolder is current tuple is 2.x-era Substrate
type Member = SeatHolder | ITuple<[AccountId, Balance]>;
function isSeatHolder (value: Member): value is SeatHolder {
return !Array.isArray(value);
}
function getAccountTuple (value: Member): [AccountId, Balance] {
return isSeatHolder(value)
? [value.who, value.stake]
: value;
}
function sortAccounts ([, balanceA]: [AccountId, Balance], [, balanceB]: [AccountId, Balance]): number {
return balanceB.cmp(balanceA);
}
function queryElections (api: ApiInterfaceRx): Observable<DeriveElectionsInfo> {
const section = api.query.electionsPhragmen ? 'electionsPhragmen' : 'elections';
return api.queryMulti<[Vec<AccountId>, Vec<AccountId>, Vec<ITuple<[AccountId, Balance]>>, Vec<ITuple<[AccountId, Balance]>>]>([
return api.queryMulti<[Vec<AccountId>, Vec<AccountId>, Vec<Member>, Vec<Member>]>([
api.query.council.members,
api.query[section].candidates,
api.query[section].members,
@@ -32,9 +45,9 @@ function queryElections (api: ApiInterfaceRx): Observable<DeriveElectionsInfo> {
desiredRunnersUp: api.consts[section].desiredRunnersUp as u32,
desiredSeats: api.consts[section].desiredMembers as u32,
members: members.length
? members.sort(sortAccounts)
? members.map(getAccountTuple).sort(sortAccounts)
: councilMembers.map((accountId): [AccountId, Balance] => [accountId, api.registry.createType('Balance')]),
runnersUp: runnersUp.sort(sortAccounts),
runnersUp: runnersUp.map(getAccountTuple).sort(sortAccounts),
termDuration: api.consts[section].termDuration as BlockNumber,
votingBond: api.consts[section].votingBond as Balance
}))
+1 -1
View File
@@ -15,7 +15,7 @@ import { memo } from '../util';
export function stashes (instanceId: string, api: ApiInterfaceRx): () => Observable<AccountId[]> {
return memo(instanceId, (): Observable<AccountId[]> =>
api.query.staking.validators.keys().pipe(
map((keys) => keys.map((key) => key.args[0]).filter((a) => a))
map((keys) => keys.map(({ args: [validatorId] }) => validatorId).filter((a) => a))
)
);
}
@@ -18,7 +18,7 @@ export function nextElected (instanceId: string, api: ApiInterfaceRx): () => Obs
// only populate for next era in the last session, so track both here - entries are not
// subscriptions, so we need a trigger - currentIndex acts as that trigger to refresh
switchMap(({ currentEra }) => api.query.staking.erasStakers.keys(currentEra)),
map((keys) => keys.map((key) => key.args[1]))
map((keys) => keys.map(({ args: [, accountId] }) => accountId))
)
: api.query.staking.currentElected<AccountId[]>()
);
+11 -11
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api",
"version": "3.8.1",
"version": "3.9.2",
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
"main": "index.js",
"sideEffects": [
@@ -16,16 +16,16 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
"dependencies": {
"@babel/runtime": "^7.12.13",
"@polkadot/api-derive": "3.8.1",
"@polkadot/keyring": "^5.6.1",
"@polkadot/metadata": "3.8.1",
"@polkadot/rpc-core": "3.8.1",
"@polkadot/rpc-provider": "3.8.1",
"@polkadot/types": "3.8.1",
"@polkadot/types-known": "3.8.1",
"@polkadot/util": "^5.6.1",
"@polkadot/util-crypto": "^5.6.1",
"@polkadot/x-rxjs": "^5.6.1",
"@polkadot/api-derive": "3.9.2",
"@polkadot/keyring": "^5.6.2",
"@polkadot/metadata": "3.9.2",
"@polkadot/rpc-core": "3.9.2",
"@polkadot/rpc-provider": "3.9.2",
"@polkadot/types": "3.9.2",
"@polkadot/types-known": "3.9.2",
"@polkadot/util": "^5.6.2",
"@polkadot/util-crypto": "^5.6.2",
"@polkadot/x-rxjs": "^5.6.2",
"bn.js": "^4.11.9",
"eventemitter3": "^4.0.7"
}
+1 -1
View File
@@ -148,7 +148,7 @@ declare module '@polkadot/api/types/storage' {
/**
* The balance of an account.
*
* NOTE: This is only used in the case that this module is used to store balances.
* NOTE: This is only used in the case that this pallet is used to store balances.
**/
account: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<AccountData>, [AccountId]> & QueryableStorageEntry<ApiType, [AccountId]>;
/**
+1 -1
View File
@@ -396,7 +396,7 @@ declare module '@polkadot/api/types/submittable' {
*
* 99% of the time you want [`transfer`] instead.
*
* [`transfer`]: struct.Module.html#method.transfer
* [`transfer`]: struct.Pallet.html#method.transfer
* # <weight>
* - Cheaper than transfer because account cannot be killed.
* - Base Weight: 51.4 µs
+7 -7
View File
@@ -35,19 +35,19 @@ export type QueryableStorageEntry<ApiType extends ApiTypes, A extends AnyTuple =
// eslint-disable-next-line no-use-before-define
: AugmentedQuery<'promise', GenericStorageEntryFunction, A> & StorageEntryPromiseOverloads;
export interface StorageEntryBase<ApiType extends ApiTypes, F extends AnyFunction, A extends AnyTuple> {
export interface StorageEntryBase<ApiType extends ApiTypes, F extends AnyFunction, A extends AnyTuple = AnyTuple> {
at: <T extends Codec | any = ObsInnerType<ReturnType<F>>>(hash: Hash | Uint8Array | string, ...args: Parameters<F>) => PromiseOrObs<ApiType, T>;
creator: StorageEntry;
entries: <T extends Codec | any = ObsInnerType<ReturnType<F>>>(arg?: Parameters<F>[0]) => PromiseOrObs<ApiType, [StorageKey<A>, T][]>;
entriesAt: <T extends Codec | any = ObsInnerType<ReturnType<F>>>(hash: Hash | Uint8Array | string, arg?: Parameters<F>[0]) => PromiseOrObs<ApiType, [StorageKey<A>, T][]>;
entriesPaged: <T extends Codec | any = ObsInnerType<ReturnType<F>>>(opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, [StorageKey<A>, T][]>;
entries: <T extends Codec | any = ObsInnerType<ReturnType<F>>, K extends AnyTuple = A>(arg?: Parameters<F>[0]) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
entriesAt: <T extends Codec | any = ObsInnerType<ReturnType<F>>, K extends AnyTuple = A>(hash: Hash | Uint8Array | string, arg?: Parameters<F>[0]) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
entriesPaged: <T extends Codec | any = ObsInnerType<ReturnType<F>>, K extends AnyTuple = A>(opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
hash: (...args: Parameters<F>) => PromiseOrObs<ApiType, Hash>;
is: (key: IStorageKey<AnyTuple>) => key is IStorageKey<A>;
key: (...args: Parameters<F>) => string;
keyPrefix: () => string;
keys: (arg?: any) => PromiseOrObs<ApiType, StorageKey<A>[]>;
keysAt: (hash: Hash | Uint8Array | string, arg?: any) => PromiseOrObs<ApiType, StorageKey<A>[]>;
keysPaged: (opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, StorageKey<A>[]>;
keys: <K extends AnyTuple = A> (arg?: any) => PromiseOrObs<ApiType, StorageKey<K>[]>;
keysAt: <K extends AnyTuple = A> (hash: Hash | Uint8Array | string, arg?: any) => PromiseOrObs<ApiType, StorageKey<K>[]>;
keysPaged: <K extends AnyTuple = A> (opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
// @deprecated The underlying RPC this been marked unsafe and is generally not exposed
range: <T extends Codec | any = ObsInnerType<ReturnType<F>>>([from, to]: [Hash | Uint8Array | string, Hash | Uint8Array | string | undefined] | [Hash | Uint8Array | string], ...args: Parameters<F>) => PromiseOrObs<ApiType, [Hash, T][]>;
size: (...args: Parameters<F>) => PromiseOrObs<ApiType, u64>;
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/metadata",
"version": "3.8.1",
"version": "3.9.2",
"description": "Helpers to extract information from runtime metadata",
"main": "index.js",
"sideEffects": [
@@ -16,13 +16,13 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme",
"dependencies": {
"@babel/runtime": "^7.12.13",
"@polkadot/types": "3.8.1",
"@polkadot/types-known": "3.8.1",
"@polkadot/util": "^5.6.1",
"@polkadot/util-crypto": "^5.6.1",
"@polkadot/types": "3.9.2",
"@polkadot/types-known": "3.9.2",
"@polkadot/util": "^5.6.2",
"@polkadot/util-crypto": "^5.6.2",
"bn.js": "^4.11.9"
},
"devDependencies": {
"@polkadot/keyring": "^5.6.1"
"@polkadot/keyring": "^5.6.2"
}
}
@@ -474,7 +474,7 @@
{
"name": "Version",
"type": "RuntimeVersion",
"value": "0x106e6f6465387375627374726174652d6e6f64650a000000070100000000000034df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a04000000d2bc9897eed08f1502000000f78b278be53f454c02000000ed99c5acb25eedf502000000cbca25e39f14238702000000687ad44ad37f03c201000000bc9d89904f5b923f0100000068b66ba122c93fa70100000037c8bb1350a9a2a80100000091d5df18b0d2cf5801000000ab3c0572291feb8b0100000002000000",
"value": "0x106e6f6465387375627374726174652d6e6f64650a000000080100000000000034df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a04000000d2bc9897eed08f1502000000f78b278be53f454c02000000ed99c5acb25eedf502000000cbca25e39f14238702000000687ad44ad37f03c201000000bc9d89904f5b923f0100000068b66ba122c93fa70100000037c8bb1350a9a2a80100000091d5df18b0d2cf5801000000ab3c0572291feb8b0100000002000000",
"documentation": [
" Get the chain's current version."
]
@@ -1331,7 +1331,7 @@
"documentation": [
" The balance of an account.",
"",
" NOTE: This is only used in the case that this module is used to store balances."
" NOTE: This is only used in the case that this pallet is used to store balances."
]
},
{
@@ -1489,7 +1489,7 @@
"",
" 99% of the time you want [`transfer`] instead.",
"",
" [`transfer`]: struct.Module.html#method.transfer",
" [`transfer`]: struct.Pallet.html#method.transfer",
" # <weight>",
" - Cheaper than transfer because account cannot be killed.",
" - Base Weight: 51.4 µs",
File diff suppressed because one or more lines are too long
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/rpc-core",
"version": "3.8.1",
"version": "3.9.2",
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
"main": "index.js",
"sideEffects": false,
@@ -13,13 +13,13 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
"dependencies": {
"@babel/runtime": "^7.12.13",
"@polkadot/metadata": "3.8.1",
"@polkadot/rpc-provider": "3.8.1",
"@polkadot/types": "3.8.1",
"@polkadot/util": "^5.6.1",
"@polkadot/x-rxjs": "^5.6.1"
"@polkadot/metadata": "3.9.2",
"@polkadot/rpc-provider": "3.9.2",
"@polkadot/types": "3.9.2",
"@polkadot/util": "^5.6.2",
"@polkadot/x-rxjs": "^5.6.2"
},
"devDependencies": {
"@polkadot/keyring": "^5.6.1"
"@polkadot/keyring": "^5.6.2"
}
}
+9 -9
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/rpc-provider",
"version": "3.8.1",
"version": "3.9.2",
"description": "Transport providers for the API",
"main": "index.js",
"sideEffects": false,
@@ -13,18 +13,18 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
"dependencies": {
"@babel/runtime": "^7.12.13",
"@polkadot/types": "3.8.1",
"@polkadot/util": "^5.6.1",
"@polkadot/util-crypto": "^5.6.1",
"@polkadot/x-fetch": "^5.6.1",
"@polkadot/x-global": "^5.6.1",
"@polkadot/x-ws": "^5.6.1",
"@polkadot/types": "3.9.2",
"@polkadot/util": "^5.6.2",
"@polkadot/util-crypto": "^5.6.2",
"@polkadot/x-fetch": "^5.6.2",
"@polkadot/x-global": "^5.6.2",
"@polkadot/x-ws": "^5.6.2",
"bn.js": "^4.11.9",
"eventemitter3": "^4.0.7"
},
"devDependencies": {
"@polkadot/keyring": "^5.6.1",
"@polkadot/metadata": "3.8.1",
"@polkadot/keyring": "^5.6.2",
"@polkadot/metadata": "3.9.2",
"mock-socket": "^9.0.3",
"nock": "^13.0.7"
}
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/typegen",
"version": "3.8.1",
"version": "3.9.2",
"description": "Type generation scripts",
"main": "index.js",
"sideEffects": false,
@@ -22,11 +22,11 @@
"@babel/core": "^7.12.13",
"@babel/register": "^7.12.13",
"@babel/runtime": "^7.12.13",
"@polkadot/api": "3.8.1",
"@polkadot/metadata": "3.8.1",
"@polkadot/rpc-provider": "3.8.1",
"@polkadot/types": "3.8.1",
"@polkadot/util": "^5.6.1",
"@polkadot/api": "3.9.2",
"@polkadot/metadata": "3.9.2",
"@polkadot/rpc-provider": "3.9.2",
"@polkadot/types": "3.9.2",
"@polkadot/util": "^5.6.2",
"handlebars": "^4.7.6",
"websocket": "^1.0.33",
"yargs": "^16.2.0"
+5 -3
View File
@@ -87,12 +87,12 @@ function tsInt (definitions: Record<string, ModuleTypes>, def: TypeDef, imports:
}
/** @internal */
function tsResultGetter (definitions: Record<string, ModuleTypes>, resultName = '', getter: 'Ok' | 'Error', def: TypeDef, imports: TypeImports): string {
function tsResultGetter (definitions: Record<string, ModuleTypes>, resultName = '', getter: 'Ok' | 'Err' | 'Error', def: TypeDef, imports: TypeImports): string {
const { info, type } = def;
const asGetter = type === 'Null'
? ''
: createGetter(definitions, `as${getter}`, info === TypeDefInfo.Tuple ? formatType(definitions, def, imports) : type, imports);
const isGetter = createGetter(definitions, `is${getter}`, 'boolean', imports);
: (getter === 'Error' ? ' /** @deprecated Use asErr */\n' : '') + createGetter(definitions, `as${getter}`, info === TypeDefInfo.Tuple ? formatType(definitions, def, imports) : type, imports);
const isGetter = (getter === 'Error' ? ' /** @deprecated Use isErr */\n' : '') + createGetter(definitions, `is${getter}`, 'boolean', imports);
switch (info) {
case TypeDefInfo.Plain:
@@ -110,6 +110,8 @@ function tsResultGetter (definitions: Record<string, ModuleTypes>, resultName =
function tsResult (definitions: Record<string, ModuleTypes>, def: TypeDef, imports: TypeImports): string {
const [okDef, errorDef] = (def.sub as TypeDef[]);
const inner = [
tsResultGetter(definitions, def.name, 'Err', errorDef, imports),
// @deprecated, use Err
tsResultGetter(definitions, def.name, 'Error', errorDef, imports),
tsResultGetter(definitions, def.name, 'Ok', okDef, imports)
].join('');
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/types-known",
"version": "3.8.1",
"version": "3.9.2",
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
"main": "index.js",
"sideEffects": false,
@@ -13,9 +13,9 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-known#readme",
"dependencies": {
"@babel/runtime": "^7.12.13",
"@polkadot/networks": "^5.6.1",
"@polkadot/types": "3.8.1",
"@polkadot/util": "^5.6.1",
"@polkadot/networks": "^5.6.2",
"@polkadot/types": "3.9.2",
"@polkadot/util": "^5.6.2",
"bn.js": "^4.11.9"
},
"devDependencies": {
+2 -26
View File
@@ -18,39 +18,15 @@ const sharedTypes = {
const versioned: OverrideVersionedType[] = [
{
minmax: [0, 9],
minmax: [0, 200],
types: {
...sharedTypes,
AccountInfo: 'AccountInfoWithRefCount',
Address: 'AccountId',
CompactAssignments: 'CompactAssignmentsTo257',
LookupSource: 'AccountId',
RefCount: 'RefCountTo259',
RewardDestination: 'RewardDestinationTo257',
Keys: 'SessionKeys5'
}
},
{
minmax: [10, 12],
types: {
...sharedTypes,
AccountInfo: 'AccountInfoWithRefCount',
Address: 'AccountId',
Keys: 'SessionKeys5',
LookupSource: 'AccountId'
}
},
{
minmax: [13, 201],
types: {
...sharedTypes,
AccountInfo: 'AccountInfoWithRefCount',
Address: 'AccountId',
LookupSource: 'AccountId'
}
},
{
minmax: [202, undefined],
minmax: [201, undefined],
types: {
...sharedTypes
}
+2 -1
View File
@@ -11,7 +11,8 @@ const upgrades: ChainUpgradesRaw = [
[1472960, 1052], [1475648, 1053], [1491596, 1054], [1574408, 1055], [2064961, 1058],
[2201991, 1062], [2671528, 2005], [2704202, 2007], [2728002, 2008], [2832534, 2011],
[2962294, 2012], [3240000, 2013], [3274408, 2015], [3323565, 2019], [3534175, 2022],
[3860281, 2023], [4143129, 2024], [4401242, 2025], [4841367, 2026], [5961600, 2027]
[3860281, 2023], [4143129, 2024], [4401242, 2025], [4841367, 2026], [5961600, 2027],
[6137912, 2028]
];
export default upgrades;
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/types",
"version": "3.8.1",
"version": "3.9.2",
"description": "Implementation of the Parity codec",
"main": "index.js",
"sideEffects": [
@@ -16,14 +16,14 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
"dependencies": {
"@babel/runtime": "^7.12.13",
"@polkadot/metadata": "3.8.1",
"@polkadot/util": "^5.6.1",
"@polkadot/util-crypto": "^5.6.1",
"@polkadot/x-rxjs": "^5.6.1",
"@polkadot/metadata": "3.9.2",
"@polkadot/util": "^5.6.2",
"@polkadot/util-crypto": "^5.6.2",
"@polkadot/x-rxjs": "^5.6.2",
"@types/bn.js": "^4.11.6",
"bn.js": "^4.11.9"
},
"devDependencies": {
"@polkadot/keyring": "^5.6.1"
"@polkadot/keyring": "^5.6.2"
}
}
+13 -1
View File
@@ -31,7 +31,7 @@ import type { CallIndex, LotteryConfig } from '@polkadot/types/interfaces/lotter
import type { DoubleMapTypeLatest, DoubleMapTypeV10, DoubleMapTypeV11, DoubleMapTypeV12, DoubleMapTypeV9, ErrorMetadataLatest, ErrorMetadataV10, ErrorMetadataV11, ErrorMetadataV12, ErrorMetadataV9, EventMetadataLatest, EventMetadataV10, EventMetadataV11, EventMetadataV12, EventMetadataV9, ExtrinsicMetadataLatest, ExtrinsicMetadataV11, ExtrinsicMetadataV12, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV10, FunctionArgumentMetadataV11, FunctionArgumentMetadataV12, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV10, FunctionMetadataV11, FunctionMetadataV12, FunctionMetadataV9, MapTypeLatest, MapTypeV10, MapTypeV11, MapTypeV12, MapTypeV9, MetadataAll, MetadataLatest, MetadataV10, MetadataV11, MetadataV12, MetadataV9, ModuleConstantMetadataLatest, ModuleConstantMetadataV10, ModuleConstantMetadataV11, ModuleConstantMetadataV12, ModuleConstantMetadataV9, ModuleMetadataLatest, ModuleMetadataV10, ModuleMetadataV11, ModuleMetadataV12, ModuleMetadataV9, StorageEntryMetadataLatest, StorageEntryMetadataV10, StorageEntryMetadataV11, StorageEntryMetadataV12, StorageEntryMetadataV9, StorageEntryModifierLatest, StorageEntryModifierV10, StorageEntryModifierV11, StorageEntryModifierV12, StorageEntryModifierV9, StorageEntryTypeLatest, StorageEntryTypeV10, StorageEntryTypeV11, StorageEntryTypeV12, StorageEntryTypeV9, StorageHasher, StorageHasherV10, StorageHasherV11, StorageHasherV12, StorageHasherV9, StorageMetadataLatest, StorageMetadataV10, StorageMetadataV11, StorageMetadataV12, StorageMetadataV9 } from '@polkadot/types/interfaces/metadata';
import type { StorageKind } from '@polkadot/types/interfaces/offchain';
import type { DeferredOffenceOf, Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AbstractFungible, AbstractNonFungible, AccountId32Junction, AccountIndex64Junction, AccountKey20Junction, AssetInstance, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Balances, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, ConcreteFungible, ConcreteNonFungible, CoreAssignment, CoreIndex, CoreOccupied, DepositAsset, DepositReserveAsset, DoubleVoteReport, DownwardMessage, ExchangeAsset, GlobalValidationSchedule, GroupIndex, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InitiateReserveWithdraw, InitiateTeleport, Junction, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiAsset, MultiLocation, NetworkId, NewBidder, NewBidderOption, Order, OriginKind, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainProposal, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, QueryHolding, QueuedParathread, RegisteredParachainInfo, RelayChainBlockNumber, RelayTo, RelayedFrom, Remark, ReserveAssetDeposit, Retriable, Scheduling, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, Statement, SubId, SystemInherentData, TeleportAsset, Transact, TransientValidationData, UpwardMessage, ValidationCode, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, VersionedMultiAsset, VersionedMultiLocation, VersionedXcm, WinnersData, WinnersDataTuple, WinningData, WinningDataEntry, WithdrawAsset, Xcm, XcmError, XcmResult } from '@polkadot/types/interfaces/parachains';
import type { 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, NewBidderOption, 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 { 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';
@@ -508,6 +508,7 @@ declare module '@polkadot/types/types/registry' {
'Option<MemberCount>': Option<MemberCount>;
'Option<MembershipProof>': Option<MembershipProof>;
'Option<MessageIngestionType>': Option<MessageIngestionType>;
'Option<MessageQueueChain>': Option<MessageQueueChain>;
'Option<MessagingStateSnapshot>': Option<MessagingStateSnapshot>;
'Option<MessagingStateSnapshotEgressEntry>': Option<MessagingStateSnapshotEgressEntry>;
'Option<MetadataAll>': Option<MetadataAll>;
@@ -574,10 +575,12 @@ declare module '@polkadot/types/types/registry' {
'Option<PalletsOrigin>': Option<PalletsOrigin>;
'Option<PalletVersion>': Option<PalletVersion>;
'Option<ParachainDispatchOrigin>': Option<ParachainDispatchOrigin>;
'Option<ParachainInherentData>': Option<ParachainInherentData>;
'Option<ParachainProposal>': Option<ParachainProposal>;
'Option<ParaGenesisArgs>': Option<ParaGenesisArgs>;
'Option<ParaId>': Option<ParaId>;
'Option<ParaInfo>': Option<ParaInfo>;
'Option<ParaLifecycle>': Option<ParaLifecycle>;
'Option<ParaPastCodeMeta>': Option<ParaPastCodeMeta>;
'Option<ParaScheduling>': Option<ParaScheduling>;
'Option<ParathreadClaim>': Option<ParathreadClaim>;
@@ -657,6 +660,7 @@ declare module '@polkadot/types/types/registry' {
'Option<Registration>': Option<Registration>;
'Option<RegistrationJudgement>': Option<RegistrationJudgement>;
'Option<RelayChainBlockNumber>': Option<RelayChainBlockNumber>;
'Option<RelayChainHash>': Option<RelayChainHash>;
'Option<RelayedFrom>': Option<RelayedFrom>;
'Option<RelayTo>': Option<RelayTo>;
'Option<Releases>': Option<Releases>;
@@ -1231,6 +1235,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<MemberCount>': Vec<MemberCount>;
'Vec<MembershipProof>': Vec<MembershipProof>;
'Vec<MessageIngestionType>': Vec<MessageIngestionType>;
'Vec<MessageQueueChain>': Vec<MessageQueueChain>;
'Vec<MessagingStateSnapshot>': Vec<MessagingStateSnapshot>;
'Vec<MessagingStateSnapshotEgressEntry>': Vec<MessagingStateSnapshotEgressEntry>;
'Vec<MetadataAll>': Vec<MetadataAll>;
@@ -1297,10 +1302,12 @@ declare module '@polkadot/types/types/registry' {
'Vec<PalletsOrigin>': Vec<PalletsOrigin>;
'Vec<PalletVersion>': Vec<PalletVersion>;
'Vec<ParachainDispatchOrigin>': Vec<ParachainDispatchOrigin>;
'Vec<ParachainInherentData>': Vec<ParachainInherentData>;
'Vec<ParachainProposal>': Vec<ParachainProposal>;
'Vec<ParaGenesisArgs>': Vec<ParaGenesisArgs>;
'Vec<ParaId>': Vec<ParaId>;
'Vec<ParaInfo>': Vec<ParaInfo>;
'Vec<ParaLifecycle>': Vec<ParaLifecycle>;
'Vec<ParaPastCodeMeta>': Vec<ParaPastCodeMeta>;
'Vec<ParaScheduling>': Vec<ParaScheduling>;
'Vec<ParathreadClaim>': Vec<ParathreadClaim>;
@@ -1380,6 +1387,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<Registration>': Vec<Registration>;
'Vec<RegistrationJudgement>': Vec<RegistrationJudgement>;
'Vec<RelayChainBlockNumber>': Vec<RelayChainBlockNumber>;
'Vec<RelayChainHash>': Vec<RelayChainHash>;
'Vec<RelayedFrom>': Vec<RelayedFrom>;
'Vec<RelayTo>': Vec<RelayTo>;
'Vec<Releases>': Vec<Releases>;
@@ -1954,6 +1962,7 @@ declare module '@polkadot/types/types/registry' {
MemberCount: MemberCount;
MembershipProof: MembershipProof;
MessageIngestionType: MessageIngestionType;
MessageQueueChain: MessageQueueChain;
MessagingStateSnapshot: MessagingStateSnapshot;
MessagingStateSnapshotEgressEntry: MessagingStateSnapshotEgressEntry;
MetadataAll: MetadataAll;
@@ -2020,10 +2029,12 @@ declare module '@polkadot/types/types/registry' {
PalletsOrigin: PalletsOrigin;
PalletVersion: PalletVersion;
ParachainDispatchOrigin: ParachainDispatchOrigin;
ParachainInherentData: ParachainInherentData;
ParachainProposal: ParachainProposal;
ParaGenesisArgs: ParaGenesisArgs;
ParaId: ParaId;
ParaInfo: ParaInfo;
ParaLifecycle: ParaLifecycle;
ParaPastCodeMeta: ParaPastCodeMeta;
ParaScheduling: ParaScheduling;
ParathreadClaim: ParathreadClaim;
@@ -2103,6 +2114,7 @@ declare module '@polkadot/types/types/registry' {
Registration: Registration;
RegistrationJudgement: RegistrationJudgement;
RelayChainBlockNumber: RelayChainBlockNumber;
RelayChainHash: RelayChainHash;
RelayedFrom: RelayedFrom;
RelayTo: RelayTo;
Releases: Releases;
+2 -2
View File
@@ -7,7 +7,7 @@ import type { UIntBitLength } from './types';
import BN from 'bn.js';
import { assert, BN_BILLION, BN_HUNDRED, BN_MILLION, BN_ZERO, bnToBn, bnToHex, bnToU8a, formatBalance, formatNumber, hexToBn, isHex, isString, isU8a, u8aToBn } from '@polkadot/util';
import { assert, BN_BILLION, BN_HUNDRED, BN_MILLION, BN_QUINTILL, BN_ZERO, bnToBn, bnToHex, bnToU8a, formatBalance, formatNumber, hexToBn, isHex, isString, isU8a, u8aToBn } from '@polkadot/util';
export const DEFAULT_UINT_BITS = 64;
@@ -17,7 +17,7 @@ const MAX_NUMBER_BITS = 52;
const MUL_P = new BN(1_00_00);
const FORMATTERS: [string, BN][] = [
['Perquintill', new BN(1_000_000_000_000)],
['Perquintill', BN_QUINTILL],
['Perbill', BN_BILLION],
['Permill', BN_MILLION],
['Percent', BN_HUNDRED]
+9 -5
View File
@@ -9,7 +9,7 @@ import { Result } from '.';
describe('Result', (): void => {
const registry = new TypeRegistry();
const Type = Result.with({ Error: Text, Ok: u32 });
const Type = Result.with({ Err: Text, Ok: u32 });
it('has a sane toRawType representation', (): void => {
expect(new Type(registry).toRawType()).toEqual('Result<u32,Text>');
@@ -29,17 +29,21 @@ describe('Result', (): void => {
it('decodes from a u8a (error)', (): void => {
const result = new Type(registry, new Uint8Array([1, 4 << 2, 100, 101, 102, 103]));
expect(result.isError);
expect(result.asError.toU8a()).toEqual(new Uint8Array([4 << 2, 100, 101, 102, 103]));
expect(result.isErr);
expect(result.asErr.toU8a()).toEqual(new Uint8Array([4 << 2, 100, 101, 102, 103]));
expect(result.toHex()).toEqual('0x011064656667');
expect(result.toJSON()).toEqual({
Error: hexToString('0x64656667')
Err: hexToString('0x64656667')
});
});
it('decodes from a JSON representation', (): void => {
const result = new Type(registry, { Error: 'error' });
const result = new Type(registry, { Err: 'error' });
expect(result.isErr).toBe(true);
expect(result.isError).toBe(true);
expect(result.asErr.toString()).toEqual('error');
expect(result.asError.toString()).toEqual('error');
expect(result.toHex()).toEqual('0x01146572726f72');
});
+26 -12
View File
@@ -13,34 +13,41 @@ import { Enum } from './Enum';
* A Result maps to the Rust Result type, that can either wrap a success or error value
*/
export class Result<O extends Codec, E extends Codec> extends Enum {
constructor (registry: Registry, Ok: Constructor<O> | keyof InterfaceTypes, Error: Constructor<E> | keyof InterfaceTypes, value?: unknown) {
constructor (registry: Registry, Ok: Constructor<O> | keyof InterfaceTypes, Err: Constructor<E> | keyof InterfaceTypes, value?: unknown) {
// NOTE This is order-dependent, Ok (with index 0) needs to be first
// eslint-disable-next-line sort-keys
super(registry, { Ok, Error }, value);
super(registry, { Ok, Err }, value);
}
public static with<O extends Codec, E extends Codec> (Types: { Ok: Constructor<O> | keyof InterfaceTypes; Error: Constructor<E> | keyof InterfaceTypes }): Constructor<Result<O, E>> {
public static with<O extends Codec, E extends Codec> (Types: { Ok: Constructor<O> | keyof InterfaceTypes; Err: Constructor<E> | keyof InterfaceTypes }): Constructor<Result<O, E>> {
return class extends Result<O, E> {
constructor (registry: Registry, value?: unknown) {
super(registry, Types.Ok, Types.Error, value);
super(registry, Types.Ok, Types.Err, value);
}
};
}
/**
* @description Returns the wrapper Error value (if isError)
* @description Returns the wrapper Err value (if isErr)
*/
public get asError (): E {
assert(this.isError, 'Cannot extract Error value from Ok result, check isError first');
public get asErr (): E {
assert(this.isErr, 'Cannot extract Err value from Ok result, check isErr first');
return this.value as E;
}
/**
* @deprecated Use asErr
*/
public get asError (): E {
return this.asErr;
}
/**
* @description Returns the wrapper Ok value (if isOk)
*/
public get asOk (): O {
assert(this.isOk, 'Cannot extract Ok value from Error result, check isOk first');
assert(this.isOk, 'Cannot extract Ok value from Err result, check isOk first');
return this.value as O;
}
@@ -53,10 +60,17 @@ export class Result<O extends Codec, E extends Codec> extends Enum {
}
/**
* @description Checks if the Result wraps an Error value
* @description Checks if the Result wraps an Err value
*/
public get isErr (): boolean {
return !this.isOk;
}
/**
* @deprecated Use isErr
*/
public get isError (): boolean {
return !this.isOk;
return this.isErr;
}
/**
@@ -70,8 +84,8 @@ export class Result<O extends Codec, E extends Codec> extends Enum {
* @description Returns the base runtime type name for this instance
*/
public toRawType (): string {
const Types = this._toRawStruct() as { Ok: unknown; Error: unknown };
const Types = this._toRawStruct() as { Ok: unknown; Err: unknown };
return `Result<${Types.Ok as string},${Types.Error as string}>`;
return `Result<${Types.Ok as string},${Types.Err as string}>`;
}
}
+2 -2
View File
@@ -117,10 +117,10 @@ const infoMapping: Record<TypeDefInfo, (registry: Registry, value: TypeDef) => C
registry.getOrUnknown(value.type),
[TypeDefInfo.Result]: (registry: Registry, value: TypeDef): Constructor => {
const [Ok, Error] = getTypeClassArray(value);
const [Ok, Err] = getTypeClassArray(value);
// eslint-disable-next-line @typescript-eslint/no-use-before-define
return Result.with({ Error, Ok });
return Result.with({ Err, Ok });
},
[TypeDefInfo.Set]: (registry: Registry, value: TypeDef): Constructor => {
+1 -1
View File
@@ -66,7 +66,7 @@ describe('createType', (): void => {
it('allows creation of a Result', (): void => {
expect(
createTypeUnsafe(registry, 'Result<u32,Text>', ['0x011064656667']).toJSON()
).toEqual({ Error: 'defg' });
).toEqual({ Err: 'defg' });
});
it('allows creation of a Set', (): void => {
@@ -209,6 +209,7 @@ export default {
downwardMessages: 'Vec<InboundDownwardMessage>',
horizontalMessages: 'BTreeMap<ParaId, InboundHrmpMessages>'
},
MessageQueueChain: 'RelayChainHash',
OutboundHrmpMessage: {
recipient: 'u32',
data: 'Bytes'
@@ -216,6 +217,12 @@ export default {
ParachainDispatchOrigin: {
_enum: ['Signed', 'Parachain', 'Root']
},
ParachainInherentData: {
validationData: 'PersistedValidationData',
relayChainState: 'StorageProof',
downwardMessages: 'Vec<InboundDownwardMessage>',
horizontalMessages: 'BTreeMap<ParaId, VecInboundHrmpMessage>'
},
ParaGenesisArgs: {
genesisHead: 'Bytes',
validationCode: 'Bytes',
@@ -225,6 +232,9 @@ export default {
ParaInfo: {
scheduling: 'Scheduling'
},
ParaLifecycle: {
_enum: ['Onboarding', 'Parathread', 'Parachain', 'UpgradingToParachain', 'DowngradingToParathread', 'OutgoingParathread', 'OutgoingParachain']
},
ParaPastCodeMeta: {
upgradeTimes: 'Vec<BlockNumber>',
lastPruned: 'Option<BlockNumber>'
@@ -251,6 +261,7 @@ export default {
maxPovSize: 'u32'
},
RelayChainBlockNumber: 'u32',
RelayChainHash: 'Hash',
QueuedParathread: {
claim: 'ParathreadEntry',
coreOffset: 'u32'
@@ -525,12 +536,7 @@ export default {
egressChannels: 'Vec<MessagingStateSnapshotEgressEntry>'
},
MessagingStateSnapshotEgressEntry: '(ParaId, AbridgedHrmpChannel)',
SystemInherentData: {
validationData: 'PersistedValidationData',
relayChainState: 'StorageProof',
downwardMessages: 'Vec<InboundDownwardMessage>',
horizontalMessages: 'BTreeMap<ParaId, VecInboundHrmpMessage>'
},
SystemInherentData: 'ParachainInherentData',
VecInboundHrmpMessage: 'Vec<InboundHrmpMessage>'
}
} as Definitions;
@@ -444,6 +444,9 @@ export interface MessageIngestionType extends Struct {
readonly horizontalMessages: BTreeMap<ParaId, InboundHrmpMessages>;
}
/** @name MessageQueueChain */
export interface MessageQueueChain extends RelayChainHash {}
/** @name MessagingStateSnapshot */
export interface MessagingStateSnapshot extends Struct {
readonly relayDispatchQueueSize: ITuple<[u32, u32]>;
@@ -545,6 +548,14 @@ export interface ParachainDispatchOrigin extends Enum {
readonly isRoot: boolean;
}
/** @name ParachainInherentData */
export interface ParachainInherentData extends Struct {
readonly validationData: PersistedValidationData;
readonly relayChainState: StorageProof;
readonly downwardMessages: Vec<InboundDownwardMessage>;
readonly horizontalMessages: BTreeMap<ParaId, VecInboundHrmpMessage>;
}
/** @name ParachainProposal */
export interface ParachainProposal extends Struct {
readonly proposer: AccountId;
@@ -569,6 +580,17 @@ export interface ParaInfo extends Struct {
readonly scheduling: Scheduling;
}
/** @name ParaLifecycle */
export interface ParaLifecycle extends Enum {
readonly isOnboarding: boolean;
readonly isParathread: boolean;
readonly isParachain: boolean;
readonly isUpgradingToParachain: boolean;
readonly isDowngradingToParathread: boolean;
readonly isOutgoingParathread: boolean;
readonly isOutgoingParachain: boolean;
}
/** @name ParaPastCodeMeta */
export interface ParaPastCodeMeta extends Struct {
readonly upgradeTimes: Vec<BlockNumber>;
@@ -631,6 +653,9 @@ export interface RegisteredParachainInfo extends Struct {
/** @name RelayChainBlockNumber */
export interface RelayChainBlockNumber extends u32 {}
/** @name RelayChainHash */
export interface RelayChainHash extends Hash {}
/** @name RelayedFrom */
export interface RelayedFrom extends Struct {
readonly superorigin: MultiLocation;
@@ -727,12 +752,7 @@ export interface Statement extends Enum {
export interface SubId extends u32 {}
/** @name SystemInherentData */
export interface SystemInherentData extends Struct {
readonly validationData: PersistedValidationData;
readonly relayChainState: StorageProof;
readonly downwardMessages: Vec<InboundDownwardMessage>;
readonly horizontalMessages: BTreeMap<ParaId, VecInboundHrmpMessage>;
}
export interface SystemInherentData extends ParachainInherentData {}
/** @name TeleportAsset */
export interface TeleportAsset extends Struct {
@@ -82,6 +82,7 @@ export default {
type: 'Vec<PeerInfo>'
},
networkState: {
alias: ['system_unstable_networkState'],
description: 'Returns current state of the network',
params: [],
type: 'NetworkState'
@@ -26,7 +26,11 @@ export interface AccountInfoWithRefCount extends Struct {
/** @name ApplyExtrinsicResult */
export interface ApplyExtrinsicResult extends Result<DispatchOutcome, TransactionValidityError> {
readonly isErr: boolean;
readonly asErr: TransactionValidityError;
/** @deprecated Use isErr */
readonly isError: boolean;
/** @deprecated Use asErr */
readonly asError: TransactionValidityError;
readonly isOk: boolean;
readonly asOk: DispatchOutcome;
@@ -112,7 +116,11 @@ export interface DispatchInfoTo244 extends Struct {
/** @name DispatchOutcome */
export interface DispatchOutcome extends Result<ITuple<[]>, DispatchError> {
readonly isErr: boolean;
readonly asErr: DispatchError;
/** @deprecated Use isErr */
readonly isError: boolean;
/** @deprecated Use asErr */
readonly asError: DispatchError;
readonly isOk: boolean;
readonly asOk: ITuple<[]>;
@@ -120,7 +128,11 @@ export interface DispatchOutcome extends Result<ITuple<[]>, DispatchError> {
/** @name DispatchResult */
export interface DispatchResult extends Result<ITuple<[]>, DispatchError> {
readonly isErr: boolean;
readonly asErr: DispatchError;
/** @deprecated Use isErr */
readonly isError: boolean;
/** @deprecated Use asErr */
readonly asError: DispatchError;
readonly isOk: boolean;
readonly asOk: ITuple<[]>;
@@ -131,7 +143,11 @@ export interface DispatchResultOf extends DispatchResult {}
/** @name DispatchResultTo198 */
export interface DispatchResultTo198 extends Result<ITuple<[]>, Text> {
readonly isErr: boolean;
readonly asErr: Text;
/** @deprecated Use isErr */
readonly isError: boolean;
/** @deprecated Use asErr */
readonly asError: Text;
readonly isOk: boolean;
readonly asOk: ITuple<[]>;
+120 -120
View File
@@ -1743,46 +1743,46 @@ __metadata:
resolution: "@polkadot/api-contract@workspace:packages/api-contract"
dependencies:
"@babel/runtime": ^7.12.13
"@polkadot/api": 3.8.1
"@polkadot/types": 3.8.1
"@polkadot/util": ^5.6.1
"@polkadot/x-rxjs": ^5.6.1
"@polkadot/api": 3.9.2
"@polkadot/types": 3.9.2
"@polkadot/util": ^5.6.2
"@polkadot/x-rxjs": ^5.6.2
bn.js: ^4.11.9
languageName: unknown
linkType: soft
"@polkadot/api-derive@3.8.1, @polkadot/api-derive@workspace:packages/api-derive":
"@polkadot/api-derive@3.9.2, @polkadot/api-derive@workspace:packages/api-derive":
version: 0.0.0-use.local
resolution: "@polkadot/api-derive@workspace:packages/api-derive"
dependencies:
"@babel/runtime": ^7.12.13
"@polkadot/api": 3.8.1
"@polkadot/keyring": ^5.6.1
"@polkadot/rpc-core": 3.8.1
"@polkadot/rpc-provider": 3.8.1
"@polkadot/types": 3.8.1
"@polkadot/util": ^5.6.1
"@polkadot/util-crypto": ^5.6.1
"@polkadot/x-rxjs": ^5.6.1
"@polkadot/api": 3.9.2
"@polkadot/keyring": ^5.6.2
"@polkadot/rpc-core": 3.9.2
"@polkadot/rpc-provider": 3.9.2
"@polkadot/types": 3.9.2
"@polkadot/util": ^5.6.2
"@polkadot/util-crypto": ^5.6.2
"@polkadot/x-rxjs": ^5.6.2
bn.js: ^4.11.9
languageName: unknown
linkType: soft
"@polkadot/api@3.8.1, @polkadot/api@workspace:packages/api":
"@polkadot/api@3.9.2, @polkadot/api@workspace:packages/api":
version: 0.0.0-use.local
resolution: "@polkadot/api@workspace:packages/api"
dependencies:
"@babel/runtime": ^7.12.13
"@polkadot/api-derive": 3.8.1
"@polkadot/keyring": ^5.6.1
"@polkadot/metadata": 3.8.1
"@polkadot/rpc-core": 3.8.1
"@polkadot/rpc-provider": 3.8.1
"@polkadot/types": 3.8.1
"@polkadot/types-known": 3.8.1
"@polkadot/util": ^5.6.1
"@polkadot/util-crypto": ^5.6.1
"@polkadot/x-rxjs": ^5.6.1
"@polkadot/api-derive": 3.9.2
"@polkadot/keyring": ^5.6.2
"@polkadot/metadata": 3.9.2
"@polkadot/rpc-core": 3.9.2
"@polkadot/rpc-provider": 3.9.2
"@polkadot/types": 3.9.2
"@polkadot/types-known": 3.9.2
"@polkadot/util": ^5.6.2
"@polkadot/util-crypto": ^5.6.2
"@polkadot/x-rxjs": ^5.6.2
bn.js: ^4.11.9
eventemitter3: ^4.0.7
languageName: unknown
@@ -1879,70 +1879,70 @@ __metadata:
languageName: node
linkType: hard
"@polkadot/keyring@npm:^5.6.1":
version: 5.6.1
resolution: "@polkadot/keyring@npm:5.6.1"
"@polkadot/keyring@npm:^5.6.2":
version: 5.6.2
resolution: "@polkadot/keyring@npm:5.6.2"
dependencies:
"@babel/runtime": ^7.12.13
"@polkadot/util": 5.6.1
"@polkadot/util-crypto": 5.6.1
"@polkadot/util": 5.6.2
"@polkadot/util-crypto": 5.6.2
peerDependencies:
"@polkadot/util": 5.6.1
"@polkadot/util-crypto": 5.6.1
checksum: 3e6435f7b17cfaffafa6aabd7a94966bcd06dbab52c0215aabef0fa74fb354514538217e6f8a87beef3f20539c0d2a1646a5ff34b84097416bb3089e76078a33
"@polkadot/util": 5.6.2
"@polkadot/util-crypto": 5.6.2
checksum: c49b53ced68905250656e2b060bcb5a1876a05c36458d7786e1096157f250f5e56e4064e2f4ca6023918aebe99b4579914770d104ce14490cbe63cb6401a99ad
languageName: node
linkType: hard
"@polkadot/metadata@3.8.1, @polkadot/metadata@workspace:packages/metadata":
"@polkadot/metadata@3.9.2, @polkadot/metadata@workspace:packages/metadata":
version: 0.0.0-use.local
resolution: "@polkadot/metadata@workspace:packages/metadata"
dependencies:
"@babel/runtime": ^7.12.13
"@polkadot/keyring": ^5.6.1
"@polkadot/types": 3.8.1
"@polkadot/types-known": 3.8.1
"@polkadot/util": ^5.6.1
"@polkadot/util-crypto": ^5.6.1
"@polkadot/keyring": ^5.6.2
"@polkadot/types": 3.9.2
"@polkadot/types-known": 3.9.2
"@polkadot/util": ^5.6.2
"@polkadot/util-crypto": ^5.6.2
bn.js: ^4.11.9
languageName: unknown
linkType: soft
"@polkadot/networks@npm:5.6.1, @polkadot/networks@npm:^5.6.1":
version: 5.6.1
resolution: "@polkadot/networks@npm:5.6.1"
"@polkadot/networks@npm:5.6.2, @polkadot/networks@npm:^5.6.2":
version: 5.6.2
resolution: "@polkadot/networks@npm:5.6.2"
dependencies:
"@babel/runtime": ^7.12.13
checksum: 35079deb9b5b90946ade5e3608bd8f4c73c80ee6515a0961588ffa1416474b95e244a0521eabcaea0588a0abc5ff963002c7afa318bf630d140be4e26f44c605
checksum: 52390d2ebf61f97ba36b05c015a33f992e20d128b1628412f431033609c234c0437f640d9c8adff2438cb19ab40b39f0d9345d13afa2241440cc877d19139a42
languageName: node
linkType: hard
"@polkadot/rpc-core@3.8.1, @polkadot/rpc-core@workspace:packages/rpc-core":
"@polkadot/rpc-core@3.9.2, @polkadot/rpc-core@workspace:packages/rpc-core":
version: 0.0.0-use.local
resolution: "@polkadot/rpc-core@workspace:packages/rpc-core"
dependencies:
"@babel/runtime": ^7.12.13
"@polkadot/keyring": ^5.6.1
"@polkadot/metadata": 3.8.1
"@polkadot/rpc-provider": 3.8.1
"@polkadot/types": 3.8.1
"@polkadot/util": ^5.6.1
"@polkadot/x-rxjs": ^5.6.1
"@polkadot/keyring": ^5.6.2
"@polkadot/metadata": 3.9.2
"@polkadot/rpc-provider": 3.9.2
"@polkadot/types": 3.9.2
"@polkadot/util": ^5.6.2
"@polkadot/x-rxjs": ^5.6.2
languageName: unknown
linkType: soft
"@polkadot/rpc-provider@3.8.1, @polkadot/rpc-provider@workspace:packages/rpc-provider":
"@polkadot/rpc-provider@3.9.2, @polkadot/rpc-provider@workspace:packages/rpc-provider":
version: 0.0.0-use.local
resolution: "@polkadot/rpc-provider@workspace:packages/rpc-provider"
dependencies:
"@babel/runtime": ^7.12.13
"@polkadot/keyring": ^5.6.1
"@polkadot/metadata": 3.8.1
"@polkadot/types": 3.8.1
"@polkadot/util": ^5.6.1
"@polkadot/util-crypto": ^5.6.1
"@polkadot/x-fetch": ^5.6.1
"@polkadot/x-global": ^5.6.1
"@polkadot/x-ws": ^5.6.1
"@polkadot/keyring": ^5.6.2
"@polkadot/metadata": 3.9.2
"@polkadot/types": 3.9.2
"@polkadot/util": ^5.6.2
"@polkadot/util-crypto": ^5.6.2
"@polkadot/x-fetch": ^5.6.2
"@polkadot/x-global": ^5.6.2
"@polkadot/x-ws": ^5.6.2
bn.js: ^4.11.9
eventemitter3: ^4.0.7
mock-socket: ^9.0.3
@@ -1966,11 +1966,11 @@ __metadata:
"@babel/core": ^7.12.13
"@babel/register": ^7.12.13
"@babel/runtime": ^7.12.13
"@polkadot/api": 3.8.1
"@polkadot/metadata": 3.8.1
"@polkadot/rpc-provider": 3.8.1
"@polkadot/types": 3.8.1
"@polkadot/util": ^5.6.1
"@polkadot/api": 3.9.2
"@polkadot/metadata": 3.9.2
"@polkadot/rpc-provider": 3.9.2
"@polkadot/types": 3.9.2
"@polkadot/util": ^5.6.2
"@types/websocket": ^1.0.1
"@types/yargs": ^16.0.0
handlebars: ^4.7.6
@@ -1985,43 +1985,43 @@ __metadata:
languageName: unknown
linkType: soft
"@polkadot/types-known@3.8.1, @polkadot/types-known@workspace:packages/types-known":
"@polkadot/types-known@3.9.2, @polkadot/types-known@workspace:packages/types-known":
version: 0.0.0-use.local
resolution: "@polkadot/types-known@workspace:packages/types-known"
dependencies:
"@babel/runtime": ^7.12.13
"@polkadot/networks": ^5.6.1
"@polkadot/types": 3.8.1
"@polkadot/util": ^5.6.1
"@polkadot/networks": ^5.6.2
"@polkadot/types": 3.9.2
"@polkadot/util": ^5.6.2
"@types/bn.js": ^4.11.6
bn.js: ^4.11.9
languageName: unknown
linkType: soft
"@polkadot/types@3.8.1, @polkadot/types@workspace:packages/types":
"@polkadot/types@3.9.2, @polkadot/types@workspace:packages/types":
version: 0.0.0-use.local
resolution: "@polkadot/types@workspace:packages/types"
dependencies:
"@babel/runtime": ^7.12.13
"@polkadot/keyring": ^5.6.1
"@polkadot/metadata": 3.8.1
"@polkadot/util": ^5.6.1
"@polkadot/util-crypto": ^5.6.1
"@polkadot/x-rxjs": ^5.6.1
"@polkadot/keyring": ^5.6.2
"@polkadot/metadata": 3.9.2
"@polkadot/util": ^5.6.2
"@polkadot/util-crypto": ^5.6.2
"@polkadot/x-rxjs": ^5.6.2
"@types/bn.js": ^4.11.6
bn.js: ^4.11.9
languageName: unknown
linkType: soft
"@polkadot/util-crypto@npm:5.6.1, @polkadot/util-crypto@npm:^5.6.1":
version: 5.6.1
resolution: "@polkadot/util-crypto@npm:5.6.1"
"@polkadot/util-crypto@npm:5.6.2, @polkadot/util-crypto@npm:^5.6.2":
version: 5.6.2
resolution: "@polkadot/util-crypto@npm:5.6.2"
dependencies:
"@babel/runtime": ^7.12.13
"@polkadot/networks": 5.6.1
"@polkadot/util": 5.6.1
"@polkadot/networks": 5.6.2
"@polkadot/util": 5.6.2
"@polkadot/wasm-crypto": ^3.2.2
"@polkadot/x-randomvalues": 5.6.1
"@polkadot/x-randomvalues": 5.6.2
base-x: ^3.0.8
blakejs: ^1.1.0
bn.js: ^4.11.9
@@ -2033,23 +2033,23 @@ __metadata:
tweetnacl: ^1.0.3
xxhashjs: ^0.2.2
peerDependencies:
"@polkadot/util": 5.6.1
checksum: d898b9c53e7931c56fd2b7c9bdcbea8938cc5357ecac57ecc96bd01915b2857f183c007ab7c2de502b7c67c037494194316c1cafa61dd44547b66cb3d1b09105
"@polkadot/util": 5.6.2
checksum: 64fc5191a7b56e419fb1cbfddfe635f865b152cfb886261d6ceacbe262f243bd2611290ce7d7f37f0d19a340ae58219b1aed1452a4f501cbabd6a045ad35250c
languageName: node
linkType: hard
"@polkadot/util@npm:5.6.1, @polkadot/util@npm:^5.6.1":
version: 5.6.1
resolution: "@polkadot/util@npm:5.6.1"
"@polkadot/util@npm:5.6.2, @polkadot/util@npm:^5.6.2":
version: 5.6.2
resolution: "@polkadot/util@npm:5.6.2"
dependencies:
"@babel/runtime": ^7.12.13
"@polkadot/x-textdecoder": 5.6.1
"@polkadot/x-textencoder": 5.6.1
"@polkadot/x-textdecoder": 5.6.2
"@polkadot/x-textencoder": 5.6.2
"@types/bn.js": ^4.11.6
bn.js: ^4.11.9
camelcase: ^5.3.1
ip-regex: ^4.3.0
checksum: e9d28365704513ecd1f1cb0209280160278ec03986ee5587e6b0babaa7d67f34b8b3a59d81870ea08f814284d00be92a34eeabf9152547a5089a6de317cb6201
checksum: a7217afa9f4f5b8aef4273417c8454de4f459a8d3150688a51098dce7537255993ecbc512a3e625bf5111d2db04674200f35e0cc4c464cf59162775ca895a4c9
languageName: node
linkType: hard
@@ -2085,78 +2085,78 @@ __metadata:
languageName: node
linkType: hard
"@polkadot/x-fetch@npm:^5.6.1":
version: 5.6.1
resolution: "@polkadot/x-fetch@npm:5.6.1"
"@polkadot/x-fetch@npm:^5.6.2":
version: 5.6.2
resolution: "@polkadot/x-fetch@npm:5.6.2"
dependencies:
"@babel/runtime": ^7.12.13
"@polkadot/x-global": 5.6.1
"@polkadot/x-global": 5.6.2
"@types/node-fetch": ^2.5.8
node-fetch: ^2.6.1
checksum: 1c63e35eca565f72708c1e50c483ecb35b210481835d6e6e0a8045fed655002af53c39c902a013079ceca6a1283b5c3a4cf1aaac3eb49b00f4cc02d7d7c55fd0
checksum: f5e8928c53a8a564013c81f4e9d81d46e8682d8a5e2eeb6862b086ce87095c3f4159b197196d6dfd8d5055a228f2fa9ead188578c2183601c494e88ea6b56149
languageName: node
linkType: hard
"@polkadot/x-global@npm:5.6.1, @polkadot/x-global@npm:^5.6.1":
version: 5.6.1
resolution: "@polkadot/x-global@npm:5.6.1"
"@polkadot/x-global@npm:5.6.2, @polkadot/x-global@npm:^5.6.2":
version: 5.6.2
resolution: "@polkadot/x-global@npm:5.6.2"
dependencies:
"@babel/runtime": ^7.12.13
"@types/node-fetch": ^2.5.8
node-fetch: ^2.6.1
checksum: e0de9e7e7a23b745ad8e7b33ea954404c3a6bfdaf5a7bf820a6f4fb858bbb525b632b1521d076d0addb4aa13334d8e681a4961940186fd77baeedea106812898
checksum: 9186e68718cf49d28d6feacd056ab15f29697005dee2dbbe68aa24f340c15f8c9fd2cd47e428a4d43904b190d155d0341cfc6591fb75ae0ad6fadd08cfb8cc26
languageName: node
linkType: hard
"@polkadot/x-randomvalues@npm:5.6.1":
version: 5.6.1
resolution: "@polkadot/x-randomvalues@npm:5.6.1"
"@polkadot/x-randomvalues@npm:5.6.2":
version: 5.6.2
resolution: "@polkadot/x-randomvalues@npm:5.6.2"
dependencies:
"@babel/runtime": ^7.12.13
"@polkadot/x-global": 5.6.1
checksum: 19e4e7210c144c25814b9e1572385dbc244f0aea4fa863c3ca4563771ea60a43ba64e9de4fafcc18101f2623a8ae04cbf25dc04ca1cb7eb8d7879623551aa317
"@polkadot/x-global": 5.6.2
checksum: fc03639005458092d32367ccbc21ed7c5935a74de75f98928fde6e20f7fe72092e138e5734fd61c654d9a8c07468d499760cfda9bfb6f56aab763733790fbeef
languageName: node
linkType: hard
"@polkadot/x-rxjs@npm:^5.6.1":
version: 5.6.1
resolution: "@polkadot/x-rxjs@npm:5.6.1"
"@polkadot/x-rxjs@npm:^5.6.2":
version: 5.6.2
resolution: "@polkadot/x-rxjs@npm:5.6.2"
dependencies:
"@babel/runtime": ^7.12.13
rxjs: ^6.6.3
checksum: 625c0676a557b0db62ef3a4f02f7a258031fb4357b95249b01872b410a577fc0089f7cefe4ed665e27728009b6190f68e01410bb5978c9b21102d96aa786fca1
checksum: 20492e114f30813d030a7738252d61b340008f09f73387ebdb7406255adef242dfb67e73dd1ce758dd7d9c676798d3453f1443f12257645ab2df940a36a1b7de
languageName: node
linkType: hard
"@polkadot/x-textdecoder@npm:5.6.1":
version: 5.6.1
resolution: "@polkadot/x-textdecoder@npm:5.6.1"
"@polkadot/x-textdecoder@npm:5.6.2":
version: 5.6.2
resolution: "@polkadot/x-textdecoder@npm:5.6.2"
dependencies:
"@babel/runtime": ^7.12.13
"@polkadot/x-global": 5.6.1
checksum: c7898f26bb12ef3ded5e47f0baaa6586dc969801bf9064cb47161ed4aec8068f6eb64faa374bd33e9bbb30e3bfae83da5938a0088b6d82571bd571ad91a22fdb
"@polkadot/x-global": 5.6.2
checksum: 3e3d6e47085f9ffa2ae1a4fc7f2e1aaed1e0a53fd25e06e64b3be77b1424c5dda6df20b3ba295dafab067fcfeff5c659766b60fa2c7b81757f193d077611b963
languageName: node
linkType: hard
"@polkadot/x-textencoder@npm:5.6.1":
version: 5.6.1
resolution: "@polkadot/x-textencoder@npm:5.6.1"
"@polkadot/x-textencoder@npm:5.6.2":
version: 5.6.2
resolution: "@polkadot/x-textencoder@npm:5.6.2"
dependencies:
"@babel/runtime": ^7.12.13
"@polkadot/x-global": 5.6.1
checksum: 77ec29c53e940dbd966251ff3d2395c4dd51049318dcdd7ceaa6672dab6fe8d3a0537639b00cf63e73595f7f4d133e8d544abb4c32b06777a7134ba7e523d179
"@polkadot/x-global": 5.6.2
checksum: d2db718190ac121da44af9e635ab755fdf862a3c109f537c08f05befc6bda1a8d5c509465e75154e405dff7136398a808be3c7c939967560f5ccec9da93dd755
languageName: node
linkType: hard
"@polkadot/x-ws@npm:^5.6.1":
version: 5.6.1
resolution: "@polkadot/x-ws@npm:5.6.1"
"@polkadot/x-ws@npm:^5.6.2":
version: 5.6.2
resolution: "@polkadot/x-ws@npm:5.6.2"
dependencies:
"@babel/runtime": ^7.12.13
"@polkadot/x-global": 5.6.1
"@polkadot/x-global": 5.6.2
"@types/websocket": ^1.0.1
websocket: ^1.0.33
checksum: f350557ef1bf5c6e9477efa693a03e3ce98475233800ce965ebfea32ccc63f8353afc774d746462508d5ec3280a62e10be063cc5a5e72c0daa88ff41fe59ec87
checksum: ed5ba3cad4998c26a9c1537b20701fa9c1f040c4c1335b2bcac634d56872127f2b79dae8e0c112a3ac6c06dcf2fbd7fea03d2c03e43258c425cc9bfe37cd8944
languageName: node
linkType: hard