object NumberUtil extends NumberUtil
- Alphabetic
- By Inheritance
- NumberUtil
- NumberUtil
- BitcoinSLogger
- 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 clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- 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 toto
baseConverts a sequence uint8
from
base toto
base- Definition Classes
- NumberUtil
- def convertBytes[T <: Number[T]](data: ByteVector, from: UInt32, to: UInt32, pad: Boolean, f: (Byte) => T): Try[Vector[T]]
- Definition Classes
- NumberUtil
- def convertUInt5sToUInt8(u5s: Vector[UInt5]): Vector[UInt8]
- Definition Classes
- NumberUtil
- def convertUInt8sToUInt5s(u8s: Vector[UInt8]): Vector[UInt5]
- Definition Classes
- NumberUtil
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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
- Definition Classes
- NumberUtil
- See also
- lazy val logger: Logger
- Definition Classes
- BitcoinSLogger
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def pow2(exponent: Int): BigInt
Takes 2^^num.
Takes 2^^num.
- Definition Classes
- NumberUtil
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def targetCompression(difficultyHelper: TargetDifficultyHelper): UInt32
- Definition Classes
- NumberUtil
- def targetCompression(bigInt: BigInt, isNegative: Boolean): UInt32
- Definition Classes
- NumberUtil
- 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
- Definition Classes
- NumberUtil
- See also
- 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.
- Definition Classes
- NumberUtil
- See also
developer reference for more information Meant to replicate this function in bitcoin core
- def toBigInt(bytes: ByteVector): BigInt
Converts a sequence of bytes to twos complement signed number.
Converts a sequence of bytes to twos complement signed number.
- Definition Classes
- NumberUtil
- def toBigInt(hex: String): BigInt
Takes a hex string and parses it to a BigInt.
Takes a hex string and parses it to a BigInt.
- Definition Classes
- NumberUtil
- def toInt(hex: String): Int
Converts a hex string to a Int.
Converts a hex string to a Int.
- Definition Classes
- NumberUtil
- def toInt(bytes: ByteVector): Int
Converts a sequence of Byte to a Int.
- Definition Classes
- NumberUtil
- def toLong(hex: String): Long
Converts a hex string to a Long.
Converts a hex string to a Long.
- Definition Classes
- NumberUtil
- def toLong(bytes: ByteVector): Long
Converts a sequence of Byte to a Long.
- Definition Classes
- NumberUtil
- def toString(): String
- Definition Classes
- AnyRef → Any
- def toUnsignedInt(bytes: Array[Byte]): BigInt
Converts a sequence of bytes to a **big endian** unsigned integer
Converts a sequence of bytes to a **big endian** unsigned integer
- Definition Classes
- NumberUtil
- def toUnsignedInt(bytes: ByteVector): BigInt
Converts a sequence of bytes to a **big endian** unsigned integer
Converts a sequence of bytes to a **big endian** unsigned integer
- Definition Classes
- NumberUtil
- 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()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])