UNPKG

@kamino-finance/klend-sdk

Version:

Typescript SDK for interacting with the Kamino Lending (klend) protocol

27 lines 3.13 kB
import Decimal from 'decimal.js'; import { AddressLookupTableAccount, Blockhash, Commitment, Connection, Keypair, PublicKey, SendOptions, Signer, Transaction, TransactionInstruction, TransactionSignature, VersionedTransaction } from '@solana/web3.js'; export declare function buildAndSendTxnWithLogs(c: Connection, tx: VersionedTransaction, owner: Keypair, signers: Signer[], withLogsIfSuccess?: boolean, withDescription?: string, throwOnError?: boolean): Promise<TransactionSignature>; export declare function buildAndSendTxn(c: Connection, owner: Keypair, ixs: TransactionInstruction[], signers: Signer[], lutAddresses?: PublicKey[], description?: string): Promise<TransactionSignature>; export declare function sendAndConfirmVersionedTransaction(c: Connection, tx: VersionedTransaction, commitment?: Commitment, sendTransactionOptions?: SendOptions): Promise<string>; export declare function simulateTxn(c: Connection, tx: Transaction, owner: Keypair, signers: Signer[]): Promise<any>; export declare function buildComputeBudgetIx(units: number): TransactionInstruction; /** * Send a transaction with optional address lookup tables * Translates anchor errors into anchor error types * @param connection * @param payer * @param instructions * @param lookupTables */ export declare function sendTransactionV0(connection: Connection, payer: Keypair, instructions: TransactionInstruction[], lookupTables?: AddressLookupTableAccount[] | undefined, options?: SendOptions): Promise<string>; export declare function simulateTransactionV0(connection: Connection, payer: Keypair, instructions: TransactionInstruction[], lookupTables?: AddressLookupTableAccount[] | undefined): Promise<import("@solana/web3.js").RpcResponseAndContext<import("@solana/web3.js").SimulatedTransactionResponse>>; export declare const buildVersionedTransaction: (connection: Connection, payer: PublicKey, instructions: TransactionInstruction[], lookupTables?: PublicKey[]) => Promise<VersionedTransaction>; export declare function getLookupTableAccountsFromAddresses(connection: Connection, addresses: PublicKey[]): Promise<AddressLookupTableAccount[]>; export declare const buildVersionedTransactionSync: (payer: PublicKey, instructions: TransactionInstruction[], blockhash: Blockhash, lookupTables?: AddressLookupTableAccount[]) => VersionedTransaction; export declare const getLookupTableAccount: (connection: Connection, address: PublicKey) => Promise<AddressLookupTableAccount | null>; export declare function getLookupTableAccounts(connection: Connection, addresses: PublicKey[]): Promise<AddressLookupTableAccount[]>; export declare const getComputeBudgetAndPriorityFeeIxs: (units: number, priorityFeeLamports?: Decimal) => TransactionInstruction[]; export declare function notEmpty<TValue>(value: TValue | null | undefined): value is TValue; export declare function uniqueAccountsWithProgramIds(ixs: TransactionInstruction[], addressLookupTables?: PublicKey[] | AddressLookupTableAccount[]): Array<PublicKey>; export declare function removeBudgetIxs(ixs: TransactionInstruction[]): TransactionInstruction[]; //# sourceMappingURL=instruction.d.ts.map