@polkadot/api-augment 8.9.2-9 → 8.10.1

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.
@@ -11,6 +11,6 @@ const packageInfo = {
11
11
  name: '@polkadot/api-augment',
12
12
  path: typeof __dirname === 'string' ? __dirname : 'auto',
13
13
  type: 'cjs',
14
- version: '8.9.2-9'
14
+ version: '8.10.1'
15
15
  };
16
16
  exports.packageInfo = packageInfo;
@@ -891,10 +891,6 @@ declare module '@polkadot/api-base/types/errors' {
891
891
  * pool at a time.
892
892
  **/
893
893
  AccountBelongsToOtherPool: AugmentedError<ApiType>;
894
- /**
895
- * The member is already unbonding in this era.
896
- **/
897
- AlreadyUnbonding: AugmentedError<ApiType>;
898
894
  /**
899
895
  * The pools state cannot be changed.
900
896
  **/
@@ -907,7 +903,7 @@ declare module '@polkadot/api-base/types/errors' {
907
903
  * Some error occurred that should never happen. This should be reported to the
908
904
  * maintainers.
909
905
  **/
910
- DefensiveError: AugmentedError<ApiType>;
906
+ Defensive: AugmentedError<ApiType>;
911
907
  /**
912
908
  * The caller does not have adequate permissions.
913
909
  **/
@@ -917,10 +913,6 @@ declare module '@polkadot/api-base/types/errors' {
917
913
  * anymore to, for example, collect rewards).
918
914
  **/
919
915
  FullyUnbonding: AugmentedError<ApiType>;
920
- /**
921
- * The pool has insufficient balance to bond as a nominator.
922
- **/
923
- InsufficientBond: AugmentedError<ApiType>;
924
916
  /**
925
917
  * Too many members in the pool or system.
926
918
  **/
@@ -1851,6 +1843,10 @@ declare module '@polkadot/api-base/types/errors' {
1851
1843
  * Not a member.
1852
1844
  **/
1853
1845
  NotMember: AugmentedError<ApiType>;
1846
+ /**
1847
+ * Too many members.
1848
+ **/
1849
+ TooManyMembers: AugmentedError<ApiType>;
1854
1850
  /**
1855
1851
  * Generic error
1856
1852
  **/
@@ -1887,6 +1883,11 @@ declare module '@polkadot/api-base/types/errors' {
1887
1883
  [key: string]: AugmentedError<ApiType>;
1888
1884
  };
1889
1885
  treasury: {
1886
+ /**
1887
+ * The spend origin is valid but the amount it is allowed to spend is lower than the
1888
+ * amount to be spent.
1889
+ **/
1890
+ InsufficientPermission: AugmentedError<ApiType>;
1890
1891
  /**
1891
1892
  * Proposer's balance is too low.
1892
1893
  **/
@@ -471,6 +471,12 @@ declare module '@polkadot/api-base/types/events' {
471
471
  provider: AccountId32;
472
472
  deposit: u128;
473
473
  }>;
474
+ /**
475
+ * A proposal got canceled.
476
+ **/
477
+ ProposalCanceled: AugmentedEvent<ApiType, [propIndex: u32], {
478
+ propIndex: u32;
479
+ }>;
474
480
  /**
475
481
  * A motion has been proposed by a public account.
476
482
  **/
@@ -870,6 +876,13 @@ declare module '@polkadot/api-base/types/events' {
870
876
  poolId: u32;
871
877
  payout: u128;
872
878
  }>;
879
+ /**
880
+ * The active balance of pool `pool_id` has been slashed to `balance`.
881
+ **/
882
+ PoolSlashed: AugmentedEvent<ApiType, [poolId: u32, balance: u128], {
883
+ poolId: u32;
884
+ balance: u128;
885
+ }>;
873
886
  /**
874
887
  * The roles of a pool have been updated to the given new roles. Note that the depositor
875
888
  * can never change.
@@ -888,19 +901,44 @@ declare module '@polkadot/api-base/types/events' {
888
901
  }>;
889
902
  /**
890
903
  * A member has unbonded from their pool.
904
+ *
905
+ * - `balance` is the corresponding balance of the number of points that has been
906
+ * requested to be unbonded (the argument of the `unbond` transaction) from the bonded
907
+ * pool.
908
+ * - `points` is the number of points that are issued as a result of `balance` being
909
+ * dissolved into the corresponding unbonding pool.
910
+ *
911
+ * In the absence of slashing, these values will match. In the presence of slashing, the
912
+ * number of points that are issued in the unbonding pool will be less than the amount
913
+ * requested to be unbonded.
891
914
  **/
892
- Unbonded: AugmentedEvent<ApiType, [member: AccountId32, poolId: u32, amount: u128], {
915
+ Unbonded: AugmentedEvent<ApiType, [member: AccountId32, poolId: u32, balance: u128, points: u128], {
893
916
  member: AccountId32;
894
917
  poolId: u32;
895
- amount: u128;
918
+ balance: u128;
919
+ points: u128;
920
+ }>;
921
+ /**
922
+ * The unbond pool at `era` of pool `pool_id` has been slashed to `balance`.
923
+ **/
924
+ UnbondingPoolSlashed: AugmentedEvent<ApiType, [poolId: u32, era: u32, balance: u128], {
925
+ poolId: u32;
926
+ era: u32;
927
+ balance: u128;
896
928
  }>;
897
929
  /**
898
930
  * A member has withdrawn from their pool.
931
+ *
932
+ * The given number of `points` have been dissolved in return of `balance`.
933
+ *
934
+ * Similar to `Unbonded` event, in the absence of slashing, the ratio of point to balance
935
+ * will be 1.
899
936
  **/
900
- Withdrawn: AugmentedEvent<ApiType, [member: AccountId32, poolId: u32, amount: u128], {
937
+ Withdrawn: AugmentedEvent<ApiType, [member: AccountId32, poolId: u32, balance: u128, points: u128], {
901
938
  member: AccountId32;
902
939
  poolId: u32;
903
- amount: u128;
940
+ balance: u128;
941
+ points: u128;
904
942
  }>;
905
943
  /**
906
944
  * Generic event
@@ -1626,6 +1664,21 @@ declare module '@polkadot/api-base/types/events' {
1626
1664
  **/
1627
1665
  [key: string]: AugmentedEvent<ApiType>;
1628
1666
  };
1667
+ transactionPayment: {
1668
+ /**
1669
+ * A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,
1670
+ * has been paid by `who`.
1671
+ **/
1672
+ TransactionFeePaid: AugmentedEvent<ApiType, [who: AccountId32, actualFee: u128, tip: u128], {
1673
+ who: AccountId32;
1674
+ actualFee: u128;
1675
+ tip: u128;
1676
+ }>;
1677
+ /**
1678
+ * Generic event
1679
+ **/
1680
+ [key: string]: AugmentedEvent<ApiType>;
1681
+ };
1629
1682
  treasury: {
1630
1683
  /**
1631
1684
  * Some funds have been allocated.
@@ -1666,6 +1719,14 @@ declare module '@polkadot/api-base/types/events' {
1666
1719
  Rollover: AugmentedEvent<ApiType, [rolloverBalance: u128], {
1667
1720
  rolloverBalance: u128;
1668
1721
  }>;
1722
+ /**
1723
+ * A new spend proposal has been approved.
1724
+ **/
1725
+ SpendApproved: AugmentedEvent<ApiType, [proposalIndex: u32, amount: u128, beneficiary: AccountId32], {
1726
+ proposalIndex: u32;
1727
+ amount: u128;
1728
+ beneficiary: AccountId32;
1729
+ }>;
1669
1730
  /**
1670
1731
  * We have ended a spend period and will now allocate funds.
1671
1732
  **/
package/kusama/query.d.ts CHANGED
@@ -857,6 +857,9 @@ declare module '@polkadot/api-base/types/storage' {
857
857
  *
858
858
  * This is the amount that the depositor must put as their initial stake in the pool, as an
859
859
  * indication of "skin in the game".
860
+ *
861
+ * This is the value that will always exist in the staking ledger of the pool bonded account
862
+ * while all other accounts leave.
860
863
  **/
861
864
  minCreateBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
862
865
  /**
package/kusama/tx.d.ts CHANGED
@@ -1602,12 +1602,17 @@ declare module '@polkadot/api-base/types/submittable' {
1602
1602
  };
1603
1603
  grandpa: {
1604
1604
  /**
1605
- * Note that the current authority set of the GRANDPA finality gadget has
1606
- * stalled. This will trigger a forced authority set change at the beginning
1607
- * of the next session, to be enacted `delay` blocks after that. The delay
1608
- * should be high enough to safely assume that the block signalling the
1609
- * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters
1610
- * will start the new authority set using the given finalized block as base.
1605
+ * Note that the current authority set of the GRANDPA finality gadget has stalled.
1606
+ *
1607
+ * This will trigger a forced authority set change at the beginning of the next session, to
1608
+ * be enacted `delay` blocks after that. The `delay` should be high enough to safely assume
1609
+ * that the block signalling the forced change will not be re-orged e.g. 1000 blocks.
1610
+ * The block production rate (which may be slowed down because of finality lagging) should
1611
+ * be taken into account when choosing the `delay`. The GRANDPA voters based on the new
1612
+ * authority will start voting on top of `best_finalized_block_number` for new finalized
1613
+ * blocks. `best_finalized_block_number` should be the highest of the latest finalized
1614
+ * block of all validators of the new authority set.
1615
+ *
1611
1616
  * Only callable by root.
1612
1617
  **/
1613
1618
  noteStalled: AugmentedSubmittable<(delay: u32 | AnyNumber | Uint8Array, bestFinalizedBlockNumber: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
@@ -2410,6 +2415,16 @@ declare module '@polkadot/api-base/types/submittable' {
2410
2415
  } | {
2411
2416
  Rewards: any;
2412
2417
  } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsBondExtra]>;
2418
+ /**
2419
+ * Chill on behalf of the pool.
2420
+ *
2421
+ * The dispatch origin of this call must be signed by the pool nominator or the pool
2422
+ * root role, same as [`Pallet::nominate`].
2423
+ *
2424
+ * This directly forward the call to the staking pallet, on behalf of the pool bonded
2425
+ * account.
2426
+ **/
2427
+ chill: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
2413
2428
  /**
2414
2429
  * A bonded member can use this to claim their payout based on the rewards that the pool
2415
2430
  * has accumulated since their last claimed payout (OR since joining if this is there first
@@ -2452,6 +2467,15 @@ declare module '@polkadot/api-base/types/submittable' {
2452
2467
  * * Only a pool with [`PoolState::Open`] can be joined
2453
2468
  **/
2454
2469
  join: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, poolId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, u32]>;
2470
+ /**
2471
+ * Nominate on behalf of the pool.
2472
+ *
2473
+ * The dispatch origin of this call must be signed by the pool nominator or the pool
2474
+ * root role.
2475
+ *
2476
+ * This directly forward the call to the staking pallet, on behalf of the pool bonded
2477
+ * account.
2478
+ **/
2455
2479
  nominate: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, validators: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<AccountId32>]>;
2456
2480
  /**
2457
2481
  * Call `withdraw_unbonded` for the pools account. This call can be made by any account.
@@ -2505,12 +2529,24 @@ declare module '@polkadot/api-base/types/submittable' {
2505
2529
  } | {
2506
2530
  Remove: any;
2507
2531
  } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsConfigOpU32, PalletNominationPoolsConfigOpU32]>;
2532
+ /**
2533
+ * Set a new metadata for the pool.
2534
+ *
2535
+ * The dispatch origin of this call must be signed by the state toggler, or the root role
2536
+ * of the pool.
2537
+ **/
2508
2538
  setMetadata: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, metadata: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
2539
+ /**
2540
+ * Set a new state for the pool.
2541
+ *
2542
+ * The dispatch origin of this call must be signed by the state toggler, or the root role
2543
+ * of the pool.
2544
+ **/
2509
2545
  setState: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, state: PalletNominationPoolsPoolState | 'Open' | 'Blocked' | 'Destroying' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletNominationPoolsPoolState]>;
2510
2546
  /**
2511
2547
  * Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It
2512
2548
  * implicitly collects the rewards one last time, since not doing so would mean some
2513
- * rewards would go forfeited.
2549
+ * rewards would be forfeited.
2514
2550
  *
2515
2551
  * Under certain conditions, this call can be dispatched permissionlessly (i.e. by any
2516
2552
  * account).
@@ -4718,6 +4754,27 @@ declare module '@polkadot/api-base/types/submittable' {
4718
4754
  * exist altogether, thus there is no way it would have been approved in the first place.
4719
4755
  **/
4720
4756
  removeApproval: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
4757
+ /**
4758
+ * Propose and approve a spend of treasury funds.
4759
+ *
4760
+ * - `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`.
4761
+ * - `amount`: The amount to be transferred from the treasury to the `beneficiary`.
4762
+ * - `beneficiary`: The destination account for the transfer.
4763
+ *
4764
+ * NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the
4765
+ * beneficiary.
4766
+ **/
4767
+ spend: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, beneficiary: MultiAddress | {
4768
+ Id: any;
4769
+ } | {
4770
+ Index: any;
4771
+ } | {
4772
+ Raw: any;
4773
+ } | {
4774
+ Address32: any;
4775
+ } | {
4776
+ Address20: any;
4777
+ } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, MultiAddress]>;
4721
4778
  /**
4722
4779
  * Generic tx
4723
4780
  **/
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "./cjs/detectPackage.js"
21
21
  ],
22
22
  "type": "module",
23
- "version": "8.9.2-9",
23
+ "version": "8.10.1",
24
24
  "main": "./cjs/index.js",
25
25
  "module": "./index.js",
26
26
  "types": "./index.d.ts",
@@ -173,11 +173,11 @@
173
173
  },
174
174
  "dependencies": {
175
175
  "@babel/runtime": "^7.18.3",
176
- "@polkadot/api-base": "8.9.2-9",
177
- "@polkadot/rpc-augment": "8.9.2-9",
178
- "@polkadot/types": "8.9.2-9",
179
- "@polkadot/types-augment": "8.9.2-9",
180
- "@polkadot/types-codec": "8.9.2-9",
181
- "@polkadot/util": "^9.5.2-15"
176
+ "@polkadot/api-base": "8.10.1",
177
+ "@polkadot/rpc-augment": "8.10.1",
178
+ "@polkadot/types": "8.10.1",
179
+ "@polkadot/types-augment": "8.10.1",
180
+ "@polkadot/types-codec": "8.10.1",
181
+ "@polkadot/util": "^9.6.2"
182
182
  }
183
183
  }
