UNPKG

@frakters/nft-lending-v2

Version:

Client library for interacting with nft lenging solana program

13 lines (12 loc) 1.38 kB
import { Connection, PublicKey, Keypair, TransactionInstruction } from '@solana/web3.js'; import { CommunityPoolsAnchor } from './../contract_model/types/community_pools_anchor'; import { Program, Provider } from '@project-serum/anchor'; import { NodeWallet } from '@metaplex/js'; export declare function createFakeWallet(): NodeWallet; export declare function findAssociatedTokenAddress(walletAddress: PublicKey, tokenMintAddress: PublicKey): Promise<PublicKey>; export declare function returnCommunityPoolsAnchorProgram(programId: PublicKey, provider: Provider): Promise<Program<CommunityPoolsAnchor>>; export declare const getTokenBalance: (pubkey: PublicKey, connection: Connection) => Promise<number>; export declare function createUninitializedAccount(instructions: TransactionInstruction[], payer: PublicKey, amount: number, signers: Keypair[]): PublicKey; export declare function createTokenAccount(instructions: TransactionInstruction[], payer: PublicKey, accountRentExempt: number, mint: PublicKey, owner: PublicKey, signers: Keypair[]): PublicKey; export declare function createAssociatedTokenAccountInstruction(instructions: TransactionInstruction[], associatedTokenAddress: PublicKey, payer: PublicKey, walletAddress: PublicKey, splTokenMintAddress: PublicKey): void; export declare function deriveMetadataPubkeyFromMint(nftMint: PublicKey): Promise<PublicKey>;