The Meridian SDK is TypeScript-first. Policies are typed, testable, version-controlled, and compiled to deterministic on-chain commitments. The same code runs in your CI as runs in production.
# install
npm install @meridian/sdk
# authenticate
npx meridian login
# scaffold a new policy module
npx meridian init treasury
Every Meridian client gets a typed workspace that mirrors their treasury structure: organizations, multisigs, rules, counterparties. Run policies locally against a forked TON state before promoting.
Policies are explicit. Inputs, outputs, schedules, limits, authorizers. Nothing is implicit, nothing is "the agent decided." Every behavior is locatable in the source — and verifiable on-chain after execution.
// treasury/policies/payroll.ts
import { meridian, USD } from "@meridian/sdk";
import { roster } from "../people/roster";
export const policy = meridian.policy({
name: "payroll-bi-weekly",
authorizers: ["finance-multisig", "cfo-key"],
schedule: meridian.cron("0 12 * * 4/2", "UTC"),
limits: {
perRun: USD(300_000),
perCounterparty: USD(25_000),
cooldownHours: 336, // 14d
},
execute: async ({ pay, log }) => {
for (const employee of roster.active()) {
const tx = await pay(employee.payee, employee.salary, {
rail: "usdt-ton",
memo: `payroll/${employee.id}`,
});
log({ employee: employee.id, tx: tx.hash });
}
},
});
Run policies against a forked TON state with synthetic balances and counterparties. Inspect every transaction Meridian would emit, every signer it would require, every fee it would pay. No wallets touched.
Deploy to a staging environment that uses the same multisig logic and on-chain verification as production, on TON testnet. Production keys never sign staging instructions.
Promotion to production requires a multisig sign-off on the compiled policy hash. The same hash is recorded on-chain. Diffs against the prior policy are surfaced before approval.
Trigger receivables, query balances, and reconcile from any system. All requests use HMAC-signed headers. All webhooks are signed with the protocol's Ed25519 key, rotatable per organization.
$ curl -X POST \
https://api.meridian.fi/v1/instructions \
-H "Authorization: Bearer mrn_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"policy": "weekly-vendor-payouts",
"amount": 12400.00,
"currency": "USDT",
"rail": "usdt-ton",
"counterparty": {
"id": "cp_helix_logistics",
"memo": "INV-2026-0044"
},
"idempotency_key": "inv-2026-0044-payout"
}'
# 202 Accepted
{
"id": "inst_01J9F4Y6Q1H7GZ",
"status": "awaiting_signatures",
"signatures_required": 2,
"signatures_present": 1,
"on_chain": null
}
| Method | Path | Description | Authz |
|---|---|---|---|
| POST | /v1/instructions | Submit a payment instruction for multisig review | api key + multisig |
| GET | /v1/instructions/:id | Read instruction status, signatures, on-chain proof | api key |
| POST | /v1/policies | Register a compiled policy for activation | multisig |
| GET | /v1/policies | List all active and draft policies | api key |
| GET | /v1/balances | Read current balances by asset and policy | api key |
| GET | /v1/counterparties/:id | Inspect counterparty KYB and screening status | api key |
| POST | /v1/counterparties | Register a new counterparty (KYB triggered) | api key |
| GET | /v1/audit/log | Stream the full on-chain audit log for the workspace | api key |
| GET | /v1/reports/reconciliation | Generate a signed reconciliation report (CSV/PDF) | api key |
Reconciled exports for Quickbooks, NetSuite, Xero, and SAP. Signed CSV and PDF reports. Daily, weekly, or per-policy frequency.
SAML SSO via Okta, Microsoft Entra, Google Workspace. SCIM provisioning. Hardware-key MFA enforced.
Fireblocks MPC co-signer. Safe{Wallet} on TON. Ledger and Trezor support for individual signers in smaller orgs.
Meridian's SDK is in private beta. Apply for an API key and a paired engineer for white-glove onboarding.