Compare commits

..
50 Commits
Author SHA1 Message Date
github-actions[bot] a9fa603ad8 [CI Skip] release/stable 11.0.1
skip-checks: true
2024-04-23 21:08:58 +00:00
Tarik Gul d86bff91a7 11.0.1 (#5864) 2024-04-24 00:01:19 +03:00
github-actions[bot] 26b5303c2d [CI Skip] bump/beta 10.13.2-3-x
skip-checks: true
2024-04-23 18:13:43 +00:00
Tarik Gul b4ebdc29a1 Add claimedRewardsEra to api.derive.staking.query for compatibility with legacyClaimedRewards (#5862)
* Fix ClaimedRewards breaking change

* fix some naming

* remove consoles

* Fix logic

* fix output type

* Fix StakerRewards

* Fix electedInfo
2024-04-23 21:06:11 +03:00
github-actions[bot] 6e4dc0b52d [CI Skip] bump/beta 10.13.2-2-x
skip-checks: true
2024-04-23 12:48:34 +00:00
Matias Volpe 02ec613def Bump @substrate/connect to 0.8.10 (#5863) 2024-04-23 08:41:06 -04:00
github-actions[bot] a83e1da941 [CI Skip] bump/beta 10.13.2-1-x
skip-checks: true
2024-04-22 19:54:07 +00:00
Tarik Gul c4e8270b45 Update api.derive.staking calls with breaking changes (#5860)
* Fix staking derives

* ownexposure

* fix query

* Add WithExposureMEta

* exposureMEta

* fix ownExposures

* Add page input for staking.query

* Update types for query

* add page param to ownExposure

* change page to exposurePaged

* fix small nit
2024-04-22 22:46:33 +03:00
github-actions[bot] ddb9b44460 [CI Skip] bump/beta 10.13.2-0-x
skip-checks: true
2024-04-21 13:22:40 +00:00
Tarik Gul 887812eeaa Update polkadot types-known for latest runtime upgrades (#5857) 2024-04-21 16:15:10 +03:00
github-actions[bot] 6415eb6515 [CI Skip] release/stable 10.13.1
skip-checks: true
2024-04-16 17:44:32 +00:00
Tarik Gul 06c829d30f 10.13.1 (#5854) 2024-04-16 20:37:03 +03:00
github-actions[bot] efd6ba9a4c [CI Skip] bump/beta 10.12.7-5-x
skip-checks: true
2024-04-16 15:31:19 +00:00
Tarik Gul a1f2473fb4 Update kusama types-known for 1001003 (#5853) 2024-04-16 18:23:44 +03:00
github-actions[bot] 9e53fc060d [CI Skip] bump/beta 10.12.7-4-x
skip-checks: true
2024-04-16 14:47:38 +00:00
Tarik Gul 364001f287 Update westend types-known for 1010000 (#5852) 2024-04-16 17:40:02 +03:00
github-actions[bot] 5bcd56d6c3 [CI Skip] bump/beta 10.12.7-3-x
skip-checks: true
2024-04-15 20:49:17 +00:00
Tarik Gul 5b3f18e6fd Resolve correct module for council derive (#5851)
* Resolve correct module for council derive

* remove console
2024-04-15 23:41:40 +03:00
github-actions[bot] 8ab79958f0 [CI Skip] bump/beta 10.12.7-2-x
skip-checks: true
2024-04-13 21:32:54 +00:00
Tarik Gul 1343aa4651 Support ParachainHost runtime Api v6 7 8 9 10 (#5850)
* Add initial update for parachainHost

* Add v6,7,8,9,10

* fix version nit

* change bytes to u32 for usize
2024-04-14 00:25:26 +03:00
github-actions[bot] a311fed87e [CI Skip] bump/beta 10.12.7-1-x
skip-checks: true
2024-04-13 16:51:25 +00:00
Tarik Gul c0590bc5fe Update substrate metadata latest (#5849) 2024-04-13 19:43:56 +03:00
github-actions[bot] d650744984 [CI Skip] bump/beta 10.12.7-0-x
skip-checks: true
2024-04-08 16:58:49 +00:00
Tarik Gul 7baf2ecf7a Update CI actions and setup_node to v4 (#5844) 2024-04-08 19:51:04 +03:00
github-actions[bot] accfce9785 [CI Skip] release/stable 10.12.6
skip-checks: true
2024-04-03 03:35:00 +00:00
Tarik Gul 0349c39907 10.12.6 (#5842) 2024-04-03 06:26:39 +03:00
github-actions[bot] 155701a7b1 [CI Skip] release/stable 10.12.5
skip-checks: true
2024-04-02 21:04:34 +00:00
Tarik Gul c6e5cb812b 10.12.5 (#5840)
* 10.12.5

* Update changelog
2024-04-02 23:57:19 +03:00
github-actions[bot] 63f3fc8a89 [CI Skip] bump/beta 10.12.5-8-x
skip-checks: true
2024-04-02 14:35:31 +00:00
Tarik Gul 591e9b145d Add assetId field to to necessary ExtrinsicPayloads (#5839)
* Add assetId field to GenericExtrinsicPayload

* Update AssetId usage

* update nits

* Update packages/types/src/extrinsic/Extrinsic.ts
2024-04-02 17:28:05 +03:00
github-actions[bot] caca8ce345 [CI Skip] bump/beta 10.12.5-7-x
skip-checks: true
2024-04-01 13:48:53 +00:00
Tarik Gul ccae7c9421 Add Updated Runtime Defintions (#5837)
* Start v15 runtime api support

* Update root too mmr_root

* fix MmrError type

* ensure type is generated

* Add ValidateStatement

* touch up statement

* Update core

* get core fixed

* Fix ExtrinsicInclusionMode type

* add mixnet

* Fix mixnet export

* fix type

* Add GenesisBuilder
2024-04-01 16:41:30 +03:00
github-actions[bot] be0a764be7 [CI Skip] bump/beta 10.12.5-6-x
skip-checks: true
2024-03-28 19:00:05 +00:00
Tarik Gul 4be19804b2 V15 Update substrate latest metadata (#5838) 2024-03-28 20:52:39 +02:00
github-actions[bot] 7874a8e723 [CI Skip] bump/beta 10.12.5-5-x
skip-checks: true
2024-03-26 01:04:15 +00:00
Tarik Gul 5e9eed426a Bump yarn to 4.1.1 (#5836) 2024-03-26 02:57:02 +02:00
github-actions[bot] ff3b798ea4 [CI Skip] bump/beta 10.12.5-4-x
skip-checks: true
2024-03-24 15:42:37 +00:00
Snoppy 62163ea5a7 chore: fix typos (#5835) 2024-03-24 11:35:30 -04:00
github-actions[bot] 96cde82c60 [CI Skip] bump/beta 10.12.5-3-x
skip-checks: true
2024-03-24 15:26:12 +00:00
Lauro Gripa a2ea6a36d1 Fix multi call of defenderVotes and isDefenderVoter flag in society.members derivation (#5834)
* Fix society members derivation and add regression test

* Remove regression test for now

* Optimize challenge round query

* Make linter happy

* Return true for isDefenderVoter even if the member vote for rejection
2024-03-24 11:18:48 -04:00
github-actions[bot] 5531d180d7 [CI Skip] bump/beta 10.12.5-2-x
skip-checks: true
2024-03-22 23:12:13 +00:00
Tarik Gul aacf0726e4 Update substrate latest metadata (#5833)
* Update substrate latest metadata

* imports
2024-03-23 01:04:57 +02:00
github-actions[bot] 9fde30a1d6 [CI Skip] bump/beta 10.12.5-1-x
skip-checks: true
2024-03-21 17:25:11 +00:00
Tarik Gul 0982f68507 Add disableAscii option for toHuman, and toPrimitive (#5831)
* Add `allowAscii` option for toHuman, and toPrimitive

* change allowAscii to disableAscii

* add test

* Ensure Struct passes down the value to Raw, and add disableAscii to other types

* ensure CodecMap also has disableAscii

* toPrimitive CodecMap disableAscii

* add toPrimitive options
2024-03-21 19:17:53 +02:00
github-actions[bot] bfabfcd99f [CI Skip] bump/beta 10.12.5-0-x
skip-checks: true
2024-03-21 14:20:42 +00:00
Tarik Gul 64ac37ee4d Update westend runtime upgrade 1009000 (#5832) 2024-03-21 16:13:22 +02:00
github-actions[bot] 442a0fbbf8 [CI Skip] release/stable 10.12.4
skip-checks: true
2024-03-19 13:22:04 +00:00
Tarik Gul 615e4c67fd 10.12.4 (#5830) 2024-03-19 15:15:00 +02:00
github-actions[bot] 1c7f3b157d [CI Skip] bump/beta 10.12.4-0-x
skip-checks: true
2024-03-19 12:37:40 +00:00
Javier Viola b0ce49de18 add muln(2), as was in the old code (#5829) 2024-03-19 08:30:22 -04:00
124 changed files with 39943 additions and 16918 deletions
+2 -2
View File
@@ -11,8 +11,8 @@ jobs:
env:
YARN_ENABLE_SCRIPTS: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- uses: denoland/setup-deno@v1
+2 -2
View File
@@ -18,11 +18,11 @@ jobs:
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT_BOT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_PAT_BOT }}
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: ${{ matrix.step }}
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -12,4 +12,4 @@ logFilters:
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-4.1.0.cjs
yarnPath: .yarn/releases/yarn-4.1.1.cjs
+87
View File
@@ -1,5 +1,92 @@
# CHANGELOG
## 11.0.1 Apr 23, 2024
Breaking Changes:
Note! The following breaking changes only refer to `@polkadot/api-derive` calls under `api.derive.staking.*` due to the most recent breaking changes in runtime version v1.2. Please refer to the link next to the bullet points for more information.
- Update` api.derive.staking` calls with breaking changes ([#5860](https://github.com/polkadot-js/api/pull/5860))
- Add `claimedRewardsEra` to api.derive.staking.query for compatibility with legacyClaimedRewards ([#5862](https://github.com/polkadot-js/api/pull/5862))
Contributed:
- Bump @substrate/connect to 0.8.10 (Thanks to https://github.com/kratico)
Changes:
- Update polkadot types-known for latest runtime upgrades
## 10.13.1 Apr 16, 2024
Changes:
- Update CI actions and setup_node to v4
- Update substrate metadata to latest
- Support ParachainHost runtime api v6, 7, 8, 9, 10
- Resolve correct module for council derive
- Update westend types-known for 1010000
- Update kusama types-known for 1001003
## 10.12.6 Apr 2, 2024
**NOTE**: Because of a broken CI build for 10.12.5 -> 10.12.6 is a replacement
Contributed:
- chore: fix typos in error (Thanks to https://github.com/xiaoxianBoy)
Changes:
- Upgrade westend types-known for 1009000
- Add `disableAscii` option for toHuman, and toPrimitive
- V14 Update substrate latest metadata
- V15 Update substrate latest metadata
- Bump yarn to 4.1.1
- Add `assetId` getter field to to necessary ExtrinsicPayloads
- Add Updated Runtime Defintions
- ValidateStatement
- MMRApi
- mmr_root
- mmr_leaf_count
- Core v5
- GenesisBuilder
- MixnetApi
## 10.12.5 Apr 2, 2024
Contributed:
- chore: fix typos in error (Thanks to https://github.com/xiaoxianBoy)
Changes:
- Upgrade westend types-known for 1009000
- Add `disableAscii` option for toHuman, and toPrimitive
- V14 Update substrate latest metadata
- V15 Update substrate latest metadata
- Bump yarn to 4.1.1
- Add `assetId` getter field to to necessary ExtrinsicPayloads
- Add Updated Runtime Defintions
- ValidateStatement
- MMRApi
- mmr_root
- mmr_leaf_count
- Core v5
- GenesisBuilder
- MixnetApi
## 10.12.4 Mar 19, 2024
Contributed:
- Fix add muln(2) to signingInfo Derive (Thanks to https://github.com/pepoviola)
## 10.12.3 Mar 18, 2024
Contributed:
+5 -3
View File
@@ -1,10 +1,10 @@
3512 Jaco Bump deps (#5785)
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
37 Keith Ingram Update contract types and rpc (#4541)
37 Tarik Gul 11.0.1 (#5864)
35 Stefanie Doll Updated child storage parameters (#1709)
20 Luke Schoen fix: Fixes TypeError: Cannot read property 'vesting' of undefined (#1970)
19 Xiliang Chen no warm for unknown signed extensions (#5601)
16 Tarik Gul 10.12.3 (#5828)
15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054)
14 Nikos Kontakis Bump substrate connect to 0.7.16 (#5307)
11 Ian He HttpProvider support clone() (#3949)
@@ -13,11 +13,11 @@
5 Chevdor Fix metadata package link (#3458)
5 Jake Naviasky Fixing approvalFlagsToBools. (#1250)
5 Julien Eluard General WsProvider extensibility improvements (#5467)
5 Matias Volpe Bump @substrate/connect to 0.8.10 (#5863)
4 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
4 Alex Wang fix issue that creates duplicate providers (#983)
4 Alexander Popiak Add asset id in signing (#4009)
4 Joshy Orndorff spelling; efect -> effect (#2295)
4 Matias Volpe Bump @substrate/connect to 0.8.8 (#5817)
4 Nantian fix bigint type (#3869)
4 Scott Twiname Add support for historical BlockNumber rpc methods (#4574)
4 Thibaut Sardan no subscription for http (#3127)
@@ -41,6 +41,7 @@
2 HackFisher Update maxExtrinsic definition (#4703)
2 Jakub Pánik All heads subscription (#1899)
2 James Lefrère Add `.eq()` usage to docs and fix docs typos (#1405)
2 Javier Viola add muln(2), as was in the old code (#5829)
2 Jeeyong Um Alias for Noir types (#5678)
2 Jegor Sidorenko Use Box<XcmV3MultiLocation> instead of MultiAssetId (#5700)
2 Keith Yeung Allow keyPrefix to accept an additional argument for double maps (#2230)
@@ -82,7 +83,6 @@
1 Hyungsuk Kang Update fees.ts (#1014)
1 icodezjb Update SessionKeys (#3035)
1 iiiiiiii Make unknownTypes externally accessible (#3263)
1 Javier Viola fix: check if minimumPeriod is zero (#5827)
1 JesseAbram added 07 Example showing how to make a transfer with allowed block permissions folder in docs (#1062)
1 Joey don't throw error at `onSocketClose` (#4363)
1 Jordan Allow typegen for custom RPCs (#2876)
@@ -92,6 +92,7 @@
1 Kian Paimani Update definitions.ts (#2514)
1 Krzysztof Jelski Derive for bounties and descriptions (#2925)
1 Lae Make sure awaiting on an api object won't stuck forever on error (#1763)
1 Lauro Gripa Fix multi call of `defenderVotes` and `isDefenderVoter` flag in `society.members` derivation (#5834)
1 Lezek123 BTreeSet and BTreeMap - encoding and serialization fixes (#3789)
1 Lovesh Harchandani Fix name of "getBlock" in package "api-derive" and export it in "index.ts" (#2857)
1 Marc Fornós add beefy compact signed commitment definition (#5781)
@@ -125,6 +126,7 @@
1 serge make WS provider timeout configurable (#4758)
1 Sergei Pepyakin INK! -> ink! (#1347)
1 Shunji Zhan small polish (#5276)
1 Snoppy chore: fix typos (#5835)
1 Stephen Shelton Add transaction-payment runtime API V3 (#5430)
1 Tim B added EthRTApiV5 ifaces (#5680)
1 WoeOm adapt Darwinia, Crab Network types (#3498)
+4 -4
View File
@@ -6,7 +6,7 @@
},
"homepage": "https://github.com/polkadot-js/api#readme",
"license": "Apache-2.0",
"packageManager": "yarn@4.1.0",
"packageManager": "yarn@4.1.1",
"private": true,
"repository": {
"type": "git",
@@ -14,10 +14,10 @@
},
"sideEffects": false,
"type": "module",
"version": "10.12.3",
"version": "11.0.1",
"versions": {
"git": "10.12.3",
"npm": "10.12.3"
"git": "11.0.1",
"npm": "11.0.1"
},
"workspaces": [
"packages/*"
+6 -6
View File
@@ -18,14 +18,14 @@
"./packageDetect.cjs"
],
"type": "module",
"version": "10.12.3",
"version": "11.0.1",
"main": "index.js",
"dependencies": {
"@polkadot/api-base": "10.12.3",
"@polkadot/rpc-augment": "10.12.3",
"@polkadot/types": "10.12.3",
"@polkadot/types-augment": "10.12.3",
"@polkadot/types-codec": "10.12.3",
"@polkadot/api-base": "11.0.1",
"@polkadot/rpc-augment": "11.0.1",
"@polkadot/types": "11.0.1",
"@polkadot/types-augment": "11.0.1",
"@polkadot/types-codec": "11.0.1",
"@polkadot/util": "^12.6.2",
"tslib": "^2.6.2"
}
+149 -3
View File
@@ -6,7 +6,7 @@
import '@polkadot/api-base/types/calls';
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, Vec, u32 } from '@polkadot/types-codec';
import type { Bytes, Null, Option, Result, U64, Vec, bool, u32 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
import type { BeefyAuthoritySet, BeefyEquivocationProof, BeefyNextAuthoritySet, ValidatorSet, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
@@ -14,12 +14,16 @@ import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfa
import type { BlockHash } from '@polkadot/types/interfaces/chain';
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
import type { GenesisBuildErr } from '@polkadot/types/interfaces/genesisBuilder';
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError } from '@polkadot/types/interfaces/mmr';
import type { NpPoolId } from '@polkadot/types/interfaces/nompools';
import type { ApprovalVotingParams, AsyncBackingParams, BackingState, CandidateCommitments, CandidateEvent, CandidateHash, CommittedCandidateReceipt, CoreState, DisputeProof, DisputeState, ExecutorParams, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, NodeFeatures, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PendingSlashes, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
import type { AccountId, Balance, Block, BlockNumber, Call, Hash, Header, Index, KeyTypeId, Slot, Weight } from '@polkadot/types/interfaces/runtime';
import type { AccountId, Balance, Block, BlockNumber, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime';
import type { SessionIndex } from '@polkadot/types/interfaces/session';
import type { ValidatorIndex } from '@polkadot/types/interfaces/staking';
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue';
@@ -163,6 +167,21 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xfbc577b9d747efd6/1 */
genesisBuilder: {
/**
* Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the storage.
**/
buildConfig: AugmentedCall<ApiType, (json: Bytes | string | Uint8Array) => Observable<Result<ITuple<[]>, GenesisBuildErr>>>;
/**
* Creates the default `RuntimeGenesisConfig` and returns it as a JSON blob.
**/
createDefaultConfig: AugmentedCall<ApiType, () => Observable<Bytes>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xed99c5acb25eedf5/3 */
grandpaApi: {
/**
@@ -211,10 +230,14 @@ declare module '@polkadot/api-base/types/calls' {
* Generate MMR proof for the given block numbers.
**/
generateProof: AugmentedCall<ApiType, (blockNumbers: Vec<BlockNumber> | (BlockNumber | AnyNumber | Uint8Array)[], bestKnownBlockNumber: Option<BlockNumber> | null | Uint8Array | BlockNumber | AnyNumber) => Observable<Result<ITuple<[Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof]>, MmrError>>>;
/**
* Return the number of MMR blocks in the chain.
**/
mmrLeafCount: AugmentedCall<ApiType, () => Observable<Result<U64, MmrError>>>;
/**
* Return the on-chain MMR root hash.
**/
root: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
mmrRoot: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
/**
* Verify MMR proof against on-chain MMR.
**/
@@ -258,6 +281,129 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xaf2c0297a23e6d3d/10 */
parachainHost: {
/**
* Approval voting configuration parameters
**/
approvalVotingParams: AugmentedCall<ApiType, () => Observable<ApprovalVotingParams>>;
/**
* Returns the persisted validation data for the given `ParaId` along with the corresponding validation code hash.
**/
assumedValidationData: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, hash: Hash | string | Uint8Array) => Observable<Option<ITuple<[PersistedValidationData, ValidationCodeHash]>>>>;
/**
* Returns candidate's acceptance limitations for asynchronous backing for a relay parent
**/
asyncBackingParams: AugmentedCall<ApiType, () => Observable<AsyncBackingParams>>;
/**
* Yields information on all availability cores as relevant to the child block.
**/
availabilityCores: AugmentedCall<ApiType, () => Observable<Vec<CoreState>>>;
/**
* Get a vector of events concerning candidates that occurred within a block.
**/
candidateEvents: AugmentedCall<ApiType, () => Observable<Vec<CandidateEvent>>>;
/**
* Get the receipt of a candidate pending availability.
**/
candidatePendingAvailability: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Option<CommittedCandidateReceipt>>>;
/**
* Checks if the given validation outputs pass the acceptance criteria.
**/
checkValidationOutputs: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, outputs: CandidateCommitments | { upwardMessages?: any; horizontalMessages?: any; newValidationCode?: any; headData?: any; processedDownwardMessages?: any; hrmpWatermark?: any } | string | Uint8Array) => Observable<bool>>;
/**
* Returns a list of all disabled validators at the given block
**/
disabledValidators: AugmentedCall<ApiType, () => Observable<ValidatorIndex>>;
/**
* Returns all onchain disputes.
**/
disputes: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[SessionIndex, CandidateHash, DisputeState]>>>>;
/**
* Get all the pending inbound messages in the downward message queue for a para.
**/
dmqContents: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Vec<InboundDownwardMessage>>>;
/**
* Get the contents of all channels addressed to the given recipient.
**/
inboundHrmpChannelsContents: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Vec<InboundHrmpMessage>>>;
/**
* Returns a merkle proof of a validator session key
**/
keyOwnershipProof: AugmentedCall<ApiType, (validatorId: ValidatorId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
/**
* Get the minimum number of backing votes for a parachain candidate. This is a staging method! Do not use on production runtimes!
**/
minimumBackingVotes: AugmentedCall<ApiType, () => Observable<u32>>;
/**
* Get node features. This is a staging method! Do not use on production runtimes!
**/
nodeFeatures: AugmentedCall<ApiType, () => Observable<NodeFeatures>>;
/**
* Scrape dispute relevant from on-chain, backing votes and resolved disputes.
**/
onChainVotes: AugmentedCall<ApiType, () => Observable<Option<ScrapedOnChainVotes>>>;
/**
* Returns the state of parachain backing for a given para
**/
paraBackingState: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Option<BackingState>>>;
/**
* Yields the persisted validation data for the given `ParaId` along with an assumption that should be used if the para currently occupies a core.
**/
persistedValidationData: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<PersistedValidationData>>>;
/**
* Returns code hashes of PVFs that require pre-checking by validators in the active set.
**/
pvfsRequirePrecheck: AugmentedCall<ApiType, () => Observable<Vec<ValidationCodeHash>>>;
/**
* Returns execution parameters for the session.
**/
sessionExecutorParams: AugmentedCall<ApiType, (sessionIndex: SessionIndex | AnyNumber | Uint8Array) => Observable<Option<ExecutorParams>>>;
/**
* Returns the session index expected at a child of the block.
**/
sessionIndexForChild: AugmentedCall<ApiType, () => Observable<SessionIndex>>;
/**
* Get the session info for the given session, if stored.
**/
sessionInfo: AugmentedCall<ApiType, (index: SessionIndex | AnyNumber | Uint8Array) => Observable<Option<SessionInfo>>>;
/**
* Submits a PVF pre-checking statement into the transaction pool.
**/
submitPvfCheckStatement: AugmentedCall<ApiType, (stmt: PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: ValidatorSignature | string | Uint8Array) => Observable<Null>>;
/**
* Submit an unsigned extrinsic to slash validators who lost a dispute about a candidate of a past session
**/
submitReportDisputeLost: AugmentedCall<ApiType, (disputeProof: DisputeProof | { timeSlot?: any; kind?: any; validatorIndex?: any; validatorId?: any } | string | Uint8Array, keyOwnershipProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
/**
* Returns a list of validators that lost a past session dispute and need to be slashed
**/
unappliedSlashes: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[SessionIndex, CandidateHash, PendingSlashes]>>>>;
/**
* Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.
**/
validationCode: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<ValidationCode>>>;
/**
* Get the validation code from its hash.
**/
validationCodeByHash: AugmentedCall<ApiType, (hash: ValidationCodeHash | string | Uint8Array) => Observable<Option<ValidationCode>>>;
/**
* Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`.
**/
validationCodeHash: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<ValidationCodeHash>>>;
/**
* Returns the validator groups and rotation info localized based on the hypothetical child of a block whose state this is invoked on
**/
validatorGroups: AugmentedCall<ApiType, () => Observable<ITuple<[Vec<Vec<ParaValidatorIndex>>, GroupRotationInfo]>>>;
/**
* Get the current validators.
**/
validators: AugmentedCall<ApiType, () => Observable<Vec<ValidatorId>>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xab3c0572291feb8b/1 */
sessionKeys: {
/**
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '10.12.3' };
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '11.0.1' };
+23 -3
View File
@@ -6,7 +6,7 @@
import '@polkadot/api-base/types/calls';
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec';
import type { Bytes, Null, Option, Result, U64, Vec, bool, u32 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
import type { BeefyAuthoritySet, BeefyEquivocationProof, BeefyNextAuthoritySet, ValidatorSet, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
@@ -14,6 +14,7 @@ import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfa
import type { BlockHash } from '@polkadot/types/interfaces/chain';
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
import type { GenesisBuildErr } from '@polkadot/types/interfaces/genesisBuilder';
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError } from '@polkadot/types/interfaces/mmr';
@@ -165,6 +166,21 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xfbc577b9d747efd6/1 */
genesisBuilder: {
/**
* Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the storage.
**/
buildConfig: AugmentedCall<ApiType, (json: Bytes | string | Uint8Array) => Observable<Result<ITuple<[]>, GenesisBuildErr>>>;
/**
* Creates the default `RuntimeGenesisConfig` and returns it as a JSON blob.
**/
createDefaultConfig: AugmentedCall<ApiType, () => Observable<Bytes>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xed99c5acb25eedf5/3 */
grandpaApi: {
/**
@@ -213,10 +229,14 @@ declare module '@polkadot/api-base/types/calls' {
* Generate MMR proof for the given block numbers.
**/
generateProof: AugmentedCall<ApiType, (blockNumbers: Vec<BlockNumber> | (BlockNumber | AnyNumber | Uint8Array)[], bestKnownBlockNumber: Option<BlockNumber> | null | Uint8Array | BlockNumber | AnyNumber) => Observable<Result<ITuple<[Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof]>, MmrError>>>;
/**
* Return the number of MMR blocks in the chain.
**/
mmrLeafCount: AugmentedCall<ApiType, () => Observable<Result<U64, MmrError>>>;
/**
* Return the on-chain MMR root hash.
**/
root: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
mmrRoot: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
/**
* Verify MMR proof against on-chain MMR.
**/
@@ -337,7 +357,7 @@ declare module '@polkadot/api-base/types/calls' {
/**
* Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.
**/
validationCode: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<ValidationCode>>;
validationCode: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<ValidationCode>>>;
/**
* Get the validation code from its hash.
**/
+37 -12
View File
@@ -170,10 +170,14 @@ declare module '@polkadot/api-base/types/consts' {
/**
* The maximum number of locks that should exist on an account.
* Not strictly enforced, but used for weight estimation.
*
* Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`
**/
maxLocks: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of named reserves that can exist on an account.
*
* Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`
**/
maxReserves: u32 & AugmentedConst<ApiType>;
/**
@@ -534,18 +538,10 @@ declare module '@polkadot/api-base/types/consts' {
* this value.
**/
signedMaxWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
/**
* Duration of the signed phase.
**/
signedPhase: u32 & AugmentedConst<ApiType>;
/**
* Base reward for a signed solution
**/
signedRewardBase: u128 & AugmentedConst<ApiType>;
/**
* Duration of the unsigned phase.
**/
unsignedPhase: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
@@ -659,7 +655,7 @@ declare module '@polkadot/api-base/types/consts' {
**/
byteDeposit: u128 & AugmentedConst<ApiType>;
/**
* Maxmimum number of registrars allowed in the system. Needed to bound the complexity
* Maximum number of registrars allowed in the system. Needed to bound the complexity
* of, e.g., updating judgements.
**/
maxRegistrars: u32 & AugmentedConst<ApiType>;
@@ -742,6 +738,14 @@ declare module '@polkadot/api-base/types/consts' {
* size is slightly lower than this as defined by [`MaxMessageLenOf`].
**/
heapSize: u32 & AugmentedConst<ApiType>;
/**
* The maximum amount of weight (if any) to be used from remaining weight `on_idle` which
* should be provided to the message queue for servicing enqueued items `on_idle`.
* Useful for parachains to process messages at the same block they are received.
*
* If `None`, it will not call `ServiceQueues::service_queues` in `on_idle`.
**/
idleMaxServiceWeight: Option<SpWeightsWeightV2Weight> & AugmentedConst<ApiType>;
/**
* The maximum number of stale pages (i.e. of overweight messages) allowed before culling
* can happen. Once there are more stale pages than this, then historical pages may be
@@ -750,10 +754,11 @@ declare module '@polkadot/api-base/types/consts' {
maxStale: u32 & AugmentedConst<ApiType>;
/**
* The amount of weight (if any) which should be provided to the message queue for
* servicing enqueued items.
* servicing enqueued items `on_initialize`.
*
* This may be legitimately `None` in the case that you will call
* `ServiceQueues::service_queues` manually.
* `ServiceQueues::service_queues` manually or set [`Self::IdleMaxServiceWeight`] to have
* it run in `on_idle`.
**/
serviceWeight: Option<SpWeightsWeightV2Weight> & AugmentedConst<ApiType>;
/**
@@ -813,6 +818,26 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
multiBlockMigrations: {
/**
* The maximal length of an encoded cursor.
*
* A good default needs to selected such that no migration will ever have a cursor with MEL
* above this limit. This is statically checked in `integrity_test`.
**/
cursorMaxLen: u32 & AugmentedConst<ApiType>;
/**
* The maximal length of an encoded identifier.
*
* A good default needs to selected such that no migration will ever have an identifier
* with MEL above this limit. This is statically checked in `integrity_test`.
**/
identifierMaxLen: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
multisig: {
/**
* The base amount of currency needed to reserve for creating a multisig execution or to
@@ -1484,7 +1509,7 @@ declare module '@polkadot/api-base/types/consts' {
**/
ss58Prefix: u16 & AugmentedConst<ApiType>;
/**
* Get the chain's current version.
* Get the chain's in-code version.
**/
version: SpVersionRuntimeVersion & AugmentedConst<ApiType>;
/**
+30 -4
View File
@@ -725,7 +725,7 @@ declare module '@polkadot/api-base/types/errors' {
**/
DuplicateContract: AugmentedError<ApiType>;
/**
* An indetermistic code was used in a context where this is not permitted.
* An indeterministic code was used in a context where this is not permitted.
**/
Indeterministic: AugmentedError<ApiType>;
/**
@@ -1105,7 +1105,7 @@ declare module '@polkadot/api-base/types/errors' {
**/
OcwCallWrongEra: AugmentedError<ApiType>;
/**
* Sumission was prepared for a different round.
* Submission was prepared for a different round.
**/
PreDispatchDifferentRound: AugmentedError<ApiType>;
/**
@@ -1535,6 +1535,16 @@ declare module '@polkadot/api-base/types/errors' {
**/
[key: string]: AugmentedError<ApiType>;
};
multiBlockMigrations: {
/**
* The operation cannot complete since some MBMs are ongoing.
**/
Ongoing: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
multisig: {
/**
* Call is already approved by this signatory.
@@ -1836,7 +1846,7 @@ declare module '@polkadot/api-base/types/errors' {
**/
DurationTooSmall: AugmentedError<ApiType>;
/**
* The operation would result in a receipt worth an insignficant value.
* The operation would result in a receipt worth an insignificant value.
**/
MakesDust: AugmentedError<ApiType>;
/**
@@ -2270,6 +2280,10 @@ declare module '@polkadot/api-base/types/errors' {
* The preimage does not exist.
**/
PreimageNotExist: AugmentedError<ApiType>;
/**
* The preimage is stored with a different length than the one provided.
**/
PreimageStoredWithDifferentLength: AugmentedError<ApiType>;
/**
* The queue of the track is empty.
**/
@@ -2398,6 +2412,10 @@ declare module '@polkadot/api-base/types/errors' {
* The preimage does not exist.
**/
PreimageNotExist: AugmentedError<ApiType>;
/**
* The preimage is stored with a different length than the one provided.
**/
PreimageStoredWithDifferentLength: AugmentedError<ApiType>;
/**
* The queue of the track is empty.
**/
@@ -2733,6 +2751,10 @@ declare module '@polkadot/api-base/types/errors' {
* The user has enough bond and thus cannot be chilled forcefully by an external person.
**/
CannotChillOther: AugmentedError<ApiType>;
/**
* Cannot reset a ledger.
**/
CannotRestoreLedger: AugmentedError<ApiType>;
/**
* Commission is too low. Must be at least `MinCommission`.
**/
@@ -2884,6 +2906,10 @@ declare module '@polkadot/api-base/types/errors' {
* and the new runtime.
**/
InvalidSpecName: AugmentedError<ApiType>;
/**
* A multi-block migration is ongoing and prevents the current code from being replaced.
**/
MultiBlockMigrationsOngoing: AugmentedError<ApiType>;
/**
* Suicide called when the account has non-default composite data.
**/
@@ -3044,7 +3070,7 @@ declare module '@polkadot/api-base/types/errors' {
**/
MissingProof: AugmentedError<ApiType>;
/**
* Unable to verify proof becasue state data is missing.
* Unable to verify proof because state data is missing.
**/
MissingStateData: AugmentedError<ApiType>;
/**
+54 -4
View File
@@ -119,7 +119,7 @@ declare module '@polkadot/api-base/types/events' {
**/
LiquidityRemoved: AugmentedEvent<ApiType, [who: AccountId32, withdrawTo: AccountId32, poolId: ITuple<[FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSupportTokensFungibleUnionOfNativeOrWithId]>, amount1: u128, amount2: u128, lpToken: u32, lpTokenBurned: u128, withdrawalFee: Permill], { who: AccountId32, withdrawTo: AccountId32, poolId: ITuple<[FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSupportTokensFungibleUnionOfNativeOrWithId]>, amount1: u128, amount2: u128, lpToken: u32, lpTokenBurned: u128, withdrawalFee: Permill }>;
/**
* A successful call of the `CretaPool` extrinsic will create this event.
* A successful call of the `CreatePool` extrinsic will create this event.
**/
PoolCreated: AugmentedEvent<ApiType, [creator: AccountId32, poolId: ITuple<[FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSupportTokensFungibleUnionOfNativeOrWithId]>, poolAccount: AccountId32, lpToken: u32], { creator: AccountId32, poolId: ITuple<[FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSupportTokensFungibleUnionOfNativeOrWithId]>, poolAccount: AccountId32, lpToken: u32 }>;
/**
@@ -772,7 +772,7 @@ declare module '@polkadot/api-base/types/events' {
**/
Proposed: AugmentedEvent<ApiType, [proposalIndex: u32, deposit: u128], { proposalIndex: u32, deposit: u128 }>;
/**
* An account has secconded a proposal
* An account has seconded a proposal
**/
Seconded: AugmentedEvent<ApiType, [seconder: AccountId32, propIndex: u32], { seconder: AccountId32, propIndex: u32 }>;
/**
@@ -827,7 +827,7 @@ declare module '@polkadot/api-base/types/events' {
* A solution was stored with the given compute.
*
* The `origin` indicates the origin of the solution. If `origin` is `Some(AccountId)`,
* the stored solution was submited in the signed phase by a miner with the `AccountId`.
* the stored solution was submitted in the signed phase by a miner with the `AccountId`.
* Otherwise, the solution was stored either during the unsigned phase or by
* `T::ForceOrigin`. The `bool` is `true` when a previous solution was ejected to make
* room for this one.
@@ -1102,6 +1102,52 @@ declare module '@polkadot/api-base/types/events' {
**/
[key: string]: AugmentedEvent<ApiType>;
};
multiBlockMigrations: {
/**
* The set of historical migrations has been cleared.
**/
HistoricCleared: AugmentedEvent<ApiType, [nextCursor: Option<Bytes>], { nextCursor: Option<Bytes> }>;
/**
* A migration progressed.
**/
MigrationAdvanced: AugmentedEvent<ApiType, [index: u32, took: u32], { index: u32, took: u32 }>;
/**
* A Migration completed.
**/
MigrationCompleted: AugmentedEvent<ApiType, [index: u32, took: u32], { index: u32, took: u32 }>;
/**
* A Migration failed.
*
* This implies that the whole upgrade failed and governance intervention is required.
**/
MigrationFailed: AugmentedEvent<ApiType, [index: u32, took: u32], { index: u32, took: u32 }>;
/**
* A migration was skipped since it was already executed in the past.
**/
MigrationSkipped: AugmentedEvent<ApiType, [index: u32], { index: u32 }>;
/**
* The current runtime upgrade completed.
*
* This implies that all of its migrations completed successfully as well.
**/
UpgradeCompleted: AugmentedEvent<ApiType, []>;
/**
* Runtime upgrade failed.
*
* This is very bad and will require governance intervention.
**/
UpgradeFailed: AugmentedEvent<ApiType, []>;
/**
* A Runtime upgrade started.
*
* Its end is indicated by `UpgradeCompleted` or `UpgradeFailed`.
**/
UpgradeStarted: AugmentedEvent<ApiType, [migrations: u32], { migrations: u32 }>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
multisig: {
/**
* A multisig operation has been approved by someone.
@@ -1325,7 +1371,7 @@ declare module '@polkadot/api-base/types/events' {
**/
Thawed: AugmentedEvent<ApiType, [index: u32, who: AccountId32, proportion: Perquintill, amount: u128, dropped: bool], { index: u32, who: AccountId32, proportion: Perquintill, amount: u128, dropped: bool }>;
/**
* A receipt was transfered.
* A receipt was transferred.
**/
Transferred: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, index: u32], { from: AccountId32, to: AccountId32, index: u32 }>;
/**
@@ -2034,6 +2080,10 @@ declare module '@polkadot/api-base/types/events' {
* An account has stopped participating as either a validator or nominator.
**/
Chilled: AugmentedEvent<ApiType, [stash: AccountId32], { stash: AccountId32 }>;
/**
* Report of a controller batch deprecation.
**/
ControllerBatchDeprecated: AugmentedEvent<ApiType, [failures: u32], { failures: u32 }>;
/**
* The era payout has been set; the first balance is the validator-payout; the second is
* the remainder from the maximum amount of reward.
+31 -4
View File
@@ -10,7 +10,7 @@ import type { Data } from '@polkadot/types';
import type { BTreeSet, Bytes, Null, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSystemAccountInfo, FrameSystemCodeUpgradeAuthorization, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KitchensinkRuntimeRuntimeParametersKey, KitchensinkRuntimeRuntimeParametersValue, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceMemberRole, PalletAssetConversionPoolInfo, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesIdAmountRuntimeFreezeReason, PalletBalancesIdAmountRuntimeHoldReason, PalletBalancesReserveData, PalletBountiesBounty, PalletBrokerAllowedRenewalId, PalletBrokerAllowedRenewalRecord, PalletBrokerConfigRecord, PalletBrokerContributionRecord, PalletBrokerInstaPoolHistoryRecord, PalletBrokerLeaseRecordItem, PalletBrokerPoolIoRecord, PalletBrokerRegionId, PalletBrokerRegionRecord, PalletBrokerSaleInfoRecord, PalletBrokerScheduleItem, PalletBrokerStatusRecord, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageContractInfo, PalletContractsStorageDeletionQueueManager, PalletContractsWasmCodeInfo, PalletConvictionVotingVoteVoting, PalletCoreFellowshipMemberStatus, PalletCoreFellowshipParamsType, PalletCoreFellowshipWish, PalletDemocracyMetadataOwner, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityAuthorityProperties, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMessageQueueBookState, PalletMessageQueuePage, PalletMixnetBoundedMixnode, PalletMultisigMultisig, PalletNftFractionalizationDetails, PalletNftsAttributeDeposit, PalletNftsAttributeNamespace, PalletNftsCollectionConfig, PalletNftsCollectionDetails, PalletNftsCollectionMetadata, PalletNftsItemConfig, PalletNftsItemDetails, PalletNftsItemMetadata, PalletNftsPendingSwap, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageOldRequestStatus, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSalaryClaimantStatus, PalletSalaryStatusType, PalletSchedulerRetryConfig, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyCandidacy, PalletSocietyGroupParams, PalletSocietyIntakeRecord, PalletSocietyMemberRecord, PalletSocietyPayoutRecord, PalletSocietyTally, PalletSocietyVote, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletTreasurySpendStatus, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesItemDetails, PalletUniquesItemMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpConsensusBeefyEcdsaCryptoPublic, SpConsensusBeefyMmrBeefyAuthoritySet, SpConsensusGrandpaAppPublic, SpCoreCryptoKeyTypeId, SpMixnetAppPublic, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingExposure, SpStakingExposurePage, SpStakingOffenceOffenceDetails, SpStakingPagedExposureMetadata } from '@polkadot/types/lookup';
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSystemAccountInfo, FrameSystemCodeUpgradeAuthorization, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KitchensinkRuntimeRuntimeParametersKey, KitchensinkRuntimeRuntimeParametersValue, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceMemberRole, PalletAssetConversionPoolInfo, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesIdAmountRuntimeFreezeReason, PalletBalancesIdAmountRuntimeHoldReason, PalletBalancesReserveData, PalletBountiesBounty, PalletBrokerAllowedRenewalId, PalletBrokerAllowedRenewalRecord, PalletBrokerConfigRecord, PalletBrokerContributionRecord, PalletBrokerInstaPoolHistoryRecord, PalletBrokerLeaseRecordItem, PalletBrokerPoolIoRecord, PalletBrokerRegionId, PalletBrokerRegionRecord, PalletBrokerSaleInfoRecord, PalletBrokerScheduleItem, PalletBrokerStatusRecord, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageContractInfo, PalletContractsStorageDeletionQueueManager, PalletContractsWasmCodeInfo, PalletConvictionVotingVoteVoting, PalletCoreFellowshipMemberStatus, PalletCoreFellowshipParamsType, PalletCoreFellowshipWish, PalletDemocracyMetadataOwner, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityAuthorityProperties, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMessageQueueBookState, PalletMessageQueuePage, PalletMigrationsMigrationCursor, PalletMixnetBoundedMixnode, PalletMultisigMultisig, PalletNftFractionalizationDetails, PalletNftsAttributeDeposit, PalletNftsAttributeNamespace, PalletNftsCollectionConfig, PalletNftsCollectionDetails, PalletNftsCollectionMetadata, PalletNftsItemConfig, PalletNftsItemDetails, PalletNftsItemMetadata, PalletNftsPendingSwap, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageOldRequestStatus, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSalaryClaimantStatus, PalletSalaryStatusType, PalletSchedulerRetryConfig, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyCandidacy, PalletSocietyGroupParams, PalletSocietyIntakeRecord, PalletSocietyMemberRecord, PalletSocietyPayoutRecord, PalletSocietyTally, PalletSocietyVote, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletTreasurySpendStatus, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesItemDetails, PalletUniquesItemMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpConsensusBeefyEcdsaCryptoPublic, SpConsensusBeefyMmrBeefyAuthoritySet, SpConsensusGrandpaAppPublic, SpCoreCryptoKeyTypeId, SpMixnetAppPublic, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingExposure, SpStakingExposurePage, SpStakingOffenceOffenceDetails, SpStakingPagedExposureMetadata } from '@polkadot/types/lookup';
import type { Observable } from '@polkadot/types/types';
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
@@ -61,7 +61,7 @@ declare module '@polkadot/api-base/types/storage' {
**/
members: AugmentedQuery<ApiType, () => Observable<Vec<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The prime member that helps determine the default vote behavior in case of absentations.
* The prime member that helps determine the default vote behavior in case of abstentions.
**/
prime: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
@@ -317,10 +317,14 @@ declare module '@polkadot/api-base/types/storage' {
/**
* Any liquidity locks on some account balances.
* NOTE: Should only be accessed when setting, changing and freeing a lock.
*
* Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`
**/
locks: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<PalletBalancesBalanceLock>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* Named reserves on some account balances.
*
* Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`
**/
reserves: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<PalletBalancesReserveData>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
@@ -579,7 +583,7 @@ declare module '@polkadot/api-base/types/storage' {
**/
members: AugmentedQuery<ApiType, () => Observable<Vec<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The prime member that helps determine the default vote behavior in case of absentations.
* The prime member that helps determine the default vote behavior in case of abstentions.
**/
prime: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
@@ -1134,6 +1138,25 @@ declare module '@polkadot/api-base/types/storage' {
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
multiBlockMigrations: {
/**
* The currently active migration to run and its cursor.
*
* `None` indicates that no migration is running.
**/
cursor: AugmentedQuery<ApiType, () => Observable<Option<PalletMigrationsMigrationCursor>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Set of all successfully executed migrations.
*
* This is used as blacklist, to not re-execute migrations that have not been removed from the
* codebase yet. Governance can regularly clear this out via `clear_historic`.
**/
historic: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<Null>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
multisig: {
/**
* The set of open multisig operations.
@@ -2175,6 +2198,10 @@ declare module '@polkadot/api-base/types/storage' {
* Extrinsics data for the current block (maps an extrinsic's index to its data).
**/
extrinsicData: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Whether all inherents have been applied.
**/
inherentsApplied: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened.
**/
@@ -2221,7 +2248,7 @@ declare module '@polkadot/api-base/types/storage' {
**/
members: AugmentedQuery<ApiType, () => Observable<Vec<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The prime member that helps determine the default vote behavior in case of absentations.
* The prime member that helps determine the default vote behavior in case of abstentions.
**/
prime: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
+62 -6
View File
@@ -6,7 +6,7 @@
import '@polkadot/api-base/types/calls';
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, Vec, bool, u128, u32 } from '@polkadot/types-codec';
import type { Bytes, Null, Option, Result, U64, Vec, bool, u128, u32 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { TAssetBalance } from '@polkadot/types/interfaces/assets';
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
@@ -16,17 +16,20 @@ import type { BlockHash } from '@polkadot/types/interfaces/chain';
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
import type { CodeSource, CodeUploadResult, ContractExecResult, ContractInstantiateResult } from '@polkadot/types/interfaces/contracts';
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
import type { GenesisBuildErr } from '@polkadot/types/interfaces/genesisBuilder';
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
import type { Mixnode, MixnodesErr, SessionStatus } from '@polkadot/types/interfaces/mixnet';
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError } from '@polkadot/types/interfaces/mmr';
import type { NftCollectionId, NftItemId } from '@polkadot/types/interfaces/nfts';
import type { NpPoolId } from '@polkadot/types/interfaces/nompools';
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
import type { AccountId, Balance, Block, BlockNumber, Call, Hash, Header, Index, KeyTypeId, Slot, Weight, WeightV2 } from '@polkadot/types/interfaces/runtime';
import type { AccountId, Balance, Block, BlockNumber, Call, ExtrinsicInclusionMode, Hash, Header, Index, KeyTypeId, Slot, Weight, WeightV2 } from '@polkadot/types/interfaces/runtime';
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
import type { StatementStoreInvalidStatement, StatementStoreStatementSource, StatementStoreValidStatement } from '@polkadot/types/interfaces/statement';
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue';
import type { StagingXcmV3MultiLocation } from '@polkadot/types/lookup';
import type { SpStatementStoreStatement, StagingXcmV3MultiLocation } from '@polkadot/types/lookup';
import type { IExtrinsic, Observable } from '@polkadot/types/types';
export type __AugmentedCall<ApiType extends ApiTypes> = AugmentedCall<ApiType>;
@@ -186,7 +189,7 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xdf6acb689907609b/4 */
/** 0xdf6acb689907609b/5 */
core: {
/**
* Execute the given block.
@@ -195,7 +198,7 @@ declare module '@polkadot/api-base/types/calls' {
/**
* Initialize a block with the given header.
**/
initializeBlock: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
initializeBlock: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<ExtrinsicInclusionMode>>;
/**
* Returns the version of the runtime.
**/
@@ -205,6 +208,21 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xfbc577b9d747efd6/1 */
genesisBuilder: {
/**
* Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the storage.
**/
buildConfig: AugmentedCall<ApiType, (json: Bytes | string | Uint8Array) => Observable<Result<ITuple<[]>, GenesisBuildErr>>>;
/**
* Creates the default `RuntimeGenesisConfig` and returns it as a JSON blob.
**/
createDefaultConfig: AugmentedCall<ApiType, () => Observable<Bytes>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xed99c5acb25eedf5/3 */
grandpaApi: {
/**
@@ -247,16 +265,43 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x6fd7c327202e4a8d/1 */
mixnetApi: {
/**
* Get the index and phase of the current session.
**/
currentMixnodes: AugmentedCall<ApiType, () => Observable<Result<Mixnode, MixnodesErr>>>;
/**
* Try to register a mixnode for the next session.
**/
maybeRegister: AugmentedCall<ApiType, (session_index: u32 | AnyNumber | Uint8Array, mixnode: Mixnode | { externalAddresses?: any; kxPublic?: any; peerId?: any } | string | Uint8Array) => Observable<bool>>;
/**
* Get the index and phase of the current session.
**/
prevMixnodes: AugmentedCall<ApiType, () => Observable<Result<Mixnode, MixnodesErr>>>;
/**
* Get the index and phase of the current session.
**/
sessionStatus: AugmentedCall<ApiType, () => Observable<SessionStatus>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x91d5df18b0d2cf58/2 */
mmrApi: {
/**
* Generate MMR proof for the given block numbers.
**/
generateProof: AugmentedCall<ApiType, (blockNumbers: Vec<BlockNumber> | (BlockNumber | AnyNumber | Uint8Array)[], bestKnownBlockNumber: Option<BlockNumber> | null | Uint8Array | BlockNumber | AnyNumber) => Observable<Result<ITuple<[Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof]>, MmrError>>>;
/**
* Return the number of MMR blocks in the chain.
**/
mmrLeafCount: AugmentedCall<ApiType, () => Observable<Result<U64, MmrError>>>;
/**
* Return the on-chain MMR root hash.
**/
root: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
mmrRoot: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
/**
* Verify MMR proof against on-chain MMR.
**/
@@ -414,5 +459,16 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xbe9fb0c91a8046cf/1 */
validateStatement: {
/**
* Validate the statement.
**/
valdateStatement: AugmentedCall<ApiType, (source: StatementStoreStatementSource | 'Chain' | 'Network' | 'Local' | number | Uint8Array, statement: SpStatementStoreStatement | { proof?: any; decryptionKey?: any; channel?: any; priority?: any; numTopics?: any; topics?: any; data?: any } | string | Uint8Array) => Observable<Result<StatementStoreValidStatement, StatementStoreInvalidStatement>>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
} // AugmentedCalls
} // declare module
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -18,11 +18,11 @@
"./packageDetect.cjs"
],
"type": "module",
"version": "10.12.3",
"version": "11.0.1",
"main": "index.js",
"dependencies": {
"@polkadot/rpc-core": "10.12.3",
"@polkadot/types": "10.12.3",
"@polkadot/rpc-core": "11.0.1",
"@polkadot/types": "11.0.1",
"@polkadot/util": "^12.6.2",
"rxjs": "^7.8.1",
"tslib": "^2.6.2"
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '10.12.3' };
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '11.0.1' };
+8 -8
View File
@@ -18,22 +18,22 @@
"./packageDetect.cjs"
],
"type": "module",
"version": "10.12.3",
"version": "11.0.1",
"main": "index.js",
"dependencies": {
"@polkadot/api": "10.12.3",
"@polkadot/api-augment": "10.12.3",
"@polkadot/types": "10.12.3",
"@polkadot/types-codec": "10.12.3",
"@polkadot/types-create": "10.12.3",
"@polkadot/api": "11.0.1",
"@polkadot/api-augment": "11.0.1",
"@polkadot/types": "11.0.1",
"@polkadot/types-codec": "11.0.1",
"@polkadot/types-create": "11.0.1",
"@polkadot/util": "^12.6.2",
"@polkadot/util-crypto": "^12.6.2",
"rxjs": "^7.8.1",
"tslib": "^2.6.2"
},
"devDependencies": {
"@polkadot/api-augment": "10.12.3",
"@polkadot/api-augment": "11.0.1",
"@polkadot/keyring": "^12.6.2",
"@polkadot/types-support": "10.12.3"
"@polkadot/types-support": "11.0.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '10.12.3' };
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '11.0.1' };
+12 -12
View File
@@ -18,25 +18,25 @@
"./packageDetect.cjs"
],
"type": "module",
"version": "10.12.3",
"version": "11.0.1",
"main": "index.js",
"dependencies": {
"@polkadot/api": "10.12.3",
"@polkadot/api-augment": "10.12.3",
"@polkadot/api-base": "10.12.3",
"@polkadot/rpc-core": "10.12.3",
"@polkadot/types": "10.12.3",
"@polkadot/types-codec": "10.12.3",
"@polkadot/api": "11.0.1",
"@polkadot/api-augment": "11.0.1",
"@polkadot/api-base": "11.0.1",
"@polkadot/rpc-core": "11.0.1",
"@polkadot/types": "11.0.1",
"@polkadot/types-codec": "11.0.1",
"@polkadot/util": "^12.6.2",
"@polkadot/util-crypto": "^12.6.2",
"rxjs": "^7.8.1",
"tslib": "^2.6.2"
},
"devDependencies": {
"@polkadot/api": "10.12.3",
"@polkadot/api-augment": "10.12.3",
"@polkadot/rpc-augment": "10.12.3",
"@polkadot/rpc-provider": "10.12.3",
"@polkadot/types-support": "10.12.3"
"@polkadot/api": "11.0.1",
"@polkadot/api-augment": "11.0.1",
"@polkadot/rpc-augment": "11.0.1",
"@polkadot/rpc-provider": "11.0.1",
"@polkadot/types-support": "11.0.1"
}
}
+4 -1
View File
@@ -67,8 +67,11 @@ function getModules (api: DeriveApi): [string, string | null] {
: api.query.elections
? 'elections'
: null;
// In some cases council here can refer to `generalCouncil` depending on what the chain specific override is.
// Therefore, we check to see if it exists in the query field. If it does not we default to `council`.
const resolvedCouncil = api.query[council] ? council : 'council';
return [council, elections];
return [resolvedCouncil, elections];
}
function queryAll (api: DeriveApi, council: string, elections: string): Observable<[AccountId32[], Candidate[], Member[], Member[]]> {
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '10.12.3' };
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '11.0.1' };
+6 -4
View File
@@ -40,7 +40,11 @@ function _membersCurr (api: DeriveApi, accountIds: AccountId[]): Observable<Deri
of(accountIds),
api.query.society.members.multi(accountIds),
api.query.society.payouts.multi(accountIds),
api.query.society.defenderVotes.multi(accountIds),
api.query.society.challengeRoundCount().pipe(
switchMap((round) =>
api.query.society.defenderVotes.multi(accountIds.map((accountId) => [round, accountId]))
)
),
api.query.society.suspendedMembers.multi(accountIds)
]).pipe(
map(([accountIds, members, payouts, defenderVotes, suspendedMembers]) =>
@@ -49,9 +53,7 @@ function _membersCurr (api: DeriveApi, accountIds: AccountId[]): Observable<Deri
members[index].isSome
? {
accountId,
isDefenderVoter: defenderVotes[index].isSome
? defenderVotes[index].unwrap().approve.isTrue
: false,
isDefenderVoter: defenderVotes[index].isSome,
isSuspended: suspendedMembers[index].isSome,
member: members[index].unwrap(),
payouts: payouts[index].payouts
@@ -17,11 +17,11 @@ function combineAccounts (nextElected: AccountId[], validators: AccountId[]): Ac
return arrayFlatten([nextElected, validators.filter((v) => !nextElected.find((n) => n.eq(v)))]);
}
export function electedInfo (instanceId: string, api: DeriveApi): (flags?: StakingQueryFlags) => Observable<DeriveStakingElected> {
return memo(instanceId, (flags: StakingQueryFlags = DEFAULT_FLAGS): Observable<DeriveStakingElected> =>
export function electedInfo (instanceId: string, api: DeriveApi): (flags?: StakingQueryFlags, page?: number) => Observable<DeriveStakingElected> {
return memo(instanceId, (flags: StakingQueryFlags = DEFAULT_FLAGS, page = 0): Observable<DeriveStakingElected> =>
api.derive.staking.validators().pipe(
switchMap(({ nextElected, validators }): Observable<DeriveStakingElected> =>
api.derive.staking.queryMulti(combineAccounts(nextElected, validators), flags).pipe(
api.derive.staking.queryMulti(combineAccounts(nextElected, validators), flags, page).pipe(
map((info): DeriveStakingElected => ({
info,
nextElected,
+16 -9
View File
@@ -2,7 +2,10 @@
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { Option, u32 } from '@polkadot/types';
import type { EraIndex } from '@polkadot/types/interfaces';
import type { SpStakingExposurePage } from '@polkadot/types/lookup';
import type { AnyNumber } from '@polkadot/types-codec/types';
import type { DeriveApi, DeriveOwnExposure } from '../types.js';
import { combineLatest, map, of } from 'rxjs';
@@ -10,24 +13,28 @@ import { combineLatest, map, of } from 'rxjs';
import { firstMemo, memo } from '../util/index.js';
import { erasHistoricApplyAccount } from './util.js';
export function _ownExposures (instanceId: string, api: DeriveApi): (accountId: Uint8Array | string, eras: EraIndex[], withActive: boolean) => Observable<DeriveOwnExposure[]> {
return memo(instanceId, (accountId: Uint8Array | string, eras: EraIndex[], _withActive: boolean): Observable<DeriveOwnExposure[]> =>
eras.length
export function _ownExposures (instanceId: string, api: DeriveApi): (accountId: Uint8Array | string, eras: EraIndex[], withActive: boolean, page: u32 | AnyNumber) => Observable<DeriveOwnExposure[]> {
return memo(instanceId, (accountId: Uint8Array | string, eras: EraIndex[], _withActive: boolean, page: u32 | AnyNumber): Observable<DeriveOwnExposure[]> => {
return eras.length
? combineLatest([
// Backwards and forward compat for historical integrity when using `erasHistoricApplyAccount`
combineLatest(eras.map((e) => api.query.staking.erasStakersClipped(e, accountId))),
combineLatest(eras.map((e) => api.query.staking.erasStakers(e, accountId)))
combineLatest(eras.map((e) => api.query.staking.erasStakers(e, accountId))),
combineLatest(eras.map((e) => api.query.staking.erasStakersPaged<Option<SpStakingExposurePage>>(e, accountId, page))),
combineLatest(eras.map((e) => api.query.staking.erasStakersOverview(e, accountId)))
]).pipe(
map(([clp, exp]): DeriveOwnExposure[] =>
eras.map((era, index) => ({ clipped: clp[index], era, exposure: exp[index] }))
map(([clp, exp, paged, expMeta]): DeriveOwnExposure[] =>
eras.map((era, index) => ({ clipped: clp[index], era, exposure: exp[index], exposureMeta: expMeta[index], exposurePaged: paged[index] }))
)
)
: of([])
: of([]);
}
);
}
export const ownExposure = /*#__PURE__*/ firstMemo(
(api: DeriveApi, accountId: Uint8Array | string, era: EraIndex) =>
api.derive.staking._ownExposures(accountId, [era], true)
(api: DeriveApi, accountId: Uint8Array | string, era: EraIndex, page?: u32 | AnyNumber) =>
api.derive.staking._ownExposures(accountId, [era], true, page || 0)
);
export const ownExposures = /*#__PURE__*/ erasHistoricApplyAccount('_ownExposures');
+62 -17
View File
@@ -2,9 +2,10 @@
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { Option } from '@polkadot/types';
import type { Option, u32, Vec } from '@polkadot/types';
import type { AccountId, EraIndex } from '@polkadot/types/interfaces';
import type { PalletStakingNominations, PalletStakingRewardDestination, PalletStakingStakingLedger, PalletStakingValidatorPrefs, SpStakingExposure } from '@polkadot/types/lookup';
import type { PalletStakingNominations, PalletStakingRewardDestination, PalletStakingStakingLedger, PalletStakingValidatorPrefs, SpStakingExposurePage, SpStakingPagedExposureMetadata } from '@polkadot/types/lookup';
import type { AnyNumber } from '@polkadot/types-codec/types';
import type { DeriveApi, DeriveStakingQuery, StakingQueryFlags } from '../types.js';
import { combineLatest, map, of, switchMap } from 'rxjs';
@@ -19,11 +20,17 @@ function rewardDestinationCompat (rewardDestination: PalletStakingRewardDestinat
: (rewardDestination as PalletStakingRewardDestination);
}
function parseDetails (stashId: AccountId, controllerIdOpt: Option<AccountId> | null, nominatorsOpt: Option<PalletStakingNominations>, rewardDestinationOpts: Option<PalletStakingRewardDestination> | PalletStakingRewardDestination, validatorPrefs: PalletStakingValidatorPrefs, exposure: SpStakingExposure, stakingLedgerOpt: Option<PalletStakingStakingLedger>): DeriveStakingQuery {
function filterClaimedRewards (api: DeriveApi, cl: number[]): Vec<u32> {
return api.registry.createType('Vec<u32>', cl.filter((c) => c !== -1));
}
function parseDetails (api: DeriveApi, stashId: AccountId, controllerIdOpt: Option<AccountId> | null, nominatorsOpt: Option<PalletStakingNominations>, rewardDestinationOpts: Option<PalletStakingRewardDestination> | PalletStakingRewardDestination, validatorPrefs: PalletStakingValidatorPrefs, exposure: Option<SpStakingExposurePage>, stakingLedgerOpt: Option<PalletStakingStakingLedger>, exposureMeta: Option<SpStakingPagedExposureMetadata>, claimedRewards: number[]): DeriveStakingQuery {
return {
accountId: stashId,
claimedRewardsEras: filterClaimedRewards(api, claimedRewards),
controllerId: controllerIdOpt?.unwrapOr(null) || null,
exposure,
exposureMeta,
exposurePaged: exposure,
nominators: nominatorsOpt.isSome
? nominatorsOpt.unwrap().targets
: [],
@@ -57,11 +64,22 @@ function getLedgers (api: DeriveApi, optIds: (Option<AccountId> | null)[], { wit
);
}
function getStashInfo (api: DeriveApi, stashIds: AccountId[], activeEra: EraIndex, { withController, withDestination, withExposure, withLedger, withNominations, withPrefs }: StakingQueryFlags): Observable<[(Option<AccountId> | null)[], Option<PalletStakingNominations>[], Option<PalletStakingRewardDestination>[], PalletStakingValidatorPrefs[], SpStakingExposure[]]> {
function getStashInfo (api: DeriveApi, stashIds: AccountId[], activeEra: EraIndex, { withClaimedRewardsEras, withController, withDestination, withExposure, withExposureMeta, withLedger, withNominations, withPrefs }: StakingQueryFlags, page: u32 | AnyNumber): Observable<[(Option<AccountId> | null)[], Option<PalletStakingNominations>[], Option<PalletStakingRewardDestination>[], PalletStakingValidatorPrefs[], Option<SpStakingExposurePage>[], Option<SpStakingPagedExposureMetadata>[], number[][]]> {
const emptyNoms = api.registry.createType<Option<PalletStakingNominations>>('Option<Nominations>');
const emptyRewa = api.registry.createType<Option<PalletStakingRewardDestination>>('RewardDestination');
const emptyExpo = api.registry.createType<SpStakingExposure>('Exposure');
const emptyExpo = api.registry.createType<Option<SpStakingExposurePage>>('Option<SpStakingExposurePage>');
const emptyPrefs = api.registry.createType<PalletStakingValidatorPrefs>('ValidatorPrefs');
const emptyExpoMeta = api.registry.createType<Option<SpStakingPagedExposureMetadata>>('Option<SpStakingPagedExposureMetadata>');
const emptyClaimedRewards = [-1];
const depth = Number(api.consts.staking.historyDepth.toNumber());
const eras = new Array(depth).fill(0).map((_, idx) => {
if (idx === 0) {
return activeEra.toNumber() - 1;
}
return activeEra.toNumber() - idx - 1;
});
return combineLatest([
withController || withLedger
@@ -77,18 +95,44 @@ function getStashInfo (api: DeriveApi, stashIds: AccountId[], activeEra: EraInde
? combineLatest(stashIds.map((s) => api.query.staking.validators(s)))
: of(stashIds.map(() => emptyPrefs)),
withExposure
? combineLatest(stashIds.map((s) => api.query.staking.erasStakers(activeEra, s)))
: of(stashIds.map(() => emptyExpo))
? combineLatest(stashIds.map((s) => api.query.staking.erasStakersPaged<Option<SpStakingExposurePage>>(activeEra, s, page)))
: of(stashIds.map(() => emptyExpo)),
withExposureMeta
? combineLatest(stashIds.map((s) => api.query.staking.erasStakersOverview(activeEra, s)))
: of(stashIds.map(() => emptyExpoMeta)),
withClaimedRewardsEras
? combineLatest(stashIds.map((s) =>
combineLatest([
combineLatest(eras.map((e) => api.query.staking.claimedRewards(e, s))),
combineLatest(eras.map((e) => api.query.staking.erasStakersOverview(e, s)))
]))
).pipe(
map((r) => {
return r.map(([stashClaimedEras, overview]) => {
// stashClaimedEras length will match the length of eras
return stashClaimedEras.map((claimedReward, idx) => {
const o = overview[idx].isSome && overview[idx].unwrap();
if (claimedReward.length === (o && o.pageCount.toNumber())) {
return eras[idx];
}
return -1;
});
});
})
)
: of(stashIds.map(() => emptyClaimedRewards))
]);
}
function getBatch (api: DeriveApi, activeEra: EraIndex, stashIds: AccountId[], flags: StakingQueryFlags): Observable<DeriveStakingQuery[]> {
return getStashInfo(api, stashIds, activeEra, flags).pipe(
switchMap(([controllerIdOpt, nominatorsOpt, rewardDestination, validatorPrefs, exposure]): Observable<DeriveStakingQuery[]> =>
function getBatch (api: DeriveApi, activeEra: EraIndex, stashIds: AccountId[], flags: StakingQueryFlags, page: u32 | AnyNumber): Observable<DeriveStakingQuery[]> {
return getStashInfo(api, stashIds, activeEra, flags, page).pipe(
switchMap(([controllerIdOpt, nominatorsOpt, rewardDestination, validatorPrefs, exposure, exposureMeta, claimedRewardsEras]): Observable<DeriveStakingQuery[]> =>
getLedgers(api, controllerIdOpt, flags).pipe(
map((stakingLedgerOpts) =>
stashIds.map((stashId, index) =>
parseDetails(stashId, controllerIdOpt[index], nominatorsOpt[index], rewardDestination[index], validatorPrefs[index], exposure[index], stakingLedgerOpts[index])
parseDetails(api, stashId, controllerIdOpt[index], nominatorsOpt[index], rewardDestination[index], validatorPrefs[index], exposure[index], stakingLedgerOpts[index], exposureMeta[index], claimedRewardsEras[index])
)
)
)
@@ -101,18 +145,19 @@ function getBatch (api: DeriveApi, activeEra: EraIndex, stashIds: AccountId[], f
* @description From a stash, retrieve the controllerId and all relevant details
*/
export const query = /*#__PURE__*/ firstMemo(
(api: DeriveApi, accountId: Uint8Array | string, flags: StakingQueryFlags) =>
api.derive.staking.queryMulti([accountId], flags)
(api: DeriveApi, accountId: Uint8Array | string, flags: StakingQueryFlags, page?: u32) =>
api.derive.staking.queryMulti([accountId], flags, page)
);
export function queryMulti (instanceId: string, api: DeriveApi): (accountIds: (Uint8Array | string)[], flags: StakingQueryFlags) => Observable<DeriveStakingQuery[]> {
return memo(instanceId, (accountIds: (Uint8Array | string)[], flags: StakingQueryFlags): Observable<DeriveStakingQuery[]> =>
export function queryMulti (instanceId: string, api: DeriveApi): (accountIds: (Uint8Array | string)[], flags: StakingQueryFlags, page?: u32 | AnyNumber) => Observable<DeriveStakingQuery[]> {
return memo(instanceId, (accountIds: (Uint8Array | string)[], flags: StakingQueryFlags, page?: u32 | AnyNumber): Observable<DeriveStakingQuery[]> =>
api.derive.session.indexes().pipe(
switchMap(({ activeEra }): Observable<DeriveStakingQuery[]> => {
const stashIds = accountIds.map((a) => api.registry.createType('AccountId', a));
const p = page || 0;
return stashIds.length
? getBatch(api, activeEra, stashIds, flags)
? getBatch(api, activeEra, stashIds, flags, p)
: of([]);
})
)
@@ -18,13 +18,15 @@ import { firstMemo, memo } from '../util/index.js';
type ErasResult = [DeriveEraPoints[], DeriveEraPrefs[], DeriveEraRewards[]];
// handle compatibility between generations of structures
function extractCompatRewards (ledger?: PalletStakingStakingLedger): u32[] {
return ledger
function extractCompatRewards (claimedRewardsEras: Vec<u32>, ledger?: PalletStakingStakingLedger): u32[] {
const l = ledger
? (
ledger.legacyClaimedRewards ||
(ledger as PalletStakingStakingLedger & { claimedRewards: Vec<u32> }).claimedRewards
)
: [];
(ledger as PalletStakingStakingLedger & { claimedRewards: Vec<u32> }).claimedRewards
).toArray()
: [] as unknown as Vec<u32>;
return claimedRewardsEras.toArray().concat(l);
}
function parseRewards (api: DeriveApi, stashId: AccountId, [erasPoints, erasPrefs, erasRewards]: ErasResult, exposures: DeriveStakerExposure[]): DeriveStakerReward[] {
@@ -111,7 +113,7 @@ function allUniqValidators (rewards: DeriveStakerReward[][]): [string[], string[
}, [[], []]);
}
function removeClaimed (validators: string[], queryValidators: DeriveStakingQuery[], reward: DeriveStakerReward): void {
function removeClaimed (validators: string[], queryValidators: DeriveStakingQuery[], reward: DeriveStakerReward, claimedRewardsEras: Vec<u32>): void {
const rm: string[] = [];
Object.keys(reward.validators).forEach((validatorId): void => {
@@ -120,7 +122,7 @@ function removeClaimed (validators: string[], queryValidators: DeriveStakingQuer
if (index !== -1) {
const valLedger = queryValidators[index].stakingLedger;
if (extractCompatRewards(valLedger).some((e) => reward.era.eq(e))) {
if (extractCompatRewards(claimedRewardsEras, valLedger).some((e) => reward.era.eq(e))) {
rm.push(validatorId);
}
}
@@ -131,8 +133,8 @@ function removeClaimed (validators: string[], queryValidators: DeriveStakingQuer
});
}
function filterRewards (eras: EraIndex[], valInfo: [string, DeriveStakingQuery][], { rewards, stakingLedger }: { rewards: DeriveStakerReward[]; stakingLedger: PalletStakingStakingLedger }): DeriveStakerReward[] {
const filter = eras.filter((e) => !extractCompatRewards(stakingLedger).some((s) => s.eq(e)));
function filterRewards (eras: EraIndex[], valInfo: [string, DeriveStakingQuery][], { claimedRewardsEras, rewards, stakingLedger }: { rewards: DeriveStakerReward[]; stakingLedger: PalletStakingStakingLedger, claimedRewardsEras: Vec<u32> }): DeriveStakerReward[] {
const filter = eras.filter((e) => !extractCompatRewards(claimedRewardsEras, stakingLedger).some((s) => s.eq(e)));
const validators = valInfo.map(([v]) => v);
const queryValidators = valInfo.map(([, q]) => q);
@@ -143,7 +145,7 @@ function filterRewards (eras: EraIndex[], valInfo: [string, DeriveStakingQuery][
return false;
}
removeClaimed(validators, queryValidators, reward);
removeClaimed(validators, queryValidators, reward, claimedRewardsEras);
return true;
})
@@ -173,8 +175,8 @@ export function _stakerRewards (instanceId: string, api: DeriveApi): (accountIds
api.derive.staking._stakerRewardsEras(eras, withActive)
]).pipe(
switchMap(([queries, exposures, erasResult]): Observable<DeriveStakerReward[][]> => {
const allRewards = queries.map(({ stakingLedger, stashId }, index): DeriveStakerReward[] =>
(!stashId || !stakingLedger)
const allRewards = queries.map(({ claimedRewardsEras, stakingLedger, stashId }, index): DeriveStakerReward[] =>
(!stashId || (!stakingLedger && !claimedRewardsEras))
? []
: parseRewards(api, stashId, erasResult, exposures[index])
);
@@ -185,9 +187,9 @@ export function _stakerRewards (instanceId: string, api: DeriveApi): (accountIds
const [allValidators, stashValidators] = allUniqValidators(allRewards);
return api.derive.staking.queryMulti(allValidators, { withLedger: true }).pipe(
return api.derive.staking.queryMulti(allValidators, { withClaimedRewardsEras: true, withLedger: true }).pipe(
map((queriedVals): DeriveStakerReward[][] =>
queries.map(({ stakingLedger }, index): DeriveStakerReward[] =>
queries.map(({ claimedRewardsEras, stakingLedger }, index): DeriveStakerReward[] =>
filterRewards(
eras,
stashValidators[index]
@@ -197,6 +199,7 @@ export function _stakerRewards (instanceId: string, api: DeriveApi): (accountIds
])
.filter((v): v is [string, DeriveStakingQuery] => !!v[1]),
{
claimedRewardsEras,
rewards: allRewards[index],
stakingLedger
}
+9 -2
View File
@@ -1,8 +1,9 @@
// Copyright 2017-2024 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Option, u32, Vec } from '@polkadot/types';
import type { AccountId, Balance, EraIndex, RewardPoint } from '@polkadot/types/interfaces';
import type { PalletStakingRewardDestination, PalletStakingStakingLedger, PalletStakingValidatorPrefs, SpStakingExposure, SpStakingExposurePage } from '@polkadot/types/lookup';
import type { PalletStakingRewardDestination, PalletStakingStakingLedger, PalletStakingValidatorPrefs, SpStakingExposure, SpStakingExposurePage, SpStakingPagedExposureMetadata } from '@polkadot/types/lookup';
import type { BN } from '@polkadot/util';
import type { DeriveSessionIndexes } from '../session/types.js';
@@ -42,8 +43,10 @@ export interface DeriveStakerPoints {
export interface DeriveOwnExposure {
clipped: SpStakingExposure;
exposurePaged: Option<SpStakingExposurePage>;
era: EraIndex;
exposure: SpStakingExposure;
exposureMeta: Option<SpStakingPagedExposureMetadata>;
}
export interface DeriveEraExposureNominating {
@@ -115,11 +118,13 @@ export interface DeriveStakingValidators {
export interface DeriveStakingStash {
controllerId: AccountId | null;
exposure: SpStakingExposure;
exposurePaged: Option<SpStakingExposurePage>;
exposureMeta: Option<SpStakingPagedExposureMetadata>;
nominators: AccountId[];
rewardDestination: PalletStakingRewardDestination | null;
stashId: AccountId;
validatorPrefs: PalletStakingValidatorPrefs;
claimedRewardsEras: Vec<u32>
}
export interface DeriveStakingQuery extends DeriveStakingStash {
@@ -160,4 +165,6 @@ export interface StakingQueryFlags {
withLedger?: boolean;
withNominations?: boolean;
withPrefs?: boolean;
withExposureMeta?: boolean;
withClaimedRewardsEras?: boolean;
}
+4 -2
View File
@@ -3,7 +3,9 @@
import type { Observable } from 'rxjs';
import type { ObsInnerType } from '@polkadot/api-base/types';
import type { u32 } from '@polkadot/types';
import type { EraIndex } from '@polkadot/types/interfaces';
import type { AnyNumber } from '@polkadot/types-codec/types';
import type { ExactDerive } from '../derive.js';
import type { DeriveApi } from '../types.js';
@@ -60,9 +62,9 @@ export function erasHistoricApplyAccount <F extends '_ownExposures' | '_ownSlash
return (instanceId: string, api: DeriveApi) =>
// Cannot quite get the typing right, but it is right in the code
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
memo(instanceId, (accountId: string | Uint8Array, withActive = false) =>
memo(instanceId, (accountId: string | Uint8Array, withActive = false, page?: u32 | AnyNumber) =>
api.derive.staking.erasHistoric(withActive).pipe(
switchMap((e) => api.derive.staking[fn](accountId, e, withActive))
switchMap((e) => api.derive.staking[fn](accountId, e, withActive, page || 0))
)
) as any;
}
@@ -11,11 +11,11 @@ import { memo } from '../util/index.js';
export function nextElected (instanceId: string, api: DeriveApi): () => Observable<AccountId[]> {
return memo(instanceId, (): Observable<AccountId[]> =>
api.query.staking.erasStakers
api.query.staking.erasStakersPaged
? api.derive.session.indexes().pipe(
// 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)),
switchMap(({ currentEra }) => api.query.staking.erasStakersPaged.keys(currentEra)),
map((keys) => keys.map(({ args: [, accountId] }) => accountId))
)
: api.query.staking['currentElected']<AccountId[]>()
+1 -1
View File
@@ -74,7 +74,7 @@ function babeOrAuraPeriod (api: DeriveApi): BN | undefined {
const period = api.consts.babe?.expectedBlockTime ||
// this will be present ones https://github.com/paritytech/polkadot-sdk/pull/3732 is merged
(api.consts['aura'] as unknown as Aura)?.slotDuration ||
api.consts.timestamp?.minimumPeriod;
api.consts.timestamp?.minimumPeriod.muln(2);
return !period.isZero() ? period : undefined;
}
+14 -14
View File
@@ -18,21 +18,21 @@
"./packageDetect.cjs"
],
"type": "module",
"version": "10.12.3",
"version": "11.0.1",
"main": "index.js",
"dependencies": {
"@polkadot/api-augment": "10.12.3",
"@polkadot/api-base": "10.12.3",
"@polkadot/api-derive": "10.12.3",
"@polkadot/api-augment": "11.0.1",
"@polkadot/api-base": "11.0.1",
"@polkadot/api-derive": "11.0.1",
"@polkadot/keyring": "^12.6.2",
"@polkadot/rpc-augment": "10.12.3",
"@polkadot/rpc-core": "10.12.3",
"@polkadot/rpc-provider": "10.12.3",
"@polkadot/types": "10.12.3",
"@polkadot/types-augment": "10.12.3",
"@polkadot/types-codec": "10.12.3",
"@polkadot/types-create": "10.12.3",
"@polkadot/types-known": "10.12.3",
"@polkadot/rpc-augment": "11.0.1",
"@polkadot/rpc-core": "11.0.1",
"@polkadot/rpc-provider": "11.0.1",
"@polkadot/types": "11.0.1",
"@polkadot/types-augment": "11.0.1",
"@polkadot/types-codec": "11.0.1",
"@polkadot/types-create": "11.0.1",
"@polkadot/types-known": "11.0.1",
"@polkadot/util": "^12.6.2",
"@polkadot/util-crypto": "^12.6.2",
"eventemitter3": "^5.0.1",
@@ -40,7 +40,7 @@
"tslib": "^2.6.2"
},
"devDependencies": {
"@polkadot/api-augment": "10.12.3",
"@polkadot/types-support": "10.12.3"
"@polkadot/api-augment": "11.0.1",
"@polkadot/types-support": "11.0.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '10.12.3' };
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '11.0.1' };
+4 -4
View File
@@ -18,12 +18,12 @@
"./packageDetect.cjs"
],
"type": "module",
"version": "10.12.3",
"version": "11.0.1",
"main": "index.js",
"dependencies": {
"@polkadot/rpc-core": "10.12.3",
"@polkadot/types": "10.12.3",
"@polkadot/types-codec": "10.12.3",
"@polkadot/rpc-core": "11.0.1",
"@polkadot/types": "11.0.1",
"@polkadot/types-codec": "11.0.1",
"@polkadot/util": "^12.6.2",
"tslib": "^2.6.2"
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '10.12.3' };
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '11.0.1' };
+5 -5
View File
@@ -18,18 +18,18 @@
"./packageDetect.cjs"
],
"type": "module",
"version": "10.12.3",
"version": "11.0.1",
"main": "index.js",
"dependencies": {
"@polkadot/rpc-augment": "10.12.3",
"@polkadot/rpc-provider": "10.12.3",
"@polkadot/types": "10.12.3",
"@polkadot/rpc-augment": "11.0.1",
"@polkadot/rpc-provider": "11.0.1",
"@polkadot/types": "11.0.1",
"@polkadot/util": "^12.6.2",
"rxjs": "^7.8.1",
"tslib": "^2.6.2"
},
"devDependencies": {
"@polkadot/keyring": "^12.6.2",
"@polkadot/rpc-augment": "10.12.3"
"@polkadot/rpc-augment": "11.0.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '10.12.3' };
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '11.0.1' };
+5 -5
View File
@@ -18,12 +18,12 @@
"./packageDetect.cjs"
],
"type": "module",
"version": "10.12.3",
"version": "11.0.1",
"main": "index.js",
"dependencies": {
"@polkadot/keyring": "^12.6.2",
"@polkadot/types": "10.12.3",
"@polkadot/types-support": "10.12.3",
"@polkadot/types": "11.0.1",
"@polkadot/types-support": "11.0.1",
"@polkadot/util": "^12.6.2",
"@polkadot/util-crypto": "^12.6.2",
"@polkadot/x-fetch": "^12.6.2",
@@ -35,9 +35,9 @@
"tslib": "^2.6.2"
},
"devDependencies": {
"@substrate/connect": "0.8.8"
"@substrate/connect": "0.8.10"
},
"optionalDependencies": {
"@substrate/connect": "0.8.8"
"@substrate/connect": "0.8.10"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '10.12.3' };
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '11.0.1' };
@@ -118,7 +118,7 @@ export class ScProvider implements ProviderInterface {
: this.#Sc.createScClient(config);
if (!client) {
throw new Error('Unkown ScProvider!');
throw new Error('Unknown ScProvider!');
}
scClients.set(this, client);
+10 -10
View File
@@ -18,7 +18,7 @@
"./packageDetect.cjs"
],
"type": "module",
"version": "10.12.3",
"version": "11.0.1",
"main": "index.js",
"bin": {
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.mjs",
@@ -28,15 +28,15 @@
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.mjs"
},
"dependencies": {
"@polkadot/api": "10.12.3",
"@polkadot/api-augment": "10.12.3",
"@polkadot/rpc-augment": "10.12.3",
"@polkadot/rpc-provider": "10.12.3",
"@polkadot/types": "10.12.3",
"@polkadot/types-augment": "10.12.3",
"@polkadot/types-codec": "10.12.3",
"@polkadot/types-create": "10.12.3",
"@polkadot/types-support": "10.12.3",
"@polkadot/api": "11.0.1",
"@polkadot/api-augment": "11.0.1",
"@polkadot/rpc-augment": "11.0.1",
"@polkadot/rpc-provider": "11.0.1",
"@polkadot/types": "11.0.1",
"@polkadot/types-augment": "11.0.1",
"@polkadot/types-codec": "11.0.1",
"@polkadot/types-create": "11.0.1",
"@polkadot/types-support": "11.0.1",
"@polkadot/util": "^12.6.2",
"@polkadot/util-crypto": "^12.6.2",
"@polkadot/x-ws": "^12.6.2",
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '10.12.3' };
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '11.0.1' };
+3 -3
View File
@@ -18,11 +18,11 @@
"./packageDetect.cjs"
],
"type": "module",
"version": "10.12.3",
"version": "11.0.1",
"main": "index.js",
"dependencies": {
"@polkadot/types": "10.12.3",
"@polkadot/types-codec": "10.12.3",
"@polkadot/types": "11.0.1",
"@polkadot/types-codec": "11.0.1",
"@polkadot/util": "^12.6.2",
"tslib": "^2.6.2"
}
@@ -4,6 +4,10 @@
/* eslint-disable sort-keys */
export default {
/**
* Lookup54: sp_core::ed25519::Public
**/
SpCoreEd25519Public: '[u8;32]',
/**
* Lookup56: polkadot_runtime_common::impls::VersionedLocatableAsset
**/
@@ -345,6 +349,10 @@ export default {
}
}
},
/**
* Lookup107: sp_core::sr25519::Public
**/
SpCoreSr25519Public: '[u8;32]',
/**
* Lookup130: polkadot_runtime::SessionKeys
**/
@@ -364,6 +372,14 @@ export default {
* Lookup132: polkadot_primitives::v6::assignment_app::Public
**/
PolkadotPrimitivesV6AssignmentAppPublic: 'SpCoreSr25519Public',
/**
* Lookup135: sp_core::ecdsa::Public
**/
SpCoreEcdsaPublic: '[u8;33]',
/**
* Lookup143: sp_core::ed25519::Signature
**/
SpCoreEd25519Signature: '[u8;64]',
/**
* Lookup157: polkadot_runtime::OriginCaller
**/
@@ -537,6 +553,14 @@ export default {
PolkadotRuntimeCommonClaimsStatementKind: {
_enum: ['Regular', 'Saft']
},
/**
* Lookup221: sp_core::sr25519::Signature
**/
SpCoreSr25519Signature: '[u8;64]',
/**
* Lookup222: sp_core::ecdsa::Signature
**/
SpCoreEcdsaSignature: '[u8;65]',
/**
* Lookup226: polkadot_runtime::ProxyType
**/
File diff suppressed because it is too large Load Diff
@@ -11,6 +11,9 @@ import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, H256, PerU16, Perbill } from '@polkadot/types/interfaces/runtime';
declare module '@polkadot/types/lookup' {
/** @name SpCoreEd25519Public (54) */
interface SpCoreEd25519Public extends U8aFixed {}
/** @name PolkadotRuntimeCommonImplsVersionedLocatableAsset (56) */
interface PolkadotRuntimeCommonImplsVersionedLocatableAsset extends Enum {
readonly isV3: boolean;
@@ -387,6 +390,9 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Voice' | 'Members' | 'Fraction' | 'AtLeastProportion' | 'MoreThanProportion';
}
/** @name SpCoreSr25519Public (107) */
interface SpCoreSr25519Public extends U8aFixed {}
/** @name PolkadotRuntimeSessionKeys (130) */
interface PolkadotRuntimeSessionKeys extends Struct {
readonly grandpa: SpConsensusGrandpaAppPublic;
@@ -403,6 +409,12 @@ declare module '@polkadot/types/lookup' {
/** @name PolkadotPrimitivesV6AssignmentAppPublic (132) */
interface PolkadotPrimitivesV6AssignmentAppPublic extends SpCoreSr25519Public {}
/** @name SpCoreEcdsaPublic (135) */
interface SpCoreEcdsaPublic extends U8aFixed {}
/** @name SpCoreEd25519Signature (143) */
interface SpCoreEd25519Signature extends U8aFixed {}
/** @name PolkadotRuntimeOriginCaller (157) */
interface PolkadotRuntimeOriginCaller extends Enum {
readonly isSystem: boolean;
@@ -496,6 +508,12 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Regular' | 'Saft';
}
/** @name SpCoreSr25519Signature (221) */
interface SpCoreSr25519Signature extends U8aFixed {}
/** @name SpCoreEcdsaSignature (222) */
interface SpCoreEcdsaSignature extends U8aFixed {}
/** @name PolkadotRuntimeProxyType (226) */
interface PolkadotRuntimeProxyType extends Enum {
readonly isAny: boolean;
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '10.12.3' };
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '11.0.1' };
@@ -37,31 +37,34 @@ import type { EvmAccount, EvmCallInfo, EvmCallInfoV2, EvmCreateInfo, EvmCreateIn
import type { AnySignature, EcdsaSignature, Ed25519Signature, Era, Extrinsic, ExtrinsicEra, ExtrinsicPayload, ExtrinsicPayloadUnknown, ExtrinsicPayloadV4, ExtrinsicSignature, ExtrinsicSignatureV4, ExtrinsicUnknown, ExtrinsicV4, ImmortalEra, MortalEra, MultiSignature, Signature, SignerPayload, Sr25519Signature } from '@polkadot/types/interfaces/extrinsics';
import type { FungiblesAccessError } from '@polkadot/types/interfaces/fungibles';
import type { AssetOptions, Owner, PermissionLatest, PermissionVersions, PermissionsV1 } from '@polkadot/types/interfaces/genericAsset';
import type { GenesisBuildErr } from '@polkadot/types/interfaces/genesisBuilder';
import type { ActiveGilt, ActiveGiltsTotal, ActiveIndex, GiltBid } from '@polkadot/types/interfaces/gilt';
import type { AuthorityIndex, AuthorityList, AuthoritySet, AuthoritySetChange, AuthoritySetChanges, AuthorityWeight, DelayKind, DelayKindBest, EncodedFinalityProofs, ForkTreePendingChange, ForkTreePendingChangeNode, GrandpaCommit, GrandpaEquivocation, GrandpaEquivocationProof, GrandpaEquivocationValue, GrandpaJustification, GrandpaPrecommit, GrandpaPrevote, GrandpaSignedPrecommit, JustificationNotification, KeyOwnerProof, NextAuthority, PendingChange, PendingPause, PendingResume, Precommits, Prevotes, ReportedRoundStates, RoundState, SetId, StoredPendingChange, StoredState } from '@polkadot/types/interfaces/grandpa';
import type { IdentityFields, IdentityInfo, IdentityInfoAdditional, IdentityInfoTo198, IdentityJudgement, RegistrarIndex, RegistrarInfo, Registration, RegistrationJudgement, RegistrationTo198 } from '@polkadot/types/interfaces/identity';
import type { AuthIndex, AuthoritySignature, Heartbeat, HeartbeatTo244, OpaqueMultiaddr, OpaqueNetworkState, OpaquePeerId } from '@polkadot/types/interfaces/imOnline';
import type { CallIndex, LotteryConfig } from '@polkadot/types/interfaces/lottery';
import type { CustomMetadata15, CustomValueMetadata15, ErrorMetadataLatest, ErrorMetadataV10, ErrorMetadataV11, ErrorMetadataV12, ErrorMetadataV13, ErrorMetadataV14, ErrorMetadataV9, EventMetadataLatest, EventMetadataV10, EventMetadataV11, EventMetadataV12, EventMetadataV13, EventMetadataV14, EventMetadataV9, ExtrinsicMetadataLatest, ExtrinsicMetadataV11, ExtrinsicMetadataV12, ExtrinsicMetadataV13, ExtrinsicMetadataV14, ExtrinsicMetadataV15, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV10, FunctionArgumentMetadataV11, FunctionArgumentMetadataV12, FunctionArgumentMetadataV13, FunctionArgumentMetadataV14, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV10, FunctionMetadataV11, FunctionMetadataV12, FunctionMetadataV13, FunctionMetadataV14, FunctionMetadataV9, MetadataAll, MetadataLatest, MetadataV10, MetadataV11, MetadataV12, MetadataV13, MetadataV14, MetadataV15, MetadataV9, ModuleConstantMetadataV10, ModuleConstantMetadataV11, ModuleConstantMetadataV12, ModuleConstantMetadataV13, ModuleConstantMetadataV9, ModuleMetadataV10, ModuleMetadataV11, ModuleMetadataV12, ModuleMetadataV13, ModuleMetadataV9, OpaqueMetadata, OuterEnums15, PalletCallMetadataLatest, PalletCallMetadataV14, PalletConstantMetadataLatest, PalletConstantMetadataV14, PalletErrorMetadataLatest, PalletErrorMetadataV14, PalletEventMetadataLatest, PalletEventMetadataV14, PalletMetadataLatest, PalletMetadataV14, PalletMetadataV15, PalletStorageMetadataLatest, PalletStorageMetadataV14, PortableType, PortableTypeV14, RuntimeApiMetadataLatest, RuntimeApiMetadataV15, RuntimeApiMethodMetadataV15, RuntimeApiMethodParamMetadataV15, SignedExtensionMetadataLatest, SignedExtensionMetadataV14, StorageEntryMetadataLatest, StorageEntryMetadataV10, StorageEntryMetadataV11, StorageEntryMetadataV12, StorageEntryMetadataV13, StorageEntryMetadataV14, StorageEntryMetadataV9, StorageEntryModifierLatest, StorageEntryModifierV10, StorageEntryModifierV11, StorageEntryModifierV12, StorageEntryModifierV13, StorageEntryModifierV14, StorageEntryModifierV9, StorageEntryTypeLatest, StorageEntryTypeV10, StorageEntryTypeV11, StorageEntryTypeV12, StorageEntryTypeV13, StorageEntryTypeV14, StorageEntryTypeV9, StorageHasher, StorageHasherV10, StorageHasherV11, StorageHasherV12, StorageHasherV13, StorageHasherV14, StorageHasherV9, StorageMetadataV10, StorageMetadataV11, StorageMetadataV12, StorageMetadataV13, StorageMetadataV9 } from '@polkadot/types/interfaces/metadata';
import type { Mixnode, MixnodesErr, SessionPhase, SessionStatus } from '@polkadot/types/interfaces/mixnet';
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrHash, MmrLeafBatchProof, MmrLeafIndex, MmrLeafProof, MmrNodeIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
import type { NftCollectionId, NftItemId } from '@polkadot/types/interfaces/nfts';
import type { NpApiError, NpPoolId } from '@polkadot/types/interfaces/nompools';
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, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateEvent, CandidateHash, CandidateInfo, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, CoreAssignment, CoreIndex, CoreOccupied, CoreState, DisputeLocation, DisputeProof, DisputeResult, DisputeState, DisputeStatement, DisputeStatementSet, DisputesTimeSlot, DoubleVoteReport, DownwardMessage, ExecutorParam, ExecutorParams, ExecutorParamsHash, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, GroupRotationInfo, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, OccupiedCore, OccupiedCoreAssumption, OldV1SessionInfo, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PendingSlashes, PersistedValidationData, PvfCheckStatement, PvfExecTimeoutKind, PvfPrepTimeoutKind, QueuedParathread, RegisteredParachainInfo, RelayBlockNumber, RelayChainBlockNumber, RelayChainHash, RelayHash, Remark, ReplacementTimes, Retriable, ScheduledCore, Scheduling, ScrapedOnChainVotes, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlashingOffenceKind, SlotRange, SlotRange10, Statement, SubId, SystemInherentData, TransientValidationData, UpgradeGoAhead, UpgradeRestriction, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationCodeHash, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, WinnersData, WinnersData10, WinnersDataTuple, WinnersDataTuple10, WinningData, WinningData10, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, ApprovalVotingParams, AssignmentId, AssignmentKind, AsyncBackingParams, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, BackingState, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateEvent, CandidateHash, CandidateInfo, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, Constraints, CoreAssignment, CoreIndex, CoreOccupied, CoreState, DisputeLocation, DisputeProof, DisputeResult, DisputeState, DisputeStatement, DisputeStatementSet, DisputesTimeSlot, DoubleVoteReport, DownwardMessage, ExecutorParam, ExecutorParams, ExecutorParamsHash, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, GroupRotationInfo, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpLimitations, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, NodeFeatures, OccupiedCore, OccupiedCoreAssumption, OldV1SessionInfo, OutboundHrmpChannelLimitations, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PendingSlashes, PersistedValidationData, PvfCheckStatement, PvfExecTimeoutKind, PvfPrepTimeoutKind, QueuedParathread, RegisteredParachainInfo, RelayBlockNumber, RelayChainBlockNumber, RelayChainHash, RelayHash, Remark, ReplacementTimes, Retriable, ScheduledCore, Scheduling, ScrapedOnChainVotes, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlashingOffenceKind, SlotRange, SlotRange10, Statement, SubId, SystemInherentData, TransientValidationData, UpgradeGoAhead, UpgradeRestriction, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationCodeHash, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, WinnersData, WinnersData10, WinnersDataTuple, WinnersDataTuple10, WinningData, WinningData10, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
import type { FeeDetails, InclusionFee, RuntimeDispatchInfo, RuntimeDispatchInfoV1, RuntimeDispatchInfoV2 } 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, AccountId20, AccountId32, AccountId33, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, BlockNumberFor, BlockNumberOf, Call, CallHash, CallHashOf, ChangesTrieConfiguration, ChangesTrieSignal, CodecHash, Consensus, ConsensusEngineId, CrateVersion, Digest, DigestItem, EncodedJustification, ExtrinsicsWeight, Fixed128, Fixed64, FixedI128, FixedI64, FixedU128, FixedU64, H1024, H128, H160, H2048, H256, H32, H512, H64, Hash, Header, HeaderPartial, 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, RuntimeCall, RuntimeDbWeight, RuntimeEvent, Seal, SealV0, SignedBlock, SignedBlockWithJustification, SignedBlockWithJustifications, Slot, SlotDuration, StorageData, StorageInfo, StorageProof, TransactionInfo, TransactionLongevity, TransactionPriority, TransactionStorageProof, TransactionTag, U32F32, ValidatorId, ValidatorIdOf, Weight, WeightMultiplier, WeightV0, WeightV1, WeightV2 } from '@polkadot/types/interfaces/runtime';
import type { AccountId, AccountId20, AccountId32, AccountId33, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, BlockNumberFor, BlockNumberOf, Call, CallHash, CallHashOf, ChangesTrieConfiguration, ChangesTrieSignal, CodecHash, Consensus, ConsensusEngineId, CrateVersion, Digest, DigestItem, EncodedJustification, ExtrinsicInclusionMode, ExtrinsicsWeight, Fixed128, Fixed64, FixedI128, FixedI64, FixedU128, FixedU64, H1024, H128, H160, H2048, H256, H32, H512, H64, Hash, Header, HeaderPartial, 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, RuntimeCall, RuntimeDbWeight, RuntimeEvent, Seal, SealV0, SignedBlock, SignedBlockWithJustification, SignedBlockWithJustifications, Slot, SlotDuration, StorageData, StorageInfo, StorageProof, TransactionInfo, TransactionLongevity, TransactionPriority, TransactionStorageProof, TransactionTag, U32F32, ValidatorId, ValidatorIdOf, Weight, WeightMultiplier, WeightV0, WeightV1, WeightV2 } from '@polkadot/types/interfaces/runtime';
import type { Si0Field, Si0LookupTypeId, Si0Path, Si0Type, Si0TypeDef, Si0TypeDefArray, Si0TypeDefBitSequence, Si0TypeDefCompact, Si0TypeDefComposite, Si0TypeDefPhantom, Si0TypeDefPrimitive, Si0TypeDefSequence, Si0TypeDefTuple, Si0TypeDefVariant, Si0TypeParameter, Si0Variant, Si1Field, Si1LookupTypeId, Si1Path, Si1Type, Si1TypeDef, Si1TypeDefArray, Si1TypeDefBitSequence, Si1TypeDefCompact, Si1TypeDefComposite, Si1TypeDefPrimitive, Si1TypeDefSequence, Si1TypeDefTuple, Si1TypeDefVariant, Si1TypeParameter, Si1Variant, SiField, SiLookupTypeId, SiPath, SiType, SiTypeDef, SiTypeDefArray, SiTypeDefBitSequence, SiTypeDefCompact, SiTypeDefComposite, SiTypeDefPrimitive, SiTypeDefSequence, SiTypeDefTuple, SiTypeDefVariant, SiTypeParameter, SiVariant } from '@polkadot/types/interfaces/scaleInfo';
import type { Period, Priority, SchedulePeriod, SchedulePriority, Scheduled, ScheduledTo254, TaskAddress } from '@polkadot/types/interfaces/scheduler';
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, CompactAssignmentsTo265, CompactAssignmentsWith16, CompactAssignmentsWith24, 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, RawSolutionTo265, RawSolutionWith16, RawSolutionWith24, ReadySolution, RewardDestination, RewardPoint, RoundSnapshot, SeatHolder, SignedSubmission, SignedSubmissionOf, SignedSubmissionTo276, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SolutionOrSnapshotSize, SolutionSupport, SolutionSupports, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, StakingLedgerTo240, SubmissionIndicesOf, Supports, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorIndexCompact, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196, ValidatorPrefsWithBlocked, ValidatorPrefsWithCommission, VoteWeight, Voter } from '@polkadot/types/interfaces/staking';
import type { ApiId, BlockTrace, BlockTraceEvent, BlockTraceEventData, BlockTraceSpan, KeyValueOption, MigrationStatusResult, ReadProof, RuntimeVersion, RuntimeVersionApi, RuntimeVersionPartial, RuntimeVersionPre3, RuntimeVersionPre4, SpecVersion, StorageChangeSet, TraceBlockResponse, TraceError } from '@polkadot/types/interfaces/state';
import type { StatementStoreInvalidStatement, StatementStoreStatementSource, StatementStoreValidStatement } from '@polkadot/types/interfaces/statement';
import type { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
import type { AccountInfo, AccountInfoWithDualRefCount, AccountInfoWithProviders, AccountInfoWithRefCount, AccountInfoWithRefCountU8, AccountInfoWithTripleRefCount, ApplyExtrinsicResult, ApplyExtrinsicResultPre6, ArithmeticError, BlockLength, BlockWeights, ChainProperties, ChainType, ConsumedWeight, DigestOf, DispatchClass, DispatchError, DispatchErrorModule, DispatchErrorModulePre6, DispatchErrorModuleU8, DispatchErrorModuleU8a, DispatchErrorPre6, DispatchErrorPre6First, DispatchErrorTo198, DispatchInfo, DispatchInfoTo190, DispatchInfoTo244, DispatchOutcome, DispatchOutcomePre6, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, Health, InvalidTransaction, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, PerDispatchClassU32, PerDispatchClassWeight, PerDispatchClassWeightsPerClass, Phase, RawOrigin, RefCount, RefCountTo259, SyncState, SystemOrigin, TokenError, TransactionValidityError, TransactionalError, UnknownTransaction, WeightPerClass } from '@polkadot/types/interfaces/system';
import type { Bounty, BountyIndex, BountyStatus, BountyStatusActive, BountyStatusCuratorProposed, BountyStatusPendingPayout, OpenTip, OpenTipFinderTo225, OpenTipTip, OpenTipTo225, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
@@ -109,6 +112,7 @@ declare module '@polkadot/types/types/registry' {
ApplyExtrinsicResultPre6: ApplyExtrinsicResultPre6;
ApprovalFlag: ApprovalFlag;
Approvals: Approvals;
ApprovalVotingParams: ApprovalVotingParams;
ArithmeticError: ArithmeticError;
AssetApproval: AssetApproval;
AssetApprovalKey: AssetApprovalKey;
@@ -124,6 +128,7 @@ declare module '@polkadot/types/types/registry' {
AssetOptions: AssetOptions;
AssignmentId: AssignmentId;
AssignmentKind: AssignmentKind;
AsyncBackingParams: AsyncBackingParams;
AttestedCandidate: AttestedCandidate;
AuctionIndex: AuctionIndex;
AuthIndex: AuthIndex;
@@ -146,6 +151,7 @@ declare module '@polkadot/types/types/registry' {
BabeGenesisConfigurationV1: BabeGenesisConfigurationV1;
BabeWeight: BabeWeight;
BackedCandidate: BackedCandidate;
BackingState: BackingState;
Balance: Balance;
BalanceLock: BalanceLock;
BalanceLockTo212: BalanceLockTo212;
@@ -248,6 +254,7 @@ declare module '@polkadot/types/types/registry' {
ConfigData: ConfigData;
Consensus: Consensus;
ConsensusEngineId: ConsensusEngineId;
Constraints: Constraints;
ConsumedWeight: ConsumedWeight;
ContractCallFlags: ContractCallFlags;
ContractCallRequest: ContractCallRequest;
@@ -471,6 +478,7 @@ declare module '@polkadot/types/types/registry' {
ExtendedBalance: ExtendedBalance;
Extrinsic: Extrinsic;
ExtrinsicEra: ExtrinsicEra;
ExtrinsicInclusionMode: ExtrinsicInclusionMode;
ExtrinsicMetadataLatest: ExtrinsicMetadataLatest;
ExtrinsicMetadataV11: ExtrinsicMetadataV11;
ExtrinsicMetadataV12: ExtrinsicMetadataV12;
@@ -524,6 +532,7 @@ declare module '@polkadot/types/types/registry' {
FungibilityV2: FungibilityV2;
FungiblesAccessError: FungiblesAccessError;
Gas: Gas;
GenesisBuildErr: GenesisBuildErr;
GiltBid: GiltBid;
GlobalValidationData: GlobalValidationData;
GlobalValidationSchedule: GlobalValidationSchedule;
@@ -580,6 +589,7 @@ declare module '@polkadot/types/types/registry' {
ImmortalEra: ImmortalEra;
ImportedAux: ImportedAux;
InboundDownwardMessage: InboundDownwardMessage;
InboundHrmpLimitations: InboundHrmpLimitations;
InboundHrmpMessage: InboundHrmpMessage;
InboundHrmpMessages: InboundHrmpMessages;
InboundLaneData: InboundLaneData;
@@ -668,6 +678,8 @@ declare module '@polkadot/types/types/registry' {
MetadataV15: MetadataV15;
MetadataV9: MetadataV9;
MigrationStatusResult: MigrationStatusResult;
Mixnode: Mixnode;
MixnodesErr: MixnodesErr;
MmrBatchProof: MmrBatchProof;
MmrEncodableOpaqueLeaf: MmrEncodableOpaqueLeaf;
MmrError: MmrError;
@@ -723,6 +735,7 @@ declare module '@polkadot/types/types/registry' {
NextConfigDescriptorV1: NextConfigDescriptorV1;
NftCollectionId: NftCollectionId;
NftItemId: NftItemId;
NodeFeatures: NodeFeatures;
NodeRole: NodeRole;
Nominations: Nominations;
NominatorIndex: NominatorIndex;
@@ -756,6 +769,7 @@ declare module '@polkadot/types/types/registry' {
OriginKindV0: OriginKindV0;
OriginKindV1: OriginKindV1;
OriginKindV2: OriginKindV2;
OutboundHrmpChannelLimitations: OutboundHrmpChannelLimitations;
OutboundHrmpMessage: OutboundHrmpMessage;
OutboundLaneData: OutboundLaneData;
OutboundMessageFee: OutboundMessageFee;
@@ -961,6 +975,8 @@ declare module '@polkadot/types/types/registry' {
SessionKeys8B: SessionKeys8B;
SessionKeys9: SessionKeys9;
SessionKeys9B: SessionKeys9B;
SessionPhase: SessionPhase;
SessionStatus: SessionStatus;
SetId: SetId;
SetIndex: SetIndex;
Si0Field: Si0Field;
@@ -1045,6 +1061,9 @@ declare module '@polkadot/types/types/registry' {
StakingLedgerTo240: StakingLedgerTo240;
Statement: Statement;
StatementKind: StatementKind;
StatementStoreInvalidStatement: StatementStoreInvalidStatement;
StatementStoreStatementSource: StatementStoreStatementSource;
StatementStoreValidStatement: StatementStoreValidStatement;
StorageChangeSet: StorageChangeSet;
StorageData: StorageData;
StorageDeposit: StorageDeposit;
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4 -4
View File
@@ -18,7 +18,7 @@
"./packageDetect.cjs"
],
"type": "module",
"version": "10.12.3",
"version": "11.0.1",
"main": "index.js",
"dependencies": {
"@polkadot/util": "^12.6.2",
@@ -26,9 +26,9 @@
"tslib": "^2.6.2"
},
"devDependencies": {
"@polkadot/types": "10.12.3",
"@polkadot/types-augment": "10.12.3",
"@polkadot/types-support": "10.12.3",
"@polkadot/types": "11.0.1",
"@polkadot/types-augment": "11.0.1",
"@polkadot/types-support": "11.0.1",
"@polkadot/util-crypto": "^12.6.2"
}
}
+4 -4
View File
@@ -123,12 +123,12 @@ export abstract class AbstractArray<T extends Codec> extends Array<T> implements
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
public toHuman (isExtended?: boolean): AnyJson {
public toHuman (isExtended?: boolean, disableAscii?: boolean): AnyJson {
const count = this.length;
const result = new Array<AnyJson>(count);
for (let i = 0; i < count; i++) {
result[i] = this[i] && this[i].toHuman(isExtended);
result[i] = this[i] && this[i].toHuman(isExtended, disableAscii);
}
return result;
@@ -153,12 +153,12 @@ export abstract class AbstractArray<T extends Codec> extends Array<T> implements
/**
* @description Converts the value in a best-fit primitive form
*/
public toPrimitive (): AnyJson {
public toPrimitive (disableAscii?: boolean): AnyJson {
const count = this.length;
const result = new Array<AnyJson>(count);
for (let i = 0; i < count; i++) {
result[i] = this[i] && this[i].toPrimitive();
result[i] = this[i] && this[i].toPrimitive(disableAscii);
}
return result;
+4 -4
View File
@@ -75,8 +75,8 @@ export abstract class AbstractBase<T extends Codec> implements Codec {
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
public toHuman (isExtended?: boolean): AnyJson {
return this.#raw.toHuman(isExtended);
public toHuman (isExtended?: boolean, disableAscii?: boolean): AnyJson {
return this.#raw.toHuman(isExtended, disableAscii);
}
/**
@@ -89,8 +89,8 @@ export abstract class AbstractBase<T extends Codec> implements Codec {
/**
* @description Converts the value in a best-fit primitive form
*/
public toPrimitive (): AnyJson {
return this.#raw.toPrimitive();
public toPrimitive (disableAscii?: boolean): AnyJson {
return this.#raw.toPrimitive(disableAscii);
}
/**
+2 -2
View File
@@ -60,7 +60,7 @@ export abstract class AbstractObject<T extends ToString> implements CodecObject<
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
public abstract toHuman (isExtended?: boolean): AnyJson;
public abstract toHuman (isExtended?: boolean, disableAscii?: boolean): AnyJson;
/**
* @description Converts the Object to JSON, typically used for RPC transfers
@@ -70,7 +70,7 @@ export abstract class AbstractObject<T extends ToString> implements CodecObject<
/**
* @description Converts the value in a best-fit primitive form
*/
public abstract toPrimitive (): AnyJson;
public abstract toPrimitive (disableAscii?: boolean): AnyJson;
/**
* @description Returns the string representation of the value
+4 -4
View File
@@ -143,8 +143,8 @@ export class Compact<T extends INumber> implements ICompact<T> {
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
public toHuman (isExtended?: boolean): AnyJson {
return this.#raw.toHuman(isExtended);
public toHuman (isExtended?: boolean, disableAscii?: boolean): AnyJson {
return this.#raw.toHuman(isExtended, disableAscii);
}
/**
@@ -164,8 +164,8 @@ export class Compact<T extends INumber> implements ICompact<T> {
/**
* @description Converts the value in a best-fit primitive form
*/
public toPrimitive (): string | number {
return this.#raw.toPrimitive();
public toPrimitive (disableAscii?: boolean): string | number {
return this.#raw.toPrimitive(disableAscii);
}
/**
+4 -4
View File
@@ -374,10 +374,10 @@ export class Enum implements IEnum {
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
public toHuman (isExtended?: boolean): AnyJson {
public toHuman (isExtended?: boolean, disableAscii?: boolean): AnyJson {
return this.#isBasic || this.isNone
? this.type
: { [this.type]: this.#raw.toHuman(isExtended) };
: { [this.type]: this.#raw.toHuman(isExtended, disableAscii) };
}
/**
@@ -399,10 +399,10 @@ export class Enum implements IEnum {
/**
* @description Converts the value in a best-fit primitive form
*/
public toPrimitive (): AnyJson {
public toPrimitive (disableAscii?: boolean): AnyJson {
return this.#isBasic
? this.type
: { [stringCamelCase(this.type)]: this.#raw.toPrimitive() };
: { [stringCamelCase(this.type)]: this.#raw.toPrimitive(disableAscii) };
}
/**
+4 -4
View File
@@ -183,8 +183,8 @@ export class Option<T extends Codec> implements IOption<T> {
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
public toHuman (isExtended?: boolean): AnyJson {
return this.#raw.toHuman(isExtended);
public toHuman (isExtended?: boolean, disableAscii?: boolean): AnyJson {
return this.#raw.toHuman(isExtended, disableAscii);
}
/**
@@ -199,10 +199,10 @@ export class Option<T extends Codec> implements IOption<T> {
/**
* @description Converts the value in a best-fit primitive form
*/
public toPrimitive (): AnyJson {
public toPrimitive (disableAscii?: boolean): AnyJson {
return this.isNone
? null
: this.#raw.toPrimitive();
: this.#raw.toPrimitive(disableAscii);
}
/**
@@ -163,11 +163,11 @@ export class BTreeSet<V extends Codec = Codec> extends Set<V> implements ISet<V>
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
public toHuman (isExtended?: boolean): AnyJson {
public toHuman (isExtended?: boolean, disableAscii?: boolean): AnyJson {
const json: AnyJson = [];
for (const v of this.values()) {
json.push(v.toHuman(isExtended));
json.push(v.toHuman(isExtended, disableAscii));
}
return json;
@@ -196,11 +196,11 @@ export class BTreeSet<V extends Codec = Codec> extends Set<V> implements ISet<V>
/**
* @description Converts the value in a best-fit primitive form
*/
public toPrimitive (): AnyJson {
public toPrimitive (disableAscii?: boolean): AnyJson {
const json: AnyJson = [];
for (const v of this.values()) {
json.push(v.toPrimitive());
json.push(v.toPrimitive(disableAscii));
}
return json;
+6 -6
View File
@@ -177,15 +177,15 @@ export class CodecMap<K extends Codec = Codec, V extends Codec = Codec> extends
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
public toHuman (isExtended?: boolean): Record<string, AnyJson> {
public toHuman (isExtended?: boolean, disableAscii?: boolean): Record<string, AnyJson> {
const json: Record<string, AnyJson> = {};
for (const [k, v] of this.entries()) {
json[
k instanceof Raw && k.isAscii
k instanceof Raw && !disableAscii && k.isAscii
? k.toUtf8()
: k.toString()
] = v.toHuman(isExtended);
] = v.toHuman(isExtended, disableAscii);
}
return json;
@@ -207,15 +207,15 @@ export class CodecMap<K extends Codec = Codec, V extends Codec = Codec> extends
/**
* @description Converts the value in a best-fit primitive form
*/
public toPrimitive (): AnyJson {
public toPrimitive (disableAscii?: boolean): AnyJson {
const json: Record<string, AnyJson> = {};
for (const [k, v] of this.entries()) {
json[
k instanceof Raw && k.isAscii
k instanceof Raw && !disableAscii && k.isAscii
? k.toUtf8()
: k.toString()
] = v.toPrimitive();
] = v.toPrimitive(disableAscii);
}
return json;
@@ -84,19 +84,19 @@ export class WrapperKeepOpaque<T extends Codec> extends Bytes {
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
public override toHuman (isExtended?: boolean): AnyJson {
public override toHuman (isExtended?: boolean, disableAscii?: boolean): AnyJson {
return this.#decoded
? this.#decoded.toHuman(isExtended)
: super.toHuman();
? this.#decoded.toHuman(isExtended, disableAscii)
: super.toHuman(isExtended, disableAscii);
}
/**
* @description Converts the value in a best-fit primitive form
*/
public override toPrimitive (): any {
public override toPrimitive (disableAscii?: boolean): any {
return this.#decoded
? this.#decoded.toPrimitive()
: super.toPrimitive();
? this.#decoded.toPrimitive(disableAscii)
: super.toPrimitive(disableAscii);
}
/**
+2 -2
View File
@@ -114,10 +114,10 @@ export class Json extends Map<string, any> implements Codec {
/**
* @description Converts the value in a best-fit primitive form
*/
public toPrimitive (): Record<string, AnyJson> {
public toPrimitive (disableAscii?: boolean): Record<string, AnyJson> {
return [...this.entries()].reduce<Record<string, AnyJson>>((json, [key, value]): Record<string, AnyJson> => {
json[key] = isFunction((value as Codec).toPrimitive)
? (value as Codec).toPrimitive()
? (value as Codec).toPrimitive(disableAscii)
: value as AnyJson;
return json;
@@ -82,6 +82,10 @@ describe('Raw', (): void => {
expect(new Raw(registry, '0x2021222324').isAscii).toBe(true);
});
it('has valid toHuman with disableAscii option set as true', (): void => {
expect(new Raw(registry, new Uint8Array([85, 85, 85, 85, 85, 85, 85, 85])).toHuman(undefined, true)).toEqual('0x5555555555555555');
});
it('has valid toPrimitive', (): void => {
expect(new Raw(registry, 'testing').toPrimitive()).toEqual('testing');
expect(new Raw(registry, '0xe4bda0e5a5bd').toPrimitive()).toEqual('0xe4bda0e5a5bd');
+4 -4
View File
@@ -110,8 +110,8 @@ export class Raw extends Uint8Array implements IU8a {
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
public toHuman (): AnyJson {
return this.toPrimitive();
public toHuman (_isExtended?: boolean, disableAscii?: boolean): AnyJson {
return this.toPrimitive(disableAscii);
}
/**
@@ -124,8 +124,8 @@ export class Raw extends Uint8Array implements IU8a {
/**
* @description Converts the value in a best-fit primitive form
*/
public toPrimitive (): AnyJson {
if (this.isAscii) {
public toPrimitive (disableAscii?: boolean): AnyJson {
if (!disableAscii && this.isAscii) {
const text = this.toUtf8();
// ensure we didn't end up with multibyte codepoints
+4 -4
View File
@@ -268,11 +268,11 @@ export class Struct<
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
public toHuman (isExtended?: boolean): Record<string, AnyJson> {
public toHuman (isExtended?: boolean, disableAscii?: boolean): Record<string, AnyJson> {
const json: Record<string, AnyJson> = {};
for (const [k, v] of this.entries()) {
json[k as string] = v.toHuman(isExtended);
json[k as string] = v.toHuman(isExtended, disableAscii);
}
return json;
@@ -296,11 +296,11 @@ export class Struct<
/**
* @description Converts the value in a best-fit primitive form
*/
public toPrimitive (): Record<string, AnyJson> {
public toPrimitive (disableAscii?: boolean): Record<string, AnyJson> {
const json: Record<string, AnyJson> = {};
for (const [k, v] of this.entries()) {
json[k as string] = v.toPrimitive();
json[k as string] = v.toPrimitive(disableAscii);
}
return json;
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-codec', path: 'auto', type: 'auto', version: '10.12.3' };
export const packageInfo = { name: '@polkadot/types-codec', path: 'auto', type: 'auto', version: '11.0.1' };
+5 -2
View File
@@ -86,8 +86,10 @@ export interface Codec {
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
* @param isExtended When set, for some (e.g. call) it can add more info, e.g. metadata documentation. (Generally not needed in all cases, but can be useful in Events, Calls, ...)
* @param disableAscii When set, for some (e.g. `Raw` types) it will disable converting the value to ascii.
*/
toHuman (isExtended?: boolean): AnyJson;
toHuman (isExtended?: boolean, disableAscii?: boolean): AnyJson;
/**
* @description Converts the Object to JSON, typically used for RPC transfers
@@ -96,8 +98,9 @@ export interface Codec {
/**
* @description Converts the value in a best-fit primitive form
* @param disableAscii
*/
toPrimitive (): AnyJson;
toPrimitive (disableAscii?: boolean): AnyJson;
/**
* @description Returns the base runtime type name for this instance
+2 -2
View File
@@ -31,7 +31,7 @@ export interface INumber extends Codec {
toBigInt (): bigint;
toBn (): BN;
toNumber (): number;
toPrimitive (): string | number;
toPrimitive (disableAscii?: boolean): string | number;
}
export interface IFloat extends Codec {
@@ -78,7 +78,7 @@ export interface IU8a extends Uint8Array, Codec {
readonly isUtf8: boolean
bitLength (): number;
toHuman (isExtended?: boolean): any;
toHuman (isExtended?: boolean, disableAscii?: boolean): any;
toJSON (): any;
toUtf8 (): string;
}
+3 -3
View File
@@ -18,14 +18,14 @@
"./packageDetect.cjs"
],
"type": "module",
"version": "10.12.3",
"version": "11.0.1",
"main": "index.js",
"dependencies": {
"@polkadot/types-codec": "10.12.3",
"@polkadot/types-codec": "11.0.1",
"@polkadot/util": "^12.6.2",
"tslib": "^2.6.2"
},
"devDependencies": {
"@polkadot/types": "10.12.3"
"@polkadot/types": "11.0.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-create', path: 'auto', type: 'auto', version: '10.12.3' };
export const packageInfo = { name: '@polkadot/types-create', path: 'auto', type: 'auto', version: '11.0.1' };
+5 -5
View File
@@ -18,17 +18,17 @@
"./packageDetect.cjs"
],
"type": "module",
"version": "10.12.3",
"version": "11.0.1",
"main": "index.js",
"dependencies": {
"@polkadot/networks": "^12.6.2",
"@polkadot/types": "10.12.3",
"@polkadot/types-codec": "10.12.3",
"@polkadot/types-create": "10.12.3",
"@polkadot/types": "11.0.1",
"@polkadot/types-codec": "11.0.1",
"@polkadot/types-create": "11.0.1",
"@polkadot/util": "^12.6.2",
"tslib": "^2.6.2"
},
"devDependencies": {
"@polkadot/api": "10.12.3"
"@polkadot/api": "11.0.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-known', path: 'auto', type: 'auto', version: '10.12.3' };
export const packageInfo = { name: '@polkadot/types-known', path: 'auto', type: 'auto', version: '11.0.1' };
@@ -4778,5 +4778,87 @@ export const upgrades: ChainUpgradesExpanded = [
1
]
]
],
[
22515962,
1001003,
[
[
"0xdf6acb689907609b",
4
],
[
"0x37e397fc7c91f5e4",
2
],
[
"0x40fe3ad401f8959a",
6
],
[
"0xd2bc9897eed08f15",
3
],
[
"0xf78b278be53f454c",
2
],
[
"0xaf2c0297a23e6d3d",
7
],
[
"0x49eaaf1b548a0cb0",
3
],
[
"0x91d5df18b0d2cf58",
2
],
[
"0x2a5e924655399e60",
1
],
[
"0xed99c5acb25eedf5",
3
],
[
"0xcbca25e39f142387",
2
],
[
"0x687ad44ad37f03c2",
1
],
[
"0xab3c0572291feb8b",
1
],
[
"0xbc9d89904f5b923f",
1
],
[
"0x37c8bb1350a9a2a8",
4
],
[
"0xf3ff14d5ab527059",
3
],
[
"0x17a6bc0d0062aeb3",
1
],
[
"0x18ef58a3b67ba770",
1
],
[
"0xfbc577b9d747efd6",
1
]
]
]
];
@@ -3216,5 +3216,169 @@ export const upgrades: ChainUpgradesExpanded = [
1
]
]
],
[
20181758,
1001003,
[
[
"0xdf6acb689907609b",
4
],
[
"0x37e397fc7c91f5e4",
2
],
[
"0x40fe3ad401f8959a",
6
],
[
"0x17a6bc0d0062aeb3",
1
],
[
"0x18ef58a3b67ba770",
1
],
[
"0xd2bc9897eed08f15",
3
],
[
"0xf78b278be53f454c",
2
],
[
"0xaf2c0297a23e6d3d",
5
],
[
"0x49eaaf1b548a0cb0",
3
],
[
"0x91d5df18b0d2cf58",
2
],
[
"0x2a5e924655399e60",
1
],
[
"0xed99c5acb25eedf5",
3
],
[
"0xcbca25e39f142387",
2
],
[
"0x687ad44ad37f03c2",
1
],
[
"0xab3c0572291feb8b",
1
],
[
"0xbc9d89904f5b923f",
1
],
[
"0x37c8bb1350a9a2a8",
4
],
[
"0xf3ff14d5ab527059",
3
],
[
"0xfbc577b9d747efd6",
1
]
]
],
[
20438530,
1002000,
[
[
"0xdf6acb689907609b",
4
],
[
"0x37e397fc7c91f5e4",
2
],
[
"0x40fe3ad401f8959a",
6
],
[
"0x17a6bc0d0062aeb3",
1
],
[
"0x18ef58a3b67ba770",
1
],
[
"0xd2bc9897eed08f15",
3
],
[
"0xf78b278be53f454c",
2
],
[
"0xaf2c0297a23e6d3d",
10
],
[
"0x49eaaf1b548a0cb0",
3
],
[
"0x91d5df18b0d2cf58",
2
],
[
"0x2a5e924655399e60",
1
],
[
"0xed99c5acb25eedf5",
3
],
[
"0xcbca25e39f142387",
2
],
[
"0x687ad44ad37f03c2",
1
],
[
"0xab3c0572291feb8b",
1
],
[
"0xbc9d89904f5b923f",
1
],
[
"0x37c8bb1350a9a2a8",
4
],
[
"0xf3ff14d5ab527059",
3
],
[
"0xfbc577b9d747efd6",
1
]
]
]
];
@@ -5334,5 +5334,173 @@ export const upgrades: ChainUpgradesExpanded = [
1
]
]
],
[
20056997,
1009000,
[
[
"0xdf6acb689907609b",
5
],
[
"0x37e397fc7c91f5e4",
2
],
[
"0x40fe3ad401f8959a",
6
],
[
"0xd2bc9897eed08f15",
3
],
[
"0xf78b278be53f454c",
2
],
[
"0xaf2c0297a23e6d3d",
10
],
[
"0x49eaaf1b548a0cb0",
3
],
[
"0x91d5df18b0d2cf58",
2
],
[
"0x2a5e924655399e60",
1
],
[
"0xed99c5acb25eedf5",
3
],
[
"0xcbca25e39f142387",
2
],
[
"0x687ad44ad37f03c2",
1
],
[
"0xab3c0572291feb8b",
1
],
[
"0xbc9d89904f5b923f",
1
],
[
"0x37c8bb1350a9a2a8",
4
],
[
"0xf3ff14d5ab527059",
3
],
[
"0x17a6bc0d0062aeb3",
1
],
[
"0x18ef58a3b67ba770",
1
],
[
"0xfbc577b9d747efd6",
1
]
]
],
[
20368318,
1010000,
[
[
"0xdf6acb689907609b",
5
],
[
"0x37e397fc7c91f5e4",
2
],
[
"0x40fe3ad401f8959a",
6
],
[
"0xd2bc9897eed08f15",
3
],
[
"0xf78b278be53f454c",
2
],
[
"0xaf2c0297a23e6d3d",
10
],
[
"0x49eaaf1b548a0cb0",
3
],
[
"0x91d5df18b0d2cf58",
2
],
[
"0x2a5e924655399e60",
1
],
[
"0xed99c5acb25eedf5",
3
],
[
"0xcbca25e39f142387",
2
],
[
"0x687ad44ad37f03c2",
1
],
[
"0xab3c0572291feb8b",
1
],
[
"0xbc9d89904f5b923f",
1
],
[
"0x37c8bb1350a9a2a8",
4
],
[
"0xf3ff14d5ab527059",
3
],
[
"0x6ff52ee858e6c5bd",
1
],
[
"0x17a6bc0d0062aeb3",
1
],
[
"0x18ef58a3b67ba770",
1
],
[
"0xfbc577b9d747efd6",
1
]
]
]
];
@@ -20,5 +20,6 @@ export const upgrades: ChainUpgradesRaw = [
[14248044, 9271], [14433840, 9280], [14645900, 9291], [15048375, 9300], [15426015, 9320],
// we have 9340 via system.setStorage (whitelist.WhitelistedCallDispatched event)
[15680713, 9340], [15756296, 9350], [15912007, 9360], [16356547, 9370], [17335450, 9381],
[18062739, 9420], [18625000, 9430], [20465806, 1000000], [21570000, 1001000], [21786291, 1001002]
[18062739, 9420], [18625000, 9430], [20465806, 1000000], [21570000, 1001000], [21786291, 1001002],
[22515962, 1001003]
];
@@ -14,5 +14,6 @@ export const upgrades: ChainUpgradesRaw = [
[10458576, 9200], [10655116, 9220], [10879371, 9230], [11328884, 9250], [11532856, 9260],
[11933818, 9270], [12217535, 9280], [12245277, 9281], [12532644, 9291], [12876189, 9300],
[13800015, 9340], [14188833, 9360], [14543918, 9370], [15978362, 9420], [16450000, 9430],
[17840000, 9431], [18407475, 1000001], [19551000, 1001002]
[17840000, 9431], [18407475, 1000001], [19551000, 1001002], [20181758, 1001003],
[20438530, 1002000]
];
@@ -20,5 +20,6 @@ export const upgrades: ChainUpgradesRaw = [
[13649433, 9340], [13761100, 9350], [13847400, 9360], [14249200, 9370], [14576855, 9380],
[14849830, 9390], [15146832, 9400], [15332317, 9401], [15661793, 9420], [16165469, 9430],
[18293984, 102000], [18293991, 103000], [18451783, 104000], [18679741, 1005000], [19166695, 1006000],
[19234157, 1006001], [19542944, 1007000], [19621258, 1007001], [19761406, 1008000]
[19234157, 1006001], [19542944, 1007000], [19621258, 1007001], [19761406, 1008000], [20056997, 1009000],
[20368318, 1010000]
];
+1 -1
View File
@@ -18,7 +18,7 @@
"./packageDetect.cjs"
],
"type": "module",
"version": "10.12.3",
"version": "11.0.1",
"main": "index.js",
"dependencies": {
"@polkadot/util": "^12.6.2",
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -127,6 +127,8 @@ export default {
"system_version",
"transactionWatch_unstable_submitAndWatch",
"transactionWatch_unstable_unwatch",
"transaction_unstable_broadcast",
"transaction_unstable_stop",
"unsubscribe_newHead"
]
};
File diff suppressed because it is too large Load Diff
@@ -14,7 +14,7 @@ export default {
"apis": [
[
"0xdf6acb689907609b",
4
5
],
[
"0x37e397fc7c91f5e4",
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-support', path: 'auto', type: 'auto', version: '10.12.3' };
export const packageInfo = { name: '@polkadot/types-support', path: 'auto', type: 'auto', version: '11.0.1' };
+5 -5
View File
@@ -18,13 +18,13 @@
"./packageDetect.cjs"
],
"type": "module",
"version": "10.12.3",
"version": "11.0.1",
"main": "index.js",
"dependencies": {
"@polkadot/keyring": "^12.6.2",
"@polkadot/types-augment": "10.12.3",
"@polkadot/types-codec": "10.12.3",
"@polkadot/types-create": "10.12.3",
"@polkadot/types-augment": "11.0.1",
"@polkadot/types-codec": "11.0.1",
"@polkadot/types-create": "11.0.1",
"@polkadot/util": "^12.6.2",
"@polkadot/util-crypto": "^12.6.2",
"rxjs": "^7.8.1",
@@ -32,6 +32,6 @@
},
"devDependencies": {
"@polkadot/keyring": "^12.6.2",
"@polkadot/types-support": "10.12.3"
"@polkadot/types-support": "11.0.1"
}
}
+16 -7
View File
@@ -1,11 +1,12 @@
// Copyright 2017-2024 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { AnyJson, AnyTuple, AnyU8a, ArgsDef, IMethod, Inspect } from '@polkadot/types-codec/types';
import type { AnyJson, AnyTuple, AnyU8a, ArgsDef, IMethod, Inspect, IOption } from '@polkadot/types-codec/types';
import type { HexString } from '@polkadot/util/types';
import type { EcdsaSignature, Ed25519Signature, ExtrinsicUnknown, ExtrinsicV4, Sr25519Signature } from '../interfaces/extrinsics/index.js';
import type { FunctionMetadataLatest } from '../interfaces/metadata/index.js';
import type { Address, Call, CodecHash } from '../interfaces/runtime/index.js';
import type { MultiLocation } from '../interfaces/types.js';
import type { CallBase, ExtrinsicPayloadValue, ICompact, IExtrinsic, IKeyringPair, INumber, Registry, SignatureOptions } from '../types/index.js';
import type { GenericExtrinsicEra } from './ExtrinsicEra.js';
import type { ExtrinsicValueV4 } from './v4/Extrinsic.js';
@@ -191,6 +192,13 @@ abstract class ExtrinsicBase<A extends AnyTuple> extends AbstractBase<ExtrinsicV
return this.inner.signature.tip;
}
/**
* @description Forward compat
*/
public get assetId (): IOption<INumber> | IOption<MultiLocation> {
return this.inner.signature.assetId;
}
/**
* @description Returns the raw transaction version (not flagged with signing information)
*/
@@ -307,20 +315,21 @@ export class GenericExtrinsic<A extends AnyTuple = AnyTuple> extends ExtrinsicBa
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
public override toHuman (isExpanded?: boolean): AnyJson {
public override toHuman (isExpanded?: boolean, disableAscii?: boolean): AnyJson {
return objectSpread<Record<string, AnyJson>>(
{},
{
isSigned: this.isSigned,
method: this.method.toHuman(isExpanded)
method: this.method.toHuman(isExpanded, disableAscii)
},
this.isSigned
? {
era: this.era.toHuman(isExpanded),
nonce: this.nonce.toHuman(isExpanded),
assetId: this.assetId.toHuman(isExpanded, disableAscii),
era: this.era.toHuman(isExpanded, disableAscii),
nonce: this.nonce.toHuman(isExpanded, disableAscii),
signature: this.signature.toHex(),
signer: this.signer.toHuman(isExpanded),
tip: this.tip.toHuman(isExpanded)
signer: this.signer.toHuman(isExpanded, disableAscii),
tip: this.tip.toHuman(isExpanded, disableAscii)
}
: null
);
@@ -6,7 +6,8 @@ import type { AnyJson, BareOpts, Registry } from '@polkadot/types-codec/types';
import type { HexString } from '@polkadot/util/types';
import type { BlockHash } from '../interfaces/chain/index.js';
import type { ExtrinsicPayloadV4 } from '../interfaces/extrinsics/index.js';
import type { ExtrinsicPayloadValue, ICompact, IKeyringPair, INumber } from '../types/index.js';
import type { MultiLocation } from '../interfaces/types.js';
import type { ExtrinsicPayloadValue, ICompact, IKeyringPair, INumber, IOption } from '../types/index.js';
import type { GenericExtrinsicEra } from './ExtrinsicEra.js';
import { AbstractBase } from '@polkadot/types-codec';
@@ -109,6 +110,13 @@ export class GenericExtrinsicPayload extends AbstractBase<ExtrinsicPayloadVx> {
return this.inner.transactionVersion || this.registry.createTypeUnsafe('u32', []);
}
/**
* @description The (optional) asset id as a [[u32]] or [[MultiLocation]] for this payload
*/
public get assetId (): IOption<INumber | IOption<MultiLocation>> {
return this.inner.assetId;
}
/**
* @description Compares the value of the input to see if there is a match
*/
@@ -134,8 +142,8 @@ export class GenericExtrinsicPayload extends AbstractBase<ExtrinsicPayloadVx> {
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
public override toHuman (isExtended?: boolean): AnyJson {
return this.inner.toHuman(isExtended);
public override toHuman (isExtended?: boolean, disableAscii?: boolean): AnyJson {
return this.inner.toHuman(isExtended, disableAscii);
}
/**
@@ -4,8 +4,8 @@
import type { Text, Vec } from '@polkadot/types-codec';
import type { AnyJson, Registry } from '@polkadot/types-codec/types';
import type { HexString } from '@polkadot/util/types';
import type { Address, BlockHash, Call, ExtrinsicEra, Hash } from '../interfaces/index.js';
import type { Codec, ICompact, INumber, IRuntimeVersion, ISignerPayload, SignerPayloadJSON, SignerPayloadRaw } from '../types/index.js';
import type { Address, BlockHash, Call, ExtrinsicEra, Hash, MultiLocation } from '../interfaces/index.js';
import type { Codec, ICompact, INumber, IOption, IRuntimeVersion, ISignerPayload, SignerPayloadJSON, SignerPayloadRaw } from '../types/index.js';
import { Option, Struct } from '@polkadot/types-codec';
import { objectProperty, objectSpread, u8aToHex } from '@polkadot/util';
@@ -104,6 +104,10 @@ export class GenericSignerPayload extends Struct implements ISignerPayload, Sign
return this.getT('tip');
}
get assetId (): IOption<INumber> | IOption<MultiLocation> {
return this.getT('assetId');
}
get version (): INumber {
return this.getT('version');
}
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { SignOptions } from '@polkadot/keyring/types';
import type { MultiLocation } from '@polkadot/types/interfaces';
import type { Bytes } from '@polkadot/types-codec';
import type { Inspect, Registry } from '@polkadot/types-codec/types';
import type { HexString } from '@polkadot/util/types';
@@ -104,7 +105,7 @@ export class GenericExtrinsicPayloadV4 extends Struct {
/**
* @description The (optional) asset id for this signature for chains that support transaction fees in assets
*/
public get assetId (): IOption<INumber> {
public get assetId (): IOption<INumber | IOption<MultiLocation>> {
return this.getT('assetId');
}
@@ -1,10 +1,11 @@
// Copyright 2017-2024 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { MultiLocation } from '@polkadot/types/interfaces';
import type { HexString } from '@polkadot/util/types';
import type { EcdsaSignature, Ed25519Signature, ExtrinsicEra, ExtrinsicSignature, Sr25519Signature } from '../../interfaces/extrinsics/index.js';
import type { Address, Call } from '../../interfaces/runtime/index.js';
import type { ExtrinsicPayloadValue, ICompact, IExtrinsicSignature, IKeyringPair, INumber, Registry, SignatureOptions } from '../../types/index.js';
import type { ExtrinsicPayloadValue, ICompact, IExtrinsicSignature, IKeyringPair, INumber, IOption, Registry, SignatureOptions } from '../../types/index.js';
import type { ExtrinsicSignatureOptions } from '../types.js';
import { Struct } from '@polkadot/types-codec';
@@ -118,6 +119,13 @@ export class GenericExtrinsicSignatureV4 extends Struct implements IExtrinsicSig
return this.getT('tip');
}
/**
* @description The [[u32]] or [[MultiLocation]] assetId
*/
public get assetId (): IOption<INumber> | IOption<MultiLocation> {
return this.getT('assetId');
}
protected _injectSignature (signer: Address, signature: ExtrinsicSignature, payload: GenericExtrinsicPayloadV4): IExtrinsicSignature {
// use the fields exposed to guide the getters
for (let i = 0, count = this.#signKeys.length; i < count; i++) {
+2 -2
View File
@@ -213,7 +213,7 @@ export class GenericCall<A extends AnyTuple = AnyTuple> extends Struct implement
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
public override toHuman (isExpanded?: boolean): Record<string, AnyJson> {
public override toHuman (isExpanded?: boolean, disableAscii?: boolean): Record<string, AnyJson> {
let call: CallFunction | undefined;
try {
@@ -225,7 +225,7 @@ export class GenericCall<A extends AnyTuple = AnyTuple> extends Struct implement
return objectSpread(
{
args: this.argsEntries.reduce<Record<string, AnyJson>>((args, [n, a]) =>
objectSpread(args, { [n]: a.toHuman(isExpanded) }), {}),
objectSpread(args, { [n]: a.toHuman(isExpanded, disableAscii) }), {}),
method: call?.method,
section: call?.section
},
+4 -4
View File
@@ -106,12 +106,12 @@ export class GenericEventData extends Tuple implements IEventData {
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
public override toHuman (isExtended?: boolean): AnyJson {
public override toHuman (isExtended?: boolean, disableAscii?: boolean): AnyJson {
if (this.#names !== null) {
const json: Record<string, AnyJson> = {};
for (let i = 0, count = this.#names.length; i < count; i++) {
json[this.#names[i]] = this[i].toHuman(isExtended);
json[this.#names[i]] = this[i].toHuman(isExtended, disableAscii);
}
return json;
@@ -185,7 +185,7 @@ export class GenericEvent extends Struct implements IEvent<Codec[]> {
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
public override toHuman (isExpanded?: boolean): Record<string, AnyJson> {
public override toHuman (isExpanded?: boolean, disableAscii?: boolean): Record<string, AnyJson> {
return objectSpread(
{
method: this.method,
@@ -194,7 +194,7 @@ export class GenericEvent extends Struct implements IEvent<Codec[]> {
isExpanded
? { docs: this.meta.docs.map((d) => d.toString()) }
: null,
super.toHuman(isExpanded)
super.toHuman(isExpanded, disableAscii)
);
}
}
@@ -25,11 +25,13 @@ export { default as evm } from './evm/definitions.js';
export { default as extrinsics } from './extrinsics/definitions.js';
export { default as fungibles } from './fungibles/definitions.js';
export { default as genericAsset } from './genericAsset/definitions.js';
export { default as genesisBuilder } from './genesisBuilder/definitions.js';
export { default as gilt } from './gilt/definitions.js';
export { default as grandpa } from './grandpa/definitions.js';
export { default as identity } from './identity/definitions.js';
export { default as imOnline } from './imOnline/definitions.js';
export { default as lottery } from './lottery/definitions.js';
export { default as mixnet } from './mixnet/definitions.js';
export { default as mmr } from './mmr/definitions.js';
export { default as nfts } from './nfts/definitions.js';
export { default as nompools } from './nompools/definitions.js';
@@ -41,6 +43,7 @@ export { default as scheduler } from './scheduler/definitions.js';
export { default as session } from './session/definitions.js';
export { default as society } from './society/definitions.js';
export { default as staking } from './staking/definitions.js';
export { default as statement } from './statement/definitions.js';
export { default as support } from './support/definitions.js';
export { default as syncstate } from './syncstate/definitions.js';
export { default as system } from './system/definitions.js';
@@ -0,0 +1,14 @@
// Copyright 2017-2024 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Definitions } from '../../types/index.js';
import { runtime } from './runtime.js';
export default {
rpc: {},
runtime,
types: {
GenesisBuildErr: 'Text'
}
} as Definitions;

Some files were not shown because too many files have changed in this diff Show More