@argonprotocol/mainchain 1.4.9-dev.c62e171b → 1.4.9-dev.fab648f5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@argonprotocol/mainchain",
3
- "version": "1.4.9-dev.c62e171b",
3
+ "version": "1.4.9-dev.fab648f5",
4
4
  "description": "A client for accessing the Argon mainchain apis.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -65,7 +65,7 @@
65
65
  },
66
66
  "devDependencies": {
67
67
  "@argonprotocol/ethereum-contracts": "workspace:*",
68
- "@argonprotocol/testing": "1.4.9-dev.c62e171b",
68
+ "@argonprotocol/testing": "1.4.9-dev.fab648f5",
69
69
  "@polkadot/typegen": "^16.5.6",
70
70
  "@substrate/ss58-registry": "^1.51.0",
71
71
  "@types/node": "^20",
@@ -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
@@ -209,11 +208,6 @@ declare module '@polkadot/api-base/types/consts' {
209
208
  * completes the remaining uncovered amount.
210
209
  **/
211
210
  minTransferCollateralIncrement: u128 & AugmentedConst<ApiType>;
212
- /**
213
- * Retention window, in ticks, for recent Argon transfer evidence used by operational
214
- * accounts.
215
- **/
216
- recentTransferRetentionTicks: u64 & AugmentedConst<ApiType>;
217
211
  /**
218
212
  * Minting authority tip rate applied to transfer-out requests in basis points.
219
213
  **/
@@ -370,45 +364,59 @@ declare module '@polkadot/api-base/types/consts' {
370
364
  };
371
365
  operationalAccounts: {
372
366
  /**
373
- * Additional argon amount (base units) required per referral after operational.
367
+ * Additional argon amount (base units) required per follow-on access code after an account
368
+ * becomes operational.
374
369
  **/
375
- bitcoinLockSizeForReferral: u128 & AugmentedConst<ApiType>;
370
+ bitcoinLockSizeForAccessCode: u128 & AugmentedConst<ApiType>;
376
371
  /**
377
- * Maximum number of available referrals allowed at once.
372
+ * Maximum number of available access codes allowed at once.
378
373
  **/
379
- maxAvailableReferrals: u32 & AugmentedConst<ApiType>;
374
+ maxAvailableAccessCodes: u32 & AugmentedConst<ApiType>;
380
375
  /**
381
- * Maximum number of encrypted server bytes stored per sponsee.
376
+ * Maximum number of encrypted server bytes stored per network account.
382
377
  **/
383
378
  maxEncryptedServerLen: u32 & AugmentedConst<ApiType>;
384
379
  /**
385
- * Maximum number of expired referral codes cleared per block.
380
+ * Minimum bitcoin amount required to register.
381
+ **/
382
+ minimumBitcoin: u128 & AugmentedConst<ApiType>;
383
+ /**
384
+ * Minimum bond amount required to register.
385
+ **/
386
+ minimumBonds: u128 & AugmentedConst<ApiType>;
387
+ /**
388
+ * Minimum Uniswap transfer amount required to register.
386
389
  **/
387
- maxExpiredReferralCodeCleanupsPerBlock: u32 & AugmentedConst<ApiType>;
390
+ minimumUniswapTransfer: u128 & AugmentedConst<ApiType>;
388
391
  /**
389
392
  * Mining seats required to become operational.
390
393
  **/
391
394
  miningSeatsForOperational: u32 & AugmentedConst<ApiType>;
392
395
  /**
393
- * Mining seats required per referral after operational.
396
+ * Mining seats required per follow-on access code after an account becomes
397
+ * operational.
394
398
  **/
395
- miningSeatsPerReferral: u32 & AugmentedConst<ApiType>;
399
+ miningSeatsPerAccessCode: u32 & AugmentedConst<ApiType>;
396
400
  /**
397
- * Minimum vault securitization required to become operational.
401
+ * Default bonus reward paid every operational certification threshold.
398
402
  **/
399
- operationalMinimumVaultSecuritization: u128 & AugmentedConst<ApiType>;
403
+ operationalCertificationBonusReward: u128 & AugmentedConst<ApiType>;
404
+ /**
405
+ * Default reward paid when an account becomes operationally certified.
406
+ **/
407
+ operationalCertificationReward: u128 & AugmentedConst<ApiType>;
400
408
  /**
401
- * Default bonus reward paid every referral threshold.
409
+ * Number of operational certifications required per bonus reward.
402
410
  **/
403
- operationalReferralBonusReward: u128 & AugmentedConst<ApiType>;
411
+ operationalCertificationsPerBonusReward: u32 & AugmentedConst<ApiType>;
404
412
  /**
405
- * Default reward paid when an account becomes operational.
413
+ * Minimum total Uniswap transfer amount required for operational certification.
406
414
  **/
407
- operationalReferralReward: u128 & AugmentedConst<ApiType>;
415
+ operationalMinimumUniswapTransfer: u128 & AugmentedConst<ApiType>;
408
416
  /**
409
- * Number of operational sponsees required per referral bonus reward.
417
+ * Minimum vault securitization required to become operational.
410
418
  **/
411
- referralBonusEveryXOperationalSponsees: u32 & AugmentedConst<ApiType>;
419
+ operationalMinimumVaultSecuritization: u128 & AugmentedConst<ApiType>;
412
420
  };
413
421
  ownership: {
414
422
  /**
@@ -791,7 +791,7 @@ declare module '@polkadot/api-base/types/errors' {
791
791
  **/
792
792
  InvalidBidAmount: AugmentedError<ApiType>;
793
793
  /**
794
- * Mining slot bidding currently requires prior operational-account registration.
794
+ * Mining slot bidding currently requires a prior operational-account upgrade.
795
795
  **/
796
796
  OperationalAccountRegistrationRequired: AugmentedError<ApiType>;
797
797
  /**
@@ -975,29 +975,37 @@ declare module '@polkadot/api-base/types/errors' {
975
975
  **/
976
976
  AccountAlreadyLinked: AugmentedError<ApiType>;
977
977
  /**
978
- * The account is already operational.
978
+ * The account is already operationally certified.
979
979
  **/
980
- AlreadyOperational: AugmentedError<ApiType>;
980
+ AlreadyOperationallyCertified: AugmentedError<ApiType>;
981
981
  /**
982
982
  * The caller already registered an operational account.
983
983
  **/
984
984
  AlreadyRegistered: AugmentedError<ApiType>;
985
+ /**
986
+ * An account cannot grant access to itself.
987
+ **/
988
+ CannotGrantAccessToSelf: AugmentedError<ApiType>;
985
989
  /**
986
990
  * The encrypted server payload exceeds the configured max length.
987
991
  **/
988
992
  EncryptedServerTooLong: AugmentedError<ApiType>;
989
993
  /**
990
- * One of the linked account ownership proofs is invalid.
994
+ * The upstream access proof is invalid.
991
995
  **/
992
- InvalidAccountProof: AugmentedError<ApiType>;
996
+ InvalidAccessProof: AugmentedError<ApiType>;
993
997
  /**
994
- * The referral proof or sponsor proof is invalid.
998
+ * One of the linked account ownership proofs is invalid.
995
999
  **/
996
- InvalidReferralProof: AugmentedError<ApiType>;
1000
+ InvalidAccountProof: AugmentedError<ApiType>;
997
1001
  /**
998
1002
  * The caller is not one of the accounts included in the registration.
999
1003
  **/
1000
1004
  InvalidRegistrationSubmitter: AugmentedError<ApiType>;
1005
+ /**
1006
+ * The requested account does not currently satisfy the minimums.
1007
+ **/
1008
+ MinimumsNotMet: AugmentedError<ApiType>;
1001
1009
  /**
1002
1010
  * The operational account has no pending rewards to claim.
1003
1011
  **/
@@ -1011,17 +1019,13 @@ declare module '@polkadot/api-base/types/errors' {
1011
1019
  **/
1012
1020
  NotEligibleForActivation: AugmentedError<ApiType>;
1013
1021
  /**
1014
- * The caller has not registered an operational account.
1022
+ * The requested account has not registered operational accounts.
1015
1023
  **/
1016
1024
  NotOperationalAccount: AugmentedError<ApiType>;
1017
1025
  /**
1018
- * The caller is not the sponsor of the requested sponsee.
1019
- **/
1020
- NotSponsorOfSponsee: AugmentedError<ApiType>;
1021
- /**
1022
- * The referral proof has expired.
1026
+ * The caller is not the upstream account for the requested downstream account.
1023
1027
  **/
1024
- ReferralProofExpired: AugmentedError<ApiType>;
1028
+ NotUpstreamOfDownstream: AugmentedError<ApiType>;
1025
1029
  /**
1026
1030
  * A valid invite is required to register an operational account.
1027
1031
  **/
@@ -1042,6 +1046,14 @@ declare module '@polkadot/api-base/types/errors' {
1042
1046
  * The treasury does not currently have enough available reserves for the claim.
1043
1047
  **/
1044
1048
  TreasuryInsufficientFunds: AugmentedError<ApiType>;
1049
+ /**
1050
+ * The requested upstream account does not have any available access codes.
1051
+ **/
1052
+ UpstreamHasNoAvailableAccessCodes: AugmentedError<ApiType>;
1053
+ /**
1054
+ * The requested upstream account does not have a registered operational account.
1055
+ **/
1056
+ UpstreamNotOperationalAccount: AugmentedError<ApiType>;
1045
1057
  };
1046
1058
  ownership: {
1047
1059
  /**
@@ -1360,7 +1372,7 @@ declare module '@polkadot/api-base/types/errors' {
1360
1372
  **/
1361
1373
  NoVaultBitcoinPubkeysAvailable: AugmentedError<ApiType>;
1362
1374
  /**
1363
- * Vault creation currently requires prior operational-account registration.
1375
+ * Vault creation currently requires a prior operational-account upgrade.
1364
1376
  **/
1365
1377
  OperationalAccountRegistrationRequired: AugmentedError<ApiType>;
1366
1378
  /**
@@ -1242,20 +1242,28 @@ declare module '@polkadot/api-base/types/events' {
1242
1242
  };
1243
1243
  operationalAccounts: {
1244
1244
  /**
1245
- * Account has become operational.
1245
+ * Account has met the registration minimums.
1246
1246
  **/
1247
- AccountWentOperational: AugmentedEvent<
1247
+ AccountMeetsMinimums: AugmentedEvent<
1248
1248
  ApiType,
1249
1249
  [account: AccountId32],
1250
1250
  { account: AccountId32 }
1251
1251
  >;
1252
1252
  /**
1253
- * A sponsor updated the encrypted server payload for a sponsee.
1253
+ * Account has become operationally certified.
1254
+ **/
1255
+ AccountOperationallyCertified: AugmentedEvent<
1256
+ ApiType,
1257
+ [account: AccountId32],
1258
+ { account: AccountId32 }
1259
+ >;
1260
+ /**
1261
+ * An upstream account updated the encrypted server payload for a downstream account.
1254
1262
  **/
1255
1263
  EncryptedServerUpdated: AugmentedEvent<
1256
1264
  ApiType,
1257
- [sponsor: AccountId32, sponsee: AccountId32],
1258
- { sponsor: AccountId32; sponsee: AccountId32 }
1265
+ [upstreamAccount: AccountId32, downstreamAccount: AccountId32],
1266
+ { upstreamAccount: AccountId32; downstreamAccount: AccountId32 }
1259
1267
  >;
1260
1268
  /**
1261
1269
  * An operational account was registered with its linked accounts.
@@ -1265,16 +1273,14 @@ declare module '@polkadot/api-base/types/events' {
1265
1273
  [
1266
1274
  operationalAccount: AccountId32,
1267
1275
  vaultAccount: AccountId32,
1268
- miningFundingAccount: AccountId32,
1269
- miningBotAccount: AccountId32,
1270
- sponsor: Option<AccountId32>,
1276
+ miningAccount: AccountId32,
1277
+ upstreamAccount: Option<AccountId32>,
1271
1278
  ],
1272
1279
  {
1273
1280
  operationalAccount: AccountId32;
1274
1281
  vaultAccount: AccountId32;
1275
- miningFundingAccount: AccountId32;
1276
- miningBotAccount: AccountId32;
1277
- sponsor: Option<AccountId32>;
1282
+ miningAccount: AccountId32;
1283
+ upstreamAccount: Option<AccountId32>;
1278
1284
  }
1279
1285
  >;
1280
1286
  /**
@@ -1285,20 +1291,24 @@ declare module '@polkadot/api-base/types/events' {
1285
1291
  [
1286
1292
  account: AccountId32,
1287
1293
  updateOperationalProgress: bool,
1288
- hasUniswapTransfer: bool,
1294
+ meetsMinimums: bool,
1295
+ uniswapArgonTransfersInAmount: u128,
1296
+ accountBitcoinAmount: u128,
1297
+ accountVaultBondAmount: u128,
1289
1298
  vaultCreated: bool,
1290
- hasTreasuryPoolParticipation: bool,
1291
- observedBitcoinTotal: u128,
1292
- observedMiningSeatTotal: u32,
1299
+ operatorVaultBitcoinAmount: u128,
1300
+ miningSeatCount: u32,
1293
1301
  ],
1294
1302
  {
1295
1303
  account: AccountId32;
1296
1304
  updateOperationalProgress: bool;
1297
- hasUniswapTransfer: bool;
1305
+ meetsMinimums: bool;
1306
+ uniswapArgonTransfersInAmount: u128;
1307
+ accountBitcoinAmount: u128;
1308
+ accountVaultBondAmount: u128;
1298
1309
  vaultCreated: bool;
1299
- hasTreasuryPoolParticipation: bool;
1300
- observedBitcoinTotal: u128;
1301
- observedMiningSeatTotal: u32;
1310
+ operatorVaultBitcoinAmount: u128;
1311
+ miningSeatCount: u32;
1302
1312
  }
1303
1313
  >;
1304
1314
  /**
@@ -1340,8 +1350,8 @@ declare module '@polkadot/api-base/types/events' {
1340
1350
  **/
1341
1351
  RewardsConfigUpdated: AugmentedEvent<
1342
1352
  ApiType,
1343
- [operationalReferralReward: u128, referralBonusReward: u128],
1344
- { operationalReferralReward: u128; referralBonusReward: u128 }
1353
+ [operationalCertificationReward: u128, operationalCertificationBonusReward: u128],
1354
+ { operationalCertificationReward: u128; operationalCertificationBonusReward: u128 }
1345
1355
  >;
1346
1356
  };
1347
1357
  ownership: {
@@ -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
@@ -66,6 +65,7 @@ import type {
66
65
  PalletBitcoinLocksLockReleaseRequest,
67
66
  PalletBitcoinLocksLockedBitcoin,
68
67
  PalletBitcoinLocksOrphanedUtxo,
68
+ PalletCrosschainTransferAccountTransferTotals,
69
69
  PalletCrosschainTransferChainConfig,
70
70
  PalletCrosschainTransferCouncilApprovalQueueEntry,
71
71
  PalletCrosschainTransferGatewayState,
@@ -286,6 +286,17 @@ declare module '@polkadot/api-base/types/storage' {
286
286
  ) => Observable<Option<PalletBitcoinLocksOrphanedUtxo>>,
287
287
  [AccountId32, ArgonPrimitivesBitcoinUtxoRef]
288
288
  >;
289
+ /**
290
+ * Index of active UTXO IDs per owner account.
291
+ **/
292
+ utxoIdsByOwnerAccount: AugmentedQuery<
293
+ ApiType,
294
+ (
295
+ arg1: AccountId32 | string | Uint8Array,
296
+ arg2: u64 | AnyNumber | Uint8Array,
297
+ ) => Observable<Option<Null>>,
298
+ [AccountId32, u64]
299
+ >;
289
300
  /**
290
301
  * Index of active UTXO IDs per vault
291
302
  **/
@@ -594,18 +605,6 @@ declare module '@polkadot/api-base/types/storage' {
594
605
  ) => Observable<Option<PalletCrosschainTransferGlobalIssuanceCouncil>>,
595
606
  [H256]
596
607
  >;
597
- /**
598
- * Accounts whose recent-transfer evidence expires at a given tick.
599
- **/
600
- inboundTransfersExpiringAt: AugmentedQuery<
601
- ApiType,
602
- (arg: u64 | AnyNumber | Uint8Array) => Observable<Vec<AccountId32>>,
603
- [u64]
604
- >;
605
- /**
606
- * Latest tick whose recent-transfer expiration bucket was cleaned up.
607
- **/
608
- lastTransferExpiryCleanupTick: AugmentedQuery<ApiType, () => Observable<u64>, []>;
609
608
  /**
610
609
  * The latest queued council hash that should govern the next queue entry on each destination
611
610
  * chain.
@@ -719,14 +718,6 @@ declare module '@polkadot/api-base/types/storage' {
719
718
  ) => Observable<Option<u128>>,
720
719
  [PalletCrosschainTransferSourceChain]
721
720
  >;
722
- /**
723
- * Count of still-retained qualifying Argon transfers for each local account.
724
- **/
725
- recentArgonTransfersByAccount: AugmentedQuery<
726
- ApiType,
727
- (arg: AccountId32 | string | Uint8Array) => Observable<u32>,
728
- [AccountId32]
729
- >;
730
721
  /**
731
722
  * Outbound transfers by transfer id.
732
723
  **/
@@ -748,6 +739,16 @@ declare module '@polkadot/api-base/types/storage' {
748
739
  ) => Observable<Option<u128>>,
749
740
  [PalletCrosschainTransferSourceChain]
750
741
  >;
742
+ /**
743
+ * Cumulative inbound and outbound transfer totals for each local account.
744
+ **/
745
+ transferTotalsByAccount: AugmentedQuery<
746
+ ApiType,
747
+ (
748
+ arg: AccountId32 | string | Uint8Array,
749
+ ) => Observable<PalletCrosschainTransferAccountTransferTotals>,
750
+ [AccountId32]
751
+ >;
751
752
  };
752
753
  digests: {
753
754
  tempDigests: AugmentedQuery<
@@ -1260,40 +1261,17 @@ declare module '@polkadot/api-base/types/storage' {
1260
1261
  };
1261
1262
  operationalAccounts: {
1262
1263
  /**
1263
- * Referral codes that have already been linked, keyed to their proof expiration frame.
1264
+ * Opaque encrypted upstream server payload keyed by the downstream account.
1264
1265
  **/
1265
- consumedReferralCodes: AugmentedQuery<
1266
- ApiType,
1267
- (arg: U8aFixed | string | Uint8Array) => Observable<Option<u64>>,
1268
- [U8aFixed]
1269
- >;
1270
- /**
1271
- * Referral codes to clear after their referral proof expiration frame.
1272
- **/
1273
- consumedReferralCodesByExpiration: AugmentedQuery<
1274
- ApiType,
1275
- (
1276
- arg1: u64 | AnyNumber | Uint8Array,
1277
- arg2: U8aFixed | string | Uint8Array,
1278
- ) => Observable<Option<Null>>,
1279
- [u64, U8aFixed]
1280
- >;
1281
- /**
1282
- * Opaque encrypted sponsor server payload keyed by the sponsee operational account.
1283
- **/
1284
- encryptedServerBySponsee: AugmentedQuery<
1266
+ encryptedServerByDownstreamAccount: AugmentedQuery<
1285
1267
  ApiType,
1286
1268
  (arg: AccountId32 | string | Uint8Array) => Observable<Option<Bytes>>,
1287
1269
  [AccountId32]
1288
1270
  >;
1289
- /**
1290
- * Oldest referral expiration frame that still has cleanup work to resume.
1291
- **/
1292
- expiredReferralCodeCleanupFrame: AugmentedQuery<ApiType, () => Observable<Option<u64>>, []>;
1293
1271
  /**
1294
1272
  * Whether operational-account access is invite-only.
1295
1273
  *
1296
- * When enabled, registration requires a valid referral invite and vault creation plus
1274
+ * When enabled, registration requires an upstream invite and vault creation plus
1297
1275
  * mining-slot bidding remain restricted to registered operational accounts.
1298
1276
  *
1299
1277
  * Existing live raw chain specs do not contain this key, so the default remains invite-only
@@ -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
@@ -1153,11 +1153,12 @@ declare module '@polkadot/api-base/types/submittable' {
1153
1153
  patch:
1154
1154
  | PalletOperationalAccountsOperationalProgressPatch
1155
1155
  | {
1156
- hasUniswapTransfer?: any;
1156
+ uniswapArgonTransfersInAmount?: any;
1157
+ accountBitcoinAmount?: any;
1158
+ accountVaultBondAmount?: any;
1157
1159
  vaultCreated?: any;
1158
- hasTreasuryPoolParticipation?: any;
1159
- observedBitcoinTotal?: any;
1160
- observedMiningSeatTotal?: any;
1160
+ vaultBitcoinAmount?: any;
1161
+ miningSeatCount?: any;
1161
1162
  }
1162
1163
  | string
1163
1164
  | Uint8Array,
@@ -1166,10 +1167,9 @@ declare module '@polkadot/api-base/types/submittable' {
1166
1167
  [AccountId32, PalletOperationalAccountsOperationalProgressPatch, bool]
1167
1168
  >;
1168
1169
  /**
1169
- * Register vault, mining funding, and bot accounts for an operational account.
1170
+ * Register vault and mining accounts for an operational account.
1170
1171
  * Any account in the registration may submit the transaction.
1171
- * If a referral proof is provided, the registration records the sponsor relationship.
1172
- * When invite-only is enabled, a valid referral proof is required.
1172
+ * When invite-only is enabled, the registration must include an upstream access proof.
1173
1173
  **/
1174
1174
  register: AugmentedSubmittable<
1175
1175
  (
@@ -1178,22 +1178,22 @@ declare module '@polkadot/api-base/types/submittable' {
1178
1178
  [PalletOperationalAccountsRegistration]
1179
1179
  >;
1180
1180
  /**
1181
- * Store an opaque encrypted sponsor server payload for a sponsored operational account.
1181
+ * Store an opaque encrypted upstream server payload for a downstream account.
1182
1182
  **/
1183
- setEncryptedServerForSponsee: AugmentedSubmittable<
1183
+ setEncryptedServerForDownstreamAccount: AugmentedSubmittable<
1184
1184
  (
1185
- sponsee: AccountId32 | string | Uint8Array,
1185
+ downstreamAccount: AccountId32 | string | Uint8Array,
1186
1186
  encryptedServer: Bytes | string | Uint8Array,
1187
1187
  ) => SubmittableExtrinsic<ApiType>,
1188
1188
  [AccountId32, Bytes]
1189
1189
  >;
1190
1190
  /**
1191
- * Update reward amounts for operational accounts.
1191
+ * Update certification reward amounts for operational accounts.
1192
1192
  **/
1193
1193
  setRewardConfig: AugmentedSubmittable<
1194
1194
  (
1195
- operationalReferralReward: u128 | AnyNumber | Uint8Array,
1196
- referralBonusReward: u128 | AnyNumber | Uint8Array,
1195
+ operationalCertificationReward: u128 | AnyNumber | Uint8Array,
1196
+ operationalCertificationBonusReward: u128 | AnyNumber | Uint8Array,
1197
1197
  ) => SubmittableExtrinsic<ApiType>,
1198
1198
  [u128, u128]
1199
1199
  >;
@@ -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 './augment-api-consts.js';
5
4
  import './augment-api-errors.js';
@@ -1,5 +1,4 @@
1
1
  // Auto-generated via `yarn polkadot-types-from-defs`, 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