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.
Scope Proposed developer surface.

Setup

import { Untoll } from "@untoll/sdk"
const untoll = new Untoll({ key: process.env.UNTOLL_SCOPED_KEY, chain: "testnet" })

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.
curvestringProposed SDK field. The contract takes a graduation target and a curve supply.
metadataobject?Optional off-chain image and links.
crewaddress?Blank means the creator.
const t = await untoll.launch({ name: "Your Token", ticker: "TICKER", 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 toll (2.00% on the curve, 1.00% after) 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. Open pool only. Exact output reverts while bonding.
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: "…", slippageBps: 100 })
// TradeResult { txHash: "0x…", filled: "…", price: "…", receipt: { creator, crew, buyback, protocol } }

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 the open pool, 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: …, 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" | "crew"Which accrued balance to settle.
tokenstring?The token id.
const c = await untoll.claim({ bucket: "creator", token: t.id })
// ClaimResult { txHash: "0x…", amount: "…", bucket: "creator" }
Every id, hash, and figure above is a placeholder.