TOOLS

Address + Units Utility

Deterministic preflight checks for address family detection and safe human/raw unit conversions.

Human Flow

Address detection, to-raw conversion, and to-human conversion.

state: idle

Address Inspector

resolved:

No result yet. Identify chain families for an address format.

To Raw Units

Pass `decimals`, or pass configured `chain` + `token` for deterministic lookup.

To Human Units

`toHumanUnits` should invert `toRawUnits` when inputs use the same decimals context.

Conversion Results

No to-raw conversion yet.

No to-human conversion yet.

Agent Flow

SDK identify + conversion calls with copy-ready snippets and failure guidance.

Identify Chains

SDK method
CALLmoney.identifyChains
- EVM address format maps to multiple chains by design.
# SDK method (no HTTP endpoint)
# Use JavaScript snippet instead.
Example success response
{
  "chains": [
    "base",
    "ethereum",
    "arbitrum"
  ],
  "note": "Multiple chains use this address format. Specify chain explicitly."
}
Example failure responses
Failure
{
  "code": "INVALID_PARAMS",
  "message": "address is required."
}
Recovery: Provide a non-empty address string.

To Raw Units

SDK method
CALLmoney.toRawUnits
- Result is bigint-safe. UI exposes both decimal string and bigint literal form.
# SDK method (no HTTP endpoint)
# Use JavaScript snippet instead.
Example success response
{
  "raw": "25000000",
  "rawBigintLiteral": "25000000n"
}
Example failure responses
Failure
{
  "code": "INVALID_PARAMS",
  "message": "Provide either \"decimals\" or \"chain\" (to look up token decimals)"
}
Recovery: Pass `decimals`, or pass configured `chain` + token.
Failure
{
  "code": "CHAIN_NOT_CONFIGURED",
  "message": "Chain \"base\" is not configured."
}
Recovery: Run setup first: await money.setup({ chain: "base", network: "mainnet" })

To Human Units

SDK method
CALLmoney.toHumanUnits
- Inverse of `toRawUnits` when decimals context matches.
# SDK method (no HTTP endpoint)
# Use JavaScript snippet instead.
Example success response
{
  "human": "25"
}
Example failure responses
Failure
{
  "code": "INVALID_PARAMS",
  "message": "Provide either \"decimals\" or \"chain\" (to look up token decimals)"
}
Recovery: Pass `decimals`, or pass configured `chain` + token.
Failure
{
  "code": "TOKEN_NOT_FOUND",
  "message": "Cannot resolve decimals for token \"USDC\" on chain \"base\"."
}
Recovery: Register token alias with decimals first, or pass decimals explicitly.