Home
Learn

How It Works

Tokenomics

Roadmap

Humanitarian Impact Fund

FAQ

Products

Wallet

DEX

LaunchPad

Token Factory

Vaults

Company

About

Contact

Buy JIL
← Back to Documentation
Developer SDK Guide All Documentation →

Developer SDK Guide

Complete SDK reference for building on JIL Sovereign. REST APIs, WebSocket streams, client libraries, authentication, code examples, and quickstart tutorials for institutional settlement integration.

Technical Reference JIL Sovereign February 2026

Quick Start

Get up and running with the JIL API in under 5 minutes.

Base URLs

EnvironmentBase URL
Productionhttps://api.jilsovereign.com
Devnethttps://devnet-api.jilsovereign.com
Local (Docker)http://wallet-api:8002

Your First API Call

// Check API health const response = await fetch('https://api.jilsovereign.com/health'); const data = await response.json(); console.log(data); // { ok: true, service: 'wallet-api', ts: '2026-02-02T...' }

Create a Wallet & Send Payment

// 1. Register a new user const register = await fetch('/auth/register', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ email: 'user@example.com', password: 'SecurePass123!' }) }); const { token, accountId } = await register.json(); // 2. Get payment options (includes passkey challenge) const options = await fetch('/wallet/send/options', { method: 'POST', headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ to: '@alice.jil', // or wallet address asset: 'JIL', amount: '100.00' }) }); // 3. Sign with WebAuthn and submit const { challenge, txIntent } = await options.json(); const credential = await navigator.credentials.get({ publicKey: challenge }); const result = await fetch('/wallet/send/submit', { method: 'POST', headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ txIntent, credential }) }); const { txId, receipt } = await result.json(); console.log('Transaction ID:', txId);

Authentication

JIL supports multiple authentication methods for different use cases.

Authentication Methods

MethodUse CaseSecurity Level
JWT Bearer TokenAPI access after loginStandard
WebAuthn/PasskeysTransaction signingHigh (phishing-resistant)
OAuth 2.0Social login (Google, Apple)Standard
API KeysServer-to-server (Settlement API)High

JWT Authentication

// Login to get JWT token const login = await fetch('/auth/login', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ email: 'user@example.com', password: 'SecurePass123!' }) }); const { token } = await login.json(); // Use token in subsequent requests const balances = await fetch('/wallet/balances', { headers: { 'Authorization': `Bearer ${token}` } });

WebAuthn/Passkey Registration

// 1. Get registration options from server const optionsRes = await fetch('/auth/passkey/register/options', { method: 'POST', headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' } }); const options = await optionsRes.json(); // 2. Create credential using WebAuthn API const credential = await navigator.credentials.create({ publicKey: options.publicKey }); // 3. Send credential to server for verification await fetch('/auth/passkey/register/verify', { method: 'POST', headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ id: credential.id, rawId: bufferToBase64(credential.rawId), response: { clientDataJSON: bufferToBase64(credential.response.clientDataJSON), attestationObject: bufferToBase64(credential.response.attestationObject) } }) });
Passkeys are required for Protected and Premium zone transactions. They provide phishing-resistant authentication bound to the user's device.

Wallet API

The Wallet API handles user accounts, balances, payments, and recovery ceremonies.

Endpoints

MethodEndpointDescription
POST/auth/registerRegister new user
POST/auth/loginLogin with email/password
GET/wallet/balancesGet account balances
POST/wallet/send/optionsGet payment options with challenge
POST/wallet/send/submitSubmit signed payment
GET/api/proof/tx/:txIdGet transaction proof receipt
GET/handle/resolve/:handleResolve @handle to address
POST/handle/registerRegister @username.jil handle

Get Balances

const response = await fetch('/wallet/balances', { headers: { 'Authorization': `Bearer ${token}` } }); const balances = await response.json(); // { // accountId: "acc_123...", // zone: "protected", // assets: [ // { symbol: "JIL", balance: "1000.00", usdValue: "2500.00" }, // { symbol: "USDC", balance: "500.00", usdValue: "500.00" } // ] // }

Handle Resolution

// Resolve @alice.jil to wallet address const response = await fetch('/handle/resolve/alice.jil'); const { address, profile } = await response.json(); // { address: "jil1abc123...", profile: { avatar: "...", displayName: "Alice" } }

Recovery Ceremony

If a user loses access, guardians can help recover their account:

// 1. Start recovery ceremony const start = await fetch('/wallet/recovery/start', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ accountId: 'acc_123...', newCredentialCommitment: '0x...' // Hash of new passkey }) }); const { ceremonyId } = await start.json(); // 2. Guardians approve (2-of-3 required) await fetch('/wallet/recovery/approve', { method: 'POST', body: JSON.stringify({ ceremonyId, guardianSignature: '...' // Ed25519 signature }) }); // 3. After 24h timelock, finalize await fetch('/wallet/recovery/finalize', { method: 'POST', body: JSON.stringify({ ceremonyId }) });

Ledger API (L1)

