@wisp_/demo
v0.2.1
Published
Demo issuer helpers and mock KYC clients for Wisp
Readme
@wisp_/demo
Demo issuer helpers and mock KYC clients for Wisp. Use these to fetch demo proof packages and exercise a mock KYC lifecycle against the reference issuer-service — useful for local development, walkthroughs, and tests.
Demo / development helper only. Production integrations use
@wisp_/client'sHttpIssuerAdapteragainst a real issuer API.Beta / demo release only. Intended for evaluation and local or testnet walkthroughs.
Install
npm install @wisp_/[email protected]Quick start
import { DemoIssuerClient } from "@wisp_/demo";
const issuer = new DemoIssuerClient("http://127.0.0.1:3000");
// Fetch a ready-to-prove demo transfer package
const pkg = await issuer.getDemoTransfer();
// Drive the mock KYC lifecycle
const challenge = await issuer.requestMockKycChallenge(wallet);
const submitted = await issuer.submitMockKyc({ /* … */ });
const status = await issuer.getMockKycStatus(wallet);API surface
| Export | Purpose |
| ------ | ------- |
| DemoIssuerClient | Demo proof packages + mock KYC lifecycle client |
Methods: getDemoTransfer, createDemoTransfer, requestMockKycChallenge, submitMockKyc, getMockKycStatus, addCorridorDestination, publishIssuerRoots.
Types: MockKycChallengeResponse, MockKycStatusResponse, MockKycSubmitRequest, MockKycSubmitResponse, MockKycLifecycleStatus, PublishRootsResponse, CorridorDestinationRecord, …
HTTP issuer service
Run the Rust issuer-service alongside this client:
export ISSUER_API_TOKEN=demo-token
export ISSUER_PUBLIC_URL=http://127.0.0.1:3000
export COMPLIANCE_CONTRACT_ID=…
export ISSUER_PUBLIC_KEY=…
cargo run -p issuer-serviceThis package expects the demo fixture and mock-KYC endpoints from the reference issuer-service. It is not a production issuer client.
Build from source
pnpm build:js
pnpm --filter @wisp_/demo typecheckRelated
- Production transports:
@wisp_/client - Transfer orchestration:
@wisp_/flows - Umbrella SDK:
@wisp_/sdk(also@wisp_/sdk/demo) - Issuer HTTP service:
backend/crates/issuer-service/
