# finmath Base58 Encode/Decode

> finmath Base58 Encode/Decode is a paid API for AI agents from finmath.qzqh5rrbkz.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Encodes or decodes data using Base58 encoding, typically for crypto address/key formatting, as part of a deterministic finance and crypto math computation service.

## Facts

- Endpoint: POST https://finmath.qzqh5rrbkz.workers.dev/v1/base58
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/finmath-base58-encode-decode-c7305ec6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9xK8xVPK21LCyQVBMjewA

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability finmath-base58-encode-decode-c7305ec6 -d '<json body>'
```

Example prompt: Can you encode this hex string '0014751e76e8199196f454f092f14796951d0f6ab45' to Base58 using finmath's deterministic math engine?

## When to prefer this

Use this endpoint when you need exact, deterministic Base58 encoding/decoding for cryptocurrency addresses or keys without relying on an LLM's error-prone arithmetic, and when operating within a micropayment (x402) workflow priced at $0.001 USDC per call.

## Known failure modes

- Invalid or malformed input string returns an error result
- Unsupported encoding mode returns an error
- Missing required 'input' field returns 400-level response
- Malformed JSON body causes request rejection
- Payment not provided or insufficient USDC causes 402 Payment Required

## How this service works

Deterministic finance and crypto math for AI agents: TradFi (NPV, IRR, XIRR, Black-Scholes + Greeks, bonds, VaR, Sharpe) and DeFi (impermanent loss, perp liquidation, funding, Uniswap v3, health factor, cost basis). Exact, model-free arithmetic that LLMs get wrong — priced per call in USDC.

## Output

A JSON object with a 'result' field containing the Base58-encoded or decoded output and a 'meta' field with call metadata such as timing or mode used.

## Example request

```json
{
 "mode": "encode",
 "input": "0014751e76e8199196f454f092f14796951d0f6ab45",
 "encoding": "hex"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "input"
 ],
 "properties": {
  "mode": {
   "type": "string",
   "description": "mode"
  },
  "input": {
   "type": "string",
   "description": "input"
  },
  "encoding": {
   "type": "string",
   "description": "encoding"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "result",
  "meta"
 ],
 "properties": {
  "meta": {
   "type": "object"
  },
  "result": {}
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/finmath-base58-encode-decode-c7305ec6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from finmath.qzqh5rrbkz.workers.dev](https://www.zero.xyz/host/finmath.qzqh5rrbkz.workers.dev/llms.txt)
