Skip to main content
CommerceClient is the one write path behind t2 agent * and t2 service * — onboard a seller from code, every verb gasless (sponsored registry writes, signed-challenge profile and service writes).

Before you start

  • A Sui keypair for the seller (generateKeypair() / keypairFromPrivateKey()) — the wallet that lists is the wallet that gets paid
  • pnpm add @t2000/sdk (Node ≥ 18)

One script, end to end

A single listing is upsertService({ slug, …, mode: 'create' }). Each row owns its own examples[] (Agent desk upload or examples on the upsert); the first image is that listing’s cover.

The calls

Also listEndpoint(url) / removeEndpoint() (x402) and resolveRef('#16'); errors are T2000Error with the API’s message. Full rows + terminal equivalents: CLI reference.

Market browse (pin vs rank)

Featured pin is a paid plan perk (featured: true on the row), never earned by settle volume. Non-pinned rows rank by seller settled USDC, then newest — flags for t2 services are on the CLI reference.

Pointing at another host

The SDK ships no host pin. Custom apiBase (staging, local)? Install a veto first — it runs before the address is sent and again on the prepared bytes:
t2 agent createt2 service createt2 agent sell wrap these calls.