@argonprotocol/mainchain 1.4.10-dev.925a902e → 1.4.10-dev.a229760e

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@argonprotocol/mainchain",
3
- "version": "1.4.10-dev.925a902e",
3
+ "version": "1.4.10-dev.a229760e",
4
4
  "description": "A client for accessing the Argon mainchain apis.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -65,7 +65,7 @@
65
65
  },
66
66
  "devDependencies": {
67
67
  "@argonprotocol/ethereum-contracts": "workspace:*",
68
- "@argonprotocol/testing": "1.4.10-dev.925a902e",
68
+ "@argonprotocol/testing": "1.4.10-dev.a229760e",
69
69
  "@polkadot/typegen": "^16.5.6",
70
70
  "@substrate/ss58-registry": "^1.51.0",
71
71
  "@types/node": "^20",
@@ -160,6 +160,12 @@ declare module '@polkadot/api-base/types/consts' {
160
160
  **/
161
161
  targetBlockVotes: u128 & AugmentedConst<ApiType>;
162
162
  };
163
+ bootstrap: {
164
+ /**
165
+ * Maximum number of bytes in an encrypted recovery or endpoint payload.
166
+ **/
167
+ maxEncryptedPayloadLen: u32 & AugmentedConst<ApiType>;
168
+ };
163
169
  crosschainTransfer: {
164
170
  /**
165
171
  * Minimum remaining frame commitment required when reading vault committed collateral
@@ -373,10 +379,6 @@ declare module '@polkadot/api-base/types/consts' {
373
379
  * Maximum number of available access codes allowed at once.
374
380
  **/
375
381
  maxAvailableAccessCodes: u32 & AugmentedConst<ApiType>;
376
- /**
377
- * Maximum number of encrypted server bytes stored per network account.
378
- **/
379
- maxEncryptedServerLen: u32 & AugmentedConst<ApiType>;
380
382
  /**
381
383
  * Minimum bitcoin amount required to register.
382
384
  **/
@@ -352,6 +352,20 @@ declare module '@polkadot/api-base/types/errors' {
352
352
  **/
353
353
  MaxNotebooksAtTickExceeded: AugmentedError<ApiType>;
354
354
  };
355
+ bootstrap: {
356
+ /**
357
+ * The encrypted payload exceeds [`Config::MaxEncryptedPayloadLen`].
358
+ **/
359
+ EncryptedPayloadTooLong: AugmentedError<ApiType>;
360
+ /**
361
+ * The endpoint public key is already owned by a different account.
362
+ **/
363
+ EndpointOwnedByAnotherAccount: AugmentedError<ApiType>;
364
+ /**
365
+ * The recovery proof does not authorize this writer, public key, and payload.
366
+ **/
367
+ InvalidRecoveryProof: AugmentedError<ApiType>;
368
+ };
355
369
  crosschainTransfer: {
356
370
  /**
357
371
  * The force-set cut would discard a queue entry that already has local quorum.
@@ -990,10 +1004,6 @@ declare module '@polkadot/api-base/types/errors' {
990
1004
  * An account cannot grant access to itself.
991
1005
  **/
992
1006
  CannotGrantAccessToSelf: AugmentedError<ApiType>;
993
- /**
994
- * The encrypted server payload exceeds the configured max length.
995
- **/
996
- EncryptedServerTooLong: AugmentedError<ApiType>;
997
1007
  /**
998
1008
  * The upstream access proof is invalid.
999
1009
  **/
@@ -1026,10 +1036,6 @@ declare module '@polkadot/api-base/types/errors' {
1026
1036
  * The requested account has not registered operational accounts.
1027
1037
  **/
1028
1038
  NotOperationalAccount: AugmentedError<ApiType>;
1029
- /**
1030
- * The caller is not the upstream account for the requested downstream account.
1031
- **/
1032
- NotUpstreamOfDownstream: AugmentedError<ApiType>;
1033
1039
  /**
1034
1040
  * A valid invite is required to register an operational account.
1035
1041
  **/
@@ -1228,6 +1234,10 @@ declare module '@polkadot/api-base/types/errors' {
1228
1234
  * The bond lot is already scheduled for release.
1229
1235
  **/
1230
1236
  BondLotAlreadyReleasing: AugmentedError<ApiType>;
1237
+ /**
1238
+ * Only an active vault bond owned by its operator can be used as backfill.
1239
+ **/
1240
+ BondLotNotEligibleForBackfill: AugmentedError<ApiType>;
1231
1241
  /**
1232
1242
  * The bond lot could not be found.
1233
1243
  **/
@@ -1276,6 +1286,10 @@ declare module '@polkadot/api-base/types/errors' {
1276
1286
  * Too many bond lot releases are scheduled for the same frame.
1277
1287
  **/
1278
1288
  MaxPendingBondReleasesExceeded: AugmentedError<ApiType>;
1289
+ /**
1290
+ * The caller does not have permission to perform this action.
1291
+ **/
1292
+ NoPermissions: AugmentedError<ApiType>;
1279
1293
  /**
1280
1294
  * The caller does not own the bond lot.
1281
1295
  **/
@@ -38,6 +38,8 @@ import type {
38
38
  FrameSupportTokensMiscBalanceStatus,
39
39
  FrameSystemDispatchEventInfo,
40
40
  PalletBalancesUnexpectedKind,
41
+ PalletBootstrapEndpointPubkey,
42
+ PalletBootstrapRecoveryPubkey,
41
43
  PalletCrosschainTransferAssetKind,
42
44
  PalletCrosschainTransferCouncilApprovalTargetId,
43
45
  PalletCrosschainTransferGatewayState,
@@ -315,6 +317,11 @@ declare module '@polkadot/api-base/types/events' {
315
317
  [utxoId: u64, vaultId: u32, compensationAmount: u128, compensatedAccountId: AccountId32],
316
318
  { utxoId: u64; vaultId: u32; compensationAmount: u128; compensatedAccountId: AccountId32 }
317
319
  >;
320
+ BitcoinLockBackfillChanged: AugmentedEvent<
321
+ ApiType,
322
+ [utxoId: u64, vaultId: u32, isBackfill: bool],
323
+ { utxoId: u64; vaultId: u32; isBackfill: bool }
324
+ >;
318
325
  BitcoinLockBurned: AugmentedEvent<
319
326
  ApiType,
320
327
  [utxoId: u64, vaultId: u32, wasUtxoSpent: bool],
@@ -530,6 +537,24 @@ declare module '@polkadot/api-base/types/events' {
530
537
  }
531
538
  >;
532
539
  };
540
+ bootstrap: {
541
+ /**
542
+ * An encrypted endpoint payload was stored or replaced by its owner.
543
+ **/
544
+ EndpointUpdated: AugmentedEvent<
545
+ ApiType,
546
+ [endpointOwner: AccountId32, endpointPubkey: PalletBootstrapEndpointPubkey],
547
+ { endpointOwner: AccountId32; endpointPubkey: PalletBootstrapEndpointPubkey }
548
+ >;
549
+ /**
550
+ * An encrypted recovery payload was stored or replaced.
551
+ **/
552
+ RecoveryPayloadUpdated: AugmentedEvent<
553
+ ApiType,
554
+ [writer: AccountId32, recoveryPubkey: PalletBootstrapRecoveryPubkey],
555
+ { writer: AccountId32; recoveryPubkey: PalletBootstrapRecoveryPubkey }
556
+ >;
557
+ };
533
558
  crosschainTransfer: {
534
559
  /**
535
560
  * An account registered its council signer for one destination chain.
@@ -1273,14 +1298,6 @@ declare module '@polkadot/api-base/types/events' {
1273
1298
  [account: AccountId32],
1274
1299
  { account: AccountId32 }
1275
1300
  >;
1276
- /**
1277
- * An upstream account updated the encrypted server payload for a downstream account.
1278
- **/
1279
- EncryptedServerUpdated: AugmentedEvent<
1280
- ApiType,
1281
- [upstreamAccount: AccountId32, downstreamAccount: AccountId32],
1282
- { upstreamAccount: AccountId32; downstreamAccount: AccountId32 }
1283
- >;
1284
1301
  /**
1285
1302
  * An operational account was registered with its linked accounts.
1286
1303
  **/
@@ -1830,6 +1847,16 @@ declare module '@polkadot/api-base/types/events' {
1830
1847
  >;
1831
1848
  };
1832
1849
  treasury: {
1850
+ BackfillBondsReservedChanged: AugmentedEvent<
1851
+ ApiType,
1852
+ [vaultId: u32, backfillBondsReserved: u32],
1853
+ { vaultId: u32; backfillBondsReserved: u32 }
1854
+ >;
1855
+ BondLotBackfillChanged: AugmentedEvent<
1856
+ ApiType,
1857
+ [vaultId: u32, bondLotId: u64, isBackfill: bool],
1858
+ { vaultId: u32; bondLotId: u64; isBackfill: bool }
1859
+ >;
1833
1860
  /**
1834
1861
  * A bond purchase entered its active program set.
1835
1862
  **/
@@ -2074,6 +2101,11 @@ declare module '@polkadot/api-base/types/events' {
2074
2101
  >;
2075
2102
  };
2076
2103
  vaults: {
2104
+ BackfillSecuritizationReservedChanged: AugmentedEvent<
2105
+ ApiType,
2106
+ [vaultId: u32, backfillSecuritizationReserved: u128],
2107
+ { vaultId: u32; backfillSecuritizationReserved: u128 }
2108
+ >;
2077
2109
  CommittedArgonotsSet: AugmentedEvent<
2078
2110
  ApiType,
2079
2111
  [vaultId: u32, operatorAccountId: AccountId32, amount: u128],
@@ -66,6 +66,8 @@ import type {
66
66
  PalletBitcoinLocksLockReleaseRequest,
67
67
  PalletBitcoinLocksLockedBitcoin,
68
68
  PalletBitcoinLocksOrphanedUtxo,
69
+ PalletBootstrapEndpointPubkey,
70
+ PalletBootstrapRecoveryPubkey,
69
71
  PalletCrosschainTransferAccountTransferTotals,
70
72
  PalletCrosschainTransferChainConfig,
71
73
  PalletCrosschainTransferCouncilApprovalQueueEntry,
@@ -104,6 +106,7 @@ import type {
104
106
  PalletTreasuryBondLotSummary,
105
107
  PalletTreasuryFrameArgonotBondParticipants,
106
108
  PalletTreasuryFrameVaultCapital,
109
+ PalletTreasuryVaultBondState,
107
110
  PalletVaultsRecentCapacityDrop,
108
111
  PalletVaultsVaultFrameRevenue,
109
112
  SpConsensusGrandpaAppPublic,
@@ -512,6 +515,40 @@ declare module '@polkadot/api-base/types/storage' {
512
515
  **/
513
516
  voteMinimumHistory: AugmentedQuery<ApiType, () => Observable<Vec<u128>>, []>;
514
517
  };
518
+ bootstrap: {
519
+ /**
520
+ * Encrypted endpoint payload keyed by its public key.
521
+ *
522
+ * The pallet enforces ownership and length but does not parse or verify encryption.
523
+ **/
524
+ encryptedEndpointByPubkey: AugmentedQuery<
525
+ ApiType,
526
+ (arg: PalletBootstrapEndpointPubkey | string | Uint8Array) => Observable<Option<Bytes>>,
527
+ [PalletBootstrapEndpointPubkey]
528
+ >;
529
+ /**
530
+ * Encrypted recovery payload authorized by the corresponding recovery key.
531
+ *
532
+ * The pallet enforces authorization and length but does not parse or verify encryption.
533
+ **/
534
+ encryptedRecoveryPayloadByPubkey: AugmentedQuery<
535
+ ApiType,
536
+ (arg: PalletBootstrapRecoveryPubkey | string | Uint8Array) => Observable<Option<Bytes>>,
537
+ [PalletBootstrapRecoveryPubkey]
538
+ >;
539
+ /**
540
+ * Account authorized to update an encrypted endpoint payload.
541
+ *
542
+ * The first successful [`Pallet::set_endpoint`] call for a public key establishes its owner.
543
+ **/
544
+ endpointOwnerByPubkey: AugmentedQuery<
545
+ ApiType,
546
+ (
547
+ arg: PalletBootstrapEndpointPubkey | string | Uint8Array,
548
+ ) => Observable<Option<AccountId32>>,
549
+ [PalletBootstrapEndpointPubkey]
550
+ >;
551
+ };
515
552
  crosschainTransfer: {
516
553
  /**
517
554
  * The active Global Issuance Council hash in force for each destination chain.
@@ -1271,14 +1308,6 @@ declare module '@polkadot/api-base/types/storage' {
1271
1308
  >;
1272
1309
  };
1273
1310
  operationalAccounts: {
1274
- /**
1275
- * Opaque encrypted upstream server payload keyed by the downstream account.
1276
- **/
1277
- encryptedServerByDownstreamAccount: AugmentedQuery<
1278
- ApiType,
1279
- (arg: AccountId32 | string | Uint8Array) => Observable<Option<Bytes>>,
1280
- [AccountId32]
1281
- >;
1282
1311
  /**
1283
1312
  * Whether operational-account access is invite-only.
1284
1313
  *
@@ -1659,7 +1688,8 @@ declare module '@polkadot/api-base/types/storage' {
1659
1688
  };
1660
1689
  treasury: {
1661
1690
  /**
1662
- * The active top Argonot bond lots kept in ascending bond order, then lower ids first.
1691
+ * The active Argonot set keeps the smallest bond amount first, then lower ids first when
1692
+ * amounts tie.
1663
1693
  **/
1664
1694
  argonotBondLots: AugmentedQuery<
1665
1695
  ApiType,
@@ -1686,13 +1716,15 @@ declare module '@polkadot/api-base/types/storage' {
1686
1716
  [AccountId32, u64]
1687
1717
  >;
1688
1718
  /**
1689
- * The accepted bond lots for a vault.
1719
+ * The active bond state for a vault.
1690
1720
  *
1691
- * Lots are kept in descending bond order, then lower `bond_lot_id` first for ties.
1721
+ * The bounded payout set keeps the largest bond amount first, then lower `bond_lot_id` first
1722
+ * when amounts tie. Backfill lots remain in `BondLotById` and are represented here by their
1723
+ * aggregate.
1692
1724
  **/
1693
1725
  bondLotsByVault: AugmentedQuery<
1694
1726
  ApiType,
1695
- (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<PalletTreasuryBondLotSummary>>,
1727
+ (arg: u32 | AnyNumber | Uint8Array) => Observable<PalletTreasuryVaultBondState>,
1696
1728
  [u32]
1697
1729
  >;
1698
1730
  /**
@@ -49,6 +49,9 @@ import type {
49
49
  ArgonRuntimeSessionKeys,
50
50
  PalletBalancesAdjustmentDirection,
51
51
  PalletBitcoinLocksLockOptions,
52
+ PalletBootstrapEndpointPubkey,
53
+ PalletBootstrapRecoveryProof,
54
+ PalletBootstrapRecoveryPubkey,
52
55
  PalletCrosschainTransferAssetKind,
53
56
  PalletCrosschainTransferChainConfig,
54
57
  PalletCrosschainTransferMintingAuthorityActivationRepaymentPricing,
@@ -366,6 +369,7 @@ declare module '@polkadot/api-base/types/submittable' {
366
369
  | PalletBitcoinLocksLockOptions
367
370
  | { V1: any }
368
371
  | string,
372
+ backfillSecuritizationToUnreserve: Compact<u128> | AnyNumber | Uint8Array,
369
373
  ) => SubmittableExtrinsic<ApiType>,
370
374
  [
371
375
  AccountId32,
@@ -373,6 +377,7 @@ declare module '@polkadot/api-base/types/submittable' {
373
377
  Compact<u64>,
374
378
  ArgonPrimitivesBitcoinCompressedBitcoinPubkey,
375
379
  Option<PalletBitcoinLocksLockOptions>,
380
+ Compact<u128>,
376
381
  ]
377
382
  >;
378
383
  /**
@@ -432,6 +437,13 @@ declare module '@polkadot/api-base/types/submittable' {
432
437
  ) => SubmittableExtrinsic<ApiType>,
433
438
  [u64, Bytes, u64]
434
439
  >;
440
+ setAsBackfill: AugmentedSubmittable<
441
+ (
442
+ utxoId: u64 | AnyNumber | Uint8Array,
443
+ isBackfill: bool | boolean | Uint8Array,
444
+ ) => SubmittableExtrinsic<ApiType>,
445
+ [u64, bool]
446
+ >;
435
447
  };
436
448
  bitcoinUtxos: {
437
449
  /**
@@ -535,6 +547,35 @@ declare module '@polkadot/api-base/types/submittable' {
535
547
  [Option<u128>, Option<u128>]
536
548
  >;
537
549
  };
550
+ bootstrap: {
551
+ /**
552
+ * Store or replace an encrypted endpoint payload.
553
+ *
554
+ * The first writer for `endpoint_pubkey` becomes its owner. Later updates require the
555
+ * same signing account.
556
+ **/
557
+ setEndpoint: AugmentedSubmittable<
558
+ (
559
+ endpointPubkey: PalletBootstrapEndpointPubkey | string | Uint8Array,
560
+ encryptedEndpoint: Bytes | string | Uint8Array,
561
+ ) => SubmittableExtrinsic<ApiType>,
562
+ [PalletBootstrapEndpointPubkey, Bytes]
563
+ >;
564
+ /**
565
+ * Store or replace an encrypted recovery payload.
566
+ *
567
+ * The proof must be signed by `recovery_pubkey` and binds the submitting `writer`,
568
+ * `recovery_pubkey`, and the encrypted payload hash.
569
+ **/
570
+ setRecoveryPayload: AugmentedSubmittable<
571
+ (
572
+ recoveryPubkey: PalletBootstrapRecoveryPubkey | string | Uint8Array,
573
+ recoveryProof: PalletBootstrapRecoveryProof | { signature?: any } | string | Uint8Array,
574
+ encryptedRecoveryPayload: Bytes | string | Uint8Array,
575
+ ) => SubmittableExtrinsic<ApiType>,
576
+ [PalletBootstrapRecoveryPubkey, PalletBootstrapRecoveryProof, Bytes]
577
+ >;
578
+ };
538
579
  crosschainTransfer: {
539
580
  approveQueueEntries: AugmentedSubmittable<
540
581
  (
@@ -1177,16 +1218,6 @@ declare module '@polkadot/api-base/types/submittable' {
1177
1218
  ) => SubmittableExtrinsic<ApiType>,
1178
1219
  [PalletOperationalAccountsRegistration]
1179
1220
  >;
1180
- /**
1181
- * Store an opaque encrypted upstream server payload for a downstream account.
1182
- **/
1183
- setEncryptedServerForDownstreamAccount: AugmentedSubmittable<
1184
- (
1185
- downstreamAccount: AccountId32 | string | Uint8Array,
1186
- encryptedServer: Bytes | string | Uint8Array,
1187
- ) => SubmittableExtrinsic<ApiType>,
1188
- [AccountId32, Bytes]
1189
- >;
1190
1221
  /**
1191
1222
  * Update certification reward amounts for operational accounts.
1192
1223
  **/
@@ -2023,7 +2054,13 @@ declare module '@polkadot/api-base/types/submittable' {
2023
2054
  | null
2024
2055
  | Uint8Array
2025
2056
  | ArgonPrimitivesVaultTreasuryBonusApprovalProof
2026
- | { vaultId?: any; beneficiary?: any; expiresAtFrame?: any; signature?: any }
2057
+ | {
2058
+ vaultId?: any;
2059
+ beneficiary?: any;
2060
+ expiresAtFrame?: any;
2061
+ backfillBondsToUnreserve?: any;
2062
+ signature?: any;
2063
+ }
2027
2064
  | string,
2028
2065
  ) => SubmittableExtrinsic<ApiType>,
2029
2066
  [u32, u32, Option<ArgonPrimitivesVaultTreasuryBonusApprovalProof>]
@@ -2037,6 +2074,20 @@ declare module '@polkadot/api-base/types/submittable' {
2037
2074
  (bondLotId: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
2038
2075
  [u64]
2039
2076
  >;
2077
+ setBackfillBondsReserved: AugmentedSubmittable<
2078
+ (
2079
+ vaultId: u32 | AnyNumber | Uint8Array,
2080
+ backfillBondsReserved: u32 | AnyNumber | Uint8Array,
2081
+ ) => SubmittableExtrinsic<ApiType>,
2082
+ [u32, u32]
2083
+ >;
2084
+ setBondLotAsBackfill: AugmentedSubmittable<
2085
+ (
2086
+ bondLotId: u64 | AnyNumber | Uint8Array,
2087
+ isBackfill: bool | boolean | Uint8Array,
2088
+ ) => SubmittableExtrinsic<ApiType>,
2089
+ [u64, bool]
2090
+ >;
2040
2091
  };
2041
2092
  txPause: {
2042
2093
  /**
@@ -2320,6 +2371,13 @@ declare module '@polkadot/api-base/types/submittable' {
2320
2371
  ) => SubmittableExtrinsic<ApiType>,
2321
2372
  [u32, ArgonPrimitivesBitcoinOpaqueBitcoinXpub]
2322
2373
  >;
2374
+ setBackfillSecuritizationReserved: AugmentedSubmittable<
2375
+ (
2376
+ vaultId: u32 | AnyNumber | Uint8Array,
2377
+ backfillSecuritizationReserved: u128 | AnyNumber | Uint8Array,
2378
+ ) => SubmittableExtrinsic<ApiType>,
2379
+ [u32, u128]
2380
+ >;
2323
2381
  setCommittedArgonots: AugmentedSubmittable<
2324
2382
  (amount: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
2325
2383
  [Compact<u128>]