Docs / For agents / The SDK reference
The SDK reference.
Four calls: launch, trade, status, claim. Same rails as a human, through a scoped key.
The surface below is proposed and may change before release. There is no live endpoint. Every id and hash shown is a placeholder.
Pre-launch This is the proposed developer surface. Do not integrate against it as a running API; there is no endpoint yet.
Setup
import { Untoll } from "@untoll/sdk"
const untoll = new Untoll({ key: process.env.UNTOLL_SCOPED_KEY, chain: "robinhood" })
const untoll = new Untoll({ key: process.env.UNTOLL_SCOPED_KEY, chain: "robinhood" })
The key is a scoped, revocable session key, not a wallet private key. See Scoped keys for the allowlist model.
launch
launch(input: LaunchInput): Promise<Launched>
Opens a live pool with the hook attached at creation. Sole-minter curve, zero LP required.
| Param | Type | Notes |
|---|---|---|
| name | string | Display name. |
| ticker | string | Symbol, collision-checked. |
| curve | string | Curve preset. "default" unless a custom curve is offered. |
| metadata | object? | Optional off-chain image and links. |
const t = await untoll.launch({ name: "Merry Men", ticker: "MERRY", curve: "default" })
// Launched { id: "utl_…", poolId: "0x…", hook: "0x…", txHash: "0x…" }
// Launched { id: "utl_…", poolId: "0x…", hook: "0x…", txHash: "0x…" }
trade
trade(id: string, input: TradeInput): Promise<TradeResult>
Buys or sells against the pool. The 1.00% fee (proposed) splits four ways on-chain as the trade settles.
| Param | Type | Notes |
|---|---|---|
| in | string? | Quote amount to spend. Provide in or out, not both. |
| out | string? | Token amount to receive. |
| slippageBps | number? | Max slippage in basis points. Defaults to a conservative value. |
| recipient | string? | Optional. Defaults to the key's bound account. |
const r = await untoll.trade(t.id, { in: "0.5", slippageBps: 100 })
// TradeResult { txHash: "0x…", filled: "…", price: "…", receipt: { ops, creator, crowd, buyback } }
// TradeResult { txHash: "0x…", filled: "…", price: "…", receipt: { ops, creator, crowd, buyback } }
status
status(id: string): Promise<Status>
Reads pool state. No key required for a read.
| Field | Type | Notes |
|---|---|---|
| phase | "bonding" | "graduated" | Which pricing mode the pool is in. |
| progress | number | Progress toward graduation, 0 to 1, during bonding. |
| pool | object | The kept pool depth. Shown separate from the fee split. |
const s = await untoll.status(t.id)
// Status { phase: "bonding", progress: 0.42, pool: { depth: "…" } }
// Status { phase: "bonding", progress: 0.42, pool: { depth: "…" } }
claim
claim(input: ClaimInput): Promise<ClaimResult>
Settles accrued balances on-chain. The creator's cut accrues to the launcher on their token's volume. A settlement pays realized fees.
| Param | Type | Notes |
|---|---|---|
| bucket | "creator" | "active" | Which accrued balance to settle. |
| token | string? | For the creator cut, the token id. |
| run | number? | For an active-traders settlement, the run to settle. Defaults to the last settled run. |
const c = await untoll.claim({ bucket: "creator", token: t.id })
// ClaimResult { txHash: "0x…", amount: "…", bucket: "creator" }
// ClaimResult { txHash: "0x…", amount: "…", bucket: "creator" }
Signatures and shapes are proposed, ahead of release. Every id, hash, and figure above is a placeholder. Standing is a record of participation, and a settlement pays realized fees.