BitcoinAddress

open fun BitcoinAddress(string: String)

Initializes an address from a Base58 sring. Must be deleted with TWBitcoinAddressDelete after use.

Return

TWBitcoinAddress pointer or nullptr if string is invalid.

Parameters

string

Base58 string to initialize the address from.


open fun BitcoinAddress(data: Array<Byte>)

Initializes an address from raw data.

Return

TWBitcoinAddress pointer or nullptr if data is invalid.

Parameters

data

Raw data to initialize the address from. Must be deleted with TWBitcoinAddressDelete after use.


open fun BitcoinAddress(publicKey: PublicKey, prefix: Byte)

Initializes an address from a public key and a prefix byte.

Return

TWBitcoinAddress pointer or nullptr if public key is invalid.

Parameters

publicKey

Public key to initialize the address from.

prefix

Prefix byte (p2pkh, p2sh, etc).