@argonprotocol/mainchain 1.4.9-dev.bc5f3764 → 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.9-dev.bc5f3764",
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.9-dev.bc5f3764",
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
  **/
@@ -1200,6 +1200,14 @@ declare module '@polkadot/api-base/types/errors' {
1200
1200
  * treasury backing.
1201
1201
  **/
1202
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>;
1203
1211
  /**
1204
1212
  * The bond lot is already scheduled for release.
1205
1213
  **/
@@ -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,
@@ -1105,15 +1108,36 @@ declare module '@polkadot/api-base/types/storage' {
1105
1108
  **/
1106
1109
  mintedMiningMicrogons: AugmentedQuery<ApiType, () => Observable<u128>, []>;
1107
1110
  /**
1108
- * Bitcoin UTXOs that have been submitted for minting. This list is FIFO for minting whenever
1109
- * a) CPI >= 0 and
1110
- * b) the aggregate minted Bitcoins <= the aggregate minted microgons from mining
1111
+ * The next monotonic queue index to assign to a pending bitcoin mint.
1111
1112
  **/
1112
- pendingMintUtxos: AugmentedQuery<
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.
1117
+ **/
1118
+ pendingMintQueueState: AugmentedQuery<
1113
1119
  ApiType,
1114
- () => Observable<Vec<ITuple<[u64, AccountId32, u128]>>>,
1120
+ () => Observable<PalletMintMintQueueCursor>,
1115
1121
  []
1116
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
+ >;
1117
1141
  };
1118
1142
  multisig: {
1119
1143
  /**
@@ -1645,6 +1669,14 @@ declare module '@polkadot/api-base/types/storage' {
1645
1669
  >;
1646
1670
  };
1647
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
+ >;
1648
1680
  /**
1649
1681
  * The stored state for each bond lot.
1650
1682
  **/
@@ -1674,6 +1706,16 @@ declare module '@polkadot/api-base/types/storage' {
1674
1706
  (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<PalletTreasuryBondLotSummary>>,
1675
1707
  [u32]
1676
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
+ >;
1677
1719
  /**
1678
1720
  * The vault capital locked for the current frame.
1679
1721
  *
@@ -1713,6 +1755,10 @@ declare module '@polkadot/api-base/types/storage' {
1713
1755
  (arg: u64 | AnyNumber | Uint8Array) => Observable<Vec<u64>>,
1714
1756
  [u64]
1715
1757
  >;
1758
+ /**
1759
+ * The total number of active Argonot bonds in the active set.
1760
+ **/
1761
+ totalActiveArgonotBonds: AugmentedQuery<ApiType, () => Observable<u32>, []>;
1716
1762
  };
1717
1763
  txPause: {
1718
1764
  /**
@@ -2002,6 +2002,13 @@ declare module '@polkadot/api-base/types/submittable' {
2002
2002
  >;
2003
2003
  };
2004
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
+ >;
2005
2012
  /**
2006
2013
  * Buy whole `1 ARGON` bonds for a vault.
2007
2014
  *