UNPKG

@thespidercode/openbook-swap

Version:
62 lines (61 loc) 2.48 kB
import { PublicKey, TransactionInstruction } from '@solana/web3.js'; export declare const INITIALIZE_ACCOUNT_ACCOUNT_INDEX = 0; export declare const INITIALIZE_ACCOUNT_MINT_INDEX = 1; export declare const INITIALIZE_ACCOUNT_OWNER_INDEX = 2; export declare const TRANSFER_SOURCE_INDEX = 0; export declare const TRANSFER_DESTINATION_INDEX = 1; export declare const TRANSFER_OWNER_INDEX = 2; export declare const CLOSE_ACCOUNT_SOURCE_INDEX = 0; export declare const CLOSE_ACCOUNT_DESTINATION_INDEX = 1; export declare const CLOSE_ACCOUNT_OWNER_INDEX = 2; export declare const TOKEN_PROGRAM_ID: PublicKey; export declare const WRAPPED_SOL_MINT: PublicKey; export declare const MSRM_MINT: PublicKey; export declare const MSRM_DECIMALS = 0; export declare const SRM_MINT: PublicKey; export declare const SRM_DECIMALS = 6; export declare function decodeTokenInstructionData(instruction: any): any; export declare function initializeMint({ mint, decimals, mintAuthority, freezeAuthority, }: { mint: PublicKey; decimals: number; mintAuthority: PublicKey; freezeAuthority?: PublicKey | null; }): TransactionInstruction; export declare function initializeAccount({ account, mint, owner }: { account: PublicKey; mint: PublicKey; owner: PublicKey; }): TransactionInstruction; export declare function transfer({ source, destination, amount, owner }: { source: PublicKey; destination: PublicKey; amount: number; owner: PublicKey; }): TransactionInstruction; export declare function approve({ source, delegate, amount, owner }: { source: PublicKey; delegate: PublicKey; amount: number; owner: PublicKey; }): TransactionInstruction; export declare function revoke({ source, owner }: { source: PublicKey; owner: PublicKey; }): TransactionInstruction; export declare function setAuthority({ target, currentAuthority, newAuthority, authorityType, }: { target: PublicKey; currentAuthority: PublicKey; newAuthority: PublicKey; authorityType: 'MintTokens' | 'FreezeAccount' | 'AccountOwner' | 'CloseAccount'; }): TransactionInstruction; export declare function mintTo({ mint, destination, amount, mintAuthority }: { mint: PublicKey; destination: PublicKey; amount: number; mintAuthority: PublicKey; }): TransactionInstruction; export declare function closeAccount({ source, destination, owner }: { source: PublicKey; destination: PublicKey; owner: PublicKey; }): TransactionInstruction;