Bech32

scalus.cardano.ledger.Bech32
object Bech32

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Bech32.type

Members list

Type members

Classlikes

final case class Bech32Decoded(hrp: String, data: Array[Byte])

Result of decoding a Bech32 string.

Result of decoding a Bech32 string.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Types

type Int5 = Byte

Value members

Concrete methods

final def createChecksum(hrp: String, data: Array[Int5]): Array[Int5]

Create the checksum bytes for Bech32 encoding

Create the checksum bytes for Bech32 encoding

Attributes

final def decode(bech32: String): Bech32Decoded

Decode a Bech32 string into its HRP and data (as bytes). Throws if invalid.

Decode a Bech32 string into its HRP and data (as bytes). Throws if invalid.

Attributes

final def decodeTo5Bit(bech32: String): (String, Array[Int5])

Decode a Bech32 string into HRP and 5-bit data. Throws if invalid.

Decode a Bech32 string into HRP and 5-bit data. Throws if invalid.

Attributes

final def encode(hrp: String, data: Array[Byte]): String

Encode an HRP and byte array into a Bech32 string. Throws if invalid.

Encode an HRP and byte array into a Bech32 string. Throws if invalid.

Attributes

final def encodeFrom5Bit(hrp: String, data: Array[Int5]): String

Encode an HRP and 5-bit data into a Bech32 string. Throws if invalid.

Encode an HRP and 5-bit data into a Bech32 string. Throws if invalid.

Attributes

final def from5Bit(input: Array[Int5]): Array[Byte]

Convert 5-bit values into 8-bit bytes. Throws if invalid padding.

Convert 5-bit values into 8-bit bytes. Throws if invalid padding.

Attributes

final def hrpExpand(s: String): Array[Int5]

Expand the human-readable prefix for checksum calculation

Expand the human-readable prefix for checksum calculation

Attributes

final def polymod(values: Array[Int5]): Int

Compute the Bech32 polymod checksum

Compute the Bech32 polymod checksum

Attributes

final def to5Bit(input: Array[Byte]): Array[Int5]

Convert 8-bit bytes into 5-bit values.

Convert 8-bit bytes into 5-bit values.

Attributes

final def verifyCheckSum(hrp: String, data: Array[Int5]): Boolean

Verify the checksum of a Bech32 string

Verify the checksum of a Bech32 string

Attributes

Concrete fields

final val SEP: '1'