@wireio/stake 2.1.1 → 2.2.2

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.d.ts CHANGED
@@ -65,6 +65,7 @@ interface IStakingClient {
65
65
  minBufferLamports?: bigint;
66
66
  balanceOverrideLamports?: bigint;
67
67
  }): Promise<bigint>;
68
+ validatorDeposit(): Promise<string>;
68
69
  }
69
70
  /**
70
71
  * Cross-chain portfolio view for a single account/wallet.
@@ -349,6 +350,11 @@ interface WithdrawReceipt {
349
350
  readyAt: number;
350
351
  };
351
352
  }
353
+ interface ValidatorDepositedEvent {
354
+ sender: string;
355
+ amount: BigNumber;
356
+ shares: BigNumber;
357
+ }
352
358
 
353
359
  type types$1_AddressBook = AddressBook;
354
360
  declare const types$1_CONTRACT_NAMES: typeof CONTRACT_NAMES;
@@ -359,6 +365,7 @@ type types$1_DepositResult = DepositResult;
359
365
  type types$1_SharesBurnedEvent = SharesBurnedEvent;
360
366
  type types$1_StakedEvent = StakedEvent;
361
367
  type types$1_StakedResult = StakedResult;
368
+ type types$1_ValidatorDepositedEvent = ValidatorDepositedEvent;
362
369
  type types$1_WithdrawReceipt = WithdrawReceipt;
363
370
  type types$1_WithdrawRequestedEvent = WithdrawRequestedEvent;
364
371
  type types$1_WithdrawResult = WithdrawResult;
@@ -367,7 +374,7 @@ type types$1_WithdrawnStakeResult = WithdrawnStakeResult;
367
374
  type types$1_preLaunchReceipt = preLaunchReceipt;
368
375
  declare namespace types$1 {
369
376
  export { types$1_CONTRACT_NAMES as CONTRACT_NAMES };
370
- export type { types$1_AddressBook as AddressBook, types$1_ClaimedEvent as ClaimedEvent, 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_WithdrawReceipt as WithdrawReceipt, 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 };
377
+ export type { types$1_AddressBook as AddressBook, types$1_ClaimedEvent as ClaimedEvent, 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_ValidatorDepositedEvent as ValidatorDepositedEvent, types$1_WithdrawReceipt as WithdrawReceipt, 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 };
371
378
  }
372
379
 
373
380
  declare const INITIAL_TRANCHE_SUPPLY = 35000;
@@ -382,6 +389,7 @@ declare class EthereumStakingClient implements IStakingClient {
382
389
  private stakeClient;
383
390
  private oppClient;
384
391
  private receiptClient;
392
+ private validatorClient;
385
393
  get contract(): {
386
394
  LiqEthAuthority: ethers.Contract;
387
395
  BeaconState: ethers.Contract;
@@ -450,6 +458,10 @@ declare class EthereumStakingClient implements IStakingClient {
450
458
  */
451
459
  unstakePrelaunch(tokenId: bigint, recipient: string): Promise<string>;
452
460
  buy(amount: bigint): Promise<string>;
461
+ /**
462
+ * Validator functions
463
+ */
464
+ validatorDeposit(): Promise<string>;
453
465
  /**
454
466
  * Resolve the user's ETH + liqETH balances.
455
467
  *
@@ -1323,6 +1335,7 @@ type SolanaProgramIds = {
1323
1335
  LIQSOL_TOKEN: PublicKey$1;
1324
1336
  VALIDATOR_LEADERBOARD: PublicKey$1;
1325
1337
  TRANSFER_HOOK: PublicKey$1;
1338
+ ALT_LOOKUP_TABLE: PublicKey$1;
1326
1339
  };
1327
1340
  declare const PROGRAM_IDS_BY_CHAIN: Record<SupportedSolChainID, SolanaProgramIds>;
1328
1341
  declare const getProgramIds: (chainId: SolChainID) => SolanaProgramIds;
@@ -15395,13 +15408,7 @@ declare class DepositClient {
15395
15408
  * - increments totalEncumberedFunds in global state
15396
15409
  * - mints an NFT receipt (liqReceiptData + NFT ATA for owner)
15397
15410
  */
15398
- buildWithdrawTx(amount: bigint, user?: PublicKey$1): Promise<Transaction>;
15399
- /**
15400
- * Internal helper: build the liqsol_core::deposit instruction for a specific `user`.
15401
- * This is the exact same account wiring as buildDepositTx(), but returns the IX
15402
- * plus useful this.pgs.derived addresses/seed for Squads flows.
15403
- */
15404
- private buildDepositIxForUser;
15411
+ buildWithdrawTx(amount: bigint, user?: PublicKey$1): Promise<TransactionInstruction>;
15405
15412
  }
15406
15413
 
15407
15414
  /**
@@ -15765,15 +15772,6 @@ declare class SolanaStakingClient implements IStakingClient {
15765
15772
  get feePayer(): PublicKey$1;
15766
15773
  get squadsX(): SquadsXConfig | null;
15767
15774
  constructor(config: StakerConfig);
15768
- createVaultLiqsolAtaOneShot(params: {
15769
- connection: Connection;
15770
- payer: PublicKey$1;
15771
- vaultPda: PublicKey$1;
15772
- }): Promise<{
15773
- tx: Transaction;
15774
- vaultAta: PublicKey$1;
15775
- } | null>;
15776
- private prepSquadsIxs;
15777
15775
  /**
15778
15776
  * Deposit native SOL into liqSOL (liqsol_core::deposit).
15779
15777
  * Handles tx build, sign, send, and confirmation.
@@ -15820,8 +15818,43 @@ declare class SolanaStakingClient implements IStakingClient {
15820
15818
  * Used by balance-correction flows and debugging.
15821
15819
  */