Direct access to the JIL-5600 ledger for account state and transaction submission.

Base URL

EnvironmentURLPort
Productionhttps://ledger.jilsovereign.com8081
Local (Docker)http://ledger-service:80818081

Endpoints

MethodEndpointDescription
GET/state/accounts/:idGet account state
GET/state/accounts/:id/balancesGet account balances
GET/state/accounts/:id/nonceGet account nonce
POST/tx/paymentSubmit payment transaction
GET/tx/receipt/:idGet transaction receipt
GET/amm/statusGet AMM market status
POST/amm/preflightPreflight order check

Get Account State

const response = await fetch('https://jilsovereign.com/api/ledger/state/accounts/acc_123'); const account = await response.json(); // { // id: "acc_123", // zone: "protected", // credentialCommitment: "0x...", // frozen: false, // containment: false, // guardians: ["guardian1", "guardian2", "guardian3"], // nonce: 42 // }

AMM Preflight Check

// Check if order would be accepted before submitting const preflight = await fetch('/amm/preflight', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ entityId: 'acc_123', orderType: 'market', side: 'buy', baseAsset: 'JIL', quoteAsset: 'USDC', amount: '1000' }) }); const result = await preflight.json(); // { // allowed: true, // estimatedPrice: "2.50", // estimatedSlippage: "0.1%", // complianceStatus: "passed", // riskFlags: [] // }

Launchpad API

Create and participate in Liquidity Bootstrapping Pool (LBP) auctions.

Endpoints

MethodEndpointDescription
GET/v1/lbp/auctionsList all auctions
POST/v1/lbp/auctionsCreate new auction
POST/v1/lbp/auctions/:id/bidPlace bid
POST/v1/lbp/auctions/:id/closeClose auction
GET/v1/lbp/auctions/:id/receiptGet auction receipt

Create LBP Auction

