Get started
Quickstart
Read token data, then launch a token — in about five minutes.
1. Install
bash
npm install @pyre-one/sdk viem2. Read data (no key needed)
ts
import { PyreClient } from "@pyre-one/sdk";
const pyre = new PyreClient();
const tokens = await pyre.read.tokens(); // newest launches
const ember = await pyre.read.token("0xabc…"); // one token
const state = await pyre.curveState(ember.curve);// live phase + progress
const stats = await pyre.read.stats(); // $PYRE burned, launches3. Add a signer
To launch or trade, give the client a key. Load it from the environment — never hardcode it — and use a dedicated hot wallet.
ts
const signer = new PyreClient({
privateKey: process.env.PYRE_KEY as `0x${string}`,
// rpcUrl, indexerUrl, addresses… all optional
});
console.log(signer.address); // your wallet
console.log(signer.isUndeployed); // true until Pyre is live on-chain4. Launch a token
Pick a curve preset and a Mixer — the modes your fees flow to. Weights are relative and normalized automatically.
ts
const { token, curve } = await signer.write.launchAndWait({
name: "Ember",
symbol: "EMBER",
preset: 1, // Standard ($65k graduation)
mixer: [
{ moduleId: 1, weight: 60 }, // Bonfire — buy & burn
{ moduleId: 4, weight: 40 }, // Merry Men — holder rewards
],
devBuyEth: "0.05", // optional atomic creator buy
});
console.log("launched", token, "curve", curve);5. Trade the curve
ts
// buy 0.1 ETH worth, 1% slippage (feeBps = buyTax + curveFee)
await signer.write.buy({ curve, ethIn: "0.1", feeBps: 200, slippageBps: 100 });
// sell 1,000 tokens back (auto-approves the curve first)
await signer.write.sell({ token, curve, tokensIn: 1_000n * 10n ** 18n });Prefer to sign elsewhere?
Every write has aprepare* variant that returns an unsigned transaction request — perfect for Safes, relayers, or a custom wallet. See the SDK reference.Next: the full SDK reference, the Claude MCP server, or the token API.