# new XdrLargeInt(type, values)
Parameters:
Name | Type | Description |
---|---|---|
type |
string
|
force a specific data type. the type choices are:
'i64', 'u64', 'i128', 'u128', 'i256', and 'u256' (default: the smallest
one that fits the |
values |
number
|
bigint
|
string
|
Array.<(number|bigint|string)>
|
a list of integer-like values interpreted in big-endian order |
Classes
Members
Methods
# toI128() → {xdr.ScVal}
if the value cannot fit in 128 bits
RangeError
the integer encoded with ScValType = I128
xdr.ScVal
# toI256() → {xdr.ScVal}
the integer encoded with ScValType = I256
xdr.ScVal
# toI64() → {xdr.ScVal}
the integer encoded with ScValType = I64
xdr.ScVal
# toScVal() → {xdr.ScVal}
the smallest interpretation of the stored value
xdr.ScVal
# toU128() → {xdr.ScVal}
if the value cannot fit in 128 bits
RangeError
the integer encoded with ScValType = U128
xdr.ScVal
# toU256() → {xdr.ScVal}
the integer encoded with ScValType = U256
xdr.ScVal
# toU64() → {xdr.ScVal}
the integer encoded with ScValType = U64
xdr.ScVal
# static getType(scvType) → {string}
Convert the raw ScValType
string (e.g. 'scvI128', generated by the XDR)
to a type description for XdrLargeInt construction (e.g. 'i128')
Parameters:
Name | Type | Description |
---|---|---|
scvType |
string
|
the |
a suitable equivalent type to construct this object
string