npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@zk-rwa-kit/client-sdk

v0.1.2

Published

Client SDK for Zk-RWA-Kit: TLS proof generation and submission

Downloads

261

Readme

@zk-rwa-kit/client-sdk

Client SDK for Zk-RWA-Kit. Generate TLSNotary proofs in the browser, extract selective disclosure claims, and submit proofs to a relayer for on-chain SessionCredentials.

Installation

npm install @zk-rwa-kit/client-sdk
# or
pnpm add @zk-rwa-kit/client-sdk

Quick Start

import {
  CLAIM_TYPES,
  DEFAULT_PROVER_URL,
  DEFAULT_RELAYER_URL,
  proveEligibility,
  submitProof,
  waitForConfirmation,
} from '@zk-rwa-kit/client-sdk';

// 1) Generate TLS proof (browser-only)
const prove = await proveEligibility({
  proverUrl: DEFAULT_PROVER_URL,
});
if (!prove.success || !prove.transcript) throw new Error(prove.error);

// 2) Submit proof to relayer
const submit = await submitProof(
  '0x1234567890123456789012345678901234567890',
  prove.transcript,
  { relayerUrl: DEFAULT_RELAYER_URL, claimType: CLAIM_TYPES.ELIGIBLE }
);
if (!submit.success) throw new Error(submit.error);

// 3) Wait for tx confirmation
const confirmation = await waitForConfirmation(submit.txHash!, {
  relayerUrl: DEFAULT_RELAYER_URL,
});
console.log('status:', confirmation.status);

Browser Requirements (Important)

TLSNotary WASM uses SharedArrayBuffer. Your app must be served with COOP/COEP:

Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin

If you deploy on Vercel, add these headers (see examples/*/vercel.json).

Default Endpoints

Defaults are configured for Railway deployments:

  • DEFAULT_PROVER_URL: wss://zk-rwa-prover-production.up.railway.app/prove
  • DEFAULT_RELAYER_URL: https://zk-rwa-kitrelayer-production.up.railway.app

Override them via options if you use local services.

API Reference

proveEligibility(options)

Generates a TLS proof of eligibility in the browser.

Options:

  • proverUrl - WebSocket URL (default: DEFAULT_PROVER_URL)
  • maxSentData - Max bytes sent to server (default: MAX_SENT_DATA)
  • maxRecvData - Max bytes received from server (default: MAX_RECV_DATA)
  • timeout - Milliseconds (default: 120000)
  • demoMode - Use cached proof (default: false)

Returns: ProveResult

submitProof(walletAddress, transcript, options)

Submits the proof to the relayer for verification and on-chain credential.

Options:

  • relayerUrl - Relayer base URL (default: DEFAULT_RELAYER_URL)
  • claimType - Claim type (default: CLAIM_TYPES.ELIGIBLE)
  • extractedValue - Optional override for extracted value
  • timeout - Request timeout in ms

Returns: SubmitResult

checkTransactionStatus(txHash, relayerUrl?)

Returns PENDING | CONFIRMED | FAILED and any error info.

waitForConfirmation(txHash, options?)

Polls the relayer until confirmation or timeout.

Transcript Utilities

import {
  transcriptToString,
  extractClaims,
  extractField,
  parseJsonFromTranscript,
} from '@zk-rwa-kit/client-sdk';

const { received } = transcriptToString(transcript);
const claims = extractClaims(received);
const bankName = extractField(received, 'bank_name');
const json = parseJsonFromTranscript(received);

Constants

import {
  MANTLE_SEPOLIA_CONFIG,
  CLAIM_TYPES,
  DEFAULT_PROVER_URL,
  DEFAULT_RELAYER_URL,
  MAX_SENT_DATA,
  MAX_RECV_DATA,
} from '@zk-rwa-kit/client-sdk';

Types

import type {
  ProveOptions,
  ProveResult,
  SubmitOptions,
  SubmitResult,
  VerifiedTranscript,
} from '@zk-rwa-kit/client-sdk';

Troubleshooting

WebSocket fails to connect

  • Ensure the prover URL is wss:// in production.
  • Make sure COOP/COEP headers are set.
  • Check that the prover exposes /prove and your host allows WebSocket.

Relayer says "token missing"

  • Set RWA_TOKEN_ADDRESS (mUSDY) in the relayer environment.

"Transfer not compliant"

  • Make sure the recipient has an on-chain SessionCredential.

License

MIT