15822
15820
  getUserRecord(): Promise<DistributionUserRecord | null>;
15823
- get squadsMultisigPDA(): PublicKey$1 | null;
15824
- get squadsVaultPDA(): PublicKey$1 | null;
15821
+ get squadsMultisigPDA(): PublicKey$1 | undefined;
15822
+ get squadsVaultPDA(): PublicKey$1 | undefined;
15823
+ private sendSquadsIxs;
15824
+ buildAndSendIx(ix: TransactionInstruction | TransactionInstruction[]): Promise<string>;
15825
+ /**
15826
+ * Send a signed transaction over HTTP RPC.
15827
+ *
15828
+ * - Returns immediately on successful sendRawTransaction.
15829
+ * - If sendRawTransaction throws a SendTransactionError with
15830
+ * "already been processed", we treat it as success and
15831
+ * just return a derived signature.
15832
+ * - No confirmTransaction / polling / blockheight handling.
15833
+ */
15834
+ private sendAndConfirmHttp;
15835
+ /**
15836
+ * Sign a single Solana transaction using the connected wallet adapter.
15837
+ */
15838
+ signTransaction(tx: SolanaTransaction): Promise<SolanaTransaction>;
15839
+ /**
15840
+ * Generic "fire and forget" send helper if the caller already
15841
+ * prepared and signed the transaction.
15842
+ */
15843
+ sendTransaction(signed: SolanaTransaction): Promise<TransactionSignature>;
15844
+ /**
15845
+ * Attach recent blockhash + fee payer to a transaction.
15846
+ * Required before signing and sending.
15847
+ */
15848
+ prepareTx(tx: Transaction): Promise<{
15849
+ tx: Transaction;
15850
+ blockhash: string;
15851
+ lastValidBlockHeight: number;
15852
+ }>;
15853
+ /**
15854
+ * Guard for all write operations (deposit/withdraw/stake/unstake/buy).
15855
+ * Ensures we have a Wire pubKey and an Anchor wallet pubKey, and that they match.
15856
+ */
15857
+ ensureUser(): void;
15825
15858
  /**
15826
15859
  * Unified, chain-agnostic tranche snapshot for Solana.
15827
15860
  *
@@ -15888,39 +15921,6 @@ declare class SolanaStakingClient implements IStakingClient {
15888
15921
  private cachedTxFee?;
15889
15922
  private static readonly FEE_CACHE_TTL_MS;
15890
15923
  private getSingleTxFeeLamports;
15891
- /**
15892
- * Send a signed transaction over HTTP RPC.
15893
- *
15894
- * - Returns immediately on successful sendRawTransaction.
15895
- * - If sendRawTransaction throws a SendTransactionError with
15896
- * "already been processed", we treat it as success and
15897
- * just return a derived signature.
15898
- * - No confirmTransaction / polling / blockheight handling.
15899
- */
15900
- private sendAndConfirmHttp;
15901
- /**
15902
- * Sign a single Solana transaction using the connected wallet adapter.
15903
- */
15904
- signTransaction(tx: SolanaTransaction): Promise<SolanaTransaction>;
15905
- /**
15906
- * Generic "fire and forget" send helper if the caller already
15907
- * prepared and signed the transaction.
15908
- */
15909
- sendTransaction(signed: SolanaTransaction): Promise<TransactionSignature>;
15910
- /**
15911
- * Attach recent blockhash + fee payer to a transaction.
15912
- * Required before signing and sending.
15913
- */
15914
- prepareTx(tx: Transaction): Promise<{
15915
- tx: Transaction;
15916
- blockhash: string;
15917
- lastValidBlockHeight: number;
15918
- }>;
15919
- /**
15920
- * Guard for all write operations (deposit/withdraw/stake/unstake/buy).
15921
- * Ensures we have a Wire pubKey and an Anchor wallet pubKey, and that they match.
15922
- */
15923
- ensureUser(): void;
15924
15924
  }
15925
15925
 
15926
15926
  export { ADDRESSES, ADDRESS_BOOK_BY_CHAIN, CHAINLINK_FEED, CHAINLINK_PROGRAM, CONTRACTS_BY_CHAIN, DEFAULT_AVERAGE_PAY_RATE, DEFAULT_PAY_RATE_LOOKBACK, DepositClient, DistributionClient, EPHEMERAL_RENT_EXEMPTION, ERC1155Abi, ERC20Abi, ERC721Abi, types$1 as ETH, EthereumContractService, EthereumStakingClient, HOODI_ADDRESSES, INDEX_SCALE, INITIAL_TRANCHE_SUPPLY, LAMPORTS_PER_SOL, LeaderboardClient, MAINNET_ADDRESSES, OutpostClient, PAY_RATE_SCALE_FACTOR, PDA_SEEDS, PROGRAM_IDS_BY_CHAIN, PurchaseAsset, ReceiptNFTKind, SCALE, types as SOL, SolanaStakingClient, Staker, SupportedEvmChainID, SupportedSolChainID, TokenClient, airdropSol, buildOutpostAccounts, buildSolanaTrancheLadder, buildSolanaTrancheSnapshot, ceilDiv, deriveEphemeralStakeAddress, generateRandomDepositAmount, generateTestKeypair, getEpochSnapshot, getErrorMessage, getProgramIds, lamportsToSol, msToEpochEnd, scheduledInstruction, sleep, solToLamports, toBigint, tokensToShares, waitForConfirmation, waitUntilSafeToExecuteFunction };