@argonprotocol/mainchain 1.4.8 → 1.4.9-dev.c62e171b

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.8",
3
+ "version": "1.4.9-dev.c62e171b",
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.8",
68
+ "@argonprotocol/testing": "1.4.9-dev.c62e171b",
69
69
  "@polkadot/typegen": "^16.5.6",
70
70
  "@substrate/ss58-registry": "^1.51.0",
71
71
  "@types/node": "^20",
@@ -301,14 +301,25 @@ declare module '@polkadot/api-base/types/consts' {
301
301
  targetPricePerSeat: u128 & AugmentedConst<ApiType>;
302
302
  };
303
303
  mint: {
304
+ /**
305
+ * The maximum share of a queued bitcoin mint that may be paid in a single frame.
306
+ **/
307
+ bitcoinMintPayoutPercentPerFrame: Percent & AugmentedConst<ApiType>;
304
308
  /**
305
309
  * The maximum number of mint histories to keep
306
310
  **/
307
311
  maxMintHistoryToMaintain: u32 & AugmentedConst<ApiType>;
308
312
  /**
309
- * The maximum number of UTXOs that can be waiting for minting
313
+ * The maximum number of queued bitcoin mints that may receive payouts in a frame.
314
+ **/
315
+ maxPendingMintPayoutWindowSize: u32 & AugmentedConst<ApiType>;
316
+ /**
317
+ * The maximum number of queued mint entries a single bitcoin UTXO may accumulate.
318
+ **/
319
+ maxPendingMintsPerUtxo: u32 & AugmentedConst<ApiType>;
320
+ /**
321
+ * The maximum number of miners that can be paid in a frame.
310
322
  **/
311
- maxPendingMintUtxos: u32 & AugmentedConst<ApiType>;
312
323
  maxPossibleMiners: u32 & AugmentedConst<ApiType>;
313
324
  };
