@stablecoin/sdk
v0.1.2
Published
Node.js and browser SDK for the Stablecoin Platform API
Maintainers
Readme
@stablecoin/sdk
TypeScript SDK for Stablecoin payments, wallets, apps, projects, API keys, and compliance workflows.
Install
npm install @stablecoin/sdkQuickstart
import { Stablecoin } from "@stablecoin/sdk";
const client = new Stablecoin({
apiKey: process.env.STABLECOIN_API_KEY,
});
const payment = await client.payments.create({
amount: "1000.00",
stablecoin: "USDC",
toAddress: "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
chain: "base",
metadata: { orderId: "order_123" },
});
console.log(payment.id, payment.status);Available Resources
paymentswalletsbalancesappsprojectsapiKeyscomplianceagentagentPayments
Environment Variables
| Variable | Description |
| --- | --- |
| STABLECOIN_API_KEY | Bearer token for the SDK and CLI. Treat this like a secret. |
| STABLECOIN_ENV | Environment override for sandbox or production flows. |
| STABLECOIN_BASE_URL | Optional API base URL override for local or preview environments. |
Example Endpoints
| Method | Path | Description |
| --- | --- | --- |
| POST | /v1/payments | Initiate a new payment |
| POST | /v1/agent-payments/requests | Submit a scoped agent payment request |
| POST | /v1/agent-payments/execute | Execute an approved scoped payment |
| GET | /v1/payments/:id | Retrieve payment details |
| GET | /v1/wallets | List treasury wallets |
| GET | /v1/apps | List your deployed apps |
| POST | /v1/projects | Create a stablecoin project |
| POST | /v1/compliance/approvals | Submit a deployment approval |
Public Docs
Security Notes
- Keep
STABLECOIN_API_KEYout of source control and CI logs. - Start in sandbox before using production credentials or live payment flows.
- Review generated contracts and deployment approvals before shipping to mainnet.
- Use least-privilege API keys and rotate them when team membership changes.
