Packages

abstract class LnUtil extends AnyRef

Useful utility functions for the Lightning encoding / decoding

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LnUtil
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new LnUtil()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. def createDataLength(u5s: List[UInt5]): List[UInt5]

    Creates the appropriate 10 bit vector for the data length of an element

  7. def createDataLength(bech32String: String): List[UInt5]

    The formula for this calculation is as follows: Take the length of the Bech32 encoded input and divide it by 32.

    The formula for this calculation is as follows: Take the length of the Bech32 encoded input and divide it by 32. Take the quotient, and encode this value as Bech32. Take the remainder and encode this value as Bech32. Append these values to produce a valid Lighting Network data_length field. Please see Bolt11 for examples.

  8. def decodeDataLength(u5s: List[UInt5]): Long
  9. final def decodeNumber(list: List[UInt5], accum: BigInt = 0): BigInt

    Decodes a number from Bech32 to a long

    Decodes a number from Bech32 to a long

    Annotations
    @tailrec()
  10. final def encodeNumber(len: BigInt, accum: List[UInt5] = List.empty): List[UInt5]

    Returns a 5 bit bytevector with the encoded number for a LN invoice

    Returns a 5 bit bytevector with the encoded number for a LN invoice

    Annotations
    @tailrec()
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped