# B20 Feature ID & Calldata Generator

> B20 Feature ID & Calldata Generator is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Converts a B20 feature string into its keccak256 bytes32 feature ID and encodes ready-to-send isActivated(bytes32) calldata for the Activation Registry, entirely CPU-side with no network calls.

## Facts

- Endpoint: POST https://agent402.tools/api/b20-feature-id
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/b20-feature-id-calldata-generator-6090f89e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LScL7rAOJZgYDrd2faikO

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 b20-feature-id-calldata-generator-6090f89e -d '<json body>'
```

Example prompt: Can you give me the bytes32 feature ID and the isActivated calldata for the B20 feature string 'base.b20_asset'?

## When to prefer this

Use this endpoint when you need to deterministically compute a B20 feature's bytes32 identifier or generate isActivated calldata for the Activation Registry without making any external network calls — ideal for gas estimation, pre-flight checks, or offline calldata construction.

## Known failure modes

- Missing or empty feature string returns a 400 validation error
- Malformed JSON body may return a 400 parse error
- Feature string with unsupported characters may yield unexpected hash output

## How this service works

Pure-CPU helper: turn a B20 feature string (e.g. base.b20_asset) into its bytes32 feature id and ready-to-send isActivated(bytes32) calldata for the Activation Registry. No network egress.

## Output

Returns the keccak256-derived bytes32 feature ID for the provided B20 feature string, along with ABI-encoded isActivated(bytes32) calldata ready to be sent directly to the Activation Registry smart contract.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "feature": {
   "type": "string",
   "description": "feature string to hash (keccak256)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "feature": "base.b20_asset",
  "calldata": "0xba87af80cdcc…",
  "registry": "0x8453000000000000000000000000000000000001",
  "featureId": "0xcdcc772f…"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/b20-feature-id-calldata-generator-6090f89e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
