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

@auths-dev/sdk

v0.1.0

Published

Node.js bindings for the Auths decentralized identity SDK

Readme

Auths Node SDK

Decentralized identity for developers and AI agents. Sign, verify, and manage cryptographic identities with Git-native storage.

Install

npm install @auths-dev/sdk

Quick start

import { Auths, verifyAttestation } from '@auths-dev/sdk'

const auths = new Auths()

// Verify an attestation
const result = verifyAttestation(attestationJson, publicKeyHex)
console.log(result.valid) // true

// Create an identity and sign
const identity = auths.identities.create({ label: 'laptop' })
const sig = auths.signAs({ message: Buffer.from('hello world'), identityDid: identity.did })
console.log(sig.signature) // hex-encoded Ed25519 signature

Identity management

import { Auths } from '@auths-dev/sdk'

const auths = new Auths({ repoPath: '~/.auths' })

// Create a cryptographic identity
const identity = auths.identities.create({ label: 'laptop' })
console.log(identity.did) // did:keri:EBfd...

// Provision an agent (for CI, MCP servers, etc.)
const agent = auths.identities.delegateAgent({
  identityDid: identity.did,
  name: 'deploy-bot',
  capabilities: ['sign'],
})

// Sign using the keychain-stored identity key
const result = auths.signAs({
  message: Buffer.from('hello world'),
  identityDid: identity.did,
})

// Link and manage devices
const device = auths.devices.link({
  identityDid: identity.did,
  capabilities: ['sign'],
})
auths.devices.revoke({
  deviceDid: device.did,
  identityDid: identity.did,
  note: 'replaced',
})

Policy engine

import { PolicyBuilder, evaluatePolicy } from '@auths-dev/sdk'

// Build a standard policy
const policy = PolicyBuilder.standard('sign_commit')

// Evaluate against a context
const decision = policy.evaluate({
  issuer: 'did:keri:EOrg',
  subject: 'did:key:zDevice',
  capabilities: ['sign_commit'],
})
console.log(decision.allowed) // true

// Compose complex policies
const ciPolicy = new PolicyBuilder()
  .notRevoked()
  .notExpired()
  .requireCapability('sign')
  .requireAgent()
  .requireRepo('org/repo')
  .toJson()

Organization management

const org = auths.orgs.create({ label: 'my-team' })

const member = auths.orgs.addMember({
  orgDid: org.orgDid,
  memberDid: devIdentity.did,
  role: 'member',
  memberPublicKeyHex: devIdentity.publicKey,
})

const members = auths.orgs.listMembers({ orgDid: org.orgDid })

Verification

import {
  verifyAttestation,
  verifyChain,
  verifyAttestationWithCapability,
} from '@auths-dev/sdk'

// Single attestation
const result = verifyAttestation(attestationJson, issuerPublicKeyHex)

// Attestation chain
const report = verifyChain(attestationChain, rootPublicKeyHex)
console.log(report.status.statusType) // 'Valid' | 'Invalid' | ...

// Capability-scoped verification
const capResult = verifyAttestationWithCapability(
  attestationJson, issuerPublicKeyHex, 'sign_commit'
)

Error handling

import { Auths, VerificationError, CryptoError, NetworkError } from '@auths-dev/sdk'

const auths = new Auths()
try {
  const result = auths.signAs({ message: data, identityDid: did })
} catch (e) {
  if (e instanceof CryptoError) {
    console.log(e.code)    // 'key_not_found'
    console.log(e.message) // 'No key found for identity...'
  }
  if (e instanceof NetworkError && e.shouldRetry) {
    // safe to retry
  }
}

All errors inherit from AuthsError and carry .code and .message.

Configuration

// Auto-discover (uses ~/.auths)
const auths = new Auths()

// Explicit repo path
const auths = new Auths({ repoPath: '/path/to/identity-repo' })

// With passphrase (or set AUTHS_PASSPHRASE env var)
const auths = new Auths({ passphrase: 'my-secret' })

// Headless / CI mode
// Set AUTHS_KEYCHAIN_BACKEND=file for environments without a system keychain

License

Apache-2.0