@argonprotocol/mainchain 1.4.10-dev.d4d4d1dd → 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 +3909 -277
- 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 +3909 -277
- package/lib/index.d.ts +3909 -277
- 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 +8 -13
- package/src/interfaces/augment-api-errors.ts +37 -5
- package/src/interfaces/augment-api-query.ts +39 -9
- package/src/interfaces/augment-api-tx.ts +18 -30
- package/src/interfaces/lookup.ts +242 -218
- package/src/interfaces/registry.ts +6 -2
- package/src/interfaces/types-lookup.ts +254 -226
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
|
**/
|
|
@@ -470,6 +474,10 @@ declare module '@polkadot/api-base/types/consts' {
|
|
|
470
474
|
* The maximum number of ticks to preserve a price index
|
|
471
475
|
**/
|
|
472
476
|
maxDowntimeTicksBeforeReset: u64 & AugmentedConst<ApiType>;
|
|
477
|
+
/**
|
|
478
|
+
* Maximum number of per-frame Ethereum price buckets to retain.
|
|
479
|
+
**/
|
|
480
|
+
maxEthereumPriceHistoryFrames: u32 & AugmentedConst<ApiType>;
|
|
473
481
|
/**
|
|
474
482
|
* The oldest history to keep
|
|
475
483
|
**/
|
|
@@ -642,11 +650,6 @@ declare module '@polkadot/api-base/types/consts' {
|
|
|
642
650
|
batchedCallsLimit: u32 & AugmentedConst<ApiType>;
|
|
643
651
|
};
|
|
644
652
|
vaults: {
|
|
645
|
-
/**
|
|
646
|
-
* One no-fee stale `initialize_for` failure is allowed for each this-many units of lost
|
|
647
|
-
* `available_for_lock`.
|
|
648
|
-
**/
|
|
649
|
-
capacityDropAttemptUnit: u128 & AugmentedConst<ApiType>;
|
|
650
653
|
/**
|
|
651
654
|
* Max concurrent cosigns pending per vault
|
|
652
655
|
**/
|
|
@@ -655,10 +658,6 @@ declare module '@polkadot/api-base/types/consts' {
|
|
|
655
658
|
* The max pending vault term changes per block
|
|
656
659
|
**/
|
|
657
660
|
maxPendingTermModificationsPerTick: u32 & AugmentedConst<ApiType>;
|
|
658
|
-
/**
|
|
659
|
-
* Maximum number of recent `available_for_lock` drops retained per vault.
|
|
660
|
-
**/
|
|
661
|
-
maxRecentCapacityDropsPerVault: u32 & AugmentedConst<ApiType>;
|
|
662
661
|
/**
|
|
663
662
|
* The max number of vaults that can be created
|
|
664
663
|
**/
|
|
@@ -671,10 +670,6 @@ declare module '@polkadot/api-base/types/consts' {
|
|
|
671
670
|
* Minimum vault securitization required while the operational floor lock is active.
|
|
672
671
|
**/
|
|
673
672
|
operationalMinimumVaultSecuritization: u128 & AugmentedConst<ApiType>;
|
|
674
|
-
/**
|
|
675
|
-
* Number of Argon blocks to keep recent `available_for_lock` drops for stale init checks.
|
|
676
|
-
**/
|
|
677
|
-
recentCapacityDropBlockWindow: u32 & AugmentedConst<ApiType>;
|
|
678
673
|
/**
|
|
679
674
|
* The number of frames within which revenue must be collected
|
|
680
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
|
**/
|
|
@@ -1116,6 +1149,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
1116
1149
|
VestingBalance: AugmentedError<ApiType>;
|
|
1117
1150
|
};
|
|
1118
1151
|
priceIndex: {
|
|
1152
|
+
/**
|
|
1153
|
+
* Ethereum prices must be non-zero and correspond to the submitted price-index tick.
|
|
1154
|
+
**/
|
|
1155
|
+
InvalidEthereumPrices: AugmentedError<ApiType>;
|
|
1119
1156
|
/**
|
|
1120
1157
|
* Change in argon price is too large
|
|
1121
1158
|
**/
|
|
@@ -1371,11 +1408,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
1371
1408
|
* Funding would result in an overflow of the balance type
|
|
1372
1409
|
**/
|
|
1373
1410
|
InvalidVaultAmount: AugmentedError<ApiType>;
|
|
1374
|
-
/**
|
|
1375
|
-
* Vault names must start with an uppercase ASCII letter and otherwise be ASCII
|
|
1376
|
-
* alphanumeric.
|
|
1377
|
-
**/
|
|
1378
|
-
InvalidVaultName: AugmentedError<ApiType>;
|
|
1379
1411
|
/**
|
|
1380
1412
|
* Unable to decode xpubkey
|
|
1381
1413
|
**/
|
|
@@ -98,6 +98,8 @@ import type {
|
|
|
98
98
|
PalletOperationalAccountsRewardsConfig,
|
|
99
99
|
PalletPriceIndexArgonotAverageFrameAccumulator,
|
|
100
100
|
PalletPriceIndexCpiMeasurementBucket,
|
|
101
|
+
PalletPriceIndexEthereumPriceFrameAccumulator,
|
|
102
|
+
PalletPriceIndexEthereumPriceIndex,
|
|
101
103
|
PalletPriceIndexPriceIndex,
|
|
102
104
|
PalletProxyAnnouncement,
|
|
103
105
|
PalletProxyProxyDefinition,
|
|
@@ -107,7 +109,6 @@ import type {
|
|
|
107
109
|
PalletTreasuryFrameArgonotBondParticipants,
|
|
108
110
|
PalletTreasuryFrameVaultCapital,
|
|
109
111
|
PalletTreasuryVaultBondState,
|
|
110
|
-
PalletVaultsRecentCapacityDrop,
|
|
111
112
|
PalletVaultsVaultFrameRevenue,
|
|
112
113
|
SpConsensusGrandpaAppPublic,
|
|
113
114
|
SpRuntimeDigest,
|
|
@@ -209,6 +210,14 @@ declare module '@polkadot/api-base/types/storage' {
|
|
|
209
210
|
totalIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []>;
|
|
210
211
|
};
|
|
211
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
|
+
>;
|
|
212
221
|
/**
|
|
213
222
|
* Utxos that have been requested to be cosigned for releasing
|
|
214
223
|
**/
|
|
@@ -1308,6 +1317,19 @@ declare module '@polkadot/api-base/types/storage' {
|
|
|
1308
1317
|
>;
|
|
1309
1318
|
};
|
|
1310
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>, []>;
|
|
1311
1333
|
/**
|
|
1312
1334
|
* Whether operational-account access is invite-only.
|
|
1313
1335
|
*
|
|
@@ -1432,6 +1454,14 @@ declare module '@polkadot/api-base/types/storage' {
|
|
|
1432
1454
|
* Stores the active price index
|
|
1433
1455
|
**/
|
|
1434
1456
|
current: AugmentedQuery<ApiType, () => Observable<Option<PalletPriceIndexPriceIndex>>, []>;
|
|
1457
|
+
/**
|
|
1458
|
+
* Stores the latest submitted Ethereum pricing.
|
|
1459
|
+
**/
|
|
1460
|
+
currentEthereumPrice: AugmentedQuery<
|
|
1461
|
+
ApiType,
|
|
1462
|
+
() => Observable<Option<PalletPriceIndexEthereumPriceIndex>>,
|
|
1463
|
+
[]
|
|
1464
|
+
>;
|
|
1435
1465
|
/**
|
|
1436
1466
|
* Accumulates the current frame's Argonot price samples until the frame closes.
|
|
1437
1467
|
**/
|
|
@@ -1464,6 +1494,14 @@ declare module '@polkadot/api-base/types/storage' {
|
|
|
1464
1494
|
() => Observable<BTreeMap<u64, u128>>,
|
|
1465
1495
|
[]
|
|
1466
1496
|
>;
|
|
1497
|
+
/**
|
|
1498
|
+
* Stores per-frame Ethereum price totals used for the trailing averages.
|
|
1499
|
+
**/
|
|
1500
|
+
historicEthereumPricesByFrame: AugmentedQuery<
|
|
1501
|
+
ApiType,
|
|
1502
|
+
() => Observable<BTreeMap<u64, PalletPriceIndexEthereumPriceFrameAccumulator>>,
|
|
1503
|
+
[]
|
|
1504
|
+
>;
|
|
1467
1505
|
/**
|
|
1468
1506
|
* Stores the last valid price index
|
|
1469
1507
|
**/
|
|
@@ -1841,14 +1879,6 @@ declare module '@polkadot/api-base/types/storage' {
|
|
|
1841
1879
|
(arg: u64 | AnyNumber | Uint8Array) => Observable<Vec<u32>>,
|
|
1842
1880
|
[u64]
|
|
1843
1881
|
>;
|
|
1844
|
-
/**
|
|
1845
|
-
* Recent reductions in `available_for_lock`, grouped by vault.
|
|
1846
|
-
**/
|
|
1847
|
-
recentCapacityDropsByVault: AugmentedQuery<
|
|
1848
|
-
ApiType,
|
|
1849
|
-
(arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<PalletVaultsRecentCapacityDrop>>,
|
|
1850
|
-
[u32]
|
|
1851
|
-
>;
|
|
1852
1882
|
/**
|
|
1853
1883
|
* Tracks revenue from Bitcoin Locks and Treasury Pools for the trailing frames for each vault
|
|
1854
1884
|
* (a frame is a "mining day" in Argon). Newest frames are first. Frames are removed after the
|
|
@@ -64,6 +64,7 @@ import type {
|
|
|
64
64
|
PalletMultisigTimepoint,
|
|
65
65
|
PalletOperationalAccountsOperationalProgressPatch,
|
|
66
66
|
PalletOperationalAccountsRegistration,
|
|
67
|
+
PalletPriceIndexEthereumPriceIndex,
|
|
67
68
|
PalletPriceIndexPriceIndex,
|
|
68
69
|
PalletVaultsVaultConfig,
|
|
69
70
|
SnowbridgeBeaconPrimitivesBeaconHeader,
|
|
@@ -347,6 +348,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
347
348
|
| Uint8Array
|
|
348
349
|
| PalletBitcoinLocksLockOptions
|
|
349
350
|
| { V1: any }
|
|
351
|
+
| { V2: any }
|
|
350
352
|
| string,
|
|
351
353
|
) => SubmittableExtrinsic<ApiType>,
|
|
352
354
|
[
|
|
@@ -356,30 +358,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
356
358
|
Option<PalletBitcoinLocksLockOptions>,
|
|
357
359
|
]
|
|
358
360
|
>;
|
|
359
|
-
initializeFor: AugmentedSubmittable<
|
|
360
|
-
(
|
|
361
|
-
accountId: AccountId32 | string | Uint8Array,
|
|
362
|
-
vaultId: u32 | AnyNumber | Uint8Array,
|
|
363
|
-
satoshis: Compact<u64> | AnyNumber | Uint8Array,
|
|
364
|
-
bitcoinPubkey: ArgonPrimitivesBitcoinCompressedBitcoinPubkey | string | Uint8Array,
|
|
365
|
-
options:
|
|
366
|
-
| Option<PalletBitcoinLocksLockOptions>
|
|
367
|
-
| null
|
|
368
|
-
| Uint8Array
|
|
369
|
-
| PalletBitcoinLocksLockOptions
|
|
370
|
-
| { V1: any }
|
|
371
|
-
| string,
|
|
372
|
-
backfillSecuritizationToUnreserve: Compact<u128> | AnyNumber | Uint8Array,
|
|
373
|
-
) => SubmittableExtrinsic<ApiType>,
|
|
374
|
-
[
|
|
375
|
-
AccountId32,
|
|
376
|
-
u32,
|
|
377
|
-
Compact<u64>,
|
|
378
|
-
ArgonPrimitivesBitcoinCompressedBitcoinPubkey,
|
|
379
|
-
Option<PalletBitcoinLocksLockOptions>,
|
|
380
|
-
Compact<u128>,
|
|
381
|
-
]
|
|
382
|
-
>;
|
|
383
361
|
/**
|
|
384
362
|
* Ratcheting allows a user to change the lock price of their bitcoin lock. This is
|
|
385
363
|
* functionally the same as releasing and re-initializing, but it allows a user to skip
|
|
@@ -405,6 +383,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
405
383
|
| Uint8Array
|
|
406
384
|
| PalletBitcoinLocksLockOptions
|
|
407
385
|
| { V1: any }
|
|
386
|
+
| { V2: any }
|
|
408
387
|
| string,
|
|
409
388
|
) => SubmittableExtrinsic<ApiType>,
|
|
410
389
|
[u64, Option<PalletBitcoinLocksLockOptions>]
|
|
@@ -1218,6 +1197,13 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
1218
1197
|
) => SubmittableExtrinsic<ApiType>,
|
|
1219
1198
|
[PalletOperationalAccountsRegistration]
|
|
1220
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
|
+
>;
|
|
1221
1207
|
/**
|
|
1222
1208
|
* Update certification reward amounts for operational accounts.
|
|
1223
1209
|
**/
|
|
@@ -1457,8 +1443,15 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
1457
1443
|
}
|
|
1458
1444
|
| string
|
|
1459
1445
|
| Uint8Array,
|
|
1446
|
+
ethereum:
|
|
1447
|
+
| Option<PalletPriceIndexEthereumPriceIndex>
|
|
1448
|
+
| null
|
|
1449
|
+
| Uint8Array
|
|
1450
|
+
| PalletPriceIndexEthereumPriceIndex
|
|
1451
|
+
| { ethereumUsdPrice?: any; ethereumGasPriceWei?: any; tick?: any }
|
|
1452
|
+
| string,
|
|
1460
1453
|
) => SubmittableExtrinsic<ApiType>,
|
|
1461
|
-
[PalletPriceIndexPriceIndex]
|
|
1454
|
+
[PalletPriceIndexPriceIndex, Option<PalletPriceIndexEthereumPriceIndex>]
|
|
1462
1455
|
>;
|
|
1463
1456
|
};
|
|
1464
1457
|
proxy: {
|
|
@@ -2310,7 +2303,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
2310
2303
|
| PalletVaultsVaultConfig
|
|
2311
2304
|
| {
|
|
2312
2305
|
terms?: any;
|
|
2313
|
-
name?: any;
|
|
2314
2306
|
delegateAccountId?: any;
|
|
2315
2307
|
securitization?: any;
|
|
2316
2308
|
bitcoinXpubkey?: any;
|
|
@@ -2388,10 +2380,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
2388
2380
|
) => SubmittableExtrinsic<ApiType>,
|
|
2389
2381
|
[Option<AccountId32>]
|
|
2390
2382
|
>;
|
|
2391
|
-
setName: AugmentedSubmittable<
|
|
2392
|
-
(name: Option<Bytes> | null | Uint8Array | Bytes | string) => SubmittableExtrinsic<ApiType>,
|
|
2393
|
-
[Option<Bytes>]
|
|
2394
|
-
>;
|
|
2395
2383
|
};
|
|
2396
2384
|
} // AugmentedSubmittables
|
|
2397
2385
|
} // declare module
|