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

@cooperation/vc-storage

v1.0.44

Published

Sign and store your verifiable credentials.

Downloads

495

Readme

@cooperation/vc-storage

TypeScript utilities to work with storage backends used by Linked Claims: Google Drive and Wallet Aggregated Storage (WAS). Includes a simple factory to construct storage clients and helpers used by the authoring app.

Installation

npm install @cooperation/vc-storage

Exports (selected)

  • GoogleDriveStorage
  • LCWStorage (WAS via @wallet.storage/fetch-client)
  • WASZcapStorage (WAS via zCap delegation)
  • createStorage(kind, options)
  • Misc models: CredentialEngine, Resume, ResumeVC, utils

Storage factory

import { createStorage } from '@cooperation/vc-storage';

// Google Drive
const drive = createStorage('googleDrive', { accessToken });

// WAS (zCap-capability, delegated access)
const wasZ = createStorage('wasZcap', { appInstance, capability });

GoogleDriveStorage (highlights)

import { GoogleDriveStorage } from '@cooperation/vc-storage';

const drive = new GoogleDriveStorage(accessToken);

// Upload binary (images/videos/pdfs)
await drive.uploadBinaryFile({ file }); // -> { id }

// Save JSON file to a specific folder
await drive.saveFile({ data: { fileName: 'VC', mimeType: 'application/json', body: JSON.stringify(vc) }, folderId });

// Retrieve file content
await drive.retrieve(fileId); // -> { id, data }

// Delete
await drive.delete(fileId);

WASZcapStorage (WAS, zCap delegation)

Use when uploading from the browser with delegated capability (zCap).

import { WASZcapStorage } from '@cooperation/vc-storage';

const was = new WASZcapStorage({ appInstance, capability });

// Blob upload (images, pdfs, or JSON-as-blob)
await was.upload({ key: file.name, file }); // -> id or url

// Optional read/delete
await was.read('key.json');
await was.delete('old-file.txt');

Choosing a backend

  • Use WASZcapStorage when you have a zCap capability and an appInstance Ed25519 keypair (delegated, least-privilege).
  • Use GoogleDriveStorage for Drive workflows (e.g., storing VC artifacts/files in Drive).

Notes

  • WAS zCap requests are signed with Ed25519Signature2020 and require a valid invocationSigner.id.
  • There is no implicit fallback between backends; handle errors per backend explicitly in your app.

License

ISC