package/packageInfo.js CHANGED
@@ -5,5 +5,5 @@ export const packageInfo = {
5
5
  name: '@polkadot/api-augment',
6
6
  path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',
7
7
  type: 'esm',
8
- version: '8.9.2-9'
8
+ version: '8.10.1'
9
9
  };
@@ -1553,6 +1553,10 @@ declare module '@polkadot/api-base/types/errors' {
1553
1553
  * Not a member.
1554
1554
  **/
1555
1555
  NotMember: AugmentedError<ApiType>;
1556
+ /**
1557
+ * Too many members.
1558
+ **/
1559
+ TooManyMembers: AugmentedError<ApiType>;
1556
1560
  /**
1557
1561
  * Generic error
1558
1562
  **/
@@ -1589,6 +1593,11 @@ declare module '@polkadot/api-base/types/errors' {
1589
1593
  [key: string]: AugmentedError<ApiType>;
1590
1594
  };
1591
1595
  treasury: {
1596
+ /**
1597
+ * The spend origin is valid but the amount it is allowed to spend is lower than the
1598
+ * amount to be spent.
1599
+ **/
1600
+ InsufficientPermission: AugmentedError<ApiType>;
1592
1601
  /**
1593
1602
  * Proposer's balance is too low.
1594
1603
  **/
@@ -471,6 +471,12 @@ declare module '@polkadot/api-base/types/events' {
471
471
  provider: AccountId32;
472
472
  deposit: u128;
473
473
  }>;
474
+ /**
475
+ * A proposal got canceled.
476
+ **/
477
+ ProposalCanceled: AugmentedEvent<ApiType, [propIndex: u32], {
478
+ propIndex: u32;
479
+ }>;
474
480
  /**
475
481
  * A motion has been proposed by a public account.
476
482
  **/
@@ -1349,6 +1355,21 @@ declare module '@polkadot/api-base/types/events' {
1349
1355
  **/
1350
1356
  [key: string]: AugmentedEvent<ApiType>;
1351
1357
  };
1358
+ transactionPayment: {
1359
+ /**
1360
+ * A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,
1361
+ * has been paid by `who`.
1362
+ **/
1363
+ TransactionFeePaid: AugmentedEvent<ApiType, [who: AccountId32, actualFee: u128, tip: u128], {
1364
+ who: AccountId32;
1365
+ actualFee: u128;
1366
+ tip: u128;
1367
+ }>;
1368
+ /**
1369
+ * Generic event
1370
+ **/
1371
+ [key: string]: AugmentedEvent<ApiType>;
1372
+ };
1352
1373
  treasury: {
1353
1374
  /**
1354
1375
  * Some funds have been allocated.
@@ -1389,6 +1410,14 @@ declare module '@polkadot/api-base/types/events' {
1389
1410
  Rollover: AugmentedEvent<ApiType, [rolloverBalance: u128], {
1390
1411
  rolloverBalance: u128;
1391
1412
  }>;
1413
+ /**
1414
+ * A new spend proposal has been approved.
1415
+ **/
1416
+ SpendApproved: AugmentedEvent<ApiType, [proposalIndex: u32, amount: u128, beneficiary: AccountId32], {
1417
+ proposalIndex: u32;
1418
+ amount: u128;
1419
+ beneficiary: AccountId32;
1420
+ }>;
1392
1421
  /**
1393
1422
  * We have ended a spend period and will now allocate funds.
1394
1423
  **/
package/polkadot/tx.d.ts CHANGED
@@ -1551,12 +1551,17 @@ declare module '@polkadot/api-base/types/submittable' {
1551
1551
  };
1552
1552
  grandpa: {
1553
1553
  /**
1554
- * Note that the current authority set of the GRANDPA finality gadget has
1555
- * stalled. This will trigger a forced authority set change at the beginning
1556
- * of the next session, to be enacted `delay` blocks after that. The delay
1557
- * should be high enough to safely assume that the block signalling the
1558
- * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters
1559
- * will start the new authority set using the given finalized block as base.
1554
+ * Note that the current authority set of the GRANDPA finality gadget has stalled.
1555
+ *
1556
+ * This will trigger a forced authority set change at the beginning of the next session, to
1557
+ * be enacted `delay` blocks after that. The `delay` should be high enough to safely assume
1558
+ * that the block signalling the forced change will not be re-orged e.g. 1000 blocks.
1559
+ * The block production rate (which may be slowed down because of finality lagging) should
1560
+ * be taken into account when choosing the `delay`. The GRANDPA voters based on the new
1561
+ * authority will start voting on top of `best_finalized_block_number` for new finalized
1562
+ * blocks. `best_finalized_block_number` should be the highest of the latest finalized
1563
+ * block of all validators of the new authority set.
1564
+ *
1560
1565
  * Only callable by root.
1561
1566
  **/
1562
1567
  noteStalled: AugmentedSubmittable<(delay: u32 | AnyNumber | Uint8Array, bestFinalizedBlockNumber: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
@@ -4009,6 +4014,27 @@ declare module '@polkadot/api-base/types/submittable' {
4009
4014
  * exist altogether, thus there is no way it would have been approved in the first place.
4010
4015
  **/
4011
4016
  removeApproval: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
4017
+ /**
4018
+ * Propose and approve a spend of treasury funds.
4019
+ *
4020
+ * - `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`.
4021
+ * - `amount`: The amount to be transferred from the treasury to the `beneficiary`.
4022
+ * - `beneficiary`: The destination account for the transfer.
4023
+ *
4024
+ * NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the
4025
+ * beneficiary.
4026
+ **/
4027
+ spend: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, beneficiary: MultiAddress | {
4028
+ Id: any;
4029
+ } | {
4030
+ Index: any;
4031
+ } | {
4032
+ Raw: any;
4033
+ } | {
4034
+ Address32: any;
4035
+ } | {
4036
+ Address20: any;
4037
+ } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, MultiAddress]>;
4012
4038
  /**
4013
4039
  * Generic tx
4014
4040
  **/