Constructors

Methods

  • Initializes a keypair from a file.

    Parameters

    • filePath: string

      The path to the file containing the keypair's secret key.

    Returns Promise<Keypair>

    A promise that resolves to the keypair.

  • Initializes a wallet from a file.

    Parameters

    • filePath: string

      The path to the file containing the wallet's secret key.

    Returns Promise<[Wallet, Keypair]>

    A promise that resolves to a tuple containing the wallet and the keypair.

  • Loads the same environment set for the Solana CLI.

    Returns Promise<SolanaConfig>

    A promise that resolves to the Solana configuration.

  • Loads an Anchor program from the environment.

    Returns Promise<Program<Idl>>

    A promise that resolves to the loaded Anchor program.

  • Parse out anchor events from the logs present in the program IDL.

    Parameters

    • program: Program<Idl>

      The Anchor program instance.

    • logs: string[]

      The array of logs to parse.

    Returns any[]

    An array of parsed events.

Generated using TypeDoc