Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Wallet

Hierarchy

  • Wallet

Implements

  • WalletI

Index

Constructors

constructor

  • new Wallet(conn: Connection, signer: WalletI): Wallet

Properties

conn

conn: Connection

publicKey

publicKey: PublicKey

signer

signer: WalletI

Methods

createAssociatedTokenAccount

  • createAssociatedTokenAccount(mintKey: PublicKey): Promise<PublicKey>

existsAssociatedTokenAccount

  • existsAssociatedTokenAccount(mintKey: PublicKey): Promise<boolean>

getAssociatedTokenAccount

  • getAssociatedTokenAccount(mintKey: PublicKey): Promise<PublicKey>

getBalance

  • getBalance(mintKey: PublicKey): Promise<number>

getSolBalance

  • getSolBalance(): Promise<number>

signAllTransactions

  • signAllTransactions(txs: Transaction[]): Promise<Transaction[]>
  • Parameters

    • txs: Transaction[]

    Returns Promise<Transaction[]>

signTransaction

  • signTransaction(tx: Transaction): Promise<Transaction>
  • Parameters

    • tx: Transaction

    Returns Promise<Transaction>

transferSol

  • transferSol(to: PublicKey, amount: number): Promise<string>

transferToken

  • transferToken(mintKey: PublicKey, to: PublicKey, amount: number): Promise<string>
  • Parameters

    • mintKey: PublicKey
    • to: PublicKey
    • amount: number

    Returns Promise<string>

Static fromKeypair

  • fromKeypair(conn: Connection, keypair: Keypair): Wallet

Static fromSecretKey

  • fromSecretKey(conn: Connection, key: Uint8Array): Wallet

Static fromWallet

  • fromWallet(conn: Connection, signer: WalletI): Wallet

Generated using TypeDoc