Skip to main content

Utility Components

Lightweight, zero-dependency utility components for generating random values, computing hashes, and providing common constants.


RANDOM_UUID

RANDOM_UUID Utility Workflow Component

Generate a cryptographically random UUID v4.

Config

None.

Inputs

None.

Outputs

FieldTypeDescription
uuidstringUUID v4 string (e.g. "a4c2e8f1-39b0-4d7a-83c6-1b5f2e9d0c77")

SDK example

import { WorkspaceClient, ComponentModule } from 'caller-sdk';
const workspace = new WorkspaceClient({ apiKey: process.env.WR_API_KEY! });

const result = await workspace.call(ComponentModule.RANDOM_UUID, {}).promise();
console.log(result.uuid); // "a4c2e8f1-39b0-4d7a-83c6-1b5f2e9d0c77"

REST (with waitForMs for inline result):

curl -X POST https://api.whiterabbit.app/v1/sdk/components \
-H "X-Api-Key: ws_..." \
-H "X-Sdk-Timestamp: <timestamp>" \
-H "X-Sdk-Signature: <signature>" \
-H "Content-Type: application/json" \
-d '{ "module": "RANDOM_UUID", "input": {}, "config": {}, "waitForMs": 5000 }'

Without waitForMs, the response returns status: "CREATED" immediately — the component runs asynchronously. See Authentication → for the required signing headers.


RANDOM_HEX

RANDOM_HEX Utility Workflow Component

Generate a cryptographically random hex string. Useful as a nonce, salt, or random seed.

Config

FieldTypeDefaultDescription
lengthnumber6Number of hex characters to generate (output length, excluding 0x prefix)

Inputs

None.

Outputs

FieldTypeDescription
hexstringRandom hex string (e.g. "a3f9c2" — without 0x prefix)

SDK example

const result = await workspace.call(ComponentModule.RANDOM_HEX, {}).promise();
console.log(result.hex); // "7f3a9c"

RANDOM_NUMBER

RANDOM_NUMBER Utility Workflow Component

Generate a cryptographically random integer.

Config

FieldTypeDefaultDescription
lengthnumber6Number of digits in the generated number (e.g. 6 → a 6-digit number between 100000 and 999999)

Inputs

None.

Outputs

FieldTypeDescription
numbernumberRandom integer of the configured digit length

SDK example

const result = await workspace.call(ComponentModule.RANDOM_NUMBER, {}).promise();
console.log(result.number); // 1847392615

ERC20_ABI_CONSTANT

ERC20_ABI_CONSTANT Utility Workflow Component

Returns the standard ERC-20 ABI as a constant. Eliminates the need to hardcode it in every workflow that interacts with ERC-20 tokens.

Config

None.

Inputs

None.

Outputs

FieldTypeDescription
abiAbiItem[]Standard ERC-20 ABI (transfer, approve, balanceOf, allowance, transferFrom, totalSupply, events)

Common pattern

ERC20_ABI_CONSTANT
│ abi

BUILD_EVM_CALLDATA (function: "transfer", args: [to, amount])
│ calldata

BUILD_EVM_TRANSACTION

EVM_ZERO_ADDRESS_CONSTANT

EVM_ZERO_ADDRESS_CONSTANT Utility Workflow Component

Returns the EVM zero address (0x0000000000000000000000000000000000000000). Used as the tokenAddress for native ETH balance checks, or as the null address in ABI encoding.

Config

None.

Inputs

None.

Outputs

FieldTypeDescription
addressstring"0x0000000000000000000000000000000000000000"

Common pattern

EVM_ZERO_ADDRESS_CONSTANT
│ address
▼ tokenAddress
GET_EVM_ACCOUNT_BALANCE (checks native ETH balance)