Skip to main content
Version: Next

Class: CairoUint512

Constructors​

constructor​

• new CairoUint512(bigNumberish): CairoUint512

Default constructor (Lib usage)

Parameters​

NameTypeDescription
bigNumberishBigNumberishBigNumberish value representing u512

Returns​

CairoUint512

Defined in​

src/utils/cairoDataTypes/uint512.ts:30

• new CairoUint512(limb0, limb1, limb2, limb3): CairoUint512

Direct props initialization (Api response)

Parameters​

NameType
limb0BigNumberish
limb1BigNumberish
limb2BigNumberish
limb3BigNumberish

Returns​

CairoUint512

Defined in​

src/utils/cairoDataTypes/uint512.ts:34

• new CairoUint512(uint512): CairoUint512

Initialization from Uint512 object

Parameters​

NameType
uint512Uint512

Returns​

CairoUint512

Defined in​

src/utils/cairoDataTypes/uint512.ts:43

Properties​

abiSelector​

â–ª Static abiSelector: string = 'core::integer::u512'

Defined in​

src/utils/cairoDataTypes/uint512.ts:24


limb0​

• limb0: bigint

Defined in​

src/utils/cairoDataTypes/uint512.ts:16


limb1​

• limb1: bigint

Defined in​

src/utils/cairoDataTypes/uint512.ts:18


limb2​

• limb2: bigint

Defined in​

src/utils/cairoDataTypes/uint512.ts:20


limb3​

• limb3: bigint

Defined in​

src/utils/cairoDataTypes/uint512.ts:22

Methods​

validate​

â–¸ validate(bigNumberish): bigint

Validate if BigNumberish can be represented as Uint512

Parameters​

NameType
bigNumberishBigNumberish

Returns​

bigint

Defined in​

src/utils/cairoDataTypes/uint512.ts:84


validateProps​

â–¸ validateProps(limb0, limb1, limb2, limb3): Object

Validate if limbs can be represented as Uint512

Parameters​

NameType
limb0BigNumberish
limb1BigNumberish
limb2BigNumberish
limb3BigNumberish

Returns​

Object

NameType
limb0bigint
limb1bigint
limb2bigint
limb3bigint

Defined in​

src/utils/cairoDataTypes/uint512.ts:94


is​

â–¸ is(bigNumberish): boolean

Check if BigNumberish can be represented as Uint512

Parameters​

NameType
bigNumberishBigNumberish

Returns​

boolean

Defined in​

src/utils/cairoDataTypes/uint512.ts:115


isAbiType​

â–¸ isAbiType(abiType): boolean

Check if provided abi type is this data type

Parameters​

NameType
abiTypestring

Returns​

boolean

Defined in​

src/utils/cairoDataTypes/uint512.ts:127


toBigInt​

â–¸ toBigInt(): bigint

Return bigint representation

Returns​

bigint

Defined in​

src/utils/cairoDataTypes/uint512.ts:134


toUint512HexString​

â–¸ toUint512HexString(): Object

Return Uint512 structure with HexString props limbx: HexString

Returns​

Object

NameType
limb0string
limb1string
limb2string
limb3string

Defined in​

src/utils/cairoDataTypes/uint512.ts:142


toUint512DecimalString​

â–¸ toUint512DecimalString(): Object

Return Uint512 structure with DecimalString props limbx DecString

Returns​

Object

NameType
limb0string
limb1string
limb2string
limb3string

Defined in​

src/utils/cairoDataTypes/uint512.ts:155


toApiRequest​

â–¸ toApiRequest(): string[]

Return api requests representation witch is felt array

Returns​

string[]

Defined in​

src/utils/cairoDataTypes/uint512.ts:167