@argonprotocol/mainchain 1.4.12 → 1.4.13-dev.01d57087

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.
@@ -30,6 +30,7 @@ import type {
30
30
  H160,
31
31
  H256,
32
32
  MultiAddress,
33
+ Percent,
33
34
  } from '@polkadot/types/interfaces/runtime';
34
35
  import type {
35
36
  ArgonPrimitivesBitcoinCompressedBitcoinPubkey,
@@ -38,7 +39,7 @@ import type {
38
39
  ArgonPrimitivesBitcoinUtxoRef,
39
40
  ArgonPrimitivesDomainZoneRecord,
40
41
  ArgonPrimitivesEthereumEthereumReceiptLogProofBatch,
41
- ArgonPrimitivesInherentsBitcoinUtxoSync,
42
+ ArgonPrimitivesInherentsBitcoinUtxoSyncV2,
42
43
  ArgonPrimitivesInherentsBlockSealInherent,
43
44
  ArgonPrimitivesNotaryNotaryMeta,
44
45
  ArgonPrimitivesNotebookSignedNotebookHeader,
@@ -66,6 +67,7 @@ import type {
66
67
  PalletOperationalAccountsRegistration,
67
68
  PalletPriceIndexEthereumPriceIndex,
68
69
  PalletPriceIndexPriceIndex,
70
+ PalletTreasuryBondLotEarningsMetrics,
69
71
  PalletVaultsVaultConfig,
70
72
  SnowbridgeBeaconPrimitivesBeaconHeader,
71
73
  SpConsensusGrandpaEquivocationProof,
@@ -280,6 +282,38 @@ declare module '@polkadot/api-base/types/submittable' {
280
282
  [Vec<AccountId32>]
281
283
  >;
282
284
  };
285
+ bitcoinFissions: {
286
+ /**
287
+ * Close a Fission without moving Bitcoin and remove its active record.
288
+ **/
289
+ close: AugmentedSubmittable<
290
+ (fissionId: Compact<u64> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
291
+ [Compact<u64>]
292
+ >;
293
+ /**
294
+ * Create a Fission from one owner-held Lock and associate it with a Liquid ID.
295
+ **/
296
+ create: AugmentedSubmittable<
297
+ (
298
+ fissionId: Compact<u64> | AnyNumber | Uint8Array,
299
+ liquidId: Compact<u64> | AnyNumber | Uint8Array,
300
+ lockId: Compact<u64> | AnyNumber | Uint8Array,
301
+ satoshis: Compact<u64> | AnyNumber | Uint8Array,
302
+ microgonsAtTargetPerBtc: Compact<u128> | AnyNumber | Uint8Array,
303
+ ) => SubmittableExtrinsic<ApiType>,
304
+ [Compact<u64>, Compact<u64>, Compact<u64>, Compact<u64>, Compact<u128>]
305
+ >;
306
+ /**
307
+ * Ratchet an active Fission to a replacement target-normalized BTC value.
308
+ **/
309
+ ratchet: AugmentedSubmittable<
310
+ (
311
+ fissionId: Compact<u64> | AnyNumber | Uint8Array,
312
+ microgonsAtTargetPerBtc: Compact<u128> | AnyNumber | Uint8Array,
313
+ ) => SubmittableExtrinsic<ApiType>,
314
+ [Compact<u64>, Compact<u128>]
315
+ >;
316
+ };
283
317
  bitcoinLocks: {
284
318
  adminModifyMinimumLockedSats: AugmentedSubmittable<
285
319
  (satoshis: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
@@ -307,37 +341,27 @@ declare module '@polkadot/api-base/types/submittable' {
307
341
  [AccountId32, ArgonPrimitivesBitcoinUtxoRef, Bytes]
308
342
  >;
309
343
  /**
310
- * Submitted by a Vault operator to cosign the release of a bitcoin utxo. The Bitcoin owner
311
- * release fee will be burned, and the lock will be allowed to expire without a penalty.
344
+ * Submitted by a Vault operator to cosign every input in a Bitcoin Lock release. The
345
+ * signatures must follow ascending `UtxoRef` order: transaction ID, then output index.
346
+ * The Lock remains frozen until the exact cosigned transaction is observed on Bitcoin.
312
347
  *
313
348
  * This is submitted as a no-fee transaction off chain to allow keys to remain in cold
314
349
  * wallets.
315
350
  **/
316
351
  cosignRelease: AugmentedSubmittable<
317
352
  (
318
- utxoId: u64 | AnyNumber | Uint8Array,
319
- signature: Bytes | string | Uint8Array,
320
- ) => SubmittableExtrinsic<ApiType>,
321
- [u64, Bytes]
322
- >;
323
- increaseSecuritization: AugmentedSubmittable<
324
- (
325
- utxoId: u64 | AnyNumber | Uint8Array,
326
- newSatoshis: Compact<u64> | AnyNumber | Uint8Array,
353
+ lockId: u64 | AnyNumber | Uint8Array,
354
+ signatures: Vec<Bytes> | (Bytes | string | Uint8Array)[],
327
355
  ) => SubmittableExtrinsic<ApiType>,
328
- [u64, Compact<u64>]
356
+ [u64, Vec<Bytes>]
329
357
  >;
330
358
  /**
331
- * Initialize a bitcoin lock. This will create a LockedBitcoin for the submitting account
332
- * and log the Bitcoin Script hash to Events.
359
+ * Create a Bitcoin receive address backed by a Lock for the submitting account.
333
360
  *
334
361
  * The pubkey submitted here will be used to create a script pubkey that will be used in a
335
362
  * timelock multisig script to lock the bitcoin.
336
- *
337
- * NOTE: A "lock-er" must send btc to the cosigner UTXO address to "complete" the
338
- * LockedBitcoin and be added to the Bitcoin Mint line.
339
363
  **/
340
- initialize: AugmentedSubmittable<
364
+ createReceiveAddress: AugmentedSubmittable<
341
365
  (
342
366
  vaultId: u32 | AnyNumber | Uint8Array,
343
367
  satoshis: Compact<u64> | AnyNumber | Uint8Array,
@@ -347,8 +371,7 @@ declare module '@polkadot/api-base/types/submittable' {
347
371
  | null
348
372
  | Uint8Array
349
373
  | PalletBitcoinLocksLockOptions
350
- | { V1: any }
351
- | { V2: any }
374
+ | { microgonsAtTargetPerBtc?: any; feeCoupon?: any }
352
375
  | string,
353
376
  ) => SubmittableExtrinsic<ApiType>,
354
377
  [
@@ -358,36 +381,6 @@ declare module '@polkadot/api-base/types/submittable' {
358
381
  Option<PalletBitcoinLocksLockOptions>,
359
382
  ]
360
383
  >;
361
- /**
362
- * Ratcheting allows a user to change the lock price of their bitcoin lock. This is
363
- * functionally the same as releasing and re-initializing, but it allows a user to skip
364
- * sending transactions through bitcoin and any associated fees. It also allows you to stay
365
- * on your original lock expiration without having to pay the full year of fees again.
366
- *
367
- * Ratcheting "down" - when the price of bitcoin is lower than your lock price, you pay the
368
- * full release price and get added back to the mint queue at the current market rate. You
369
- * pocket the difference between the already minted "lock price" and the new market value
370
- * (which you just had burned). Your new lock price is set to the market low, so you can
371
- * take advantage of ratchets "up" in the future.
372
- *
373
- * Ratcheting "up" - when the price of bitcoin is higher than your lock price, you pay a
374
- * prorated fee for the remainder of your existing lock duration. You are added to the mint
375
- * queue for the difference in your new lock price vs the previous lock price.
376
- **/
377
- ratchet: AugmentedSubmittable<
378
- (
379
- utxoId: u64 | AnyNumber | Uint8Array,
380
- options:
381
- | Option<PalletBitcoinLocksLockOptions>
382
- | null
383
- | Uint8Array
384
- | PalletBitcoinLocksLockOptions
385
- | { V1: any }
386
- | { V2: any }
387
- | string,
388
- ) => SubmittableExtrinsic<ApiType>,
389
- [u64, Option<PalletBitcoinLocksLockOptions>]
390
- >;
391
384
  requestOrphanedUtxoRelease: AugmentedSubmittable<
392
385
  (
393
386
  utxoRef:
@@ -401,61 +394,48 @@ declare module '@polkadot/api-base/types/submittable' {
401
394
  [ArgonPrimitivesBitcoinUtxoRef, Bytes, u64]
402
395
  >;
403
396
  /**
404
- * Submitted by a Bitcoin holder to trigger the release of their Utxo out of the cosign
405
- * script. A transaction spending the UTXO should be pre-created so that the sighash
406
- * can be submitted here. The vault operator will have 10 days to counter-sign the
407
- * transaction. It will be published with the public key as a BitcoinUtxoCosigned Event.
397
+ * Submitted by a Bitcoin holder to spend every current UTXO in a Lock. The exact external
398
+ * amount and network fee determine whether the transaction fully releases the Lock or
399
+ * returns one consolidated change output to the same Lock script. The vault operator has
400
+ * 10 days to publish one signature per frozen input in a BitcoinUtxoCosigned event.
408
401
  *
409
402
  * Owner must submit a script pubkey and also a fee to pay to the bitcoin network.
410
403
  **/
411
404
  requestRelease: AugmentedSubmittable<
412
405
  (
413
- utxoId: u64 | AnyNumber | Uint8Array,
406
+ lockId: u64 | AnyNumber | Uint8Array,
414
407
  toScriptPubkey: Bytes | string | Uint8Array,
408
+ destinationSatoshis: u64 | AnyNumber | Uint8Array,
415
409
  bitcoinNetworkFee: u64 | AnyNumber | Uint8Array,
416
410
  ) => SubmittableExtrinsic<ApiType>,
417
- [u64, Bytes, u64]
411
+ [u64, Bytes, u64, u64]
418
412
  >;
419
- setFlexible: AugmentedSubmittable<
420
- (
421
- utxoId: u64 | AnyNumber | Uint8Array,
422
- isFlexible: bool | boolean | Uint8Array,
423
- ) => SubmittableExtrinsic<ApiType>,
424
- [u64, bool]
425
- >;
426
- };
427
- bitcoinUtxos: {
428
413
  /**
429
- * Bind a candidate UTXO ref as the funding UTXO for its lock.
430
- * The locks pallet authorizes the promotion; this pallet binds the ref and begins
431
- * tracking.
414
+ * Replace this Lock's BTC coverage and target value for its remaining term.
432
415
  **/
433
- fundWithUtxoCandidate: AugmentedSubmittable<
416
+ resecuritize: AugmentedSubmittable<
434
417
  (
435
- utxoId: u64 | AnyNumber | Uint8Array,
436
- utxoRef:
437
- | ArgonPrimitivesBitcoinUtxoRef
438
- | { txid?: any; outputIndex?: any }
439
- | string
440
- | Uint8Array,
418
+ lockId: u64 | AnyNumber | Uint8Array,
419
+ satoshis: Compact<u64> | AnyNumber | Uint8Array,
420
+ options:
421
+ | Option<PalletBitcoinLocksLockOptions>
422
+ | null
423
+ | Uint8Array
424
+ | PalletBitcoinLocksLockOptions
425
+ | { microgonsAtTargetPerBtc?: any; feeCoupon?: any }
426
+ | string,
441
427
  ) => SubmittableExtrinsic<ApiType>,
442
- [u64, ArgonPrimitivesBitcoinUtxoRef]
428
+ [u64, Compact<u64>, Option<PalletBitcoinLocksLockOptions>]
443
429
  >;
444
- /**
445
- * Reject a pending candidate UTXO and materialize it as an orphan through the locks
446
- * pallet.
447
- **/
448
- rejectUtxoCandidate: AugmentedSubmittable<
430
+ setFlexible: AugmentedSubmittable<
449
431
  (
450
- utxoId: u64 | AnyNumber | Uint8Array,
451
- utxoRef:
452
- | ArgonPrimitivesBitcoinUtxoRef
453
- | { txid?: any; outputIndex?: any }
454
- | string
455
- | Uint8Array,
432
+ lockId: u64 | AnyNumber | Uint8Array,
433
+ isFlexible: bool | boolean | Uint8Array,
456
434
  ) => SubmittableExtrinsic<ApiType>,
457
- [u64, ArgonPrimitivesBitcoinUtxoRef]
435
+ [u64, bool]
458
436
  >;
437
+ };
438
+ bitcoinUtxos: {
459
439
  /**
460
440
  * Sets the most recent confirmed bitcoin block height (only executable by the Oracle
461
441
  * Operator account)
@@ -486,12 +466,12 @@ declare module '@polkadot/api-base/types/submittable' {
486
466
  sync: AugmentedSubmittable<
487
467
  (
488
468
  utxoSync:
489
- | ArgonPrimitivesInherentsBitcoinUtxoSync
469
+ | ArgonPrimitivesInherentsBitcoinUtxoSyncV2
490
470
  | { spent?: any; funded?: any; syncToBlock?: any }
491
471
  | string
492
472
  | Uint8Array,
493
473
  ) => SubmittableExtrinsic<ApiType>,
494
- [ArgonPrimitivesInherentsBitcoinUtxoSync]
474
+ [ArgonPrimitivesInherentsBitcoinUtxoSyncV2]
495
475
  >;
496
476
  };
497
477
  blockRewards: {
@@ -2026,6 +2006,37 @@ declare module '@polkadot/api-base/types/submittable' {
2026
2006
  >;
2027
2007
  };
2028
2008
  treasury: {
2009
+ /**
2010
+ * Attribute earnings already paid to a vault under the old aggregate flexible-bond model.
2011
+ * This changes bond-lot metrics only; it never pays, holds, or releases funds. `expected`
2012
+ * guards against overwriting a newer payout, and replaying `updated` is a no-op.
2013
+ **/
2014
+ backfillBondLotEarnings: AugmentedSubmittable<
2015
+ (
2016
+ bondLotId: u64 | AnyNumber | Uint8Array,
2017
+ expected:
2018
+ | PalletTreasuryBondLotEarningsMetrics
2019
+ | {
2020
+ participatedFrames?: any;
2021
+ lastFrameEarningsFrameId?: any;
2022
+ lastFrameEarnings?: any;
2023
+ cumulativeEarnings?: any;
2024
+ }
2025
+ | string
2026
+ | Uint8Array,
2027
+ updated:
2028
+ | PalletTreasuryBondLotEarningsMetrics
2029
+ | {
2030
+ participatedFrames?: any;
2031
+ lastFrameEarningsFrameId?: any;
2032
+ lastFrameEarnings?: any;
2033
+ cumulativeEarnings?: any;
2034
+ }
2035
+ | string
2036
+ | Uint8Array,
2037
+ ) => SubmittableExtrinsic<ApiType>,
2038
+ [u64, PalletTreasuryBondLotEarningsMetrics, PalletTreasuryBondLotEarningsMetrics]
2039
+ >;
2029
2040
  /**
2030
2041
  * Buy whole bond units for the Argonot active set.
2031
2042
  **/
@@ -2036,7 +2047,7 @@ declare module '@polkadot/api-base/types/submittable' {
2036
2047
  /**
2037
2048
  * Buy whole `1 ARGON` bonds for a vault.
2038
2049
  *
2039
- * The purchase either enters the accepted list or fails.
2050
+ * The purchase either creates a bond lot or fails.
2040
2051
  **/
2041
2052
  buyBonds: AugmentedSubmittable<
2042
2053
  (
@@ -2061,9 +2072,17 @@ declare module '@polkadot/api-base/types/submittable' {
2061
2072
  [u32, u32, Option<ArgonPrimitivesVaultTreasuryBonusApprovalProof>]
2062
2073
  >;
2063
2074
  /**
2064
- * Liquidate one full bond lot.
2065
- *
2066
- * The lot stops participating right away and is released after the delay.
2075
+ * Update reward economics without resetting fields omitted by the caller.
2076
+ **/
2077
+ configureRewardEconomics: AugmentedSubmittable<
2078
+ (
2079
+ targetBitcoinPercent: Option<Percent> | null | Uint8Array | Percent | AnyNumber,
2080
+ ) => SubmittableExtrinsic<ApiType>,
2081
+ [Option<Percent>]
2082
+ >;
2083
+ /**
2084
+ * Liquidate one full bond lot. It keeps the locked frame's payout terms and is
2085
+ * released after the delay.
2067
2086
  **/
2068
2087
  liquidateBondLot: AugmentedSubmittable<
2069
2088
  (bondLotId: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
@@ -2291,8 +2310,8 @@ declare module '@polkadot/api-base/types/submittable' {
2291
2310
  };
2292
2311
  vaults: {
2293
2312
  /**
2294
- * Stop offering additional bitcoin locks from this vault. Will not affect existing
2295
- * locks. As funds are returned, they will be released to the vault owner.
2313
+ * Stop offering new Bitcoin locks. Existing locks continue; securitization exits after
2314
+ * its notice and any existing Bitcoin commitment.
2296
2315
  **/
2297
2316
  close: AugmentedSubmittable<
2298
2317
  (vaultId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
@@ -2319,14 +2338,14 @@ declare module '@polkadot/api-base/types/submittable' {
2319
2338
  [PalletVaultsVaultConfig]
2320
2339
  >;
2321
2340
  /**
2322
- * Modify funds allocated by the vault. This will not affect issued bitcoin locks, but will
2323
- * affect the amount of funds available for new ones.
2341
+ * Modify funds allocated by the vault without changing existing Bitcoin locks.
2324
2342
  *
2325
2343
  * The securitization percent must be maintained or increased.
2326
2344
  *
2327
- * The amount allocated may not go below the existing reserved amounts, but you can release
2328
- * funds in this vault as bitcoin locks are released. To stop issuing any more bitcoin
2329
- * locks, use the `close` api.
2345
+ * Funds not yet used in a reward snapshot may leave without notice if not needed for
2346
+ * Bitcoin commitments. Reward-committed funds require a one-year Bitcoin-height exit
2347
+ * notice and remain held until both the notice and any Bitcoin commitment have ended.
2348
+ * To stop issuing locks, use `close`.
2330
2349
  **/
2331
2350
  modifyFunding: AugmentedSubmittable<
2332
2351
  (
@@ -2345,7 +2364,7 @@ declare module '@polkadot/api-base/types/submittable' {
2345
2364
  vaultId: u32 | AnyNumber | Uint8Array,
2346
2365
  terms:
2347
2366
  | ArgonPrimitivesVaultVaultTerms
2348
- | { bitcoinAnnualPercentRate?: any; bitcoinBaseFee?: any; treasuryProfitSharing?: any }
2367
+ | { bitcoinAnnualPercentRate?: any; bitcoinBaseFee?: any }
2349
2368
  | string
2350
2369
  | Uint8Array,
2351
2370
  ) => SubmittableExtrinsic<ApiType>,
@@ -2363,7 +2382,11 @@ declare module '@polkadot/api-base/types/submittable' {
2363
2382
  ) => SubmittableExtrinsic<ApiType>,
2364
2383
  [u32, ArgonPrimitivesBitcoinOpaqueBitcoinXpub]
2365
2384
  >;
2366
- setCommittedArgonots: AugmentedSubmittable<
2385
+ /**
2386
+ * Set the desired Argonot backing. Unused funds release immediately; reward commitments
2387
+ * withdraw after one-year notice, continuing to participate until released.
2388
+ **/
2389
+ setArgonotSecuritization: AugmentedSubmittable<
2367
2390
  (amount: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
2368
2391
  [Compact<u128>]
2369
2392
  >;
@@ -1,5 +1,4 @@
1
1
  // Auto-generated via `yarn polkadot-types-from-chain`, do not edit
2
- /* eslint-disable */
3
2
 
4
3
  import './augment-api-consts.js';
5
4
  import './augment-api-errors.js';
@@ -1,5 +1,4 @@
1
1
  // Auto-generated via `yarn polkadot-types-from-defs`, do not edit
2
- /* eslint-disable */
3
2
 
4
3
  // import type lookup before we augment - in some environments
5
4
  // this is required to allow for ambient/previous definitions
@@ -67,7 +66,11 @@ import type {
67
66
  MoreAttestations,
68
67
  } from '@polkadot/types/interfaces/attestations';
69
68
  import type { RawAuraPreDigest } from '@polkadot/types/interfaces/aura';
70
- import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
69
+ import type {
70
+ ExtrinsicOrHash,
71
+ ExtrinsicStatus,
72
+ GeneratedSessionKeys,
73
+ } from '@polkadot/types/interfaces/author';
71
74
  import type { UncleEntryItem } from '@polkadot/types/interfaces/authorship';
72
75
  import type {
73
76
  AllowedSlots,
@@ -651,6 +654,7 @@ import type {
651
654
  SessionStatus,
652
655
  } from '@polkadot/types/interfaces/mixnet';
653
656
  import type {
657
+ MmrAncestryProof,
654
658
  MmrBatchProof,
655
659
  MmrEncodableOpaqueLeaf,
656
660
  MmrError,
@@ -1868,6 +1872,7 @@ declare module '@polkadot/types/types/registry' {
1868
1872
  FungibilityV5: FungibilityV5;
1869
1873
  FungiblesAccessError: FungiblesAccessError;
1870
1874
  Gas: Gas;
1875
+ GeneratedSessionKeys: GeneratedSessionKeys;
1871
1876
  GenesisBuildErr: GenesisBuildErr;
1872
1877
  GiltBid: GiltBid;
1873
1878
  GlobalValidationData: GlobalValidationData;
@@ -2034,6 +2039,7 @@ declare module '@polkadot/types/types/registry' {
2034
2039
  MigrationStatusResult: MigrationStatusResult;
2035
2040
  Mixnode: Mixnode;
2036
2041
  MixnodesErr: MixnodesErr;
2042
+ MmrAncestryProof: MmrAncestryProof;
2037
2043
  MmrBatchProof: MmrBatchProof;
2038
2044
  MmrEncodableOpaqueLeaf: MmrEncodableOpaqueLeaf;
2039
2045
  MmrError: MmrError;