Documentation Index
Fetch the complete documentation index at: https://orderly.network/docs/llms.txt
Use this file to discover all available pages before exploring further.
Orderly SDKs / Modules / @orderly.network/core / utils
Namespace: utils
@orderly.network/core.utils
Table of contents
Type Aliases
Functions
Type Aliases
SignatureDomain
Ƭ SignatureDomain: Object
Type declaration
| Name | Type |
|---|
chainId | number |
name | string |
verifyingContract | string |
version | string |
Defined in
packages/core/src/utils.ts:12
Functions
base64url
▸ base64url(aStr): string
Parameters
Returns
string
Defined in
packages/core/src/utils.ts:19
calculateStringHash
▸ calculateStringHash(input): string
Parameters
Returns
string
Defined in
packages/core/src/utils.ts:41
▸ formatByUnits(amount, unit?): string
Parameters
| Name | Type | Default value |
|---|
amount | string | undefined |
unit | number | "ether" | "gwei" | "ether" |
Returns
string
Defined in
packages/core/src/utils.ts:49
getGlobalObject
▸ getGlobalObject(): typeof globalThis
Returns
typeof globalThis
Defined in
packages/core/src/utils.ts:65
getTimestamp
▸ getTimestamp(): number
Returns
number
Defined in
packages/core/src/utils.ts:86
isHex
▸ isHex(value): boolean
Parameters
Returns
boolean
Defined in
packages/core/src/utils.ts:56
isHexString
▸ isHexString(value): boolean
Parameters
Returns
boolean
Defined in
packages/core/src/utils.ts:61
parseAccountId
▸ parseAccountId(userAddress, brokerId): string
Parameters
| Name | Type |
|---|
userAddress | string |
brokerId | string |
Returns
string
Defined in
packages/core/src/utils.ts:27
parseBrokerHash
▸ parseBrokerHash(brokerId): string
Parameters
Returns
string
Defined in
packages/core/src/utils.ts:23
parseTokenHash
▸ parseTokenHash(tokenSymbol): string
Parameters
| Name | Type |
|---|
tokenSymbol | string |
Returns
string
Defined in
packages/core/src/utils.ts:37
parseUnits
▸ parseUnits(value, unit?): bigint
Converts the //decimal string// %%value%% to a BigInt, assuming
%%unit%% decimal places. The %%unit%% may the number of decimal places
or the name of a unit (e.g. "gwei" for 9 decimal places).
Parameters
| Name | Type |
|---|
value | string |
unit? | string | Numeric |
Returns
bigint
Defined in
node_modules/.pnpm/ethers@6.12.1/node_modules/ethers/lib.commonjs/utils/units.d.ts:14