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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@superid-chain/superid-agent-sdk

v0.1.0

Published

High-level JS/TS SDK for SuperID agent core (crypto, DID, DIDComm, VC, PoA, vault, IPFS) built on top of the WASM crate.

Downloads

99

Readme

SuperID JavaScript SDK Unified JS/TS Wrapper for SuperID Agent Core (WASM)

Package: @superid-chain/superid-sdk

SuperID SDK provides a universal JavaScript interface over the SuperID Agent Core (Rust → WASM).

It works seamlessly in:

Node.js (backend, servers, AWS Lambda)

Browser (React + Vite + Tailwind)

Secure DID-based workflows

DIDComm v2 encrypted messaging

PoA blockchain signing / verification

Vault-based key management

IPFS CID generation

Verifiable Credentials (partial)

This SDK wraps the complex WASM calls with safe JSON APIs, including automatic error normalization, WASM panic handling, and BigInt-safe serialization.

Installation Node.js / AWS Lambda npm install @superid-chain/superid-sdk

React / Vite npm install @superid-chain/superid-sdk buffer

Add buffer polyfill for browser:

vite.config.js import { defineConfig } from "vite";

export default defineConfig({ resolve: { alias: { buffer: "buffer" } } });

In your React entry file (main.tsx / index.tsx): import { Buffer } from "buffer"; window.Buffer = Buffer;

Quick Start (Node.js) import * as superid from "@superid-chain/superid-sdk";

// Generate Ed25519 keypair const kp = superid.ed25519Keygen();

// Sign + verify const sig = superid.ed25519Sign(kp.handle, "hello superid"); const ok = superid.ed25519Verify({ public_b64u: kp.public_b64u, sig_b64u: sig.sig_b64u, plaintext_utf8: "hello superid" });

Core Features

  1. Cryptography Ed25519 const kp = superid.ed25519Keygen(); const sig = superid.ed25519Sign(kp.handle, "hello"); const verify = superid.ed25519Verify({ public_b64u: kp.public_b64u, sig_b64u: sig.sig_b64u, plaintext_utf8: "hello", });

X25519 const xkp = superid.x25519Keygen();

  1. DIDComm v2 Messaging Anoncrypt const enc = superid.didcommAnonEncrypt({ recipient_x25519_pub_b64u: xkp.public_b64u, plaintext_utf8: "hello didcomm" });

Decrypt const dec = superid.didcommAnonDecrypt({ recipient_x25519_secret_b64u: xkp.secret_b64u, jwe_json: JSON.stringify(enc) });

Authcrypt const auth = superid.didcommAuthEncrypt({ sender_x25519_handle: xkp.handle, recipient_x25519_pub_b64u: xkp.public_b64u, plaintext_utf8: "secure hello" });

  1. DID & DID Document

Create DID from Ed25519 key:

const did = superid.didFromEd25519Pub(kp.public_b64u);

Build DID Document:

const doc = superid.didSuperidBuildDoc({ ed25519_public: kp.public_b64u, x25519_public: xkp.public_b64u, serviceEndpoint: "https://example.superid.dev/didcomm" });

  1. Secure Vault (XC20P AEAD) Create VMK const vmk = superid.vaultVmkRandom();

Create vault const vault = superid.vaultCreate(vmk.vmk_b64u);

Add key const updated = superid.vaultAddKey({ vmk_b64u: vmk.vmk_b64u, state_json: vault.state_json, label: "org-signing-key", key_type: "ed25519", secret_b64u: kp.secret_seed_b64u });

  1. PoA Blockchain Transaction Signing Transaction hash const tx = { kind: "demo-tx", payload: { from: did, nonce: 1, timestamp: Date.now() } };

const hash = superid.txHash(tx);

Sign block header const sig = superid.blockSign(kp.handle, { height: 1, timestamp: Date.now(), tx_root: hash.sha256_b64u });

Verify block const verify = superid.blockVerify( { header: { ... }, signature: sig.sig_b64u }, { requiredSigners: [did], threshold: 1 } );

  1. IPFS CID Generation const cid = superid.ipfsCidFromHash(hash.sha256_b64u);

  2. DIDComm Message Create + Validate Build message const msg = superid.didcommBuildMessage({ typ: "https://didcomm.org/basicmessage/1.0/message", body: { hello: "world", did } });

Validate superid.didcommValidateMessage(JSON.stringify(msg));

Known Limitations (from WASM Core)

Some functions in Rust core are not implemented or return WASM panics:

Feature Status DIDDoc sign Not implemented DIDDoc verify Not implemented StatusList VC Partial Manifest Sign Partial DIDComm unpack w/ handles May require import

Your SDK safely normalizes and returns:

{ "error": { "code": "wasm_panic", "message": "unreachable" } }

Project Structure /src index.ts superidAgentCore.ts

/dist index.js (ESM) index.cjs (CommonJS) index.d.ts (TypeScript Types)

/examples /node-smoke-test

Contributing

Pull requests and issues are welcome.

Support

SuperID & DIDComm enterprise integration support [email protected]