@argonprotocol/mainchain 1.4.7 → 1.4.8

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",
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",
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,
@@ -1375,6 +1376,14 @@ declare module '@polkadot/api-base/types/storage' {
1375
1376
  * Stores the active price index
1376
1377
  **/
1377
1378
  current: AugmentedQuery<ApiType, () => Observable<Option<PalletPriceIndexPriceIndex>>, []>;
1379
+ /**
1380
+ * Accumulates the current frame's Argonot price samples until the frame closes.
1381
+ **/
1382
+ currentFrameArgonotAverage: AugmentedQuery<
1383
+ ApiType,
1384
+ () => Observable<Option<PalletPriceIndexArgonotAverageFrameAccumulator>>,
1385
+ []
1386
+ >;
1378
1387
  /**
1379
1388
  * Tracks the average cpi data every 60 ticks
1380
1389
  **/
@@ -1383,6 +1392,14 @@ declare module '@polkadot/api-base/types/storage' {
1383
1392
  () => Observable<Vec<PalletPriceIndexCpiMeasurementBucket>>,
1384
1393
  []
1385
1394
  >;
1395
+ /**
1396
+ * Tracks the average Argonot price observed in each recent frame.
1397
+ **/
1398
+ historicArgonotAverageByFrame: AugmentedQuery<
1399
+ ApiType,
1400
+ () => Observable<BTreeMap<u64, u128>>,
1401
+ []
1402
+ >;
1386
1403
  /**
1387
1404
  * Tracks the lowest Argonot floor observed in each recent frame.
1388
1405
  **/
@@ -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,
@@ -1456,7 +1457,7 @@ declare module '@polkadot/api-base/types/submittable' {
1456
1457
  | 'MiningBidRealPaysFee'
1457
1458
  | 'Bitcoin'
1458
1459
  | 'VaultAdmin'
1459
- | 'BitcoinInitializeFor'
1460
+ | 'VaultDelegate'
1460
1461
  | number
1461
1462
  | Uint8Array,
1462
1463
  delay: u32 | AnyNumber | Uint8Array,
@@ -1526,7 +1527,7 @@ declare module '@polkadot/api-base/types/submittable' {
1526
1527
  | 'MiningBidRealPaysFee'
1527
1528
  | 'Bitcoin'
1528
1529
  | 'VaultAdmin'
1529
- | 'BitcoinInitializeFor'
1530
+ | 'VaultDelegate'
1530
1531
  | number
1531
1532
  | Uint8Array,
1532
1533
  delay: u32 | AnyNumber | Uint8Array,
@@ -1572,7 +1573,7 @@ declare module '@polkadot/api-base/types/submittable' {
1572
1573
  | 'MiningBidRealPaysFee'
1573
1574
  | 'Bitcoin'
1574
1575
  | 'VaultAdmin'
1575
- | 'BitcoinInitializeFor'
1576
+ | 'VaultDelegate'
1576
1577
  | number
1577
1578
  | Uint8Array,
1578
1579
  index: u16 | AnyNumber | Uint8Array,
@@ -1626,7 +1627,7 @@ declare module '@polkadot/api-base/types/submittable' {
1626
1627
  | 'MiningBidRealPaysFee'
1627
1628
  | 'Bitcoin'
1628
1629
  | 'VaultAdmin'
1629
- | 'BitcoinInitializeFor'
1630
+ | 'VaultDelegate'
1630
1631
  | number,
1631
1632
  call: Call | IMethod | string | Uint8Array,
1632
1633
  ) => SubmittableExtrinsic<ApiType>,
@@ -1677,7 +1678,7 @@ declare module '@polkadot/api-base/types/submittable' {
1677
1678
  | 'MiningBidRealPaysFee'
1678
1679
  | 'Bitcoin'
1679
1680
  | 'VaultAdmin'
1680
- | 'BitcoinInitializeFor'
1681
+ | 'VaultDelegate'
1681
1682
  | number,
1682
1683
  call: Call | IMethod | string | Uint8Array,
1683
1684
  ) => SubmittableExtrinsic<ApiType>,
@@ -1775,7 +1776,7 @@ declare module '@polkadot/api-base/types/submittable' {
1775
1776
  | 'MiningBidRealPaysFee'
1776
1777
  | 'Bitcoin'
1777
1778
  | 'VaultAdmin'
1778
- | 'BitcoinInitializeFor'
1779
+ | 'VaultDelegate'
1779
1780
  | number
1780
1781
  | Uint8Array,
1781
1782
  delay: u32 | AnyNumber | Uint8Array,
@@ -2005,8 +2006,15 @@ declare module '@polkadot/api-base/types/submittable' {
2005
2006
  (
2006
2007
  vaultId: u32 | AnyNumber | Uint8Array,
2007
2008
  bonds: u32 | AnyNumber | Uint8Array,
2009
+ bonusApproval:
2010
+ | Option<ArgonPrimitivesVaultTreasuryBonusApprovalProof>
2011
+ | null
2012
+ | Uint8Array
2013
+ | ArgonPrimitivesVaultTreasuryBonusApprovalProof
2014
+ | { vaultId?: any; beneficiary?: any; expiresAtFrame?: any; signature?: any }
2015
+ | string,
2008
2016
  ) => SubmittableExtrinsic<ApiType>,
2009
- [u32, u32]
2017
+ [u32, u32, Option<ArgonPrimitivesVaultTreasuryBonusApprovalProof>]
2010
2018
  >;
2011
2019
  /**
2012
2020
  * Liquidate one full bond lot.
@@ -2240,6 +2248,7 @@ declare module '@polkadot/api-base/types/submittable' {
2240
2248
  | {
2241
2249
  terms?: any;
2242
2250
  name?: any;
2251
+ delegateAccountId?: any;
2243
2252
  securitization?: any;
2244
2253
  bitcoinXpubkey?: any;
2245
2254
  securitizationRatio?: any;
@@ -2276,7 +2285,12 @@ declare module '@polkadot/api-base/types/submittable' {
2276
2285
  vaultId: u32 | AnyNumber | Uint8Array,
2277
2286
  terms:
2278
2287
  | ArgonPrimitivesVaultVaultTerms
2279
- | { bitcoinAnnualPercentRate?: any; bitcoinBaseFee?: any; treasuryProfitSharing?: any }
2288
+ | {
2289
+ bitcoinAnnualPercentRate?: any;
2290
+ bitcoinBaseFee?: any;
2291
+ treasuryProfitSharing?: any;
2292
+ treasuryBonusProfitSharing?: any;
2293
+ }
2280
2294
  | string
2281
2295
  | Uint8Array,
2282
2296
  ) => SubmittableExtrinsic<ApiType>,
@@ -2294,16 +2308,16 @@ declare module '@polkadot/api-base/types/submittable' {
2294
2308
  ) => SubmittableExtrinsic<ApiType>,
2295
2309
  [u32, ArgonPrimitivesBitcoinOpaqueBitcoinXpub]
2296
2310
  >;
2297
- setBitcoinLockDelegate: AugmentedSubmittable<
2311
+ setCommittedArgonots: AugmentedSubmittable<
2312
+ (amount: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
2313
+ [Compact<u128>]
2314
+ >;
2315
+ setDelegateAccount: AugmentedSubmittable<
2298
2316
  (
2299
2317
  delegateAccountId: Option<AccountId32> | null | Uint8Array | AccountId32 | string,
2300
2318
  ) => SubmittableExtrinsic<ApiType>,
2301
2319
  [Option<AccountId32>]
2302
2320
  >;
2303
- setCommittedArgonots: AugmentedSubmittable<
2304
- (amount: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
2305
- [Compact<u128>]
2306
- >;
2307
2321
  setName: AugmentedSubmittable<
2308
2322
  (name: Option<Bytes> | null | Uint8Array | Bytes | string) => SubmittableExtrinsic<ApiType>,
2309
2323
  [Option<Bytes>]