UNPKG

@symmetry-hq/baskets-sdk

Version:

Software Development Kit for interacting with Symmetry Baskets Program

87 lines (86 loc) 3.32 kB
import { PublicKey, TransactionInstruction } from "@solana/web3.js"; /** Address of the SPL Token program */ export declare const TOKEN_PROGRAM_ID: PublicKey; /** Address of the SPL Token 2022 program */ export declare const TOKEN_2022_PROGRAM_ID: PublicKey; /** Address of the SPL Associated Token Account program */ export declare const ASSOCIATED_TOKEN_PROGRAM_ID: PublicKey; /** Address of the special mint for wrapped native SOL in spl-token */ export declare const NATIVE_MINT: PublicKey; /** Address of the special mint for wrapped native SOL in spl-token-2022 */ export declare const NATIVE_MINT_2022: PublicKey; export declare function createAssociatedTokenAccountInstruction(payer: PublicKey, associatedToken: PublicKey, owner: PublicKey, mint: PublicKey, programId?: PublicKey, associatedTokenProgramId?: PublicKey): TransactionInstruction; export declare function getAssociatedTokenAddressSync(mint: PublicKey, owner: PublicKey, allowOwnerOffCurve?: boolean, programId?: PublicKey, associatedTokenProgramId?: PublicKey): PublicKey; export declare enum TokenInstruction { InitializeMint = 0, InitializeAccount = 1, InitializeMultisig = 2, Transfer = 3, Approve = 4, Revoke = 5, SetAuthority = 6, MintTo = 7, Burn = 8, CloseAccount = 9, FreezeAccount = 10, ThawAccount = 11, TransferChecked = 12, ApproveChecked = 13, MintToChecked = 14, BurnChecked = 15, InitializeAccount2 = 16, SyncNative = 17, InitializeAccount3 = 18, InitializeMultisig2 = 19, InitializeMint2 = 20, GetAccountDataSize = 21, InitializeImmutableOwner = 22, AmountToUiAmount = 23, UiAmountToAmount = 24, InitializeMintCloseAuthority = 25, TransferFeeExtension = 26, ConfidentialTransferExtension = 27, DefaultAccountStateExtension = 28, Reallocate = 29, MemoTransferExtension = 30, CreateNativeMint = 31, InitializeNonTransferableMint = 32, InterestBearingMintExtension = 33, CpiGuardExtension = 34, InitializePermanentDelegate = 35, TransferHookExtension = 36, MetadataPointerExtension = 39 } export interface SyncNativeInstructionData { instruction: TokenInstruction.SyncNative; } export declare const syncNativeInstructionData: import("@solana/buffer-layout").Structure<SyncNativeInstructionData>; export declare function createSyncNativeInstruction(account: PublicKey, programId?: PublicKey): TransactionInstruction; export declare abstract class TokenError extends Error { constructor(message?: string); } /** Thrown if the owner of a token account is a PDA (Program Derived Address) */ export declare class TokenOwnerOffCurveError extends TokenError { name: string; } /** Token account state as stored by the program */ export declare enum AccountState { Uninitialized = 0, Initialized = 1, Frozen = 2 } /** Token account as stored by the program */ export interface RawAccount { mint: PublicKey; owner: PublicKey; amount: bigint; delegateOption: 1 | 0; delegate: PublicKey; state: AccountState; isNativeOption: 1 | 0; isNative: bigint; delegatedAmount: bigint; closeAuthorityOption: 1 | 0; closeAuthority: PublicKey; } export declare const AccountLayout: import("@solana/buffer-layout").Structure<RawAccount>;