Bech32

object Bech32

Bech32 and Bech32m address formats. See https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki and https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki.

Types

Link copied to clipboard
enum Encoding : Enum<Bech32.Encoding>

Functions

Link copied to clipboard
fun decode(bech32: String, noChecksum: Boolean = false): Triple<String, Array<Int5>, Bech32.Encoding>

decodes a bech32 string

Link copied to clipboard
fun decodeBytes(bech32: String, noChecksum: Boolean = false): Triple<String, ByteArray, Bech32.Encoding>

decodes a bech32 string

Link copied to clipboard
fun decodeWitnessAddress(address: String): Triple<String, Byte, ByteArray>

decode a bitcoin witness address

Link copied to clipboard
fun eight2five(input: ByteArray): Array<Int5>
Link copied to clipboard
fun encode(    hrp: String,     int5s: Array<Int5>,     encoding: Bech32.Encoding): String
Link copied to clipboard
fun encodeBytes(    hrp: String,     data: ByteArray,     encoding: Bech32.Encoding): String
Link copied to clipboard
fun encodeWitnessAddress(    hrp: String,     witnessVersion: Byte,     data: ByteArray): String

encode a bitcoin witness address

Link copied to clipboard
fun five2eight(input: Array<Int5>, offset: Int): ByteArray
Link copied to clipboard
fun hrp(chainHash: ByteVector32): String

Properties

Link copied to clipboard
const val alphabet: String