@argonprotocol/mainchain 1.4.12-dev.ece9349b → 1.4.13-dev.01d57087

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.12-dev.ece9349b",
3
+ "version": "1.4.13-dev.01d57087",
4
4
  "description": "A client for accessing the Argon mainchain apis.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,6 +21,7 @@
21
21
  "tsc": "yarn workspace @argonprotocol/ethereum-contracts build && yarn generate:contract-declarations && tsup && yarn validate:package",
22
22
  "tsup": "yarn tsc",
23
23
  "validate:package": "tsx src/scripts/validatePackage.ts",
24
+ "backfill:flexible-bond-metrics": "tsx src/scripts/backfillFlexibleBondMetrics.ts",
24
25
  "watch": "yarn generate:contract-declarations && tsup --watch",
25
26
  "typecheck": "tsc --noEmit -p tsconfig.test.json"
26
27
  },
@@ -52,13 +53,13 @@
52
53
  "dependencies": {
53
54
  "@ethereumjs/block": "^10.1.1",
54
55
  "@ethereumjs/mpt": "^10.1.1",
55
- "@polkadot/api": "^16.5.6",
56
- "@polkadot/api-base": "^16.5.6",
56
+ "@polkadot/api": "^17.0.1",
57
+ "@polkadot/api-base": "^17.0.1",
57
58
  "@polkadot/keyring": "^14.0.3",
58
- "@polkadot/rpc-core": "^16.5.6",
59
- "@polkadot/rpc-provider": "^16.5.6",
60
- "@polkadot/types": "^16.5.6",
61
- "@polkadot/types-codec": "^16.5.6",
59
+ "@polkadot/rpc-core": "^17.0.1",
60
+ "@polkadot/rpc-provider": "^17.0.1",
61
+ "@polkadot/types": "^17.0.1",
62
+ "@polkadot/types-codec": "^17.0.1",
62
63
  "@polkadot/util": "^14.0.3",
63
64
  "@polkadot/util-crypto": "^14.0.3",
64
65
  "bignumber.js": "^9.3.1",
@@ -67,15 +68,17 @@
67
68
  },
68
69
  "devDependencies": {
69
70
  "@argonprotocol/ethereum-contracts": "workspace:*",
70
- "@argonprotocol/testing": "1.4.12-dev.ece9349b",
71
- "@polkadot/typegen": "^16.5.6",
71
+ "@argonprotocol/testing": "1.4.13-dev.01d57087",
72
+ "@polkadot/typegen": "^17.0.1",
72
73
  "@substrate/ss58-registry": "^1.51.0",
73
74
  "@types/node": "^20",
75
+ "@types/ws": "^8.18.1",
74
76
  "shx": "^0.4.0",
75
77
  "tsup": "^8.5.0",
76
78
  "tsx": "^4.20.4",
77
79
  "typescript": "^5.9.2",
78
- "vitest": "^5.0.0"
80
+ "vitest": "^5.0.0",
81
+ "ws": "^8.18.0"
79
82
  },
80
83
  "packageManager": "yarn@4.1.0"
81
84
  }
@@ -7,7 +7,7 @@ import type {} from '@polkadot/api-base/types/consts';
7
7
  import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
