Co-authored-by: Hanzo Dev <[email protected]>
@luxwallet/sdk
The unified Lux Wallet shared core. One TypeScript codebase that the web wallet, the browser extension, and (via WASM/UniFFI) the native iOS/Android wallets build on — so chain metadata, RPC routing, crypto, the account model, and tx construction are defined once.
MIT licensed. pnpm workspace.
Architecture
@luxwallet/sdk is an umbrella that re-exports independent modules. Use
the umbrella for convenience, or depend on a single module directly for
tighter trees.
| Package | What it is | Status |
|---|---|---|
@luxwallet/chains |
Chain registry — ONE source of truth. Emits chains.json for native consumers. |
real |
@luxwallet/rpc |
Gateway RPC client: https://<gateway>/v1/rpc/<chainId>. |
real |
@luxwallet/crypto |
Facade over the luxfi/crypto C core (classical + PQ). |
interface real, impl pending WASM/native bind |
@luxwallet/keyring |
Account model + keystore (classical + ML-DSA-65 + SLH-DSA recovery). | store real, crypto calls pending |
@luxwallet/tx |
Per-VM unsigned-tx builders. EVM + Solana/XRP/TON/Bitcoin real; Polkadot/Cardano partial (caller-supplied chain state); Lux P/X/UTXO/ZK stubbed. | 5 ready, 2 partial, Lux-native todo |
@luxwallet/sdk |
Umbrella barrel re-exporting the modules. | real |
connect / SIWx is a separate module
Wallet connection + Sign-In-With-X lives in its own repo,
luxwallet/connect — npm
@luxwallet/connect, Go github.com/luxwallet/connect/go. This SDK does
not duplicate or vendor it. Install it alongside and import it directly:
pnpm add @luxwallet/sdk @luxwallet/connect
import { chains, rpc, tx } from "@luxwallet/sdk";
import { /* SIWx */ } from "@luxwallet/connect";
Cross-language plan
The same primitives reach native wallets without a second implementation:
- JS (web + extension):
luxfi/cryptocompiled to WASM, wrapped to the@luxwallet/cryptoCryptoBackendinterface and injected viasetBackend. - Native (iOS/Android):
luxfi/cryptobound via UniFFI over its C ABI, exposing the identicalCryptoBackend. - Chain data:
@luxwallet/chainsemitschains.json; Kotlin/Swift read that artifact so every platform keys on the same chain ids. - UI lives in a separate repo,
luxwallet/ui, built on@hanzo/gui. This SDK is headless.
The crypto used by the wallet is the same luxfi/crypto the chain uses —
never @noble/post-quantum, never a hand-rolled precompile wire format. See
packages/crypto/LLM.md.
Develop
pnpm install # workspace install
pnpm -r typecheck # tsc --build across all packages (project refs)
pnpm -r test # vitest across all packages
pnpm verify # license/dep hygiene gate (no @noble PQ, no GPL)
pnpm chains:emit # regenerate packages/chains/chains.json
Each package is @luxwallet/<name>, MIT, ESM, with a react-native +
browser/default export condition so native runtimes can consume it.
Status
Scaffold. The registry, RPC routing, and the EVM unsigned-tx builder are
real and tested. The crypto facade and keyring define exact interfaces with
stubs that throw "not yet bound"; the WASM/native crypto binding and the
non-EVM tx builders are tracked in each package's LLM.md.