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

vocap-client

v0.1.0

Published

Browser-safe helpers for integrating VOCAP private STRK20 actions with a user-controlled Starknet wallet.

Downloads

0

Readme

vocap-client

vocap-client is the browser-safe integration boundary for VOCAP. It keeps private note discovery and proof building in the official Starknet Privacy SDK, then validates the resulting apply_actions call before handing it to a connected Starknet wallet.

The package contains public addresses and policy values only. It never accepts a private key, viewing key, note witness, or proof-signing secret.

Install

After the package is published to npm:

npm install [email protected] [email protected]

The official PRIVACY-0.14.3-RC.2 SDK is currently distributed from the Starknet Privacy release, not the public npm registry. Keep that dependency pinned to the verified RC2 release in the integrating application. The VOCAP client accepts its result structurally, so it does not create a second SDK or silently select another revision.

For local development from this repository:

cd packages/vocap-client
npm install
npm test

Browser quickstart

Create one client from the reviewed deployment values. Pass the connected wallet account and the callAndProof result returned by the pinned RC2 SDK.

import { createVocapClient } from "vocap-client";

const vocap = createVocapClient({
  network: "sepolia",
  routerAddress: "0x0356...",
  poolAddress: "0x0254...",
  policyId: 1n,
  tokenAddress: "0x04718f...",
  amount: 1_000_000_000_000_000_000n,
  targetAddress: "0x0499...",
  selector: "0x...",
  targetCalldata: [],
  backendUrl: "https://your-indexer.example",
});

// `sdkResult` comes from PRIVACY-0.14.3-RC.2 after the client-side
// discovery, proof, and invoke builder steps.
const submission = await vocap.submitPrivateResult(walletAccount, sdkResult);
console.log(submission.transactionHash);

// Optional. Register only the public transaction hash with the projection API.
await vocap.registerRouterExecution(submission.transactionHash);

The default submission check requires sdkResult.call.contractAddress to match the configured pool and requires the entrypoint to be apply_actions. Pass transactionDetails when the wallet needs an explicit nonce, fee, or resource bounds. The wallet still shows its normal approval prompt and signs the transaction.

Build the SDK callback directly

Apps that already own the privacy SDK builder can use the lower-level callback:

const buildRouterCall = vocap.createInvokeCallBuilder();

const routerCall = buildRouterCall({
  withdrawals: [{ recipient: vocap.routerAddress, token: tokenAddress, amount: 1n }],
  openNotes: [{ noteId, token: tokenAddress }],
});

The callback rejects multiple withdrawals, multiple open notes, wrong token, wrong amount, wrong Router recipient, and a zero return-note id. The Router calldata uses the reviewed V1 order:

policy_id, token, amount, open_note_id, target, selector,
target_calldata_length, target_calldata...

Public projection API

When backendUrl is set, the client provides typed helpers for the public projection routes:

  • getPolicy() reads the configured policy.
  • listExecutions({ limit, cursor }) reads finalized public executions.
  • getTransaction(txHash) reads a registered lifecycle row.
  • registerRouterExecution(txHash) registers a public Router transaction hash.

The backend remains read-only with respect to private capability material. A projection API response is delayed operational state. The chain receipt remains authoritative for transaction success.

Package boundary

This package does not discover notes, hold a viewing key, run the prover, or submit a transaction with a private signer. Use the pinned official RC2 SDK in the browser for private state and use a connected Starknet wallet for approval. The package can be published independently because it has no dependency on VOCAP's PostgreSQL indexer or server runtime.