View Source BitcoinLib.Address.P2WSH (BitcoinLib v0.4.7)
Implementation of P2WSH addresses
see https://bitcoincore.org/en/segwit_wallet_dev/#native-pay-to-witness-script-hash-p2wsh
Link to this section Summary
Link to this section Functions
@spec from_script_hash(<<_::256>>, :mainnet | :testnet) :: binary()
Creates a P2WSH address out of a key hash
examples
Examples
iex> <<0x6ff04018aff3bd320c89e2e8c9d4274e6b0e780975cd364810239ecc7bd8138a::256>>
...> |> BitcoinLib.Address.P2WSH.from_script_hash()
"bc1qdlcyqx907w7nyryfut5vn4p8fe4su7qfwhxnvjqsyw0vc77czw9q6d8zkl"
@spec from_script_pub_key(<<_::272>>, :mainnet | :testnet) :: binary()
Creates a P2WSH address out of a script pub key
examples
Examples
iex> <<0x00206ff04018aff3bd320c89e2e8c9d4274e6b0e780975cd364810239ecc7bd8138a::272>>
...> |> BitcoinLib.Address.P2WSH.from_script_pub_key()
"bc1qdlcyqx907w7nyryfut5vn4p8fe4su7qfwhxnvjqsyw0vc77czw9q6d8zkl"