@polkadot/api-augment 10.1.4 → 10.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/packageInfo.js +1 -1
- package/kusama/consts.d.ts +40 -167
- package/kusama/errors.d.ts +75 -318
- package/kusama/events.d.ts +154 -379
- package/kusama/query.d.ts +47 -215
- package/kusama/runtime.d.ts +27 -31
- package/kusama/tx.d.ts +210 -1122
- package/package.json +7 -7
- package/packageInfo.js +1 -1
- package/polkadot/consts.d.ts +68 -3
- package/polkadot/errors.d.ts +180 -9
- package/polkadot/events.d.ts +238 -11
- package/polkadot/query.d.ts +88 -16
- package/polkadot/runtime.d.ts +27 -31
- package/polkadot/tx.d.ts +420 -59
- package/substrate/consts.d.ts +32 -33
- package/substrate/errors.d.ts +103 -24
- package/substrate/events.d.ts +172 -7
- package/substrate/query.d.ts +48 -8
- package/substrate/runtime.d.ts +18 -30
- package/substrate/tx.d.ts +241 -93
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"./cjs/detectPackage.js"
|
|
19
19
|
],
|
|
20
20
|
"type": "module",
|
|
21
|
-
"version": "10.
|
|
21
|
+
"version": "10.2.2",
|
|
22
22
|
"main": "./cjs/index.js",
|
|
23
23
|
"module": "./index.js",
|
|
24
24
|
"types": "./index.d.ts",
|
|
@@ -186,12 +186,12 @@
|
|
|
186
186
|
}
|
|
187
187
|
},
|
|
188
188
|
"dependencies": {
|
|
189
|
-
"@polkadot/api-base": "10.
|
|
190
|
-
"@polkadot/rpc-augment": "10.
|
|
191
|
-
"@polkadot/types": "10.
|
|
192
|
-
"@polkadot/types-augment": "10.
|
|
193
|
-
"@polkadot/types-codec": "10.
|
|
194
|
-
"@polkadot/util": "^11.1.
|
|
189
|
+
"@polkadot/api-base": "10.2.2",
|
|
190
|
+
"@polkadot/rpc-augment": "10.2.2",
|
|
191
|
+
"@polkadot/types": "10.2.2",
|
|
192
|
+
"@polkadot/types-augment": "10.2.2",
|
|
193
|
+
"@polkadot/types-codec": "10.2.2",
|
|
194
|
+
"@polkadot/util": "^11.1.3",
|
|
195
195
|
"tslib": "^2.5.0"
|
|
196
196
|
}
|
|
197
197
|
}
|
package/packageInfo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageInfo = { name: '@polkadot/api-augment', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '10.
|
|
1
|
+
export const packageInfo = { name: '@polkadot/api-augment', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '10.2.2' };
|
package/polkadot/consts.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import '@polkadot/api-base/types/consts';
|
|
2
2
|
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
|
|
3
3
|
import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
|
4
|
-
import type { Codec } from '@polkadot/types-codec/types';
|
|
4
|
+
import type { Codec, ITuple } from '@polkadot/types-codec/types';
|
|
5
5
|
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
|
|
6
|
-
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
|
|
6
|
+
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletReferendaTrackInfo, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
|
|
7
7
|
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
|
|
8
8
|
declare module '@polkadot/api-base/types/consts' {
|
|
9
9
|
interface AugmentedConsts<ApiType extends ApiTypes> {
|
|
@@ -51,9 +51,24 @@ declare module '@polkadot/api-base/types/consts' {
|
|
|
51
51
|
};
|
|
52
52
|
balances: {
|
|
53
53
|
/**
|
|
54
|
-
* The minimum amount required to keep an account open.
|
|
54
|
+
* The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!
|
|
55
|
+
*
|
|
56
|
+
* If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for
|
|
57
|
+
* this pallet. However, you do so at your own risk: this will open up a major DoS vector.
|
|
58
|
+
* In case you have multiple sources of provider references, you may also get unexpected
|
|
59
|
+
* behaviour if you set this to zero.
|
|
60
|
+
*
|
|
61
|
+
* Bottom line: Do yourself a favour and make it at least one!
|
|
55
62
|
**/
|
|
56
63
|
existentialDeposit: u128 & AugmentedConst<ApiType>;
|
|
64
|
+
/**
|
|
65
|
+
* The maximum number of individual freeze locks that can exist on an account at any time.
|
|
66
|
+
**/
|
|
67
|
+
maxFreezes: u32 & AugmentedConst<ApiType>;
|
|
68
|
+
/**
|
|
69
|
+
* The maximum number of holds that can exist on an account at any time.
|
|
70
|
+
**/
|
|
71
|
+
maxHolds: u32 & AugmentedConst<ApiType>;
|
|
57
72
|
/**
|
|
58
73
|
* The maximum number of locks that should exist on an account.
|
|
59
74
|
* Not strictly enforced, but used for weight estimation.
|
|
@@ -136,6 +151,26 @@ declare module '@polkadot/api-base/types/consts' {
|
|
|
136
151
|
**/
|
|
137
152
|
[key: string]: Codec;
|
|
138
153
|
};
|
|
154
|
+
convictionVoting: {
|
|
155
|
+
/**
|
|
156
|
+
* The maximum number of concurrent votes an account may have.
|
|
157
|
+
*
|
|
158
|
+
* Also used to compute weight, an overly large value can lead to extrinsics with large
|
|
159
|
+
* weight estimation: see `delegate` for instance.
|
|
160
|
+
**/
|
|
161
|
+
maxVotes: u32 & AugmentedConst<ApiType>;
|
|
162
|
+
/**
|
|
163
|
+
* The minimum period of vote locking.
|
|
164
|
+
*
|
|
165
|
+
* It should be no shorter than enactment period to ensure that in the case of an approval,
|
|
166
|
+
* those successful voters are locked into the consequences that their votes entail.
|
|
167
|
+
**/
|
|
168
|
+
voteLockingPeriod: u32 & AugmentedConst<ApiType>;
|
|
169
|
+
/**
|
|
170
|
+
* Generic const
|
|
171
|
+
**/
|
|
172
|
+
[key: string]: Codec;
|
|
173
|
+
};
|
|
139
174
|
crowdloan: {
|
|
140
175
|
/**
|
|
141
176
|
* The minimum amount that may be contributed into a crowdloan. Should almost certainly be at
|
|
@@ -252,6 +287,7 @@ declare module '@polkadot/api-base/types/consts' {
|
|
|
252
287
|
minerMaxLength: u32 & AugmentedConst<ApiType>;
|
|
253
288
|
minerMaxVotesPerVoter: u32 & AugmentedConst<ApiType>;
|
|
254
289
|
minerMaxWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
|
290
|
+
minerMaxWinners: u32 & AugmentedConst<ApiType>;
|
|
255
291
|
/**
|
|
256
292
|
* The priority of the unsigned transaction submitted in the unsigned-phase
|
|
257
293
|
**/
|
|
@@ -565,6 +601,35 @@ declare module '@polkadot/api-base/types/consts' {
|
|
|
565
601
|
**/
|
|
566
602
|
[key: string]: Codec;
|
|
567
603
|
};
|
|
604
|
+
referenda: {
|
|
605
|
+
/**
|
|
606
|
+
* Quantization level for the referendum wakeup scheduler. A higher number will result in
|
|
607
|
+
* fewer storage reads/writes needed for smaller voters, but also result in delays to the
|
|
608
|
+
* automatic referendum status changes. Explicit servicing instructions are unaffected.
|
|
609
|
+
**/
|
|
610
|
+
alarmInterval: u32 & AugmentedConst<ApiType>;
|
|
611
|
+
/**
|
|
612
|
+
* Maximum size of the referendum queue for a single track.
|
|
613
|
+
**/
|
|
614
|
+
maxQueued: u32 & AugmentedConst<ApiType>;
|
|
615
|
+
/**
|
|
616
|
+
* The minimum amount to be used as a deposit for a public referendum proposal.
|
|
617
|
+
**/
|
|
618
|
+
submissionDeposit: u128 & AugmentedConst<ApiType>;
|
|
619
|
+
/**
|
|
620
|
+
* Information concerning the different referendum tracks.
|
|
621
|
+
**/
|
|
622
|
+
tracks: Vec<ITuple<[u16, PalletReferendaTrackInfo]>> & AugmentedConst<ApiType>;
|
|
623
|
+
/**
|
|
624
|
+
* The number of blocks after submission that a referendum must begin being decided by.
|
|
625
|
+
* Once this passes, then anyone may cancel the referendum.
|
|
626
|
+
**/
|
|
627
|
+
undecidingTimeout: u32 & AugmentedConst<ApiType>;
|
|
628
|
+
/**
|
|
629
|
+
* Generic const
|
|
630
|
+
**/
|
|
631
|
+
[key: string]: Codec;
|
|
632
|
+
};
|
|
568
633
|
registrar: {
|
|
569
634
|
/**
|
|
570
635
|
* The deposit to be paid per byte stored on chain.
|
package/polkadot/errors.d.ts
CHANGED
|
@@ -61,35 +61,43 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
61
61
|
};
|
|
62
62
|
balances: {
|
|
63
63
|
/**
|
|
64
|
-
* Beneficiary account must pre-exist
|
|
64
|
+
* Beneficiary account must pre-exist.
|
|
65
65
|
**/
|
|
66
66
|
DeadAccount: AugmentedError<ApiType>;
|
|
67
67
|
/**
|
|
68
|
-
* Value too low to create account due to existential deposit
|
|
68
|
+
* Value too low to create account due to existential deposit.
|
|
69
69
|
**/
|
|
70
70
|
ExistentialDeposit: AugmentedError<ApiType>;
|
|
71
71
|
/**
|
|
72
|
-
* A vesting schedule already exists for this account
|
|
72
|
+
* A vesting schedule already exists for this account.
|
|
73
73
|
**/
|
|
74
74
|
ExistingVestingSchedule: AugmentedError<ApiType>;
|
|
75
|
+
/**
|
|
76
|
+
* Transfer/payment would kill account.
|
|
77
|
+
**/
|
|
78
|
+
Expendability: AugmentedError<ApiType>;
|
|
75
79
|
/**
|
|
76
80
|
* Balance too low to send value.
|
|
77
81
|
**/
|
|
78
82
|
InsufficientBalance: AugmentedError<ApiType>;
|
|
79
83
|
/**
|
|
80
|
-
*
|
|
84
|
+
* Account liquidity restrictions prevent withdrawal.
|
|
81
85
|
**/
|
|
82
|
-
|
|
86
|
+
LiquidityRestrictions: AugmentedError<ApiType>;
|
|
83
87
|
/**
|
|
84
|
-
*
|
|
88
|
+
* Number of freezes exceed `MaxFreezes`.
|
|
85
89
|
**/
|
|
86
|
-
|
|
90
|
+
TooManyFreezes: AugmentedError<ApiType>;
|
|
87
91
|
/**
|
|
88
|
-
* Number of
|
|
92
|
+
* Number of holds exceed `MaxHolds`.
|
|
93
|
+
**/
|
|
94
|
+
TooManyHolds: AugmentedError<ApiType>;
|
|
95
|
+
/**
|
|
96
|
+
* Number of named reserves exceed `MaxReserves`.
|
|
89
97
|
**/
|
|
90
98
|
TooManyReserves: AugmentedError<ApiType>;
|
|
91
99
|
/**
|
|
92
|
-
* Vesting balance too high to send value
|
|
100
|
+
* Vesting balance too high to send value.
|
|
93
101
|
**/
|
|
94
102
|
VestingBalance: AugmentedError<ApiType>;
|
|
95
103
|
/**
|
|
@@ -207,6 +215,61 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
207
215
|
**/
|
|
208
216
|
[key: string]: AugmentedError<ApiType>;
|
|
209
217
|
};
|
|
218
|
+
convictionVoting: {
|
|
219
|
+
/**
|
|
220
|
+
* The account is already delegating.
|
|
221
|
+
**/
|
|
222
|
+
AlreadyDelegating: AugmentedError<ApiType>;
|
|
223
|
+
/**
|
|
224
|
+
* The account currently has votes attached to it and the operation cannot succeed until
|
|
225
|
+
* these are removed, either through `unvote` or `reap_vote`.
|
|
226
|
+
**/
|
|
227
|
+
AlreadyVoting: AugmentedError<ApiType>;
|
|
228
|
+
/**
|
|
229
|
+
* The class ID supplied is invalid.
|
|
230
|
+
**/
|
|
231
|
+
BadClass: AugmentedError<ApiType>;
|
|
232
|
+
/**
|
|
233
|
+
* The class must be supplied since it is not easily determinable from the state.
|
|
234
|
+
**/
|
|
235
|
+
ClassNeeded: AugmentedError<ApiType>;
|
|
236
|
+
/**
|
|
237
|
+
* Too high a balance was provided that the account cannot afford.
|
|
238
|
+
**/
|
|
239
|
+
InsufficientFunds: AugmentedError<ApiType>;
|
|
240
|
+
/**
|
|
241
|
+
* Maximum number of votes reached.
|
|
242
|
+
**/
|
|
243
|
+
MaxVotesReached: AugmentedError<ApiType>;
|
|
244
|
+
/**
|
|
245
|
+
* Delegation to oneself makes no sense.
|
|
246
|
+
**/
|
|
247
|
+
Nonsense: AugmentedError<ApiType>;
|
|
248
|
+
/**
|
|
249
|
+
* The actor has no permission to conduct the action.
|
|
250
|
+
**/
|
|
251
|
+
NoPermission: AugmentedError<ApiType>;
|
|
252
|
+
/**
|
|
253
|
+
* The actor has no permission to conduct the action right now but will do in the future.
|
|
254
|
+
**/
|
|
255
|
+
NoPermissionYet: AugmentedError<ApiType>;
|
|
256
|
+
/**
|
|
257
|
+
* The account is not currently delegating.
|
|
258
|
+
**/
|
|
259
|
+
NotDelegating: AugmentedError<ApiType>;
|
|
260
|
+
/**
|
|
261
|
+
* Poll is not ongoing.
|
|
262
|
+
**/
|
|
263
|
+
NotOngoing: AugmentedError<ApiType>;
|
|
264
|
+
/**
|
|
265
|
+
* The given account did not vote on the poll.
|
|
266
|
+
**/
|
|
267
|
+
NotVoter: AugmentedError<ApiType>;
|
|
268
|
+
/**
|
|
269
|
+
* Generic error
|
|
270
|
+
**/
|
|
271
|
+
[key: string]: AugmentedError<ApiType>;
|
|
272
|
+
};
|
|
210
273
|
council: {
|
|
211
274
|
/**
|
|
212
275
|
* Members are already initialized!
|
|
@@ -864,6 +927,18 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
864
927
|
* None of the funds can be withdrawn yet because the bonding duration has not passed.
|
|
865
928
|
**/
|
|
866
929
|
CannotWithdrawAny: AugmentedError<ApiType>;
|
|
930
|
+
/**
|
|
931
|
+
* The submitted changes to commission change rate are not allowed.
|
|
932
|
+
**/
|
|
933
|
+
CommissionChangeRateNotAllowed: AugmentedError<ApiType>;
|
|
934
|
+
/**
|
|
935
|
+
* Not enough blocks have surpassed since the last commission update.
|
|
936
|
+
**/
|
|
937
|
+
CommissionChangeThrottled: AugmentedError<ApiType>;
|
|
938
|
+
/**
|
|
939
|
+
* The supplied commission exceeds the max allowed commission.
|
|
940
|
+
**/
|
|
941
|
+
CommissionExceedsMaximum: AugmentedError<ApiType>;
|
|
867
942
|
/**
|
|
868
943
|
* Some error occurred that should never happen. This should be reported to the
|
|
869
944
|
* maintainers.
|
|
@@ -882,6 +957,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
882
957
|
* Pool id provided is not correct/usable.
|
|
883
958
|
**/
|
|
884
959
|
InvalidPoolId: AugmentedError<ApiType>;
|
|
960
|
+
/**
|
|
961
|
+
* The pool's max commission cannot be set higher than the existing value.
|
|
962
|
+
**/
|
|
963
|
+
MaxCommissionRestricted: AugmentedError<ApiType>;
|
|
885
964
|
/**
|
|
886
965
|
* Too many members in the pool or system.
|
|
887
966
|
**/
|
|
@@ -906,6 +985,14 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
906
985
|
* permissions for the pool. Members can never unbond to a value below `MinJoinBond`.
|
|
907
986
|
**/
|
|
908
987
|
MinimumBondNotMet: AugmentedError<ApiType>;
|
|
988
|
+
/**
|
|
989
|
+
* No commission current has been set.
|
|
990
|
+
**/
|
|
991
|
+
NoCommissionCurrentSet: AugmentedError<ApiType>;
|
|
992
|
+
/**
|
|
993
|
+
* There is no pending commission to claim.
|
|
994
|
+
**/
|
|
995
|
+
NoPendingCommission: AugmentedError<ApiType>;
|
|
909
996
|
/**
|
|
910
997
|
* A pool must be in [`PoolState::Destroying`] in order for the depositor to unbond or for
|
|
911
998
|
* other members to be permissionlessly unbonded.
|
|
@@ -1355,6 +1442,64 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
1355
1442
|
**/
|
|
1356
1443
|
[key: string]: AugmentedError<ApiType>;
|
|
1357
1444
|
};
|
|
1445
|
+
referenda: {
|
|
1446
|
+
/**
|
|
1447
|
+
* The referendum index provided is invalid in this context.
|
|
1448
|
+
**/
|
|
1449
|
+
BadReferendum: AugmentedError<ApiType>;
|
|
1450
|
+
/**
|
|
1451
|
+
* The referendum status is invalid for this operation.
|
|
1452
|
+
**/
|
|
1453
|
+
BadStatus: AugmentedError<ApiType>;
|
|
1454
|
+
/**
|
|
1455
|
+
* The track identifier given was invalid.
|
|
1456
|
+
**/
|
|
1457
|
+
BadTrack: AugmentedError<ApiType>;
|
|
1458
|
+
/**
|
|
1459
|
+
* There are already a full complement of referenda in progress for this track.
|
|
1460
|
+
**/
|
|
1461
|
+
Full: AugmentedError<ApiType>;
|
|
1462
|
+
/**
|
|
1463
|
+
* Referendum's decision deposit is already paid.
|
|
1464
|
+
**/
|
|
1465
|
+
HasDeposit: AugmentedError<ApiType>;
|
|
1466
|
+
/**
|
|
1467
|
+
* The deposit cannot be refunded since none was made.
|
|
1468
|
+
**/
|
|
1469
|
+
NoDeposit: AugmentedError<ApiType>;
|
|
1470
|
+
/**
|
|
1471
|
+
* The deposit refunder is not the depositor.
|
|
1472
|
+
**/
|
|
1473
|
+
NoPermission: AugmentedError<ApiType>;
|
|
1474
|
+
/**
|
|
1475
|
+
* There was nothing to do in the advancement.
|
|
1476
|
+
**/
|
|
1477
|
+
NothingToDo: AugmentedError<ApiType>;
|
|
1478
|
+
/**
|
|
1479
|
+
* Referendum is not ongoing.
|
|
1480
|
+
**/
|
|
1481
|
+
NotOngoing: AugmentedError<ApiType>;
|
|
1482
|
+
/**
|
|
1483
|
+
* No track exists for the proposal origin.
|
|
1484
|
+
**/
|
|
1485
|
+
NoTrack: AugmentedError<ApiType>;
|
|
1486
|
+
/**
|
|
1487
|
+
* The preimage does not exist.
|
|
1488
|
+
**/
|
|
1489
|
+
PreimageNotExist: AugmentedError<ApiType>;
|
|
1490
|
+
/**
|
|
1491
|
+
* The queue of the track is empty.
|
|
1492
|
+
**/
|
|
1493
|
+
QueueEmpty: AugmentedError<ApiType>;
|
|
1494
|
+
/**
|
|
1495
|
+
* Any deposit cannot be refunded until after the decision is over.
|
|
1496
|
+
**/
|
|
1497
|
+
Unfinished: AugmentedError<ApiType>;
|
|
1498
|
+
/**
|
|
1499
|
+
* Generic error
|
|
1500
|
+
**/
|
|
1501
|
+
[key: string]: AugmentedError<ApiType>;
|
|
1502
|
+
};
|
|
1358
1503
|
registrar: {
|
|
1359
1504
|
/**
|
|
1360
1505
|
* The ID is already registered.
|
|
@@ -1810,6 +1955,32 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
1810
1955
|
**/
|
|
1811
1956
|
[key: string]: AugmentedError<ApiType>;
|
|
1812
1957
|
};
|
|
1958
|
+
whitelist: {
|
|
1959
|
+
/**
|
|
1960
|
+
* The call was already whitelisted; No-Op.
|
|
1961
|
+
**/
|
|
1962
|
+
CallAlreadyWhitelisted: AugmentedError<ApiType>;
|
|
1963
|
+
/**
|
|
1964
|
+
* The call was not whitelisted.
|
|
1965
|
+
**/
|
|
1966
|
+
CallIsNotWhitelisted: AugmentedError<ApiType>;
|
|
1967
|
+
/**
|
|
1968
|
+
* The weight of the decoded call was higher than the witness.
|
|
1969
|
+
**/
|
|
1970
|
+
InvalidCallWeightWitness: AugmentedError<ApiType>;
|
|
1971
|
+
/**
|
|
1972
|
+
* The preimage of the call hash could not be loaded.
|
|
1973
|
+
**/
|
|
1974
|
+
UnavailablePreImage: AugmentedError<ApiType>;
|
|
1975
|
+
/**
|
|
1976
|
+
* The call could not be decoded.
|
|
1977
|
+
**/
|
|
1978
|
+
UndecodableCall: AugmentedError<ApiType>;
|
|
1979
|
+
/**
|
|
1980
|
+
* Generic error
|
|
1981
|
+
**/
|
|
1982
|
+
[key: string]: AugmentedError<ApiType>;
|
|
1983
|
+
};
|
|
1813
1984
|
xcmPallet: {
|
|
1814
1985
|
/**
|
|
1815
1986
|
* The given account is not an identifiable sovereign account for any location.
|