npm.io
0.0.3 • Published 18h ago

seismic-orchestration

Licence
MIT
Version
0.0.3
Deps
1
Size
4.4 MB
Vulns
0
Weekly
0

seismic-orchestration

TypeScript client for the Seismic Orchestration API — on/off-ramp, wallet, and swap orchestration behind a single REST surface.

npm install seismic-orchestration
# or: bun add seismic-orchestration

Quick start

import { SeismicOrchestrationClient, localStorageTokenStore } from "seismic-orchestration";

const api = SeismicOrchestrationClient.sandbox({
  tokenStore: localStorageTokenStore(),
});

const res = await api.auth.login("alice@example.com", "hunter22!hunter22");

const quotes = await api.quotes.create(
  {
    amount: "1000",
    source: { currency: "USD" },
    destination: { currency: "USDC", rail: "base" },
  },
  { wait: true },
);
const order = await api.quotes.acceptBest(quotes.id);

Also available: SeismicOrchestrationClient.production() and SeismicOrchestrationClient.fromEnv() (reads SEISMIC_ORCHESTRATION_ENV).

Full documentation lives at https://seismic.systems/docs.

What you get

  • Auth — signup, login, MFA enroll/activate/verify, refresh, logout, me. Single-flight refresh-on-401 built in.
  • Ramps — quote (ranked cross-provider comparison), accept, execute; customer + KYC onboarding; account creation.
  • WebhooksparseWebhookEvent() turns a signature-verified delivery into a typed, discriminated event union; per-event Zod schemas exported too.
  • Token storeslocalStorageTokenStore() (browser) and memoryTokenStore() (Node/SSR/workers), or bring your own via the TokenStore interface.
  • Runtime validation — every response is parsed by Zod so a spec drift shows up as a typed error, not a silent undefined.

License

MIT.

Keywords