Class: CairoUint256
Defined in: src/utils/cairoDataTypes/uint256.ts:21
Constructors
Constructor
new CairoUint256(
data):CairoUint256
Defined in: src/utils/cairoDataTypes/uint256.ts:31
Default constructor (Lib usage)
Parameters
data
unknown
Returns
CairoUint256
Constructor
new CairoUint256(
low,high):CairoUint256
Defined in: src/utils/cairoDataTypes/uint256.ts:35
Direct props initialization (Api response)
Parameters
low
high
Returns
CairoUint256
Properties
abiSelector
staticabiSelector:"core::integer::u256"
Defined in: src/utils/cairoDataTypes/uint256.ts:26
low
low:
bigint
Defined in: src/utils/cairoDataTypes/uint256.ts:22
high
high:
bigint
Defined in: src/utils/cairoDataTypes/uint256.ts:24
Methods
validate()
staticvalidate(bigNumberish):bigint
Defined in: src/utils/cairoDataTypes/uint256.ts:60
Validate if BigNumberish can be represented as Unit256
Parameters
bigNumberish
unknown
Returns
bigint
validateProps()
staticvalidateProps(low,high):object
Defined in: src/utils/cairoDataTypes/uint256.ts:77
Validate if low and high can be represented as Unit256
Parameters
low
high
Returns
object
low
low:
bigint=bigIntLow
high
high:
bigint=bigIntHigh
is()
staticis(bigNumberish):boolean
Defined in: src/utils/cairoDataTypes/uint256.ts:94
Check if BigNumberish can be represented as Unit256
Parameters
bigNumberish
unknown
Returns
boolean
isAbiType()
staticisAbiType(abiType):abiType is "core::integer::u256"
Defined in: src/utils/cairoDataTypes/uint256.ts:106
Check if provided abi type is this data type
Parameters
abiType
string
Returns
abiType is "core::integer::u256"
factoryFromApiResponse()
staticfactoryFromApiResponse(responseIterator):CairoUint256
Defined in: src/utils/cairoDataTypes/uint256.ts:110
Parameters
responseIterator
Iterator<string>
Returns
CairoUint256
toBigInt()
toBigInt():
bigint
Defined in: src/utils/cairoDataTypes/uint256.ts:119
Return bigint representation
Returns
bigint
toUint256HexString()
toUint256HexString():
object
Defined in: src/utils/cairoDataTypes/uint256.ts:127
Return Uint256 structure with HexString props {low: HexString, high: HexString}
Returns
object
low
low:
string
high
high:
string
toUint256DecimalString()
toUint256DecimalString():
object
Defined in: src/utils/cairoDataTypes/uint256.ts:138
Return Uint256 structure with DecimalString props {low: DecString, high: DecString}
Returns
object
low
low:
string
high
high:
string
toApiRequest()
toApiRequest():
string[]
Defined in: src/utils/cairoDataTypes/uint256.ts:148
Return api requests representation witch is felt array
Returns
string[]