Avalanche SDK Client
    Preparing search index...

    Function getUnsignedTxFromBytes

    • Get an unsigned 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 UnsignedTx

      An unsigned transaction UnsignedTx

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

      const unsignedTx = getUnsignedTxFromBytes("0x1234567890abcdef", "P");