Skip to main content
Version: 8.6.0

Class: CairoUint256

Constructors​

constructor​

• new CairoUint256(data): CairoUint256

Default constructor (Lib usage)

Parameters​

NameType
dataunknown

Returns​

CairoUint256

Defined in​

src/utils/cairoDataTypes/uint256.ts:31

• new CairoUint256(low, high): CairoUint256

Direct props initialization (Api response)

Parameters​

NameType
lowBigNumberish
highBigNumberish

Returns​

CairoUint256

Defined in​

src/utils/cairoDataTypes/uint256.ts:35

Properties​

abiSelector​

▪ Static abiSelector: "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​

▸ validate(bigNumberish): bigint

Validate if BigNumberish can be represented as Unit256

Parameters​

NameType
bigNumberishunknown

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​

NameType
lowBigNumberish
highBigNumberish

Returns​

Object

NameType
lowbigint
highbigint

Defined in​

src/utils/cairoDataTypes/uint256.ts:77


is​

▸ is(bigNumberish): boolean

Check if BigNumberish can be represented as Unit256

Parameters​

NameType
bigNumberishunknown

Returns​

boolean

Defined in​

src/utils/cairoDataTypes/uint256.ts:94


isAbiType​

▸ isAbiType(abiType): boolean

Check if provided abi type is this data type

Parameters​

NameType
abiTypestring

Returns​

boolean

Defined in​

src/utils/cairoDataTypes/uint256.ts:106


factoryFromApiResponse​

▸ factoryFromApiResponse(responseIterator): CairoUint256

Parameters​

NameType
responseIteratorIterator<string, any, undefined>

Returns​

CairoUint256

Defined in​

src/utils/cairoDataTypes/uint256.ts:110


toBigInt​

▸ toBigInt(): bigint

Return bigint representation

Returns​

bigint

Defined in​

src/utils/cairoDataTypes/uint256.ts:119


toUint256HexString​

▸ toUint256HexString(): Object

Return Uint256 structure with HexString props {low: HexString, high: HexString}

Returns​

Object

NameType
lowstring
highstring

Defined in​

src/utils/cairoDataTypes/uint256.ts:127


toUint256DecimalString​

▸ toUint256DecimalString(): Object

Return Uint256 structure with DecimalString props {low: DecString, high: DecString}

Returns​

Object

NameType
lowstring
highstring

Defined in​

src/utils/cairoDataTypes/uint256.ts:138


toApiRequest​

▸ toApiRequest(): string[]

Return api requests representation witch is felt array

Returns​

string[]

Defined in​

src/utils/cairoDataTypes/uint256.ts:148