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

@docknetwork/wallet-sdk-web

v0.0.8

Published

A simplified, browser-ready wrapper for the Wallet SDK, specialized for cloud wallet functionality.

Readme

Truvera Web Wallet SDK

A simplified, browser-ready wrapper for the Wallet SDK, specialized for cloud wallet functionality.

Installation

npm install @docknetwork/wallet-sdk-web

or via CDN:

<script src="https://unpkg.com/@docknetwork/wallet-sdk-web/dist/wallet-sdk-web.iife.js"></script>

Usage

The SDK can be used via a global variable (Script Tag) or imported as an ES Module (Bundlers).

[!IMPORTANT] This SDK is designed for browser-side use only.

  1. Client-Side Only: Your wallet keys (mnemonic/master key) decrypt your data locally in the browser. Never send these keys to a server or store them where they can be accessed by third parties.
  2. No Server-Side Operations: Do not use this SDK to initialize wallets or process keys on a backend server. Server-side handling of user keys creates significant security risks and breaks the non-custodial model.
  3. End-to-End Encryption: User data stored in the Cloud Wallet (EDV) is fully encrypted. The decryption key exists only in the user's browser session.
  4. Authentication vs Encryption: The edvAuthKey is strictly for authenticating the client with the storage server. It does not grant access to the encrypted data content; only the user's keys can do that. You can request an edvAuthKey by contacting Truvera support at docs.truvera.io/support.

1. Script Tag (Global)

When loaded via <script>, the SDK exposes a global variable TruveraWebWallet.

<script src="https://unpkg.com/@docknetwork/wallet-sdk-web/dist/wallet-sdk-web.iife.js"></script>
<script>
  window.addEventListener('load', async () => {
    const wallet = await TruveraWebWallet.initialize({ ... });
  });
</script>

2. ES Module (Vite, Webpack, etc.)

You can import the SDK in your modern web application.

// Default import
import TruveraWebWallet from '@docknetwork/wallet-sdk-web';

async function main() {
  const wallet = await TruveraWebWallet.initialize({ ... });
}

Key Generation (Optional)

If you don't have a mnemonic, you can generate a new master key/mnemonic pair using the SDK:

const { masterKey, mnemonic } = await TruveraWebWallet.generateCloudWalletMasterKey();

console.log('Mnemonic:', mnemonic);
console.log('Master Key:', masterKey);

Initialization

const wallet = await TruveraWebWallet.initialize({
    edvUrl: 'https://edv.dock.io',
    edvAuthKey: '<your-auth-key>',
    networkId: 'testnet',
    // Use the mnemonic from generation or your existing one
    mnemonic: mnemonic, // or use masterKey: masterKey
});

const credentials = await wallet.getCredentials();

console.log(credentials);

API Reference

The initialize method returns a wallet object with the following simplified methods:

getCredentials

Get the list of credentials stored in the wallet.

const credentials = await wallet.getCredentials();

Returns: Promise<Array<Object>> - Array of credential objects.


addCredential

Import a credential using an offer URI.

const credential = await wallet.addCredential('openid-credential-offer://...');

Parameters:

  • uri (string): The credential offer URI.

Returns: Promise<Object> - The imported credential.


getDID

Get the default Decentralized Identifier (DID) associated with the wallet.

const did = await wallet.getDID();

Returns: Promise<object> - The DID document.


submitPresentation

Submit a presentation for specific credentials to a proof request URL.

const response = await wallet.submitPresentation({
  credentials: {
    'credential-id-1': { attributesToReveal: ['name', 'email'] }
  },
  proofRequestUrl: 'https://verifier.example.com/proof-request'
});

Parameters:

  • credentials (Object): Map of credential IDs to configuration (e.g., attributesToReveal).
  • proofRequestUrl (string): The URL of the proof request template.

Returns: Promise<Object> - The verification response.