sealed abstract class NumberUtil extends BitcoinSLogger

Created by chris on 2/8/16.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NumberUtil
  2. BitcoinSLogger
  3. Logging
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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() @HotSpotIntrinsicCandidate()
  6. def convert[To <: Number[To]](data: Vector[UInt8], from: UInt32, to: UInt32, pad: Boolean, f: (UInt8) => To): Try[Vector[To]]

    Converts a sequence uint8 from base to to base

  7. def convertBytes[T <: Number[T]](data: ByteVector, from: UInt32, to: UInt32, pad: Boolean, f: (Byte) => T): Try[Vector[T]]
  8. def convertUInt5sToUInt8(u5s: Vector[UInt5], pad: Boolean = false): Vector[UInt8]
  9. def convertUInt8sToUInt5s(u8s: Vector[UInt8]): Vector[UInt5]
  10. def debug(mkr: Marker, msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  11. def debug(msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  12. def debug(msg: => Any): Unit
    Attributes
    protected
    Definition Classes
    Logging
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  15. def error(mkr: Marker, msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  16. def error(msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  17. def error(msg: => Any): Unit
    Attributes
    protected
    Definition Classes
    Logging
  18. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. def info(mkr: Marker, msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  21. def info(msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  22. def info(msg: => Any): Unit
    Attributes
    protected
    Definition Classes
    Logging
  23. def isDebugEnabled: Boolean
    Attributes
    protected
    Definition Classes
    Logging
  24. def isErrorEnabled: Boolean
    Attributes
    protected
    Definition Classes
    Logging
  25. def isInfoEnabled: Boolean
    Attributes
    protected
    Definition Classes
    Logging
  26. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  27. def isNBitsOverflow(nBits: UInt32): Boolean

    Implements this check for overflowing for org.bitcoins.core.protocol.blockchain.BlockHeader.nBits

    Implements this check for overflowing for org.bitcoins.core.protocol.blockchain.BlockHeader.nBits

    See also

    bitcoin core check

  28. def isTraceEnabled: Boolean
    Attributes
    protected
    Definition Classes
    Logging
  29. def isWarnEnabled: Boolean
    Attributes
    protected
    Definition Classes
    Logging
  30. def logger: Logger
    Attributes
    protected
    Definition Classes
    Logging
  31. def loggerName: String
    Attributes
    protected
    Definition Classes
    Logging
  32. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  33. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  34. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  35. def posInt: Int

    Generates a random positive integer

  36. def pow2(exponent: Int): BigInt

    Takes 2^^num.

  37. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  38. def targetCompression(difficultyHelper: TargetDifficultyHelper): UInt32
  39. def targetCompression(bigInt: BigInt, isNegative: Boolean): UInt32
  40. def targetCompression(bigInteger: BigInteger, isNegative: Boolean): UInt32

    Compressed the big integer to be used inside of org.bitcoins.core.protocol.blockchain.BlockHeader.nBits

    Compressed the big integer to be used inside of org.bitcoins.core.protocol.blockchain.BlockHeader.nBits

    See also

    bitcoin core implementation

  41. def targetExpansion(nBits: UInt32): TargetDifficultyHelper

    Expands the nBits field given in a block header to the _actual_ target difficulty.

    Expands the nBits field given in a block header to the _actual_ target difficulty.

    See also

    developer reference for more information Meant to replicate this function in bitcoin core

    https://github.com/bitcoin/bitcoin/blob/2068f089c8b7b90eb4557d3f67ea0f0ed2059a23/src/arith_uint256.cpp#L206

  42. def toBigInt(bytes: ByteVector): BigInt

    Converts a sequence of bytes to twos complement signed number.

  43. def toBigInt(hex: String): BigInt

    Takes a hex string and parses it to a BigInt.

  44. def toInt(hex: String): Int

    Converts a hex string to a Int.

  45. def toInt(bytes: ByteVector): Int

    Converts a sequence of Byte to a Int.

  46. def toLong(hex: String): Long

    Converts a hex string to a Long.

  47. def toLong(bytes: ByteVector): Long

    Converts a sequence of Byte to a Long.

  48. def toString(): String
    Definition Classes
    AnyRef → Any
  49. def toUnsignedInt(bytes: Array[Byte]): BigInt

    Converts a sequence of bytes to a **big endian** unsigned integer

  50. def toUnsignedInt(bytes: ByteVector): BigInt

    Converts a sequence of bytes to a **big endian** unsigned integer

  51. def trace(mkr: Marker, msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  52. def trace(msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  53. def trace(msg: => Any): Unit
    Attributes
    protected
    Definition Classes
    Logging
  54. def uintToFieldElement(bytes: ByteVector): FieldElement
  55. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  56. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  57. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  58. def warn(mkr: Marker, msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  59. def warn(msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  60. def warn(msg: => Any): Unit
    Attributes
    protected
    Definition Classes
    Logging

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from BitcoinSLogger

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped