Class: CairoUint256
Constructors​
constructor​
• new CairoUint256(bigNumberish
): CairoUint256
Default constructor (Lib usage)
Parameters​
Name | Type | Description |
---|---|---|
bigNumberish | BigNumberish | BigNumberish value representing uin256 |
Returns​
Defined in​
src/utils/cairoDataTypes/uint256.ts:29
• new CairoUint256(low
, high
): CairoUint256
Direct props initialization (Api response)
Parameters​
Name | Type |
---|---|
low | BigNumberish |
high | BigNumberish |
Returns​
Defined in​
src/utils/cairoDataTypes/uint256.ts:33
• new CairoUint256(uint256
): CairoUint256
Initialization from Uint256 object
Parameters​
Name | Type |
---|---|
uint256 | Uint256 |
Returns​
Defined in​
src/utils/cairoDataTypes/uint256.ts:37
Properties​
abiSelector​
â–ª Static
abiSelector: string
= 'core::integer::u256'
Defined in​
src/utils/cairoDataTypes/uint256.ts:23
low​
• low: bigint
Defined in​
src/utils/cairoDataTypes/uint256.ts:19
high​
• high: bigint
Defined in​
src/utils/cairoDataTypes/uint256.ts:21
Methods​
validate​
â–¸ validate(bigNumberish
): bigint
Validate if BigNumberish can be represented as Unit256
Parameters​
Name | Type |
---|---|
bigNumberish | BigNumberish |
Returns​
bigint
Defined in​
src/utils/cairoDataTypes/uint256.ts:60
validateProps​
â–¸ validateProps(low
, high
): Object
Validate if low and high can be represented as Unit256
Parameters​
Name | Type |
---|---|
low | BigNumberish |
high | BigNumberish |
Returns​
Object
Name | Type |
---|---|
low | bigint |
high | bigint |
Defined in​
src/utils/cairoDataTypes/uint256.ts:70
is​
â–¸ is(bigNumberish
): boolean
Check if BigNumberish can be represented as Unit256
Parameters​
Name | Type |
---|---|
bigNumberish | BigNumberish |
Returns​
boolean
Defined in​
src/utils/cairoDataTypes/uint256.ts:85
isAbiType​
â–¸ isAbiType(abiType
): boolean
Check if provided abi type is this data type
Parameters​
Name | Type |
---|---|
abiType | string |
Returns​
boolean
Defined in​
src/utils/cairoDataTypes/uint256.ts:97
toBigInt​
â–¸ toBigInt(): bigint
Return bigint representation
Returns​
bigint
Defined in​
src/utils/cairoDataTypes/uint256.ts:104
toUint256HexString​
â–¸ toUint256HexString(): Object
Return Uint256 structure with HexString props {low: HexString, high: HexString}
Returns​
Object
Name | Type |
---|---|
low | string |
high | string |
Defined in​
src/utils/cairoDataTypes/uint256.ts:112
toUint256DecimalString​
â–¸ toUint256DecimalString(): Object
Return Uint256 structure with DecimalString props {low: DecString, high: DecString}
Returns​
Object
Name | Type |
---|---|
low | string |
high | string |
Defined in​
src/utils/cairoDataTypes/uint256.ts:123
toApiRequest​
â–¸ toApiRequest(): string
[]
Return api requests representation witch is felt array
Returns​
string
[]