Class: CairoUint512
Constructors
constructor
• new CairoUint512(bigNumberish): CairoUint512
Default constructor (Lib usage)
Parameters
| Name | Type |
|---|---|
bigNumberish | unknown |
Returns
Defined in
src/utils/cairoDataTypes/uint512.ts:32
• 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:36
Properties
abiSelector
▪ Static abiSelector: string = 'core::integer::u512'
Defined in
src/utils/cairoDataTypes/uint512.ts:27
limb0
• limb0: bigint
Defined in
src/utils/cairoDataTypes/uint512.ts:19
limb1
• limb1: bigint
Defined in
src/utils/cairoDataTypes/uint512.ts:21
limb2
• limb2: bigint
Defined in
src/utils/cairoDataTypes/uint512.ts:23
limb3
• limb3: bigint
Defined in
src/utils/cairoDataTypes/uint512.ts:25
Methods
validate
▸ validate(bigNumberish): bigint
Validate if BigNumberish can be represented as Uint512
Parameters
| Name | Type |
|---|---|
bigNumberish | unknown |
Returns
bigint
Defined in
src/utils/cairoDataTypes/uint512.ts:81
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:98
is
▸ is(bigNumberish): boolean
Check if BigNumberish can be represented as Uint512
Parameters
| Name | Type |
|---|---|
bigNumberish | unknown |
Returns
boolean
Defined in
src/utils/cairoDataTypes/uint512.ts:120
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:132
factoryFromApiResponse
▸ factoryFromApiResponse(responseIterator): CairoUint512
Parameters
| Name | Type |
|---|---|
responseIterator | Iterator<string, any, undefined> |
Returns
Defined in
src/utils/cairoDataTypes/uint512.ts:136
toBigInt
▸ toBigInt(): bigint
Return bigint representation
Returns
bigint
Defined in
src/utils/cairoDataTypes/uint512.ts:147
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:155
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:168
toApiRequest
▸ toApiRequest(): string[]
Return api requests representation witch is felt array
Returns
string[]