Developers · SDK v0.4

Treasury policy, expressed as code.

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.

01 — Install Setup in under three minutes
# install
npm install @meridian/sdk

# authenticate
npx meridian login

# scaffold a new policy module
npx meridian init treasury

Workspaces, not silos

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.

  • RuntimeNode.js 20+ · Bun · Deno
  • AuthAPI key + signed device · scoped to environments
  • CLInpx meridian — local simulation, deploy, rollback
  • Sourcegithub.com/meridian-fi/sdk
02 — A policy, end to end Define, simulate, deploy

Code that survives an auditor reading it next quarter.

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 });
    }
  },
});
03 — Lifecycle From local fork to live treasury
01

Simulate

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.

02

Stage

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.

03

Promote

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.

04 — HTTP API For systems that don't speak TypeScript

REST + signed webhooks. No SDK required.

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.

  • Base URLhttps://api.meridian.fi/v1
  • AuthBearer mrn_live_…
  • Webhook signingEd25519. Rotation via console.
  • Rate limit60 req/s per workspace · burst 200
$ 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
}
05 — Endpoints Everything you can call
Method Path Description Authz
POST/v1/instructionsSubmit a payment instruction for multisig reviewapi key + multisig
GET/v1/instructions/:idRead instruction status, signatures, on-chain proofapi key
POST/v1/policiesRegister a compiled policy for activationmultisig
GET/v1/policiesList all active and draft policiesapi key
GET/v1/balancesRead current balances by asset and policyapi key
GET/v1/counterparties/:idInspect counterparty KYB and screening statusapi key
POST/v1/counterpartiesRegister a new counterparty (KYB triggered)api key
GET/v1/audit/logStream the full on-chain audit log for the workspaceapi key
GET/v1/reports/reconciliationGenerate a signed reconciliation report (CSV/PDF)api key
06 — Integrations Where Meridian fits
A

Accounting

Reconciled exports for Quickbooks, NetSuite, Xero, and SAP. Signed CSV and PDF reports. Daily, weekly, or per-policy frequency.

B

Identity

SAML SSO via Okta, Microsoft Entra, Google Workspace. SCIM provisioning. Hardware-key MFA enforced.

C

Custody

Fireblocks MPC co-signer. Safe{Wallet} on TON. Ledger and Trezor support for individual signers in smaller orgs.

Build your treasury
like you build your product.

Meridian's SDK is in private beta. Apply for an API key and a paired engineer for white-glove onboarding.