Skip to main content
CONFIDENTIAL & PROPRIETARY © 2026 Inkwell Finance, Inc. All Rights Reserved. This document is for informational purposes only and does not constitute legal, tax, or investment advice, nor an offer to sell or a solicitation to buy any security or other financial instrument. Any examples, structures, or flows described here are design intent only and may change.

Installation

Install the SDK with your preferred package manager:
The SDK requires @solana/web3.js as a peer dependency:

Basic Setup

Import from the subpath that matches your needs:

Connecting to the Network

Set up a Solana connection and reference the program IDs:
The SDK exports default program IDs for each Leviathan program. You can override these if deploying to a custom environment.

PDA Derivation

Leviathan accounts are stored at program-derived addresses (PDAs). The SDK provides helpers to derive these deterministically:
PDA helpers accept optional programId overrides for testing against custom deployments.

Querying Pool State

Fetch and inspect a lending pool’s on-chain state:

Building Transactions

The SDK provides high-level transaction builders that handle account lookups and instruction composition:

Depositing into a Pool

Withdrawing from a Pool

Querying Credit Scores

Look up a borrower’s on-chain credit score:

Using Low-Level Instructions

For custom transaction flows, use instruction builders directly:

Sui Bindings

Sui bindings for policy and dWallet operations are available through the SDK’s codegen pipeline:
  • Policy-gated dWallet capabilities
  • Destination registry queries
  • Cross-chain signing operations
Sui types are generated from Move contract summaries and provide typed interfaces for all policy enforcement operations.

Next Steps

SDK Reference

Full overview of all SDK exports and capabilities

Protocol Overview

Understand the on-chain programs the SDK interacts with