@argonprotocol/mainchain 1.4.9-dev.bc5f3764 → 1.4.9-dev.c5b2f1ef

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.bc5f3764",
3
+ "version": "1.4.9-dev.c5b2f1ef",
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.bc5f3764",
68
+ "@argonprotocol/testing": "1.4.9-dev.c5b2f1ef",
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
  **/
@@ -301,14 +296,25 @@ declare module '@polkadot/api-base/types/consts' {
301
296
  targetPricePerSeat: u128 & AugmentedConst<ApiType>;
302
297
  };
303
298
  mint: {
299
+ /**
300
+ * The maximum share of a queued bitcoin mint that may be paid in a single frame.
301
+ **/
302
+ bitcoinMintPayoutPercentPerFrame: Percent & AugmentedConst<ApiType>;
304
303
  /**
305
304
  * The maximum number of mint histories to keep
306
305
  **/
307
306
  maxMintHistoryToMaintain: u32 & AugmentedConst<ApiType>;
308
307
  /**
309
- * The maximum number of UTXOs that can be waiting for minting
308
+ * The maximum number of queued bitcoin mints that may receive payouts in a frame.
309
+ **/
310
+ maxPendingMintPayoutWindowSize: u32 & AugmentedConst<ApiType>;
311
+ /**
312
+ * The maximum number of queued mint entries a single bitcoin UTXO may accumulate.
313
+ **/
314
+ maxPendingMintsPerUtxo: u32 & AugmentedConst<ApiType>;
315
+ /**
316
+ * The maximum number of miners that can be paid in a frame.
310
317
  **/
311
- maxPendingMintUtxos: u32 & AugmentedConst<ApiType>;
312
318
  maxPossibleMiners: u32 & AugmentedConst<ApiType>;
313
319
  };
