Documentation

WALL is a wallet control layer for AI agents on Robinhood Chain. Connect a wallet, define a policy, and let agents operate within bounds. Everything goes through the API.

Authentication

All API requests go through your WALL session. Create a session by connecting a wallet and defining a policy. The session ID is your auth token for all subsequent calls.

Base URL:

https://wallprotocol.com/api

Include the session ID in the request body when executing actions. No API keys or bearer tokens needed during the current release.

Quickstart

Three calls to go from wallet to working agent.

1. Create a session
const res = await fetch("/api/sessions", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    wallet: "0xYourWalletAddress",
    chainId: 4663,
    policy: {
      allow: ["swap", "stake"],
      deny: ["transfer", "withdraw"],
      limits: {
        perTransaction: "50 USDC",
        daily: "500 USDC",
      },
    },
  }),
});

const { sessionId } = await res.json();
2. Execute an action
const result = await fetch("/api/execute", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    sessionId: sessionId,
    action: "swap",
    params: { from: "USDC", to: "ETH" },
    amount: 25,
  }),
});

// { status: "executed", amount: 25, dailySpent: 25, dailyRemaining: 475 }
3. Check the audit log
const log = await fetch(`/api/audit/${sessionId}`);
const { entries } = await log.json();

// entries: [{ action: "swap", amount: 25, status: "executed", timestamp: ... }]

Create session

Creates a new WALL session for a wallet with a defined policy. Returns a session ID used for all subsequent operations.

POST /api/sessions

Request body

ParameterDescription
wallet required Wallet address (hex string). Stored lowercase.
chainId required Chain ID. Use 4663 for Robinhood Chain mainnet.
policy required Policy object defining permissions and limits. See Policies.
Response 201
{
  "sessionId": "wall_a8f3k29x...",
  "wallet": "0x1234...abcd",
  "chainId": 4663,
  "policy": { ... },
  "createdAt": 1726012345678
}

Get session

Retrieve the current state of a session including spend totals and active status.

GET /api/sessions/:sessionId
Response 200
{
  "id": "wall_a8f3k29x...",
  "wallet": "0x1234...abcd",
  "chainId": 4663,
  "policy": { ... },
  "spent": 125,
  "dailySpent": 75,
  "active": true,
  "createdAt": 1726012345678,
  "revokedAt": null
}

Revoke session

Instantly revoke a session. All future execute calls against this session will be denied. No key rotation needed.

POST /api/sessions/:sessionId/revoke
Response 200
{
  "status": "revoked",
  "sessionId": "wall_a8f3k29x..."
}

Execute action

Submit an action through the policy engine. The engine checks the action against the session's allow/deny list, per-transaction limits, and daily limits. If approved, the action is logged and spend totals are updated.

POST /api/execute

Request body

ParameterDescription
sessionId required The session ID returned from create.
action required Action type: swap, stake, transfer, withdraw, approve.
amount optional Numeric amount for limit checking. Defaults to 0 if omitted.
params optional Arbitrary parameters for the action (logged in audit trail).
Response 200 (approved)
{
  "status": "executed",
  "action": "swap",
  "amount": 25,
  "spent": 150,
  "dailySpent": 100,
  "dailyRemaining": 400,
  "perTxLimit": 50
}
Response 403 (denied)
{
  "status": "denied",
  "reason": "action \"transfer\" is explicitly denied"
}

Audit log

Retrieve the last 50 audit entries for a session. Every execute call (approved or denied) is logged with the action, parameters, amount, status, and timestamp.

GET /api/audit/:sessionId
Response 200
{
  "entries": [
    {
      "sessionId": "wall_a8f3k29x...",
      "action": "swap",
      "params": { "from": "USDC", "to": "ETH" },
      "amount": 25,
      "status": "executed",
      "timestamp": 1726012345678
    }
  ]
}

Status

Health check endpoint. Returns service status and version.

GET /api/status
Response 200
{
  "service": "WALL",
  "version": "0.1.0",
  "status": "operational",
  "description": "Wallet Access Limitation Layer"
}

Policies

A policy defines what an agent can and cannot do with a wallet. Every session has exactly one policy, set at creation time.

Structure

{
  "allow": ["swap", "stake"],
  "deny": ["transfer", "withdraw"],
  "limits": {
    "perTransaction": "50 USDC",
    "daily": "500 USDC",
    "perSession": "2000 USDC"
  },
  "contracts": ["0x..."],
  "tokens": ["USDC", "ETH"]
}

The engine evaluates in order: deny list first, then allow list, then limits. If an action is on the deny list, it is rejected regardless of the allow list. If an action is not on the allow list, it is rejected. If an action passes both lists, limits are checked.

Limits

Limits cap how much value an agent can move. All limits are optional. If a limit is not set, it defaults to unlimited.

LimitScopeDescription
perTransaction Single call Maximum amount for any single execute call.
daily Rolling 24h Maximum cumulative spend in a 24-hour window. Resets automatically.
perSession Lifetime Maximum cumulative spend for the entire session.

Actions

Actions represent onchain operations an agent can request. The policy engine validates the action type and amount before anything touches the chain.

ActionDescription
swap Trade between tokens on approved DEXs.
stake Stake tokens with validators or liquidity pools.
transfer Move tokens to an external address.
withdraw Remove funds from the wallet entirely.
approve Grant a token approval to a smart contract.