@argonprotocol/mainchain 1.4.9 → 1.4.10

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",
3
+ "version": "1.4.10",
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",
68
+ "@argonprotocol/testing": "1.4.10",
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
  **/
@@ -301,14 +295,25 @@ declare module '@polkadot/api-base/types/consts' {
301
295
  targetPricePerSeat: u128 & AugmentedConst<ApiType>;
302
296
  };
303
297
  mint: {
298
+ /**
299
+ * The maximum share of a queued bitcoin mint that may be paid in a single frame.
300
+ **/
301
+ bitcoinMintPayoutPercentPerFrame: Percent & AugmentedConst<ApiType>;
304
302
  /**
305
303
  * The maximum number of mint histories to keep
306
304
  **/
307
305
  maxMintHistoryToMaintain: u32 & AugmentedConst<ApiType>;
308
306
  /**
309
- * The maximum number of UTXOs that can be waiting for minting
307
+ * The maximum number of queued bitcoin mints that may receive payouts in a frame.
308
+ **/
309
+ maxPendingMintPayoutWindowSize: u32 & AugmentedConst<ApiType>;
310
+ /**
311
+ * The maximum number of queued mint entries a single bitcoin UTXO may accumulate.
312
+ **/
313
+ maxPendingMintsPerUtxo: u32 & AugmentedConst<ApiType>;
314
+ /**
315
+ * The maximum number of miners that can be paid in a frame.
310
316
  **/
311
- maxPendingMintUtxos: u32 & AugmentedConst<ApiType>;
312
317
  maxPossibleMiners: u32 & AugmentedConst<ApiType>;
313
318
  };
