Skip to main content

Install

Built on viem and @inco/lightning-js. React and the UI kit are optional, the core works anywhere JavaScript runs. Try everything in the live playground before writing any code.

Pick your layer

Core

The v1 addresses ship with the SDK, so pick a network and go:

Node.js

Same client for scripts and backends. Node signs with the key directly, so reads need no session and no popups.
A runnable version lives in the repo at examples/node/run.ts. Running your own deployment? Pass contracts and sessionVerifier to override the built-in addresses.

React hooks

Wrap your app once, then every hook just works:
Available hooks: useCToken, useTokens, useResolvedTokens, useAssets, useBalances, useBalance, usePublicBalance, useDeposit, useApprove, useWithdraw, useConfidentialSend, useDecrypt, useHistory, useChainGuard. They sit on wagmi and react-query, so caching, retries, and wallet state come for free.

UI kit

Prebuilt widgets, themeable, animations included:
ConfidentialWallet is the full experience: portfolio, shield, unshield, send, history. Or compose the pieces yourself: DepositWidget, WithdrawWidget, SendWidget, BalanceCard, PortfolioCard, HistoryList.

Errors and retries

Indexer reads retry transient failures with backoff and honor Retry-After. Balance decrypts isolate failures per handle. Everything throws typed CTokenErrors with stable codes.