SUP · Docs

HTTP API

#Current application APIs

Agent chat and tool execution are documented in Agent Kit. Supported protocol metadata and transaction drafting are owned by backend/onchain-tools-service.

#Protocol service boundary

Supported protocol metadata and unsigned transaction drafting live behind the Agent Service in backend/onchain-tools-service. Customer clients call the Orchestrator; they do not call protocol SDKs or a catalog directly.

#Agent execution & read surfaces

EndpointGateRequestResponse
POST /api/agent/runRequires one of: Authorization: Bearer sup_... executor API key bound to walletId; valid x-sup-internal-agent; or Sup session when auth is required. Also requires an active plan whenever a paywall is configured.JSON body with action, owner, walletId, network, optional requestId, plus action fields. Default action is spend.application/x-ndjson, one JSON event per line: { "step": string, "status": "active" | "done" | "error", "detail"?: string, "digest"?: string }.
GET /api/delegations?network=testnet&address=0x...Keyless read-only.Query: network, address.{ "address": string, "network": string, "active": MyDelegation[], "revoked": MyDelegation[] }
GET /api/delegates?network=mainnet&walletId=0x...Keyless read-only.Query: network, walletId.{ "network": string, "walletId": string, "count": number, "delegates": DelegateInfo[] }
GET /api/vault?network=testnet&owner=0x...Keyless read-only.Query: network, owner.{ "network": string, "owner": string, "walletId": string, "identity": string }
GET /api/policy/rules?network=testnetKeyless read-only.Query: network.{ "network": string, "count": number, "rules": MarketRule[] }
GET /api/agent-services?network=testnetKeyless read-only.Query: network.{ "network": string, "count": number, "services": AgentService[] }
GET /api/escrow/jobs?jobId=0x...&network=testnetKeyless read-only.Query one of jobId, provider, or owner, plus network.For jobId: { "network": string, "job": JobView }. For provider or owner: { "network": string, "role": "provider" | "owner", "jobs": JobView[] }.

POST /api/agent/run uses a server-held managed agent key. The route still relies on on-chain caps and wallet policy as the hard boundary. It also applies a server-side freeze/daily-limit guard and a single-flight lock to avoid duplicate execution.

Supported action values:

spend
swap
scallopDeposit
scallopWithdraw
naviDeposit
naviWithdraw
suilendDeposit
suilendWithdraw
bucketBorrow
bucketRepay
bucketSavingsDeposit
bucketSavingsWithdraw
haedalStake
haedalUnstake
emberDeposit
clmmLiquidity
bluefinOrder
bluefinMarginDeposit
currentSupply
astroOrder
compose

MyDelegation includes:

type MyDelegation = {
  capId: string;
  kind: "bearer" | "scoped";
  walletId: string;
  revoked: boolean;
  policyVersion: number;
  vaultVersion: number;
  coin?: string;
  remaining?: string;
  remainingHuman?: string;
  depth?: number;
  maxDepth?: number;
  canSubdelegate: boolean;
  conditions: string[];
  allowlist: string[] | null;
  allowlistId: string | null;
  enforcesAllowlist: boolean;
  summary: string;
};

DelegateInfo includes:

type DelegateInfo = {
  address: string;
  addedMs: number;
  services: { key: string; amount: string; unlimited: boolean }[];
  coins: { key: string; amount: string; unlimited: boolean }[];
};

MarketRule includes:

type MarketRule = {
  ruleType: string;
  kind: "auth" | "caveat";
  packageId: string;
  manifestUri: string;
  publisher: string;
  version: number;
  label: string;
};

AgentService includes:

type AgentService = {
  address: string;
  name: string;
  description: string;
  skills: string[];
  cardUrl?: string;
  completedJobs: number;
  releasedValue: string;
};

JobView includes:

type JobView = {
  jobId: string;
  state: "open" | "funded" | "submitted" | "released" | "refunded" | string;
  stateNum: number;
  amount: string;
  provider: string | null;
  payer: string | null;
  coinType: string | null;
  note: string | null;
};