Skip to main content

fetchTransaction

Callable

  • fetchTransaction(connection: Connection, account: PublicKey, link: string | URL, options?: { commitment?: Commitment }): Promise<Transaction>

  • Fetch a transaction from a Solana Pay transaction request link.

    @throws

    {FetchTransactionError}


    Parameters

    • connection: Connection

      A connection to the cluster.

    • account: PublicKey

      Account that may sign the transaction.

    • link: string | URL

      link in the Solana Pay spec.

    • options: { commitment?: Commitment } = {}

      Options for getRecentBlockhash.

    Returns Promise<Transaction>