314
319
  multisig: {
@@ -359,45 +364,59 @@ declare module '@polkadot/api-base/types/consts' {
359
364
  };
360
365
  operationalAccounts: {
361
366
  /**
362
- * 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.
363
369
  **/
364
- bitcoinLockSizeForReferral: u128 & AugmentedConst<ApiType>;
370
+ bitcoinLockSizeForAccessCode: u128 & AugmentedConst<ApiType>;
365
371
  /**
366
- * Maximum number of available referrals allowed at once.
372
+ * Maximum number of available access codes allowed at once.
367
373
  **/
368
- maxAvailableReferrals: u32 & AugmentedConst<ApiType>;
374
+ maxAvailableAccessCodes: u32 & AugmentedConst<ApiType>;
369
375
  /**
370
- * Maximum number of encrypted server bytes stored per sponsee.
376
+ * Maximum number of encrypted server bytes stored per network account.
371
377
  **/
372
378
  maxEncryptedServerLen: u32 & AugmentedConst<ApiType>;
373
379
  /**
374
- * 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.
375
389
  **/
376
- maxExpiredReferralCodeCleanupsPerBlock: u32 & AugmentedConst<ApiType>;
390
+ minimumUniswapTransfer: u128 & AugmentedConst<ApiType>;
377
391
  /**
378
392
  * Mining seats required to become operational.
379
393
  **/
380
394
  miningSeatsForOperational: u32 & AugmentedConst<ApiType>;
381
395
  /**
382
- * Mining seats required per referral after operational.
396
+ * Mining seats required per follow-on access code after an account becomes
397
+ * operational.
383
398
  **/
384
- miningSeatsPerReferral: u32 & AugmentedConst<ApiType>;
399
+ miningSeatsPerAccessCode: u32 & AugmentedConst<ApiType>;
385
400
  /**
386
- * Minimum vault securitization required to become operational.
401
+ * Default bonus reward paid every operational certification threshold.
387
402
  **/
388
- 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>;
389
408
  /**
390
- * Default bonus reward paid every referral threshold.
409
+ * Number of operational certifications required per bonus reward.
391
410
  **/
392
- operationalReferralBonusReward: u128 & AugmentedConst<ApiType>;
411
+ operationalCertificationsPerBonusReward: u32 & AugmentedConst<ApiType>;
393
412
  /**
394
- * Default reward paid when an account becomes operational.
413
+ * Minimum total Uniswap transfer amount required for operational certification.
395
414
  **/
396
- operationalReferralReward: u128 & AugmentedConst<ApiType>;
415
+ operationalMinimumUniswapTransfer: u128 & AugmentedConst<ApiType>;
397
416
  /**
398
- * Number of operational sponsees required per referral bonus reward.
417
+ * Minimum vault securitization required to become operational.
399
418
  **/
400
- referralBonusEveryXOperationalSponsees: u32 & AugmentedConst<ApiType>;
419
+ operationalMinimumVaultSecuritization: u128 & AugmentedConst<ApiType>;
401
420
  };
402
421
  ownership: {
403
422
  /**
@@ -560,6 +579,14 @@ declare module '@polkadot/api-base/types/consts' {
560
579
  operationalFeeMultiplier: u8 & AugmentedConst<ApiType>;
561
580
  };
562
581
  treasury: {
582
+ /**
583
+ * The maximum number of active Argonot bond lots.
584
+ **/
585
+ maxActiveArgonotBondLots: u32 & AugmentedConst<ApiType>;
586
+ /**
587
+ * The maximum percent of ownership-token circulation that can be bonded.
588
+ **/
589
+ maxArgonotBondedPercentOfCirculation: Percent & AugmentedConst<ApiType>;
563
590
  /**
564
591
  * The maximum number of bond lots whose release delay may mature in a single frame.
565
592
  **/
@@ -580,6 +607,10 @@ declare module '@polkadot/api-base/types/consts' {
580
607
  * Treasury pallet id retained in metadata for account derivation.
581
608
  **/
582
609
  palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
610
+ /**
611
+ * Percent of the full bid pool paid to Argonot bonds before vault distribution.
612
+ **/
613
+ percentForArgonotBondPool: Percent & AugmentedConst<ApiType>;
583
614
  /**
584
615
  * Percent of the bid pool reserved for treasury reserves.
585
616
  **/
@@ -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
  /**
@@ -1200,6 +1212,14 @@ declare module '@polkadot/api-base/types/errors' {
1200
1212
  * treasury backing.
1201
1213
  **/
1202
1214
  ActiveBondAmountBelowEncumberedBacking: AugmentedError<ApiType>;
1215
+ /**
1216
+ * The Argonot bond purchase would exceed the active circulation cap.
1217
+ **/
1218
+ ArgonotBondPurchaseAboveCap: AugmentedError<ApiType>;
1219
+ /**
1220
+ * The Argonot bond purchase did not beat the current active-set cutoff.
1221
+ **/
1222
+ ArgonotBondPurchaseBelowCutoff: AugmentedError<ApiType>;
1203
1223
  /**
1204
1224
  * The bond lot is already scheduled for release.
1205
1225
  **/
@@ -1352,7 +1372,7 @@ declare module '@polkadot/api-base/types/errors' {
1352
1372
  **/
1353
1373
  NoVaultBitcoinPubkeysAvailable: AugmentedError<ApiType>;
1354
1374
  /**
1355
- * Vault creation currently requires prior operational-account registration.
1375
+ * Vault creation currently requires a prior operational-account upgrade.
1356
1376
  **/
1357
1377
  OperationalAccountRegistrationRequired: AugmentedError<ApiType>;
1358
1378
  /**
@@ -49,6 +49,7 @@ import type {
49
49
  PalletMintMintType,
50
50
  PalletMultisigTimepoint,
51
51
  PalletProxyDepositKind,
52
+ PalletTreasuryBondProgramId,
52
53
  PalletTreasuryBondReleaseReason,
53
54
  SpConsensusGrandpaAppPublic,
54
55
  SpRuntimeDispatchError,
@@ -1241,20 +1242,28 @@ declare module '@polkadot/api-base/types/events' {
1241
1242
  };
1242
1243
  operationalAccounts: {
1243
1244
  /**
1244
- * Account has become operational.
1245
+ * Account has met the registration minimums.
1245
1246
  **/
1246
- AccountWentOperational: AugmentedEvent<
1247
+ AccountMeetsMinimums: AugmentedEvent<
1247
1248
  ApiType,
1248
1249
  [account: AccountId32],
1249
1250
  { account: AccountId32 }
1250
1251
  >;
1251
1252
  /**
1252
- * 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.
1253
1262
  **/
1254
1263
  EncryptedServerUpdated: AugmentedEvent<
1255
1264
  ApiType,
1256
- [sponsor: AccountId32, sponsee: AccountId32],
1257
- { sponsor: AccountId32; sponsee: AccountId32 }
1265
+ [upstreamAccount: AccountId32, downstreamAccount: AccountId32],
1266
+ { upstreamAccount: AccountId32; downstreamAccount: AccountId32 }
1258
1267
  >;
1259
1268
  /**
1260
1269
  * An operational account was registered with its linked accounts.
@@ -1264,16 +1273,14 @@ declare module '@polkadot/api-base/types/events' {
1264
1273
  [
1265
1274
  operationalAccount: AccountId32,
1266
1275
  vaultAccount: AccountId32,
1267
- miningFundingAccount: AccountId32,
1268
- miningBotAccount: AccountId32,
1269
- sponsor: Option<AccountId32>,
1276
+ miningAccount: AccountId32,
1277
+ upstreamAccount: Option<AccountId32>,
1270
1278
  ],
1271
1279
  {
1272
1280
  operationalAccount: AccountId32;
1273
1281
  vaultAccount: AccountId32;
1274
- miningFundingAccount: AccountId32;
1275
- miningBotAccount: AccountId32;
1276
- sponsor: Option<AccountId32>;
1282
+ miningAccount: AccountId32;
1283
+ upstreamAccount: Option<AccountId32>;
1277
1284
  }
1278
1285
  >;
1279
1286
  /**
@@ -1284,20 +1291,24 @@ declare module '@polkadot/api-base/types/events' {
1284
1291
  [
1285
1292
  account: AccountId32,
1286
1293
  updateOperationalProgress: bool,
1287
- hasUniswapTransfer: bool,
1294
+ meetsMinimums: bool,
1295
+ uniswapArgonTransfersInAmount: u128,
1296
+ accountBitcoinAmount: u128,
1297
+ accountVaultBondAmount: u128,
1288
1298
  vaultCreated: bool,
1289
- hasTreasuryPoolParticipation: bool,
1290
- observedBitcoinTotal: u128,
1291
- observedMiningSeatTotal: u32,
1299
+ operatorVaultBitcoinAmount: u128,
1300
+ miningSeatCount: u32,
1292
1301
  ],
1293
1302
  {
1294
1303
  account: AccountId32;
1295
1304
  updateOperationalProgress: bool;
1296
- hasUniswapTransfer: bool;
1305
+ meetsMinimums: bool;
1306
+ uniswapArgonTransfersInAmount: u128;
1307
+ accountBitcoinAmount: u128;
1308
+ accountVaultBondAmount: u128;
1297
1309
  vaultCreated: bool;
1298
- hasTreasuryPoolParticipation: bool;
1299
- observedBitcoinTotal: u128;
1300
- observedMiningSeatTotal: u32;
1310
+ operatorVaultBitcoinAmount: u128;
1311
+ miningSeatCount: u32;
1301
1312
  }
1302
1313
  >;
1303
1314
  /**
@@ -1339,8 +1350,8 @@ declare module '@polkadot/api-base/types/events' {
1339
1350
  **/
1340
1351
  RewardsConfigUpdated: AugmentedEvent<
1341
1352
  ApiType,
1342
- [operationalReferralReward: u128, referralBonusReward: u128],
1343
- { operationalReferralReward: u128; referralBonusReward: u128 }
1353
+ [operationalCertificationReward: u128, operationalCertificationBonusReward: u128],
1354
+ { operationalCertificationReward: u128; operationalCertificationBonusReward: u128 }
1344
1355
  >;
1345
1356
  };
1346
1357
  ownership: {
@@ -1804,20 +1815,42 @@ declare module '@polkadot/api-base/types/events' {
1804
1815
  };
1805
1816
  treasury: {
1806
1817
  /**
1807
- * A bond purchase entered a vault's accepted list.
1818
+ * A bond purchase entered its active program set.
1808
1819
  **/
1809
1820
  BondLotPurchased: AugmentedEvent<
1810
1821
  ApiType,
1811
- [vaultId: u32, bondLotId: u64, accountId: AccountId32, bonds: u32],
1812
- { vaultId: u32; bondLotId: u64; accountId: AccountId32; bonds: u32 }
1822
+ [
1823
+ programId: PalletTreasuryBondProgramId,
1824
+ bondLotId: u64,
1825
+ accountId: AccountId32,
1826
+ bonds: u32,
1827
+ ],
1828
+ {
1829
+ programId: PalletTreasuryBondProgramId;
1830
+ bondLotId: u64;
1831
+ accountId: AccountId32;
1832
+ bonds: u32;
1833
+ }
1813
1834
  >;
1814
1835
  /**
1815
1836
  * A bond lot was released.
1816
1837
  **/
1817
1838
  BondLotReleased: AugmentedEvent<
1818
1839
  ApiType,
1819
- [frameId: u64, vaultId: u32, bondLotId: u64, accountId: AccountId32, bonds: u32],
1820
- { frameId: u64; vaultId: u32; bondLotId: u64; accountId: AccountId32; bonds: u32 }
1840
+ [
1841
+ frameId: u64,
1842
+ programId: PalletTreasuryBondProgramId,
1843
+ bondLotId: u64,
1844
+ accountId: AccountId32,
1845
+ bonds: u32,
1846
+ ],
1847
+ {
1848
+ frameId: u64;
1849
+ programId: PalletTreasuryBondProgramId;
1850
+ bondLotId: u64;
1851
+ accountId: AccountId32;
1852
+ bonds: u32;
1853
+ }
1821
1854
  >;
1822
1855
  /**
1823
1856
  * A bond lot was removed from future frames and scheduled for release.
@@ -1825,7 +1858,7 @@ declare module '@polkadot/api-base/types/events' {
1825
1858
  BondLotReleaseScheduled: AugmentedEvent<
1826
1859
  ApiType,
1827
1860
  [
1828
- vaultId: u32,
1861
+ programId: PalletTreasuryBondProgramId,
1829
1862
  bondLotId: u64,
1830
1863
  accountId: AccountId32,
1831
1864
  bonds: u32,
@@ -1833,7 +1866,7 @@ declare module '@polkadot/api-base/types/events' {
1833
1866
  reason: PalletTreasuryBondReleaseReason,
1834
1867
  ],
1835
1868
  {
1836
- vaultId: u32;
1869
+ programId: PalletTreasuryBondProgramId;
1837
1870
  bondLotId: u64;
1838
1871
  accountId: AccountId32;
1839
1872
  bonds: u32;
@@ -1841,6 +1874,26 @@ declare module '@polkadot/api-base/types/events' {
1841
1874
  reason: PalletTreasuryBondReleaseReason;
1842
1875
  }
1843
1876
  >;
1877
+ /**
1878
+ * An error occurred while paying frame earnings for an Argonot bond lot.
1879
+ **/
1880
+ CouldNotDistributeEarningsToArgonotBondLot: AugmentedEvent<
1881
+ ApiType,
1882
+ [
1883
+ frameId: u64,
1884
+ bondLotId: u64,
1885
+ accountId: AccountId32,
1886
+ amount: u128,
1887
+ dispatchError: SpRuntimeDispatchError,
1888
+ ],
1889
+ {
1890
+ frameId: u64;
1891
+ bondLotId: u64;
1892
+ accountId: AccountId32;
1893
+ amount: u128;
1894
+ dispatchError: SpRuntimeDispatchError;
1895
+ }
1896
+ >;
1844
1897
  /**
1845
1898
  * An error occurred while paying frame earnings for a bond lot.
1846
1899
  **/
@@ -1870,7 +1923,7 @@ declare module '@polkadot/api-base/types/events' {
1870
1923
  ApiType,
1871
1924
  [
1872
1925
  frameId: u64,
1873
- vaultId: u32,
1926
+ programId: PalletTreasuryBondProgramId,
1874
1927
  bondLotId: u64,
1875
1928
  amount: u128,
1876
1929
  accountId: AccountId32,
@@ -1878,7 +1931,7 @@ declare module '@polkadot/api-base/types/events' {
1878
1931
  ],
1879
1932
  {
1880
1933
  frameId: u64;
1881
- vaultId: u32;
1934
+ programId: PalletTreasuryBondProgramId;
1882
1935
  bondLotId: u64;
1883
1936
  amount: u128;
1884
1937
  accountId: AccountId32;
@@ -1907,8 +1960,24 @@ declare module '@polkadot/api-base/types/events' {
1907
1960
  **/
1908
1961
  FrameEarningsDistributed: AugmentedEvent<
1909
1962
  ApiType,
1910
- [frameId: u64, bidPoolDistributed: u128, treasuryReserves: u128, participatingVaults: u32],
1911
- { frameId: u64; bidPoolDistributed: u128; treasuryReserves: u128; participatingVaults: u32 }
1963
+ [
1964
+ frameId: u64,
1965
+ bidPoolDistributed: u128,
1966
+ argonotBondPoolDistributed: u128,
1967
+ vaultBidPoolDistributed: u128,
1968
+ treasuryRefunds: u128,
1969
+ treasuryReserves: u128,
1970
+ participatingVaults: u32,
1971
+ ],
1972
+ {
1973
+ frameId: u64;
1974
+ bidPoolDistributed: u128;
1975
+ argonotBondPoolDistributed: u128;
1976
+ vaultBidPoolDistributed: u128;
1977
+ treasuryRefunds: u128;
1978
+ treasuryReserves: u128;
1979
+ participatingVaults: u32;
1980
+ }
1912
1981
  >;
1913
1982
  /**
1914
1983
  * The current frame's vault capital was locked in.