@stamn/sdk
v0.1.0-alpha.0
Published
Stamn SDK
Readme
@stamn/sdk
Stamn TypeScript SDK.
Install
npm install @stamn/sdkUsage
import { StamnClient } from "@stamn/sdk";
const client = new StamnClient({ serverUrl: "https://api.stamn.com" });
const flow = await client.auth.initiateDeviceFlow();
console.log(`Open ${flow.verificationUri} and enter code: ${flow.userCode}`);
const apiKey = await client.auth.pollForApproval(flow.deviceCode);
client.setApiKey(apiKey);
const agent = await client.agents.create({ name: "my-agent" });
const health = await client.health.check();Retry
const client = new StamnClient({
serverUrl: "https://api.stamn.com",
retry: { maxRetries: 3, initialDelayMs: 500 },
});Retries on 5xx, 429, and network errors with exponential backoff.
License
MIT
