Compare commits

...
34 Commits
Author SHA1 Message Date
github-actions[bot] 0449dd7b51 [CI Skip] release/stable 8.3.2
skip-checks: true
2022-05-08 16:23:38 +00:00
Jaco 4d44c1187b 8.3.2 (#4800) 2022-05-08 19:15:30 +03:00
github-actions[bot] f2eff6628b [CI Skip] release/beta 8.3.2-2
skip-checks: true
2022-05-06 11:22:58 +00:00
Nikos KontakisandPierre Krieger 4923bc3e35 Bump @substrate/connect in rpc-provider to 0.7.4 (#4796)
* Bump @substrate/connect in rpc-provider to 0.7.4

* Add new optional param config in ScProvider's connect() where user can alter the log level

* Satisfy linter

* Update packages/rpc-provider/src/substrate-connect/ScProvider.ts

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>

* Address PRs comments

* Fix build error

* remove config feature

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
2022-05-06 14:11:37 +03:00
github-actions[bot] 47da005bee [CI Skip] release/beta 8.3.2-1
skip-checks: true
2022-05-06 03:51:19 +00:00
Jaco 7e82ab3d43 Adjust BTreeSet in typegen top-level generation (#4794) 2022-05-06 06:42:22 +03:00
github-actions[bot] 8df9642e04 [CI Skip] release/beta 8.3.2-0
skip-checks: true
2022-05-05 06:17:33 +00:00
Jaco 6f76e1c4cc Bump @polkadot/dev (#4792) 2022-05-05 09:07:55 +03:00
github-actions[bot] 1d65cc5642 [CI Skip] release/stable 8.3.1
skip-checks: true
2022-05-01 07:01:27 +00:00
Jaco 722bb5222e 8.3.1 (#4789) 2022-05-01 09:52:47 +03:00
github-actions[bot] 49e2daf8f2 [CI Skip] release/beta 8.2.2-11
skip-checks: true
2022-05-01 06:43:57 +00:00
Jaco 88e3c900b7 Bump metadata (#4788) 2022-05-01 09:35:49 +03:00
github-actions[bot] a127dea5e4 [CI Skip] release/beta 8.2.2-10
skip-checks: true
2022-04-30 19:44:53 +00:00
Jaco d29660dc4e Adjust size-assert for U8Fixed (#4787) 2022-04-30 22:35:23 +03:00
github-actions[bot] 1870ad26d5 [CI Skip] release/beta 8.2.2-9
skip-checks: true
2022-04-30 11:29:05 +00:00
Jaco 558a42c6ed Correct BTreeSet extraction (#4785) 2022-04-30 14:18:45 +03:00
github-actions[bot] 6708264688 [CI Skip] release/beta 8.2.2-8
skip-checks: true
2022-04-30 06:09:26 +00:00
Jaco abac14f983 Bump @polkadot/util (#4784) 2022-04-30 09:01:02 +03:00
github-actions[bot] 3cf9040115 [CI Skip] release/beta 8.2.2-7
skip-checks: true
2022-04-29 11:47:32 +00:00
Jaco 37dcd78c4a Bump TS (#4782) 2022-04-29 14:37:50 +03:00
github-actions[bot] 6b3e4cc90e [CI Skip] release/beta 8.2.2-6
skip-checks: true
2022-04-27 09:54:17 +00:00
Jaco 79ab347cbe Westend 9200 upgrade block (#4777) 2022-04-27 12:43:28 +03:00
github-actions[bot] bc302c5cb7 [CI Skip] release/beta 8.2.2-5
skip-checks: true
2022-04-27 07:05:38 +00:00
Jaco 9972776afb Bump @polkadot/dev (#4776) 2022-04-27 09:56:13 +03:00
github-actions[bot] 0b2a3c4e74 [CI Skip] release/beta 8.2.2-4
skip-checks: true
2022-04-26 17:36:22 +00:00
Jaco ccac72fece Remove outdated contract docs (#4774) 2022-04-26 20:27:48 +03:00
github-actions[bot] 8d5209d7dc [CI Skip] release/beta 8.2.2-3
skip-checks: true
2022-04-26 17:23:03 +00:00
Alex DandAlex D 5c2bd9dfa7 fetch metadata via websocket in polkadot-types-from-defs (#4773)
* add ability to fetch metadata from websocket connection as stated in usage https://github.com/polkadot-js/api/blob/master/packages/typegen/src/fromDefs.ts\#L20

* exit after websocket

Co-authored-by: Alex D <pr0fedt@gmail.com>
2022-04-26 20:13:29 +03:00
github-actions[bot] b2e71be983 [CI Skip] release/beta 8.2.2-2
skip-checks: true
2022-04-26 14:59:52 +00:00
Jaco d2f3672f2c Metadata for nomination pools (#4753)
* Metadata for nomination pools

* Update

* Adjust

* Bump meta

* Re-add pool meta

* Latest pools metadata

* Rerun
2022-04-26 17:48:49 +03:00
github-actions[bot] 6fb7849091 [CI Skip] release/beta 8.2.2-1
skip-checks: true
2022-04-26 13:23:48 +00:00
Jaco 983c77fe61 Adjustment for paymentInfo (#4771)
* Adjustment for paymentInfo

* Bump dev
2022-04-26 16:12:17 +03:00
github-actions[bot] 256e35386a [CI Skip] release/beta 8.2.2-0
skip-checks: true
2022-04-25 09:08:14 +00:00
Jaco 8beb03b177 Kusama 9190 upgrade block (#4769) 2022-04-25 12:00:39 +03:00
67 changed files with 6869 additions and 4302 deletions
+2 -1
View File
@@ -51,4 +51,5 @@
7.14.2
7.14.3
8.0.2
8.0.2
8.3.2
+27
View File
@@ -1,5 +1,32 @@
# CHANGELOG
## 8.3.2 May 8, 2022
Contributed:
- Bump `@substrate/connect` to 0.7.4 (Thanks to https://github.com/wirednkod)
Changes:
- Adjust `BTreeSet` in typegen top-level generation
## 8.3.1 May 1, 2022
Contributed:
- Fetch metadata via WS for `types-from-defs` (Thanks to https://github.com/alex-nax)
Changes:
- Extract metadata v14 `BTreeSet` types into correct type
- Assert to ensure that `[u8; <size>]` has exact sizes (non-u8a inputs)
- Adjust `tx.paymentInfo` signing process for existing signature
- Add Kusama 9190 upgrade block
- Add Westend 9200 upgrade block
- Update to latest Substrate, Kusama & Polkadot static metadata
## 8.2.1 Apr 24, 2022
Contributed:
+3 -3
View File
@@ -1,4 +1,4 @@
2924 Jaco 8.2.1 (#4766)
2939 Jaco 8.3.2 (#4800)
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
37 Keith Ingram Update contract types and rpc (#4541)
35 Stefanie Doll Updated child storage parameters (#1709)
@@ -9,13 +9,13 @@
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
5 Chevdor Fix metadata package link (#3458)
5 Jake Naviasky Fixing approvalFlagsToBools. (#1250)
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 Nantian fix bigint type (#3869)
4 Scott Twiname Add support for historical BlockNumber rpc methods (#4574)
4 Thibaut Sardan no subscription for http (#3127)
3 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
3 André Silva add support for ValidationCodeHash (#3640)
3 Antoine Estienne Adapted to display moonbeam author (#3108)
3 Arjan Zijderveld Added `Emergency` to `ElectionPhase` (#3707)
@@ -26,6 +26,7 @@
3 Julien Eluard Fixed typos about module balances (#1402)
3 KarishmaBothara Backward compatibility thing (#3511)
3 Miguel Hervas Adding RT4 Types (#3007)
3 Nikos Kontakis Bump @substrate/connect in rpc-provider to 0.7.4 (#4796)
3 Shawn Tabrizi Add `isReadyOrError` when connecting to API (#2577)
3 YJ feat: Vote interface as U8a (#1061)
2 Alexander Krupenkin Add [u8; 33] type width for U8aFixed type (#2391)
@@ -36,7 +37,6 @@
2 James Lefrère Add `.eq()` usage to docs and fix docs typos (#1405)
2 Keith Yeung Allow keyPrefix to accept an additional argument for double maps (#2230)
2 MOZGIII Follow-up fix after #4665 (#4666)
2 Nikos Kontakis Add auction in shared types (#4085)
2 Paweł Nguyen Fix a minor typo in cookbook blocks docs (#2294)
2 sung wu Update tx.md (#2485)
2 Veliko Abi constructor takes different parameters (#3347)
-3
View File
@@ -15,8 +15,5 @@ module.exports = {
// eslint-disable-next-line sort-keys
'@polkadot/types(.*)$': '<rootDir>/packages/types/src/$1'
},
"transformIgnorePatterns": [
'/node_modules/(?!@polkadot|@substrate/connect|@babel/runtime/helpers/esm/)'
],
testTimeout: 30000
};
+5 -5
View File
@@ -11,7 +11,7 @@
},
"sideEffects": false,
"type": "commonjs",
"version": "8.2.1",
"version": "8.3.2",
"workspaces": [
"packages/*"
],
@@ -31,15 +31,15 @@
"test:watch": "polkadot-dev-run-test --watch"
},
"devDependencies": {
"@babel/core": "^7.17.9",
"@babel/core": "^7.17.10",
"@babel/register": "^7.17.7",
"@babel/runtime": "^7.17.9",
"@polkadot/dev": "^0.66.9",
"@polkadot/dev": "^0.66.17",
"@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^27.4.1",
"@types/jest": "^27.5.0",
"copyfiles": "^2.4.1"
},
"resolutions": {
"typescript": "^4.6.3"
"typescript": "^4.6.4"
}
}
+8 -8
View File
@@ -20,18 +20,18 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.2.1",
"version": "8.3.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.9",
"@polkadot/api-base": "8.2.1",
"@polkadot/rpc-augment": "8.2.1",
"@polkadot/types": "8.2.1",
"@polkadot/types-augment": "8.2.1",
"@polkadot/types-codec": "8.2.1",
"@polkadot/util": "^9.0.1"
"@polkadot/api-base": "8.3.2",
"@polkadot/rpc-augment": "8.3.2",
"@polkadot/types": "8.3.2",
"@polkadot/types-augment": "8.3.2",
"@polkadot/types-codec": "8.3.2",
"@polkadot/util": "^9.1.1"
},
"devDependencies": {
"@polkadot/types-support": "8.2.1"
"@polkadot/types-support": "8.3.2"
}
}
@@ -1802,6 +1802,10 @@ declare module '@polkadot/api-base/types/errors' {
* No proposal or bounty at that index.
**/
InvalidIndex: AugmentedError<ApiType>;
/**
* Proposal has not been approved.
**/
ProposalNotApproved: AugmentedError<ApiType>;
/**
* Too many approvals in the queue.
**/
+18 -78
View File
@@ -2570,11 +2570,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `account`: The recovered account you want to make a call on-behalf-of.
* - `call`: The call you want to make with the recovered account.
*
* # <weight>
* - The weight of the `call` + 10,000.
* - One storage lookup to check account is recovered by `who`. O(1)
* # </weight>
**/
asRecovered: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Call]>;
/**
@@ -2585,10 +2580,6 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Parameters:
* - `account`: The recovered account you are able to call on-behalf-of.
*
* # <weight>
* - One storage mutation to check account is recovered by `who`. O(1)
* # </weight>
**/
cancelRecovered: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
@@ -2601,17 +2592,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `account`: The lost account that you want to claim has been successfully recovered by
* you.
*
* # <weight>
* Key: F (len of friends in config), V (len of vouching friends)
* - One storage read to get the recovery configuration. O(1), Codec O(F)
* - One storage read to get the active recovery process. O(1), Codec O(V)
* - One storage read to get the current block number. O(1)
* - One storage write. O(1), Codec O(V).
* - One event.
*
* Total Complexity: O(F + V)
* # </weight>
**/
claimRecovery: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
@@ -2626,15 +2606,6 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Parameters:
* - `rescuer`: The account trying to rescue this recoverable account.
*
* # <weight>
* Key: V (len of vouching friends)
* - One storage read/remove to get the active recovery process. O(1), Codec O(V)
* - One balance call to repatriate reserved. O(X)
* - One event.
*
* Total Complexity: O(V + X)
* # </weight>
**/
closeRecovery: AugmentedSubmittable<(rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
@@ -2654,17 +2625,6 @@ declare module '@polkadot/api-base/types/submittable' {
* friends.
* - `delay_period`: The number of blocks after a recovery attempt is initialized that
* needs to pass before the account can be recovered.
*
* # <weight>
* - Key: F (len of friends)
* - One storage read to check that account is not already recoverable. O(1).
* - A check that the friends list is sorted and unique. O(F)
* - One currency reserve operation. O(X)
* - One storage write. O(1). Codec O(F).
* - One event.
*
* Total Complexity: O(F + X)
* # </weight>
**/
createRecovery: AugmentedSubmittable<(friends: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], threshold: u16 | AnyNumber | Uint8Array, delayPeriod: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, u16, u32]>;
/**
@@ -2679,17 +2639,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `account`: The lost account that you want to recover. This account needs to be
* recoverable (i.e. have a recovery configuration).
*
* # <weight>
* - One storage read to check that account is recoverable. O(F)
* - One storage read to check that this recovery process hasn't already started. O(1)
* - One currency reserve operation. O(X)
* - One storage read to get the current block number. O(1)
* - One storage write. O(1).
* - One event.
*
* Total Complexity: O(F + X)
* # </weight>
**/
initiateRecovery: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
@@ -2704,16 +2653,6 @@ declare module '@polkadot/api-base/types/submittable' {
*
* The dispatch origin for this call must be _Signed_ and must be a
* recoverable account (i.e. has a recovery configuration).
*
* # <weight>
* Key: F (len of friends)
* - One storage read to get the prefix iterator for active recoveries. O(1)
* - One storage read/remove to get the recovery configuration. O(1), Codec O(F)
* - One balance call to unreserved. O(X)
* - One event.
*
* Total Complexity: O(F + X)
* # </weight>
**/
removeRecovery: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
@@ -2725,11 +2664,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `lost`: The "lost account" to be recovered.
* - `rescuer`: The "rescuer account" which can call as the lost account.
*
* # <weight>
* - One storage write O(1)
* - One event
* # </weight>
**/
setRecovered: AugmentedSubmittable<(lost: AccountId32 | string | Uint8Array, rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32]>;
/**
@@ -2745,18 +2679,6 @@ declare module '@polkadot/api-base/types/submittable' {
*
* The combination of these two parameters must point to an active recovery
* process.
*
* # <weight>
* Key: F (len of friends in config), V (len of vouching friends)
* - One storage read to get the recovery configuration. O(1), Codec O(F)
* - One storage read to get the active recovery process. O(1), Codec O(V)
* - One binary search to confirm caller is a friend. O(logF)
* - One binary search to confirm caller has not already vouched. O(logV)
* - One storage write. O(1), Codec O(V).
* - One event.
*
* Total Complexity: O(F + logF + V + logV)
* # </weight>
**/
vouchRecovery: AugmentedSubmittable<(lost: AccountId32 | string | Uint8Array, rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32]>;
/**
@@ -4154,6 +4076,24 @@ declare module '@polkadot/api-base/types/submittable' {
* # </weight>
**/
rejectProposal: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* Force a previously approved proposal to be removed from the approval queue.
* The original deposit will no longer be returned.
*
* May only be called from `T::RejectOrigin`.
* - `proposal_id`: The index of a proposal
*
* # <weight>
* - Complexity: O(A) where `A` is the number of approvals
* - Db reads and writes: `Approvals`
* # </weight>
*
* Errors:
* - `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue,
* i.e., the proposal has not been approved. This could also mean the proposal does not
* exist altogether, thus there is no way it would have been approved in the first place.
**/
removeApproval: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* Generic tx
**/
+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: '8.2.1' };
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '8.3.2' };
@@ -1615,6 +1615,10 @@ declare module '@polkadot/api-base/types/errors' {
* No proposal or bounty at that index.
**/
InvalidIndex: AugmentedError<ApiType>;
/**
* Proposal has not been approved.
**/
ProposalNotApproved: AugmentedError<ApiType>;
/**
* Too many approvals in the queue.
**/
+18
View File
@@ -3572,6 +3572,24 @@ declare module '@polkadot/api-base/types/submittable' {
* # </weight>
**/
rejectProposal: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* Force a previously approved proposal to be removed from the approval queue.
* The original deposit will no longer be returned.
*
* May only be called from `T::RejectOrigin`.
* - `proposal_id`: The index of a proposal
*
* # <weight>
* - Complexity: O(A) where `A` is the number of approvals
* - Db reads and writes: `Approvals`
* # </weight>
*
* Errors:
* - `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue,
* i.e., the proposal has not been approved. This could also mean the proposal does not
* exist altogether, thus there is no way it would have been approved in the first place.
**/
removeApproval: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* Generic tx
**/
@@ -639,6 +639,16 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
nominationPools: {
/**
* The nomination pool's pallet id.
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
proxy: {
/**
* The base amount of currency needed to reserve for creating an announcement.
@@ -1018,6 +1018,113 @@ declare module '@polkadot/api-base/types/errors' {
**/
[key: string]: AugmentedError<ApiType>;
};
nominationPools: {
/**
* An account is already delegating in another pool. An account may only belong to one
* pool at a time.
**/
AccountBelongsToOtherPool: AugmentedError<ApiType>;
/**
* The member is already unbonding in this era.
**/
AlreadyUnbonding: AugmentedError<ApiType>;
/**
* The pools state cannot be changed.
**/
CanNotChangeState: AugmentedError<ApiType>;
/**
* None of the funds can be withdrawn yet because the bonding duration has not passed.
**/
CannotWithdrawAny: AugmentedError<ApiType>;
/**
* Some error occurred that should never happen. This should be reported to the
* maintainers.
**/
DefensiveError: AugmentedError<ApiType>;
/**
* The caller does not have adequate permissions.
**/
DoesNotHavePermission: AugmentedError<ApiType>;
/**
* The member is fully unbonded (and thus cannot access the bonded and reward pool
* anymore to, for example, collect rewards).
**/
FullyUnbonding: AugmentedError<ApiType>;
/**
* The pool has insufficient balance to bond as a nominator.
**/
InsufficientBond: AugmentedError<ApiType>;
/**
* Too many members in the pool or system.
**/
MaxPoolMembers: AugmentedError<ApiType>;
/**
* The system is maxed out on pools.
**/
MaxPools: AugmentedError<ApiType>;
/**
* The member cannot unbond further chunks due to reaching the limit.
**/
MaxUnbondingLimit: AugmentedError<ApiType>;
/**
* Metadata exceeds [`Config::MaxMetadataLen`]
**/
MetadataExceedsMaxLen: AugmentedError<ApiType>;
/**
* The amount does not meet the minimum bond to either join or create a pool.
**/
MinimumBondNotMet: AugmentedError<ApiType>;
/**
* A pool must be in [`PoolState::Destroying`] in order for the depositor to unbond or for
* other members to be permissionlessly unbonded.
**/
NotDestroying: AugmentedError<ApiType>;
/**
* Not enough points. Ty unbonding less.
**/
NotEnoughPointsToUnbond: AugmentedError<ApiType>;
/**
* Either a) the caller cannot make a valid kick or b) the pool is not destroying.
**/
NotKickerOrDestroying: AugmentedError<ApiType>;
/**
* The caller does not have nominating permissions for the pool.
**/
NotNominator: AugmentedError<ApiType>;
/**
* The depositor must be the only member in the bonded pool in order to unbond. And the
* depositor must be the only member in the sub pools in order to withdraw unbonded.
**/
NotOnlyPoolMember: AugmentedError<ApiType>;
/**
* The pool is not open to join
**/
NotOpen: AugmentedError<ApiType>;
/**
* The transaction could not be executed due to overflow risk for the pool.
**/
OverflowRisk: AugmentedError<ApiType>;
/**
* An account is not a member.
**/
PoolMemberNotFound: AugmentedError<ApiType>;
/**
* A (bonded) pool id does not exist.
**/
PoolNotFound: AugmentedError<ApiType>;
/**
* A reward pool does not exist. In all cases this is a system logic error.
**/
RewardPoolNotFound: AugmentedError<ApiType>;
/**
* A sub pool does not exist.
**/
SubPoolsNotFound: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
preimage: {
/**
* Preimage has already been noted on-chain.
@@ -1679,6 +1786,10 @@ declare module '@polkadot/api-base/types/errors' {
* No proposal or bounty at that index.
**/
InvalidIndex: AugmentedError<ApiType>;
/**
* Proposal has not been approved.
**/
ProposalNotApproved: AugmentedError<ApiType>;
/**
* Too many approvals in the queue.
**/
@@ -1705,6 +1816,10 @@ declare module '@polkadot/api-base/types/errors' {
* The asset ID is already taken.
**/
InUse: AugmentedError<ApiType>;
/**
* The asset instance is locked.
**/
Locked: AugmentedError<ApiType>;
/**
* There is no delegate approved.
**/
+35 -1
View File
@@ -5,7 +5,7 @@ import type { ApiTypes } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPostDispatchInfo, NodeRuntimeProxyType, PalletConvictionVotingTally, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationCompute, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo } from '@polkadot/types/lookup';
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPostDispatchInfo, NodeRuntimeProxyType, PalletConvictionVotingTally, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletStakingExposure, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationCompute, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo } from '@polkadot/types/lookup';
declare module '@polkadot/api-base/types/events' {
export interface AugmentedEvents<ApiType extends ApiTypes> {
@@ -615,6 +615,40 @@ declare module '@polkadot/api-base/types/events' {
**/
[key: string]: AugmentedEvent<ApiType>;
};
nominationPools: {
/**
* A member has became bonded in a pool.
**/
Bonded: AugmentedEvent<ApiType, [AccountId32, u32, u128, bool]>;
/**
* A pool has been created.
**/
Created: AugmentedEvent<ApiType, [AccountId32, u32]>;
/**
* A pool has been destroyed.
**/
Destroyed: AugmentedEvent<ApiType, [u32]>;
/**
* A payout has been made to a member.
**/
PaidOut: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
/**
* The state of a pool has changed
**/
StateChanged: AugmentedEvent<ApiType, [u32, PalletNominationPoolsPoolState]>;
/**
* A member has unbonded from their pool.
**/
Unbonded: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
/**
* A member has withdrawn from their pool.
**/
Withdrawn: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
offences: {
/**
* There is an offence reported of the given `kind` happened at the `session_index` and
+81 -1
View File
@@ -6,7 +6,7 @@ import type { Data } from '@polkadot/types';
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, WrapperOpaque, bool, u128, 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 { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, NodeRuntimeSessionKeys, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageDeletedContract, PalletContractsStorageRawContractInfo, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletConvictionVotingVoteVoting, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfo, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesClassDetails, PalletUniquesClassMetadata, PalletUniquesInstanceDetails, PalletUniquesInstanceMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, NodeRuntimeSessionKeys, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageDeletedContract, PalletContractsStorageRawContractInfo, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletConvictionVotingVoteVoting, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfo, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesClassDetails, PalletUniquesClassMetadata, PalletUniquesInstanceDetails, PalletUniquesInstanceMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
import type { Observable } from '@polkadot/types/types';
declare module '@polkadot/api-base/types/storage' {
@@ -785,6 +785,86 @@ declare module '@polkadot/api-base/types/storage' {
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
nominationPools: {
/**
* Storage for bonded pools.
**/
bondedPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsBondedPoolInner>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Counter for the related counted storage map
**/
counterForBondedPools: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Counter for the related counted storage map
**/
counterForMetadata: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Counter for the related counted storage map
**/
counterForPoolMembers: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Counter for the related counted storage map
**/
counterForReversePoolIdLookup: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Counter for the related counted storage map
**/
counterForRewardPools: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Counter for the related counted storage map
**/
counterForSubPoolsStorage: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
lastPoolId: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Maximum number of members that can exist in the system. If `None`, then the count
* members are not bound on a system wide basis.
**/
maxPoolMembers: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Maximum number of members that may belong to pool. If `None`, then the count of
* members is not bound on a per pool basis.
**/
maxPoolMembersPerPool: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Maximum number of nomination pools that can exist. If `None`, then an unbounded number of
* pools can exist.
**/
maxPools: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Metadata for the pool.
**/
metadata: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Minimum bond required to create a pool.
*
* This is the amount that the depositor must put as their initial stake in the pool, as an
* indication of "skin in the game".
**/
minCreateBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Minimum amount to bond to join a pool.
**/
minJoinBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Active members.
**/
poolMembers: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletNominationPoolsPoolMember>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
reversePoolIdLookup: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* Reward pools. This is where there rewards for each pool accumulate. When a members payout
* is claimed, the balance comes out fo the reward pool. Keyed by the bonded pools account.
**/
rewardPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsRewardPool>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Groups of unbonding pools. Each group of unbonding pools belongs to a bonded pool,
* hence the name sub-pools. Keyed by the bonded pools account.
**/
subPoolsStorage: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsSubPools>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
offences: {
/**
* A vector of reports of the same kind that happened at the same time slot.
+152 -79
View File
@@ -6,7 +6,7 @@ import type { Data } from '@polkadot/types';
import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportScheduleDispatchTime, FrameSupportScheduleMaybeHashed, NodeRuntimeOriginCaller, NodeRuntimeProxyType, NodeRuntimeSessionKeys, PalletAssetsDestroyWitness, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeHeader, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof } from '@polkadot/types/lookup';
import type { FrameSupportScheduleDispatchTime, FrameSupportScheduleMaybeHashed, NodeRuntimeOriginCaller, NodeRuntimeProxyType, NodeRuntimeSessionKeys, PalletAssetsDestroyWitness, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeHeader, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof } from '@polkadot/types/lookup';
declare module '@polkadot/api-base/types/submittable' {
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
@@ -2446,6 +2446,139 @@ declare module '@polkadot/api-base/types/submittable' {
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
nominationPools: {
/**
* Bond `extra` more funds from `origin` into the pool to which they already belong.
*
* Additional funds can come from either the free balance of the account, of from the
* accumulated rewards, see [`BondExtra`].
**/
bondExtra: AugmentedSubmittable<(extra: PalletNominationPoolsBondExtra | { FreeBalance: any } | { Rewards: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsBondExtra]>;
/**
* A bonded member can use this to claim their payout based on the rewards that the pool
* has accumulated since their last claimed payout (OR since joining if this is there first
* time claiming rewards). The payout will be transferred to the member's account.
*
* The member will earn rewards pro rata based on the members stake vs the sum of the
* members in the pools stake. Rewards do not "expire".
**/
claimPayout: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* Create a new delegation pool.
*
* # Arguments
*
* * `amount` - The amount of funds to delegate to the pool. This also acts of a sort of
* deposit since the pools creator cannot fully unbond funds until the pool is being
* destroyed.
* * `index` - A disambiguation index for creating the account. Likely only useful when
* creating multiple pools in the same extrinsic.
* * `root` - The account to set as [`PoolRoles::root`].
* * `nominator` - The account to set as the [`PoolRoles::nominator`].
* * `state_toggler` - The account to set as the [`PoolRoles::state_toggler`].
*
* # Note
*
* In addition to `amount`, the caller will transfer the existential deposit; so the caller
* needs at have at least `amount + existential_deposit` transferrable.
**/
create: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, root: AccountId32 | string | Uint8Array, nominator: AccountId32 | string | Uint8Array, stateToggler: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, AccountId32, AccountId32, AccountId32]>;
/**
* Stake funds with a pool. The amount to bond is transferred from the member to the
* pools account and immediately increases the pools bond.
*
* # Note
*
* * An account can only be a member of a single pool.
* * An account cannot join the same pool multiple times.
* * This call will *not* dust the member account, so the member must have at least
* `existential deposit + amount` in their account.
* * Only a pool with [`PoolState::Open`] can be joined
**/
join: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, poolId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, u32]>;
nominate: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, validators: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<AccountId32>]>;
/**
* Call `withdraw_unbonded` for the pools account. This call can be made by any account.
*
* This is useful if their are too many unlocking chunks to call `unbond`, and some
* can be cleared by withdrawing. In the case there are too many unlocking chunks, the user
* would probably see an error like `NoMoreChunks` emitted from the staking system when
* they attempt to unbond.
**/
poolWithdrawUnbonded: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
/**
* Update configurations for the nomination pools. The origin must for this call must be
* Root.
*
* # Arguments
*
* * `min_join_bond` - Set [`MinJoinBond`].
* * `min_create_bond` - Set [`MinCreateBond`].
* * `max_pools` - Set [`MaxPools`].
* * `max_members` - Set [`MaxPoolMembers`].
* * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`].
**/
setConfigs: AugmentedSubmittable<(minJoinBond: PalletNominationPoolsConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minCreateBond: PalletNominationPoolsConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxPools: PalletNominationPoolsConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxMembers: PalletNominationPoolsConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxMembersPerPool: PalletNominationPoolsConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsConfigOpU32, PalletNominationPoolsConfigOpU32]>;
setMetadata: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, metadata: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
setState: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, state: PalletNominationPoolsPoolState | 'Open' | 'Blocked' | 'Destroying' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletNominationPoolsPoolState]>;
/**
* Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It
* implicitly collects the rewards one last time, since not doing so would mean some
* rewards would go forfeited.
*
* Under certain conditions, this call can be dispatched permissionlessly (i.e. by any
* account).
*
* # Conditions for a permissionless dispatch.
*
* * The pool is blocked and the caller is either the root or state-toggler. This is
* refereed to as a kick.
* * The pool is destroying and the member is not the depositor.
* * The pool is destroying, the member is the depositor and no other members are in the
* pool.
*
* ## Conditions for permissioned dispatch (i.e. the caller is also the
* `member_account`):
*
* * The caller is not the depositor.
* * The caller is the depositor, the pool is destroying and no other members are in the
* pool.
*
* # Note
*
* If there are too many unlocking chunks to unbond with the pool account,
* [`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. If
* there are too many unlocking chunks, the result of this call will likely be the
* `NoMoreChunks` error from the staking system.
**/
unbond: AugmentedSubmittable<(memberAccount: AccountId32 | string | Uint8Array, unbondingPoints: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Compact<u128>]>;
/**
* Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an
* error is returned.
*
* Under certain conditions, this call can be dispatched permissionlessly (i.e. by any
* account).
*
* # Conditions for a permissionless dispatch
*
* * The pool is in destroy mode and the target is not the depositor.
* * The target is the depositor and they are the only member in the sub pools.
* * The pool is blocked and the caller is either the root or state-toggler.
*
* # Conditions for permissioned dispatch
*
* * The caller is the target and they are not the depositor.
*
* # Note
*
* If the target is the depositor, the pool will be destroyed.
**/
withdrawUnbonded: AugmentedSubmittable<(memberAccount: AccountId32 | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
preimage: {
/**
* Register a preimage on-chain.
@@ -2684,11 +2817,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `account`: The recovered account you want to make a call on-behalf-of.
* - `call`: The call you want to make with the recovered account.
*
* # <weight>
* - The weight of the `call` + 10,000.
* - One storage lookup to check account is recovered by `who`. O(1)
* # </weight>
**/
asRecovered: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Call]>;
/**
@@ -2699,10 +2827,6 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Parameters:
* - `account`: The recovered account you are able to call on-behalf-of.
*
* # <weight>
* - One storage mutation to check account is recovered by `who`. O(1)
* # </weight>
**/
cancelRecovered: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
@@ -2715,17 +2839,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `account`: The lost account that you want to claim has been successfully recovered by
* you.
*
* # <weight>
* Key: F (len of friends in config), V (len of vouching friends)
* - One storage read to get the recovery configuration. O(1), Codec O(F)
* - One storage read to get the active recovery process. O(1), Codec O(V)
* - One storage read to get the current block number. O(1)
* - One storage write. O(1), Codec O(V).
* - One event.
*
* Total Complexity: O(F + V)
* # </weight>
**/
claimRecovery: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
@@ -2740,15 +2853,6 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Parameters:
* - `rescuer`: The account trying to rescue this recoverable account.
*
* # <weight>
* Key: V (len of vouching friends)
* - One storage read/remove to get the active recovery process. O(1), Codec O(V)
* - One balance call to repatriate reserved. O(X)
* - One event.
*
* Total Complexity: O(V + X)
* # </weight>
**/
closeRecovery: AugmentedSubmittable<(rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
@@ -2768,17 +2872,6 @@ declare module '@polkadot/api-base/types/submittable' {
* friends.
* - `delay_period`: The number of blocks after a recovery attempt is initialized that
* needs to pass before the account can be recovered.
*
* # <weight>
* - Key: F (len of friends)
* - One storage read to check that account is not already recoverable. O(1).
* - A check that the friends list is sorted and unique. O(F)
* - One currency reserve operation. O(X)
* - One storage write. O(1). Codec O(F).
* - One event.
*
* Total Complexity: O(F + X)
* # </weight>
**/
createRecovery: AugmentedSubmittable<(friends: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], threshold: u16 | AnyNumber | Uint8Array, delayPeriod: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, u16, u32]>;
/**
@@ -2793,17 +2886,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `account`: The lost account that you want to recover. This account needs to be
* recoverable (i.e. have a recovery configuration).
*
* # <weight>
* - One storage read to check that account is recoverable. O(F)
* - One storage read to check that this recovery process hasn't already started. O(1)
* - One currency reserve operation. O(X)
* - One storage read to get the current block number. O(1)
* - One storage write. O(1).
* - One event.
*
* Total Complexity: O(F + X)
* # </weight>
**/
initiateRecovery: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
@@ -2818,16 +2900,6 @@ declare module '@polkadot/api-base/types/submittable' {
*
* The dispatch origin for this call must be _Signed_ and must be a
* recoverable account (i.e. has a recovery configuration).
*
* # <weight>
* Key: F (len of friends)
* - One storage read to get the prefix iterator for active recoveries. O(1)
* - One storage read/remove to get the recovery configuration. O(1), Codec O(F)
* - One balance call to unreserved. O(X)
* - One event.
*
* Total Complexity: O(F + X)
* # </weight>
**/
removeRecovery: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
@@ -2839,11 +2911,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `lost`: The "lost account" to be recovered.
* - `rescuer`: The "rescuer account" which can call as the lost account.
*
* # <weight>
* - One storage write O(1)
* - One event
* # </weight>
**/
setRecovered: AugmentedSubmittable<(lost: AccountId32 | string | Uint8Array, rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32]>;
/**
@@ -2859,18 +2926,6 @@ declare module '@polkadot/api-base/types/submittable' {
*
* The combination of these two parameters must point to an active recovery
* process.
*
* # <weight>
* Key: F (len of friends in config), V (len of vouching friends)
* - One storage read to get the recovery configuration. O(1), Codec O(F)
* - One storage read to get the active recovery process. O(1), Codec O(V)
* - One binary search to confirm caller is a friend. O(logF)
* - One binary search to confirm caller has not already vouched. O(logV)
* - One storage write. O(1), Codec O(V).
* - One event.
*
* Total Complexity: O(F + logF + V + logV)
* # </weight>
**/
vouchRecovery: AugmentedSubmittable<(lost: AccountId32 | string | Uint8Array, rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32]>;
/**
@@ -4412,6 +4467,24 @@ declare module '@polkadot/api-base/types/submittable' {
* # </weight>
**/
rejectProposal: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* Force a previously approved proposal to be removed from the approval queue.
* The original deposit will no longer be returned.
*
* May only be called from `T::RejectOrigin`.
* - `proposal_id`: The index of a proposal
*
* # <weight>
* - Complexity: O(A) where `A` is the number of approvals
* - Db reads and writes: `Approvals`
* # </weight>
*
* Errors:
* - `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue,
* i.e., the proposal has not been approved. This could also mean the proposal does not
* exist altogether, thus there is no way it would have been approved in the first place.
**/
removeApproval: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* Generic tx
**/
+4 -4
View File
@@ -20,13 +20,13 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.2.1",
"version": "8.3.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.9",
"@polkadot/rpc-core": "8.2.1",
"@polkadot/types": "8.2.1",
"@polkadot/util": "^9.0.1",
"@polkadot/rpc-core": "8.3.2",
"@polkadot/types": "8.3.2",
"@polkadot/util": "^9.1.1",
"rxjs": "^7.5.5"
}
}
+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: '8.2.1' };
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '8.3.2' };
-13
View File
@@ -1,16 +1,3 @@
# @polkadot/api-contract
Interfaces to allow for the encoding and decoding of Substrate contract ABIs.
```js
import {ApiPromise, WsProvider } from '@polkadot/api';
import { Abi } from '@polkadot/api-contract';
const wsProvider = new WsProvider(<...Node Url...>);
const api = await ApiPromise.create({ provider: wsProvider });
const abi = new Abi(<...JSON ABI...>, api.registry.getChainProperties());
api.tx.contracts
.call(<contract addr>, <value>, <max gas>, abi.messages.<method name>(<...params...>))
.signAndSend(<keyring pair>, (result: SubmittableResult) => { ... });
```
+9 -9
View File
@@ -20,20 +20,20 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.2.1",
"version": "8.3.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.9",
"@polkadot/api": "8.2.1",
"@polkadot/types": "8.2.1",
"@polkadot/types-codec": "8.2.1",
"@polkadot/types-create": "8.2.1",
"@polkadot/util": "^9.0.1",
"@polkadot/util-crypto": "^9.0.1",
"@polkadot/api": "8.3.2",
"@polkadot/types": "8.3.2",
"@polkadot/types-codec": "8.3.2",
"@polkadot/types-create": "8.3.2",
"@polkadot/util": "^9.1.1",
"@polkadot/util-crypto": "^9.1.1",
"rxjs": "^7.5.5"
},
"devDependencies": {
"@polkadot/api-augment": "8.2.1",
"@polkadot/keyring": "^9.0.1"
"@polkadot/api-augment": "8.3.2",
"@polkadot/keyring": "^9.1.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: '8.2.1' };
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '8.3.2' };
+14 -14
View File
@@ -20,25 +20,25 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.2.1",
"version": "8.3.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.9",
"@polkadot/api": "8.2.1",
"@polkadot/api-augment": "8.2.1",
"@polkadot/api-base": "8.2.1",
"@polkadot/rpc-core": "8.2.1",
"@polkadot/types": "8.2.1",
"@polkadot/types-codec": "8.2.1",
"@polkadot/util": "^9.0.1",
"@polkadot/util-crypto": "^9.0.1",
"@polkadot/api": "8.3.2",
"@polkadot/api-augment": "8.3.2",
"@polkadot/api-base": "8.3.2",
"@polkadot/rpc-core": "8.3.2",
"@polkadot/types": "8.3.2",
"@polkadot/types-codec": "8.3.2",
"@polkadot/util": "^9.1.1",
"@polkadot/util-crypto": "^9.1.1",
"rxjs": "^7.5.5"
},
"devDependencies": {
"@polkadot/api": "8.2.1",
"@polkadot/api-augment": "8.2.1",
"@polkadot/rpc-augment": "8.2.1",
"@polkadot/rpc-provider": "8.2.1",
"@polkadot/types-support": "8.2.1"
"@polkadot/api": "8.3.2",
"@polkadot/api-augment": "8.3.2",
"@polkadot/rpc-augment": "8.3.2",
"@polkadot/rpc-provider": "8.3.2",
"@polkadot/types-support": "8.3.2"
}
}
+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: '8.2.1' };
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '8.3.2' };
+2 -3
View File
@@ -2,10 +2,9 @@
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { Option, Vec } from '@polkadot/types';
import type { Option } from '@polkadot/types';
import type { AccountId } from '@polkadot/types/interfaces';
import type { NodeRuntimeSessionKeys } from '@polkadot/types/lookup';
import type { ITuple } from '@polkadot/types/types';
import type { DeriveApi } from '../types';
import type { DeriveStakingKeys } from './types';
@@ -36,7 +35,7 @@ export function keysMulti (instanceId: string, api: DeriveApi): (stashIds: (Uint
return memo(instanceId, (stashIds: (Uint8Array | string)[]): Observable<DeriveStakingKeys[]> =>
stashIds.length
? api.query.session.queuedKeys().pipe(
switchMap((queuedKeys): Observable<[Vec<ITuple<[AccountId, NodeRuntimeSessionKeys]>>, Option<NodeRuntimeSessionKeys>[]]> =>
switchMap((queuedKeys) =>
combineLatest([
of(queuedKeys),
api.consts.session?.dedupKeyPrefix
+17 -17
View File
@@ -20,29 +20,29 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.2.1",
"version": "8.3.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.9",
"@polkadot/api-augment": "8.2.1",
"@polkadot/api-base": "8.2.1",
"@polkadot/api-derive": "8.2.1",
"@polkadot/keyring": "^9.0.1",
"@polkadot/rpc-augment": "8.2.1",
"@polkadot/rpc-core": "8.2.1",
"@polkadot/rpc-provider": "8.2.1",
"@polkadot/types": "8.2.1",
"@polkadot/types-augment": "8.2.1",
"@polkadot/types-codec": "8.2.1",
"@polkadot/types-create": "8.2.1",
"@polkadot/types-known": "8.2.1",
"@polkadot/util": "^9.0.1",
"@polkadot/util-crypto": "^9.0.1",
"@polkadot/api-augment": "8.3.2",
"@polkadot/api-base": "8.3.2",
"@polkadot/api-derive": "8.3.2",
"@polkadot/keyring": "^9.1.1",
"@polkadot/rpc-augment": "8.3.2",
"@polkadot/rpc-core": "8.3.2",
"@polkadot/rpc-provider": "8.3.2",
"@polkadot/types": "8.3.2",
"@polkadot/types-augment": "8.3.2",
"@polkadot/types-codec": "8.3.2",
"@polkadot/types-create": "8.3.2",
"@polkadot/types-known": "8.3.2",
"@polkadot/util": "^9.1.1",
"@polkadot/util-crypto": "^9.1.1",
"eventemitter3": "^4.0.7",
"rxjs": "^7.5.5"
},
"devDependencies": {
"@polkadot/api-augment": "8.2.1",
"@polkadot/types-support": "8.2.1"
"@polkadot/api-augment": "8.3.2",
"@polkadot/types-support": "8.3.2"
}
}
+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: '8.2.1' };
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '8.3.2' };
+5 -9
View File
@@ -122,12 +122,6 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, blockHas
(): Observable<RuntimeDispatchInfo> =>
api.rpc.payment.queryInfo(this.toHex(), blockHash || optionsOrHash as string)
);
} else if (this.isSigned) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return,@typescript-eslint/no-unsafe-call
return decorateMethod(
(): Observable<RuntimeDispatchInfo> =>
api.rpc.payment.queryInfo(this.toHex())
);
}
const [allOptions] = makeSignAndSendOptions(optionsOrHash);
@@ -143,9 +137,11 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, blockHas
const eraOptions = makeEraOptions(api, this.registry, allOptions, signingInfo);
const signOptions = makeSignOptions(api, eraOptions, {});
this.signFake(address, signOptions);
return api.rpc.payment.queryInfo(this.toHex());
return api.rpc.payment.queryInfo(
this.isSigned
? api.tx(this).signFake(address, signOptions).toHex()
: this.signFake(address, signOptions).toHex()
);
})
)
)();
+5 -5
View File
@@ -20,13 +20,13 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.2.1",
"version": "8.3.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.9",
"@polkadot/rpc-core": "8.2.1",
"@polkadot/types": "8.2.1",
"@polkadot/types-codec": "8.2.1",
"@polkadot/util": "^9.0.1"
"@polkadot/rpc-core": "8.3.2",
"@polkadot/types": "8.3.2",
"@polkadot/types-codec": "8.3.2",
"@polkadot/util": "^9.1.1"
}
}
+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: '8.2.1' };
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '8.3.2' };
+7 -7
View File
@@ -20,18 +20,18 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.2.1",
"version": "8.3.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.9",
"@polkadot/rpc-augment": "8.2.1",
"@polkadot/rpc-provider": "8.2.1",
"@polkadot/types": "8.2.1",
"@polkadot/util": "^9.0.1",
"@polkadot/rpc-augment": "8.3.2",
"@polkadot/rpc-provider": "8.3.2",
"@polkadot/types": "8.3.2",
"@polkadot/util": "^9.1.1",
"rxjs": "^7.5.5"
},
"devDependencies": {
"@polkadot/keyring": "^9.0.1",
"@polkadot/rpc-augment": "8.2.1"
"@polkadot/keyring": "^9.1.1",
"@polkadot/rpc-augment": "8.3.2"
}
}
+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: '8.2.1' };
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '8.3.2' };
+10 -10
View File
@@ -20,19 +20,19 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.2.1",
"version": "8.3.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.9",
"@polkadot/keyring": "^9.0.1",
"@polkadot/types": "8.2.1",
"@polkadot/types-support": "8.2.1",
"@polkadot/util": "^9.0.1",
"@polkadot/util-crypto": "^9.0.1",
"@polkadot/x-fetch": "^9.0.1",
"@polkadot/x-global": "^9.0.1",
"@polkadot/x-ws": "^9.0.1",
"@substrate/connect": "0.7.2",
"@polkadot/keyring": "^9.1.1",
"@polkadot/types": "8.3.2",
"@polkadot/types-support": "8.3.2",
"@polkadot/util": "^9.1.1",
"@polkadot/util-crypto": "^9.1.1",
"@polkadot/x-fetch": "^9.1.1",
"@polkadot/x-global": "^9.1.1",
"@polkadot/x-ws": "^9.1.1",
"@substrate/connect": "0.7.4",
"eventemitter3": "^4.0.7",
"mock-socket": "^9.1.3",
"nock": "^13.2.4"
+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: '8.2.1' };
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '8.3.2' };
@@ -155,7 +155,7 @@ const getFakeClient = () => {
enum WellKnownChain {
polkadot = 'polkadot',
ksmcc3 = 'ksmcc3',
rococo_v2_1 = 'rococo_v2_1',
rococo_v2_2 = 'rococo_v2_2',
westend2 = 'westend2'
}
+13 -13
View File
@@ -20,7 +20,7 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.2.1",
"version": "8.3.2",
"main": "index.js",
"bin": {
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.cjs",
@@ -30,20 +30,20 @@
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.cjs"
},
"dependencies": {
"@babel/core": "^7.17.9",
"@babel/core": "^7.17.10",
"@babel/register": "^7.17.7",
"@babel/runtime": "^7.17.9",
"@polkadot/api": "8.2.1",
"@polkadot/api-augment": "8.2.1",
"@polkadot/rpc-augment": "8.2.1",
"@polkadot/rpc-provider": "8.2.1",
"@polkadot/types": "8.2.1",
"@polkadot/types-augment": "8.2.1",
"@polkadot/types-codec": "8.2.1",
"@polkadot/types-create": "8.2.1",
"@polkadot/types-support": "8.2.1",
"@polkadot/util": "^9.0.1",
"@polkadot/x-ws": "^9.0.1",
"@polkadot/api": "8.3.2",
"@polkadot/api-augment": "8.3.2",
"@polkadot/rpc-augment": "8.3.2",
"@polkadot/rpc-provider": "8.3.2",
"@polkadot/types": "8.3.2",
"@polkadot/types-augment": "8.3.2",
"@polkadot/types-codec": "8.3.2",
"@polkadot/types-create": "8.3.2",
"@polkadot/types-support": "8.3.2",
"@polkadot/util": "^9.1.1",
"@polkadot/x-ws": "^9.1.1",
"handlebars": "^4.7.7",
"websocket": "^1.0.34",
"yargs": "^17.4.1"
+36 -7
View File
@@ -7,6 +7,7 @@ import path from 'path';
import yargs from 'yargs';
import * as substrateDefs from '@polkadot/types/interfaces/definitions';
import { WebSocket } from '@polkadot/x-ws';
import { generateInterfaceTypes } from './generate/interfaceRegistry';
import { generateTsDef } from './generate/tsDef';
@@ -32,13 +33,6 @@ export function main (): void {
}
}).argv as ArgV;
if (endpoint) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const metaHex = (require(path.join(process.cwd(), endpoint)) as Record<string, HexString>).result;
generateDefaultLookup(path.join(process.cwd(), input), metaHex);
}
// eslint-disable-next-line @typescript-eslint/no-var-requires
const userDefs = require(path.join(process.cwd(), input, 'definitions.ts')) as Record<string, any>;
const userKeys = Object.keys(userDefs);
@@ -66,4 +60,39 @@ export function main (): void {
generateTsDef(allDefs, path.join(process.cwd(), input), pkg);
generateInterfaceTypes(allDefs, path.join(process.cwd(), input, 'augment-types.ts'));
if (endpoint) {
if (endpoint.startsWith('wss://') || endpoint.startsWith('ws://')) {
try {
const websocket = new WebSocket(endpoint);
websocket.onclose = (event: { code: number; reason: string }): void => {
console.error(`disconnected, code: '${event.code}' reason: '${event.reason}'`);
process.exit(1);
};
websocket.onerror = (event: unknown): void => {
console.error(event);
process.exit(1);
};
websocket.onopen = (): void => {
console.log('connected');
websocket.send('{"id":"1","jsonrpc":"2.0","method":"state_getMetadata","params":[]}');
};
websocket.onmessage = (message: unknown): void => {
generateDefaultLookup(path.join(process.cwd(), input), (JSON.parse((message as Record<string, string>).data) as Record<string, HexString>).result);
process.exit(0);
};
} catch (error) {
process.exit(1);
}
} else {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const metaHex = (require(path.join(process.cwd(), endpoint)) as Record<string, HexString>).result;
generateDefaultLookup(path.join(process.cwd(), input), metaHex);
}
}
}
+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: '8.2.1' };
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '8.3.2' };
+4 -4
View File
@@ -20,12 +20,12 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.2.1",
"version": "8.3.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.9",
"@polkadot/types": "8.2.1",
"@polkadot/types-codec": "8.2.1",
"@polkadot/util": "^9.0.1"
"@polkadot/types": "8.3.2",
"@polkadot/types-codec": "8.3.2",
"@polkadot/util": "^9.1.1"
}
}
File diff suppressed because it is too large Load Diff
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: '8.2.1' };
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '8.3.2' };
File diff suppressed because one or more lines are too long
+6 -6
View File
@@ -20,16 +20,16 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.2.1",
"version": "8.3.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.9",
"@polkadot/util": "^9.0.1"
"@polkadot/util": "^9.1.1"
},
"devDependencies": {
"@polkadot/types": "8.2.1",
"@polkadot/types-augment": "8.2.1",
"@polkadot/types-support": "8.2.1",
"@polkadot/util-crypto": "^9.0.1"
"@polkadot/types": "8.3.2",
"@polkadot/types-augment": "8.3.2",
"@polkadot/types-support": "8.3.2",
"@polkadot/util-crypto": "^9.1.1"
}
}
@@ -35,13 +35,43 @@ describe('U8aFixed', (): void => {
new Uint8Array([0x02, 0x03, 0x00, 0x00])
);
});
it('constructs when passed Uint8Array is >= length', (): void => {
expect(
new (U8aFixed.with(32))(registry, new Uint8Array([0x00, 0x01, 0x02, 0x03])).toU8a()
).toEqual(
new Uint8Array([0x00, 0x01, 0x02, 0x03])
);
expect(
new (U8aFixed.with(32))(registry, new Uint8Array([0x00, 0x01, 0x02, 0x03, 0x04, 0x05])).toU8a()
).toEqual(
new Uint8Array([0x00, 0x01, 0x02, 0x03])
);
});
it('constructs when passed string is === length', (): void => {
expect(
new (U8aFixed.with(32))(registry, '1234').toU8a()
).toEqual(
new Uint8Array([49, 50, 51, 52])
);
});
it('fails construction when passed string is > length', (): void => {
expect(
() => new (U8aFixed.with(32))(registry, '0x000102030405').toU8a()
).toThrow(/Expected input with 4 bytes/);
expect(
() => new (U8aFixed.with(256))(registry, '1363HWTPzDrzAQ6ChFiMU6mP4b6jmQid2ae55JQcKtZnpLGv')
).toThrow(/Expected input with 32 bytes/);
});
});
describe('utils', (): void => {
let u8a: U8aFixed;
beforeEach((): void => {
u8a = new U8aFixed(registry, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 32);
u8a = new U8aFixed(registry, [1, 2, 3, 4], 32);
});
it('limits the length', (): void => {
@@ -3,7 +3,7 @@
import type { AnyU8a, CodecClass, Registry, U8aBitLength } from '../types';
import { assert, u8aToU8a } from '@polkadot/util';
import { assert, isU8a, u8aToU8a } from '@polkadot/util';
import { Raw } from '../native/Raw';
@@ -16,7 +16,7 @@ function decodeU8aFixed (value: AnyU8a, bitLength: U8aBitLength): [AnyU8a, numbe
return [new Uint8Array(byteLength), 0];
}
assert(u8a.length >= byteLength, () => `Expected at least ${byteLength} bytes (${bitLength} bits), found ${u8a.length} bytes`);
assert(isU8a(value) ? u8a.length >= byteLength : u8a.length === byteLength, () => `Expected input with ${byteLength} bytes (${bitLength} bits), found ${u8a.length} bytes`);
return [u8a.subarray(0, byteLength), byteLength];
}
+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: '8.2.1' };
export const packageInfo = { name: '@polkadot/types-codec', path: 'auto', type: 'auto', version: '8.3.2' };
+4 -4
View File
@@ -20,14 +20,14 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.2.1",
"version": "8.3.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.9",
"@polkadot/types-codec": "8.2.1",
"@polkadot/util": "^9.0.1"
"@polkadot/types-codec": "8.3.2",
"@polkadot/util": "^9.1.1"
},
"devDependencies": {
"@polkadot/types": "8.2.1"
"@polkadot/types": "8.3.2"
}
}
+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: '8.2.1' };
export const packageInfo = { name: '@polkadot/types-create', path: 'auto', type: 'auto', version: '8.3.2' };
+6 -6
View File
@@ -20,14 +20,14 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.2.1",
"version": "8.3.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.9",
"@polkadot/networks": "^9.0.1",
"@polkadot/types": "8.2.1",
"@polkadot/types-codec": "8.2.1",
"@polkadot/types-create": "8.2.1",
"@polkadot/util": "^9.0.1"
"@polkadot/networks": "^9.1.1",
"@polkadot/types": "8.3.2",
"@polkadot/types-codec": "8.3.2",
"@polkadot/types-create": "8.3.2",
"@polkadot/util": "^9.1.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: '8.2.1' };
export const packageInfo = { name: '@polkadot/types-known', path: 'auto', type: 'auto', version: '8.3.2' };
+1 -1
View File
@@ -15,7 +15,7 @@ const upgrades: ChainUpgradesRaw = [
[6137912, 2028], [6561855, 2029], [7100891, 2030], [7468792, 9010], [7668600, 9030],
[7812476, 9040], [8010981, 9050], [8073833, 9070], [8555825, 9080], [8945245, 9090],
[9611377, 9100], [9625129, 9111], [9866422, 9122], [10403784, 9130], [10960765, 9150],
[11006614, 9151], [11404482, 9160], [11601803, 9170], [12008022, 9180]
[11006614, 9151], [11404482, 9160], [11601803, 9170], [12008022, 9180], [12405451, 9190]
];
export default upgrades;
+1 -1
View File
@@ -13,7 +13,7 @@ const upgrades: ChainUpgradesRaw = [
[5879822, 9031], [5896856, 9032], [5897316, 9033], [6117927, 9050], [6210274, 9070],
[6379314, 9080], [6979141, 9090], [7568453, 9100], [7766394, 9111], [7911691, 9120],
[7968866, 9121], [7982889, 9122], [8514322, 9130], [9091726, 9140], [9091774, 9150],
[9406726, 9160], [9921066, 9170], [10007115, 9180], [10480973, 9190]
[9406726, 9160], [9921066, 9170], [10007115, 9180], [10480973, 9190], [10578091, 9200]
];
export default upgrades;
+2 -2
View File
@@ -20,10 +20,10 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.2.1",
"version": "8.3.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.9",
"@polkadot/util": "^9.0.1"
"@polkadot/util": "^9.1.1"
}
}
File diff suppressed because one or more lines are too long
@@ -268,7 +268,7 @@
{
"name": "Version",
"type": 169,
"value": "0x186b7573616d61347061726974792d6b7573616d6102000000e62300000000000038df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0200000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a8010000000b00000000",
"value": "0x186b7573616d61347061726974792d6b7573616d6102000000f02300000000000038df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0200000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a8010000000b00000000",
"docs": [
" Get the chain's current version."
]
@@ -21280,6 +21280,35 @@
"- DbWrite: `Approvals`",
"# </weight>"
]
},
{
"name": "remove_approval",
"fields": [
{
"name": "proposal_id",
"type": 122,
"typeName": "ProposalIndex",
"docs": []
}
],
"index": 3,
"docs": [
"Force a previously approved proposal to be removed from the approval queue.",
"The original deposit will no longer be returned.",
"",
"May only be called from `T::RejectOrigin`.",
"- `proposal_id`: The index of a proposal",
"",
"# <weight>",
"- Complexity: O(A) where `A` is the number of approvals",
"- Db reads and writes: `Approvals`",
"# </weight>",
"",
"Errors:",
"- `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue,",
"i.e., the proposal has not been approved. This could also mean the proposal does not",
"exist altogether, thus there is no way it would have been approved in the first place."
]
}
]
}
@@ -24543,12 +24572,7 @@
"",
"Parameters:",
"- `account`: The recovered account you want to make a call on-behalf-of.",
"- `call`: The call you want to make with the recovered account.",
"",
"# <weight>",
"- The weight of the `call` + 10,000.",
"- One storage lookup to check account is recovered by `who`. O(1)",
"# </weight>"
"- `call`: The call you want to make with the recovered account."
]
},
{
@@ -24576,12 +24600,7 @@
"",
"Parameters:",
"- `lost`: The \"lost account\" to be recovered.",
"- `rescuer`: The \"rescuer account\" which can call as the lost account.",
"",
"# <weight>",
"- One storage write O(1)",
"- One event",
"# </weight>"
"- `rescuer`: The \"rescuer account\" which can call as the lost account."
]
},
{
@@ -24623,18 +24642,7 @@
" account can be recovered. Should be less than or equal to the length of the list of",
" friends.",
"- `delay_period`: The number of blocks after a recovery attempt is initialized that",
" needs to pass before the account can be recovered.",
"",
"# <weight>",
"- Key: F (len of friends)",
"- One storage read to check that account is not already recoverable. O(1).",
"- A check that the friends list is sorted and unique. O(F)",
"- One currency reserve operation. O(X)",
"- One storage write. O(1). Codec O(F).",
"- One event.",
"",
"Total Complexity: O(F + X)",
"# </weight>"
" needs to pass before the account can be recovered."
]
},
{
@@ -24659,18 +24667,7 @@
"",
"Parameters:",
"- `account`: The lost account that you want to recover. This account needs to be",
" recoverable (i.e. have a recovery configuration).",
"",
"# <weight>",
"- One storage read to check that account is recoverable. O(F)",
"- One storage read to check that this recovery process hasn't already started. O(1)",
"- One currency reserve operation. O(X)",
"- One storage read to get the current block number. O(1)",
"- One storage write. O(1).",
"- One event.",
"",
"Total Complexity: O(F + X)",
"# </weight>"
" recoverable (i.e. have a recovery configuration)."
]
},
{
@@ -24702,19 +24699,7 @@
"- `rescuer`: The account trying to rescue the lost account that you want to vouch for.",
"",
"The combination of these two parameters must point to an active recovery",
"process.",
"",
"# <weight>",
"Key: F (len of friends in config), V (len of vouching friends)",
"- One storage read to get the recovery configuration. O(1), Codec O(F)",
"- One storage read to get the active recovery process. O(1), Codec O(V)",
"- One binary search to confirm caller is a friend. O(logF)",
"- One binary search to confirm caller has not already vouched. O(logV)",
"- One storage write. O(1), Codec O(V).",
"- One event.",
"",
"Total Complexity: O(F + logF + V + logV)",
"# </weight>"
"process."
]
},
{
@@ -24737,18 +24722,7 @@
"",
"Parameters:",
"- `account`: The lost account that you want to claim has been successfully recovered by",
" you.",
"",
"# <weight>",
"Key: F (len of friends in config), V (len of vouching friends)",
"- One storage read to get the recovery configuration. O(1), Codec O(F)",
"- One storage read to get the active recovery process. O(1), Codec O(V)",
"- One storage read to get the current block number. O(1)",
"- One storage write. O(1), Codec O(V).",
"- One event.",
"",
"Total Complexity: O(F + V)",
"# </weight>"
" you."
]
},
{
@@ -24773,16 +24747,7 @@
"recoverable account with an active recovery process for it.",
"",
"Parameters:",
"- `rescuer`: The account trying to rescue this recoverable account.",
"",
"# <weight>",
"Key: V (len of vouching friends)",
"- One storage read/remove to get the active recovery process. O(1), Codec O(V)",
"- One balance call to repatriate reserved. O(X)",
"- One event.",
"",
"Total Complexity: O(V + X)",
"# </weight>"
"- `rescuer`: The account trying to rescue this recoverable account."
]
},
{
@@ -24800,17 +24765,7 @@
"(`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends)",
"",
"The dispatch origin for this call must be _Signed_ and must be a",
"recoverable account (i.e. has a recovery configuration).",
"",
"# <weight>",
"Key: F (len of friends)",
"- One storage read to get the prefix iterator for active recoveries. O(1)",
"- One storage read/remove to get the recovery configuration. O(1), Codec O(F)",
"- One balance call to unreserved. O(X)",
"- One event.",
"",
"Total Complexity: O(F + X)",
"# </weight>"
"recoverable account (i.e. has a recovery configuration)."
]
},
{
@@ -24831,11 +24786,7 @@
"be able to make calls on behalf of the recovered account.",
"",
"Parameters:",
"- `account`: The recovered account you are able to call on-behalf-of.",
"",
"# <weight>",
"- One storage mutation to check account is recovered by `who`. O(1)",
"# </weight>"
"- `account`: The recovered account you are able to call on-behalf-of."
]
}
]
@@ -36038,6 +35989,14 @@
"docs": [
"Too many approvals in the queue."
]
},
{
"name": "ProposalNotApproved",
"fields": [],
"index": 3,
"docs": [
"Proposal has not been approved."
]
}
]
}
File diff suppressed because one or more lines are too long
@@ -268,7 +268,7 @@
{
"name": "Version",
"type": 166,
"value": "0x20706f6c6b61646f743c7061726974792d706f6c6b61646f7400000000e62300000000000038df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0200000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a8010000000c00000000",
"value": "0x20706f6c6b61646f743c7061726974792d706f6c6b61646f7400000000f02300000000000038df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0200000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a8010000000c00000000",
"docs": [
" Get the chain's current version."
]
@@ -17851,6 +17851,35 @@
"- DbWrite: `Approvals`",
"# </weight>"
]
},
{
"name": "remove_approval",
"fields": [
{
"name": "proposal_id",
"type": 119,
"typeName": "ProposalIndex",
"docs": []
}
],
"index": 3,
"docs": [
"Force a previously approved proposal to be removed from the approval queue.",
"The original deposit will no longer be returned.",
"",
"May only be called from `T::RejectOrigin`.",
"- `proposal_id`: The index of a proposal",
"",
"# <weight>",
"- Complexity: O(A) where `A` is the number of approvals",
"- Db reads and writes: `Approvals`",
"# </weight>",
"",
"Errors:",
"- `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue,",
"i.e., the proposal has not been approved. This could also mean the proposal does not",
"exist altogether, thus there is no way it would have been approved in the first place."
]
}
]
}
@@ -34280,6 +34309,14 @@
"docs": [
"Too many approvals in the queue."
]
},
{
"name": "ProposalNotApproved",
"fields": [],
"index": 3,
"docs": [
"Proposal has not been approved."
]
}
]
}
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+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: '8.2.1' };
export const packageInfo = { name: '@polkadot/types-support', path: 'auto', type: 'auto', version: '8.3.2' };
+9 -9
View File
@@ -20,20 +20,20 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.2.1",
"version": "8.3.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.9",
"@polkadot/keyring": "^9.0.1",
"@polkadot/types-augment": "8.2.1",
"@polkadot/types-codec": "8.2.1",
"@polkadot/types-create": "8.2.1",
"@polkadot/util": "^9.0.1",
"@polkadot/util-crypto": "^9.0.1",
"@polkadot/keyring": "^9.1.1",
"@polkadot/types-augment": "8.3.2",
"@polkadot/types-codec": "8.3.2",
"@polkadot/types-create": "8.3.2",
"@polkadot/util": "^9.1.1",
"@polkadot/util-crypto": "^9.1.1",
"rxjs": "^7.5.5"
},
"devDependencies": {
"@polkadot/keyring": "^9.0.1",
"@polkadot/types-support": "8.2.1"
"@polkadot/keyring": "^9.1.1",
"@polkadot/types-support": "8.3.2"
}
}
@@ -54,7 +54,7 @@ const BITVEC_NS_MSB = ['bitvec::order::Msb0', 'BitOrderMsb0'];
const BITVEC_NS = [...BITVEC_NS_LSB, ...BITVEC_NS_MSB];
// These we never use these as top-level names, they are wrappers
const WRAPPERS = ['BoundedBTreeMap', 'BoundedVec', 'Box', 'BTreeMap', 'Cow', 'Result', 'Option', 'WeakBoundedVec', 'WrapperKeepOpaque', 'WrapperOpaque'];
const WRAPPERS = ['BoundedBTreeMap', 'BoundedBTreeSet', 'BoundedVec', 'Box', 'BTreeMap', 'BTreeSet', 'Cow', 'Result', 'Option', 'WeakBoundedVec', 'WrapperKeepOpaque', 'WrapperOpaque'];
// These are reserved and/or conflicts with built-in Codec or JS definitions
const RESERVED = ['entries', 'hash', 'keys', 'new', 'size'];
@@ -557,6 +557,11 @@ export class PortableRegistry extends Struct implements ILookup {
info: TypeDefInfo.BTreeMap,
sub: params.map(({ type }) => this.#createSiDef(type.unwrap()))
});
} else if (path.length === 1 && pathFirst === 'BTreeSet') {
return withTypeString(this.registry, {
info: TypeDefInfo.BTreeSet,
sub: this.#createSiDef(params[0].type.unwrap())
});
} else if (['Range', 'RangeInclusive'].includes(pathFirst)) {
return withTypeString(this.registry, {
info: pathFirst === 'Range'
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types', path: 'auto', type: 'auto', version: '8.2.1' };
export const packageInfo = { name: '@polkadot/types', path: 'auto', type: 'auto', version: '8.3.2' };
+1139 -1012
View File
File diff suppressed because it is too large Load Diff