@argonprotocol/mainchain 1.4.12-dev.a58731c1 → 1.4.12-dev.b20a0f08
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/browser/index.d.ts +172 -112
- package/browser/index.js +1 -1
- package/browser/index.js.map +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +172 -112
- package/lib/index.d.ts +172 -112
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
- package/src/interfaces/augment-api-consts.ts +0 -1
- package/src/interfaces/augment-api-errors.ts +16 -0
- package/src/interfaces/augment-api-events.ts +20 -8
- package/src/interfaces/augment-api-query.ts +17 -4
- package/src/interfaces/augment-api-runtime.ts +0 -1
- package/src/interfaces/augment-api-tx.ts +10 -9
- package/src/interfaces/augment-api.ts +0 -1
- package/src/interfaces/augment-types.ts +0 -1
- package/src/interfaces/lookup.ts +128 -100
- package/src/interfaces/registry.ts +8 -5
- package/src/interfaces/types-lookup.ts +130 -97
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argonprotocol/mainchain",
|
|
3
|
-
"version": "1.4.12-dev.
|
|
3
|
+
"version": "1.4.12-dev.b20a0f08",
|
|
4
4
|
"description": "A client for accessing the Argon mainchain apis.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@argonprotocol/ethereum-contracts": "workspace:*",
|
|
70
|
-
"@argonprotocol/testing": "1.4.12-dev.
|
|
70
|
+
"@argonprotocol/testing": "1.4.12-dev.b20a0f08",
|
|
71
71
|
"@polkadot/typegen": "^16.5.6",
|
|
72
72
|
"@substrate/ss58-registry": "^1.51.0",
|
|
73
73
|
"@types/node": "^20",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"tsup": "^8.5.0",
|
|
76
76
|
"tsx": "^4.20.4",
|
|
77
77
|
"typescript": "^5.9.2",
|
|
78
|
-
"vitest": "^
|
|
78
|
+
"vitest": "^5.0.0"
|
|
79
79
|
},
|
|
80
80
|
"packageManager": "yarn@4.1.0"
|
|
81
81
|
}
|
|
@@ -160,6 +160,14 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
160
160
|
* This bitcoin pubkey couldn't be decoded for release
|
|
161
161
|
**/
|
|
162
162
|
BitcoinPubkeyUnableToBeDecoded: AugmentedError<ApiType>;
|
|
163
|
+
/**
|
|
164
|
+
* A partial release would leave less than the minimum watched Lock amount.
|
|
165
|
+
**/
|
|
166
|
+
BitcoinReleaseChangeBelowMinimum: AugmentedError<ApiType>;
|
|
167
|
+
/**
|
|
168
|
+
* The release destination cannot be the Lock's own script.
|
|
169
|
+
**/
|
|
170
|
+
BitcoinReleaseDestinationIsLockScript: AugmentedError<ApiType>;
|
|
163
171
|
/**
|
|
164
172
|
* The bitcoin has passed the deadline to release it
|
|
165
173
|
**/
|
|
@@ -218,6 +226,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
218
226
|
**/
|
|
219
227
|
InsufficientSecuritizationForFissions: AugmentedError<ApiType>;
|
|
220
228
|
InsufficientVaultFunds: AugmentedError<ApiType>;
|
|
229
|
+
/**
|
|
230
|
+
* The external destination amount must be nonzero and fit with the network fee.
|
|
231
|
+
**/
|
|
232
|
+
InvalidBitcoinReleaseAmount: AugmentedError<ApiType>;
|
|
221
233
|
/**
|
|
222
234
|
* The bitcoin script to lock this bitcoin has errors
|
|
223
235
|
**/
|
|
@@ -258,6 +270,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
258
270
|
* The requested price-history entry predates the Lock's current securitization.
|
|
259
271
|
**/
|
|
260
272
|
MicrogonsAtTargetPerBtcTickOlderThanCurrent: AugmentedError<ApiType>;
|
|
273
|
+
/**
|
|
274
|
+
* The minimum cannot increase while a release is pending.
|
|
275
|
+
**/
|
|
276
|
+
MinimumSatoshisIncreaseBlockedByPendingRelease: AugmentedError<ApiType>;
|
|
261
277
|
/**
|
|
262
278
|
* The price provider has no bitcoin prices available. This is a temporary error
|
|
263
279
|
**/
|
|
@@ -380,8 +380,20 @@ declare module '@polkadot/api-base/types/events' {
|
|
|
380
380
|
bitcoinLocks: {
|
|
381
381
|
BitcoinCosignPastDue: AugmentedEvent<
|
|
382
382
|
ApiType,
|
|
383
|
-
[
|
|
384
|
-
|
|
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
|
+
}
|
|
385
397
|
>;
|
|
386
398
|
BitcoinLockBurned: AugmentedEvent<
|
|
387
399
|
ApiType,
|
|
@@ -429,18 +441,18 @@ declare module '@polkadot/api-base/types/events' {
|
|
|
429
441
|
>;
|
|
430
442
|
BitcoinSpentAfterRelease: AugmentedEvent<
|
|
431
443
|
ApiType,
|
|
432
|
-
[lockId: u64, vaultId: u32],
|
|
433
|
-
{ lockId: u64; vaultId: u32 }
|
|
444
|
+
[lockId: u64, vaultId: u32, releaseNumber: u32, bitcoinHeight: u64],
|
|
445
|
+
{ lockId: u64; vaultId: u32; releaseNumber: u32; bitcoinHeight: u64 }
|
|
434
446
|
>;
|
|
435
447
|
BitcoinUtxoCosigned: AugmentedEvent<
|
|
436
448
|
ApiType,
|
|
437
|
-
[lockId: u64, vaultId: u32, signatures: Vec<Bytes>],
|
|
438
|
-
{ lockId: u64; vaultId: u32; signatures: Vec<Bytes> }
|
|
449
|
+
[lockId: u64, vaultId: u32, releaseNumber: u32, signatures: Vec<Bytes>],
|
|
450
|
+
{ lockId: u64; vaultId: u32; releaseNumber: u32; signatures: Vec<Bytes> }
|
|
439
451
|
>;
|
|
440
452
|
BitcoinUtxoCosignRequested: AugmentedEvent<
|
|
441
453
|
ApiType,
|
|
442
|
-
[lockId: u64, vaultId: u32],
|
|
443
|
-
{ lockId: u64; vaultId: u32 }
|
|
454
|
+
[lockId: u64, vaultId: u32, releaseNumber: u32],
|
|
455
|
+
{ lockId: u64; vaultId: u32; releaseNumber: u32 }
|
|
444
456
|
>;
|
|
445
457
|
/**
|
|
446
458
|
* An error occurred while refunding an overdue cosigned bitcoin lock
|
|
@@ -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 type lookup before we augment - in some environments
|
|
5
4
|
// this is required to allow for ambient/previous definitions
|
|
@@ -65,9 +64,11 @@ import type {
|
|
|
65
64
|
PalletBalancesBalanceLock,
|
|
66
65
|
PalletBalancesReserveData,
|
|
67
66
|
PalletBitcoinFissionsFission,
|
|
67
|
+
PalletBitcoinLocksLockReleaseCosignHeight,
|
|
68
68
|
PalletBitcoinLocksLockReleaseRequest,
|
|
69
69
|
PalletBitcoinLocksLockedBitcoin,
|
|
70
70
|
PalletBitcoinLocksOrphanedUtxo,
|
|
71
|
+
PalletBitcoinLocksPendingPartialRelease,
|
|
71
72
|
PalletBootstrapEndpointPubkey,
|
|
72
73
|
PalletBootstrapRecoveryPubkey,
|
|
73
74
|
PalletCrosschainTransferAccountTransferTotals,
|
|
@@ -297,15 +298,17 @@ declare module '@polkadot/api-base/types/storage' {
|
|
|
297
298
|
[u32, u64]
|
|
298
299
|
>;
|
|
299
300
|
/**
|
|
300
|
-
*
|
|
301
|
+
* Latest cosigned release for each Lock, retained for signature recovery.
|
|
301
302
|
**/
|
|
302
303
|
lockReleaseCosignHeightById: AugmentedQuery<
|
|
303
304
|
ApiType,
|
|
304
|
-
(
|
|
305
|
+
(
|
|
306
|
+
arg: u64 | AnyNumber | Uint8Array,
|
|
307
|
+
) => Observable<Option<PalletBitcoinLocksLockReleaseCosignHeight>>,
|
|
305
308
|
[u64]
|
|
306
309
|
>;
|
|
307
310
|
/**
|
|
308
|
-
*
|
|
311
|
+
* Release requests awaiting a Vault cosignature.
|
|
309
312
|
**/
|
|
310
313
|
lockReleaseRequestsById: AugmentedQuery<
|
|
311
314
|
ApiType,
|
|
@@ -360,6 +363,16 @@ declare module '@polkadot/api-base/types/storage' {
|
|
|
360
363
|
) => Observable<Option<PalletBitcoinLocksOrphanedUtxo>>,
|
|
361
364
|
[AccountId32, ArgonPrimitivesBitcoinUtxoRef]
|
|
362
365
|
>;
|
|
366
|
+
/**
|
|
367
|
+
* Cosigned partial releases awaiting confirmation on Bitcoin.
|
|
368
|
+
**/
|
|
369
|
+
pendingPartialReleaseByLockId: AugmentedQuery<
|
|
370
|
+
ApiType,
|
|
371
|
+
(
|
|
372
|
+
arg: u64 | AnyNumber | Uint8Array,
|
|
373
|
+
) => Observable<Option<PalletBitcoinLocksPendingPartialRelease>>,
|
|
374
|
+
[u64]
|
|
375
|
+
>;
|
|
363
376
|
/**
|
|
364
377
|
* Lock IDs whose securitization hold expires at the indexed Bitcoin height.
|
|
365
378
|
* Expiry releases only the unactivated portion and leaves the lock address watched.
|
|
@@ -38,7 +38,7 @@ import type {
|
|
|
38
38
|
ArgonPrimitivesBitcoinUtxoRef,
|
|
39
39
|
ArgonPrimitivesDomainZoneRecord,
|
|
40
40
|
ArgonPrimitivesEthereumEthereumReceiptLogProofBatch,
|
|
41
|
-
|
|
41
|
+
ArgonPrimitivesInherentsBitcoinUtxoSyncV2,
|
|
42
42
|
ArgonPrimitivesInherentsBlockSealInherent,
|
|
43
43
|
ArgonPrimitivesNotaryNotaryMeta,
|
|
44
44
|
ArgonPrimitivesNotebookSignedNotebookHeader,
|
|
@@ -341,7 +341,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
341
341
|
/**
|
|
342
342
|
* Submitted by a Vault operator to cosign every input in a Bitcoin Lock release. The
|
|
343
343
|
* signatures must follow ascending `UtxoRef` order: transaction ID, then output index.
|
|
344
|
-
*
|
|
344
|
+
* The Lock remains frozen until the exact cosigned transaction is observed on Bitcoin.
|
|
345
345
|
*
|
|
346
346
|
* This is submitted as a no-fee transaction off chain to allow keys to remain in cold
|
|
347
347
|
* wallets.
|
|
@@ -392,10 +392,10 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
392
392
|
[ArgonPrimitivesBitcoinUtxoRef, Bytes, u64]
|
|
393
393
|
>;
|
|
394
394
|
/**
|
|
395
|
-
* Submitted by a Bitcoin holder to
|
|
396
|
-
*
|
|
397
|
-
*
|
|
398
|
-
* 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.
|
|
399
399
|
*
|
|
400
400
|
* Owner must submit a script pubkey and also a fee to pay to the bitcoin network.
|
|
401
401
|
**/
|
|
@@ -403,9 +403,10 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
403
403
|
(
|
|
404
404
|
lockId: u64 | AnyNumber | Uint8Array,
|
|
405
405
|
toScriptPubkey: Bytes | string | Uint8Array,
|
|
406
|
+
destinationSatoshis: u64 | AnyNumber | Uint8Array,
|
|
406
407
|
bitcoinNetworkFee: u64 | AnyNumber | Uint8Array,
|
|
407
408
|
) => SubmittableExtrinsic<ApiType>,
|
|
408
|
-
[u64, Bytes, u64]
|
|
409
|
+
[u64, Bytes, u64, u64]
|
|
409
410
|
>;
|
|
410
411
|
/**
|
|
411
412
|
* Replace this Lock's BTC coverage and target value for its remaining term.
|
|
@@ -463,12 +464,12 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
463
464
|
sync: AugmentedSubmittable<
|
|
464
465
|
(
|
|
465
466
|
utxoSync:
|
|
466
|
-
|
|
|
467
|
+
| ArgonPrimitivesInherentsBitcoinUtxoSyncV2
|
|
467
468
|
| { spent?: any; funded?: any; syncToBlock?: any }
|
|
468
469
|
| string
|
|
469
470
|
| Uint8Array,
|
|
470
471
|
) => SubmittableExtrinsic<ApiType>,
|
|
471
|
-
[
|
|
472
|
+
[ArgonPrimitivesInherentsBitcoinUtxoSyncV2]
|
|
472
473
|
>;
|
|
473
474
|
};
|
|
474
475
|
blockRewards: {
|