SegwitAddress

Represents a BIP 0173 address.

Constructors

Link copied to clipboard
open fun SegwitAddress(string: String)
Creates an address from a string representation.
Link copied to clipboard
open fun SegwitAddress(hrp: HRP, publicKey: PublicKey)
Creates a segwit-version-0 address from a public key and HRP prefix.

Functions

Link copied to clipboard
open fun description(): String
Returns the address string representation.
Link copied to clipboard
Compares two addresses for equality.
Link copied to clipboard
open fun hrp(): HRP
Returns the human-readable part.
Link copied to clipboard
open fun isValidString(string: String): Boolean
Determines if the string is a valid Bech32 address.
Link copied to clipboard
Returns the witness program
Link copied to clipboard
open fun witnessVersion(): Int
Returns the human-readable part.