Skip to main content
@nullis/sdk wraps the Soroban contract so you can verify a proof and execute the bound action in a single call. It handles the U256 / struct / Bytes encoding by fetching the contract spec automatically.

Install

One-line integration

The Nullis client

Promise<Policy>
Read the on-chain policy (simulation, no signing).
Promise<boolean>
Read whether a nullifier is already spent (simulation, no signing).
Promise<OnChainReceipt>
Verify a proof and execute the bound action atomically, on-chain. Requires a secretKey. Returns the Privacy Receipt (result: VERIFIED on success, else the reason) — including the submitted transaction hash.

Building a request

@nullis/core and the SDK’s buildRequest compute the canonical public inputs (context_hash, action_id, nullifier) from your policy and action, so you never assemble them by hand:

The receipt

Proven live: NULLIS_SECRET=$(stellar keys show nullis-deployer) node scripts/live-sdk-demo.mjs generates a fresh real proof and submits it in one call — result: VERIFIED, executed: true on testnet.

Core hashing — @nullis/core

poseidon2, commitment, policyHash, contextHash, actionId, nullifier — the canonical structures.