View Source Bitcoinex.Segwit (bitcoinex v0.1.8)
SegWit address serialization.
Link to this section Summary
Functions
Decodes an address and returns its network, witness version, and witness program.
Encodes an address string.
Simpler Interface to check if address is valid
Link to this section Types
Link to this section Functions
@spec decode_address(String.t()) :: {:ok, {network(), witness_version(), witness_program()}} | {:error, error()}
Decodes an address and returns its network, witness version, and witness program.
@spec encode_address(network(), witness_version(), witness_program()) :: {:ok, String.t()} | {:error, error()}
Encodes an address string.
@spec get_segwit_script_pubkey(witness_version(), witness_program()) :: String.t()
Simpler Interface to check if address is valid