@argonprotocol/mainchain 1.4.12-dev.dd86fab9 → 1.4.12-dev.ece9349b

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.
@@ -64,9 +64,11 @@ import type {
64
64
  PalletBalancesBalanceLock,
65
65
  PalletBalancesReserveData,
66
66
  PalletBitcoinFissionsFission,
67
+ PalletBitcoinLocksLockReleaseCosignHeight,
67
68
  PalletBitcoinLocksLockReleaseRequest,
68
69
  PalletBitcoinLocksLockedBitcoin,
69
70
  PalletBitcoinLocksOrphanedUtxo,
71
+ PalletBitcoinLocksPendingPartialRelease,
70
72
  PalletBootstrapEndpointPubkey,
71
73
  PalletBootstrapRecoveryPubkey,
72
74
  PalletCrosschainTransferAccountTransferTotals,
@@ -93,7 +95,7 @@ import type {
93
95
  PalletMiningSlotMinerNonceScoring,
94
96
  PalletMintMintAction,
95
97
  PalletMintMintQueueCursor,
96
- PalletMintPendingMintUtxo,
98
+ PalletMintPendingBitcoinMint,
97
99
  PalletMultisigMultisig,
98
100
  PalletOperationalAccountsOperationalAccount,
99
101
  PalletOperationalAccountsRewardsConfig,
@@ -249,9 +251,9 @@ declare module '@polkadot/api-base/types/storage' {
249
251
  [u32, AccountId32]
250
252
  >;
251
253
  /**
252
- * Highest Bitcoin UTXO sync height processed for pending-funding expirations.
254
+ * Highest Bitcoin UTXO sync height processed for securitization hold expirations.
253
255
  **/
254
- lastPendingFundingExpirationHeight: AugmentedQuery<
256
+ lastProcessedSecuritizationHoldBitcoinHeight: AugmentedQuery<
255
257
  ApiType,
256
258
  () => Observable<Option<u64>>,
257
259
  []
@@ -274,38 +276,53 @@ declare module '@polkadot/api-base/types/storage' {
274
276
  [u64]
275
277
  >;
276
278
  /**
277
- * Stores the block number where a release was cosigned by the vault.
279
+ * Index of active UTXO IDs per owner account.
278
280
  **/
279
- lockReleaseCosignHeightById: AugmentedQuery<
281
+ lockIdsByOwnerAccount: AugmentedQuery<
280
282
  ApiType,
281
- (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<u32>>,
282
- [u64]
283
+ (
284
+ arg1: AccountId32 | string | Uint8Array,
285
+ arg2: u64 | AnyNumber | Uint8Array,
286
+ ) => Observable<Option<Null>>,
287
+ [AccountId32, u64]
288
+ >;
289
+ /**
290
+ * Index of active UTXO IDs per vault
291
+ **/
292
+ lockIdsByVaultId: AugmentedQuery<
293
+ ApiType,
294
+ (
295
+ arg1: u32 | AnyNumber | Uint8Array,
296
+ arg2: u64 | AnyNumber | Uint8Array,
297
+ ) => Observable<Option<Null>>,
298
+ [u32, u64]
283
299
  >;
284
300
  /**
285
- * Stores bitcoin locks that have requested to be released
301
+ * Latest cosigned release for each Lock, retained for signature recovery.
286
302
  **/
287
- lockReleaseRequestsByUtxoId: AugmentedQuery<
303
+ lockReleaseCosignHeightById: AugmentedQuery<
288
304
  ApiType,
289
305
  (
290
306
  arg: u64 | AnyNumber | Uint8Array,
291
- ) => Observable<Option<PalletBitcoinLocksLockReleaseRequest>>,
307
+ ) => Observable<Option<PalletBitcoinLocksLockReleaseCosignHeight>>,
292
308
  [u64]
293
309
  >;
294
310
  /**
295
- * Stores bitcoin utxos that have requested to be released
311
+ * Release requests awaiting a Vault cosignature.
296
312
  **/
297
- locksByUtxoId: AugmentedQuery<
313
+ lockReleaseRequestsById: AugmentedQuery<
298
314
  ApiType,
299
- (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletBitcoinLocksLockedBitcoin>>,
315
+ (
316
+ arg: u64 | AnyNumber | Uint8Array,
317
+ ) => Observable<Option<PalletBitcoinLocksLockReleaseRequest>>,
300
318
  [u64]
301
319
  >;
302
320
  /**
303
- * Unfunded locks whose pending securitization reservation expires at the indexed height.
304
- * Expiry releases the reservation but leaves the lock address watched for late orphan output.
321
+ * Stores bitcoin utxos that have requested to be released
305
322
  **/
306
- locksPendingFundingByBitcoinHeight: AugmentedQuery<
323
+ locksById: AugmentedQuery<
307
324
  ApiType,
308
- (arg: u64 | AnyNumber | Uint8Array) => Observable<BTreeSet<u64>>,
325
+ (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletBitcoinLocksLockedBitcoin>>,
309
326
  [u64]
310
327
  >;
311
328
  /**
@@ -316,22 +333,11 @@ declare module '@polkadot/api-base/types/storage' {
316
333
  () => Observable<Vec<ITuple<[u64, u128]>>>,
317
334
  []
318
335
  >;
319
- /**
320
- * Release amounts identified by the version 10 to 11 migration.
321
- *
322
- * Current release requests do not create currency holds. Each migrated entry is removed when
323
- * its in-flight release request terminates.
324
- **/
325
- migratedReleaseHoldByUtxoId: AugmentedQuery<
326
- ApiType,
327
- (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<u128>>,
328
- [u64]
329
- >;
330
336
  /**
331
337
  * The minimum number of satoshis accepted in one watched funding UTXO.
332
338
  **/
333
339
  minimumSatoshis: AugmentedQuery<ApiType, () => Observable<u64>, []>;
334
- nextUtxoId: AugmentedQuery<ApiType, () => Observable<Option<u64>>, []>;
340
+ nextBitcoinLockId: AugmentedQuery<ApiType, () => Observable<Option<u64>>, []>;
335
341
  /**
336
342
  * Expiration of orphaned utxo refs by user account
337
343
  **/
@@ -358,33 +364,22 @@ declare module '@polkadot/api-base/types/storage' {
358
364
  [AccountId32, ArgonPrimitivesBitcoinUtxoRef]
359
365
  >;
360
366
  /**
361
- * Index of active UTXO IDs per owner account.
362
- **/
363
- utxoIdsByOwnerAccount: AugmentedQuery<
364
- ApiType,
365
- (
366
- arg1: AccountId32 | string | Uint8Array,
367
- arg2: u64 | AnyNumber | Uint8Array,
368
- ) => Observable<Option<Null>>,
369
- [AccountId32, u64]
370
- >;
371
- /**
372
- * Index of active UTXO IDs per vault
367
+ * Cosigned partial releases awaiting confirmation on Bitcoin.
373
368
  **/
374
- utxoIdsByVaultId: AugmentedQuery<
369
+ pendingPartialReleaseByLockId: AugmentedQuery<
375
370
  ApiType,
376
371
  (
377
- arg1: u32 | AnyNumber | Uint8Array,
378
- arg2: u64 | AnyNumber | Uint8Array,
379
- ) => Observable<Option<Null>>,
380
- [u32, u64]
372
+ arg: u64 | AnyNumber | Uint8Array,
373
+ ) => Observable<Option<PalletBitcoinLocksPendingPartialRelease>>,
374
+ [u64]
381
375
  >;
382
376
  /**
383
- * The utxo funding this lock. In the current runtime, this is just the first utxo received
377
+ * Lock IDs whose securitization hold expires at the indexed Bitcoin height.
378
+ * Expiry releases only the unactivated portion and leaves the lock address watched.
384
379
  **/
385
- utxoIdToFundingUtxoRef: AugmentedQuery<
380
+ securitizationHoldExpirationsByBitcoinHeight: AugmentedQuery<
386
381
  ApiType,
387
- (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<ArgonPrimitivesBitcoinUtxoRef>>,
382
+ (arg: u64 | AnyNumber | Uint8Array) => Observable<BTreeSet<u64>>,
388
383
  [u64]
389
384
  >;
390
385
  };
@@ -409,6 +404,20 @@ declare module '@polkadot/api-base/types/storage' {
409
404
  * Check if the inherent was included
410
405
  **/
411
406
  inherentIncluded: AugmentedQuery<ApiType, () => Observable<bool>, []>;
407
+ /**
408
+ * The Lock ID identified by each watched script pubkey.
409
+ **/
410
+ lockIdByScriptPubkey: AugmentedQuery<
411
+ ApiType,
412
+ (
413
+ arg:
414
+ | ArgonPrimitivesBitcoinBitcoinCosignScriptPubkey
415
+ | { P2WSH: any }
416
+ | string
417
+ | Uint8Array,
418
+ ) => Observable<Option<u64>>,
419
+ [ArgonPrimitivesBitcoinBitcoinCosignScriptPubkey]
420
+ >;
412
421
  /**
413
422
  * Bitcoin Oracle Operator Account
414
423
  **/
@@ -433,31 +442,17 @@ declare module '@polkadot/api-base/types/storage' {
433
442
  /**
434
443
  * Watched Lock addresses and the scan height needed to observe them.
435
444
  **/
436
- utxoAddressByUtxoId: AugmentedQuery<
445
+ utxoAddressByLockId: AugmentedQuery<
437
446
  ApiType,
438
447
  (
439
448
  arg: u64 | AnyNumber | Uint8Array,
440
449
  ) => Observable<Option<ArgonPrimitivesBitcoinUtxoAddress>>,
441
450
  [u64]
442
451
  >;
443
- /**
444
- * The Lock ID identified by each watched script pubkey.
445
- **/
446
- utxoIdByScriptPubkey: AugmentedQuery<
447
- ApiType,
448
- (
449
- arg:
450
- | ArgonPrimitivesBitcoinBitcoinCosignScriptPubkey
451
- | { P2WSH: any }
452
- | string
453
- | Uint8Array,
454
- ) => Observable<Option<u64>>,
455
- [ArgonPrimitivesBitcoinBitcoinCosignScriptPubkey]
456
- >;
457
452
  /**
458
453
  * Every output observed at a watched Lock address, retained until explicitly removed.
459
454
  **/
460
- utxoRefsByUtxoId: AugmentedQuery<
455
+ utxoRefsByLockId: AugmentedQuery<
461
456
  ApiType,
462
457
  (arg: u64 | AnyNumber | Uint8Array) => Observable<BTreeSet<ArgonPrimitivesBitcoinUtxoRef>>,
463
458
  [u64]
@@ -1216,33 +1211,33 @@ declare module '@polkadot/api-base/types/storage' {
1216
1211
  /**
1217
1212
  * The next monotonic queue index to assign to a pending bitcoin mint.
1218
1213
  **/
1219
- nextPendingMintUtxoIndex: AugmentedQuery<ApiType, () => Observable<u64>, []>;
1214
+ nextPendingBitcoinMintIndex: AugmentedQuery<ApiType, () => Observable<u64>, []>;
1220
1215
  /**
1221
- * Queue bookkeeping for pending bitcoin mints, including the bounded payout start and the
1222
- * current frame scan cursor.
1216
+ * Bitcoin UTXOs that have been submitted for minting, keyed by a monotonic queue index so
1217
+ * payouts can preserve FIFO order while each frame works through a fixed payout cohort.
1223
1218
  **/
1224
- pendingMintQueueState: AugmentedQuery<
1219
+ pendingBitcoinMintsByIndex: AugmentedQuery<
1225
1220
  ApiType,
1226
- () => Observable<PalletMintMintQueueCursor>,
1227
- []
1221
+ (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletMintPendingBitcoinMint>>,
1222
+ [u64]
1228
1223
  >;
1229
1224
  /**
1230
1225
  * Reverse lookup from bitcoin UTXO id to all queued mint indices for direct removal and
1231
1226
  * client lookup.
1232
1227
  **/
1233
- pendingMintUtxoIdLookup: AugmentedQuery<
1228
+ pendingMintIndicesByLockId: AugmentedQuery<
1234
1229
  ApiType,
1235
1230
  (arg: u64 | AnyNumber | Uint8Array) => Observable<Vec<u64>>,
1236
1231
  [u64]
1237
1232
  >;
1238
1233
  /**
1239
- * Bitcoin UTXOs that have been submitted for minting, keyed by a monotonic queue index so
1240
- * payouts can preserve FIFO order while each frame works through a fixed payout cohort.
1234
+ * Queue bookkeeping for pending bitcoin mints, including the bounded payout start and the
1235
+ * current frame scan cursor.
1241
1236
  **/
1242
- pendingMintUtxosByIndex: AugmentedQuery<
1237
+ pendingMintQueueState: AugmentedQuery<
1243
1238
  ApiType,
1244
- (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletMintPendingMintUtxo>>,
1245
- [u64]
1239
+ () => Observable<PalletMintMintQueueCursor>,
1240
+ []
1246
1241
  >;
1247
1242
  };
1248
1243
  multisig: {
@@ -38,7 +38,7 @@ import type {
38
38
  ArgonPrimitivesBitcoinUtxoRef,
39
39
  ArgonPrimitivesDomainZoneRecord,
40
40
  ArgonPrimitivesEthereumEthereumReceiptLogProofBatch,
41
- ArgonPrimitivesInherentsBitcoinUtxoSync,
41
+ ArgonPrimitivesInherentsBitcoinUtxoSyncV2,
42
42
  ArgonPrimitivesInherentsBlockSealInherent,
43
43
  ArgonPrimitivesNotaryNotaryMeta,
44
44
  ArgonPrimitivesNotebookSignedNotebookHeader,
@@ -295,7 +295,7 @@ declare module '@polkadot/api-base/types/submittable' {
295
295
  (
296
296
  fissionId: Compact<u64> | AnyNumber | Uint8Array,
297
297
  liquidId: Compact<u64> | AnyNumber | Uint8Array,
298
- utxoId: Compact<u64> | AnyNumber | Uint8Array,
298
+ lockId: Compact<u64> | AnyNumber | Uint8Array,
299
299
  satoshis: Compact<u64> | AnyNumber | Uint8Array,
300
300
  microgonsAtTargetPerBtc: Compact<u128> | AnyNumber | Uint8Array,
301
301
  ) => SubmittableExtrinsic<ApiType>,
@@ -339,18 +339,19 @@ declare module '@polkadot/api-base/types/submittable' {
339
339
  [AccountId32, ArgonPrimitivesBitcoinUtxoRef, Bytes]
340
340
  >;
341
341
  /**
342
- * Submitted by a Vault operator to cosign the release of a bitcoin UTXO. The Lock's
343
- * securitization will be scheduled for release without a penalty.
342
+ * Submitted by a Vault operator to cosign every input in a Bitcoin Lock release. The
343
+ * signatures must follow ascending `UtxoRef` order: transaction ID, then output index.
344
+ * The Lock remains frozen until the exact cosigned transaction is observed on Bitcoin.
344
345
  *
345
346
  * This is submitted as a no-fee transaction off chain to allow keys to remain in cold
346
347
  * wallets.
347
348
  **/
348
349
  cosignRelease: AugmentedSubmittable<
349
350
  (
350
- utxoId: u64 | AnyNumber | Uint8Array,
351
- signature: Bytes | string | Uint8Array,
351
+ lockId: u64 | AnyNumber | Uint8Array,
352
+ signatures: Vec<Bytes> | (Bytes | string | Uint8Array)[],
352
353
  ) => SubmittableExtrinsic<ApiType>,
353
- [u64, Bytes]
354
+ [u64, Vec<Bytes>]
354
355
  >;
355
356
  /**
356
357
  * Create a Bitcoin receive address backed by a Lock for the submitting account.
@@ -391,27 +392,28 @@ declare module '@polkadot/api-base/types/submittable' {
391
392
  [ArgonPrimitivesBitcoinUtxoRef, Bytes, u64]
392
393
  >;
393
394
  /**
394
- * Submitted by a Bitcoin holder to trigger the release of their Utxo out of the cosign
395
- * script. A transaction spending the UTXO should be pre-created so that the sighash
396
- * can be submitted here. The vault operator will have 10 days to counter-sign the
397
- * transaction. It will be published with the public key as a BitcoinUtxoCosigned Event.
395
+ * Submitted by a Bitcoin holder to spend every current UTXO in a Lock. The exact external
396
+ * amount and network fee determine whether the transaction fully releases the Lock or
397
+ * returns one consolidated change output to the same Lock script. The vault operator has
398
+ * 10 days to publish one signature per frozen input in a BitcoinUtxoCosigned event.
398
399
  *
399
400
  * Owner must submit a script pubkey and also a fee to pay to the bitcoin network.
400
401
  **/
401
402
  requestRelease: AugmentedSubmittable<
402
403
  (
403
- utxoId: u64 | AnyNumber | Uint8Array,
404
+ lockId: u64 | AnyNumber | Uint8Array,
404
405
  toScriptPubkey: Bytes | string | Uint8Array,
406
+ destinationSatoshis: u64 | AnyNumber | Uint8Array,
405
407
  bitcoinNetworkFee: u64 | AnyNumber | Uint8Array,
406
408
  ) => SubmittableExtrinsic<ApiType>,
407
- [u64, Bytes, u64]
409
+ [u64, Bytes, u64, u64]
408
410
  >;
409
411
  /**
410
412
  * Replace this Lock's BTC coverage and target value for its remaining term.
411
413
  **/
412
414
  resecuritize: AugmentedSubmittable<
413
415
  (
414
- utxoId: u64 | AnyNumber | Uint8Array,
416
+ lockId: u64 | AnyNumber | Uint8Array,
415
417
  satoshis: Compact<u64> | AnyNumber | Uint8Array,
416
418
  options:
417
419
  | Option<PalletBitcoinLocksLockOptions>
@@ -425,7 +427,7 @@ declare module '@polkadot/api-base/types/submittable' {
425
427
  >;
426
428
  setFlexible: AugmentedSubmittable<
427
429
  (
428
- utxoId: u64 | AnyNumber | Uint8Array,
430
+ lockId: u64 | AnyNumber | Uint8Array,
429
431
  isFlexible: bool | boolean | Uint8Array,
430
432
  ) => SubmittableExtrinsic<ApiType>,
431
433
  [u64, bool]
@@ -462,12 +464,12 @@ declare module '@polkadot/api-base/types/submittable' {
462
464
  sync: AugmentedSubmittable<
463
465
  (
464
466
  utxoSync:
465
- | ArgonPrimitivesInherentsBitcoinUtxoSync
467
+ | ArgonPrimitivesInherentsBitcoinUtxoSyncV2
466
468
  | { spent?: any; funded?: any; syncToBlock?: any }
467
469
  | string
468
470
  | Uint8Array,
469
471
  ) => SubmittableExtrinsic<ApiType>,
470
- [ArgonPrimitivesInherentsBitcoinUtxoSync]
472
+ [ArgonPrimitivesInherentsBitcoinUtxoSyncV2]
471
473
  >;
472
474
  };
473
475
  blockRewards: {