@wireio/stake 0.4.2 → 0.5.0
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/lib/stake.browser.js +18509 -11887
- package/lib/stake.browser.js.map +1 -1
- package/lib/stake.d.ts +899 -140
- package/lib/stake.js +18524 -11890
- package/lib/stake.js.map +1 -1
- package/lib/stake.m.js +18509 -11887
- package/lib/stake.m.js.map +1 -1
- package/package.json +2 -2
- package/src/assets/ethereum/ABI/common/Base58.sol/Base58.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/Base58.sol/Base58.json +164 -0
- package/src/assets/ethereum/ABI/common/OpenZepArtifacts.sol/__Dummy_OZ_UUPS__.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/OpenZepArtifacts.sol/__Dummy_OZ_UUPS__.json +76 -0
- package/src/assets/ethereum/ABI/common/RestrictedCallers.sol/RestrictedCallers.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/RestrictedCallers.sol/RestrictedCallers.json +10 -0
- package/src/assets/ethereum/ABI/common/iodata.sol/iodata.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/iodata.sol/iodata.json +618 -0
- package/src/assets/ethereum/ABI/common/iodata_util.sol/iodata_util.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/iodata_util.sol/iodata_util.json +40 -0
- package/src/assets/ethereum/ABI/common/sysio_data.sol/sysio_data.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/sysio_data.sol/sysio_data.json +10 -0
- package/src/assets/ethereum/ABI/common/sysio_errors.sol/sysio_errors.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/sysio_errors.sol/sysio_errors.json +10 -0
- package/src/assets/ethereum/ABI/common/sysio_merkle.sol/sysio_merkle.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/sysio_merkle.sol/sysio_merkle.json +233 -0
- package/src/assets/ethereum/ABI/common/sysio_name.sol/sysio_name.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/sysio_name.sol/sysio_name.json +49 -0
- package/src/assets/ethereum/ABI/common/sysio_pubkey.sol/sysio_pubkey.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/sysio_pubkey.sol/sysio_pubkey.json +64 -0
- package/src/assets/ethereum/ABI/common/sysio_read.sol/sysio_read.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/sysio_read.sol/sysio_read.json +1458 -0
- package/src/assets/ethereum/ABI/common/sysio_tester.sol/SysioTester.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/sysio_tester.sol/SysioTester.json +1532 -0
- package/src/assets/ethereum/ABI/common/sysio_verify.sol/sysio_verify.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/sysio_verify.sol/sysio_verify.json +1525 -0
- package/src/assets/ethereum/ABI/common/sysio_write.sol/sysio_write.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/sysio_write.sol/sysio_write.json +1076 -0
- package/src/assets/ethereum/ABI/liqEth/BeaconState.sol/BeaconState.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/DepositManager.sol/DepositManager.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/DepositManager.sol/DepositManager.json +28 -2
- package/src/assets/ethereum/ABI/liqEth/LiqEthAuthority.sol/LiqEthAuthority.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IAccounting.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositContract.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositManager.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/ILiqEthUpgradeable.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IRewardsERC20.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IRewardsERC20Pausable.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IStakingModule.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IWithdrawalRecord.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/LiqEthCommon.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthManaged.sol/LiqEthManaged.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/RewardsERC20.sol/RewardsERC20Upgradeable.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeable.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/YieldOracle.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/YieldOracle.json +2 -2
- package/src/assets/ethereum/ABI/liqEth/accounting.sol/Accounting.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/accounting.sol/Accounting.json +2 -15
- package/src/assets/ethereum/ABI/liqEth/liqEth.sol/LiqEthToken.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/stakingModule.sol/StakingModule.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/stakingModule.sol/StakingModule.json +6 -25
- package/src/assets/ethereum/ABI/liqEth/withdrawalQueue.sol/WithdrawalQueue.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/Uint64BE.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/Uint64BE.json +2 -2
- package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/WithdrawalVault.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/WithdrawalVault.json +6 -25
- package/src/assets/ethereum/ABI/outpost/BAR.sol/BAR.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/Depositor.sol/Depositor.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/Depositor.sol/Depositor.json +26 -26
- package/src/assets/ethereum/ABI/outpost/EthUsdPriceConsumer.sol/AggregatorV3Interface.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPP.sol/OPP.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPP.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPPEndpoint.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPPInbound.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPPReceiver.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPPSender.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/OPPCommon.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPEndpoint.sol/OPPEndpoint.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPEndpointManaged.sol/OPPEndpointManaged.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPEndpointOwnable.sol/OPPEndpointOwnable.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPErrors.sol/OPPErrors.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPInbound.sol/OPPInbound.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPReceiver.sol/OPPReceiver.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPSender.sol/OPPSender.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OutpostErrors.sol/OutpostErrors.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OutpostManaged.sol/OutpostManaged.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OutpostManager.sol/OutpostManager.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OutpostManagerAuthority.sol/OutpostManagerAuthority.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OutpostManagerCommon.sol/IOutpostManager.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OutpostManagerCommon.sol/IOutpostUpgradeable.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OutpostManagerCommon.sol/OutpostManagerCommon.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OutpostOwnable.sol/OutpostOwnable.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/Pool.sol/Pool.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/Pool.sol/Pool.json +2 -2
- package/src/assets/ethereum/ABI/outpost/Pretoken.sol/Pretoken.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/Pretoken.sol/Pretoken.json +9 -9
- package/src/assets/ethereum/ABI/outpost/ReceiptNFT.sol/ReceiptNFT.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/interfaces/IPretoken.sol/IPretoken.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/interfaces/IWarrant.sol/IWarrant.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/token/ERC721EthEquivalentVotesUpgradeable.sol/ERC721EthEquivalentVotesUpgradeable.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/token/IERC721EthEquivalent.sol/IERC721EthEquivalent.dbg.json +1 -1
- package/src/assets/solana/idl/liqsol_core.json +760 -150
- package/src/assets/solana/idl/liqsol_token.json +1 -1
- package/src/assets/solana/idl/transfer_hook.json +6 -1
- package/src/assets/solana/idl/validator_leaderboard.json +4 -1
- package/src/assets/solana/types/liqsol_core.ts +760 -150
- package/src/assets/solana/types/liqsol_token.ts +1 -1
- package/src/assets/solana/types/transfer_hook.ts +6 -1
- package/src/assets/solana/types/validator_leaderboard.ts +4 -1
- package/src/networks/ethereum/clients/convert.client.ts +2 -2
- package/src/networks/ethereum/clients/pretoken.client.ts +6 -4
- package/src/networks/ethereum/clients/stake.client.ts +2 -2
- package/src/networks/ethereum/contract.ts +102 -49
- package/src/networks/ethereum/ethereum.ts +117 -58
- package/src/networks/ethereum/types.ts +26 -17
- package/src/networks/ethereum/utils.ts +8 -8
- package/src/networks/solana/clients/deposit.client.ts +5 -4
- package/src/networks/solana/clients/distribution.client.ts +36 -1
- package/src/networks/solana/constants.ts +14 -0
- package/src/networks/solana/solana.ts +148 -17
- package/src/networks/solana/types.ts +129 -0
- package/src/types.ts +21 -11
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/BeaconRoots.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/BeaconRoots.json +0 -10
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZ.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZ.json +0 -10
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZExtras.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZExtras.json +0 -10
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZVec48.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZVec48.json +0 -10
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/ValidatorBalanceVerifier.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/ValidatorBalanceVerifier.json +0 -291
- package/src/assets/ethereum/ABI/outpost/Aggregator.sol/Aggregator.json +0 -82
package/lib/stake.d.ts
CHANGED
|
@@ -25,6 +25,11 @@ interface IStakingClient {
|
|
|
25
25
|
/** Fetch the complete user portfolio */
|
|
26
26
|
getPortfolio(): Promise<Portfolio>;
|
|
27
27
|
getSystemAPY(): Promise<number>;
|
|
28
|
+
/**
|
|
29
|
+
* Protocol fee charged for deposit from Native to LIQ
|
|
30
|
+
* in Solana: amount in lamports
|
|
31
|
+
* in Ethereum: amount in wei
|
|
32
|
+
*/
|
|
28
33
|
getDepositFee(amount: bigint): Promise<bigint>;
|
|
29
34
|
/**
|
|
30
35
|
* Program-level prelaunch WIRE/tranche snapshot for this chain.
|
|
@@ -38,6 +43,8 @@ interface IStakingClient {
|
|
|
38
43
|
windowBefore?: number;
|
|
39
44
|
windowAfter?: number;
|
|
40
45
|
}): Promise<TrancheSnapshot | null>;
|
|
46
|
+
getSystemAPY(): Promise<number>;
|
|
47
|
+
getDepositFee(amount: bigint): Promise<bigint>;
|
|
41
48
|
}
|
|
42
49
|
/**
|
|
43
50
|
* Cross-chain portfolio view for a single account/wallet.
|
|
@@ -100,9 +107,9 @@ interface BalanceView {
|
|
|
100
107
|
ata?: PublicKey$1;
|
|
101
108
|
}
|
|
102
109
|
/**
|
|
103
|
-
*
|
|
110
|
+
* Outpost yield view.
|
|
104
111
|
*
|
|
105
|
-
* All amounts are integers in base units (lamports for liqSOL).
|
|
112
|
+
* All amounts are integers in base units (lamports for liqSOL, wei for liqETH).
|
|
106
113
|
*
|
|
107
114
|
* Math matches capital-staking:
|
|
108
115
|
* INDEX_SCALE = 1e12
|
|
@@ -125,19 +132,19 @@ interface YieldView {
|
|
|
125
132
|
/** User’s staked shares in the Outpost pool. */
|
|
126
133
|
userShares: bigint;
|
|
127
134
|
/**
|
|
128
|
-
* Total
|
|
135
|
+
* Total liq (wei/lamports) the user could claim right now if they fully
|
|
129
136
|
* unwound their stake:
|
|
130
|
-
*
|
|
137
|
+
* estimatedClaim = userShares * currentIndex / indexScale
|
|
131
138
|
*/
|
|
132
|
-
|
|
139
|
+
estimatedClaim?: bigint;
|
|
133
140
|
/**
|
|
134
|
-
* Portion of
|
|
135
|
-
*
|
|
141
|
+
* Portion of estimatedClaim that is “yield” above principal:
|
|
142
|
+
* estimatedYield = max(0, estimatedClaim - staked)
|
|
136
143
|
*
|
|
137
|
-
* NOTE:
|
|
144
|
+
* NOTE: staked principal itself is surfaced separately as
|
|
138
145
|
* Portfolio.staked.amount.
|
|
139
146
|
*/
|
|
140
|
-
|
|
147
|
+
estimatedYield?: bigint;
|
|
141
148
|
}
|
|
142
149
|
interface TrancheLadderItem {
|
|
143
150
|
/** On-chain tranche id, 0-based (0,1,2,...) */
|
|
@@ -179,7 +186,7 @@ interface TrancheSnapshot {
|
|
|
179
186
|
currentPriceUsd: bigint;
|
|
180
187
|
/** Tranche curve config (per-chain) */
|
|
181
188
|
supplyGrowthBps: number;
|
|
182
|
-
|
|
189
|
+
priceIncrementUsd: number;
|
|
183
190
|
totalPretokensSold: bigint;
|
|
184
191
|
/** Current tranche supply state (1e8 scale) */
|
|
185
192
|
currentTrancheSupply: bigint;
|
|
@@ -246,7 +253,7 @@ declare class Staker {
|
|
|
246
253
|
setChain(chainID: ChainID): boolean;
|
|
247
254
|
}
|
|
248
255
|
|
|
249
|
-
declare const CONTRACT_NAMES: readonly ["Accounting", "DepositManager", "
|
|
256
|
+
declare const CONTRACT_NAMES: readonly ["LiqEthAuthority", "BeaconState", "WithdrawalQueue", "LiqEthToken", "Accounting", "DepositManager", "WithdrawalVault", "StakingModule", "YieldOracle", "OutpostManagerAuthority", "iodata", "Base58", "sysio_merkle", "ReceiptNFT", "MockAggregator", "Pool", "OutpostManager", "sysio_write", "EthUsdPriceConsumer", "BAR", "OPPCommon", "OPP", "Pretoken", "OPPInbound", "Depositor"];
|
|
250
257
|
type ContractName = typeof CONTRACT_NAMES[number];
|
|
251
258
|
type AddressBook = Record<ContractName, string>;
|
|
252
259
|
interface Result {
|
|
@@ -342,23 +349,31 @@ declare class EthereumStakingClient implements IStakingClient {
|
|
|
342
349
|
private oppClient;
|
|
343
350
|
private receiptClient;
|
|
344
351
|
get contract(): {
|
|
352
|
+
LiqEthAuthority: ethers.Contract;
|
|
353
|
+
BeaconState: ethers.Contract;
|
|
354
|
+
WithdrawalQueue: ethers.Contract;
|
|
355
|
+
LiqEthToken: ethers.Contract;
|
|
345
356
|
Accounting: ethers.Contract;
|
|
346
357
|
DepositManager: ethers.Contract;
|
|
347
|
-
LiqEth: ethers.Contract;
|
|
348
|
-
StakingModule: ethers.Contract;
|
|
349
|
-
WithdrawalQueue: ethers.Contract;
|
|
350
358
|
WithdrawalVault: ethers.Contract;
|
|
351
|
-
|
|
359
|
+
StakingModule: ethers.Contract;
|
|
360
|
+
YieldOracle: ethers.Contract;
|
|
361
|
+
OutpostManagerAuthority: ethers.Contract;
|
|
362
|
+
iodata: ethers.Contract;
|
|
363
|
+
Base58: ethers.Contract;
|
|
364
|
+
sysio_merkle: ethers.Contract;
|
|
352
365
|
ReceiptNFT: ethers.Contract;
|
|
366
|
+
MockAggregator: ethers.Contract;
|
|
367
|
+
Pool: ethers.Contract;
|
|
353
368
|
OutpostManager: ethers.Contract;
|
|
369
|
+
sysio_write: ethers.Contract;
|
|
370
|
+
EthUsdPriceConsumer: ethers.Contract;
|
|
354
371
|
BAR: ethers.Contract;
|
|
355
|
-
OPP: ethers.Contract;
|
|
356
372
|
OPPCommon: ethers.Contract;
|
|
357
|
-
|
|
373
|
+
OPP: ethers.Contract;
|
|
358
374
|
Pretoken: ethers.Contract;
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
Pool: ethers.Contract;
|
|
375
|
+
OPPInbound: ethers.Contract;
|
|
376
|
+
Depositor: ethers.Contract;
|
|
362
377
|
};
|
|
363
378
|
get network(): _wireio_core.ExternalNetwork;
|
|
364
379
|
constructor(config: StakerConfig);
|
|
@@ -407,7 +422,7 @@ declare class EthereumStakingClient implements IStakingClient {
|
|
|
407
422
|
getOPPMessages(address?: string): Promise<OPPAssertion[]>;
|
|
408
423
|
private ensureUser;
|
|
409
424
|
getSystemAPY(): Promise<number>;
|
|
410
|
-
getDepositFee(
|
|
425
|
+
getDepositFee(amountWei: bigint): Promise<bigint>;
|
|
411
426
|
getOPPStatus(): Promise<any>;
|
|
412
427
|
getEthStats(): Promise<any>;
|
|
413
428
|
/**
|
|
@@ -423,6 +438,12 @@ declare class EthereumStakingClient implements IStakingClient {
|
|
|
423
438
|
private updateMockAggregatorPrice;
|
|
424
439
|
}
|
|
425
440
|
|
|
441
|
+
/**
|
|
442
|
+
* @module EthereumContractService
|
|
443
|
+
*
|
|
444
|
+
* Provides a unified service for interacting with Ethereum smart contracts using ethers.js.
|
|
445
|
+
*/
|
|
446
|
+
|
|
426
447
|
declare const ERC20Abi: ({
|
|
427
448
|
inputs: {
|
|
428
449
|
internalType: string;
|
|
@@ -823,6 +844,108 @@ type GlobalState = {
|
|
|
823
844
|
/** PDA bump */
|
|
824
845
|
bump: number;
|
|
825
846
|
};
|
|
847
|
+
/**
|
|
848
|
+
* IDL: `globalConfig`
|
|
849
|
+
*
|
|
850
|
+
* Zero-copy global config PDA.
|
|
851
|
+
* Authority is taken from StakeControllerState, not stored here.
|
|
852
|
+
*/
|
|
853
|
+
type GlobalConfig = {
|
|
854
|
+
/** PDA bump */
|
|
855
|
+
bump: number;
|
|
856
|
+
/** 7-byte padding (unused) */
|
|
857
|
+
padding: number[];
|
|
858
|
+
/** Minimum SOL amount a user can deposit (lamports, u64) */
|
|
859
|
+
minUserDeposit: BN;
|
|
860
|
+
/** Minimum SOL amount for an unstake/withdrawal request (lamports, u64) */
|
|
861
|
+
minUnstakeRequest: BN;
|
|
862
|
+
/** Minimum stake delta to trigger a stake rebalance order (lamports, u64) */
|
|
863
|
+
minRebalanceStakeDelta: BN;
|
|
864
|
+
/** Minimum unstake delta to trigger an unstake rebalance order (lamports, u64) */
|
|
865
|
+
minRebalanceUnstakeDelta: BN;
|
|
866
|
+
/** Minimum transient stake to include in effective stake calculations (lamports, u64) */
|
|
867
|
+
transientThreshold: BN;
|
|
868
|
+
/**
|
|
869
|
+
* Minimum slots that must have elapsed in the epoch before late epoch operations can execute (u64)
|
|
870
|
+
*/
|
|
871
|
+
minLateEpochSlotGate: BN;
|
|
872
|
+
/** Reserved u64[2] */
|
|
873
|
+
reservedU64: BN[];
|
|
874
|
+
/**
|
|
875
|
+
* Epochs a validator must wait in the graveyard before it is booted.
|
|
876
|
+
* This begins after the last recorded state change (u16)
|
|
877
|
+
*/
|
|
878
|
+
cooldownEpochs: number;
|
|
879
|
+
/**
|
|
880
|
+
* Multiplier for deposit fee calculation (u16).
|
|
881
|
+
* Typically: avg_pay_rate * expected_warmup_epochs
|
|
882
|
+
*/
|
|
883
|
+
depositFeeMultiplier: number;
|
|
884
|
+
/**
|
|
885
|
+
* Minimum VPP score required to enter the active validator set,
|
|
886
|
+
* fallback when the validator set is very small (u16)
|
|
887
|
+
*/
|
|
888
|
+
minVppEntry: number;
|
|
889
|
+
/**
|
|
890
|
+
* VPP score threshold below which a validator is removed from active set,
|
|
891
|
+
* fallback threshold (u16)
|
|
892
|
+
*/
|
|
893
|
+
minVppExit: number;
|
|
894
|
+
/**
|
|
895
|
+
* Max validators for "tiny" network band (uses fixed VPP thresholds) (u16)
|
|
896
|
+
*/
|
|
897
|
+
tinyNetworkThreshold: number;
|
|
898
|
+
/**
|
|
899
|
+
* Max validators for "small" network band (uses percentile-based selection) (u16)
|
|
900
|
+
*/
|
|
901
|
+
smallNetworkThreshold: number;
|
|
902
|
+
/**
|
|
903
|
+
* Max validators for "medium" network band (uses percentile-based selection) (u16)
|
|
904
|
+
*/
|
|
905
|
+
mediumNetworkThreshold: number;
|
|
906
|
+
/**
|
|
907
|
+
* Fixed rank threshold to enter active set in large networks (0-indexed, u16)
|
|
908
|
+
*/
|
|
909
|
+
largeNetworkEntryRank: number;
|
|
910
|
+
/**
|
|
911
|
+
* Fixed rank threshold to exit active set in large networks (0-indexed, u16)
|
|
912
|
+
*/
|
|
913
|
+
largeNetworkExitRank: number;
|
|
914
|
+
/** Reserved u16[3] */
|
|
915
|
+
reservedU16: number[];
|
|
916
|
+
/**
|
|
917
|
+
* Percentile rank required to enter active set in small networks (u8)
|
|
918
|
+
*/
|
|
919
|
+
smallNetworkEntryPercent: number;
|
|
920
|
+
/**
|
|
921
|
+
* Percentile rank below which validators exit in small networks (u8)
|
|
922
|
+
*/
|
|
923
|
+
smallNetworkExitPercent: number;
|
|
924
|
+
/**
|
|
925
|
+
* Percentile rank required to enter active set in medium networks (u8)
|
|
926
|
+
*/
|
|
927
|
+
mediumNetworkEntryPercent: number;
|
|
928
|
+
/**
|
|
929
|
+
* Percentile rank below which validators exit in medium networks (u8)
|
|
930
|
+
*/
|
|
931
|
+
mediumNetworkExitPercent: number;
|
|
932
|
+
/** Reserved u8[2] */
|
|
933
|
+
reservedU8: number[];
|
|
934
|
+
/**
|
|
935
|
+
* Feature flags (u16 bitfield):
|
|
936
|
+
* Bit 0: DepositsEnabled
|
|
937
|
+
* Bit 1: WithdrawalsEnabled
|
|
938
|
+
* Bit 2: ClaimWithdrawalsEnabled
|
|
939
|
+
* Bit 3: ProcessStakeOrdersEnabled
|
|
940
|
+
* Bit 4: ProcessUnstakeOrdersEnabled
|
|
941
|
+
* Bit 5: ProcessPayCycleEnabled
|
|
942
|
+
* Bit 6: RebalancingEnabled
|
|
943
|
+
* Bits 7–15: Reserved
|
|
944
|
+
*/
|
|
945
|
+
featureFlags: number;
|
|
946
|
+
/** Reserved flags (u16[1]) */
|
|
947
|
+
reservedFlags: number[];
|
|
948
|
+
};
|
|
826
949
|
/**
|
|
827
950
|
* ============================================================
|
|
828
951
|
* Outpost / Pretoken Accounts
|
|
@@ -1097,6 +1220,7 @@ type ValidatorRecord = {
|
|
|
1097
1220
|
type types_DistributionState = DistributionState;
|
|
1098
1221
|
type types_DistributionUserRecord = DistributionUserRecord;
|
|
1099
1222
|
type types_Global = Global;
|
|
1223
|
+
type types_GlobalConfig = GlobalConfig;
|
|
1100
1224
|
type types_GlobalState = GlobalState;
|
|
1101
1225
|
type types_LeaderboardState = LeaderboardState;
|
|
1102
1226
|
type types_OutpostAccount = OutpostAccount;
|
|
@@ -1117,7 +1241,7 @@ type types_WalletLike = WalletLike;
|
|
|
1117
1241
|
type types_WireReceipt = WireReceipt;
|
|
1118
1242
|
type types_WireState = WireState;
|
|
1119
1243
|
declare namespace types {
|
|
1120
|
-
export type { types_DistributionState as DistributionState, types_DistributionUserRecord as DistributionUserRecord, types_Global as Global, types_GlobalState as GlobalState, types_LeaderboardState as LeaderboardState, types_OutpostAccount as OutpostAccount, types_OutpostWireStateSnapshot as OutpostWireStateSnapshot, types_ParsedAccountInfo as ParsedAccountInfo, types_PayRateEntry as PayRateEntry, types_PayRateHistory as PayRateHistory, types_PriceHistory as PriceHistory, types_Role as Role, types_SharesPreview as SharesPreview, types_SolanaTransaction as SolanaTransaction, types_TrancheState as TrancheState, types_UserPretokenRecord as UserPretokenRecord, types_ValidatorRecord as ValidatorRecord, types_ValidatorReputation as ValidatorReputation, types_ValidatorState as ValidatorState, types_WalletLike as WalletLike, types_WireReceipt as WireReceipt, types_WireState as WireState };
|
|
1244
|
+
export type { types_DistributionState as DistributionState, types_DistributionUserRecord as DistributionUserRecord, types_Global as Global, types_GlobalConfig as GlobalConfig, types_GlobalState as GlobalState, types_LeaderboardState as LeaderboardState, types_OutpostAccount as OutpostAccount, types_OutpostWireStateSnapshot as OutpostWireStateSnapshot, types_ParsedAccountInfo as ParsedAccountInfo, types_PayRateEntry as PayRateEntry, types_PayRateHistory as PayRateHistory, types_PriceHistory as PriceHistory, types_Role as Role, types_SharesPreview as SharesPreview, types_SolanaTransaction as SolanaTransaction, types_TrancheState as TrancheState, types_UserPretokenRecord as UserPretokenRecord, types_ValidatorRecord as ValidatorRecord, types_ValidatorReputation as ValidatorReputation, types_ValidatorState as ValidatorState, types_WalletLike as WalletLike, types_WireReceipt as WireReceipt, types_WireState as WireState };
|
|
1121
1245
|
}
|
|
1122
1246
|
|
|
1123
1247
|
declare class DepositClient {
|
|
@@ -1171,6 +1295,18 @@ declare class DistributionClient {
|
|
|
1171
1295
|
* IDL account name: "distributionState"
|
|
1172
1296
|
*/
|
|
1173
1297
|
getDistributionState(): Promise<DistributionState | null>;
|
|
1298
|
+
/**
|
|
1299
|
+
* Fetch the global payRateHistory account (circular buffer of scaled pay rates).
|
|
1300
|
+
*
|
|
1301
|
+
* IDL account name: "payRateHistory"
|
|
1302
|
+
*/
|
|
1303
|
+
getPayRateHistory(): Promise<PayRateHistory | null>;
|
|
1304
|
+
/**
|
|
1305
|
+
* Fetch the globalConfig account (contains depositFeeMultiplier, etc).
|
|
1306
|
+
*
|
|
1307
|
+
* IDL account name: "globalConfig"
|
|
1308
|
+
*/
|
|
1309
|
+
getGlobalConfig(): Promise<GlobalConfig | null>;
|
|
1174
1310
|
/**
|
|
1175
1311
|
* Fetch a user's distribution userRecord (or null if missing).
|
|
1176
1312
|
*
|
|
@@ -1230,7 +1366,7 @@ declare class LeaderboardClient {
|
|
|
1230
1366
|
* IDL can be found at `target/idl/liqsol_core.json`.
|
|
1231
1367
|
*/
|
|
1232
1368
|
type LiqsolCore = {
|
|
1233
|
-
"address": "
|
|
1369
|
+
"address": "5nBtmutQLrRKBUxNfHJPDjiW5u8id6QM9Hhjg1D1g1XH";
|
|
1234
1370
|
"metadata": {
|
|
1235
1371
|
"name": "liqsolCore";
|
|
1236
1372
|
"version": "0.1.0";
|
|
@@ -1244,7 +1380,8 @@ type LiqsolCore = {
|
|
|
1244
1380
|
"Accumulate unstake requests to be processed in next allocation cycle",
|
|
1245
1381
|
"Multiple requests can be accumulated before calculating allocations",
|
|
1246
1382
|
"Returns the target epoch when this unstake request will be processed",
|
|
1247
|
-
"We should not be able to"
|
|
1383
|
+
"We should not be able to call this without development feature enabled",
|
|
1384
|
+
""
|
|
1248
1385
|
];
|
|
1249
1386
|
"discriminator": [
|
|
1250
1387
|
24,
|
|
@@ -1281,6 +1418,12 @@ type LiqsolCore = {
|
|
|
1281
1418
|
"Maintenance ledger - to determine target processing epoch"
|
|
1282
1419
|
];
|
|
1283
1420
|
},
|
|
1421
|
+
{
|
|
1422
|
+
"name": "globalConfig";
|
|
1423
|
+
"docs": [
|
|
1424
|
+
"Global config for min_unstake_request setting"
|
|
1425
|
+
];
|
|
1426
|
+
},
|
|
1284
1427
|
{
|
|
1285
1428
|
"name": "clock";
|
|
1286
1429
|
}
|
|
@@ -1332,6 +1475,12 @@ type LiqsolCore = {
|
|
|
1332
1475
|
"name": "processingState";
|
|
1333
1476
|
"writable": true;
|
|
1334
1477
|
},
|
|
1478
|
+
{
|
|
1479
|
+
"name": "globalConfig";
|
|
1480
|
+
"docs": [
|
|
1481
|
+
"Global config for threshold parameters"
|
|
1482
|
+
];
|
|
1483
|
+
},
|
|
1335
1484
|
{
|
|
1336
1485
|
"name": "authority";
|
|
1337
1486
|
"signer": true;
|
|
@@ -1407,44 +1556,6 @@ type LiqsolCore = {
|
|
|
1407
1556
|
}
|
|
1408
1557
|
];
|
|
1409
1558
|
},
|
|
1410
|
-
{
|
|
1411
|
-
"name": "advanceServiceability";
|
|
1412
|
-
"docs": [
|
|
1413
|
-
"Advance the max servicable receipt ID"
|
|
1414
|
-
];
|
|
1415
|
-
"discriminator": [
|
|
1416
|
-
139,
|
|
1417
|
-
89,
|
|
1418
|
-
79,
|
|
1419
|
-
2,
|
|
1420
|
-
90,
|
|
1421
|
-
211,
|
|
1422
|
-
173,
|
|
1423
|
-
240
|
|
1424
|
-
];
|
|
1425
|
-
"accounts": [
|
|
1426
|
-
{
|
|
1427
|
-
"name": "authority";
|
|
1428
|
-
"docs": [
|
|
1429
|
-
"Authority that can update serviceable epoch"
|
|
1430
|
-
];
|
|
1431
|
-
"signer": true;
|
|
1432
|
-
},
|
|
1433
|
-
{
|
|
1434
|
-
"name": "global";
|
|
1435
|
-
"writable": true;
|
|
1436
|
-
},
|
|
1437
|
-
{
|
|
1438
|
-
"name": "runtimeProgram";
|
|
1439
|
-
}
|
|
1440
|
-
];
|
|
1441
|
-
"args": [
|
|
1442
|
-
{
|
|
1443
|
-
"name": "resolvedEpoch";
|
|
1444
|
-
"type": "u64";
|
|
1445
|
-
}
|
|
1446
|
-
];
|
|
1447
|
-
},
|
|
1448
1559
|
{
|
|
1449
1560
|
"name": "aggregateStakeMetrics";
|
|
1450
1561
|
"docs": [
|
|
@@ -1605,6 +1716,12 @@ type LiqsolCore = {
|
|
|
1605
1716
|
"Maintenance ledger - to track last unstake allocation epoch"
|
|
1606
1717
|
];
|
|
1607
1718
|
"writable": true;
|
|
1719
|
+
},
|
|
1720
|
+
{
|
|
1721
|
+
"name": "globalConfig";
|
|
1722
|
+
"docs": [
|
|
1723
|
+
"Global config for late epoch slot gate"
|
|
1724
|
+
];
|
|
1608
1725
|
}
|
|
1609
1726
|
];
|
|
1610
1727
|
"args": [];
|
|
@@ -1668,6 +1785,12 @@ type LiqsolCore = {
|
|
|
1668
1785
|
"docs": [
|
|
1669
1786
|
"Global withdraw operator state - to read total_encumbered_funds"
|
|
1670
1787
|
];
|
|
1788
|
+
},
|
|
1789
|
+
{
|
|
1790
|
+
"name": "globalConfig";
|
|
1791
|
+
"docs": [
|
|
1792
|
+
"Global config for rebalancing thresholds"
|
|
1793
|
+
];
|
|
1671
1794
|
}
|
|
1672
1795
|
];
|
|
1673
1796
|
"args": [];
|
|
@@ -1790,6 +1913,12 @@ type LiqsolCore = {
|
|
|
1790
1913
|
{
|
|
1791
1914
|
"name": "stakeHistory";
|
|
1792
1915
|
},
|
|
1916
|
+
{
|
|
1917
|
+
"name": "globalConfig";
|
|
1918
|
+
"docs": [
|
|
1919
|
+
"Global config for claim_withdrawals_enabled check"
|
|
1920
|
+
];
|
|
1921
|
+
},
|
|
1793
1922
|
{
|
|
1794
1923
|
"name": "tokenProgram";
|
|
1795
1924
|
},
|
|
@@ -1841,6 +1970,12 @@ type LiqsolCore = {
|
|
|
1841
1970
|
"Stake controller state - used to verify authority"
|
|
1842
1971
|
];
|
|
1843
1972
|
},
|
|
1973
|
+
{
|
|
1974
|
+
"name": "globalConfig";
|
|
1975
|
+
"docs": [
|
|
1976
|
+
"Global config for cooldown_epochs"
|
|
1977
|
+
];
|
|
1978
|
+
},
|
|
1844
1979
|
{
|
|
1845
1980
|
"name": "clock";
|
|
1846
1981
|
},
|
|
@@ -2176,6 +2311,12 @@ type LiqsolCore = {
|
|
|
2176
2311
|
"name": "controllerState";
|
|
2177
2312
|
"writable": true;
|
|
2178
2313
|
},
|
|
2314
|
+
{
|
|
2315
|
+
"name": "globalConfig";
|
|
2316
|
+
"docs": [
|
|
2317
|
+
"Global config for deposit settings"
|
|
2318
|
+
];
|
|
2319
|
+
},
|
|
2179
2320
|
{
|
|
2180
2321
|
"name": "payoutState";
|
|
2181
2322
|
"writable": true;
|
|
@@ -2312,47 +2453,6 @@ type LiqsolCore = {
|
|
|
2312
2453
|
}
|
|
2313
2454
|
];
|
|
2314
2455
|
},
|
|
2315
|
-
{
|
|
2316
|
-
"name": "forceValidatorUnstake";
|
|
2317
|
-
"docs": [
|
|
2318
|
-
"A function you can call to directly influence the amount to unstake from a particular validator",
|
|
2319
|
-
"Tbh this is a bypass of the system and should not be called unless you know what you are doing"
|
|
2320
|
-
];
|
|
2321
|
-
"discriminator": [
|
|
2322
|
-
7,
|
|
2323
|
-
208,
|
|
2324
|
-
146,
|
|
2325
|
-
241,
|
|
2326
|
-
10,
|
|
2327
|
-
219,
|
|
2328
|
-
109,
|
|
2329
|
-
30
|
|
2330
|
-
];
|
|
2331
|
-
"accounts": [
|
|
2332
|
-
{
|
|
2333
|
-
"name": "admin";
|
|
2334
|
-
"writable": true;
|
|
2335
|
-
"signer": true;
|
|
2336
|
-
},
|
|
2337
|
-
{
|
|
2338
|
-
"name": "validatorInfo";
|
|
2339
|
-
"docs": [
|
|
2340
|
-
"Validator info account to update"
|
|
2341
|
-
];
|
|
2342
|
-
"writable": true;
|
|
2343
|
-
}
|
|
2344
|
-
];
|
|
2345
|
-
"args": [
|
|
2346
|
-
{
|
|
2347
|
-
"name": "voteAccount";
|
|
2348
|
-
"type": "pubkey";
|
|
2349
|
-
},
|
|
2350
|
-
{
|
|
2351
|
-
"name": "amount";
|
|
2352
|
-
"type": "u64";
|
|
2353
|
-
}
|
|
2354
|
-
];
|
|
2355
|
-
},
|
|
2356
2456
|
{
|
|
2357
2457
|
"name": "getMinMaxResolvedEpochDeactivations";
|
|
2358
2458
|
"docs": [
|
|
@@ -2591,6 +2691,37 @@ type LiqsolCore = {
|
|
|
2591
2691
|
];
|
|
2592
2692
|
"args": [];
|
|
2593
2693
|
},
|
|
2694
|
+
{
|
|
2695
|
+
"name": "initializeGlobalConfig";
|
|
2696
|
+
"discriminator": [
|
|
2697
|
+
113,
|
|
2698
|
+
216,
|
|
2699
|
+
122,
|
|
2700
|
+
131,
|
|
2701
|
+
225,
|
|
2702
|
+
209,
|
|
2703
|
+
22,
|
|
2704
|
+
55
|
|
2705
|
+
];
|
|
2706
|
+
"accounts": [
|
|
2707
|
+
{
|
|
2708
|
+
"name": "globalConfig";
|
|
2709
|
+
"writable": true;
|
|
2710
|
+
},
|
|
2711
|
+
{
|
|
2712
|
+
"name": "controllerState";
|
|
2713
|
+
},
|
|
2714
|
+
{
|
|
2715
|
+
"name": "payer";
|
|
2716
|
+
"writable": true;
|
|
2717
|
+
"signer": true;
|
|
2718
|
+
},
|
|
2719
|
+
{
|
|
2720
|
+
"name": "systemProgram";
|
|
2721
|
+
}
|
|
2722
|
+
];
|
|
2723
|
+
"args": [];
|
|
2724
|
+
},
|
|
2594
2725
|
{
|
|
2595
2726
|
"name": "initializeGraveyardList";
|
|
2596
2727
|
"docs": [
|
|
@@ -3111,6 +3242,10 @@ type LiqsolCore = {
|
|
|
3111
3242
|
];
|
|
3112
3243
|
"writable": true;
|
|
3113
3244
|
},
|
|
3245
|
+
{
|
|
3246
|
+
"name": "withdrawGlobal";
|
|
3247
|
+
"writable": true;
|
|
3248
|
+
},
|
|
3114
3249
|
{
|
|
3115
3250
|
"name": "stakeProgram";
|
|
3116
3251
|
},
|
|
@@ -3175,6 +3310,12 @@ type LiqsolCore = {
|
|
|
3175
3310
|
"name": "processingState";
|
|
3176
3311
|
"writable": true;
|
|
3177
3312
|
},
|
|
3313
|
+
{
|
|
3314
|
+
"name": "globalConfig";
|
|
3315
|
+
"docs": [
|
|
3316
|
+
"Global config for late epoch slot gate"
|
|
3317
|
+
];
|
|
3318
|
+
},
|
|
3178
3319
|
{
|
|
3179
3320
|
"name": "clock";
|
|
3180
3321
|
},
|
|
@@ -3248,6 +3389,12 @@ type LiqsolCore = {
|
|
|
3248
3389
|
},
|
|
3249
3390
|
{
|
|
3250
3391
|
"name": "instructions";
|
|
3392
|
+
},
|
|
3393
|
+
{
|
|
3394
|
+
"name": "globalConfig";
|
|
3395
|
+
"docs": [
|
|
3396
|
+
"Global config for process_pay_cycle_enabled check"
|
|
3397
|
+
];
|
|
3251
3398
|
}
|
|
3252
3399
|
];
|
|
3253
3400
|
"args": [];
|
|
@@ -3319,6 +3466,12 @@ type LiqsolCore = {
|
|
|
3319
3466
|
},
|
|
3320
3467
|
{
|
|
3321
3468
|
"name": "rent";
|
|
3469
|
+
},
|
|
3470
|
+
{
|
|
3471
|
+
"name": "globalConfig";
|
|
3472
|
+
"docs": [
|
|
3473
|
+
"Global config for process_stake_orders_enabled check"
|
|
3474
|
+
];
|
|
3322
3475
|
}
|
|
3323
3476
|
];
|
|
3324
3477
|
"args": [];
|
|
@@ -3427,6 +3580,12 @@ type LiqsolCore = {
|
|
|
3427
3580
|
},
|
|
3428
3581
|
{
|
|
3429
3582
|
"name": "stakeProgram";
|
|
3583
|
+
},
|
|
3584
|
+
{
|
|
3585
|
+
"name": "globalConfig";
|
|
3586
|
+
"docs": [
|
|
3587
|
+
"Global config for process_unstake_orders_enabled check"
|
|
3588
|
+
];
|
|
3430
3589
|
}
|
|
3431
3590
|
];
|
|
3432
3591
|
"args": [];
|
|
@@ -3701,6 +3860,12 @@ type LiqsolCore = {
|
|
|
3701
3860
|
},
|
|
3702
3861
|
{
|
|
3703
3862
|
"name": "activeList";
|
|
3863
|
+
},
|
|
3864
|
+
{
|
|
3865
|
+
"name": "globalConfig";
|
|
3866
|
+
"docs": [
|
|
3867
|
+
"Global config for late epoch slot gate"
|
|
3868
|
+
];
|
|
3704
3869
|
}
|
|
3705
3870
|
];
|
|
3706
3871
|
"args": [];
|
|
@@ -3741,6 +3906,12 @@ type LiqsolCore = {
|
|
|
3741
3906
|
},
|
|
3742
3907
|
{
|
|
3743
3908
|
"name": "activeList";
|
|
3909
|
+
},
|
|
3910
|
+
{
|
|
3911
|
+
"name": "globalConfig";
|
|
3912
|
+
"docs": [
|
|
3913
|
+
"Global config for late epoch slot gate"
|
|
3914
|
+
];
|
|
3744
3915
|
}
|
|
3745
3916
|
];
|
|
3746
3917
|
"args": [];
|
|
@@ -3833,6 +4004,12 @@ type LiqsolCore = {
|
|
|
3833
4004
|
{
|
|
3834
4005
|
"name": "allocationState";
|
|
3835
4006
|
},
|
|
4007
|
+
{
|
|
4008
|
+
"name": "globalConfig";
|
|
4009
|
+
"docs": [
|
|
4010
|
+
"Global config for late epoch slot gate"
|
|
4011
|
+
];
|
|
4012
|
+
},
|
|
3836
4013
|
{
|
|
3837
4014
|
"name": "authority";
|
|
3838
4015
|
"signer": true;
|
|
@@ -3963,6 +4140,12 @@ type LiqsolCore = {
|
|
|
3963
4140
|
"Maintenance ledger - for accumulate_unstake_request"
|
|
3964
4141
|
];
|
|
3965
4142
|
},
|
|
4143
|
+
{
|
|
4144
|
+
"name": "globalConfig";
|
|
4145
|
+
"docs": [
|
|
4146
|
+
"Global config for min_unstake_request setting"
|
|
4147
|
+
];
|
|
4148
|
+
},
|
|
3966
4149
|
{
|
|
3967
4150
|
"name": "clock";
|
|
3968
4151
|
},
|
|
@@ -4340,6 +4523,12 @@ type LiqsolCore = {
|
|
|
4340
4523
|
"name": "allocationState";
|
|
4341
4524
|
"writable": true;
|
|
4342
4525
|
},
|
|
4526
|
+
{
|
|
4527
|
+
"name": "globalConfig";
|
|
4528
|
+
"docs": [
|
|
4529
|
+
"Global config for late epoch slot gate"
|
|
4530
|
+
];
|
|
4531
|
+
},
|
|
4343
4532
|
{
|
|
4344
4533
|
"name": "systemProgram";
|
|
4345
4534
|
"docs": [
|
|
@@ -4406,6 +4595,12 @@ type LiqsolCore = {
|
|
|
4406
4595
|
"name": "maintenanceLedger";
|
|
4407
4596
|
"writable": true;
|
|
4408
4597
|
},
|
|
4598
|
+
{
|
|
4599
|
+
"name": "globalConfig";
|
|
4600
|
+
"docs": [
|
|
4601
|
+
"Global config for late epoch slot gate"
|
|
4602
|
+
];
|
|
4603
|
+
},
|
|
4409
4604
|
{
|
|
4410
4605
|
"name": "authority";
|
|
4411
4606
|
"signer": true;
|
|
@@ -4414,37 +4609,32 @@ type LiqsolCore = {
|
|
|
4414
4609
|
"args": [];
|
|
4415
4610
|
},
|
|
4416
4611
|
{
|
|
4417
|
-
"name": "
|
|
4612
|
+
"name": "syncLeaderboardScoresBatch";
|
|
4418
4613
|
"discriminator": [
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4614
|
+
52,
|
|
4615
|
+
11,
|
|
4616
|
+
210,
|
|
4617
|
+
173,
|
|
4618
|
+
90,
|
|
4619
|
+
5,
|
|
4620
|
+
48,
|
|
4621
|
+
50
|
|
4427
4622
|
];
|
|
4428
4623
|
"accounts": [
|
|
4429
4624
|
{
|
|
4430
|
-
"name": "
|
|
4431
|
-
"docs": [
|
|
4432
|
-
"Admin or crank that triggers the index sync"
|
|
4433
|
-
];
|
|
4434
|
-
"signer": true;
|
|
4625
|
+
"name": "leaderboardState";
|
|
4435
4626
|
},
|
|
4436
4627
|
{
|
|
4437
|
-
"name": "
|
|
4628
|
+
"name": "processingState";
|
|
4438
4629
|
"writable": true;
|
|
4439
4630
|
},
|
|
4440
4631
|
{
|
|
4441
|
-
"name": "
|
|
4442
|
-
"
|
|
4443
|
-
|
|
4444
|
-
];
|
|
4445
|
-
},
|
|
4632
|
+
"name": "maintenanceLedger";
|
|
4633
|
+
"writable": true;
|
|
4634
|
+
},
|
|
4446
4635
|
{
|
|
4447
|
-
"name": "
|
|
4636
|
+
"name": "authority";
|
|
4637
|
+
"signer": true;
|
|
4448
4638
|
}
|
|
4449
4639
|
];
|
|
4450
4640
|
"args": [];
|
|
@@ -4530,6 +4720,12 @@ type LiqsolCore = {
|
|
|
4530
4720
|
"name": "maintenanceLedger";
|
|
4531
4721
|
"writable": true;
|
|
4532
4722
|
},
|
|
4723
|
+
{
|
|
4724
|
+
"name": "globalConfig";
|
|
4725
|
+
"docs": [
|
|
4726
|
+
"Global config for min_vpp_entry and min_vpp_exit"
|
|
4727
|
+
];
|
|
4728
|
+
},
|
|
4533
4729
|
{
|
|
4534
4730
|
"name": "authority";
|
|
4535
4731
|
"signer": true;
|
|
@@ -4658,6 +4854,178 @@ type LiqsolCore = {
|
|
|
4658
4854
|
];
|
|
4659
4855
|
"args": [];
|
|
4660
4856
|
},
|
|
4857
|
+
{
|
|
4858
|
+
"name": "updateConfigBool";
|
|
4859
|
+
"discriminator": [
|
|
4860
|
+
79,
|
|
4861
|
+
36,
|
|
4862
|
+
65,
|
|
4863
|
+
239,
|
|
4864
|
+
188,
|
|
4865
|
+
35,
|
|
4866
|
+
13,
|
|
4867
|
+
160
|
|
4868
|
+
];
|
|
4869
|
+
"accounts": [
|
|
4870
|
+
{
|
|
4871
|
+
"name": "globalConfig";
|
|
4872
|
+
"writable": true;
|
|
4873
|
+
},
|
|
4874
|
+
{
|
|
4875
|
+
"name": "controllerState";
|
|
4876
|
+
},
|
|
4877
|
+
{
|
|
4878
|
+
"name": "authority";
|
|
4879
|
+
"docs": [
|
|
4880
|
+
"Authority must match StakeControllerState.authority"
|
|
4881
|
+
];
|
|
4882
|
+
"signer": true;
|
|
4883
|
+
}
|
|
4884
|
+
];
|
|
4885
|
+
"args": [
|
|
4886
|
+
{
|
|
4887
|
+
"name": "key";
|
|
4888
|
+
"type": {
|
|
4889
|
+
"defined": {
|
|
4890
|
+
"name": "configKeyBool";
|
|
4891
|
+
};
|
|
4892
|
+
};
|
|
4893
|
+
},
|
|
4894
|
+
{
|
|
4895
|
+
"name": "value";
|
|
4896
|
+
"type": "bool";
|
|
4897
|
+
}
|
|
4898
|
+
];
|
|
4899
|
+
},
|
|
4900
|
+
{
|
|
4901
|
+
"name": "updateConfigU16";
|
|
4902
|
+
"discriminator": [
|
|
4903
|
+
149,
|
|
4904
|
+
9,
|
|
4905
|
+
244,
|
|
4906
|
+
25,
|
|
4907
|
+
46,
|
|
4908
|
+
136,
|
|
4909
|
+
59,
|
|
4910
|
+
173
|
|
4911
|
+
];
|
|
4912
|
+
"accounts": [
|
|
4913
|
+
{
|
|
4914
|
+
"name": "globalConfig";
|
|
4915
|
+
"writable": true;
|
|
4916
|
+
},
|
|
4917
|
+
{
|
|
4918
|
+
"name": "controllerState";
|
|
4919
|
+
},
|
|
4920
|
+
{
|
|
4921
|
+
"name": "authority";
|
|
4922
|
+
"docs": [
|
|
4923
|
+
"Authority must match StakeControllerState.authority"
|
|
4924
|
+
];
|
|
4925
|
+
"signer": true;
|
|
4926
|
+
}
|
|
4927
|
+
];
|
|
4928
|
+
"args": [
|
|
4929
|
+
{
|
|
4930
|
+
"name": "key";
|
|
4931
|
+
"type": {
|
|
4932
|
+
"defined": {
|
|
4933
|
+
"name": "configKeyU16";
|
|
4934
|
+
};
|
|
4935
|
+
};
|
|
4936
|
+
},
|
|
4937
|
+
{
|
|
4938
|
+
"name": "value";
|
|
4939
|
+
"type": "u16";
|
|
4940
|
+
}
|
|
4941
|
+
];
|
|
4942
|
+
},
|
|
4943
|
+
{
|
|
4944
|
+
"name": "updateConfigU64";
|
|
4945
|
+
"discriminator": [
|
|
4946
|
+
120,
|
|
4947
|
+
43,
|
|
4948
|
+
124,
|
|
4949
|
+
106,
|
|
4950
|
+
97,
|
|
4951
|
+
80,
|
|
4952
|
+
208,
|
|
4953
|
+
123
|
|
4954
|
+
];
|
|
4955
|
+
"accounts": [
|
|
4956
|
+
{
|
|
4957
|
+
"name": "globalConfig";
|
|
4958
|
+
"writable": true;
|
|
4959
|
+
},
|
|
4960
|
+
{
|
|
4961
|
+
"name": "controllerState";
|
|
4962
|
+
},
|
|
4963
|
+
{
|
|
4964
|
+
"name": "authority";
|
|
4965
|
+
"docs": [
|
|
4966
|
+
"Authority must match StakeControllerState.authority"
|
|
4967
|
+
];
|
|
4968
|
+
"signer": true;
|
|
4969
|
+
}
|
|
4970
|
+
];
|
|
4971
|
+
"args": [
|
|
4972
|
+
{
|
|
4973
|
+
"name": "key";
|
|
4974
|
+
"type": {
|
|
4975
|
+
"defined": {
|
|
4976
|
+
"name": "configKeyU64";
|
|
4977
|
+
};
|
|
4978
|
+
};
|
|
4979
|
+
},
|
|
4980
|
+
{
|
|
4981
|
+
"name": "value";
|
|
4982
|
+
"type": "u64";
|
|
4983
|
+
}
|
|
4984
|
+
];
|
|
4985
|
+
},
|
|
4986
|
+
{
|
|
4987
|
+
"name": "updateConfigU8";
|
|
4988
|
+
"discriminator": [
|
|
4989
|
+
17,
|
|
4990
|
+
160,
|
|
4991
|
+
31,
|
|
4992
|
+
134,
|
|
4993
|
+
222,
|
|
4994
|
+
250,
|
|
4995
|
+
229,
|
|
4996
|
+
253
|
|
4997
|
+
];
|
|
4998
|
+
"accounts": [
|
|
4999
|
+
{
|
|
5000
|
+
"name": "globalConfig";
|
|
5001
|
+
"writable": true;
|
|
5002
|
+
},
|
|
5003
|
+
{
|
|
5004
|
+
"name": "controllerState";
|
|
5005
|
+
},
|
|
5006
|
+
{
|
|
5007
|
+
"name": "authority";
|
|
5008
|
+
"docs": [
|
|
5009
|
+
"Authority must match StakeControllerState.authority"
|
|
5010
|
+
];
|
|
5011
|
+
"signer": true;
|
|
5012
|
+
}
|
|
5013
|
+
];
|
|
5014
|
+
"args": [
|
|
5015
|
+
{
|
|
5016
|
+
"name": "key";
|
|
5017
|
+
"type": {
|
|
5018
|
+
"defined": {
|
|
5019
|
+
"name": "configKeyU8";
|
|
5020
|
+
};
|
|
5021
|
+
};
|
|
5022
|
+
},
|
|
5023
|
+
{
|
|
5024
|
+
"name": "value";
|
|
5025
|
+
"type": "u8";
|
|
5026
|
+
}
|
|
5027
|
+
];
|
|
5028
|
+
},
|
|
4661
5029
|
{
|
|
4662
5030
|
"name": "updateGrowthParameters";
|
|
4663
5031
|
"discriminator": [
|
|
@@ -4732,11 +5100,11 @@ type LiqsolCore = {
|
|
|
4732
5100
|
"args": [
|
|
4733
5101
|
{
|
|
4734
5102
|
"name": "minPriceUsd";
|
|
4735
|
-
"type": "
|
|
5103
|
+
"type": "u64";
|
|
4736
5104
|
},
|
|
4737
5105
|
{
|
|
4738
5106
|
"name": "maxPriceUsd";
|
|
4739
|
-
"type": "
|
|
5107
|
+
"type": "u64";
|
|
4740
5108
|
},
|
|
4741
5109
|
{
|
|
4742
5110
|
"name": "maxStalenessSeconds";
|
|
@@ -4785,6 +5153,19 @@ type LiqsolCore = {
|
|
|
4785
5153
|
127
|
|
4786
5154
|
];
|
|
4787
5155
|
},
|
|
5156
|
+
{
|
|
5157
|
+
"name": "globalConfig";
|
|
5158
|
+
"discriminator": [
|
|
5159
|
+
149,
|
|
5160
|
+
8,
|
|
5161
|
+
156,
|
|
5162
|
+
202,
|
|
5163
|
+
160,
|
|
5164
|
+
252,
|
|
5165
|
+
176,
|
|
5166
|
+
217
|
|
5167
|
+
];
|
|
5168
|
+
},
|
|
4788
5169
|
{
|
|
4789
5170
|
"name": "globalState";
|
|
4790
5171
|
"discriminator": [
|
|
@@ -5346,6 +5727,13 @@ type LiqsolCore = {
|
|
|
5346
5727
|
];
|
|
5347
5728
|
"type": "u16";
|
|
5348
5729
|
},
|
|
5730
|
+
{
|
|
5731
|
+
"name": "leaderboardScoresNextIndex";
|
|
5732
|
+
"docs": [
|
|
5733
|
+
"Next leaderboard registry index to process for score sync"
|
|
5734
|
+
];
|
|
5735
|
+
"type": "u16";
|
|
5736
|
+
},
|
|
5349
5737
|
{
|
|
5350
5738
|
"name": "removalNextIndex";
|
|
5351
5739
|
"docs": [
|
|
@@ -5393,6 +5781,130 @@ type LiqsolCore = {
|
|
|
5393
5781
|
];
|
|
5394
5782
|
};
|
|
5395
5783
|
},
|
|
5784
|
+
{
|
|
5785
|
+
"name": "configKeyBool";
|
|
5786
|
+
"docs": [
|
|
5787
|
+
"Keys for bool config values (feature flags) - stored as bits in a u16",
|
|
5788
|
+
"Bit positions: 0=Deposits, 1=Withdrawals, 2=ClaimWithdrawals, 3=ProcessStake,",
|
|
5789
|
+
"4=ProcessUnstake, 5=ProcessPayCycle, 6=Rebalancing, 7-15=Reserved"
|
|
5790
|
+
];
|
|
5791
|
+
"type": {
|
|
5792
|
+
"kind": "enum";
|
|
5793
|
+
"variants": [
|
|
5794
|
+
{
|
|
5795
|
+
"name": "depositsEnabled";
|
|
5796
|
+
},
|
|
5797
|
+
{
|
|
5798
|
+
"name": "withdrawalsEnabled";
|
|
5799
|
+
},
|
|
5800
|
+
{
|
|
5801
|
+
"name": "claimWithdrawalsEnabled";
|
|
5802
|
+
},
|
|
5803
|
+
{
|
|
5804
|
+
"name": "processStakeOrdersEnabled";
|
|
5805
|
+
},
|
|
5806
|
+
{
|
|
5807
|
+
"name": "processUnstakeOrdersEnabled";
|
|
5808
|
+
},
|
|
5809
|
+
{
|
|
5810
|
+
"name": "processPayCycleEnabled";
|
|
5811
|
+
},
|
|
5812
|
+
{
|
|
5813
|
+
"name": "rebalancingEnabled";
|
|
5814
|
+
}
|
|
5815
|
+
];
|
|
5816
|
+
};
|
|
5817
|
+
},
|
|
5818
|
+
{
|
|
5819
|
+
"name": "configKeyU16";
|
|
5820
|
+
"docs": [
|
|
5821
|
+
"Keys for u16 config values (small counts, thresholds, ranks)"
|
|
5822
|
+
];
|
|
5823
|
+
"type": {
|
|
5824
|
+
"kind": "enum";
|
|
5825
|
+
"variants": [
|
|
5826
|
+
{
|
|
5827
|
+
"name": "cooldownEpochs";
|
|
5828
|
+
},
|
|
5829
|
+
{
|
|
5830
|
+
"name": "depositFeeEpochsMultiplier";
|
|
5831
|
+
},
|
|
5832
|
+
{
|
|
5833
|
+
"name": "minVppEntry";
|
|
5834
|
+
},
|
|
5835
|
+
{
|
|
5836
|
+
"name": "minVppExit";
|
|
5837
|
+
},
|
|
5838
|
+
{
|
|
5839
|
+
"name": "tinyNetworkThreshold";
|
|
5840
|
+
},
|
|
5841
|
+
{
|
|
5842
|
+
"name": "smallNetworkThreshold";
|
|
5843
|
+
},
|
|
5844
|
+
{
|
|
5845
|
+
"name": "mediumNetworkThreshold";
|
|
5846
|
+
},
|
|
5847
|
+
{
|
|
5848
|
+
"name": "largeNetworkEntryRank";
|
|
5849
|
+
},
|
|
5850
|
+
{
|
|
5851
|
+
"name": "largeNetworkExitRank";
|
|
5852
|
+
}
|
|
5853
|
+
];
|
|
5854
|
+
};
|
|
5855
|
+
},
|
|
5856
|
+
{
|
|
5857
|
+
"name": "configKeyU64";
|
|
5858
|
+
"docs": [
|
|
5859
|
+
"Keys for u64 config values (large amounts, rates)"
|
|
5860
|
+
];
|
|
5861
|
+
"type": {
|
|
5862
|
+
"kind": "enum";
|
|
5863
|
+
"variants": [
|
|
5864
|
+
{
|
|
5865
|
+
"name": "minUserDeposit";
|
|
5866
|
+
},
|
|
5867
|
+
{
|
|
5868
|
+
"name": "minUnstakeRequest";
|
|
5869
|
+
},
|
|
5870
|
+
{
|
|
5871
|
+
"name": "minRebalanceStakeDelta";
|
|
5872
|
+
},
|
|
5873
|
+
{
|
|
5874
|
+
"name": "minRebalanceUnstakeDelta";
|
|
5875
|
+
},
|
|
5876
|
+
{
|
|
5877
|
+
"name": "transientThreshold";
|
|
5878
|
+
},
|
|
5879
|
+
{
|
|
5880
|
+
"name": "minLateEpochSlotGate";
|
|
5881
|
+
}
|
|
5882
|
+
];
|
|
5883
|
+
};
|
|
5884
|
+
},
|
|
5885
|
+
{
|
|
5886
|
+
"name": "configKeyU8";
|
|
5887
|
+
"docs": [
|
|
5888
|
+
"Keys for u8 config values (percentages 0-100)"
|
|
5889
|
+
];
|
|
5890
|
+
"type": {
|
|
5891
|
+
"kind": "enum";
|
|
5892
|
+
"variants": [
|
|
5893
|
+
{
|
|
5894
|
+
"name": "smallNetworkEntryPercent";
|
|
5895
|
+
},
|
|
5896
|
+
{
|
|
5897
|
+
"name": "smallNetworkExitPercent";
|
|
5898
|
+
},
|
|
5899
|
+
{
|
|
5900
|
+
"name": "mediumNetworkEntryPercent";
|
|
5901
|
+
},
|
|
5902
|
+
{
|
|
5903
|
+
"name": "mediumNetworkExitPercent";
|
|
5904
|
+
}
|
|
5905
|
+
];
|
|
5906
|
+
};
|
|
5907
|
+
},
|
|
5396
5908
|
{
|
|
5397
5909
|
"name": "distributionState";
|
|
5398
5910
|
"type": {
|
|
@@ -5531,6 +6043,213 @@ type LiqsolCore = {
|
|
|
5531
6043
|
];
|
|
5532
6044
|
};
|
|
5533
6045
|
},
|
|
6046
|
+
{
|
|
6047
|
+
"name": "globalConfig";
|
|
6048
|
+
"docs": [
|
|
6049
|
+
"Zero-copy global config PDA",
|
|
6050
|
+
"Authority is taken from StakeControllerState, not stored here"
|
|
6051
|
+
];
|
|
6052
|
+
"serialization": "bytemuckunsafe";
|
|
6053
|
+
"repr": {
|
|
6054
|
+
"kind": "c";
|
|
6055
|
+
};
|
|
6056
|
+
"type": {
|
|
6057
|
+
"kind": "struct";
|
|
6058
|
+
"fields": [
|
|
6059
|
+
{
|
|
6060
|
+
"name": "bump";
|
|
6061
|
+
"type": "u8";
|
|
6062
|
+
},
|
|
6063
|
+
{
|
|
6064
|
+
"name": "padding";
|
|
6065
|
+
"type": {
|
|
6066
|
+
"array": [
|
|
6067
|
+
"u8",
|
|
6068
|
+
7
|
|
6069
|
+
];
|
|
6070
|
+
};
|
|
6071
|
+
},
|
|
6072
|
+
{
|
|
6073
|
+
"name": "minUserDeposit";
|
|
6074
|
+
"docs": [
|
|
6075
|
+
"Minimum SOL amount a user can deposit"
|
|
6076
|
+
];
|
|
6077
|
+
"type": "u64";
|
|
6078
|
+
},
|
|
6079
|
+
{
|
|
6080
|
+
"name": "minUnstakeRequest";
|
|
6081
|
+
"docs": [
|
|
6082
|
+
"Minimum SOL amount for an unstake/withdrawal request"
|
|
6083
|
+
];
|
|
6084
|
+
"type": "u64";
|
|
6085
|
+
},
|
|
6086
|
+
{
|
|
6087
|
+
"name": "minRebalanceStakeDelta";
|
|
6088
|
+
"docs": [
|
|
6089
|
+
"Minimum stake delta to trigger a stake rebalance order"
|
|
6090
|
+
];
|
|
6091
|
+
"type": "u64";
|
|
6092
|
+
},
|
|
6093
|
+
{
|
|
6094
|
+
"name": "minRebalanceUnstakeDelta";
|
|
6095
|
+
"docs": [
|
|
6096
|
+
"Minimum unstake delta to trigger an unstake rebalance order"
|
|
6097
|
+
];
|
|
6098
|
+
"type": "u64";
|
|
6099
|
+
},
|
|
6100
|
+
{
|
|
6101
|
+
"name": "transientThreshold";
|
|
6102
|
+
"docs": [
|
|
6103
|
+
"Minimum transient stake to include in effective stake calculations"
|
|
6104
|
+
];
|
|
6105
|
+
"type": "u64";
|
|
6106
|
+
},
|
|
6107
|
+
{
|
|
6108
|
+
"name": "minLateEpochSlotGate";
|
|
6109
|
+
"docs": [
|
|
6110
|
+
"Minimum slots that must have elapsed in the epoch before late epoch operations can execute"
|
|
6111
|
+
];
|
|
6112
|
+
"type": "u64";
|
|
6113
|
+
},
|
|
6114
|
+
{
|
|
6115
|
+
"name": "reservedU64";
|
|
6116
|
+
"type": {
|
|
6117
|
+
"array": [
|
|
6118
|
+
"u64",
|
|
6119
|
+
2
|
|
6120
|
+
];
|
|
6121
|
+
};
|
|
6122
|
+
},
|
|
6123
|
+
{
|
|
6124
|
+
"name": "cooldownEpochs";
|
|
6125
|
+
"docs": [
|
|
6126
|
+
"Epochs a validator must wait in the graveyard before it is booted. This begins after the last recorded state change"
|
|
6127
|
+
];
|
|
6128
|
+
"type": "u16";
|
|
6129
|
+
},
|
|
6130
|
+
{
|
|
6131
|
+
"name": "depositFeeMultiplier";
|
|
6132
|
+
"docs": [
|
|
6133
|
+
"Multiplier for deposit fee calculation, this would be average \"pay rate x number of epochs we expect the stake to warm up\""
|
|
6134
|
+
];
|
|
6135
|
+
"type": "u16";
|
|
6136
|
+
},
|
|
6137
|
+
{
|
|
6138
|
+
"name": "minVppEntry";
|
|
6139
|
+
"docs": [
|
|
6140
|
+
"Minimum VPP score required to enter the active validator set, this is a fall back for when the val set is really small"
|
|
6141
|
+
];
|
|
6142
|
+
"type": "u16";
|
|
6143
|
+
},
|
|
6144
|
+
{
|
|
6145
|
+
"name": "minVppExit";
|
|
6146
|
+
"docs": [
|
|
6147
|
+
"VPP score threshold below which a validator is removed from active set, again a fall back"
|
|
6148
|
+
];
|
|
6149
|
+
"type": "u16";
|
|
6150
|
+
},
|
|
6151
|
+
{
|
|
6152
|
+
"name": "tinyNetworkThreshold";
|
|
6153
|
+
"docs": [
|
|
6154
|
+
"Max validators for \"tiny\" network band (uses fixed VPP thresholds) as above"
|
|
6155
|
+
];
|
|
6156
|
+
"type": "u16";
|
|
6157
|
+
},
|
|
6158
|
+
{
|
|
6159
|
+
"name": "smallNetworkThreshold";
|
|
6160
|
+
"docs": [
|
|
6161
|
+
"Max validators for \"small\" network band (uses percentile-based selection)"
|
|
6162
|
+
];
|
|
6163
|
+
"type": "u16";
|
|
6164
|
+
},
|
|
6165
|
+
{
|
|
6166
|
+
"name": "mediumNetworkThreshold";
|
|
6167
|
+
"docs": [
|
|
6168
|
+
"Max validators for \"medium\" network band (uses percentile-based selection)"
|
|
6169
|
+
];
|
|
6170
|
+
"type": "u16";
|
|
6171
|
+
},
|
|
6172
|
+
{
|
|
6173
|
+
"name": "largeNetworkEntryRank";
|
|
6174
|
+
"docs": [
|
|
6175
|
+
"Fixed rank threshold to enter active set in large networks (0-indexed)"
|
|
6176
|
+
];
|
|
6177
|
+
"type": "u16";
|
|
6178
|
+
},
|
|
6179
|
+
{
|
|
6180
|
+
"name": "largeNetworkExitRank";
|
|
6181
|
+
"docs": [
|
|
6182
|
+
"Fixed rank threshold to exit active set in large networks (0-indexed)"
|
|
6183
|
+
];
|
|
6184
|
+
"type": "u16";
|
|
6185
|
+
},
|
|
6186
|
+
{
|
|
6187
|
+
"name": "reservedU16";
|
|
6188
|
+
"type": {
|
|
6189
|
+
"array": [
|
|
6190
|
+
"u16",
|
|
6191
|
+
3
|
|
6192
|
+
];
|
|
6193
|
+
};
|
|
6194
|
+
},
|
|
6195
|
+
{
|
|
6196
|
+
"name": "smallNetworkEntryPercent";
|
|
6197
|
+
"docs": [
|
|
6198
|
+
"Percentile rank required to enter active set in small networks"
|
|
6199
|
+
];
|
|
6200
|
+
"type": "u8";
|
|
6201
|
+
},
|
|
6202
|
+
{
|
|
6203
|
+
"name": "smallNetworkExitPercent";
|
|
6204
|
+
"docs": [
|
|
6205
|
+
"Percentile rank below which validators exit in small networks"
|
|
6206
|
+
];
|
|
6207
|
+
"type": "u8";
|
|
6208
|
+
},
|
|
6209
|
+
{
|
|
6210
|
+
"name": "mediumNetworkEntryPercent";
|
|
6211
|
+
"docs": [
|
|
6212
|
+
"Percentile rank required to enter active set in medium networks"
|
|
6213
|
+
];
|
|
6214
|
+
"type": "u8";
|
|
6215
|
+
},
|
|
6216
|
+
{
|
|
6217
|
+
"name": "mediumNetworkExitPercent";
|
|
6218
|
+
"docs": [
|
|
6219
|
+
"Percentile rank below which validators exit in medium networks"
|
|
6220
|
+
];
|
|
6221
|
+
"type": "u8";
|
|
6222
|
+
},
|
|
6223
|
+
{
|
|
6224
|
+
"name": "reservedU8";
|
|
6225
|
+
"type": {
|
|
6226
|
+
"array": [
|
|
6227
|
+
"u8",
|
|
6228
|
+
2
|
|
6229
|
+
];
|
|
6230
|
+
};
|
|
6231
|
+
},
|
|
6232
|
+
{
|
|
6233
|
+
"name": "featureFlags";
|
|
6234
|
+
"docs": [
|
|
6235
|
+
"Bit 0: DepositsEnabled, Bit 1: WithdrawalsEnabled, Bit 2: ClaimWithdrawalsEnabled,",
|
|
6236
|
+
"Bit 3: ProcessStakeOrdersEnabled, Bit 4: ProcessUnstakeOrdersEnabled,",
|
|
6237
|
+
"Bit 5: ProcessPayCycleEnabled, Bit 6: RebalancingEnabled, Bits 7-15: Reserved"
|
|
6238
|
+
];
|
|
6239
|
+
"type": "u16";
|
|
6240
|
+
},
|
|
6241
|
+
{
|
|
6242
|
+
"name": "reservedFlags";
|
|
6243
|
+
"type": {
|
|
6244
|
+
"array": [
|
|
6245
|
+
"u16",
|
|
6246
|
+
1
|
|
6247
|
+
];
|
|
6248
|
+
};
|
|
6249
|
+
}
|
|
6250
|
+
];
|
|
6251
|
+
};
|
|
6252
|
+
},
|
|
5534
6253
|
{
|
|
5535
6254
|
"name": "globalState";
|
|
5536
6255
|
"type": {
|
|
@@ -5797,6 +6516,10 @@ type LiqsolCore = {
|
|
|
5797
6516
|
"name": "lastValidatorScoreSyncEpoch";
|
|
5798
6517
|
"type": "u16";
|
|
5799
6518
|
},
|
|
6519
|
+
{
|
|
6520
|
+
"name": "lastLeaderboardScoresSyncEpoch";
|
|
6521
|
+
"type": "u16";
|
|
6522
|
+
},
|
|
5800
6523
|
{
|
|
5801
6524
|
"name": "lastActiveInfosSyncedEpoch";
|
|
5802
6525
|
"type": "u16";
|
|
@@ -6086,7 +6809,7 @@ type LiqsolCore = {
|
|
|
6086
6809
|
},
|
|
6087
6810
|
{
|
|
6088
6811
|
"name": "pretokensPurchased";
|
|
6089
|
-
"type": "
|
|
6812
|
+
"type": "u64";
|
|
6090
6813
|
}
|
|
6091
6814
|
];
|
|
6092
6815
|
};
|
|
@@ -6114,7 +6837,7 @@ type LiqsolCore = {
|
|
|
6114
6837
|
];
|
|
6115
6838
|
"type": {
|
|
6116
6839
|
"array": [
|
|
6117
|
-
"
|
|
6840
|
+
"u64",
|
|
6118
6841
|
10
|
|
6119
6842
|
];
|
|
6120
6843
|
};
|
|
@@ -6290,6 +7013,30 @@ type LiqsolCore = {
|
|
|
6290
7013
|
];
|
|
6291
7014
|
"type": "u64";
|
|
6292
7015
|
},
|
|
7016
|
+
{
|
|
7017
|
+
"name": "isSmallDistributionMode";
|
|
7018
|
+
"docs": [
|
|
7019
|
+
"Whether we're in small distribution mode (not enough for VPP-based distribution)",
|
|
7020
|
+
"In this mode, we distribute evenly to first N validators instead of using VPP ratios"
|
|
7021
|
+
];
|
|
7022
|
+
"type": "bool";
|
|
7023
|
+
},
|
|
7024
|
+
{
|
|
7025
|
+
"name": "validatorsToFundThisRebalance";
|
|
7026
|
+
"docs": [
|
|
7027
|
+
"Number of validators to fund in small distribution mode",
|
|
7028
|
+
"Calculated as floor(total_to_distribute / MIN_STAKE_DELEGATION)"
|
|
7029
|
+
];
|
|
7030
|
+
"type": "u16";
|
|
7031
|
+
},
|
|
7032
|
+
{
|
|
7033
|
+
"name": "amountPerValidatorThisRebalance";
|
|
7034
|
+
"docs": [
|
|
7035
|
+
"Amount each validator gets in small distribution mode",
|
|
7036
|
+
"Calculated as total_to_distribute / validators_to_fund"
|
|
7037
|
+
];
|
|
7038
|
+
"type": "u64";
|
|
7039
|
+
},
|
|
6293
7040
|
{
|
|
6294
7041
|
"name": "selectionEntryThresholdVpp";
|
|
6295
7042
|
"docs": [
|
|
@@ -6466,8 +7213,7 @@ type LiqsolCore = {
|
|
|
6466
7213
|
{
|
|
6467
7214
|
"name": "trancheState";
|
|
6468
7215
|
"docs": [
|
|
6469
|
-
"All
|
|
6470
|
-
"This matches Chainlink SOL/USD's native format, avoiding conversion overhead",
|
|
7216
|
+
"All u64 values use 8-decimal precision (SCALE = 1e8 = 100,000,000)",
|
|
6471
7217
|
"Example: $193.32 is stored as 19332000000"
|
|
6472
7218
|
];
|
|
6473
7219
|
"type": {
|
|
@@ -6486,19 +7232,19 @@ type LiqsolCore = {
|
|
|
6486
7232
|
},
|
|
6487
7233
|
{
|
|
6488
7234
|
"name": "currentTrancheSupply";
|
|
6489
|
-
"type": "
|
|
7235
|
+
"type": "u64";
|
|
6490
7236
|
},
|
|
6491
7237
|
{
|
|
6492
7238
|
"name": "currentTranchePriceUsd";
|
|
6493
|
-
"type": "
|
|
7239
|
+
"type": "u64";
|
|
6494
7240
|
},
|
|
6495
7241
|
{
|
|
6496
7242
|
"name": "totalPretokensSold";
|
|
6497
|
-
"type": "
|
|
7243
|
+
"type": "u64";
|
|
6498
7244
|
},
|
|
6499
7245
|
{
|
|
6500
7246
|
"name": "initialTrancheSupply";
|
|
6501
|
-
"type": "
|
|
7247
|
+
"type": "u64";
|
|
6502
7248
|
},
|
|
6503
7249
|
{
|
|
6504
7250
|
"name": "supplyGrowthBps";
|
|
@@ -6519,14 +7265,14 @@ type LiqsolCore = {
|
|
|
6519
7265
|
"docs": [
|
|
6520
7266
|
"Minimum valid SOL/USD price for validation (8-dec)"
|
|
6521
7267
|
];
|
|
6522
|
-
"type": "
|
|
7268
|
+
"type": "u64";
|
|
6523
7269
|
},
|
|
6524
7270
|
{
|
|
6525
7271
|
"name": "maxPriceUsd";
|
|
6526
7272
|
"docs": [
|
|
6527
7273
|
"Maximum valid SOL/USD price for validation (8-dec)"
|
|
6528
7274
|
];
|
|
6529
|
-
"type": "
|
|
7275
|
+
"type": "u64";
|
|
6530
7276
|
},
|
|
6531
7277
|
{
|
|
6532
7278
|
"name": "maxStalenessSeconds";
|
|
@@ -6571,7 +7317,7 @@ type LiqsolCore = {
|
|
|
6571
7317
|
},
|
|
6572
7318
|
{
|
|
6573
7319
|
"name": "totalPretokensPurchased";
|
|
6574
|
-
"type": "
|
|
7320
|
+
"type": "u64";
|
|
6575
7321
|
},
|
|
6576
7322
|
{
|
|
6577
7323
|
"name": "lastTrancheNumber";
|
|
@@ -6579,7 +7325,7 @@ type LiqsolCore = {
|
|
|
6579
7325
|
},
|
|
6580
7326
|
{
|
|
6581
7327
|
"name": "lastTranchePriceUsd";
|
|
6582
|
-
"type": "
|
|
7328
|
+
"type": "u64";
|
|
6583
7329
|
},
|
|
6584
7330
|
{
|
|
6585
7331
|
"name": "bump";
|
|
@@ -7445,7 +8191,17 @@ declare class SolanaStakingClient implements IStakingClient {
|
|
|
7445
8191
|
*/
|
|
7446
8192
|
getUserRecord(): Promise<DistributionUserRecord | null>;
|
|
7447
8193
|
getSystemAPY(): Promise<number>;
|
|
7448
|
-
|
|
8194
|
+
/**
|
|
8195
|
+
* Estimate the protocol deposit fee in lamports for a given SOL amount,
|
|
8196
|
+
* based on recent pay rates and globalConfig.depositFeeMultiplier.
|
|
8197
|
+
*
|
|
8198
|
+
* - amountLamports: deposit notional in lamports
|
|
8199
|
+
* - windowSize: how many recent payRate entries to average (default 5)
|
|
8200
|
+
*
|
|
8201
|
+
* Returns 0n if payRateHistory or globalConfig is missing, or if
|
|
8202
|
+
* there are no valid pay-rate entries yet.
|
|
8203
|
+
*/
|
|
8204
|
+
getDepositFee(amountLamports: bigint, windowSize?: number): Promise<bigint>;
|
|
7449
8205
|
/**
|
|
7450
8206
|
* Unified, chain-agnostic tranche snapshot for Solana.
|
|
7451
8207
|
*
|
|
@@ -7489,6 +8245,7 @@ declare class SolanaStakingClient implements IStakingClient {
|
|
|
7489
8245
|
* Ensures we have a Wire pubKey and an Anchor wallet pubKey, and that they match.
|
|
7490
8246
|
*/
|
|
7491
8247
|
ensureUser(): void;
|
|
8248
|
+
private ceilDiv;
|
|
7492
8249
|
}
|
|
7493
8250
|
|
|
7494
8251
|
/**
|
|
@@ -7516,6 +8273,7 @@ declare const TRANSFER_HOOK: PublicKey$1;
|
|
|
7516
8273
|
* ---------------------------------------------------------------------------
|
|
7517
8274
|
*/
|
|
7518
8275
|
declare const PDA_SEEDS: {
|
|
8276
|
+
readonly GLOBAL_CONFIG: "global_config";
|
|
7519
8277
|
readonly DEPOSIT_AUTHORITY: "deposit_authority";
|
|
7520
8278
|
readonly VAULT: "vault";
|
|
7521
8279
|
readonly RESERVE_POOL: "reserve_pool";
|
|
@@ -7549,6 +8307,7 @@ declare const PDA_SEEDS: {
|
|
|
7549
8307
|
readonly LIQ_RECEIPT_DATA: "liq_receipt_data";
|
|
7550
8308
|
readonly WITHDRAW_MINT: "mint";
|
|
7551
8309
|
};
|
|
8310
|
+
declare const deriveGlobalConfigPda: () => PublicKey$1;
|
|
7552
8311
|
/**
|
|
7553
8312
|
* ---------------------------------------------------------------------------
|
|
7554
8313
|
* CORE / DISTRIBUTION / DEPOSIT PDAS
|
|
@@ -7640,5 +8399,5 @@ declare const INDEX_SCALE: bigint;
|
|
|
7640
8399
|
declare const lamportsToSol: (lamports: number | bigint) => number;
|
|
7641
8400
|
declare const solToLamports: (sol: number) => bigint;
|
|
7642
8401
|
|
|
7643
|
-
export { ADDRESSES, CHAINLINK_FEED, CHAINLINK_PROGRAM, CONTRACTS, DEFAULT_AVERAGE_PAY_RATE, DEFAULT_PAY_RATE_LOOKBACK, DepositClient, DistributionClient, EPHEMERAL_RENT_EXEMPTION, ERC1155Abi, ERC20Abi, ERC721Abi, types$1 as ETH, EthereumContractService, EthereumStakingClient, INDEX_SCALE, LAMPORTS_PER_SOL, LIQSOL_CORE, LIQSOL_TOKEN, LeaderboardClient, OutpostClient, PAY_RATE_SCALE_FACTOR, PDA_SEEDS, PROGRAM_IDS, PurchaseAsset, ReceiptNFTKind, types as SOL, SolanaStakingClient, Staker, TRANSFER_HOOK, TokenClient, VALIDATOR_LEADERBOARD, airdropSol, buildOutpostAccounts, buildSolanaTrancheLadder, buildSolanaTrancheSnapshot, calculateExpectedFee, deriveBarConfigPda, deriveBondLevelPda, deriveBondedActorPda, deriveBucketAuthorityPda, deriveDepositAuthorityPda, deriveDistributionStatePda, deriveEphemeralStakeAddress, deriveExtraAccountMetaListPda, deriveLeaderboardStatePda, deriveLiqReceiptDataPda, deriveLiqsolMintAuthorityPda, deriveLiqsolMintPda, deriveMaintenanceLedgerPda, deriveOutpostAccountPda, deriveOutpostGlobalStatePda, deriveOutpostPoolAuthorityPda, derivePayRateHistoryPda, derivePayoutStatePda, derivePriceHistoryPda, deriveReservePoolPda, deriveStakeAllocationStatePda, deriveStakeControllerStatePda, deriveStakeControllerVaultPda, deriveStakeMetricsPda, deriveTrancheStatePda, deriveUserPretokenRecordPda, deriveUserRecordPda, deriveValidatorRecordPda, deriveVaultPda, deriveWithdrawGlobalPda, deriveWithdrawMintAuthorityPda, deriveWithdrawMintMetadataPda, deriveWithdrawNftMintPda, generateRandomDepositAmount, generateTestKeypair, getAveragePayRate, getBucketLiqSolBalance, getEpochSnapshot, getErrorMessage, getLiqsolCoreProgram, getPayoutStateRaw, getReservePoolBalance, getStakeControllerStateRaw, getUserLiqSolBalance, getUserRecordRaw, lamportsToSol, msToEpochEnd, previewDepositEffects, scheduledInstruction, sleep, solToLamports, toBigint, tokensToShares, waitForConfirmation, waitUntilSafeToExecuteFunction };
|
|
8402
|
+
export { ADDRESSES, CHAINLINK_FEED, CHAINLINK_PROGRAM, CONTRACTS, DEFAULT_AVERAGE_PAY_RATE, DEFAULT_PAY_RATE_LOOKBACK, DepositClient, DistributionClient, EPHEMERAL_RENT_EXEMPTION, ERC1155Abi, ERC20Abi, ERC721Abi, types$1 as ETH, EthereumContractService, EthereumStakingClient, INDEX_SCALE, LAMPORTS_PER_SOL, LIQSOL_CORE, LIQSOL_TOKEN, LeaderboardClient, OutpostClient, PAY_RATE_SCALE_FACTOR, PDA_SEEDS, PROGRAM_IDS, PurchaseAsset, ReceiptNFTKind, types as SOL, SolanaStakingClient, Staker, TRANSFER_HOOK, TokenClient, VALIDATOR_LEADERBOARD, airdropSol, buildOutpostAccounts, buildSolanaTrancheLadder, buildSolanaTrancheSnapshot, calculateExpectedFee, deriveBarConfigPda, deriveBondLevelPda, deriveBondedActorPda, deriveBucketAuthorityPda, deriveDepositAuthorityPda, deriveDistributionStatePda, deriveEphemeralStakeAddress, deriveExtraAccountMetaListPda, deriveGlobalConfigPda, deriveLeaderboardStatePda, deriveLiqReceiptDataPda, deriveLiqsolMintAuthorityPda, deriveLiqsolMintPda, deriveMaintenanceLedgerPda, deriveOutpostAccountPda, deriveOutpostGlobalStatePda, deriveOutpostPoolAuthorityPda, derivePayRateHistoryPda, derivePayoutStatePda, derivePriceHistoryPda, deriveReservePoolPda, deriveStakeAllocationStatePda, deriveStakeControllerStatePda, deriveStakeControllerVaultPda, deriveStakeMetricsPda, deriveTrancheStatePda, deriveUserPretokenRecordPda, deriveUserRecordPda, deriveValidatorRecordPda, deriveVaultPda, deriveWithdrawGlobalPda, deriveWithdrawMintAuthorityPda, deriveWithdrawMintMetadataPda, deriveWithdrawNftMintPda, generateRandomDepositAmount, generateTestKeypair, getAveragePayRate, getBucketLiqSolBalance, getEpochSnapshot, getErrorMessage, getLiqsolCoreProgram, getPayoutStateRaw, getReservePoolBalance, getStakeControllerStateRaw, getUserLiqSolBalance, getUserRecordRaw, lamportsToSol, msToEpochEnd, previewDepositEffects, scheduledInstruction, sleep, solToLamports, toBigint, tokensToShares, waitForConfirmation, waitUntilSafeToExecuteFunction };
|
|
7644
8403
|
export type { BalanceView, ContractConfig, ContractOptions, Contracts, EpochSnapshot, IStakingClient, OPPAssertion, OutpostAccounts, Portfolio, PurchaseQuote, ScheduleConfig, StakerConfig, TrancheLadderItem, TrancheSnapshot, YieldView };
|