Optional
base: number | "hex"Optional
endian: EndiannessOptional
endian: EndiannessStatic
BNStatic
wordcompare numbers and return -1 (a < b)
, 0 (a == b)
, or 1 (a > b)
depending on the comparison result
a equals b
Protected
froma greater than b
a greater than or equals b
shift right (unimplemented https://github.com/indutny/bn.js/blob/master/lib/bn.js#L2086)
a less than b
a less than or equals b
Optional
endian: EndiannessOptional
length: numberconvert to an instance of type
, which must behave like an Array
Optional
endian: EndiannessOptional
length: numbercompare numbers and return -1 (a < b)
, 0 (a == b)
, or 1 (a > b)
depending on the comparison result
Static
fromStatic
isBNStatic
maxStatic
minStatic
montcreate a reduction context with the Montgomery trick.
Static
parseConvert human readable gas amount to internal indivisible units.
decimal string denominated in gas, Tgas, Ggas, etc.
new Gas object wrapping the parsed amount
Gas.parse('1') // => Gas<'1'> (1 gas)
Gas.parse('1 Tgas') // => Gas<'1000000000000'> (1e12 gas)
Gas.parse('1 Ggas') // => Gas<'1000000000'> (1e9 gas)
Static
redcreate a reduction context
Generated using TypeDoc
Description
absolute value