@argonprotocol/mainchain 1.4.10-dev.a229760e → 1.4.10-dev.b2dce395
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 +3792 -188
- package/browser/index.js +18 -10
- package/browser/index.js.map +1 -1
- package/lib/index.cjs +41 -33
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +3792 -188
- package/lib/index.d.ts +3792 -188
- package/lib/index.js +18 -10
- package/lib/index.js.map +1 -1
- package/package.json +7 -4
- package/src/interfaces/augment-api-consts.ts +8 -0
- package/src/interfaces/augment-api-errors.ts +9 -5
- package/src/interfaces/augment-api-query.ts +30 -0
- package/src/interfaces/augment-api-tx.ts +16 -6
- package/src/interfaces/lookup.ts +179 -163
- package/src/interfaces/registry.ts +4 -0
- package/src/interfaces/types-lookup.ts +182 -167
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.b2dce395",
|
|
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.b2dce395",
|
|
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
|
**/
|
|
@@ -1012,6 +1012,11 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
1012
1012
|
* One of the linked account ownership proofs is invalid.
|
|
1013
1013
|
**/
|
|
1014
1014
|
InvalidAccountProof: AugmentedError<ApiType>;
|
|
1015
|
+
/**
|
|
1016
|
+
* Profile names must start with an uppercase ASCII letter and otherwise be ASCII
|
|
1017
|
+
* alphanumeric.
|
|
1018
|
+
**/
|
|
1019
|
+
InvalidName: AugmentedError<ApiType>;
|
|
1015
1020
|
/**
|
|
1016
1021
|
* The caller is not one of the accounts included in the registration.
|
|
1017
1022
|
**/
|
|
@@ -1116,6 +1121,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
1116
1121
|
VestingBalance: AugmentedError<ApiType>;
|
|
1117
1122
|
};
|
|
1118
1123
|
priceIndex: {
|
|
1124
|
+
/**
|
|
1125
|
+
* Ethereum prices must be non-zero and correspond to the submitted price-index tick.
|
|
1126
|
+
**/
|
|
1127
|
+
InvalidEthereumPrices: AugmentedError<ApiType>;
|
|
1119
1128
|
/**
|
|
1120
1129
|
* Change in argon price is too large
|
|
1121
1130
|
**/
|
|
@@ -1371,11 +1380,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
1371
1380
|
* Funding would result in an overflow of the balance type
|
|
1372
1381
|
**/
|
|
1373
1382
|
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
1383
|
/**
|
|
1380
1384
|
* Unable to decode xpubkey
|
|
1381
1385
|
**/
|
|
@@ -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,
|
|
@@ -1308,6 +1310,18 @@ declare module '@polkadot/api-base/types/storage' {
|
|
|
1308
1310
|
>;
|
|
1309
1311
|
};
|
|
1310
1312
|
operationalAccounts: {
|
|
1313
|
+
/**
|
|
1314
|
+
* Operational accounts that have met both follow-on access-code thresholds.
|
|
1315
|
+
**/
|
|
1316
|
+
accessCodeReadyAccounts: AugmentedQuery<
|
|
1317
|
+
ApiType,
|
|
1318
|
+
(arg: AccountId32 | string | Uint8Array) => Observable<Option<Null>>,
|
|
1319
|
+
[AccountId32]
|
|
1320
|
+
>;
|
|
1321
|
+
/**
|
|
1322
|
+
* Counter for the related counted storage map
|
|
1323
|
+
**/
|
|
1324
|
+
counterForAccessCodeReadyAccounts: AugmentedQuery<ApiType, () => Observable<u32>, []>;
|
|
1311
1325
|
/**
|
|
1312
1326
|
* Whether operational-account access is invite-only.
|
|
1313
1327
|
*
|
|
@@ -1432,6 +1446,14 @@ declare module '@polkadot/api-base/types/storage' {
|
|
|
1432
1446
|
* Stores the active price index
|
|
1433
1447
|
**/
|
|
1434
1448
|
current: AugmentedQuery<ApiType, () => Observable<Option<PalletPriceIndexPriceIndex>>, []>;
|
|
1449
|
+
/**
|
|
1450
|
+
* Stores the latest submitted Ethereum pricing.
|
|
1451
|
+
**/
|
|
1452
|
+
currentEthereumPrice: AugmentedQuery<
|
|
1453
|
+
ApiType,
|
|
1454
|
+
() => Observable<Option<PalletPriceIndexEthereumPriceIndex>>,
|
|
1455
|
+
[]
|
|
1456
|
+
>;
|
|
1435
1457
|
/**
|
|
1436
1458
|
* Accumulates the current frame's Argonot price samples until the frame closes.
|
|
1437
1459
|
**/
|
|
@@ -1464,6 +1486,14 @@ declare module '@polkadot/api-base/types/storage' {
|
|
|
1464
1486
|
() => Observable<BTreeMap<u64, u128>>,
|
|
1465
1487
|
[]
|
|
1466
1488
|
>;
|
|
1489
|
+
/**
|
|
1490
|
+
* Stores per-frame Ethereum price totals used for the trailing averages.
|
|
1491
|
+
**/
|
|
1492
|
+
historicEthereumPricesByFrame: AugmentedQuery<
|
|
1493
|
+
ApiType,
|
|
1494
|
+
() => Observable<BTreeMap<u64, PalletPriceIndexEthereumPriceFrameAccumulator>>,
|
|
1495
|
+
[]
|
|
1496
|
+
>;
|
|
1467
1497
|
/**
|
|
1468
1498
|
* Stores the last valid price index
|
|
1469
1499
|
**/
|
|
@@ -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,
|
|
@@ -1218,6 +1219,13 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
1218
1219
|
) => SubmittableExtrinsic<ApiType>,
|
|
1219
1220
|
[PalletOperationalAccountsRegistration]
|
|
1220
1221
|
>;
|
|
1222
|
+
/**
|
|
1223
|
+
* Update the display name on an operational account profile.
|
|
1224
|
+
**/
|
|
1225
|
+
setName: AugmentedSubmittable<
|
|
1226
|
+
(name: Option<Bytes> | null | Uint8Array | Bytes | string) => SubmittableExtrinsic<ApiType>,
|
|
1227
|
+
[Option<Bytes>]
|
|
1228
|
+
>;
|
|
1221
1229
|
/**
|
|
1222
1230
|
* Update certification reward amounts for operational accounts.
|
|
1223
1231
|
**/
|
|
@@ -1457,8 +1465,15 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
1457
1465
|
}
|
|
1458
1466
|
| string
|
|
1459
1467
|
| Uint8Array,
|
|
1468
|
+
ethereum:
|
|
1469
|
+
| Option<PalletPriceIndexEthereumPriceIndex>
|
|
1470
|
+
| null
|
|
1471
|
+
| Uint8Array
|
|
1472
|
+
| PalletPriceIndexEthereumPriceIndex
|
|
1473
|
+
| { ethereumUsdPrice?: any; ethereumGasPriceWei?: any; tick?: any }
|
|
1474
|
+
| string,
|
|
1460
1475
|
) => SubmittableExtrinsic<ApiType>,
|
|
1461
|
-
[PalletPriceIndexPriceIndex]
|
|
1476
|
+
[PalletPriceIndexPriceIndex, Option<PalletPriceIndexEthereumPriceIndex>]
|
|
1462
1477
|
>;
|
|
1463
1478
|
};
|
|
1464
1479
|
proxy: {
|
|
@@ -2310,7 +2325,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
2310
2325
|
| PalletVaultsVaultConfig
|
|
2311
2326
|
| {
|
|
2312
2327
|
terms?: any;
|
|
2313
|
-
name?: any;
|
|
2314
2328
|
delegateAccountId?: any;
|
|
2315
2329
|
securitization?: any;
|
|
2316
2330
|
bitcoinXpubkey?: any;
|
|
@@ -2388,10 +2402,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
2388
2402
|
) => SubmittableExtrinsic<ApiType>,
|
|
2389
2403
|
[Option<AccountId32>]
|
|
2390
2404
|
>;
|
|
2391
|
-
setName: AugmentedSubmittable<
|
|
2392
|
-
(name: Option<Bytes> | null | Uint8Array | Bytes | string) => SubmittableExtrinsic<ApiType>,
|
|
2393
|
-
[Option<Bytes>]
|
|
2394
|
-
>;
|
|
2395
2405
|
};
|
|
2396
2406
|
} // AugmentedSubmittables
|
|
2397
2407
|
} // declare module
|