Submit verify_and_execute to the on-chain contract in one call.
@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.
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.
@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:
import { policyHash } from "@nullis/core";import { buildRequest, addrToField } from "@nullis/sdk";const req = buildRequest({ policyId, policyHash: pHash, policyVersion: 1, approvedRoot, appDomainHash, policyExpiry, networkId, nullisContract, credentialSecret, action: { actionType, recipient, amount, asset, consumingContract, intentNonce },});// req.publicInputs.{contextHash, actionId, nullifier} are derived for you
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.