@argonprotocol/mainchain 1.4.12-dev.8cae3588 → 1.4.12-dev.a0735a19
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/README.md +0 -10
- package/browser/index.d.ts +914 -1158
- package/browser/index.js +15 -1344
- package/browser/index.js.map +1 -1
- package/lib/index.cjs +17 -1347
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +914 -1158
- package/lib/index.d.ts +914 -1158
- package/lib/index.js +19 -1349
- package/lib/index.js.map +1 -1
- package/package.json +2 -3
- package/src/interfaces/augment-api-consts.ts +20 -20
- package/src/interfaces/augment-api-errors.ts +111 -25
- package/src/interfaces/augment-api-events.ts +162 -107
- package/src/interfaces/augment-api-query.ts +104 -75
- package/src/interfaces/augment-api-tx.ts +64 -87
- package/src/interfaces/lookup.ts +470 -406
- package/src/interfaces/registry.ts +14 -8
- package/src/interfaces/types-lookup.ts +518 -464
|
@@ -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,204 @@ declare module '@polkadot/api-base/types/events' {
|
|
|
311
311
|
{ who: AccountId32; amount: u128 }
|
|
312
312
|
>;
|
|
313
313
|
};
|
|
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<
|
|
327
|
+
ApiType,
|
|
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
|
+
}
|
|
378
|
+
>;
|
|
379
|
+
};
|
|
314
380
|
bitcoinLocks: {
|
|
315
381
|
BitcoinCosignPastDue: AugmentedEvent<
|
|
316
382
|
ApiType,
|
|
317
|
-
[
|
|
318
|
-
{
|
|
383
|
+
[lockId: u64, vaultId: u32, compensationAmount: u128, compensatedAccountId: AccountId32],
|
|
384
|
+
{ lockId: u64; vaultId: u32; compensationAmount: u128; compensatedAccountId: AccountId32 }
|
|
319
385
|
>;
|
|
320
386
|
BitcoinLockBurned: AugmentedEvent<
|
|
321
387
|
ApiType,
|
|
322
|
-
[
|
|
323
|
-
{
|
|
388
|
+
[lockId: u64, vaultId: u32, wasUtxoSpent: bool],
|
|
389
|
+
{ lockId: u64; vaultId: u32; wasUtxoSpent: bool }
|
|
324
390
|
>;
|
|
325
391
|
BitcoinLockCreated: AugmentedEvent<
|
|
326
392
|
ApiType,
|
|
327
393
|
[
|
|
328
|
-
|
|
394
|
+
lockId: u64,
|
|
329
395
|
vaultId: u32,
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
lockedTargetPrice: u128,
|
|
396
|
+
securitizationBasis: ArgonPrimitivesVaultBitcoinSecuritizationBasis,
|
|
397
|
+
collateralRequired: u128,
|
|
333
398
|
accountId: AccountId32,
|
|
334
399
|
securityFee: u128,
|
|
335
400
|
],
|
|
336
401
|
{
|
|
337
|
-
|
|
402
|
+
lockId: u64;
|
|
338
403
|
vaultId: u32;
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
lockedTargetPrice: u128;
|
|
404
|
+
securitizationBasis: ArgonPrimitivesVaultBitcoinSecuritizationBasis;
|
|
405
|
+
collateralRequired: u128;
|
|
342
406
|
accountId: AccountId32;
|
|
343
407
|
securityFee: u128;
|
|
344
408
|
}
|
|
345
409
|
>;
|
|
346
410
|
BitcoinLockFlexibleChanged: AugmentedEvent<
|
|
347
411
|
ApiType,
|
|
348
|
-
[
|
|
349
|
-
{
|
|
412
|
+
[lockId: u64, vaultId: u32, isFlexible: bool],
|
|
413
|
+
{ lockId: u64; vaultId: u32; isFlexible: bool }
|
|
350
414
|
>;
|
|
351
|
-
|
|
415
|
+
BitcoinLockResecuritized: AugmentedEvent<
|
|
352
416
|
ApiType,
|
|
353
417
|
[
|
|
354
|
-
|
|
418
|
+
lockId: u64,
|
|
355
419
|
vaultId: u32,
|
|
356
|
-
|
|
357
|
-
oldTargetPrice: u128,
|
|
358
|
-
securityFee: u128,
|
|
359
|
-
newTargetPrice: u128,
|
|
360
|
-
amountBurned: u128,
|
|
420
|
+
securitizationBasis: ArgonPrimitivesVaultBitcoinSecuritizationBasis,
|
|
361
421
|
accountId: AccountId32,
|
|
362
422
|
],
|
|
363
423
|
{
|
|
364
|
-
|
|
424
|
+
lockId: u64;
|
|
365
425
|
vaultId: u32;
|
|
366
|
-
|
|
367
|
-
oldTargetPrice: u128;
|
|
368
|
-
securityFee: u128;
|
|
369
|
-
newTargetPrice: u128;
|
|
370
|
-
amountBurned: u128;
|
|
426
|
+
securitizationBasis: ArgonPrimitivesVaultBitcoinSecuritizationBasis;
|
|
371
427
|
accountId: AccountId32;
|
|
372
428
|
}
|
|
373
429
|
>;
|
|
374
430
|
BitcoinSpentAfterRelease: AugmentedEvent<
|
|
375
431
|
ApiType,
|
|
376
|
-
[
|
|
377
|
-
{
|
|
432
|
+
[lockId: u64, vaultId: u32],
|
|
433
|
+
{ lockId: u64; vaultId: u32 }
|
|
378
434
|
>;
|
|
379
435
|
BitcoinUtxoCosigned: AugmentedEvent<
|
|
380
436
|
ApiType,
|
|
381
|
-
[
|
|
382
|
-
{
|
|
437
|
+
[lockId: u64, vaultId: u32, signatures: Vec<Bytes>],
|
|
438
|
+
{ lockId: u64; vaultId: u32; signatures: Vec<Bytes> }
|
|
383
439
|
>;
|
|
384
440
|
BitcoinUtxoCosignRequested: AugmentedEvent<
|
|
385
441
|
ApiType,
|
|
386
|
-
[
|
|
387
|
-
{
|
|
442
|
+
[lockId: u64, vaultId: u32],
|
|
443
|
+
{ lockId: u64; vaultId: u32 }
|
|
388
444
|
>;
|
|
389
445
|
/**
|
|
390
446
|
* An error occurred while refunding an overdue cosigned bitcoin lock
|
|
391
447
|
**/
|
|
392
448
|
CosignOverdueError: AugmentedEvent<
|
|
393
449
|
ApiType,
|
|
394
|
-
[
|
|
395
|
-
{
|
|
450
|
+
[lockId: u64, error: SpRuntimeDispatchError],
|
|
451
|
+
{ lockId: u64; error: SpRuntimeDispatchError }
|
|
396
452
|
>;
|
|
397
453
|
/**
|
|
398
454
|
* An error occurred while completing a lock
|
|
399
455
|
**/
|
|
400
456
|
LockExpirationError: AugmentedEvent<
|
|
401
457
|
ApiType,
|
|
402
|
-
[
|
|
403
|
-
{
|
|
458
|
+
[lockId: u64, error: SpRuntimeDispatchError],
|
|
459
|
+
{ lockId: u64; error: SpRuntimeDispatchError }
|
|
460
|
+
>;
|
|
461
|
+
/**
|
|
462
|
+
* Not all orphaned UTXOs for a retired Lock fit in the cleanup schedule.
|
|
463
|
+
**/
|
|
464
|
+
OrphanedUtxoCleanupScheduleOverflow: AugmentedEvent<
|
|
465
|
+
ApiType,
|
|
466
|
+
[accountId: AccountId32, lockId: u64, expirationFrame: u64],
|
|
467
|
+
{ accountId: AccountId32; lockId: u64; expirationFrame: u64 }
|
|
404
468
|
>;
|
|
405
469
|
OrphanedUtxoCosigned: AugmentedEvent<
|
|
406
470
|
ApiType,
|
|
407
471
|
[
|
|
408
|
-
|
|
472
|
+
lockId: u64,
|
|
409
473
|
utxoRef: ArgonPrimitivesBitcoinUtxoRef,
|
|
410
474
|
vaultId: u32,
|
|
411
475
|
accountId: AccountId32,
|
|
412
476
|
signature: Bytes,
|
|
413
477
|
],
|
|
414
478
|
{
|
|
415
|
-
|
|
479
|
+
lockId: u64;
|
|
416
480
|
utxoRef: ArgonPrimitivesBitcoinUtxoRef;
|
|
417
481
|
vaultId: u32;
|
|
418
482
|
accountId: AccountId32;
|
|
419
483
|
signature: Bytes;
|
|
420
484
|
}
|
|
421
485
|
>;
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
>;
|
|
427
|
-
OrphanedUtxoReleaseRequested: AugmentedEvent<
|
|
486
|
+
/**
|
|
487
|
+
* An orphaned UTXO expiration could not reconcile its pending Vault cosign state.
|
|
488
|
+
**/
|
|
489
|
+
OrphanedUtxoExpirationError: AugmentedEvent<
|
|
428
490
|
ApiType,
|
|
429
|
-
[
|
|
491
|
+
[
|
|
492
|
+
accountId: AccountId32,
|
|
493
|
+
utxoRef: ArgonPrimitivesBitcoinUtxoRef,
|
|
494
|
+
error: SpRuntimeDispatchError,
|
|
495
|
+
],
|
|
430
496
|
{
|
|
431
|
-
utxoId: u64;
|
|
432
|
-
utxoRef: ArgonPrimitivesBitcoinUtxoRef;
|
|
433
|
-
vaultId: u32;
|
|
434
497
|
accountId: AccountId32;
|
|
498
|
+
utxoRef: ArgonPrimitivesBitcoinUtxoRef;
|
|
499
|
+
error: SpRuntimeDispatchError;
|
|
435
500
|
}
|
|
436
501
|
>;
|
|
437
|
-
|
|
502
|
+
OrphanedUtxoReceived: AugmentedEvent<
|
|
438
503
|
ApiType,
|
|
439
|
-
[
|
|
440
|
-
{
|
|
504
|
+
[lockId: u64, utxoRef: ArgonPrimitivesBitcoinUtxoRef, vaultId: u32, satoshis: u64],
|
|
505
|
+
{ lockId: u64; utxoRef: ArgonPrimitivesBitcoinUtxoRef; vaultId: u32; satoshis: u64 }
|
|
441
506
|
>;
|
|
442
|
-
|
|
507
|
+
OrphanedUtxoReleaseRequested: AugmentedEvent<
|
|
443
508
|
ApiType,
|
|
444
|
-
[
|
|
509
|
+
[lockId: u64, utxoRef: ArgonPrimitivesBitcoinUtxoRef, vaultId: u32, accountId: AccountId32],
|
|
445
510
|
{
|
|
446
|
-
|
|
511
|
+
lockId: u64;
|
|
447
512
|
utxoRef: ArgonPrimitivesBitcoinUtxoRef;
|
|
448
513
|
vaultId: u32;
|
|
449
514
|
accountId: AccountId32;
|
|
@@ -451,47 +516,37 @@ declare module '@polkadot/api-base/types/events' {
|
|
|
451
516
|
>;
|
|
452
517
|
};
|
|
453
518
|
bitcoinUtxos: {
|
|
454
|
-
|
|
519
|
+
UtxoDetected: AugmentedEvent<
|
|
455
520
|
ApiType,
|
|
456
521
|
[
|
|
457
|
-
|
|
522
|
+
lockId: u64,
|
|
458
523
|
utxoRef: ArgonPrimitivesBitcoinUtxoRef,
|
|
459
|
-
rejectedReason: ArgonPrimitivesBitcoinBitcoinRejectedReason,
|
|
460
524
|
satoshisReceived: u64,
|
|
525
|
+
bitcoinHeight: u64,
|
|
461
526
|
],
|
|
462
527
|
{
|
|
463
|
-
|
|
528
|
+
lockId: u64;
|
|
464
529
|
utxoRef: ArgonPrimitivesBitcoinUtxoRef;
|
|
465
|
-
rejectedReason: ArgonPrimitivesBitcoinBitcoinRejectedReason;
|
|
466
530
|
satoshisReceived: u64;
|
|
531
|
+
bitcoinHeight: u64;
|
|
467
532
|
}
|
|
468
533
|
>;
|
|
469
|
-
|
|
534
|
+
UtxoDetectedError: AugmentedEvent<
|
|
470
535
|
ApiType,
|
|
471
|
-
[
|
|
472
|
-
{
|
|
536
|
+
[lockId: u64, error: SpRuntimeDispatchError],
|
|
537
|
+
{ lockId: u64; error: SpRuntimeDispatchError }
|
|
473
538
|
>;
|
|
474
539
|
UtxoSpent: AugmentedEvent<
|
|
475
540
|
ApiType,
|
|
476
|
-
[
|
|
477
|
-
{
|
|
541
|
+
[lockId: u64, utxoRef: ArgonPrimitivesBitcoinUtxoRef, blockHeight: u64],
|
|
542
|
+
{ lockId: u64; utxoRef: ArgonPrimitivesBitcoinUtxoRef; blockHeight: u64 }
|
|
478
543
|
>;
|
|
479
544
|
UtxoSpentError: AugmentedEvent<
|
|
480
545
|
ApiType,
|
|
481
|
-
[
|
|
482
|
-
{
|
|
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 }
|
|
546
|
+
[lockId: u64, error: SpRuntimeDispatchError],
|
|
547
|
+
{ lockId: u64; error: SpRuntimeDispatchError }
|
|
494
548
|
>;
|
|
549
|
+
UtxoUnwatched: AugmentedEvent<ApiType, [lockId: u64], { lockId: u64 }>;
|
|
495
550
|
};
|
|
496
551
|
blockRewards: {
|
|
497
552
|
RewardCreated: AugmentedEvent<
|
|
@@ -1104,8 +1159,8 @@ declare module '@polkadot/api-base/types/events' {
|
|
|
1104
1159
|
**/
|
|
1105
1160
|
BitcoinMint: AugmentedEvent<
|
|
1106
1161
|
ApiType,
|
|
1107
|
-
[accountId: AccountId32,
|
|
1108
|
-
{ accountId: AccountId32;
|
|
1162
|
+
[accountId: AccountId32, fissionId: u64, lockId: Option<u64>, amount: u128],
|
|
1163
|
+
{ accountId: AccountId32; fissionId: u64; lockId: Option<u64>; amount: u128 }
|
|
1109
1164
|
>;
|
|
1110
1165
|
/**
|
|
1111
1166
|
* The amount of microgons minted for mining. NOTE: accounts below Existential Deposit
|
|
@@ -1125,14 +1180,16 @@ declare module '@polkadot/api-base/types/events' {
|
|
|
1125
1180
|
[
|
|
1126
1181
|
mintType: PalletMintMintType,
|
|
1127
1182
|
accountId: AccountId32,
|
|
1128
|
-
|
|
1183
|
+
fissionId: Option<u64>,
|
|
1184
|
+
lockId: Option<u64>,
|
|
1129
1185
|
amount: u128,
|
|
1130
1186
|
error: SpRuntimeDispatchError,
|
|
1131
1187
|
],
|
|
1132
1188
|
{
|
|
1133
1189
|
mintType: PalletMintMintType;
|
|
1134
1190
|
accountId: AccountId32;
|
|
1135
|
-
|
|
1191
|
+
fissionId: Option<u64>;
|
|
1192
|
+
lockId: Option<u64>;
|
|
1136
1193
|
amount: u128;
|
|
1137
1194
|
error: SpRuntimeDispatchError;
|
|
1138
1195
|
}
|
|
@@ -2106,30 +2163,6 @@ declare module '@polkadot/api-base/types/events' {
|
|
|
2106
2163
|
[vaultId: u32, operatorAccountId: AccountId32, amount: u128],
|
|
2107
2164
|
{ vaultId: u32; operatorAccountId: AccountId32; amount: u128 }
|
|
2108
2165
|
>;
|
|
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
2166
|
FundsReleased: AugmentedEvent<
|
|
2134
2167
|
ApiType,
|
|
2135
2168
|
[vaultId: u32, securitization: u128],
|
|
@@ -2155,6 +2188,28 @@ declare module '@polkadot/api-base/types/events' {
|
|
|
2155
2188
|
[vaultId: u32, reservedSecuritizationSpace: u128],
|
|
2156
2189
|
{ vaultId: u32; reservedSecuritizationSpace: u128 }
|
|
2157
2190
|
>;
|
|
2191
|
+
SecuritizationReserved: AugmentedEvent<
|
|
2192
|
+
ApiType,
|
|
2193
|
+
[
|
|
2194
|
+
vaultId: u32,
|
|
2195
|
+
locker: AccountId32,
|
|
2196
|
+
securitizationCoverageMicrogons: u128,
|
|
2197
|
+
feeRevenue: u128,
|
|
2198
|
+
didUseFeeCoupon: bool,
|
|
2199
|
+
],
|
|
2200
|
+
{
|
|
2201
|
+
vaultId: u32;
|
|
2202
|
+
locker: AccountId32;
|
|
2203
|
+
securitizationCoverageMicrogons: u128;
|
|
2204
|
+
feeRevenue: u128;
|
|
2205
|
+
didUseFeeCoupon: bool;
|
|
2206
|
+
}
|
|
2207
|
+
>;
|
|
2208
|
+
SecuritizationReturned: AugmentedEvent<
|
|
2209
|
+
ApiType,
|
|
2210
|
+
[vaultId: u32, amount: u128],
|
|
2211
|
+
{ vaultId: u32; amount: u128 }
|
|
2212
|
+
>;
|
|
2158
2213
|
TreasuryRecordingError: AugmentedEvent<
|
|
2159
2214
|
ApiType,
|
|
2160
2215
|
[vaultId: u32, frameId: u64, vaultEarnings: u128, error: SpRuntimeDispatchError],
|