JIL SDK

Embeddable SDK

One import to access the full JIL Sovereign platform. TypeScript-first with complete type definitions.

← Delta Innovations

Installation

npm npm install jil-sdk
import { JIL } from "jil-sdk";

Quick Start

Initialize the client with your API key and start settling in three lines of code:

import { JIL } from "jil-sdk"; // Initialize the client const client = JIL.createClient({ apiKey: "your-api-key", environment: "production" // or "sandbox" for testing }); // Execute a settlement const result = await client.settle({ amount: 1000, currency: "USD", from: "US", to: "UAE" }); console.log(result.tx_hash); // 0xabc123...def456 console.log(result.receipt_id); // rcpt_8e2b1a3f console.log(result.status); // "settled"

Available Methods

Method Description Returns
settle() Execute a cross-border settlement SettlementResult
intent() Submit a declarative intent for execution IntentResult
getIntent() Retrieve the status of a submitted intent IntentStatus
receipt() Fetch the cryptographic receipt for a transaction Receipt
verifyReceipt() Verify a receipt cryptographically VerifyResult
risk() Score a transaction for risk before execution RiskScore
verifyIdentity() Verify a DID credential or presentation IdentityResult
optimizeCorridor() Find the optimal route for a cross-border transfer CorridorRoute
checkApproval() Check Bank Safe Mode approval status ApprovalStatus
dashboardSummary() Retrieve the live settlement dashboard summary DashboardData

Examples

Submit an Intent

const intent = await client.intent({ type: "send", amount: 5000, currency: "USD", destination: { country: "BR", account_id: "acct_br_29x8k1" }, constraints: { strategy: "lowest_cost" } }); console.log(intent.intent_id); // int_7f3a9b2c4d1e console.log(intent.status); // "executed"

Score a Transaction

const score = await client.risk({ from_wallet: "0x7Bcff27...aBa2", to_wallet: "0x84fF59...504F", amount: 25000, currency: "USD", corridor: "US-BR" }); if (score.risk_score < 0.25) { // Safe to proceed await client.settle({ ... }); }

Verify a Receipt

const receipt = await client.receipt("tx_9a1b2c3d4e5f"); const verification = await client.verifyReceipt(receipt.receipt_id); console.log(verification.valid); // true console.log(verification.signatures_verified); // 2

Features

TypeScript-First Full type definitions for all methods, parameters, and return types. Autocomplete works out of the box.
Gateway Routing All SDK calls route through the sdk-gateway service, which handles authentication, rate limiting, and request routing.
Sandbox Mode Test against sandbox environment with simulated settlements. No real value moves in sandbox mode.
Error Handling Typed error classes for all failure modes - network errors, validation errors, compliance holds, and insufficient funds.

Gateway

All SDK calls route through the sdk-gateway service, which provides:

  • API key validation and rate limiting
  • Request routing to the appropriate backend service
  • Response normalization and error formatting
  • Usage tracking and analytics
  • Automatic retry with exponential backoff