import type { Provider } from "@saberhq/solana-contrib"; import { TransactionEnvelope } from "@saberhq/solana-contrib"; import type { Token, TokenAmount } from "@saberhq/token-utils"; import type { PublicKey, TransactionInstruction } from "@solana/web3.js"; import { Keypair } from "@solana/web3.js"; import type { AddDecimalsProgram, UserStakeAccounts, WrappedTokenData } from "../../programs/addDecimals"; import { LazyWrappedToken, WrappedToken } from "../entities/wrappedToken"; /** * Program-related actions on a wrapped token. */ export declare class WrappedTokenActions { readonly provider: Provider; readonly program: AddDecimalsProgram; private _wrapped; constructor(provider: Provider, program: AddDecimalsProgram, _wrapped: LazyWrappedToken); get wrapped(): LazyWrappedToken; /** * Creates the wrapped token if it doesn't exist. * @param mintKP Keypair of the mint account. * @returns */ createIfNotExists(mintKP?: Keypair): Promise; /** * Loads the actions with the wrapper. * @param program * @param underlying * @param decimals * @returns */ static loadWithActions(provider: Provider, program: AddDecimalsProgram, underlying: Token, decimals: number): Promise; loadData(): Promise; /** * Reloads the wrapped token, returning one with the new data. */ reload(): Promise; wrap(amount: TokenAmount): Promise; unwrap(amount: TokenAmount): Promise; unwrapAllIX(): Promise; unwrapAll(): Promise; getAssociatedTokenAddress(): Promise; genUserStake(): Promise<{ accounts: { [K in keyof UserStakeAccounts]: PublicKey; }; instructions: readonly TransactionInstruction[]; createAccountInstructions: { underlying: TransactionInstruction | null; wrapped: TransactionInstruction | null; }; }>; } //# sourceMappingURL=wrappedTokenActions.d.ts.map