@argonprotocol/mainchain 1.4.12 → 1.4.13-dev.b31b2822

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.
@@ -24,7 +24,6 @@ import type { ITuple } from '@polkadot/types-codec/types';
24
24
  import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';
25
25
  import type {
26
26
  ArgonNotaryAuditErrorVerifyError,
27
- ArgonPrimitivesBitcoinBitcoinRejectedReason,
28
27
  ArgonPrimitivesBitcoinUtxoRef,
29
28
  ArgonPrimitivesBlockSealBlockPayout,
30
29
  ArgonPrimitivesBlockSealMiningRegistration,
@@ -32,6 +31,7 @@ import type {
32
31
  ArgonPrimitivesNotaryNotaryMeta,
33
32
  ArgonPrimitivesNotaryNotaryRecord,
34
33
  ArgonPrimitivesProvidersOperationalRewardKind,
34
+ ArgonPrimitivesVaultBitcoinSecuritizationBasis,
35
35
  ArgonRuntimeOriginCaller,
36
36
  ArgonRuntimeProxyType,
37
37
  ArgonRuntimeRuntimeHoldReason,
@@ -311,139 +311,216 @@ declare module '@polkadot/api-base/types/events' {
311
311
  { who: AccountId32; amount: u128 }
312
312
  >;
313
313
  };
314
- bitcoinLocks: {
315
- BitcoinCosignPastDue: AugmentedEvent<
314
+ bitcoinFissions: {
315
+ /**
316
+ * A Fission was closed and its source Lock allocation was released.
317
+ **/
318
+ FissionClosed: AugmentedEvent<
319
+ ApiType,
320
+ [accountId: AccountId32, fissionId: u64, redemptionAmount: u128],
321
+ { accountId: AccountId32; fissionId: u64; redemptionAmount: u128 }
322
+ >;
323
+ /**
324
+ * An active Fission was closed because its source Lock was spent.
325
+ **/
326
+ FissionClosedByLock: AugmentedEvent<
316
327
  ApiType,
317
- [utxoId: u64, vaultId: u32, compensationAmount: u128, compensatedAccountId: AccountId32],
318
- { utxoId: u64; vaultId: u32; compensationAmount: u128; compensatedAccountId: AccountId32 }
328
+ [accountId: AccountId32, fissionId: u64, lockId: u64],
329
+ { accountId: AccountId32; fissionId: u64; lockId: u64 }
330
+ >;
331
+ /**
332
+ * A Fission was created and allocated from its source Lock.
333
+ **/
334
+ FissionCreated: AugmentedEvent<
335
+ ApiType,
336
+ [
337
+ accountId: AccountId32,
338
+ fissionId: u64,
339
+ liquidId: u64,
340
+ lockId: u64,
341
+ satoshis: u64,
342
+ microgonsAtTargetPerBtc: u128,
343
+ liquidityPromised: u128,
344
+ ],
345
+ {
346
+ accountId: AccountId32;
347
+ fissionId: u64;
348
+ liquidId: u64;
349
+ lockId: u64;
350
+ satoshis: u64;
351
+ microgonsAtTargetPerBtc: u128;
352
+ liquidityPromised: u128;
353
+ }
354
+ >;
355
+ /**
356
+ * A Fission ratchet changed its target-normalized BTC value and liability.
357
+ **/
358
+ FissionRatcheted: AugmentedEvent<
359
+ ApiType,
360
+ [
361
+ accountId: AccountId32,
362
+ fissionId: u64,
363
+ ratchetNumber: u32,
364
+ microgonsAtTargetPerBtc: u128,
365
+ liquidityPromised: u128,
366
+ amountMinted: u128,
367
+ amountBurned: u128,
368
+ ],
369
+ {
370
+ accountId: AccountId32;
371
+ fissionId: u64;
372
+ ratchetNumber: u32;
373
+ microgonsAtTargetPerBtc: u128;
374
+ liquidityPromised: u128;
375
+ amountMinted: u128;
376
+ amountBurned: u128;
377
+ }
319
378
  >;
320
- BitcoinLockBurned: AugmentedEvent<
379
+ };
380
+ bitcoinLocks: {
381
+ BitcoinCosignPastDue: AugmentedEvent<
321
382
  ApiType,
322
- [utxoId: u64, vaultId: u32, wasUtxoSpent: bool],
323
- { utxoId: u64; vaultId: u32; wasUtxoSpent: bool }
383
+ [
384
+ lockId: u64,
385
+ vaultId: u32,
386
+ releaseNumber: u32,
387
+ compensationAmount: u128,
388
+ compensatedAccountId: AccountId32,
389
+ ],
390
+ {
391
+ lockId: u64;
392
+ vaultId: u32;
393
+ releaseNumber: u32;
394
+ compensationAmount: u128;
395
+ compensatedAccountId: AccountId32;
396
+ }
324
397
  >;
325
398
  BitcoinLockCreated: AugmentedEvent<
326
399
  ApiType,
327
400
  [
328
- utxoId: u64,
401
+ lockId: u64,
329
402
  vaultId: u32,
330
- liquidityPromised: u128,
331
- securitization: u128,
332
- lockedTargetPrice: u128,
403
+ securitizationBasis: ArgonPrimitivesVaultBitcoinSecuritizationBasis,
404
+ collateralRequired: u128,
333
405
  accountId: AccountId32,
334
406
  securityFee: u128,
335
407
  ],
336
408
  {
337
- utxoId: u64;
409
+ lockId: u64;
338
410
  vaultId: u32;
339
- liquidityPromised: u128;
340
- securitization: u128;
341
- lockedTargetPrice: u128;
411
+ securitizationBasis: ArgonPrimitivesVaultBitcoinSecuritizationBasis;
412
+ collateralRequired: u128;
342
413
  accountId: AccountId32;
343
414
  securityFee: u128;
344
415
  }
345
416
  >;
346
417
  BitcoinLockFlexibleChanged: AugmentedEvent<
347
418
  ApiType,
348
- [utxoId: u64, vaultId: u32, isFlexible: bool],
349
- { utxoId: u64; vaultId: u32; isFlexible: bool }
419
+ [lockId: u64, vaultId: u32, isFlexible: bool],
420
+ { lockId: u64; vaultId: u32; isFlexible: bool }
350
421
  >;
351
- BitcoinLockRatcheted: AugmentedEvent<
422
+ BitcoinLockResecuritized: AugmentedEvent<
352
423
  ApiType,
353
424
  [
354
- utxoId: u64,
425
+ lockId: u64,
355
426
  vaultId: u32,
356
- liquidityPromised: u128,
357
- oldTargetPrice: u128,
358
- securityFee: u128,
359
- newTargetPrice: u128,
360
- amountBurned: u128,
427
+ securitizationBasis: ArgonPrimitivesVaultBitcoinSecuritizationBasis,
361
428
  accountId: AccountId32,
362
429
  ],
363
430
  {
364
- utxoId: u64;
431
+ lockId: u64;
365
432
  vaultId: u32;
366
- liquidityPromised: u128;
367
- oldTargetPrice: u128;
368
- securityFee: u128;
369
- newTargetPrice: u128;
370
- amountBurned: u128;
433
+ securitizationBasis: ArgonPrimitivesVaultBitcoinSecuritizationBasis;
371
434
  accountId: AccountId32;
372
435
  }
373
436
  >;
437
+ BitcoinLockTerminated: AugmentedEvent<
438
+ ApiType,
439
+ [lockId: u64, vaultId: u32, wasUtxoSpent: bool, burnedArgons: u128],
440
+ { lockId: u64; vaultId: u32; wasUtxoSpent: bool; burnedArgons: u128 }
441
+ >;
374
442
  BitcoinSpentAfterRelease: AugmentedEvent<
375
443
  ApiType,
376
- [utxoId: u64, vaultId: u32],
377
- { utxoId: u64; vaultId: u32 }
444
+ [lockId: u64, vaultId: u32, releaseNumber: u32, bitcoinHeight: u64],
445
+ { lockId: u64; vaultId: u32; releaseNumber: u32; bitcoinHeight: u64 }
378
446
  >;
379
447
  BitcoinUtxoCosigned: AugmentedEvent<
380
448
  ApiType,
381
- [utxoId: u64, vaultId: u32, signature: Bytes],
382
- { utxoId: u64; vaultId: u32; signature: Bytes }
449
+ [lockId: u64, vaultId: u32, releaseNumber: u32, signatures: Vec<Bytes>],
450
+ { lockId: u64; vaultId: u32; releaseNumber: u32; signatures: Vec<Bytes> }
383
451
  >;
384
452
  BitcoinUtxoCosignRequested: AugmentedEvent<
385
453
  ApiType,
386
- [utxoId: u64, vaultId: u32],
387
- { utxoId: u64; vaultId: u32 }
454
+ [lockId: u64, vaultId: u32, releaseNumber: u32],
455
+ { lockId: u64; vaultId: u32; releaseNumber: u32 }
388
456
  >;
389
457
  /**
390
458
  * An error occurred while refunding an overdue cosigned bitcoin lock
391
459
  **/
392
460
  CosignOverdueError: AugmentedEvent<
393
461
  ApiType,
394
- [utxoId: u64, error: SpRuntimeDispatchError],
395
- { utxoId: u64; error: SpRuntimeDispatchError }
462
+ [lockId: u64, error: SpRuntimeDispatchError],
463
+ { lockId: u64; error: SpRuntimeDispatchError }
396
464
  >;
397
465
  /**
398
466
  * An error occurred while completing a lock
399
467
  **/
400
468
  LockExpirationError: AugmentedEvent<
401
469
  ApiType,
402
- [utxoId: u64, error: SpRuntimeDispatchError],
403
- { utxoId: u64; error: SpRuntimeDispatchError }
470
+ [lockId: u64, error: SpRuntimeDispatchError],
471
+ { lockId: u64; error: SpRuntimeDispatchError }
472
+ >;
473
+ /**
474
+ * Not all orphaned UTXOs for a retired Lock fit in the cleanup schedule.
475
+ **/
476
+ OrphanedUtxoCleanupScheduleOverflow: AugmentedEvent<
477
+ ApiType,
478
+ [accountId: AccountId32, lockId: u64, expirationFrame: u64],
479
+ { accountId: AccountId32; lockId: u64; expirationFrame: u64 }
404
480
  >;
405
481
  OrphanedUtxoCosigned: AugmentedEvent<
406
482
  ApiType,
407
483
  [
408
- utxoId: u64,
484
+ lockId: u64,
409
485
  utxoRef: ArgonPrimitivesBitcoinUtxoRef,
410
486
  vaultId: u32,
411
487
  accountId: AccountId32,
412
488
  signature: Bytes,
413
489
  ],
414
490
  {
415
- utxoId: u64;
491
+ lockId: u64;
416
492
  utxoRef: ArgonPrimitivesBitcoinUtxoRef;
417
493
  vaultId: u32;
418
494
  accountId: AccountId32;
419
495
  signature: Bytes;
420
496
  }
421
497
  >;
422
- OrphanedUtxoReceived: AugmentedEvent<
423
- ApiType,
424
- [utxoId: u64, utxoRef: ArgonPrimitivesBitcoinUtxoRef, vaultId: u32, satoshis: u64],
425
- { utxoId: u64; utxoRef: ArgonPrimitivesBitcoinUtxoRef; vaultId: u32; satoshis: u64 }
426
- >;
427
- OrphanedUtxoReleaseRequested: AugmentedEvent<
498
+ /**
499
+ * An orphaned UTXO expiration could not reconcile its pending Vault cosign state.
500
+ **/
501
+ OrphanedUtxoExpirationError: AugmentedEvent<
428
502
  ApiType,
429
- [utxoId: u64, utxoRef: ArgonPrimitivesBitcoinUtxoRef, vaultId: u32, accountId: AccountId32],
503
+ [
504
+ accountId: AccountId32,
505
+ utxoRef: ArgonPrimitivesBitcoinUtxoRef,
506
+ error: SpRuntimeDispatchError,
507
+ ],
430
508
  {
431
- utxoId: u64;
432
- utxoRef: ArgonPrimitivesBitcoinUtxoRef;
433
- vaultId: u32;
434
509
  accountId: AccountId32;
510
+ utxoRef: ArgonPrimitivesBitcoinUtxoRef;
511
+ error: SpRuntimeDispatchError;
435
512
  }
436
513
  >;
437
- SecuritizationIncreased: AugmentedEvent<
514
+ OrphanedUtxoReceived: AugmentedEvent<
438
515
  ApiType,
439
- [utxoId: u64, vaultId: u32, newSatoshis: u64, accountId: AccountId32],
440
- { utxoId: u64; vaultId: u32; newSatoshis: u64; accountId: AccountId32 }
516
+ [lockId: u64, utxoRef: ArgonPrimitivesBitcoinUtxoRef, vaultId: u32, satoshis: u64],
517
+ { lockId: u64; utxoRef: ArgonPrimitivesBitcoinUtxoRef; vaultId: u32; satoshis: u64 }
441
518
  >;
442
- UtxoFundedFromCandidate: AugmentedEvent<
519
+ OrphanedUtxoReleaseRequested: AugmentedEvent<
443
520
  ApiType,
444
- [utxoId: u64, utxoRef: ArgonPrimitivesBitcoinUtxoRef, vaultId: u32, accountId: AccountId32],
521
+ [lockId: u64, utxoRef: ArgonPrimitivesBitcoinUtxoRef, vaultId: u32, accountId: AccountId32],
445
522
  {
446
- utxoId: u64;
523
+ lockId: u64;
447
524
  utxoRef: ArgonPrimitivesBitcoinUtxoRef;
448
525
  vaultId: u32;
449
526
  accountId: AccountId32;
@@ -451,47 +528,37 @@ declare module '@polkadot/api-base/types/events' {
451
528
  >;
452
529
  };
453
530
  bitcoinUtxos: {
454
- UtxoRejected: AugmentedEvent<
531
+ UtxoDetected: AugmentedEvent<
455
532
  ApiType,
456
533
  [
457
- utxoId: u64,
534
+ lockId: u64,
458
535
  utxoRef: ArgonPrimitivesBitcoinUtxoRef,
459
- rejectedReason: ArgonPrimitivesBitcoinBitcoinRejectedReason,
460
536
  satoshisReceived: u64,
537
+ bitcoinHeight: u64,
461
538
  ],
462
539
  {
463
- utxoId: u64;
540
+ lockId: u64;
464
541
  utxoRef: ArgonPrimitivesBitcoinUtxoRef;
465
- rejectedReason: ArgonPrimitivesBitcoinBitcoinRejectedReason;
466
542
  satoshisReceived: u64;
543
+ bitcoinHeight: u64;
467
544
  }
468
545
  >;
469
- UtxoRejectedError: AugmentedEvent<
546
+ UtxoDetectedError: AugmentedEvent<
470
547
  ApiType,
471
- [utxoId: u64, error: SpRuntimeDispatchError],
472
- { utxoId: u64; error: SpRuntimeDispatchError }
548
+ [lockId: u64, error: SpRuntimeDispatchError],
549
+ { lockId: u64; error: SpRuntimeDispatchError }
473
550
  >;
474
551
  UtxoSpent: AugmentedEvent<
475
552
  ApiType,
476
- [utxoId: u64, blockHeight: u64],
477
- { utxoId: u64; blockHeight: u64 }
553
+ [lockId: u64, utxoRef: ArgonPrimitivesBitcoinUtxoRef, blockHeight: u64],
554
+ { lockId: u64; utxoRef: ArgonPrimitivesBitcoinUtxoRef; blockHeight: u64 }
478
555
  >;
479
556
  UtxoSpentError: AugmentedEvent<
480
557
  ApiType,
481
- [utxoId: u64, error: SpRuntimeDispatchError],
482
- { utxoId: u64; error: SpRuntimeDispatchError }
483
- >;
484
- UtxoUnwatched: AugmentedEvent<ApiType, [utxoId: u64], { utxoId: u64 }>;
485
- UtxoVerified: AugmentedEvent<
486
- ApiType,
487
- [utxoId: u64, satoshisReceived: u64],
488
- { utxoId: u64; satoshisReceived: u64 }
489
- >;
490
- UtxoVerifiedError: AugmentedEvent<
491
- ApiType,
492
- [utxoId: u64, error: SpRuntimeDispatchError],
493
- { utxoId: u64; error: SpRuntimeDispatchError }
558
+ [lockId: u64, error: SpRuntimeDispatchError],
559
+ { lockId: u64; error: SpRuntimeDispatchError }
494
560
  >;
561
+ UtxoUnwatched: AugmentedEvent<ApiType, [lockId: u64], { lockId: u64 }>;
495
562
  };
496
563
  blockRewards: {
497
564
  RewardCreated: AugmentedEvent<
@@ -1104,8 +1171,8 @@ declare module '@polkadot/api-base/types/events' {
1104
1171
  **/
1105
1172
  BitcoinMint: AugmentedEvent<
1106
1173
  ApiType,
1107
- [accountId: AccountId32, utxoId: Option<u64>, amount: u128],
1108
- { accountId: AccountId32; utxoId: Option<u64>; amount: u128 }
1174
+ [accountId: AccountId32, fissionId: u64, lockId: Option<u64>, amount: u128],
1175
+ { accountId: AccountId32; fissionId: u64; lockId: Option<u64>; amount: u128 }
1109
1176
  >;
1110
1177
  /**
1111
1178
  * The amount of microgons minted for mining. NOTE: accounts below Existential Deposit
@@ -1125,14 +1192,16 @@ declare module '@polkadot/api-base/types/events' {
1125
1192
  [
1126
1193
  mintType: PalletMintMintType,
1127
1194
  accountId: AccountId32,
1128
- utxoId: Option<u64>,
1195
+ fissionId: Option<u64>,
1196
+ lockId: Option<u64>,
1129
1197
  amount: u128,
1130
1198
  error: SpRuntimeDispatchError,
1131
1199
  ],
1132
1200
  {
1133
1201
  mintType: PalletMintMintType;
1134
1202
  accountId: AccountId32;
1135
- utxoId: Option<u64>;
1203
+ fissionId: Option<u64>;
1204
+ lockId: Option<u64>;
1136
1205
  amount: u128;
1137
1206
  error: SpRuntimeDispatchError;
1138
1207
  }
@@ -2106,30 +2175,6 @@ declare module '@polkadot/api-base/types/events' {
2106
2175
  [vaultId: u32, operatorAccountId: AccountId32, amount: u128],
2107
2176
  { vaultId: u32; operatorAccountId: AccountId32; amount: u128 }
2108
2177
  >;
2109
- FundLockCanceled: AugmentedEvent<
2110
- ApiType,
2111
- [vaultId: u32, amount: u128],
2112
- { vaultId: u32; amount: u128 }
2113
- >;
2114
- FundsLocked: AugmentedEvent<
2115
- ApiType,
2116
- [
2117
- vaultId: u32,
2118
- locker: AccountId32,
2119
- liquidityPromised: u128,
2120
- isRatchet: bool,
2121
- feeRevenue: u128,
2122
- didUseFeeCoupon: bool,
2123
- ],
2124
- {
2125
- vaultId: u32;
2126
- locker: AccountId32;
2127
- liquidityPromised: u128;
2128
- isRatchet: bool;
2129
- feeRevenue: u128;
2130
- didUseFeeCoupon: bool;
2131
- }
2132
- >;
2133
2178
  FundsReleased: AugmentedEvent<
2134
2179
  ApiType,
2135
2180
  [vaultId: u32, securitization: u128],
@@ -2147,14 +2192,48 @@ declare module '@polkadot/api-base/types/events' {
2147
2192
  >;
2148
2193
  LostBitcoinCompensated: AugmentedEvent<
2149
2194
  ApiType,
2150
- [vaultId: u32, beneficiary: AccountId32, toBeneficiary: u128, burned: u128],
2151
- { vaultId: u32; beneficiary: AccountId32; toBeneficiary: u128; burned: u128 }
2195
+ [
2196
+ vaultId: u32,
2197
+ beneficiary: AccountId32,
2198
+ toBeneficiary: u128,
2199
+ shortfall: u128,
2200
+ burned: u128,
2201
+ ],
2202
+ {
2203
+ vaultId: u32;
2204
+ beneficiary: AccountId32;
2205
+ toBeneficiary: u128;
2206
+ shortfall: u128;
2207
+ burned: u128;
2208
+ }
2152
2209
  >;
2153
2210
  ReservedSecuritizationSpaceChanged: AugmentedEvent<
2154
2211
  ApiType,
2155
2212
  [vaultId: u32, reservedSecuritizationSpace: u128],
2156
2213
  { vaultId: u32; reservedSecuritizationSpace: u128 }
2157
2214
  >;
2215
+ SecuritizationReserved: AugmentedEvent<
2216
+ ApiType,
2217
+ [
2218
+ vaultId: u32,
2219
+ locker: AccountId32,
2220
+ securitizationCoverageMicrogons: u128,
2221
+ feeRevenue: u128,
2222
+ didUseFeeCoupon: bool,
2223
+ ],
2224
+ {
2225
+ vaultId: u32;
2226
+ locker: AccountId32;
2227
+ securitizationCoverageMicrogons: u128;
2228
+ feeRevenue: u128;
2229
+ didUseFeeCoupon: bool;
2230
+ }
2231
+ >;
2232
+ SecuritizationReturned: AugmentedEvent<
2233
+ ApiType,
2234
+ [vaultId: u32, amount: u128],
2235
+ { vaultId: u32; amount: u128 }
2236
+ >;
2158
2237
  TreasuryRecordingError: AugmentedEvent<
2159
2238
  ApiType,
2160
2239
  [vaultId: u32, frameId: u64, vaultEarnings: u128, error: SpRuntimeDispatchError],