Namespace: num
References​
BigNumberish​
Re-exports BigNumberish
Functions​
isHex​
â–¸ isHex(hex
): boolean
Parameters​
Name | Type |
---|---|
hex | string |
Returns​
boolean
Defined in​
toBigInt​
â–¸ toBigInt(value
): bigint
Parameters​
Name | Type |
---|---|
value | BigNumberish |
Returns​
bigint
Defined in​
isBigInt​
â–¸ isBigInt(value
): value is bigint
Parameters​
Name | Type |
---|---|
value | any |
Returns​
value is bigint
Defined in​
toHex​
â–¸ toHex(number
): string
Parameters​
Name | Type |
---|---|
number | BigNumberish |
Returns​
string
Defined in​
toStorageKey​
â–¸ toStorageKey(number
): string
Convert BigNumberish to STORAGE_KEY Same as toHex but conforming pattern STORAGE_KEY pattern ^0x0[0-7]{1}[a-fA-F0-9]{0,62}$ A storage key. Represented as up to 62 hex digits, 3 bits, and 5 leading zeroes. 0x0 + [0-7] + 62 hex = 0x + 64 hex
Parameters​
Name | Type | Description |
---|---|---|
number | BigNumberish | BigNumberish |
Returns​
string
Defined in​
hexToDecimalString​
â–¸ hexToDecimalString(hex
): string
Parameters​
Name | Type |
---|---|
hex | string |
Returns​
string
Defined in​
assertInRange​
â–¸ assertInRange(input
, lowerBound
, upperBound
, inputName?
): void
Parameters​
Name | Type | Default value |
---|---|---|
input | BigNumberish | undefined |
lowerBound | BigNumberish | undefined |
upperBound | BigNumberish | undefined |
inputName | string | '' |
Returns​
void
Defined in​
bigNumberishArrayToDecimalStringArray​
â–¸ bigNumberishArrayToDecimalStringArray(rawCalldata
): string
[]
Parameters​
Name | Type |
---|---|
rawCalldata | BigNumberish [] |
Returns​
string
[]
Defined in​
bigNumberishArrayToHexadecimalStringArray​
â–¸ bigNumberishArrayToHexadecimalStringArray(rawCalldata
): string
[]
Parameters​
Name | Type |
---|---|
rawCalldata | BigNumberish [] |
Returns​
string
[]
Defined in​
getDecimalString​
â–¸ getDecimalString(value
): string
Parameters​
Name | Type |
---|---|
value | string |
Returns​
string
Defined in​
getHexString​
â–¸ getHexString(value
): string
Parameters​
Name | Type |
---|---|
value | string |
Returns​
string
Defined in​
getHexStringArray​
â–¸ getHexStringArray(value
): string
[]
Parameters​
Name | Type |
---|---|
value | string [] |
Returns​
string
[]
Defined in​
hexToBytes​
â–¸ hexToBytes(value
): Uint8Array
Convert a hex string to an array of Bytes (Uint8Array)
Parameters​
Name | Type | Description |
---|---|---|
value | string | hex string |
Returns​
Uint8Array
an array of Bytes
Defined in​
cleanHex​
â–¸ cleanHex(hex
): string
Remove hex string leading zero and lower case '0x01A'.. -> '0x1a..'
Parameters​
Name | Type | Description |
---|---|---|
hex | string | string |
Returns​
string
Defined in​
isStringWholeNumber​
â–¸ isStringWholeNumber(value
): boolean
Parameters​
Name | Type |
---|---|
value | string |
Returns​
boolean
Defined in​
toHexString​
â–¸ toHexString(value
): string
Parameters​
Name | Type |
---|---|
value | string |
Returns​
string
Defined in​
toCairoBool​
â–¸ toCairoBool(value
): string
Parameters​
Name | Type |
---|---|
value | boolean |
Returns​
string