SegwitAddress

open fun SegwitAddress(string: String)

Creates an address from a string representation.

Return

Pointer to a Bech32 address if the string is a valid Bech32 address, null pointer otherwise

Parameters

string

Non-null pointer to a Bech32 address as a string


open fun SegwitAddress(hrp: HRP, publicKey: PublicKey)

Creates a segwit-version-0 address from a public key and HRP prefix. Taproot (v>=1) is not supported by this method.

Return

Non-null pointer to the corresponding Segwit address

Parameters

hrp

HRP of the utxo coin targeted

publicKey

Non-null pointer to the public key of the targeted coin