314
320
  multisig: {
@@ -359,45 +365,58 @@ declare module '@polkadot/api-base/types/consts' {
359
365
  };
360
366
  operationalAccounts: {
361
367
  /**
362
- * 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.
363
370
  **/
364
- bitcoinLockSizeForReferral: u128 & AugmentedConst<ApiType>;
371
+ bitcoinLockSizeForUpgradeCode: u128 & AugmentedConst<ApiType>;
365
372
  /**
366
- * Maximum number of available referrals allowed at once.
373
+ * Maximum number of available upgrade codes allowed at once.
367
374
  **/
368
- maxAvailableReferrals: u32 & AugmentedConst<ApiType>;
375
+ maxAvailableUpgradeCodes: u32 & AugmentedConst<ApiType>;
369
376
  /**
370
- * Maximum number of encrypted server bytes stored per sponsee.
377
+ * Maximum number of encrypted server bytes stored per network account.
371
378
  **/
372
379
  maxEncryptedServerLen: u32 & AugmentedConst<ApiType>;
373
- /**
374
- * Maximum number of expired referral codes cleared per block.
375
- **/
376
- maxExpiredReferralCodeCleanupsPerBlock: u32 & AugmentedConst<ApiType>;
377
380
  /**
378
381
  * Mining seats required to become operational.
379
382
  **/
380
383
  miningSeatsForOperational: u32 & AugmentedConst<ApiType>;
381
384
  /**
382
- * 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.
383
394
  **/
384
- miningSeatsPerReferral: u32 & AugmentedConst<ApiType>;
395
+ operationalMinimumUniswapTransfer: u128 & AugmentedConst<ApiType>;
385
396
  /**
386
397
  * Minimum vault securitization required to become operational.
387
398
  **/
388
399
  operationalMinimumVaultSecuritization: u128 & AugmentedConst<ApiType>;
389
400
  /**
390
- * Default bonus reward paid every referral threshold.
401
+ * Default bonus reward paid every operational referral threshold.
391
402
  **/
392
403
  operationalReferralBonusReward: u128 & AugmentedConst<ApiType>;
393
404
  /**
394
- * 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.
395
414
  **/
396
- operationalReferralReward: u128 & AugmentedConst<ApiType>;
415
+ treasuryMinimumBonds: u128 & AugmentedConst<ApiType>;
397
416
  /**
398
- * Number of operational sponsees required per referral bonus reward.
417
+ * Minimum Uniswap transfer amount required for treasury certification.
399
418
  **/
400
- referralBonusEveryXOperationalSponsees: u32 & AugmentedConst<ApiType>;
419
+ treasuryMinimumUniswapTransfer: 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
  **/
@@ -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.
1031
+ **/
1032
+ NotTreasuryCertified: AugmentedError<ApiType>;
1033
+ /**
1034
+ * The requested referrer does not have a registered operational account.
1019
1035
  **/
1020
- NotSponsorOfSponsee: AugmentedError<ApiType>;
1036
+ ReferrerNotOperationalAccount: AugmentedError<ApiType>;
1021
1037
  /**
1022
- * The referral proof has expired.
1038
+ * The requested referrer does not match the referrer recorded during registration.
1023
1039
  **/
1024
- ReferralProofExpired: AugmentedError<ApiType>;
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
  **/
@@ -1200,6 +1220,14 @@ declare module '@polkadot/api-base/types/errors' {
1200
1220
  * treasury backing.
1201
1221
  **/
1202
1222
  ActiveBondAmountBelowEncumberedBacking: AugmentedError<ApiType>;
1223
+ /**
1224
+ * The Argonot bond purchase would exceed the active circulation cap.
1225
+ **/
1226
+ ArgonotBondPurchaseAboveCap: AugmentedError<ApiType>;
1227
+ /**
1228
+ * The Argonot bond purchase did not beat the current active-set cutoff.
1229
+ **/
1230
+ ArgonotBondPurchaseBelowCutoff: AugmentedError<ApiType>;
1203
1231
  /**
1204
1232
  * The bond lot is already scheduled for release.
1205
1233
  **/
@@ -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,
@@ -1240,6 +1241,22 @@ declare module '@polkadot/api-base/types/events' {
1240
1241
  >;
1241
1242
  };
1242
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
+ >;
1243
1260
  /**
1244
1261
  * Account has become operational.
1245
1262
  **/
@@ -1249,12 +1266,12 @@ declare module '@polkadot/api-base/types/events' {
1249
1266
  { account: AccountId32 }
1250
1267
  >;
1251
1268
  /**
1252
- * A sponsor updated the encrypted server payload for a sponsee.
1269
+ * A referrer updated the encrypted server payload for a downstream account.
1253
1270
  **/
1254
1271
  EncryptedServerUpdated: AugmentedEvent<
1255
1272
  ApiType,
1256
- [sponsor: AccountId32, sponsee: AccountId32],
1257
- { sponsor: AccountId32; sponsee: AccountId32 }
1273
+ [referrer: AccountId32, downstreamAccount: AccountId32],
1274
+ { referrer: AccountId32; downstreamAccount: AccountId32 }
1258
1275
  >;
1259
1276
  /**
1260
1277
  * An operational account was registered with its linked accounts.
@@ -1264,16 +1281,14 @@ declare module '@polkadot/api-base/types/events' {
1264
1281
  [
1265
1282
  operationalAccount: AccountId32,
1266
1283
  vaultAccount: AccountId32,
1267
- miningFundingAccount: AccountId32,
1268
- miningBotAccount: AccountId32,
1269
- sponsor: Option<AccountId32>,
1284
+ miningAccount: AccountId32,
1285
+ referrer: Option<AccountId32>,
1270
1286
  ],
1271
1287
  {
1272
1288
  operationalAccount: AccountId32;
1273
1289
  vaultAccount: AccountId32;
1274
- miningFundingAccount: AccountId32;
1275
- miningBotAccount: AccountId32;
1276
- sponsor: Option<AccountId32>;
1290
+ miningAccount: AccountId32;
1291
+ referrer: Option<AccountId32>;
1277
1292
  }
1278
1293
  >;
1279
1294
  /**
@@ -1284,20 +1299,24 @@ declare module '@polkadot/api-base/types/events' {
1284
1299
  [
1285
1300
  account: AccountId32,
1286
1301
  updateOperationalProgress: bool,
1287
- hasUniswapTransfer: bool,
1302
+ isTreasuryCertified: bool,
1303
+ uniswapArgonTransfersInAmount: u128,
1304
+ accountBitcoinAmount: u128,
1305
+ accountVaultBondAmount: u128,
1288
1306
  vaultCreated: bool,
1289
- hasTreasuryPoolParticipation: bool,
1290
- observedBitcoinTotal: u128,
1291
- observedMiningSeatTotal: u32,
1307
+ operatorVaultBitcoinAmount: u128,
1308
+ miningSeatCount: u32,
1292
1309
  ],
1293
1310
  {
1294
1311
  account: AccountId32;
1295
1312
  updateOperationalProgress: bool;
1296
- hasUniswapTransfer: bool;
1313
+ isTreasuryCertified: bool;
1314
+ uniswapArgonTransfersInAmount: u128;
1315
+ accountBitcoinAmount: u128;
1316
+ accountVaultBondAmount: u128;
1297
1317
  vaultCreated: bool;
1298
- hasTreasuryPoolParticipation: bool;
1299
- observedBitcoinTotal: u128;
1300
- observedMiningSeatTotal: u32;
1318
+ operatorVaultBitcoinAmount: u128;
1319
+ miningSeatCount: u32;
1301
1320
  }
1302
1321
  >;
1303
1322
  /**
@@ -1339,8 +1358,8 @@ declare module '@polkadot/api-base/types/events' {
1339
1358
  **/
1340
1359
  RewardsConfigUpdated: AugmentedEvent<
1341
1360
  ApiType,
1342
- [operationalReferralReward: u128, referralBonusReward: u128],
1343
- { operationalReferralReward: u128; referralBonusReward: u128 }
1361
+ [operationalActivationReward: u128, operationalReferralBonusReward: u128],
1362
+ { operationalActivationReward: u128; operationalReferralBonusReward: u128 }
1344
1363
  >;
1345
1364
  };
1346
1365
  ownership: {
@@ -1804,20 +1823,42 @@ declare module '@polkadot/api-base/types/events' {
1804
1823
  };
1805
1824
  treasury: {
1806
1825
  /**
1807
- * A bond purchase entered a vault's accepted list.
1826
+ * A bond purchase entered its active program set.
1808
1827
  **/
1809
1828
  BondLotPurchased: AugmentedEvent<
1810
1829
  ApiType,
1811
- [vaultId: u32, bondLotId: u64, accountId: AccountId32, bonds: u32],
1812
- { vaultId: u32; bondLotId: u64; accountId: AccountId32; bonds: u32 }
1830
+ [
1831
+ programId: PalletTreasuryBondProgramId,
1832
+ bondLotId: u64,
1833
+ accountId: AccountId32,
1834
+ bonds: u32,
1835
+ ],
1836
+ {
1837
+ programId: PalletTreasuryBondProgramId;
1838
+ bondLotId: u64;
1839
+ accountId: AccountId32;
1840
+ bonds: u32;
1841
+ }
1813
1842
  >;
1814
1843
  /**
1815
1844
  * A bond lot was released.
1816
1845
  **/
1817
1846
  BondLotReleased: AugmentedEvent<
1818
1847
  ApiType,
1819
- [frameId: u64, vaultId: u32, bondLotId: u64, accountId: AccountId32, bonds: u32],
1820
- { frameId: u64; vaultId: u32; bondLotId: u64; accountId: AccountId32; bonds: u32 }
1848
+ [
1849
+ frameId: u64,
1850
+ programId: PalletTreasuryBondProgramId,
1851
+ bondLotId: u64,
1852
+ accountId: AccountId32,
1853
+ bonds: u32,
1854
+ ],
1855
+ {
1856
+ frameId: u64;
1857
+ programId: PalletTreasuryBondProgramId;
1858
+ bondLotId: u64;
1859
+ accountId: AccountId32;
1860
+ bonds: u32;
1861
+ }
1821
1862
  >;
1822
1863
  /**
1823
1864
  * A bond lot was removed from future frames and scheduled for release.
@@ -1825,7 +1866,7 @@ declare module '@polkadot/api-base/types/events' {
1825
1866
  BondLotReleaseScheduled: AugmentedEvent<
1826
1867
  ApiType,
1827
1868
  [
1828
- vaultId: u32,
1869
+ programId: PalletTreasuryBondProgramId,
1829
1870
  bondLotId: u64,
1830
1871
  accountId: AccountId32,
1831
1872
  bonds: u32,
@@ -1833,7 +1874,7 @@ declare module '@polkadot/api-base/types/events' {
1833
1874
  reason: PalletTreasuryBondReleaseReason,
1834
1875
  ],
1835
1876
  {
1836
- vaultId: u32;
1877
+ programId: PalletTreasuryBondProgramId;
1837
1878
  bondLotId: u64;
1838
1879
  accountId: AccountId32;
1839
1880
  bonds: u32;
@@ -1841,6 +1882,26 @@ declare module '@polkadot/api-base/types/events' {
1841
1882
  reason: PalletTreasuryBondReleaseReason;
1842
1883
  }
1843
1884
  >;
1885
+ /**
1886
+ * An error occurred while paying frame earnings for an Argonot bond lot.
1887
+ **/
1888
+ CouldNotDistributeEarningsToArgonotBondLot: AugmentedEvent<
1889
+ ApiType,
1890
+ [
1891
+ frameId: u64,
1892
+ bondLotId: u64,
1893
+ accountId: AccountId32,
1894
+ amount: u128,
1895
+ dispatchError: SpRuntimeDispatchError,
1896
+ ],
1897
+ {
1898
+ frameId: u64;
1899
+ bondLotId: u64;
1900
+ accountId: AccountId32;
1901
+ amount: u128;
1902
+ dispatchError: SpRuntimeDispatchError;
1903
+ }
1904
+ >;
1844
1905
  /**
1845
1906
  * An error occurred while paying frame earnings for a bond lot.
1846
1907
  **/
@@ -1870,7 +1931,7 @@ declare module '@polkadot/api-base/types/events' {
1870
1931
  ApiType,
1871
1932
  [
1872
1933
  frameId: u64,
1873
- vaultId: u32,
1934
+ programId: PalletTreasuryBondProgramId,
1874
1935
  bondLotId: u64,
1875
1936
  amount: u128,
1876
1937
  accountId: AccountId32,
@@ -1878,7 +1939,7 @@ declare module '@polkadot/api-base/types/events' {
1878
1939
  ],
1879
1940
  {
1880
1941
  frameId: u64;
1881
- vaultId: u32;
1942
+ programId: PalletTreasuryBondProgramId;
1882
1943
  bondLotId: u64;
1883
1944
  amount: u128;
1884
1945
  accountId: AccountId32;
@@ -1907,8 +1968,24 @@ declare module '@polkadot/api-base/types/events' {
1907
1968
  **/
1908
1969
  FrameEarningsDistributed: AugmentedEvent<
1909
1970
  ApiType,
1910
- [frameId: u64, bidPoolDistributed: u128, treasuryReserves: u128, participatingVaults: u32],
1911
- { frameId: u64; bidPoolDistributed: u128; treasuryReserves: u128; participatingVaults: u32 }
1971
+ [
1972
+ frameId: u64,
1973
+ bidPoolDistributed: u128,
1974
+ argonotBondPoolDistributed: u128,
1975
+ vaultBidPoolDistributed: u128,
1976
+ treasuryRefunds: u128,
1977
+ treasuryReserves: u128,
1978
+ participatingVaults: u32,
1979
+ ],
1980
+ {
1981
+ frameId: u64;
1982
+ bidPoolDistributed: u128;
1983
+ argonotBondPoolDistributed: u128;
1984
+ vaultBidPoolDistributed: u128;
1985
+ treasuryRefunds: u128;
1986
+ treasuryReserves: u128;
1987
+ participatingVaults: u32;
1988
+ }
1912
1989
  >;
1913
1990
  /**
1914
1991
  * The current frame's vault capital was locked in.