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

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.cf22b187",
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.cf22b187",
69
69
  "@polkadot/typegen": "^16.5.6",
70
70
  "@substrate/ss58-registry": "^1.51.0",
71
71
  "@types/node": "^20",
@@ -209,11 +209,6 @@ declare module '@polkadot/api-base/types/consts' {
209
209
  * completes the remaining uncovered amount.
210
210
  **/
211
211
  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
212
  /**
218
213
  * Minting authority tip rate applied to transfer-out requests in basis points.
219
214
  **/
@@ -370,45 +365,58 @@ declare module '@polkadot/api-base/types/consts' {
370
365
  };
371
366
  operationalAccounts: {
372
367
  /**
373
- * Additional argon amount (base units) required per referral after operational.
368
+ * Additional argon amount (base units) required per follow-on upgrade code after
369
+ * operational certification.
374
370
  **/
375
- bitcoinLockSizeForReferral: u128 & AugmentedConst<ApiType>;
371
+ bitcoinLockSizeForUpgradeCode: u128 & AugmentedConst<ApiType>;
376
372
  /**
377
- * Maximum number of available referrals allowed at once.
373
+ * Maximum number of available upgrade codes allowed at once.
378
374
  **/
379
- maxAvailableReferrals: u32 & AugmentedConst<ApiType>;
375
+ maxAvailableUpgradeCodes: u32 & AugmentedConst<ApiType>;
380
376
  /**
381
- * Maximum number of encrypted server bytes stored per sponsee.
377
+ * Maximum number of encrypted server bytes stored per network account.
382
378
  **/
383
379
  maxEncryptedServerLen: u32 & AugmentedConst<ApiType>;
384
- /**
385
- * Maximum number of expired referral codes cleared per block.
386
- **/
387
- maxExpiredReferralCodeCleanupsPerBlock: u32 & AugmentedConst<ApiType>;
388
380
  /**
389
381
  * Mining seats required to become operational.
390
382
  **/
391
383
  miningSeatsForOperational: u32 & AugmentedConst<ApiType>;
392
384
  /**
393
- * Mining seats required per referral after operational.
385
+ * Mining seats required per follow-on upgrade code after operational certification.
386
+ **/
387
+ miningSeatsPerUpgradeCode: u32 & AugmentedConst<ApiType>;
388
+ /**
389
+ * Default reward paid when an account becomes operational.
390
+ **/
391
+ operationalActivationReward: u128 & AugmentedConst<ApiType>;
392
+ /**
393
+ * Minimum total Uniswap transfer amount required for operational certification.
394
394
  **/
395
- miningSeatsPerReferral: u32 & AugmentedConst<ApiType>;
395
+ operationalMinimumUniswapTransfer: u128 & AugmentedConst<ApiType>;
396
396
  /**
397
397
  * Minimum vault securitization required to become operational.
398
398
  **/
399
399
  operationalMinimumVaultSecuritization: u128 & AugmentedConst<ApiType>;
400
400
  /**
401
- * Default bonus reward paid every referral threshold.
401
+ * Default bonus reward paid every operational referral threshold.
402
402
  **/
403
403
  operationalReferralBonusReward: u128 & AugmentedConst<ApiType>;
404
404
  /**
405
- * Default reward paid when an account becomes operational.
405
+ * Number of operational referrals required per bonus reward.
406
+ **/
407
+ operationalReferralsPerBonusReward: u32 & AugmentedConst<ApiType>;
408
+ /**
409
+ * Minimum bitcoin amount required for treasury certification.
410
+ **/
411
+ treasuryMinimumBitcoin: u128 & AugmentedConst<ApiType>;
412
+ /**
413
+ * Minimum bond amount required for treasury certification.
406
414
  **/
407
- operationalReferralReward: u128 & AugmentedConst<ApiType>;
415
+ treasuryMinimumBonds: u128 & AugmentedConst<ApiType>;
408
416
  /**
409
- * Number of operational sponsees required per referral bonus reward.
417
+ * Minimum Uniswap transfer amount required for treasury certification.
410
418
  **/
411
- referralBonusEveryXOperationalSponsees: u32 & AugmentedConst<ApiType>;
419
+ treasuryMinimumUniswapTransfer: u128 & AugmentedConst<ApiType>;
412
420
  };
413
421
  ownership: {
414
422
  /**
@@ -974,6 +974,10 @@ declare module '@polkadot/api-base/types/errors' {
974
974
  * One of the provided accounts is already linked to an operational account.
975
975
  **/
976
976
  AccountAlreadyLinked: AugmentedError<ApiType>;
977
+ /**
978
+ * The requested account is already upgraded to operational.
979
+ **/
980
+ AccountAlreadyUpgraded: AugmentedError<ApiType>;
977
981
  /**
978
982
  * The account is already operational.
979
983
  **/
@@ -982,6 +986,10 @@ declare module '@polkadot/api-base/types/errors' {
982
986
  * The caller already registered an operational account.
983
987
  **/
984
988
  AlreadyRegistered: AugmentedError<ApiType>;
989
+ /**
990
+ * An account cannot upgrade itself.
991
+ **/
992
+ CannotUpgradeSelf: AugmentedError<ApiType>;
985
993
  /**
986
994
  * The encrypted server payload exceeds the configured max length.
987
995
  **/
@@ -990,14 +998,14 @@ declare module '@polkadot/api-base/types/errors' {
990
998
  * One of the linked account ownership proofs is invalid.
991
999
  **/
992
1000
  InvalidAccountProof: AugmentedError<ApiType>;
993
- /**
994
- * The referral proof or sponsor proof is invalid.
995
- **/
996
- InvalidReferralProof: 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 referrer does not have an available upgrade to spend.
1007
+ **/
1008
+ NoAvailableUpgrades: AugmentedError<ApiType>;
1001
1009
  /**
1002
1010
  * The operational account has no pending rewards to claim.
1003
1011
  **/
@@ -1011,17 +1019,25 @@ 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.
1026
+ * The caller is not the referrer of the requested downstream account.
1027
+ **/
1028
+ NotReferrerOfAccount: AugmentedError<ApiType>;
1029
+ /**
1030
+ * The requested account has not reached treasury certification.
1019
1031
  **/
1020
- NotSponsorOfSponsee: AugmentedError<ApiType>;
1032
+ NotTreasuryCertified: AugmentedError<ApiType>;
1021
1033
  /**
1022
- * The referral proof has expired.
1034
+ * The requested referrer does not have a registered operational account.
1023
1035
  **/
1024
- ReferralProofExpired: AugmentedError<ApiType>;
1036
+ ReferrerNotOperationalAccount: AugmentedError<ApiType>;
1037
+ /**
1038
+ * The requested referrer does not match the referrer recorded during registration.
1039
+ **/
1040
+ RegisteredReferrerMismatch: AugmentedError<ApiType>;
1025
1041
  /**
1026
1042
  * A valid invite is required to register an operational account.
1027
1043
  **/
@@ -1038,6 +1054,10 @@ declare module '@polkadot/api-base/types/errors' {
1038
1054
  * Reward claims must be whole Argon increments.
1039
1055
  **/
1040
1056
  RewardClaimNotWholeArgon: AugmentedError<ApiType>;
1057
+ /**
1058
+ * The requested account no longer satisfies treasury certification requirements.
1059
+ **/
1060
+ TreasuryCertificationNoLongerMet: AugmentedError<ApiType>;
1041
1061
  /**
1042
1062
  * The treasury does not currently have enough available reserves for the claim.
1043
1063
  **/
@@ -1241,6 +1241,22 @@ declare module '@polkadot/api-base/types/events' {
1241
1241
  >;
1242
1242
  };
1243
1243
  operationalAccounts: {
1244
+ /**
1245
+ * Account has become treasury certified.
1246
+ **/
1247
+ AccountBecameTreasuryCertified: AugmentedEvent<
1248
+ ApiType,
1249
+ [account: AccountId32],
1250
+ { account: AccountId32 }
1251
+ >;
1252
+ /**
1253
+ * A referrer granted an operational upgrade to an existing account.
1254
+ **/
1255
+ AccountUpgradeGranted: AugmentedEvent<
1256
+ ApiType,
1257
+ [account: AccountId32, referrer: AccountId32],
1258
+ { account: AccountId32; referrer: AccountId32 }
1259
+ >;
1244
1260
  /**
1245
1261
  * Account has become operational.
1246
1262
  **/
@@ -1250,12 +1266,12 @@ declare module '@polkadot/api-base/types/events' {
1250
1266
  { account: AccountId32 }
1251
1267
  >;
1252
1268
  /**
1253
- * A sponsor updated the encrypted server payload for a sponsee.
1269
+ * A referrer updated the encrypted server payload for a downstream account.
1254
1270
  **/
1255
1271
  EncryptedServerUpdated: AugmentedEvent<
1256
1272
  ApiType,
1257
- [sponsor: AccountId32, sponsee: AccountId32],
1258
- { sponsor: AccountId32; sponsee: AccountId32 }
1273
+ [referrer: AccountId32, downstreamAccount: AccountId32],
1274
+ { referrer: AccountId32; downstreamAccount: AccountId32 }
1259
1275
  >;
1260
1276
  /**
1261
1277
  * An operational account was registered with its linked accounts.
@@ -1265,16 +1281,14 @@ declare module '@polkadot/api-base/types/events' {
1265
1281
  [
1266
1282
  operationalAccount: AccountId32,
1267
1283
  vaultAccount: AccountId32,
1268
- miningFundingAccount: AccountId32,
1269
- miningBotAccount: AccountId32,
1270
- sponsor: Option<AccountId32>,
1284
+ miningAccount: AccountId32,
1285
+ referrer: Option<AccountId32>,
1271
1286
  ],
1272
1287
  {
1273
1288
  operationalAccount: AccountId32;
1274
1289
  vaultAccount: AccountId32;
1275
- miningFundingAccount: AccountId32;
1276
- miningBotAccount: AccountId32;
1277
- sponsor: Option<AccountId32>;
1290
+ miningAccount: AccountId32;
1291
+ referrer: Option<AccountId32>;
1278
1292
  }
1279
1293
  >;
1280
1294
  /**
@@ -1285,20 +1299,24 @@ declare module '@polkadot/api-base/types/events' {
1285
1299
  [
1286
1300
  account: AccountId32,
1287
1301
  updateOperationalProgress: bool,
1288
- hasUniswapTransfer: bool,
1302
+ isTreasuryCertified: bool,
1303
+ uniswapArgonTransfersInAmount: u128,
1304
+ accountBitcoinAmount: u128,
1305
+ accountVaultBondAmount: u128,
1289
1306
  vaultCreated: bool,
1290
- hasTreasuryPoolParticipation: bool,
1291
- observedBitcoinTotal: u128,
1292
- observedMiningSeatTotal: u32,
1307
+ operatorVaultBitcoinAmount: u128,
1308
+ miningSeatCount: u32,
1293
1309
  ],
1294
1310
  {
1295
1311
  account: AccountId32;
1296
1312
  updateOperationalProgress: bool;
1297
- hasUniswapTransfer: bool;
1313
+ isTreasuryCertified: bool;
1314
+ uniswapArgonTransfersInAmount: u128;
1315
+ accountBitcoinAmount: u128;
1316
+ accountVaultBondAmount: u128;
1298
1317
  vaultCreated: bool;
1299
- hasTreasuryPoolParticipation: bool;
1300
- observedBitcoinTotal: u128;
1301
- observedMiningSeatTotal: u32;
1318
+ operatorVaultBitcoinAmount: u128;
1319
+ miningSeatCount: u32;
1302
1320
  }
1303
1321
  >;
1304
1322
  /**
@@ -1340,8 +1358,8 @@ declare module '@polkadot/api-base/types/events' {
1340
1358
  **/
1341
1359
  RewardsConfigUpdated: AugmentedEvent<
1342
1360
  ApiType,
1343
- [operationalReferralReward: u128, referralBonusReward: u128],
1344
- { operationalReferralReward: u128; referralBonusReward: u128 }
1361
+ [operationalActivationReward: u128, operationalReferralBonusReward: u128],
1362
+ { operationalActivationReward: u128; operationalReferralBonusReward: u128 }
1345
1363
  >;
1346
1364
  };
1347
1365
  ownership: {
@@ -66,6 +66,7 @@ import type {
66
66
  PalletBitcoinLocksLockReleaseRequest,
67
67
  PalletBitcoinLocksLockedBitcoin,
68
68
  PalletBitcoinLocksOrphanedUtxo,
69
+ PalletCrosschainTransferAccountTransferTotals,
69
70
  PalletCrosschainTransferChainConfig,
70
71
  PalletCrosschainTransferCouncilApprovalQueueEntry,
71
72
  PalletCrosschainTransferGatewayState,
@@ -286,6 +287,17 @@ declare module '@polkadot/api-base/types/storage' {
286
287
  ) => Observable<Option<PalletBitcoinLocksOrphanedUtxo>>,
287
288
  [AccountId32, ArgonPrimitivesBitcoinUtxoRef]
288
289
  >;
290
+ /**
291
+ * Index of active UTXO IDs per owner account.
292
+ **/
293
+ utxoIdsByOwnerAccount: AugmentedQuery<
294
+ ApiType,
295
+ (
296
+ arg1: AccountId32 | string | Uint8Array,
297
+ arg2: u64 | AnyNumber | Uint8Array,
298
+ ) => Observable<Option<Null>>,
299
+ [AccountId32, u64]
300
+ >;
289
301
  /**
290
302
  * Index of active UTXO IDs per vault
291
303
  **/
@@ -594,18 +606,6 @@ declare module '@polkadot/api-base/types/storage' {
594
606
  ) => Observable<Option<PalletCrosschainTransferGlobalIssuanceCouncil>>,
595
607
  [H256]
596
608
  >;
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
609
  /**
610
610
  * The latest queued council hash that should govern the next queue entry on each destination
611
611
  * chain.
@@ -719,14 +719,6 @@ declare module '@polkadot/api-base/types/storage' {
719
719
  ) => Observable<Option<u128>>,
720
720
  [PalletCrosschainTransferSourceChain]
721
721
  >;
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
722
  /**
731
723
  * Outbound transfers by transfer id.
732
724
  **/
@@ -748,6 +740,16 @@ declare module '@polkadot/api-base/types/storage' {
748
740
  ) => Observable<Option<u128>>,
749
741
  [PalletCrosschainTransferSourceChain]
750
742
  >;
743
+ /**
744
+ * Cumulative inbound and outbound transfer totals for each local account.
745
+ **/
746
+ transferTotalsByAccount: AugmentedQuery<
747
+ ApiType,
748
+ (
749
+ arg: AccountId32 | string | Uint8Array,
750
+ ) => Observable<PalletCrosschainTransferAccountTransferTotals>,
751
+ [AccountId32]
752
+ >;
751
753
  };
752
754
  digests: {
753
755
  tempDigests: AugmentedQuery<
@@ -1260,40 +1262,17 @@ declare module '@polkadot/api-base/types/storage' {
1260
1262
  };
1261
1263
  operationalAccounts: {
1262
1264
  /**
1263
- * Referral codes that have already been linked, keyed to their proof expiration frame.
1265
+ * Opaque encrypted referrer server payload keyed by the downstream account.
1264
1266
  **/
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<
1267
+ encryptedServerByDownstreamAccount: AugmentedQuery<
1285
1268
  ApiType,
1286
1269
  (arg: AccountId32 | string | Uint8Array) => Observable<Option<Bytes>>,
1287
1270
  [AccountId32]
1288
1271
  >;
1289
- /**
1290
- * Oldest referral expiration frame that still has cleanup work to resume.
1291
- **/
1292
- expiredReferralCodeCleanupFrame: AugmentedQuery<ApiType, () => Observable<Option<u64>>, []>;
1293
1272
  /**
1294
1273
  * Whether operational-account access is invite-only.
1295
1274
  *
1296
- * When enabled, registration requires a valid referral invite and vault creation plus
1275
+ * When enabled, registration requires a referrer invite and vault creation plus
1297
1276
  * mining-slot bidding remain restricted to registered operational accounts.
1298
1277
  *
1299
1278
  * Existing live raw chain specs do not contain this key, so the default remains invite-only
@@ -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 a referrer.
1173
1173
  **/
1174
1174
  register: AugmentedSubmittable<
1175
1175
  (
@@ -1178,11 +1178,11 @@ 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 referrer 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]
@@ -1192,11 +1192,18 @@ declare module '@polkadot/api-base/types/submittable' {
1192
1192
  **/
1193
1193
  setRewardConfig: AugmentedSubmittable<
1194
1194
  (
1195
- operationalReferralReward: u128 | AnyNumber | Uint8Array,
1196
- referralBonusReward: u128 | AnyNumber | Uint8Array,
1195
+ operationalActivationReward: u128 | AnyNumber | Uint8Array,
1196
+ operationalReferralBonusReward: u128 | AnyNumber | Uint8Array,
1197
1197
  ) => SubmittableExtrinsic<ApiType>,
1198
1198
  [u128, u128]
1199
1199
  >;
1200
+ /**
1201
+ * Grant a referrer upgrade to an already-registered operational account.
1202
+ **/
1203
+ upgradeAccount: AugmentedSubmittable<
1204
+ (accountId: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
1205
+ [AccountId32]
1206
+ >;
1200
1207
  };
1201
1208
  ownership: {
1202
1209
  /**