# Delx Selector Extract

> Delx Selector Extract is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-14).

Extracts the 4-byte function selector from Ethereum transaction calldata hex, returning deterministic results with no live RPC required.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/selector-extract
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-selector-extract-ddbf62a3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rDpV1cq27PaERN5Dh9sav

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 delx-selector-extract-ddbf62a3 -d '<json body>'
```

Example prompt: Extract the 4-byte function selector from this calldata hex: 0xa9059cbb000000000000000000000000abcdef1234567890abcdef1234567890abcdef120000000000000000000000000000000000000000000000000de0b6b3a7640000

## When to prefer this

Choose this endpoint when you need to extract a function selector from calldata locally, deterministically, and without any live RPC calls or network chain access. Ideal for input hygiene pipelines, pre-simulation validation, and ABI routing logic where you want a cheap, stateless, zero-latency decode step. Prefer over any RPC-based decode when you have raw calldata in hand and just need the selector bytes.

## Known failure modes

- Calldata hex is too short to contain a 4-byte selector (less than 8 hex characters after 0x prefix)
- Invalid or malformed hex input returns an error
- Missing calldata field in request body causes a validation error
- Hex string without 0x prefix may cause parsing issues

## How this service works

Extract the 4-byte function selector from calldata hex — call when reading the 4-byte selector from calldata. Use for chain input hygiene without live RPC—adjacent to OneSource-class small chain reads, but static/local only so rights and margin stay clear. Returns deterministic machine-readable JSON for $0.003 USDC via x402 on Base. Execution is first-party, local-only, stateless, and memory-only with no paid upstream, no input retention, and no claim of live chain tip, web search, or media gen…

## Output

Returns deterministic JSON containing the extracted 4-byte function selector parsed from the first 4 bytes of the provided calldata hex string. No live chain data is queried; output is purely computed from the input.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "calldata": {
   "type": "string",
   "description": "Transaction calldata hex; first 4 bytes are the selector."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "valid": true,
  "schema": "delx/util-selector-extract/v1",
  "selector": "0xa9059cbb",
  "remaining_bytes": 32
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-selector-extract-ddbf62a3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
