Options
All
  • Public
  • Public/Protected
  • All
Menu

The network and wallet context used to send transactions paid for and signed by the provider.

Hierarchy

  • AnchorProvider

Implements

  • default

Index

Constructors

  • Parameters

    • connection: Connection

      The cluster connection where the program is deployed.

    • wallet: Wallet

      The wallet used to pay for and sign all transactions.

    • opts: ConfirmOptions

      Transaction confirmation options to use by default.

    Returns AnchorProvider

Properties

connection: Connection
publicKey: PublicKey
wallet: Wallet

Methods

  • Similar to send, but for an array of transactions and signers.

    Parameters

    • txWithSigners: { signers?: Signer[]; tx: Transaction }[]

      Array of transactions and signers.

    • Optional opts: ConfirmOptions

      Transaction confirmation options.

    Returns Promise<string[]>

  • Sends the given transaction, paid for and signed by the provider's wallet.

    Parameters

    • tx: Transaction

      The transaction to send.

    • Optional signers: Signer[]

      The signers of the transaction.

    • Optional opts: ConfirmOptions

      Transaction confirmation options.

    Returns Promise<string>

  • Simulates the given transaction, returning emitted logs from execution.

    Parameters

    Returns Promise<SuccessfulTxSimulationResponse>

  • Returns ConfirmOptions

  • Returns a Provider read from the ANCHOR_PROVIDER_URL environment variable

    (This api is for Node only.)

    Returns AnchorProvider

  • Returns a Provider with a wallet read from the local filesystem.

    Parameters

    • Optional url: string

      The network cluster url.

    • Optional opts: ConfirmOptions

      The default transaction confirmation options.

      (This api is for Node only.)

    Returns AnchorProvider

Generated using TypeDoc