Function toOutputScript

  • Converts a Bitcoin address to its corresponding output script.

    Parameters

    • address: string

      The Bitcoin address to convert.

    • Optionalnetwork: Network

      The Bitcoin network to use. Defaults to the Bitcoin network.

    Returns Uint8Array

    The corresponding output script as a Buffer.

    If the address has an invalid prefix or no matching script.