Pilot 10-minute Quickstart (after you have a key)
Scope: CMS partner path (Consent Infrastructure).
Assumption: company exists, policy published for that ledger, you already have an API key + base URL.
Goal: grant → feed → Link JWT receipt → verify — in about 10 minutes once onboarded.
Ledger note: smm_test_ can grant + pull feed. Link JWT receipt / seal is live-ledger (smm_live_) — test mode does not enqueue proof.pending. For the full 10‑min trust path use a live key (after portal live gates).
Trust tiers (for context):
| Tier | Meaning |
|---|---|
| T0 | Ledger event hash + Merkle seal (source of truth) |
| T1 | Chained EdDSA Evidence Link JWT + receipts |
| T2 | RFC 3161 TSA timestamp |
Clock
| Minute | You do |
|---|---|
| 0–2 | Set SAMMATI_BASE_URL + SAMMATI_API_KEY |
| 2–4 | POST /v1/consents/grant (or SDK consents.grant) |
| 4–7 | Wait briefly for seal; GET /v1/consents/feed; fetch Link JWT receipt |
| 7–10 | GET /v1/evidence-links/jwks + POST /v1/evidence-links/verify-jwt |
You’re integrated when: grant returns eventId/consentId, feed shows the subject, receipt JWT verifies against JWKS / verify endpoint.
Env
export SAMMATI_BASE_URL=http://127.0.0.1:3000 # or your staging URL
export SAMMATI_API_KEY=smm_live_… # live key for seal + Link JWT
Health check:
curl -sS "$SAMMATI_BASE_URL/readyz"
Path A — curl (no SDK)
1. Grant
STAMP=$(date +%s)
curl -sS -X POST "$SAMMATI_BASE_URL/v1/consents/grant" \
-H "authorization: Bearer $SAMMATI_API_KEY" \
-H "content-type: application/json" \
-H "idempotency-key: qs-grant-$STAMP" \
-d "{
\"external_user_id\": \"qs-user-$STAMP\",
\"purpose_code\": \"KYC\",
\"policy_ref\": \"policy-v1\",
\"policy_version\": 1,
\"occurred_at\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"
}"
Save eventId and consentId from the JSON body.
2. Feed (compliance metadata only)
curl -sS "$SAMMATI_BASE_URL/v1/consents/feed?limit=50" \
-H "authorization: Bearer $SAMMATI_API_KEY"
Envelope is { "results": [...], "nextCursor": ... } — not items.
user_id = your external_user_id (customer reference). No email/phone/PAN required.
3. Link JWT receipt (after seal — usually seconds)
EVENT_ID=… # from grant
curl -sS "$SAMMATI_BASE_URL/v1/evidence-links/events/$EVENT_ID/receipt" \
-H "authorization: Bearer $SAMMATI_API_KEY"
4. JWKS + verify
curl -sS "$SAMMATI_BASE_URL/v1/evidence-links/jwks"
curl -sS -X POST "$SAMMATI_BASE_URL/v1/evidence-links/verify-jwt" \
-H "authorization: Bearer $SAMMATI_API_KEY" \
-H "content-type: application/json" \
-d "{\"token\":\"<compact_jws from receipt>\"}"
Optional bind check: pass event_hash / merkle_root from the sealed event/batch when you have them.
Path B — SDK (@sammati/server-sdk)
Install with npm install @sammati/server-sdk, or use the workspace package after npm install at the repo root.
Runnable sketch: SDK examples
import { createSammatiClient } from "@sammati/server-sdk";
const client = createSammatiClient({
apiKey: process.env.SAMMATI_API_KEY!,
baseUrl: process.env.SAMMATI_BASE_URL, // if supported by your client config
environment: "test",
});
const grant = await client.consents.grant({ /* … */ });
const feed = await client.consents.feed({ limit: 50 });
const receipt = await client.evidenceLinks.getReceipt({ eventId: grant.eventId });
const verified = await client.evidenceLinks.verifyJwt({ token: receipt.compact_jws });
const jwks = await client.evidenceLinks.getJwks();
Also see: Consent Integration.
Timed smoke (optional)
With API up and a real key:
SAMMATI_BASE_URL=http://127.0.0.1:3000 \
SAMMATI_API_KEY=smm_test_… \
npm run smoke:pilot-quickstart
Full trust + revoke + webhook + soak (ops proof, not the 10‑min partner path):
npm run smoke:pilot-trust
Checklist — “you’re integrated when…”
-
readyzOK - Grant returns
eventId+consentId - Feed contains
user_id+ purpose + status - Receipt returns
compact_jws -
verify-jwt→valid: true(and JWKS lists thekid)
Next: Production Checklist.
Next product lane (separate repo): compliance portal Connect SAMMATI — not this Quickstart.