Avalanche SDK Client
    Preparing search index...

    Function getTxFromBytes

    • Get a transaction from a buffer or hex string

      Parameters

      • txBytes: string

        The buffer or hex string to get the transaction from string or Uint8Array

      • chainAlias: "X" | "P" | "C"

        The chain alias to get the transaction from "P" | "X" | "C"

      Returns [Transaction, Credential[]]

      A array with the transaction Common.Transaction and credentials []

      import { getTxFromBytes } from "@avalanche-sdk/client/utils";

      const [tx, credentials] = getTxFromBytes("0x1234567890abcdef", "P");