@argonprotocol/mainchain 1.4.7 → 1.4.8-dev.fe6d442d

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.7",
3
+ "version": "1.4.8-dev.fe6d442d",
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.7",
68
+ "@argonprotocol/testing": "1.4.8-dev.fe6d442d",
69
69
  "@polkadot/typegen": "^16.5.6",
70
70
  "@substrate/ss58-registry": "^1.51.0",
71
71
  "@types/node": "^20",
@@ -263,9 +263,9 @@ declare module '@polkadot/api-base/types/consts' {
263
263
  };
264
264
  miningSlot: {
265
265
  /**
266
- * The max percent swing for the argonots per slot (from the last percent)
266
+ * The multiple of the prior-day lower median winning bid that must be collateralized.
267
267
  **/
268
- argonotsPercentAdjustmentDamper: u128 & AugmentedConst<ApiType>;
268
+ argonotBidCollateralMultiple: u128 & AugmentedConst<ApiType>;
269
269
  /**
270
270
  * The increment that bids can be on (for instance, one cent increments)
271
271
  **/
@@ -274,24 +274,19 @@ declare module '@polkadot/api-base/types/consts' {
274
274
  * The number of frames a miner operates for
275
275
  **/
276
276
  framesPerMiningTerm: u32 & AugmentedConst<ApiType>;
277
+ /**
278
+ * The initial argonots needed per seat before a prior-day median is available.
279
+ **/
280
+ initialArgonotsPerSeat: u128 & AugmentedConst<ApiType>;
277
281
  /**
278
282
  * How many new miners can be in the cohort for each slot. The actual maximum will adjust
279
283
  * dynamically
280
284
  **/
281
285
  maxCohortSize: u32 & AugmentedConst<ApiType>;
282
- /**
283
- * The maximum percent of argonots in the network that should be required for
284
- * mining seats
285
- **/
286
- maximumArgonotProrataPercent: Percent & AugmentedConst<ApiType>;
287
286
  /**
288
287
  * The minimum number of miners per cohort
289
288
  **/
290
289
  minCohortSize: u32 & AugmentedConst<ApiType>;
291
- /**
292
- * The minimum argonots needed per seat
293
- **/
294
- minimumArgonotsPerSeat: u128 & AugmentedConst<ApiType>;
295
290
  /**
296
291
  * Account that receives mining bid funds before treasury distribution.
297
292
  **/
@@ -300,11 +295,6 @@ declare module '@polkadot/api-base/types/consts' {
300
295
  * The damper on the price per seat adjustment (from the last price)
301
296
  **/
302
297
  pricePerSeatAdjustmentDamper: u128 & AugmentedConst<ApiType>;
303
- /**
304
- * The target percent of bids per auction relative to the max number of seats. This will
305
- * adjust the argonots per seat up or down to ensure mining slots are filled.
306
- **/
307
- targetBidsPerSeatPercent: u128 & AugmentedConst<ApiType>;
308
298
  /**
309
299
  * The target price per seat.
310
300
  **/
@@ -445,6 +435,10 @@ declare module '@polkadot/api-base/types/consts' {
445
435
  * no corresponding constant for time to recovery to target
446
436
  **/
447
437
  maxArgonChangePerTickAwayFromTarget: u128 & AugmentedConst<ApiType>;
438
+ /**
439
+ * Maximum number of per-frame Argonot average buckets to retain.
440
+ **/
441
+ maxArgonotAverageHistoryFrames: u32 & AugmentedConst<ApiType>;
448
442
  /**
449
443
  * Maximum number of per-frame Argonot floor buckets to retain.
450
444
  **/
@@ -1212,10 +1212,30 @@ declare module '@polkadot/api-base/types/errors' {
1212
1212
  * The purchase would not enter the vault's accepted list.
1213
1213
  **/
1214
1214
  BondPurchaseRejected: AugmentedError<ApiType>;
1215
+ /**
1216
+ * The beneficiary already has a bond lot for this vault.
1217
+ **/
1218
+ BonusApprovalExistingBondLot: AugmentedError<ApiType>;
1219
+ /**
1220
+ * The bonus approval already expired.
1221
+ **/
1222
+ BonusApprovalExpired: AugmentedError<ApiType>;
1223
+ /**
1224
+ * The bonus approval was signed for a different beneficiary.
1225
+ **/
1226
+ BonusApprovalWrongAccount: AugmentedError<ApiType>;
1227
+ /**
1228
+ * The bonus approval was signed for a different vault.
1229
+ **/
1230
+ BonusApprovalWrongVault: AugmentedError<ApiType>;
1215
1231
  /**
1216
1232
  * An internal error occurred.
1217
1233
  **/
1218
1234
  InternalError: AugmentedError<ApiType>;
1235
+ /**
1236
+ * The bonus approval signature is invalid or unauthorized.
1237
+ **/
1238
+ InvalidBonusApprovalSignature: AugmentedError<ApiType>;
1219
1239
  /**
1220
1240
  * The vault already has the maximum number of accepted bond lots.
1221
1241
  **/
@@ -1292,6 +1312,10 @@ declare module '@polkadot/api-base/types/errors' {
1292
1312
  * The bitcoin script to lock this bitcoin has errors
1293
1313
  **/
1294
1314
  InvalidBitcoinScript: AugmentedError<ApiType>;
1315
+ /**
1316
+ * Treasury bond sharing plus bonus cannot exceed 100%.
1317
+ **/
1318
+ InvalidBondSharingTerms: AugmentedError<ApiType>;
1295
1319
  /**
1296
1320
  * An invalid securitization percent was provided for the vault. NOTE: it cannot be
1297
1321
  * decreased (or negative)
@@ -91,6 +91,7 @@ import type {
91
91
  PalletMultisigMultisig,
92
92
  PalletOperationalAccountsOperationalAccount,
93
93
  PalletOperationalAccountsRewardsConfig,
94
+ PalletPriceIndexArgonotAverageFrameAccumulator,
94
95
  PalletPriceIndexCpiMeasurementBucket,
95
96
  PalletPriceIndexPriceIndex,
96
97
  PalletProxyAnnouncement,
@@ -402,6 +403,10 @@ declare module '@polkadot/api-base/types/storage' {
402
403
  * Bool if block rewards are paused
403
404
  **/
404
405
  blockRewardsPaused: AugmentedQuery<ApiType, () => Observable<bool>, []>;
406
+ /**
407
+ * Bool if block voter rewards are enabled
408
+ **/
409
+ blockVoterRewardsEnabled: AugmentedQuery<ApiType, () => Observable<bool>, []>;
405
410
  /**
406
411
  * Historical payouts by block number
407
412
  **/
@@ -1375,6 +1380,14 @@ declare module '@polkadot/api-base/types/storage' {
1375
1380
  * Stores the active price index
1376
1381
  **/
1377
1382
  current: AugmentedQuery<ApiType, () => Observable<Option<PalletPriceIndexPriceIndex>>, []>;
1383
+ /**
1384
+ * Accumulates the current frame's Argonot price samples until the frame closes.
1385
+ **/
1386
+ currentFrameArgonotAverage: AugmentedQuery<
1387
+ ApiType,
1388
+ () => Observable<Option<PalletPriceIndexArgonotAverageFrameAccumulator>>,
1389
+ []
1390
+ >;
1378
1391
  /**
1379
1392
  * Tracks the average cpi data every 60 ticks
1380
1393
  **/
@@ -1383,6 +1396,14 @@ declare module '@polkadot/api-base/types/storage' {
1383
1396
  () => Observable<Vec<PalletPriceIndexCpiMeasurementBucket>>,
1384
1397
  []
1385
1398
  >;
1399
+ /**
1400
+ * Tracks the average Argonot price observed in each recent frame.
1401
+ **/
1402
+ historicArgonotAverageByFrame: AugmentedQuery<
1403
+ ApiType,
1404
+ () => Observable<BTreeMap<u64, u128>>,
1405
+ []
1406
+ >;
1386
1407
  /**
1387
1408
  * Tracks the lowest Argonot floor observed in each recent frame.
1388
1409
  **/
@@ -42,6 +42,7 @@ import type {
42
42
  ArgonPrimitivesInherentsBlockSealInherent,
43
43
  ArgonPrimitivesNotaryNotaryMeta,
44
44
  ArgonPrimitivesNotebookSignedNotebookHeader,
45
+ ArgonPrimitivesVaultTreasuryBonusApprovalProof,
45
46
  ArgonPrimitivesVaultVaultTerms,
46
47
  ArgonRuntimeOriginCaller,
47
48
  ArgonRuntimeProxyType,
@@ -507,6 +508,10 @@ declare module '@polkadot/api-base/types/submittable' {
507
508
  (paused: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>,
508
509
  [bool]
509
510
  >;
511
+ setBlockVoterRewardsEnabled: AugmentedSubmittable<
512
+ (enabled: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>,
513
+ [bool]
514
+ >;
510
515
  };
511
516
  blockSeal: {
512
517
  apply: AugmentedSubmittable<
@@ -1456,7 +1461,7 @@ declare module '@polkadot/api-base/types/submittable' {
1456
1461
  | 'MiningBidRealPaysFee'
1457
1462
  | 'Bitcoin'
1458
1463
  | 'VaultAdmin'
1459
- | 'BitcoinInitializeFor'
1464
+ | 'VaultDelegate'
1460
1465
  | number
1461
1466
  | Uint8Array,
1462
1467
  delay: u32 | AnyNumber | Uint8Array,
@@ -1526,7 +1531,7 @@ declare module '@polkadot/api-base/types/submittable' {
1526
1531
  | 'MiningBidRealPaysFee'
1527
1532
  | 'Bitcoin'
1528
1533
  | 'VaultAdmin'
1529
- | 'BitcoinInitializeFor'
1534
+ | 'VaultDelegate'
1530
1535
  | number
1531
1536
  | Uint8Array,
1532
1537
  delay: u32 | AnyNumber | Uint8Array,
@@ -1572,7 +1577,7 @@ declare module '@polkadot/api-base/types/submittable' {
1572
1577
  | 'MiningBidRealPaysFee'
1573
1578
  | 'Bitcoin'
1574
1579
  | 'VaultAdmin'
1575
- | 'BitcoinInitializeFor'
1580
+ | 'VaultDelegate'
1576
1581
  | number
1577
1582
  | Uint8Array,
1578
1583
  index: u16 | AnyNumber | Uint8Array,
@@ -1626,7 +1631,7 @@ declare module '@polkadot/api-base/types/submittable' {
1626
1631
  | 'MiningBidRealPaysFee'
1627
1632
  | 'Bitcoin'
1628
1633
  | 'VaultAdmin'
1629
- | 'BitcoinInitializeFor'
1634
+ | 'VaultDelegate'
1630
1635
  | number,
1631
1636
  call: Call | IMethod | string | Uint8Array,
1632
1637
  ) => SubmittableExtrinsic<ApiType>,
@@ -1677,7 +1682,7 @@ declare module '@polkadot/api-base/types/submittable' {
1677
1682
  | 'MiningBidRealPaysFee'
1678
1683
  | 'Bitcoin'
1679
1684
  | 'VaultAdmin'
1680
- | 'BitcoinInitializeFor'
1685
+ | 'VaultDelegate'
1681
1686
  | number,
1682
1687
  call: Call | IMethod | string | Uint8Array,
1683
1688
  ) => SubmittableExtrinsic<ApiType>,
@@ -1775,7 +1780,7 @@ declare module '@polkadot/api-base/types/submittable' {
1775
1780
  | 'MiningBidRealPaysFee'
1776
1781
  | 'Bitcoin'
1777
1782
  | 'VaultAdmin'
1778
- | 'BitcoinInitializeFor'
1783
+ | 'VaultDelegate'
1779
1784
  | number
1780
1785
  | Uint8Array,
1781
1786
  delay: u32 | AnyNumber | Uint8Array,
@@ -2005,8 +2010,15 @@ declare module '@polkadot/api-base/types/submittable' {
2005
2010
  (
2006
2011
  vaultId: u32 | AnyNumber | Uint8Array,
2007
2012
  bonds: u32 | AnyNumber | Uint8Array,
2013
+ bonusApproval:
2014
+ | Option<ArgonPrimitivesVaultTreasuryBonusApprovalProof>
2015
+ | null
2016
+ | Uint8Array
2017
+ | ArgonPrimitivesVaultTreasuryBonusApprovalProof
2018
+ | { vaultId?: any; beneficiary?: any; expiresAtFrame?: any; signature?: any }
2019
+ | string,
2008
2020
  ) => SubmittableExtrinsic<ApiType>,
2009
- [u32, u32]
2021
+ [u32, u32, Option<ArgonPrimitivesVaultTreasuryBonusApprovalProof>]
2010
2022
  >;
2011
2023
  /**
2012
2024
  * Liquidate one full bond lot.
@@ -2240,6 +2252,7 @@ declare module '@polkadot/api-base/types/submittable' {
2240
2252
  | {
2241
2253
  terms?: any;
2242
2254
  name?: any;
2255
+ delegateAccountId?: any;
2243
2256
  securitization?: any;
2244
2257
  bitcoinXpubkey?: any;
2245
2258
  securitizationRatio?: any;
@@ -2276,7 +2289,12 @@ declare module '@polkadot/api-base/types/submittable' {
2276
2289
  vaultId: u32 | AnyNumber | Uint8Array,
2277
2290
  terms:
2278
2291
  | ArgonPrimitivesVaultVaultTerms
2279
- | { bitcoinAnnualPercentRate?: any; bitcoinBaseFee?: any; treasuryProfitSharing?: any }
2292
+ | {
2293
+ bitcoinAnnualPercentRate?: any;
2294
+ bitcoinBaseFee?: any;
2295
+ treasuryProfitSharing?: any;
2296
+ treasuryBonusProfitSharing?: any;
2297
+ }
2280
2298
  | string
2281
2299
  | Uint8Array,
2282
2300
  ) => SubmittableExtrinsic<ApiType>,
@@ -2294,16 +2312,16 @@ declare module '@polkadot/api-base/types/submittable' {
2294
2312
  ) => SubmittableExtrinsic<ApiType>,
2295
2313
  [u32, ArgonPrimitivesBitcoinOpaqueBitcoinXpub]
2296
2314
  >;
2297
- setBitcoinLockDelegate: AugmentedSubmittable<
2315
+ setCommittedArgonots: AugmentedSubmittable<
2316
+ (amount: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
2317
+ [Compact<u128>]
2318
+ >;
2319
+ setDelegateAccount: AugmentedSubmittable<
2298
2320
  (
2299
2321
  delegateAccountId: Option<AccountId32> | null | Uint8Array | AccountId32 | string,
2300
2322
  ) => SubmittableExtrinsic<ApiType>,
2301
2323
  [Option<AccountId32>]
2302
2324
  >;
2303
- setCommittedArgonots: AugmentedSubmittable<
2304
- (amount: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
2305
- [Compact<u128>]
2306
- >;
2307
2325
  setName: AugmentedSubmittable<
2308
2326
  (name: Option<Bytes> | null | Uint8Array | Bytes | string) => SubmittableExtrinsic<ApiType>,
2309
2327
  [Option<Bytes>]