314
325
  multisig: {
@@ -560,6 +571,14 @@ declare module '@polkadot/api-base/types/consts' {
560
571
  operationalFeeMultiplier: u8 & AugmentedConst<ApiType>;
561
572
  };
562
573
  treasury: {
574
+ /**
575
+ * The maximum number of active Argonot bond lots.
576
+ **/
577
+ maxActiveArgonotBondLots: u32 & AugmentedConst<ApiType>;
578
+ /**
579
+ * The maximum percent of ownership-token circulation that can be bonded.
580
+ **/
581
+ maxArgonotBondedPercentOfCirculation: Percent & AugmentedConst<ApiType>;
563
582
  /**
564
583
  * The maximum number of bond lots whose release delay may mature in a single frame.
565
584
  **/
@@ -580,6 +599,10 @@ declare module '@polkadot/api-base/types/consts' {
580
599
  * Treasury pallet id retained in metadata for account derivation.
581
600
  **/
582
601
  palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
602
+ /**
603
+ * Percent of the full bid pool paid to Argonot bonds before vault distribution.
604
+ **/
605
+ percentForArgonotBondPool: Percent & AugmentedConst<ApiType>;
583
606
  /**
584
607
  * Percent of the bid pool reserved for treasury reserves.
585
608
  **/
@@ -790,6 +790,10 @@ declare module '@polkadot/api-base/types/errors' {
790
790
  * Bids must be in allowed increments
791
791
  **/
792
792
  InvalidBidAmount: AugmentedError<ApiType>;
793
+ /**
794
+ * Mining slot bidding currently requires prior operational-account registration.
795
+ **/
796
+ OperationalAccountRegistrationRequired: AugmentedError<ApiType>;
793
797
  /**
794
798
  * Bidding for the next cohort has closed
795
799
  **/
@@ -1018,6 +1022,10 @@ declare module '@polkadot/api-base/types/errors' {
1018
1022
  * The referral proof has expired.
1019
1023
  **/
1020
1024
  ReferralProofExpired: AugmentedError<ApiType>;
1025
+ /**
1026
+ * A valid invite is required to register an operational account.
1027
+ **/
1028
+ RegistrationInviteRequired: AugmentedError<ApiType>;
1021
1029
  /**
1022
1030
  * Reward claims must be at least one Argon.
1023
1031
  **/
@@ -1192,6 +1200,14 @@ declare module '@polkadot/api-base/types/errors' {
1192
1200
  * treasury backing.
1193
1201
  **/
1194
1202
  ActiveBondAmountBelowEncumberedBacking: AugmentedError<ApiType>;
1203
+ /**
1204
+ * The Argonot bond purchase would exceed the active circulation cap.
1205
+ **/
1206
+ ArgonotBondPurchaseAboveCap: AugmentedError<ApiType>;
1207
+ /**
1208
+ * The Argonot bond purchase did not beat the current active-set cutoff.
1209
+ **/
1210
+ ArgonotBondPurchaseBelowCutoff: AugmentedError<ApiType>;
1195
1211
  /**
1196
1212
  * The bond lot is already scheduled for release.
1197
1213
  **/
@@ -1343,6 +1359,10 @@ declare module '@polkadot/api-base/types/errors' {
1343
1359
  * No Vault public keys are available
1344
1360
  **/
1345
1361
  NoVaultBitcoinPubkeysAvailable: AugmentedError<ApiType>;
1362
+ /**
1363
+ * Vault creation currently requires prior operational-account registration.
1364
+ **/
1365
+ OperationalAccountRegistrationRequired: AugmentedError<ApiType>;
1346
1366
  /**
1347
1367
  * A vault must clear out all overdue external collect blockers before it can collect.
1348
1368
  **/
@@ -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,
@@ -1804,20 +1805,42 @@ declare module '@polkadot/api-base/types/events' {
1804
1805
  };
1805
1806
  treasury: {
1806
1807
  /**
1807
- * A bond purchase entered a vault's accepted list.
1808
+ * A bond purchase entered its active program set.
1808
1809
  **/
1809
1810
  BondLotPurchased: AugmentedEvent<
1810
1811
  ApiType,
1811
- [vaultId: u32, bondLotId: u64, accountId: AccountId32, bonds: u32],
1812
- { vaultId: u32; bondLotId: u64; accountId: AccountId32; bonds: u32 }
1812
+ [
1813
+ programId: PalletTreasuryBondProgramId,
1814
+ bondLotId: u64,
1815
+ accountId: AccountId32,
1816
+ bonds: u32,
1817
+ ],
1818
+ {
1819
+ programId: PalletTreasuryBondProgramId;
1820
+ bondLotId: u64;
1821
+ accountId: AccountId32;
1822
+ bonds: u32;
1823
+ }
1813
1824
  >;
1814
1825
  /**
1815
1826
  * A bond lot was released.
1816
1827
  **/
1817
1828
  BondLotReleased: AugmentedEvent<
1818
1829
  ApiType,
1819
- [frameId: u64, vaultId: u32, bondLotId: u64, accountId: AccountId32, bonds: u32],
1820
- { frameId: u64; vaultId: u32; bondLotId: u64; accountId: AccountId32; bonds: u32 }
1830
+ [
1831
+ frameId: u64,
1832
+ programId: PalletTreasuryBondProgramId,
1833
+ bondLotId: u64,
1834
+ accountId: AccountId32,
1835
+ bonds: u32,
1836
+ ],
1837
+ {
1838
+ frameId: u64;
1839
+ programId: PalletTreasuryBondProgramId;
1840
+ bondLotId: u64;
1841
+ accountId: AccountId32;
1842
+ bonds: u32;
1843
+ }
1821
1844
  >;
1822
1845
  /**
1823
1846
  * A bond lot was removed from future frames and scheduled for release.
@@ -1825,7 +1848,7 @@ declare module '@polkadot/api-base/types/events' {
1825
1848
  BondLotReleaseScheduled: AugmentedEvent<
1826
1849
  ApiType,
1827
1850
  [
1828
- vaultId: u32,
1851
+ programId: PalletTreasuryBondProgramId,
1829
1852
  bondLotId: u64,
1830
1853
  accountId: AccountId32,
1831
1854
  bonds: u32,
@@ -1833,7 +1856,7 @@ declare module '@polkadot/api-base/types/events' {
1833
1856
  reason: PalletTreasuryBondReleaseReason,
1834
1857
  ],
1835
1858
  {
1836
- vaultId: u32;
1859
+ programId: PalletTreasuryBondProgramId;
1837
1860
  bondLotId: u64;
1838
1861
  accountId: AccountId32;
1839
1862
  bonds: u32;
@@ -1841,6 +1864,26 @@ declare module '@polkadot/api-base/types/events' {
1841
1864
  reason: PalletTreasuryBondReleaseReason;
1842
1865
  }
1843
1866
  >;
1867
+ /**
1868
+ * An error occurred while paying frame earnings for an Argonot bond lot.
1869
+ **/
1870
+ CouldNotDistributeEarningsToArgonotBondLot: AugmentedEvent<
1871
+ ApiType,
1872
+ [
1873
+ frameId: u64,
1874
+ bondLotId: u64,
1875
+ accountId: AccountId32,
1876
+ amount: u128,
1877
+ dispatchError: SpRuntimeDispatchError,
1878
+ ],
1879
+ {
1880
+ frameId: u64;
1881
+ bondLotId: u64;
1882
+ accountId: AccountId32;
1883
+ amount: u128;
1884
+ dispatchError: SpRuntimeDispatchError;
1885
+ }
1886
+ >;
1844
1887
  /**
1845
1888
  * An error occurred while paying frame earnings for a bond lot.
1846
1889
  **/
@@ -1870,7 +1913,7 @@ declare module '@polkadot/api-base/types/events' {
1870
1913
  ApiType,
1871
1914
  [
1872
1915
  frameId: u64,
1873
- vaultId: u32,
1916
+ programId: PalletTreasuryBondProgramId,
1874
1917
  bondLotId: u64,
1875
1918
  amount: u128,
1876
1919
  accountId: AccountId32,
@@ -1878,7 +1921,7 @@ declare module '@polkadot/api-base/types/events' {
1878
1921
  ],
1879
1922
  {
1880
1923
  frameId: u64;
1881
- vaultId: u32;
1924
+ programId: PalletTreasuryBondProgramId;
1882
1925
  bondLotId: u64;
1883
1926
  amount: u128;
1884
1927
  accountId: AccountId32;
@@ -1907,8 +1950,24 @@ declare module '@polkadot/api-base/types/events' {
1907
1950
  **/
1908
1951
  FrameEarningsDistributed: AugmentedEvent<
1909
1952
  ApiType,
1910
- [frameId: u64, bidPoolDistributed: u128, treasuryReserves: u128, participatingVaults: u32],
1911
- { frameId: u64; bidPoolDistributed: u128; treasuryReserves: u128; participatingVaults: u32 }
1953
+ [
1954
+ frameId: u64,
1955
+ bidPoolDistributed: u128,
1956
+ argonotBondPoolDistributed: u128,
1957
+ vaultBidPoolDistributed: u128,
1958
+ treasuryRefunds: u128,
1959
+ treasuryReserves: u128,
1960
+ participatingVaults: u32,
1961
+ ],
1962
+ {
1963
+ frameId: u64;
1964
+ bidPoolDistributed: u128;
1965
+ argonotBondPoolDistributed: u128;
1966
+ vaultBidPoolDistributed: u128;
1967
+ treasuryRefunds: u128;
1968
+ treasuryReserves: u128;
1969
+ participatingVaults: u32;
1970
+ }
1912
1971
  >;
1913
1972
  /**
1914
1973
  * The current frame's vault capital was locked in.
@@ -88,6 +88,8 @@ import type {
88
88
  PalletLocalchainTransferQueuedTransferOut,
89
89
  PalletMiningSlotMinerNonceScoring,
90
90
  PalletMintMintAction,
91
+ PalletMintMintQueueCursor,
92
+ PalletMintPendingMintUtxo,
91
93
  PalletMultisigMultisig,
92
94
  PalletOperationalAccountsOperationalAccount,
93
95
  PalletOperationalAccountsRewardsConfig,
@@ -99,6 +101,7 @@ import type {
99
101
  PalletTransactionPaymentReleases,
100
102
  PalletTreasuryBondLot,
101
103
  PalletTreasuryBondLotSummary,
104
+ PalletTreasuryFrameArgonotBondParticipants,
102
105
  PalletTreasuryFrameVaultCapital,
103
106
  PalletVaultsRecentCapacityDrop,
104
107
  PalletVaultsVaultFrameRevenue,
@@ -403,6 +406,10 @@ declare module '@polkadot/api-base/types/storage' {
403
406
  * Bool if block rewards are paused
404
407
  **/
405
408
  blockRewardsPaused: AugmentedQuery<ApiType, () => Observable<bool>, []>;
409
+ /**
410
+ * Bool if block voter rewards are enabled
411
+ **/
412
+ blockVoterRewardsEnabled: AugmentedQuery<ApiType, () => Observable<bool>, []>;
406
413
  /**
407
414
  * Historical payouts by block number
408
415
  **/
@@ -1101,15 +1108,36 @@ declare module '@polkadot/api-base/types/storage' {
1101
1108
  **/
1102
1109
  mintedMiningMicrogons: AugmentedQuery<ApiType, () => Observable<u128>, []>;
1103
1110
  /**
1104
- * Bitcoin UTXOs that have been submitted for minting. This list is FIFO for minting whenever
1105
- * a) CPI >= 0 and
1106
- * b) the aggregate minted Bitcoins <= the aggregate minted microgons from mining
1111
+ * The next monotonic queue index to assign to a pending bitcoin mint.
1112
+ **/
1113
+ nextPendingMintUtxoIndex: AugmentedQuery<ApiType, () => Observable<u64>, []>;
1114
+ /**
1115
+ * Queue bookkeeping for pending bitcoin mints, including the bounded payout start and the
1116
+ * current frame scan cursor.
1107
1117
  **/
1108
- pendingMintUtxos: AugmentedQuery<
1118
+ pendingMintQueueState: AugmentedQuery<
1109
1119
  ApiType,
1110
- () => Observable<Vec<ITuple<[u64, AccountId32, u128]>>>,
1120
+ () => Observable<PalletMintMintQueueCursor>,
1111
1121
  []
1112
1122
  >;
1123
+ /**
1124
+ * Reverse lookup from bitcoin UTXO id to all queued mint indices for direct removal and
1125
+ * client lookup.
1126
+ **/
1127
+ pendingMintUtxoIdLookup: AugmentedQuery<
1128
+ ApiType,
1129
+ (arg: u64 | AnyNumber | Uint8Array) => Observable<Vec<u64>>,
1130
+ [u64]
1131
+ >;
1132
+ /**
1133
+ * Bitcoin UTXOs that have been submitted for minting, keyed by a monotonic queue index so
1134
+ * payouts can preserve FIFO order while each frame works through a fixed payout cohort.
1135
+ **/
1136
+ pendingMintUtxosByIndex: AugmentedQuery<
1137
+ ApiType,
1138
+ (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletMintPendingMintUtxo>>,
1139
+ [u64]
1140
+ >;
1113
1141
  };
1114
1142
  multisig: {
1115
1143
  /**
@@ -1262,6 +1290,16 @@ declare module '@polkadot/api-base/types/storage' {
1262
1290
  * Oldest referral expiration frame that still has cleanup work to resume.
1263
1291
  **/
1264
1292
  expiredReferralCodeCleanupFrame: AugmentedQuery<ApiType, () => Observable<Option<u64>>, []>;
1293
+ /**
1294
+ * Whether operational-account access is invite-only.
1295
+ *
1296
+ * When enabled, registration requires a valid referral invite and vault creation plus
1297
+ * mining-slot bidding remain restricted to registered operational accounts.
1298
+ *
1299
+ * Existing live raw chain specs do not contain this key, so the default remains invite-only
1300
+ * unless a development chain overrides it in genesis.
1301
+ **/
1302
+ isOperationalAccountInviteOnly: AugmentedQuery<ApiType, () => Observable<bool>, []>;
1265
1303
  /**
1266
1304
  * Reverse lookup of any linked account to its operational account id.
1267
1305
  **/
@@ -1631,6 +1669,14 @@ declare module '@polkadot/api-base/types/storage' {
1631
1669
  >;
1632
1670
  };
1633
1671
  treasury: {
1672
+ /**
1673
+ * The active top Argonot bond lots kept in ascending bond order, then lower ids first.
1674
+ **/
1675
+ argonotBondLots: AugmentedQuery<
1676
+ ApiType,
1677
+ () => Observable<Vec<PalletTreasuryBondLotSummary>>,
1678
+ []
1679
+ >;
1634
1680
  /**
1635
1681
  * The stored state for each bond lot.
1636
1682
  **/
@@ -1660,6 +1706,16 @@ declare module '@polkadot/api-base/types/storage' {
1660
1706
  (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<PalletTreasuryBondLotSummary>>,
1661
1707
  [u32]
1662
1708
  >;
1709
+ /**
1710
+ * The Argonot bond participants locked for the current frame.
1711
+ *
1712
+ * Payout uses this to see which Argonot bond lots are participating in the frame.
1713
+ **/
1714
+ currentFrameArgonotBondParticipants: AugmentedQuery<
1715
+ ApiType,
1716
+ () => Observable<Option<PalletTreasuryFrameArgonotBondParticipants>>,
1717
+ []
1718
+ >;
1663
1719
  /**
1664
1720
  * The vault capital locked for the current frame.
1665
1721
  *
@@ -1699,6 +1755,10 @@ declare module '@polkadot/api-base/types/storage' {
1699
1755
  (arg: u64 | AnyNumber | Uint8Array) => Observable<Vec<u64>>,
1700
1756
  [u64]
1701
1757
  >;
1758
+ /**
1759
+ * The total number of active Argonot bonds in the active set.
1760
+ **/
1761
+ totalActiveArgonotBonds: AugmentedQuery<ApiType, () => Observable<u32>, []>;
1702
1762
  };
1703
1763
  txPause: {
1704
1764
  /**
@@ -508,6 +508,10 @@ declare module '@polkadot/api-base/types/submittable' {
508
508
  (paused: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>,
509
509
  [bool]
510
510
  >;
511
+ setBlockVoterRewardsEnabled: AugmentedSubmittable<
512
+ (enabled: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>,
513
+ [bool]
514
+ >;
511
515
  };
512
516
  blockSeal: {
513
517
  apply: AugmentedSubmittable<
@@ -1165,6 +1169,7 @@ declare module '@polkadot/api-base/types/submittable' {
1165
1169
  * Register vault, mining funding, and bot accounts for an operational account.
1166
1170
  * Any account in the registration may submit the transaction.
1167
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.
1168
1173
  **/
1169
1174
  register: AugmentedSubmittable<
1170
1175
  (
@@ -1997,6 +2002,13 @@ declare module '@polkadot/api-base/types/submittable' {
1997
2002
  >;
1998
2003
  };
1999
2004
  treasury: {
2005
+ /**
2006
+ * Buy whole bond units for the Argonot active set.
2007
+ **/
2008
+ buyArgonotBonds: AugmentedSubmittable<
2009
+ (bonds: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
2010
+ [u32]
2011
+ >;
2000
2012
  /**
2001
2013
  * Buy whole `1 ARGON` bonds for a vault.
2002
2014
  *