sealed abstract class Bech32 extends AnyRef
A abstract class representing basic utility functions of Bech32 For more information on Bech32 please see BIP173 https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki
- Alphabetic
- By Inheritance
- Bech32
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def checkDataValidity(data: String): Try[Vector[UInt5]]
Takes in the data portion of a bech32 address and decodes it to a byte array It also checks the validity of the data portion according to BIP173
- def checkHrpValidity[T <: Bech32HumanReadablePart](hrp: String, factory: StringFactory[T]): Try[T]
Checks the validity of the HRP against bech32 and the given StringFactory
- def checkHrpValidity(hrp: String): Try[String]
Checks if the possible human readable part follows BIP173 rules
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def createChecksum(u5s: Vector[UInt5], encoding: Bech32Encoding): Vector[UInt5]
Creates a checksum for the given byte vector according to BIP173
- def decodeStringToU5s(str: String): Vector[UInt5]
Assumes we are given a valid bech32 string
- def encode5bitToString(b: Vector[UInt5]): String
Takes a bech32 5bit array and encodes it to a string
- def encode8bitToString(bytes: Vector[UInt8]): String
Converts a byte vector to 5bit vector and then serializes to bech32
- def encode8bitToString(bytes: ByteVector): String
Converts a byte vector to 5bit vector and then serializes to bech32
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def from5bitTo8bit(b: Vector[UInt5], pad: Boolean = false): Vector[UInt8]
Decodes a byte array from 5bits to base 8bits
- def from8bitTo5bit(u8s: Vector[UInt8]): Vector[UInt5]
Converts a byte array from 8bits to base 5 bits
- def from8bitTo5bit(bytes: ByteVector): Vector[UInt5]
Converts a byte vector from 8bits to 5bits
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hrpExpand(string: String): Vector[UInt5]
Expands the human readable part of a bech32 address as per BIP173
- def isInHrpRange(char: Char): Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def polyMod(bytes: Vector[UInt5]): Long
- def splitToHrpAndData[T <: Bech32HumanReadablePart](bech32: String, encoding: Bech32Encoding, factory: StringFactory[T]): Try[(T, Vector[UInt5])]
- def splitToHrpAndData(bech32: String, encoding: Bech32Encoding): Try[(String, Vector[UInt5])]
Validate a Bech32 string, and determine HRP and data.
Validate a Bech32 string, and determine HRP and data. Fails if HRP is not LN or BTC compatible.
- See also
Mimics this function by Sipa
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def verifyChecksum(hrp: Seq[UInt5], u5s: Seq[UInt5], encoding: Bech32Encoding): Boolean
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()