@frakt-protocol/frakt-sdk
Version:
Frakt SDK for interacting with frakt.xyz protocols
14 lines (13 loc) • 1.13 kB
TypeScript
import { Connection, PublicKey, TransactionInstruction } from '@solana/web3.js';
import * as anchor from '@project-serum/anchor';
import { NodeWallet } from '@metaplex/js';
import { NftLendingV2 } from './idl/types/nft_lending_v2';
export declare const TOKEN_PROGRAM_ID: PublicKey;
export declare const SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID: PublicKey;
export declare function findAssociatedTokenAddress(walletAddress: PublicKey, tokenMintAddress: PublicKey): Promise<PublicKey>;
export declare function returnAnchorProgram(programId: PublicKey, provider: anchor.Provider): anchor.Program<NftLendingV2>;
export declare const getTokenBalance: (pubkey: PublicKey, connection: Connection) => Promise<number>;
export declare function establishConnection(): Promise<Connection>;
export declare function createFakeWallet(): NodeWallet;
export declare function createAssociatedTokenAccountInstruction(instructions: TransactionInstruction[], associatedTokenAddress: PublicKey, payer: PublicKey, walletAddress: PublicKey, splTokenMintAddress: PublicKey): void;
export declare const toPublicKey: (key: string | PublicKey) => PublicKey;