8
8
  import type { u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
9
9
  import type { ITuple } from '@polkadot/types-codec/types';
10
- import type { AccountId32, Percent } from '@polkadot/types/interfaces/runtime';
10
+ import type { AccountId32, Percent, Permill } from '@polkadot/types/interfaces/runtime';
11
11
  import type {
12
12
  FrameSupportPalletId,
13
13
  FrameSystemLimitsBlockLength,
@@ -370,6 +370,10 @@ declare module '@polkadot/api-base/types/consts' {
370
370
  metaChangesTickDelay: u64 & AugmentedConst<ApiType>;
371
371
  };
372
372
  operationalAccounts: {
373
+ /**
374
+ * Allowed Bitcoin valuation shortfall below the liquidity minimum.
375
+ **/
376
+ bitcoinLiquidityTolerance: Percent & AugmentedConst<ApiType>;
373
377
  /**
374
378
  * Additional argon amount (base units) required per follow-on access code after an account
375
379
  * becomes operational.
@@ -384,7 +388,7 @@ declare module '@polkadot/api-base/types/consts' {
384
388
  **/
385
389
  maxAvailableAccessCodes: u32 & AugmentedConst<ApiType>;
386
390
  /**
387
- * Minimum bitcoin amount required to register.
391
+ * Minimum Bitcoin-backed ARGON liquidity required to register and activate.
388
392
  **/
389
393
  minimumBitcoin: u128 & AugmentedConst<ApiType>;
390
394
  /**
@@ -590,10 +594,18 @@ declare module '@polkadot/api-base/types/consts' {
590
594
  operationalFeeMultiplier: u8 & AugmentedConst<ApiType>;
591
595
  };
592
596
  treasury: {
597
+ /**
598
+ * Default percent of maximum Bitcoin-mintable Argons targeted by the network.
599
+ **/
600
+ defaultTargetBitcoinPercent: Percent & AugmentedConst<ApiType>;
593
601
  /**
594
602
  * The maximum number of active Argonot bond lots.
595
603
  **/
596
604
  maxActiveArgonotBondLots: u32 & AugmentedConst<ApiType>;
605
+ /**
606
+ * Maximum live Argon bond lots while direct frame payouts iterate every lot.
607
+ **/
608
+ maxArgonBondLots: u32 & AugmentedConst<ApiType>;
597
609
  /**
598
610
  * The maximum percent of ownership-token circulation that can be bonded.
599
611
  **/
@@ -602,10 +614,6 @@ declare module '@polkadot/api-base/types/consts' {
602
614
  * The maximum number of bond lots whose release delay may mature in a single frame.
603
615
  **/
604
616
  maxPendingUnlocksPerFrame: u32 & AugmentedConst<ApiType>;
605
- /**
606
- * The maximum number of accepted bond lots in a vault's accepted bond-lot list.
607
- **/
608
- maxTreasuryContributors: u32 & AugmentedConst<ApiType>;
609
617
  /**
610
618
  * The maximum number of vaults that can participate in one frame's locked vault capital.
611
619
  **/
@@ -619,13 +627,29 @@ declare module '@polkadot/api-base/types/consts' {
619
627
  **/
620
628
  palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
621
629
  /**
622
- * Percent of the full bid pool paid to Argonot bonds before vault distribution.
630
+ * Maximum percent paid to Argon bonds when the network target is filled.
631
+ **/
632
+ percentForArgonBondPool: Percent & AugmentedConst<ApiType>;
633
+ /**
634
+ * Percent reserved for Bitcoin Liquids and burned in this release.
635
+ **/
636
+ percentForBitcoinLiquidPool: Percent & AugmentedConst<ApiType>;
637
+ /**
638
+ * Percent reserved for future mining-operator rewards and burned in this release.
639
+ **/
640
+ percentForMiningOperatorPool: Percent & AugmentedConst<ApiType>;
641
+ /**
642
+ * Percent of the full bid pool paid to Argonot Stakes.
623
643
  **/
624
- percentForArgonotBondPool: Percent & AugmentedConst<ApiType>;
644
+ percentForStakePool: Percent & AugmentedConst<ApiType>;
625
645
  /**
626
646
  * Percent of the bid pool reserved for treasury reserves.
627
647
  **/
628
648
  percentForTreasuryReserves: Percent & AugmentedConst<ApiType>;
649
+ /**
650
+ * Maximum percent paid to vaults when the network target is filled.
651
+ **/
652
+ percentForVaultPool: Percent & AugmentedConst<ApiType>;
629
653
  /**
630
654
  * The number of frames a releasing bond lot remains held before release.
631
655
  **/
@@ -634,6 +658,9 @@ declare module '@polkadot/api-base/types/consts' {
634
658
  * Account that holds treasury reserves for claims and reserve-funded payouts.
635
659
  **/
636
660
  treasuryReservesAccount: AccountId32 & AugmentedConst<ApiType>;
661
+ upstreamBitcoinTarget: u128 & AugmentedConst<ApiType>;
662
+ upstreamBitcoinWeight: Permill & AugmentedConst<ApiType>;
663
+ upstreamBondTarget: u128 & AugmentedConst<ApiType>;
637
664
  };
638
665
  txPause: {
639
666
  /**
@@ -650,6 +677,10 @@ declare module '@polkadot/api-base/types/consts' {
650
677
  batchedCallsLimit: u32 & AugmentedConst<ApiType>;
651
678
  };
652
679
  vaults: {
680
+ /**
681
+ * Bitcoin blocks in the term of a newly created Bitcoin lock.
682
+ **/
683
+ bitcoinLockDurationBlocks: u64 & AugmentedConst<ApiType>;
653
684
  /**
654
685
  * Max concurrent cosigns pending per vault
655
686
  **/
@@ -663,17 +694,17 @@ declare module '@polkadot/api-base/types/consts' {
663
694
  **/
664
695
  maxVaults: u32 & AugmentedConst<ApiType>;
665
696
  /**
666
- * Duration to keep the operational minimum securitization locked from vault creation.
667
- **/
668
- operationalMinimumVaultLockTicks: u64 & AugmentedConst<ApiType>;
669
- /**
670
- * Minimum vault securitization required while the operational floor lock is active.
697
+ * Vault securitization committed when the operator becomes operational.
671
698
  **/
672
699
  operationalMinimumVaultSecuritization: u128 & AugmentedConst<ApiType>;
673
700
  /**
674
701
  * The number of frames within which revenue must be collected
675
702
  **/
676
703
  revenueCollectionExpirationFrames: u64 & AugmentedConst<ApiType>;
704
+ /**
705
+ * Bitcoin blocks in the securitization exit notice period.
706
+ **/
707
+ securitizationExitNoticeBlocks: u64 & AugmentedConst<ApiType>;
677
708
  };
678
709
  } // AugmentedConsts
679
710
  } // declare module
@@ -161,7 +161,7 @@ declare module '@polkadot/api-base/types/errors' {
161
161
  **/
162
162
  BitcoinPubkeyUnableToBeDecoded: AugmentedError<ApiType>;
163
163
  /**
164
- * A partial release would leave less than the minimum watched Lock amount.
164
+ * A configured or requested Lock amount is below the required minimum.
165
165
  **/
166
166
  BitcoinReleaseChangeBelowMinimum: AugmentedError<ApiType>;
167
167
  /**
@@ -1361,10 +1361,18 @@ declare module '@polkadot/api-base/types/errors' {
1361
1361
  * The bond lot is already scheduled for release.
1362
1362
  **/
1363
1363
  BondLotAlreadyReleasing: AugmentedError<ApiType>;
1364
+ /**
1365
+ * Historical metrics can only be backfilled for vault bond lots.
1366
+ **/
1367
+ BondLotCannotBeBackfilled: AugmentedError<ApiType>;
1364
1368
  /**
1365
1369
  * Only an active vault bond owned by its operator can be used as flexible.
1366
1370
  **/
1367
1371
  BondLotCannotBeFlexible: AugmentedError<ApiType>;
1372
+ /**
1373
+ * The lot's metrics changed since the backfill was calculated.
1374
+ **/
1375
+ BondLotMetricsChanged: AugmentedError<ApiType>;
1368
1376
  /**
1369
1377
  * The bond lot could not be found.
1370
1378
  **/
@@ -1381,10 +1389,6 @@ declare module '@polkadot/api-base/types/errors' {
1381
1389
  * The bonus approval nonce has already been consumed or superseded.
1382
1390
  **/
1383
1391
  BonusApprovalAlreadyUsed: AugmentedError<ApiType>;
1384
- /**
1385
- * The approved bonus plus the vault's profit sharing exceeds 100%.
1386
- **/
1387
- BonusApprovalExceedsProfitSharing: AugmentedError<ApiType>;
1388
1392
  /**
1389
1393
  * The bonus approval already expired.
1390
1394
  **/
@@ -1398,21 +1402,29 @@ declare module '@polkadot/api-base/types/errors' {
1398
1402
  **/
1399
1403
  BonusApprovalWrongVault: AugmentedError<ApiType>;
1400
1404
  /**
1401
- * The vault doesn't have enough bitcoin security to support this bond purchase
1405
+ * The vault doesn't have enough raw securitization to support this bond purchase.
1402
1406
  **/
1403
1407
  InsufficientBondSpace: AugmentedError<ApiType>;
1404
1408
  /**
1405
1409
  * An internal error occurred.
1406
1410
  **/
1407
1411
  InternalError: AugmentedError<ApiType>;
1412
+ /**
1413
+ * The proposed backfill would reduce or corrupt the lot's earnings metrics.
1414
+ **/
1415
+ InvalidBondLotMetrics: AugmentedError<ApiType>;
1408
1416
  /**
1409
1417
  * The bonus approval signature is invalid or unauthorized.
1410
1418
  **/
1411
1419
  InvalidBonusApprovalSignature: AugmentedError<ApiType>;
1412
1420
  /**
1413
- * The vault already has the maximum number of accepted bond lots.
1421
+ * The network has reached the direct-payout vault bond lot admission limit.
1422
+ **/
1423
+ MaxArgonBondLotsExceeded: AugmentedError<ApiType>;
1424
+ /**
1425
+ * The vault already has the maximum number of flexible bond lots.
1414
1426
  **/
1415
- MaxAcceptedBondLotsExceeded: AugmentedError<ApiType>;
1427
+ MaxFlexibleBondLotsExceeded: AugmentedError<ApiType>;
1416
1428
  /**
1417
1429
  * Too many bond lot releases are scheduled for the same frame.
1418
1430
  **/
@@ -1461,13 +1473,13 @@ declare module '@polkadot/api-base/types/errors' {
1461
1473
  **/
1462
1474
  AccountBelowMinimumBalance: AugmentedError<ApiType>;
1463
1475
  /**
1464
- * Bitcoin conversion to compressed pubkey failed
1476
+ * Held Argonots cannot be reduced below the amount already crosschain-encumbered.
1465
1477
  **/
1466
- BitcoinConversionFailed: AugmentedError<ApiType>;
1478
+ ArgonotsBelowEncumberedBacking: AugmentedError<ApiType>;
1467
1479
  /**
1468
- * Committed Argonots cannot be reduced below the amount already crosschain-encumbered.
1480
+ * Bitcoin conversion to compressed pubkey failed
1469
1481
  **/
1470
- CommittedArgonotsBelowEncumberedBacking: AugmentedError<ApiType>;
1482
+ BitcoinConversionFailed: AugmentedError<ApiType>;
1471
1483
  /**
1472
1484
  * A funding change is already scheduled
1473
1485
  **/
@@ -21,7 +21,7 @@ import type {
21
21
  u64,
22
22
  } from '@polkadot/types-codec';
23
23
  import type { ITuple } from '@polkadot/types-codec/types';
24
- import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';
24
+ import type { AccountId32, H160, H256, Percent } from '@polkadot/types/interfaces/runtime';
25
25
  import type {
26
26
  ArgonNotaryAuditErrorVerifyError,
27
27
  ArgonPrimitivesBitcoinUtxoRef,
@@ -395,11 +395,6 @@ declare module '@polkadot/api-base/types/events' {
395
395
  compensatedAccountId: AccountId32;
396
396
  }
397
397
  >;
398
- BitcoinLockBurned: AugmentedEvent<
399
- ApiType,
400
- [lockId: u64, vaultId: u32, wasUtxoSpent: bool],
401
- { lockId: u64; vaultId: u32; wasUtxoSpent: bool }
402
- >;
403
398
  BitcoinLockCreated: AugmentedEvent<
404
399
  ApiType,
405
400
  [
@@ -439,6 +434,11 @@ declare module '@polkadot/api-base/types/events' {
439
434
  accountId: AccountId32;
440
435
  }
441
436
  >;
437
+ BitcoinLockTerminated: AugmentedEvent<
438
+ ApiType,
439
+ [lockId: u64, vaultId: u32, wasUtxoSpent: bool, burnedArgons: u128],
440
+ { lockId: u64; vaultId: u32; wasUtxoSpent: bool; burnedArgons: u128 }
441
+ >;
442
442
  BitcoinSpentAfterRelease: AugmentedEvent<
443
443
  ApiType,
444
444
  [lockId: u64, vaultId: u32, releaseNumber: u32, bitcoinHeight: u64],
@@ -1916,6 +1916,15 @@ declare module '@polkadot/api-base/types/events' {
1916
1916
  >;
1917
1917
  };
1918
1918
  treasury: {
1919
+ /**
1920
+ * Historical flexible-bond earnings were attributed to a surviving vault lot. No funds
1921
+ * move.
1922
+ **/
1923
+ BondLotEarningsBackfilled: AugmentedEvent<
1924
+ ApiType,
1925
+ [bondLotId: u64, addedFrames: u32, addedEarnings: u128],
1926
+ { bondLotId: u64; addedFrames: u32; addedEarnings: u128 }
1927
+ >;
1919
1928
  BondLotFlexibilityChanged: AugmentedEvent<
1920
1929
  ApiType,
1921
1930
  [vaultId: u32, bondLotId: u64, isFlexible: bool],
@@ -1981,6 +1990,14 @@ declare module '@polkadot/api-base/types/events' {
1981
1990
  reason: PalletTreasuryBondReleaseReason;
1982
1991
  }
1983
1992
  >;
1993
+ /**
1994
+ * A fixed or unearned reward allocation could not be burned.
1995
+ **/
1996
+ CouldNotBurnRewardAllocation: AugmentedEvent<
1997
+ ApiType,
1998
+ [frameId: u64, amount: u128, dispatchError: SpRuntimeDispatchError],
1999
+ { frameId: u64; amount: u128; dispatchError: SpRuntimeDispatchError }
2000
+ >;
1984
2001
  /**
1985
2002
  * An error occurred while paying frame earnings for an Argonot bond lot.
1986
2003
  **/
@@ -2070,18 +2087,20 @@ declare module '@polkadot/api-base/types/events' {
2070
2087
  [
2071
2088
  frameId: u64,
2072
2089
  bidPoolDistributed: u128,
2073
- argonotBondPoolDistributed: u128,
2074
- vaultBidPoolDistributed: u128,
2075
- treasuryRefunds: u128,
2090
+ stakePoolDistributed: u128,
2091
+ argonBondPoolDistributed: u128,
2092
+ vaultPoolDistributed: u128,
2093
+ burned: u128,
2076
2094
  treasuryReserves: u128,
2077
2095
  participatingVaults: u32,
2078
2096
  ],
2079
2097
  {
2080
2098
  frameId: u64;
2081
2099
  bidPoolDistributed: u128;
2082
- argonotBondPoolDistributed: u128;
2083
- vaultBidPoolDistributed: u128;
2084
- treasuryRefunds: u128;
2100
+ stakePoolDistributed: u128;
2101
+ argonBondPoolDistributed: u128;
2102
+ vaultPoolDistributed: u128;
2103
+ burned: u128;
2085
2104
  treasuryReserves: u128;
2086
2105
  participatingVaults: u32;
2087
2106
  }
@@ -2091,14 +2110,19 @@ declare module '@polkadot/api-base/types/events' {
2091
2110
  **/
2092
2111
  FrameVaultCapitalLocked: AugmentedEvent<
2093
2112
  ApiType,
2094
- [frameId: u64, totalEligibleBonds: u128, participatingVaults: u32],
2095
- { frameId: u64; totalEligibleBonds: u128; participatingVaults: u32 }
2113
+ [frameId: u64, totalActiveBonds: u128, participatingVaults: u32],
2114
+ { frameId: u64; totalActiveBonds: u128; participatingVaults: u32 }
2096
2115
  >;
2097
2116
  ReservedBondSpaceChanged: AugmentedEvent<
2098
2117
  ApiType,
2099
2118
  [vaultId: u32, reservedBondSpace: u32],
2100
2119
  { vaultId: u32; reservedBondSpace: u32 }
2101
2120
  >;
2121
+ RewardEconomicsConfigured: AugmentedEvent<
2122
+ ApiType,
2123
+ [targetBitcoinPercent: Percent],
2124
+ { targetBitcoinPercent: Percent }
2125
+ >;
2102
2126
  };
2103
2127
  txPause: {
2104
2128
  /**
@@ -2170,7 +2194,17 @@ declare module '@polkadot/api-base/types/events' {
2170
2194
  >;
2171
2195
  };
2172
2196
  vaults: {
2173
- CommittedArgonotsSet: AugmentedEvent<
2197
+ ArgonotExitReleased: AugmentedEvent<
2198
+ ApiType,
2199
+ [vaultId: u32, amount: u128],
2200
+ { vaultId: u32; amount: u128 }
2201
+ >;
2202
+ ArgonotExitRequested: AugmentedEvent<
2203
+ ApiType,
2204
+ [vaultId: u32, amount: u128, noticeEndsAt: u64],
2205
+ { vaultId: u32; amount: u128; noticeEndsAt: u64 }
2206
+ >;
2207
+ ArgonotSecuritizationSet: AugmentedEvent<
2174
2208
  ApiType,
2175
2209
  [vaultId: u32, operatorAccountId: AccountId32, amount: u128],
2176
2210
  { vaultId: u32; operatorAccountId: AccountId32; amount: u128 }
@@ -2192,14 +2226,36 @@ declare module '@polkadot/api-base/types/events' {
2192
2226
  >;
2193
2227
  LostBitcoinCompensated: AugmentedEvent<
2194
2228
  ApiType,
2195
- [vaultId: u32, beneficiary: AccountId32, toBeneficiary: u128, burned: u128],
2196
- { vaultId: u32; beneficiary: AccountId32; toBeneficiary: u128; burned: u128 }
2229
+ [
2230
+ vaultId: u32,
2231
+ beneficiary: AccountId32,
2232
+ toBeneficiary: u128,
2233
+ shortfall: u128,
2234
+ burned: u128,
2235
+ ],
2236
+ {
2237
+ vaultId: u32;
2238
+ beneficiary: AccountId32;
2239
+ toBeneficiary: u128;
2240
+ shortfall: u128;
2241
+ burned: u128;
2242
+ }
2197
2243
  >;
2198
2244
  ReservedSecuritizationSpaceChanged: AugmentedEvent<
2199
2245
  ApiType,
2200
2246
  [vaultId: u32, reservedSecuritizationSpace: u128],
2201
2247
  { vaultId: u32; reservedSecuritizationSpace: u128 }
2202
2248
  >;
2249
+ SecuritizationExitReleased: AugmentedEvent<
2250
+ ApiType,
2251
+ [vaultId: u32, amount: u128],
2252
+ { vaultId: u32; amount: u128 }
2253
+ >;
2254
+ SecuritizationExitRequested: AugmentedEvent<
2255
+ ApiType,
2256
+ [vaultId: u32, amount: u128, noticeEndsAt: u64],
2257
+ { vaultId: u32; amount: u128; noticeEndsAt: u64 }
2258
+ >;
2203
2259
  SecuritizationReserved: AugmentedEvent<
2204
2260
  ApiType,
2205
2261
  [
@@ -21,9 +21,10 @@ import type {
21
21
  u8,
22
22
  } from '@polkadot/types-codec';
23
23
  import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
24
- import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';
24
+ import type { AccountId32, H160, H256, Percent } from '@polkadot/types/interfaces/runtime';
25
25
  import type {
26
26
  ArgonNotaryAuditErrorVerifyError,
27
+ ArgonPrimitivesAmountRankAmountRankKey,
27
28
  ArgonPrimitivesBalanceChangeAccountOrigin,
28
29
  ArgonPrimitivesBitcoinBitcoinBlock,
29
30
  ArgonPrimitivesBitcoinBitcoinCosignScriptPubkey,
@@ -49,8 +50,9 @@ import type {
49
50
  ArgonPrimitivesNotaryNotaryRecord,
50
51
  ArgonPrimitivesProvidersBlockSealerInfo,
51
52
  ArgonPrimitivesTickTicker,
53
+ ArgonPrimitivesTreasuryPositionQuantities,
52
54
  ArgonPrimitivesVault,
53
- ArgonPrimitivesVaultVaultArgonotCommitment,
55
+ ArgonPrimitivesVaultVaultArgonotSecuritization,
54
56
  FrameSupportDispatchPerDispatchClassWeight,
55
57
  FrameSupportTokensFungibleImbalance,
56
58
  FrameSupportTokensMiscIdAmountRuntimeFreezeReason,
@@ -111,6 +113,7 @@ import type {
111
113
  PalletTreasuryBondLotSummary,
112
114
  PalletTreasuryFrameArgonotBondParticipants,
113
115
  PalletTreasuryFrameVaultCapital,
116
+ PalletTreasuryPositionsPosition,
114
117
  PalletTreasuryVaultBondState,
115
118
  PalletVaultsVaultFrameRevenue,
116
119
  SpConsensusGrandpaAppPublic,
@@ -1201,13 +1204,9 @@ declare module '@polkadot/api-base/types/storage' {
1201
1204
  **/
1202
1205
  miningMintPerCohort: AugmentedQuery<ApiType, () => Observable<BTreeMap<u64, u128>>, []>;
1203
1206
  /**
1204
- * The total amount of Bitcoin microgons minted. Cannot exceed `MintedMiningMicrogons`.
1207
+ * Bitcoin-minted Argons that have not been explicitly repaid through Fission settlement.
1205
1208
  **/
1206
1209
  mintedBitcoinMicrogons: AugmentedQuery<ApiType, () => Observable<u128>, []>;
1207
- /**
1208
- * The total amount of microgons minted for mining
1209
- **/
1210
- mintedMiningMicrogons: AugmentedQuery<ApiType, () => Observable<u128>, []>;
1211
1210
  /**
1212
1211
  * The next monotonic queue index to assign to a pending bitcoin mint.
1213
1212
  **/
@@ -1796,12 +1795,22 @@ declare module '@polkadot/api-base/types/storage' {
1796
1795
  ) => Observable<Option<Null>>,
1797
1796
  [AccountId32, u64]
1798
1797
  >;
1798
+ /**
1799
+ * Live Argon bond lot ids associated with a vault, including lots awaiting release. Direct
1800
+ * frame payouts iterate this admission-bounded index.
1801
+ **/
1802
+ bondLotIdsByVault: AugmentedQuery<
1803
+ ApiType,
1804
+ (
1805
+ arg1: u32 | AnyNumber | Uint8Array,
1806
+ arg2: u64 | AnyNumber | Uint8Array,
1807
+ ) => Observable<Option<Null>>,
1808
+ [u32, u64]
1809
+ >;
1799
1810
  /**
1800
1811
  * The active bond state for a vault.
1801
1812
  *
1802
- * The bounded payout set keeps the largest bond amount first, then lower `bond_lot_id` first
1803
- * when amounts tie. Flexible lots remain in `BondLotById` and are represented here by their
1804
- * aggregate.
1813
+ * Admission totals and flexible displacement; individual lots live in `BondLotById`.
1805
1814
  **/
1806
1815
  bondLotsByVault: AugmentedQuery<
1807
1816
  ApiType,
@@ -1819,9 +1828,7 @@ declare module '@polkadot/api-base/types/storage' {
1819
1828
  []
1820
1829
  >;
1821
1830
  /**
1822
- * The vault capital locked for the current frame.
1823
- *
1824
- * Payout uses this to see which vaults and bond lots are participating in the frame.
1831
+ * The network bond total and vault capital locked for the current frame's payout.
1825
1832
  **/
1826
1833
  currentFrameVaultCapital: AugmentedQuery<
1827
1834
  ApiType,
@@ -1866,9 +1873,36 @@ declare module '@polkadot/api-base/types/storage' {
1866
1873
  [u64]
1867
1874
  >;
1868
1875
  /**
1869
- * The total number of active Argonot bonds in the active set.
1876
+ * Configurable percent of maximum Bitcoin-mintable Argons targeted by the network.
1877
+ **/
1878
+ targetBitcoinPercent: AugmentedQuery<ApiType, () => Observable<Percent>, []>;
1879
+ /**
1880
+ * Live Argon bond lots, including those awaiting release; stakes have a separate admission
1881
+ * limit.
1882
+ **/
1883
+ totalArgonBondLots: AugmentedQuery<ApiType, () => Observable<u32>, []>;
1884
+ };
1885
+ treasuryPositions: {
1886
+ /**
1887
+ * Maintained network quantities, updated together with their account contributions.
1888
+ * Treasury reads these when freezing frame inputs. This replaces its live Argonot stake total.
1889
+ **/
1890
+ networkTotals: AugmentedQuery<
1891
+ ApiType,
1892
+ () => Observable<ArgonPrimitivesTreasuryPositionQuantities>,
1893
+ []
1894
+ >;
1895
+ /**
1896
+ * Maintained source quantities keyed by the actual position owner. Upstream quantities belong
1897
+ * to the linked vault account; primary and mining account balances are separate owners.
1870
1898
  **/
1871
- totalActiveArgonotBonds: AugmentedQuery<ApiType, () => Observable<u32>, []>;
1899
+ positionsByAccount: AugmentedQuery<
1900
+ ApiType,
1901
+ (
1902
+ arg: AccountId32 | string | Uint8Array,
1903
+ ) => Observable<Option<PalletTreasuryPositionsPosition>>,
1904
+ [AccountId32]
1905
+ >;
1872
1906
  };
1873
1907
  txPause: {
1874
1908
  /**
@@ -1884,13 +1918,13 @@ declare module '@polkadot/api-base/types/storage' {
1884
1918
  };
1885
1919
  vaults: {
1886
1920
  /**
1887
- * Vault-side committed and crosschain-encumbered argonot backing.
1921
+ * Argonots held for the vault, with reward commitments and cross-chain encumbrances.
1888
1922
  **/
1889
- argonotCommitmentByVaultId: AugmentedQuery<
1923
+ argonotSecuritizationByVaultId: AugmentedQuery<
1890
1924
  ApiType,
1891
1925
  (
1892
1926
  arg: u32 | AnyNumber | Uint8Array,
1893
- ) => Observable<Option<ArgonPrimitivesVaultVaultArgonotCommitment>>,
1927
+ ) => Observable<Option<ArgonPrimitivesVaultVaultArgonotSecuritization>>,
1894
1928
  [u32]
1895
1929
  >;
1896
1930
  /**
@@ -1941,6 +1975,10 @@ declare module '@polkadot/api-base/types/storage' {
1941
1975
  [u32]
1942
1976
  >;
1943
1977
  revenuePerFrameByVaultCount: AugmentedQuery<ApiType, () => Observable<u32>, []>;
1978
+ /**
1979
+ * Raw securitization across all open vaults, including those below the payout cutoff.
1980
+ **/
1981
+ totalVaultSecuritization: AugmentedQuery<ApiType, () => Observable<u128>, []>;
1944
1982
  /**
1945
1983
  * The vaults that have funds releasing at a given bitcoin height
1946
1984
  **/
@@ -1966,12 +2004,18 @@ declare module '@polkadot/api-base/types/storage' {
1966
2004
  [u32]
1967
2005
  >;
1968
2006
  /**
1969
- * Vaults whose temporary operational minimum may be released at a given tick.
2007
+ * Open vaults ordered by raw securitization (largest first), then vault ID.
1970
2008
  **/
1971
- vaultsReleasingOperationalMinimumByTick: AugmentedQuery<
2009
+ vaultSecuritizationRanks: AugmentedQuery<
1972
2010
  ApiType,
1973
- (arg: u64 | AnyNumber | Uint8Array) => Observable<BTreeSet<u32>>,
1974
- [u64]
2011
+ (
2012
+ arg:
2013
+ | ArgonPrimitivesAmountRankAmountRankKey
2014
+ | { descendingAmount?: any; orderedId?: any }
2015
+ | string
2016
+ | Uint8Array,
2017
+ ) => Observable<Option<Null>>,
2018
+ [ArgonPrimitivesAmountRankAmountRankKey]
1975
2019
  >;
1976
2020
  /**
1977
2021
  * Vault Bitcoin Xpub and current child counter by VaultId
@@ -23,7 +23,11 @@ import type {
23
23
  u64,
24
24
  } from '@polkadot/types-codec';
25
25
  import type { AnyNumber, Codec } from '@polkadot/types-codec/types';
26
- import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
26
+ import type {
27
+ ExtrinsicOrHash,
28
+ ExtrinsicStatus,
29
+ GeneratedSessionKeys,
30
+ } from '@polkadot/types/interfaces/author';
27
31
  import type { EpochAuthorship } from '@polkadot/types/interfaces/babe';
28
32
  import type { BeefyVersionedFinalityProof } from '@polkadot/types/interfaces/beefy';
29
33
  import type { BlockHash } from '@polkadot/types/interfaces/chain';
@@ -61,7 +65,7 @@ import type {
61
65
  JustificationNotification,
62
66
  ReportedRoundStates,
63
67
  } from '@polkadot/types/interfaces/grandpa';
64
- import type { MmrHash, MmrLeafBatchProof } from '@polkadot/types/interfaces/mmr';
68
+ import type { MmrAncestryProof, MmrHash, MmrLeafBatchProof } from '@polkadot/types/interfaces/mmr';
65
69
  import type { StorageKind } from '@polkadot/types/interfaces/offchain';
66
70
  import type { FeeDetails, RuntimeDispatchInfoV1 } from '@polkadot/types/interfaces/payment';
67
71
  import type { RpcMethods } from '@polkadot/types/interfaces/rpc';
@@ -140,6 +144,12 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
140
144
  * Generate new session keys and returns the corresponding public keys
141
145
  **/
142
146
  rotateKeys: AugmentedRpc<() => Observable<Bytes>>;
147
+ /**
148
+ * Generate new session keys and returns the corresponding public keys and owner proof
149
+ **/
150
+ rotateKeysWithOwner: AugmentedRpc<
151
+ (owner: Bytes | string | Uint8Array) => Observable<GeneratedSessionKeys>
152
+ >;
143
153
  /**
144
154
  * Submit and subscribe to watch an extrinsic until unsubscribed
145
155
  **/
@@ -721,6 +731,16 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
721
731
  subscribeJustifications: AugmentedRpc<() => Observable<JustificationNotification>>;
722
732
  };
723
733
  mmr: {
734
+ /**
735
+ * Generate an MMR ancestry proof for the given block number.
736
+ **/
737
+ generateAncestryProof: AugmentedRpc<
738
+ (
739
+ prevBlockNumber: u64 | AnyNumber | Uint8Array,
740
+ bestKnownBlockNumber?: u64 | AnyNumber | Uint8Array,
741
+ at?: BlockHash | string | Uint8Array,
742
+ ) => Observable<MmrAncestryProof>
743
+ >;
724
744
  /**
725
745
  * Generate MMR proof for the given block numbers.
726
746
  **/