@wireio/stake 0.2.5 → 0.3.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 +2461 -2074
- package/lib/stake.browser.js.map +1 -1
- package/lib/stake.d.ts +29 -55
- package/lib/stake.js +2615 -2211
- package/lib/stake.js.map +1 -1
- package/lib/stake.m.js +2461 -2074
- package/lib/stake.m.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/BeaconState.sol/BeaconState.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/BeaconState.sol/BeaconState.json +807 -0
- package/src/assets/ethereum/ABI/liqEth/DepositManager.sol/DepositManager.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/DepositManager.sol/DepositManager.json +184 -346
- package/src/assets/ethereum/ABI/liqEth/LiqEthAuthority.sol/LiqEthAuthority.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthAuthority.sol/LiqEthAuthority.json +1289 -0
- 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 +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/ILiqEthUpgradeable.json +29 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IRewardsERC20.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IRewardsERC20.json +36 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IRewardsERC20Pausable.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IRewardsERC20Pausable.json +263 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IStakingModule.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IStakingModule.json +226 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.json +59 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IWithdrawalRecord.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IWithdrawalRecord.json +14 -12
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/LiqEthCommon.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/LiqEthCommon.json +2 -2
- package/src/assets/ethereum/ABI/liqEth/LiqEthManaged.sol/LiqEthManaged.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthManaged.sol/LiqEthManaged.json +229 -0
- package/src/assets/ethereum/ABI/liqEth/RewardsERC20.sol/RewardsERC20Upgradeable.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/{RewardsERC20Pausable.sol/RewardsERC20Pausable.json → RewardsERC20.sol/RewardsERC20Upgradeable.json} +140 -78
- package/src/assets/ethereum/ABI/liqEth/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeable.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/{RewardsERC20.sol/RewardsERC20.json → RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeable.json} +218 -30
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/BeaconRoots.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/BeaconRoots.json +2 -2
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZ.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZ.json +2 -2
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZExtras.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZExtras.json +10 -0
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZVec48.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZVec48.json +10 -0
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/ValidatorBalanceVerifier.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/ValidatorBalanceVerifier.json +121 -55
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/YieldOracle.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/YieldOracle.json +836 -273
- package/src/assets/ethereum/ABI/liqEth/accounting.sol/Accounting.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/accounting.sol/Accounting.json +150 -168
- package/src/assets/ethereum/ABI/liqEth/liqEth.sol/LiqEthToken.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/liqEth.sol/LiqEthToken.json +301 -186
- package/src/assets/ethereum/ABI/liqEth/stakingModule.sol/StakingModule.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/stakingModule.sol/StakingModule.json +814 -206
- package/src/assets/ethereum/ABI/liqEth/withdrawalQueue.sol/WithdrawalQueue.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/withdrawalQueue.sol/WithdrawalQueue.json +244 -198
- 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 +165 -152
- package/src/assets/ethereum/ABI/outpost/Depositor.sol/Depositor.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/Depositor.sol/Depositor.json +167 -282
- 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/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.json +2 -54
- package/src/assets/ethereum/ABI/outpost/OPP.sol/OPP.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPP.sol/OPP.json +26 -8
- package/src/assets/ethereum/ABI/outpost/OPPInbound.sol/OPPInbound.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPInbound.sol/OPPInbound.json +2 -2
- package/src/assets/ethereum/ABI/outpost/Pretoken.sol/Pretoken.dbg.json +4 -0
- package/src/assets/ethereum/ABI/outpost/Pretoken.sol/Pretoken.json +1650 -0
- package/src/assets/ethereum/ABI/outpost/ReceiptNFT.sol/ReceiptNFT.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/ReceiptNFT.sol/ReceiptNFT.json +2 -22
- package/src/assets/ethereum/ABI/outpost/interfaces/IPretoken.sol/IPretoken.dbg.json +4 -0
- package/src/assets/ethereum/ABI/outpost/interfaces/IPretoken.sol/IPretoken.json +29 -0
- package/src/assets/ethereum/ABI/outpost/interfaces/IWarrant.sol/IWarrant.dbg.json +1 -1
- package/src/networks/ethereum/clients/deposit.client.ts +11 -7
- package/src/networks/ethereum/clients/liq.client.ts +47 -0
- package/src/networks/ethereum/clients/pretoken.client.ts +47 -50
- package/src/networks/ethereum/contract.ts +24 -51
- package/src/networks/ethereum/ethereum.ts +29 -52
- package/src/networks/ethereum/types.ts +7 -6
- package/src/networks/ethereum/utils.ts +3 -9
- package/src/networks/solana/clients/token.client.ts +0 -1
- package/src/networks/solana/solana.ts +44 -146
- package/src/networks/solana/types.ts +6 -2
- package/src/networks/solana/utils.ts +4 -6
- package/src/types.ts +6 -34
- package/src/assets/ethereum/ABI/liqEth/RewardsERC20.sol/RewardsERC20.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/RewardsERC20Pausable.sol/RewardsERC20Pausable.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/BeaconRoots.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/BeaconRoots.json +0 -10
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/SSZ.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/SSZ.json +0 -10
- package/src/assets/ethereum/ABI/outpost/Warrant.sol/Warrant.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/Warrant.sol/Warrant.json +0 -1650
package/lib/stake.d.ts
CHANGED
|
@@ -11,17 +11,17 @@ import { BN, AnchorProvider, Program } from '@coral-xyz/anchor';
|
|
|
11
11
|
type StakerConfig = {
|
|
12
12
|
network: ExternalNetwork;
|
|
13
13
|
provider: BaseSignerWalletAdapter | ethers.providers.Web3Provider;
|
|
14
|
-
pubKey
|
|
14
|
+
pubKey?: PublicKey;
|
|
15
15
|
};
|
|
16
16
|
interface IStakingClient {
|
|
17
|
-
pubKey
|
|
17
|
+
pubKey?: PublicKey;
|
|
18
18
|
network: ExternalNetwork;
|
|
19
19
|
/** Amount is in the chain's smallest unit (lamports/wei, etc.) */
|
|
20
20
|
deposit(amount: bigint): Promise<string>;
|
|
21
21
|
withdraw(amount: bigint): Promise<string>;
|
|
22
22
|
stake(amount: bigint): Promise<string>;
|
|
23
23
|
unstake(amount: bigint): Promise<string>;
|
|
24
|
-
buy(amount: bigint
|
|
24
|
+
buy(amount: bigint): Promise<string>;
|
|
25
25
|
/** Fetch the complete user portfolio */
|
|
26
26
|
getPortfolio(): Promise<Portfolio>;
|
|
27
27
|
/**
|
|
@@ -36,8 +36,6 @@ interface IStakingClient {
|
|
|
36
36
|
windowBefore?: number;
|
|
37
37
|
windowAfter?: number;
|
|
38
38
|
}): Promise<TrancheSnapshot | null>;
|
|
39
|
-
/** */
|
|
40
|
-
getBuyQuote(amount: bigint, asset: PurchaseAsset): Promise<PurchaseQuote>;
|
|
41
39
|
}
|
|
42
40
|
interface Portfolio {
|
|
43
41
|
/** Native balance on chain: ETH, SOL */
|
|
@@ -46,7 +44,7 @@ interface Portfolio {
|
|
|
46
44
|
liq: BalanceView;
|
|
47
45
|
/** Outpost Staked balance */
|
|
48
46
|
staked: BalanceView;
|
|
49
|
-
/** Prelaunch WIRE “shares” (
|
|
47
|
+
/** Prelaunch WIRE “shares” (pretokens) */
|
|
50
48
|
wire: BalanceView;
|
|
51
49
|
/** SOL ONLY!
|
|
52
50
|
* Tracked liqSOL balance from distribution program */
|
|
@@ -100,16 +98,13 @@ interface TrancheSnapshot {
|
|
|
100
98
|
currentTranche: number;
|
|
101
99
|
/** Current tranche price in USD (1e8 scale) */
|
|
102
100
|
currentPriceUsd: bigint;
|
|
103
|
-
/** Optional min/max bounds for price validation (1e8 scale) */
|
|
104
|
-
minPriceUsd?: bigint;
|
|
105
|
-
maxPriceUsd?: bigint;
|
|
106
101
|
/** Tranche curve config (per-chain) */
|
|
107
102
|
supplyGrowthBps: number;
|
|
108
103
|
priceGrowthBps: number;
|
|
109
104
|
/** Current tranche supply state (1e8 scale) */
|
|
110
105
|
currentTrancheSupply: bigint;
|
|
111
106
|
initialTrancheSupply: bigint;
|
|
112
|
-
|
|
107
|
+
totalPretokensSold: bigint;
|
|
113
108
|
/** Native token → USD price if available (SOL/USD, ETH/USD, etc, 1e8 scale) */
|
|
114
109
|
nativePriceUsd?: bigint;
|
|
115
110
|
/** Optional timestamp (sec) for the last recorded native price */
|
|
@@ -120,23 +115,6 @@ interface TrancheSnapshot {
|
|
|
120
115
|
*/
|
|
121
116
|
ladder: TrancheLadderItem[];
|
|
122
117
|
}
|
|
123
|
-
declare enum PurchaseAsset {
|
|
124
|
-
SOL = "SOL",
|
|
125
|
-
LIQSOL = "LIQSOL",
|
|
126
|
-
ETH = "ETH",
|
|
127
|
-
LIQETH = "LIQETH",
|
|
128
|
-
YIELD = "YIELD"
|
|
129
|
-
}
|
|
130
|
-
interface PurchaseQuote {
|
|
131
|
-
purchaseAsset: PurchaseAsset;
|
|
132
|
-
amountIn: bigint;
|
|
133
|
-
/** Expected pretoken “shares” (pretokens) and decimals */
|
|
134
|
-
wireShares: bigint;
|
|
135
|
-
wireDecimals: number;
|
|
136
|
-
/** Current price + notional in USD (1e8 scale) */
|
|
137
|
-
wirePriceUsd: bigint;
|
|
138
|
-
notionalUsd: bigint;
|
|
139
|
-
}
|
|
140
118
|
|
|
141
119
|
declare class Staker {
|
|
142
120
|
selectedChainID?: ChainID;
|
|
@@ -158,7 +136,7 @@ declare class Staker {
|
|
|
158
136
|
setChain(chainID: ChainID): boolean;
|
|
159
137
|
}
|
|
160
138
|
|
|
161
|
-
declare const CONTRACT_NAMES: readonly ["Accounting", "DepositManager", "LiqEth", "StakingModule", "WithdrawalQueue", "WithdrawalVault", "Depositor", "ReceiptNFT", "OutpostManager", "BAR", "OPP", "OPPCommon", "OPPInbound", "
|
|
139
|
+
declare const CONTRACT_NAMES: readonly ["Accounting", "DepositManager", "LiqEth", "StakingModule", "WithdrawalQueue", "WithdrawalVault", "Depositor", "ReceiptNFT", "OutpostManager", "BAR", "OPP", "OPPCommon", "OPPInbound", "Pretoken", "Aggregator", "EthUsdPriceConsumer"];
|
|
162
140
|
type ContractName = typeof CONTRACT_NAMES[number];
|
|
163
141
|
type AddressBook = Record<ContractName, string>;
|
|
164
142
|
interface Result {
|
|
@@ -206,6 +184,11 @@ interface WithdrawnStakeResult extends Result {
|
|
|
206
184
|
/** Parsed WithdrawnStake event, if present */
|
|
207
185
|
withdrawnstake?: WithdrawnStakeEvent;
|
|
208
186
|
}
|
|
187
|
+
interface SharesBurnedEvent {
|
|
188
|
+
from: string;
|
|
189
|
+
shares: BigNumber;
|
|
190
|
+
tokenValue: BigNumber;
|
|
191
|
+
}
|
|
209
192
|
interface preLaunchReceipt {
|
|
210
193
|
tokenId: bigint;
|
|
211
194
|
receipt: {
|
|
@@ -224,6 +207,7 @@ declare const types$1_CONTRACT_NAMES: typeof CONTRACT_NAMES;
|
|
|
224
207
|
type types$1_ContractName = ContractName;
|
|
225
208
|
type types$1_DepositEvent = DepositEvent;
|
|
226
209
|
type types$1_DepositResult = DepositResult;
|
|
210
|
+
type types$1_SharesBurnedEvent = SharesBurnedEvent;
|
|
227
211
|
type types$1_StakedEvent = StakedEvent;
|
|
228
212
|
type types$1_StakedResult = StakedResult;
|
|
229
213
|
type types$1_WithdrawRequestedEvent = WithdrawRequestedEvent;
|
|
@@ -233,18 +217,19 @@ type types$1_WithdrawnStakeResult = WithdrawnStakeResult;
|
|
|
233
217
|
type types$1_preLaunchReceipt = preLaunchReceipt;
|
|
234
218
|
declare namespace types$1 {
|
|
235
219
|
export { types$1_CONTRACT_NAMES as CONTRACT_NAMES };
|
|
236
|
-
export type { types$1_AddressBook as AddressBook, types$1_ContractName as ContractName, types$1_DepositEvent as DepositEvent, types$1_DepositResult as DepositResult, types$1_StakedEvent as StakedEvent, types$1_StakedResult as StakedResult, types$1_WithdrawRequestedEvent as WithdrawRequestedEvent, types$1_WithdrawResult as WithdrawResult, types$1_WithdrawnStakeEvent as WithdrawnStakeEvent, types$1_WithdrawnStakeResult as WithdrawnStakeResult, types$1_preLaunchReceipt as preLaunchReceipt };
|
|
220
|
+
export type { types$1_AddressBook as AddressBook, types$1_ContractName as ContractName, types$1_DepositEvent as DepositEvent, types$1_DepositResult as DepositResult, types$1_SharesBurnedEvent as SharesBurnedEvent, types$1_StakedEvent as StakedEvent, types$1_StakedResult as StakedResult, types$1_WithdrawRequestedEvent as WithdrawRequestedEvent, types$1_WithdrawResult as WithdrawResult, types$1_WithdrawnStakeEvent as WithdrawnStakeEvent, types$1_WithdrawnStakeResult as WithdrawnStakeResult, types$1_preLaunchReceipt as preLaunchReceipt };
|
|
237
221
|
}
|
|
238
222
|
|
|
239
223
|
declare class EthereumStakingClient implements IStakingClient {
|
|
240
224
|
private config;
|
|
241
|
-
readonly pubKey
|
|
225
|
+
readonly pubKey?: PublicKey;
|
|
242
226
|
private readonly provider;
|
|
243
227
|
private readonly signer;
|
|
244
228
|
private readonly contractService;
|
|
245
229
|
private depositClient;
|
|
246
|
-
private
|
|
230
|
+
private liqClient;
|
|
247
231
|
private pretokenClient;
|
|
232
|
+
private stakeClient;
|
|
248
233
|
get contract(): {
|
|
249
234
|
Accounting: ethers.Contract;
|
|
250
235
|
DepositManager: ethers.Contract;
|
|
@@ -259,7 +244,7 @@ declare class EthereumStakingClient implements IStakingClient {
|
|
|
259
244
|
OPP: ethers.Contract;
|
|
260
245
|
OPPCommon: ethers.Contract;
|
|
261
246
|
OPPInbound: ethers.Contract;
|
|
262
|
-
|
|
247
|
+
Pretoken: ethers.Contract;
|
|
263
248
|
Aggregator: ethers.Contract;
|
|
264
249
|
EthUsdPriceConsumer: ethers.Contract;
|
|
265
250
|
};
|
|
@@ -273,9 +258,8 @@ declare class EthereumStakingClient implements IStakingClient {
|
|
|
273
258
|
*/
|
|
274
259
|
deposit(amount: number | string | bigint | BigNumber): Promise<string>;
|
|
275
260
|
/**
|
|
276
|
-
* Withdraw native ETH from the liqETH protocol via
|
|
261
|
+
* Withdraw native ETH from the liqETH protocol via the liqeth safeBurn function, which burns the LiqETH and adds the user to the withdrawal queue.
|
|
277
262
|
* @param amount Amount in wei (or something convertible to BigNumber).
|
|
278
|
-
* Keep this as a bigint / string in the caller; avoid JS floats.
|
|
279
263
|
* @returns transaction hash
|
|
280
264
|
*/
|
|
281
265
|
withdraw(amount: bigint): Promise<string>;
|
|
@@ -303,7 +287,6 @@ declare class EthereumStakingClient implements IStakingClient {
|
|
|
303
287
|
*/
|
|
304
288
|
fetchPrelaunchReceipts(address?: string): Promise<preLaunchReceipt[]>;
|
|
305
289
|
getEthStats(): Promise<any>;
|
|
306
|
-
getBuyQuote(amount: bigint, purchaseAsset: PurchaseAsset): Promise<PurchaseQuote>;
|
|
307
290
|
/**
|
|
308
291
|
* Resolve the user's ETH + liqETH balances.
|
|
309
292
|
*
|
|
@@ -599,7 +582,7 @@ type GlobalState = {
|
|
|
599
582
|
type UserWarrantRecord = {
|
|
600
583
|
user: PublicKey$1;
|
|
601
584
|
totalSolDeposited: BN;
|
|
602
|
-
|
|
585
|
+
totalPretokensPurchased: BN;
|
|
603
586
|
lastTrancheNumber: BN;
|
|
604
587
|
lastTranchePriceUsd: BN;
|
|
605
588
|
bump: number;
|
|
@@ -609,7 +592,8 @@ type TrancheState = {
|
|
|
609
592
|
currentTrancheNumber: BN;
|
|
610
593
|
currentTrancheSupply: BN;
|
|
611
594
|
currentTranchePriceUsd: BN;
|
|
612
|
-
|
|
595
|
+
totalPretokensSold?: BN;
|
|
596
|
+
totalWarrantsSold?: BN;
|
|
613
597
|
initialTrancheSupply: BN;
|
|
614
598
|
supplyGrowthBps: number;
|
|
615
599
|
priceGrowthBps: number;
|
|
@@ -670,7 +654,7 @@ declare namespace types {
|
|
|
670
654
|
*/
|
|
671
655
|
declare class SolanaStakingClient implements IStakingClient {
|
|
672
656
|
private config;
|
|
673
|
-
pubKey
|
|
657
|
+
pubKey?: PublicKey;
|
|
674
658
|
connection: Connection;
|
|
675
659
|
anchor: AnchorProvider;
|
|
676
660
|
private depositClient;
|
|
@@ -710,7 +694,7 @@ declare class SolanaStakingClient implements IStakingClient {
|
|
|
710
694
|
*
|
|
711
695
|
* ETH / LIQETH are not valid on Solana.
|
|
712
696
|
*/
|
|
713
|
-
buy(amountLamports: bigint
|
|
697
|
+
buy(amountLamports: bigint): Promise<string>;
|
|
714
698
|
/**
|
|
715
699
|
* Aggregate view of the user’s balances on Solana:
|
|
716
700
|
* - native: SOL wallet balance
|
|
@@ -732,25 +716,14 @@ declare class SolanaStakingClient implements IStakingClient {
|
|
|
732
716
|
* windowBefore/windowAfter control how many ladder rows we precompute
|
|
733
717
|
* around the current tranche for UI, but you can pass nothing if you
|
|
734
718
|
* only need current tranche info.
|
|
719
|
+
*
|
|
720
|
+
* READ-ONLY allowed
|
|
735
721
|
*/
|
|
736
722
|
getTrancheSnapshot(options?: {
|
|
737
723
|
chainID?: ChainID;
|
|
738
724
|
windowBefore?: number;
|
|
739
725
|
windowAfter?: number;
|
|
740
726
|
}): Promise<TrancheSnapshot>;
|
|
741
|
-
/**
|
|
742
|
-
* Approximate prelaunch WIRE quote for a given amount & asset.
|
|
743
|
-
*
|
|
744
|
-
* Uses TrancheSnapshot + SOL/USD price for:
|
|
745
|
-
* - SOL: amount is lamports
|
|
746
|
-
* - LIQSOL: amount is liqSOL base units (decimals = 9)
|
|
747
|
-
* - YIELD: amount is treated as SOL lamports-equivalent of yield
|
|
748
|
-
*
|
|
749
|
-
* NOTE: On-chain rounding may differ slightly (this is UI-only).
|
|
750
|
-
*/
|
|
751
|
-
getBuyQuote(amount: bigint, asset: PurchaseAsset, opts?: {
|
|
752
|
-
chainID?: ChainID;
|
|
753
|
-
}): Promise<PurchaseQuote>;
|
|
754
727
|
/**
|
|
755
728
|
* Convenience helper to fetch the distribution userRecord for the current user.
|
|
756
729
|
* Used by balance-correction flows and debugging.
|
|
@@ -785,6 +758,7 @@ declare class SolanaStakingClient implements IStakingClient {
|
|
|
785
758
|
blockhash: string;
|
|
786
759
|
lastValidBlockHeight: number;
|
|
787
760
|
}>;
|
|
761
|
+
ensureWriteAccess(): void;
|
|
788
762
|
}
|
|
789
763
|
|
|
790
764
|
/**
|
|
@@ -5350,7 +5324,7 @@ declare function buildSolanaTrancheLadder(options: {
|
|
|
5350
5324
|
currentTranche: number;
|
|
5351
5325
|
initialTrancheSupply: bigint;
|
|
5352
5326
|
currentTrancheSupply: bigint;
|
|
5353
|
-
|
|
5327
|
+
totalPretokensSold: bigint;
|
|
5354
5328
|
currentPriceUsd: bigint;
|
|
5355
5329
|
supplyGrowthBps: number;
|
|
5356
5330
|
priceGrowthBps: number;
|
|
@@ -5717,5 +5691,5 @@ declare class TokenClient {
|
|
|
5717
5691
|
getSolPriceUsd(): Promise<bigint>;
|
|
5718
5692
|
}
|
|
5719
5693
|
|
|
5720
|
-
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, LAMPORTS_PER_SOL, LIQSOL_CORE, LIQSOL_TOKEN, LeaderboardClient, OutpostClient, PAY_RATE_SCALE_FACTOR, PDA_SEEDS, PROGRAM_IDS,
|
|
5721
|
-
export type { BalanceView, ContractConfig, ContractOptions, Contracts, EpochSnapshot, IStakingClient, OutpostAccounts, Portfolio,
|
|
5694
|
+
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, LAMPORTS_PER_SOL, LIQSOL_CORE, LIQSOL_TOKEN, LeaderboardClient, OutpostClient, PAY_RATE_SCALE_FACTOR, PDA_SEEDS, PROGRAM_IDS, types as SOL, SolanaStakingClient, Staker, TokenClient, VALIDATOR_LEADERBOARD, airdropSol, buildOutpostAccounts, buildSolanaTrancheLadder, buildSolanaTrancheSnapshot, calculateExpectedFee, deriveBarConfigPda, deriveBondLevelPda, deriveBondedActorPda, deriveBucketAuthorityPda, deriveDepositAuthorityPda, deriveDistributionStatePda, deriveEphemeralStakeAddress, deriveLeaderboardStatePda, deriveLiqsolMintAuthorityPda, deriveLiqsolMintPda, deriveOutpostGlobalStatePda, deriveOutpostPoolAuthorityPda, derivePayRateHistoryPda, derivePayoutStatePda, derivePoolUserRecordPda, derivePriceHistoryPda, deriveReservePoolPda, deriveSolBucketPda, deriveStakeControllerStatePda, deriveStakeControllerVaultPda, deriveTrancheStatePda, deriveUserRecordPda, deriveUserUserRecordPda, deriveUserWarrantRecordPda, deriveValidatorRecordPda, deriveVaultPda, deriveWireReceiptPda, generateRandomDepositAmount, generateTestKeypair, getAveragePayRate, getBucketLiqSolBalance, getEpochSnapshot, getErrorMessage, getLiqsolCoreProgram, getPayoutStateRaw, getReservePoolBalance, getStakeControllerStateRaw, getUserLiqSolBalance, getUserRecordRaw, lamportsToSol, msToEpochEnd, previewDepositEffects, scheduledInstruction, sleep, solToLamports, toBigint, tokensToShares, waitForConfirmation, waitUntilSafeToExecuteFunction };
|
|
5695
|
+
export type { BalanceView, ContractConfig, ContractOptions, Contracts, EpochSnapshot, IStakingClient, OutpostAccounts, Portfolio, ScheduleConfig, StakerConfig, TrancheLadderItem, TrancheSnapshot };
|