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" })

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.

ParamTypeNotes
namestringDisplay name.
tickerstringSymbol, collision-checked.
curvestringCurve preset. "default" unless a custom curve is offered.
metadataobject?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…" }

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.

ParamTypeNotes
instring?Quote amount to spend. Provide in or out, not both.
outstring?Token amount to receive.
slippageBpsnumber?Max slippage in basis points. Defaults to a conservative value.
recipientstring?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 } }

status

status(id: string): Promise<Status>

Reads pool state. No key required for a read.

FieldTypeNotes
phase"bonding" | "graduated"Which pricing mode the pool is in.
progressnumberProgress toward graduation, 0 to 1, during bonding.
poolobjectThe kept pool depth. Shown separate from the fee split.
const s = await untoll.status(t.id)
// 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.

ParamTypeNotes
bucket"creator" | "active"Which accrued balance to settle.
tokenstring?For the creator cut, the token id.
runnumber?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" }
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.