Build
Examples
Copy-paste recipes for common flows. All use @pyre-one/sdk.
A market dashboard
ts
import { PyreClient } from "@pyre-one/sdk";
const pyre = new PyreClient();
const [tokens, stats] = await Promise.all([pyre.read.tokens(), pyre.read.stats()]);
const nearGraduation = tokens
.filter((t) => !t.graduated && t.progressBps > 8000)
.sort((a, b) => b.progressBps - a.progressBps);
console.log(`${stats.tokensLaunched} tokens · ${nearGraduation.length} about to graduate`);Launch + dev-buy in one tx
ts
const signer = new PyreClient({ privateKey: process.env.PYRE_KEY as `0x${string}` });
const { token, curve } = await signer.write.launchAndWait({
name: "Flint", symbol: "FLINT", preset: 0,
mixer: [{ moduleId: 9, weight: 100 }], // 100% Diamond Hands
devBuyEth: "0.1", // atomic — you're first in
});A blue-chip config
ts
import { MIXER_PRESETS } from "@pyre-one/sdk";
await signer.write.launchAndWait({
name: "Granite", symbol: "GRANITE", preset: 2,
mixer: Object.entries(MIXER_PRESETS.bluechip).map(
([moduleId, weight]) => ({ moduleId: Number(moduleId), weight }),
),
});Watch a curve until it graduates
ts
async function untilGraduated(curve: `0x${string}`) {
for (;;) {
const s = await pyre.curveState(curve);
console.log(`${(s.progressBps / 100).toFixed(1)}% · ${s.phase}`);
if (s.phase === "readyToGraduate") return pyre.write.graduate(curve);
if (s.graduated) return;
await new Promise((r) => setTimeout(r, 5000));
}
}Show a wallet's earnings
ts
const r = await pyre.read.rewards("0xabc…");
console.log("total earned (wei):", r.totalEarned.toString());
for (const t of r.byToken) console.log(t.symbol, t.earned.toString(), `(${t.count})`);More in the SDK reference and MCP guide.