Function intToBytes

  • Converts an integer-compatible value to a Uint8Array (given a byte length)

    Parameters

    Returns Uint8Array

    Example

    import { intToBytes } from "@stacks/common";
    console.log(intToBytes(560, 4));
    // Uint8Array(4) [ 0, 0, 2, 48 ]

Generated using TypeDoc