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.
- Source:
- Bech32.scala
Type members
Classlikes
Types
Value members
Concrete methods
decodes a bech32 or bech32m string
decodes a bech32 or bech32m string
- Value parameters:
- bech32
bech32 or bech32m string
- Returns:
a (encoding, hrp, data) tuple
- Source:
- Bech32.scala
decode a bitcoin witness address
decode a bitcoin witness address
- Value parameters:
- address
witness address
- Returns:
a (prefix, version, program) tuple where prefix is the human-readable prefix, version is the witness version and program the decoded witness program. If version is 0, it will be either 20 bytes (P2WPKH) or 32 bytes (P2WSH).
- Source:
- Bech32.scala
- Value parameters:
- input
a sequence of 8 bits integers
- Returns:
a sequence of 5 bits integers
- Source:
- Bech32.scala
- Value parameters:
- hrp
human readable prefix
- int5s
5-bit data
- Returns:
hrp + data encoded as a Bech32 string
- Source:
- Bech32.scala
encode a bitcoin witness address
encode a bitcoin witness address
- Value parameters:
- data
witness program: if version is 0, either 20 bytes (P2WPKH) or 32 bytes (P2WSH)
- hrp
should be "bc" or "tb"
- witnessVersion
witness version (0 to 16)
- Returns:
a bech32 encoded witness address
- Source:
- Bech32.scala
- Value parameters:
- input
a sequence of 5 bits integers
- Returns:
a sequence of 8 bits integers
- Source:
- Bech32.scala