HermezCompressedAmount class

Class representing valid amounts in the Hermez network

Constructors

HermezCompressedAmount(num value)
Builds an instance of HermezCompressedAmount, a wrapper for compressed BigInts in 40 bits used within the Hermez network @param {num} value - Compressed representation of a BigInt in a 40bit Number

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String?
getter/setter pair
value num
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

compressAmount(double f) HermezCompressedAmount
Convert a fix to a float @param {String} _f - Scalar encoded in fix @returns {HermezCompressedAmount} HermezCompressedAmount representation of the amount
decompressAmount(HermezCompressedAmount hermezCompressedAmount) double
Convert a HermezCompressedAmount to a fix @param {Scalar} fl - HermezCompressedAmount representation of the amount @returns {Scalar} Scalar encoded in fix
isHermezCompressedAmount(HermezCompressedAmount instance) bool
@param {HermezCompressedAmount} instance