Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

  • Provider

Index

Constructors

constructor

  • 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 Provider

Properties

Readonly connection

connection: Connection

Readonly opts

Readonly wallet

wallet: Wallet

Methods

send

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

    Parameters

    • tx: Transaction

      The transaction to send.

    • Optional signers: (undefined | Signer)[]

      The set of signers in addition to the provider wallet that will sign the transaction.

    • Optional opts: ConfirmOptions

      Transaction confirmation options.

    Returns Promise<string>

sendAll

  • sendAll(reqs: SendTxRequest[], opts?: ConfirmOptions): Promise<string[]>
  • Similar to send, but for an array of transactions and signers.

    Parameters

    Returns Promise<string[]>

simulate

Static defaultOptions

Static env

  • Returns a Provider read from the ANCHOR_PROVIDER_URL environment variable

    (This api is for Node only.)

    Returns Provider

Static local

  • 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 Provider

Generated using TypeDoc