Skip to main content
Version: 10.8.0

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​

BigNumberish

high​

BigNumberish

Returns​

CairoUint256

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()​

static validate(bigNumberish): bigint

Defined in: src/utils/cairoDataTypes/uint256.ts:60

Validate if BigNumberish can be represented as Unit256

Parameters​

bigNumberish​

unknown

Returns​

bigint


validateProps()​

static validateProps(low, high): object

Defined in: src/utils/cairoDataTypes/uint256.ts:77

Validate if low and high can be represented as Unit256

Parameters​

low​

BigNumberish

high​

BigNumberish

Returns​

object

low​

low: bigint = bigIntLow

high​

high: bigint = bigIntHigh


is()​

static is(bigNumberish): boolean

Defined in: src/utils/cairoDataTypes/uint256.ts:94

Check if BigNumberish can be represented as Unit256

Parameters​

bigNumberish​

unknown

Returns​

boolean


isAbiType()​

static isAbiType(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()​

static factoryFromApiResponse(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[]