Class: CairoUint512
Constructors​
constructor​
• new CairoUint512(bigNumberish
): CairoUint512
Default constructor (Lib usage)
Parameters​
Name | Type | Description |
---|---|---|
bigNumberish | BigNumberish | BigNumberish value representing u512 |
Returns​
Defined in​
src/utils/cairoDataTypes/uint512.ts:30
• new CairoUint512(limb0
, limb1
, limb2
, limb3
): CairoUint512
Direct props initialization (Api response)
Parameters​
Name | Type |
---|---|
limb0 | BigNumberish |
limb1 | BigNumberish |
limb2 | BigNumberish |
limb3 | BigNumberish |
Returns​
Defined in​
src/utils/cairoDataTypes/uint512.ts:34
• new CairoUint512(uint512
): CairoUint512
Initialization from Uint512 object
Parameters​
Name | Type |
---|---|
uint512 | Uint512 |
Returns​
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​
Name | Type |
---|---|
bigNumberish | BigNumberish |
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​
Name | Type |
---|---|
limb0 | BigNumberish |
limb1 | BigNumberish |
limb2 | BigNumberish |
limb3 | BigNumberish |
Returns​
Object
Name | Type |
---|---|
limb0 | bigint |
limb1 | bigint |
limb2 | bigint |
limb3 | bigint |
Defined in​
src/utils/cairoDataTypes/uint512.ts:94
is​
â–¸ is(bigNumberish
): boolean
Check if BigNumberish can be represented as Uint512
Parameters​
Name | Type |
---|---|
bigNumberish | BigNumberish |
Returns​
boolean
Defined in​
src/utils/cairoDataTypes/uint512.ts:115
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/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
Name | Type |
---|---|
limb0 | string |
limb1 | string |
limb2 | string |
limb3 | string |
Defined in​
src/utils/cairoDataTypes/uint512.ts:142
toUint512DecimalString​
â–¸ toUint512DecimalString(): Object
Return Uint512 structure with DecimalString props limbx DecString
Returns​
Object
Name | Type |
---|---|
limb0 | string |
limb1 | string |
limb2 | string |
limb3 | string |
Defined in​
src/utils/cairoDataTypes/uint512.ts:155
toApiRequest​
â–¸ toApiRequest(): string
[]
Return api requests representation witch is felt array
Returns​
string
[]