@argonprotocol/mainchain 1.4.10-dev.d386c4ce → 1.4.10-dev.f355ccc1
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 +3857 -262
- package/browser/index.js +52 -16
- package/browser/index.js.map +1 -1
- package/lib/index.cjs +75 -39
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +3857 -262
- package/lib/index.d.ts +3857 -262
- package/lib/index.js +52 -16
- package/lib/index.js.map +1 -1
- package/package.json +7 -4
- package/src/interfaces/augment-api-consts.ts +4 -13
- package/src/interfaces/augment-api-errors.ts +33 -5
- package/src/interfaces/augment-api-query.ts +22 -10
- package/src/interfaces/augment-api-tx.ts +9 -29
- package/src/interfaces/lookup.ts +211 -205
- package/src/interfaces/registry.ts +2 -2
- package/src/interfaces/types-lookup.ts +223 -212
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argonprotocol/mainchain",
|
|
3
|
-
"version": "1.4.10-dev.
|
|
3
|
+
"version": "1.4.10-dev.f355ccc1",
|
|
4
4
|
"description": "A client for accessing the Argon mainchain apis.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,11 +14,14 @@
|
|
|
14
14
|
"homepage": "https://github.com/argonprotocol/mainchain#readme",
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "yarn generate:defs && yarn generate:meta && node clean-build.js && yarn tsc",
|
|
17
|
+
"generate:contract-declarations": "tsc -p tsconfig.contracts.json",
|
|
17
18
|
"generate:defs": "polkadot-types-from-defs --endpoint metadata.json --input ./src/interfaces --package @argonprotocol/mainchain/interfaces",
|
|
18
19
|
"generate:meta": "polkadot-types-from-chain --endpoint metadata.json --output ./src/interfaces --package @argonprotocol/mainchain/interfaces --strict",
|
|
19
20
|
"test": "vitest --run --config vitest.config.ts",
|
|
20
|
-
"tsc": "yarn workspace @argonprotocol/ethereum-contracts build && tsup",
|
|
21
|
-
"
|
|
21
|
+
"tsc": "yarn workspace @argonprotocol/ethereum-contracts build && yarn generate:contract-declarations && tsup && yarn validate:package",
|
|
22
|
+
"tsup": "yarn tsc",
|
|
23
|
+
"validate:package": "tsx src/scripts/validatePackage.ts",
|
|
24
|
+
"watch": "yarn generate:contract-declarations && tsup --watch",
|
|
22
25
|
"typecheck": "tsc --noEmit -p tsconfig.test.json"
|
|
23
26
|
},
|
|
24
27
|
"files": [
|
|
@@ -65,7 +68,7 @@
|
|
|
65
68
|
},
|
|
66
69
|
"devDependencies": {
|
|
67
70
|
"@argonprotocol/ethereum-contracts": "workspace:*",
|
|
68
|
-
"@argonprotocol/testing": "1.4.10-dev.
|
|
71
|
+
"@argonprotocol/testing": "1.4.10-dev.f355ccc1",
|
|
69
72
|
"@polkadot/typegen": "^16.5.6",
|
|
70
73
|
"@substrate/ss58-registry": "^1.51.0",
|
|
71
74
|
"@types/node": "^20",
|
|
@@ -375,6 +375,10 @@ declare module '@polkadot/api-base/types/consts' {
|
|
|
375
375
|
* becomes operational.
|
|
376
376
|
**/
|
|
377
377
|
bitcoinLockSizeForAccessCode: u128 & AugmentedConst<ApiType>;
|
|
378
|
+
/**
|
|
379
|
+
* Maximum number of accrued access codes awarded at one frame boundary.
|
|
380
|
+
**/
|
|
381
|
+
maxAccessCodeAwardsPerFrame: u32 & AugmentedConst<ApiType>;
|
|
378
382
|
/**
|
|
379
383
|
* Maximum number of available access codes allowed at once.
|
|
380
384
|
**/
|
|
@@ -646,11 +650,6 @@ declare module '@polkadot/api-base/types/consts' {
|
|
|
646
650
|
batchedCallsLimit: u32 & AugmentedConst<ApiType>;
|
|
647
651
|
};
|
|
648
652
|
vaults: {
|
|
649
|
-
/**
|
|
650
|
-
* One no-fee stale `initialize_for` failure is allowed for each this-many units of lost
|
|
651
|
-
* `available_for_lock`.
|
|
652
|
-
**/
|
|
653
|
-
capacityDropAttemptUnit: u128 & AugmentedConst<ApiType>;
|
|
654
653
|
/**
|
|
655
654
|
* Max concurrent cosigns pending per vault
|
|
656
655
|
**/
|
|
@@ -659,10 +658,6 @@ declare module '@polkadot/api-base/types/consts' {
|
|
|
659
658
|
* The max pending vault term changes per block
|
|
660
659
|
**/
|
|
661
660
|
maxPendingTermModificationsPerTick: u32 & AugmentedConst<ApiType>;
|
|
662
|
-
/**
|
|
663
|
-
* Maximum number of recent `available_for_lock` drops retained per vault.
|
|
664
|
-
**/
|
|
665
|
-
maxRecentCapacityDropsPerVault: u32 & AugmentedConst<ApiType>;
|
|
666
661
|
/**
|
|
667
662
|
* The max number of vaults that can be created
|
|
668
663
|
**/
|
|
@@ -675,10 +670,6 @@ declare module '@polkadot/api-base/types/consts' {
|
|
|
675
670
|
* Minimum vault securitization required while the operational floor lock is active.
|
|
676
671
|
**/
|
|
677
672
|
operationalMinimumVaultSecuritization: u128 & AugmentedConst<ApiType>;
|
|
678
|
-
/**
|
|
679
|
-
* Number of Argon blocks to keep recent `available_for_lock` drops for stale init checks.
|
|
680
|
-
**/
|
|
681
|
-
recentCapacityDropBlockWindow: u32 & AugmentedConst<ApiType>;
|
|
682
673
|
/**
|
|
683
674
|
* The number of frames within which revenue must be collected
|
|
684
675
|
**/
|
|
@@ -98,6 +98,30 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
98
98
|
* An overflow occurred recording a lock expiration
|
|
99
99
|
**/
|
|
100
100
|
ExpirationAtBlockOverflow: AugmentedError<ApiType>;
|
|
101
|
+
/**
|
|
102
|
+
* The fee coupon nonce has already been consumed or superseded.
|
|
103
|
+
**/
|
|
104
|
+
FeeCouponAlreadyUsed: AugmentedError<ApiType>;
|
|
105
|
+
/**
|
|
106
|
+
* The fee coupon is past its expiration frame.
|
|
107
|
+
**/
|
|
108
|
+
FeeCouponExpired: AugmentedError<ApiType>;
|
|
109
|
+
/**
|
|
110
|
+
* Fee coupons can only be applied when initializing a lock.
|
|
111
|
+
**/
|
|
112
|
+
FeeCouponOnlyForInitialization: AugmentedError<ApiType>;
|
|
113
|
+
/**
|
|
114
|
+
* The fee coupon was issued for a different beneficiary.
|
|
115
|
+
**/
|
|
116
|
+
FeeCouponWrongAccount: AugmentedError<ApiType>;
|
|
117
|
+
/**
|
|
118
|
+
* The fee coupon was issued for a different chain.
|
|
119
|
+
**/
|
|
120
|
+
FeeCouponWrongChain: AugmentedError<ApiType>;
|
|
121
|
+
/**
|
|
122
|
+
* The fee coupon was issued for a different vault.
|
|
123
|
+
**/
|
|
124
|
+
FeeCouponWrongVault: AugmentedError<ApiType>;
|
|
101
125
|
/**
|
|
102
126
|
* Cannot request an orphaned release for the funding UTXO
|
|
103
127
|
**/
|
|
@@ -124,6 +148,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
124
148
|
* The bitcoin script to lock this bitcoin has errors
|
|
125
149
|
**/
|
|
126
150
|
InvalidBitcoinScript: AugmentedError<ApiType>;
|
|
151
|
+
/**
|
|
152
|
+
* The fee coupon was not signed by the vault delegate.
|
|
153
|
+
**/
|
|
154
|
+
InvalidFeeCouponSignature: AugmentedError<ApiType>;
|
|
127
155
|
/**
|
|
128
156
|
* Funding would result in an overflow of the balance type
|
|
129
157
|
**/
|
|
@@ -1012,6 +1040,11 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
1012
1040
|
* One of the linked account ownership proofs is invalid.
|
|
1013
1041
|
**/
|
|
1014
1042
|
InvalidAccountProof: AugmentedError<ApiType>;
|
|
1043
|
+
/**
|
|
1044
|
+
* Profile names must start with an uppercase ASCII letter and otherwise be ASCII
|
|
1045
|
+
* alphanumeric.
|
|
1046
|
+
**/
|
|
1047
|
+
InvalidName: AugmentedError<ApiType>;
|
|
1015
1048
|
/**
|
|
1016
1049
|
* The caller is not one of the accounts included in the registration.
|
|
1017
1050
|
**/
|
|
@@ -1375,11 +1408,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
1375
1408
|
* Funding would result in an overflow of the balance type
|
|
1376
1409
|
**/
|
|
1377
1410
|
InvalidVaultAmount: AugmentedError<ApiType>;
|
|
1378
|
-
/**
|
|
1379
|
-
* Vault names must start with an uppercase ASCII letter and otherwise be ASCII
|
|
1380
|
-
* alphanumeric.
|
|
1381
|
-
**/
|
|
1382
|
-
InvalidVaultName: AugmentedError<ApiType>;
|
|
1383
1411
|
/**
|
|
1384
1412
|
* Unable to decode xpubkey
|
|
1385
1413
|
**/
|
|
@@ -109,7 +109,6 @@ import type {
|
|
|
109
109
|
PalletTreasuryFrameArgonotBondParticipants,
|
|
110
110
|
PalletTreasuryFrameVaultCapital,
|
|
111
111
|
PalletTreasuryVaultBondState,
|
|
112
|
-
PalletVaultsRecentCapacityDrop,
|
|
113
112
|
PalletVaultsVaultFrameRevenue,
|
|
114
113
|
SpConsensusGrandpaAppPublic,
|
|
115
114
|
SpRuntimeDigest,
|
|
@@ -211,6 +210,14 @@ declare module '@polkadot/api-base/types/storage' {
|
|
|
211
210
|
totalIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []>;
|
|
212
211
|
};
|
|
213
212
|
bitcoinLocks: {
|
|
213
|
+
lastFeeCouponNonceByVaultAndAccount: AugmentedQuery<
|
|
214
|
+
ApiType,
|
|
215
|
+
(
|
|
216
|
+
arg1: u32 | AnyNumber | Uint8Array,
|
|
217
|
+
arg2: AccountId32 | string | Uint8Array,
|
|
218
|
+
) => Observable<Option<u64>>,
|
|
219
|
+
[u32, AccountId32]
|
|
220
|
+
>;
|
|
214
221
|
/**
|
|
215
222
|
* Utxos that have been requested to be cosigned for releasing
|
|
216
223
|
**/
|
|
@@ -1310,6 +1317,19 @@ declare module '@polkadot/api-base/types/storage' {
|
|
|
1310
1317
|
>;
|
|
1311
1318
|
};
|
|
1312
1319
|
operationalAccounts: {
|
|
1320
|
+
/**
|
|
1321
|
+
* Set of operational accounts that have met both follow-on access-code thresholds.
|
|
1322
|
+
* The key count weights frame processing without scanning the set twice.
|
|
1323
|
+
**/
|
|
1324
|
+
accessCodeReadyAccounts: AugmentedQuery<
|
|
1325
|
+
ApiType,
|
|
1326
|
+
(arg: AccountId32 | string | Uint8Array) => Observable<Option<Null>>,
|
|
1327
|
+
[AccountId32]
|
|
1328
|
+
>;
|
|
1329
|
+
/**
|
|
1330
|
+
* Counter for the related counted storage map
|
|
1331
|
+
**/
|
|
1332
|
+
counterForAccessCodeReadyAccounts: AugmentedQuery<ApiType, () => Observable<u32>, []>;
|
|
1313
1333
|
/**
|
|
1314
1334
|
* Whether operational-account access is invite-only.
|
|
1315
1335
|
*
|
|
@@ -1435,7 +1455,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|
|
1435
1455
|
**/
|
|
1436
1456
|
current: AugmentedQuery<ApiType, () => Observable<Option<PalletPriceIndexPriceIndex>>, []>;
|
|
1437
1457
|
/**
|
|
1438
|
-
* Stores
|
|
1458
|
+
* Stores the latest submitted Ethereum pricing.
|
|
1439
1459
|
**/
|
|
1440
1460
|
currentEthereumPrice: AugmentedQuery<
|
|
1441
1461
|
ApiType,
|
|
@@ -1859,14 +1879,6 @@ declare module '@polkadot/api-base/types/storage' {
|
|
|
1859
1879
|
(arg: u64 | AnyNumber | Uint8Array) => Observable<Vec<u32>>,
|
|
1860
1880
|
[u64]
|
|
1861
1881
|
>;
|
|
1862
|
-
/**
|
|
1863
|
-
* Recent reductions in `available_for_lock`, grouped by vault.
|
|
1864
|
-
**/
|
|
1865
|
-
recentCapacityDropsByVault: AugmentedQuery<
|
|
1866
|
-
ApiType,
|
|
1867
|
-
(arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<PalletVaultsRecentCapacityDrop>>,
|
|
1868
|
-
[u32]
|
|
1869
|
-
>;
|
|
1870
1882
|
/**
|
|
1871
1883
|
* Tracks revenue from Bitcoin Locks and Treasury Pools for the trailing frames for each vault
|
|
1872
1884
|
* (a frame is a "mining day" in Argon). Newest frames are first. Frames are removed after the
|
|
@@ -348,6 +348,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
348
348
|
| Uint8Array
|
|
349
349
|
| PalletBitcoinLocksLockOptions
|
|
350
350
|
| { V1: any }
|
|
351
|
+
| { V2: any }
|
|
351
352
|
| string,
|
|
352
353
|
) => SubmittableExtrinsic<ApiType>,
|
|
353
354
|
[
|
|
@@ -357,30 +358,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
357
358
|
Option<PalletBitcoinLocksLockOptions>,
|
|
358
359
|
]
|
|
359
360
|
>;
|
|
360
|
-
initializeFor: AugmentedSubmittable<
|
|
361
|
-
(
|
|
362
|
-
accountId: AccountId32 | string | Uint8Array,
|
|
363
|
-
vaultId: u32 | AnyNumber | Uint8Array,
|
|
364
|
-
satoshis: Compact<u64> | AnyNumber | Uint8Array,
|
|
365
|
-
bitcoinPubkey: ArgonPrimitivesBitcoinCompressedBitcoinPubkey | string | Uint8Array,
|
|
366
|
-
options:
|
|
367
|
-
| Option<PalletBitcoinLocksLockOptions>
|
|
368
|
-
| null
|
|
369
|
-
| Uint8Array
|
|
370
|
-
| PalletBitcoinLocksLockOptions
|
|
371
|
-
| { V1: any }
|
|
372
|
-
| string,
|
|
373
|
-
backfillSecuritizationToUnreserve: Compact<u128> | AnyNumber | Uint8Array,
|
|
374
|
-
) => SubmittableExtrinsic<ApiType>,
|
|
375
|
-
[
|
|
376
|
-
AccountId32,
|
|
377
|
-
u32,
|
|
378
|
-
Compact<u64>,
|
|
379
|
-
ArgonPrimitivesBitcoinCompressedBitcoinPubkey,
|
|
380
|
-
Option<PalletBitcoinLocksLockOptions>,
|
|
381
|
-
Compact<u128>,
|
|
382
|
-
]
|
|
383
|
-
>;
|
|
384
361
|
/**
|
|
385
362
|
* Ratcheting allows a user to change the lock price of their bitcoin lock. This is
|
|
386
363
|
* functionally the same as releasing and re-initializing, but it allows a user to skip
|
|
@@ -406,6 +383,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
406
383
|
| Uint8Array
|
|
407
384
|
| PalletBitcoinLocksLockOptions
|
|
408
385
|
| { V1: any }
|
|
386
|
+
| { V2: any }
|
|
409
387
|
| string,
|
|
410
388
|
) => SubmittableExtrinsic<ApiType>,
|
|
411
389
|
[u64, Option<PalletBitcoinLocksLockOptions>]
|
|
@@ -1219,6 +1197,13 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
1219
1197
|
) => SubmittableExtrinsic<ApiType>,
|
|
1220
1198
|
[PalletOperationalAccountsRegistration]
|
|
1221
1199
|
>;
|
|
1200
|
+
/**
|
|
1201
|
+
* Update the display name on an operational account profile.
|
|
1202
|
+
**/
|
|
1203
|
+
setName: AugmentedSubmittable<
|
|
1204
|
+
(name: Option<Bytes> | null | Uint8Array | Bytes | string) => SubmittableExtrinsic<ApiType>,
|
|
1205
|
+
[Option<Bytes>]
|
|
1206
|
+
>;
|
|
1222
1207
|
/**
|
|
1223
1208
|
* Update certification reward amounts for operational accounts.
|
|
1224
1209
|
**/
|
|
@@ -2318,7 +2303,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
2318
2303
|
| PalletVaultsVaultConfig
|
|
2319
2304
|
| {
|
|
2320
2305
|
terms?: any;
|
|
2321
|
-
name?: any;
|
|
2322
2306
|
delegateAccountId?: any;
|
|
2323
2307
|
securitization?: any;
|
|
2324
2308
|
bitcoinXpubkey?: any;
|
|
@@ -2396,10 +2380,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
2396
2380
|
) => SubmittableExtrinsic<ApiType>,
|
|
2397
2381
|
[Option<AccountId32>]
|
|
2398
2382
|
>;
|
|
2399
|
-
setName: AugmentedSubmittable<
|
|
2400
|
-
(name: Option<Bytes> | null | Uint8Array | Bytes | string) => SubmittableExtrinsic<ApiType>,
|
|
2401
|
-
[Option<Bytes>]
|
|
2402
|
-
>;
|
|
2403
2383
|
};
|
|
2404
2384
|
} // AugmentedSubmittables
|
|
2405
2385
|
} // declare module
|