• Returns the output script that pays to an address.

    Parameters

    • address: string

      A base58check or bech32/bech32m address.

    • Optional network: Network

      The network the address must belong to. Defaults to Bitcoin.

    Returns Buffer

    The output script.

    Throws

    If the address is invalid or belongs to another network.