@wireio/stake 2.1.0 → 2.2.1

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
@@ -1323,6 +1323,7 @@ type SolanaProgramIds = {
1323
1323
  LIQSOL_TOKEN: PublicKey$1;
1324
1324
  VALIDATOR_LEADERBOARD: PublicKey$1;
1325
1325
  TRANSFER_HOOK: PublicKey$1;
1326
+ ALT_LOOKUP_TABLE: PublicKey$1;
1326
1327
  };
1327
1328
  declare const PROGRAM_IDS_BY_CHAIN: Record<SupportedSolChainID, SolanaProgramIds>;
1328
1329
  declare const getProgramIds: (chainId: SolChainID) => SolanaProgramIds;
@@ -15395,13 +15396,7 @@ declare class DepositClient {
15395
15396
  * - increments totalEncumberedFunds in global state
15396
15397
  * - mints an NFT receipt (liqReceiptData + NFT ATA for owner)
15397
15398
  */
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;
15399
+ buildWithdrawTx(amount: bigint, user?: PublicKey$1): Promise<TransactionInstruction>;
15405
15400
  }
15406
15401
 
15407
15402
  /**
@@ -15765,15 +15760,6 @@ declare class SolanaStakingClient implements IStakingClient {
15765
15760
  get feePayer(): PublicKey$1;
15766
15761
  get squadsX(): SquadsXConfig | null;
15767
15762
  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
15763
  /**
15778
15764
  * Deposit native SOL into liqSOL (liqsol_core::deposit).
15779
15765
  * Handles tx build, sign, send, and confirmation.
@@ -15820,8 +15806,43 @@ declare class SolanaStakingClient implements IStakingClient {
15820
15806
  * Used by balance-correction flows and debugging.
15821
15807
  */
15822
15808
  getUserRecord(): Promise<DistributionUserRecord | null>;
15823
- get squadsMultisigPDA(): PublicKey$1 | null;
15824
- get squadsVaultPDA(): PublicKey$1 | null;
15809
+ get squadsMultisigPDA(): PublicKey$1 | undefined;
15810
+ get squadsVaultPDA(): PublicKey$1 | undefined;
15811
+ private sendSquadsIxs;
15812
+ buildAndSendIx(ix: TransactionInstruction | TransactionInstruction[]): Promise<string>;
15813
+ /**
15814
+ * Send a signed transaction over HTTP RPC.
15815
+ *
15816
+ * - Returns immediately on successful sendRawTransaction.
15817
+ * - If sendRawTransaction throws a SendTransactionError with
15818
+ * "already been processed", we treat it as success and
15819
+ * just return a derived signature.
15820
+ * - No confirmTransaction / polling / blockheight handling.
15821
+ */
15822
+ private sendAndConfirmHttp;
15823
+ /**
15824
+ * Sign a single Solana transaction using the connected wallet adapter.
15825
+ */
15826
+ signTransaction(tx: SolanaTransaction): Promise<SolanaTransaction>;
15827
+ /**
15828
+ * Generic "fire and forget" send helper if the caller already
15829
+ * prepared and signed the transaction.
15830
+ */
15831
+ sendTransaction(signed: SolanaTransaction): Promise<TransactionSignature>;
15832
+ /**
15833
+ * Attach recent blockhash + fee payer to a transaction.
15834
+ * Required before signing and sending.
15835
+ */
15836
+ prepareTx(tx: Transaction): Promise<{
15837
+ tx: Transaction;
15838
+ blockhash: string;
15839
+ lastValidBlockHeight: number;
15840
+ }>;
15841
+ /**
15842
+ * Guard for all write operations (deposit/withdraw/stake/unstake/buy).
15843
+ * Ensures we have a Wire pubKey and an Anchor wallet pubKey, and that they match.
15844
+ */
15845
+ ensureUser(): void;
15825
15846
  /**
15826
15847
  * Unified, chain-agnostic tranche snapshot for Solana.
15827
15848
  *
@@ -15888,38 +15909,6 @@ declare class SolanaStakingClient implements IStakingClient {
15888
15909
  private cachedTxFee?;
15889
15910
  private static readonly FEE_CACHE_TTL_MS;
15890
15911
  private getSingleTxFeeLamports;
15891
- /**
15892
- * Send a signed transaction over HTTP RPC and wait for confirmation.
15893
- * Throws if the transaction fails.
15894
- *
15895
- * - Handles benign "already processed" preflight errors.
15896
- * - Uses getSignatureStatuses() instead of confirmTransaction()
15897
- * so we don't care about blockheight expiry.
15898
- */
15899
- private sendAndConfirmHttp;
15900
- /**
15901
- * Sign a single Solana transaction using the connected wallet adapter.
15902
- */
15903
- signTransaction(tx: SolanaTransaction): Promise<SolanaTransaction>;
15904
- /**
15905
- * Generic "fire and forget" send helper if the caller already
15906
- * prepared and signed the transaction.
15907
- */
15908
- sendTransaction(signed: SolanaTransaction): Promise<TransactionSignature>;
15909
- /**
15910
- * Attach recent blockhash + fee payer to a transaction.
15911
- * Required before signing and sending.
15912
- */
15913
- prepareTx(tx: Transaction): Promise<{
15914
- tx: Transaction;
15915
- blockhash: string;
15916
- lastValidBlockHeight: number;
15917
- }>;
15918
- /**
15919
- * Guard for all write operations (deposit/withdraw/stake/unstake/buy).
15920
- * Ensures we have a Wire pubKey and an Anchor wallet pubKey, and that they match.
15921
- */
15922
- ensureUser(): void;
15923
15912
  }
15924
15913
 
15925
15914
  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 };