const auction = await fetch('/v1/lbp/auctions', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ name: 'My Token Launch', tokenSymbol: 'MTK', totalSupply: '1000000', startPrice: '10.00', endPrice: '1.00', duration: 86400, // 24 hours in seconds vestingPeriod: 2592000 // 30 days }) }); const { auctionId } = await auction.json();

Place Bid

const bid = await fetch(`/v1/lbp/auctions/${auctionId}/bid`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ bidder: 'acc_123', amount: '1000', // USDC amount maxPrice: '5.00' // Max price willing to pay }) });

Settlement API (B2B)

The Institutional Settlement API enables banks, payment processors, and financial institutions to submit, track, and reconcile settlements on the JIL settlement protocol. This is a server-to-server API with API key authentication, not consumer-facing.

Base URL: https://api.jilsovereign.com/v1 (Production)  |  https://api-sandbox.jilsovereign.com/v1 (Sandbox)
Port: 8110  |  Auth: API Key + optional HMAC signing
Full Reference: Settlement API Specification

Authentication

All requests require an x-api-key header. For production environments, HMAC request signing is also required for tamper-proof request verification.

// Required header x-api-key: sk_live_your_api_key_here // Optional HMAC signing (required when REQUIRE_HMAC=true) x-timestamp: 1739097600 x-signature: sha256=HMAC-SHA256(secret, method + path + timestamp + sha256(body))

Client Tiers

TierRate LimitBatch SizeUse Case
Standard60 req/minUp to 25Small institutions, testing
Premium300 req/minUp to 50Mid-size banks, payment processors
Enterprise6,000 req/minUp to 100Large banks, high-volume settlement

Endpoints Overview

MethodEndpointDescription
POST/v1/settlementsSubmit a single settlement
POST/v1/settlements/batchSubmit batch of 1-100 settlements
GET/v1/settlements/:idGet settlement status and details
GET/v1/settlements/:id/proofGet cryptographic finality proof
GET/v1/settlements/batch/:batch_idGet batch summary
GET/v1/reconciliation/transactionsQuery settlements with filters
POST/v1/webhooksCreate webhook subscription
GET/v1/webhooksList webhook subscriptions
DELETE/v1/webhooks/:idRemove webhook subscription

Submit a Settlement

const response = await fetch('https://api.jilsovereign.com/v1/settlements', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-api-key': 'sk_live_your_api_key_here' }, body: JSON.stringify({ external_id: 'TXN-2026-0209-001', from_account: 'jil1bankA_treasury', to_account: 'jil1bankB_operations', asset: 'JIL', amount: '250000.00', zone_id: 'zone-us-east', memo: 'Cross-border settlement Q1-2026' }) }); // Response: 201 Created { "id": "stl_a1b2c3d4e5f6", "status": "received", "external_id": "TXN-2026-0209-001", "created_at": "2026-02-09T14:30:00.000Z" }

Check Settlement Status

const status = await fetch( 'https://api.jilsovereign.com/v1/settlements/stl_a1b2c3d4e5f6', { headers: { 'x-api-key': 'sk_live_your_api_key_here' } } ); // Response shows full lifecycle { "id": "stl_a1b2c3d4e5f6", "status": "final", "from_account": "jil1bankA_treasury", "to_account": "jil1bankB_operations", "asset": "JIL", "amount": "250000.00", "l1_tx_id": "0xabc123...", "l1_block_height": 1847293, "confirmations": 6, "finalized_at": "2026-02-09T14:30:09.000Z" }

Settlement Lifecycle

Every settlement progresses through a defined state machine. The typical flow for a successful settlement takes approximately 9 seconds (6 block confirmations at 1.5s each).

StateDescriptionNext States
receivedSettlement accepted, queued for compliancecompliance_check
compliance_checkZK compliance verification in progresssubmitted, rejected
submittedTransaction submitted to settlement ledgerconfirmed, failed
confirmedIncluded in a block, accumulating confirmationsfinal, failed
final6+ confirmations, cryptographic finality achieved(terminal)
rejectedCompliance check denied the transaction(terminal)
failedL1 error or timeout (60s)(terminal)

Webhook Events

Subscribe to real-time settlement lifecycle events via webhooks. All webhook payloads are signed with HMAC-SHA256 for verification.

// Create a webhook subscription const webhook = await fetch('https://api.jilsovereign.com/v1/webhooks', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-api-key': 'sk_live_your_api_key_here' }, body: JSON.stringify({ url: 'https://your-bank.com/webhooks/jil-settlement', events: ['SETTLEMENT_FINAL', 'SETTLEMENT_FAILED', 'SETTLEMENT_REJECTED'] }) }); // Response includes the signing secret (shown only once) { "id": "wh_x1y2z3", "secret": "whsec_abc123...", "events": ["SETTLEMENT_FINAL", "SETTLEMENT_FAILED", "SETTLEMENT_REJECTED"] }

Reconciliation

Query historical settlements with filters for reconciliation and reporting. Supports cursor-based pagination for large result sets.

// Query settlements with filters const report = await fetch( 'https://api.jilsovereign.com/v1/reconciliation/transactions?' + new URLSearchParams({ status: 'final', asset: 'JIL', from_date: '2026-02-01', to_date: '2026-02-09', limit: '50' }), { headers: { 'x-api-key': 'sk_live_your_api_key_here' } } ); // Response includes summary and paginated results { "settlements": [...], "summary": { "total_count": 1847, "total_amount": "45230000.00", "by_status": { "final": 1847 } }, "next_cursor": "eyJpZCI6InN0bF8..." }
Full API Reference: For complete endpoint documentation including request/response schemas, error codes, HMAC signing details, and batch processing, see the Institutional Settlement API Specification.

Explorer API

Query blockchain data for block explorers and analytics.

Coming Soon: The Explorer API is currently in development. Basic health endpoints are available.

Planned Endpoints

MethodEndpointDescription
GET/blocksList recent blocks
GET/blocks/:heightGet block by height
GET/transactionsList recent transactions
GET/transactions/:hashGet transaction details
GET/accounts/:addressGet account details
GET/validatorsList validators

SDKs & Libraries

Official SDKs

LanguagePackageStatus
JavaScript/TypeScript@jil-sovereign/sdkAvailable
Pythonjil-sovereign-sdkComing Soon
Rustjil-sovereign-rsComing Soon
Gojil-sovereign-goComing Soon

JavaScript SDK Installation

npm install @jil-sovereign/sdk # or yarn add @jil-sovereign/sdk

SDK Usage

import { JILClient } from '@jil-sovereign/sdk'; // Initialize client const client = new JILClient({ baseUrl: 'https://api.jilsovereign.com', network: 'mainnet' // or 'devnet' }); // Authenticate await client.login('user@example.com', 'password'); // Get balances const balances = await client.wallet.getBalances(); // Send payment const tx = await client.wallet.send({ to: '@alice.jil', asset: 'JIL', amount: '100' }); // Wait for confirmation const receipt = await client.waitForReceipt(tx.id); console.log('Confirmed in block:', receipt.blockHeight);

Error Handling

Error Response Format

{ "error": { "code": "INSUFFICIENT_BALANCE", "message": "Account has insufficient balance for this transaction", "details": { "required": "100.00", "available": "50.00", "asset": "JIL" } } }

Common Error Codes

CodeHTTP StatusDescription
UNAUTHORIZED401Missing or invalid authentication
FORBIDDEN403Insufficient permissions
NOT_FOUND404Resource not found
INSUFFICIENT_BALANCE400Not enough funds
ACCOUNT_FROZEN403Account is frozen
PASSKEY_REQUIRED403Transaction requires passkey signature
COMPLIANCE_FAILED403KYC/AML check failed
RATE_LIMITED429Too many requests

Rate Limits

TierRequests/minBurst
Anonymous6010
Authenticated30050
Enterprise6,000500

Rate Limit Headers

X-RateLimit-Limit: 300 X-RateLimit-Remaining: 295 X-RateLimit-Reset: 1706889600
Need higher limits? Contact us at contact@jilsovereign.com for enterprise access.