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

@solidus-network/bridge

v0.2.1

Published

Solidus bridge SDK: credential export ids, bridge message bytes, consent payloads, gate reads and the bridge API client.

Readme

@solidus-network/bridge

The TypeScript side of the Solidus credential bridge. It gives you the ids and message bytes the chain and the mirror contracts agree on, the consent payload a wallet signs, the gate read a dApp runs, and a typed client for the bridge API.

Published on npm as @solidus-network/bridge.

How you know it agrees with the chain

Every byte-level function here is checked against test-fixtures/bridge/*.json. Those files are generated by the Rust crate that the validators run, and the Solidity contracts are checked against the same files. Three implementations, one set of bytes, and none of them builds its own expectation.

Install

npm install @solidus-network/bridge

viem is a peer dependency and is used for TYPES only. If your app already has viem you pay nothing. If it does not, you are not forced to install it.

Export a credential to another chain

The wallet signs a consent payload. Your backend hands it to the Solidus verify backend, which is where this package stops.

import { exportConsentTypedData, holderFromEvmAddress } from '@solidus-network/bridge'

const typedData = exportConsentTypedData(
  {
    credentialId: 'urn:solidus:credential:00ff',
    domain: 11155111,                                  // Sepolia
    holder: holderFromEvmAddress(account.address),
    consentExpiry: BigInt(Math.floor(Date.now() / 1000) + 3600),
  },
  11155111,                                            // the chain id the wallet is on
  mirrorAddress,
)

const signature = await walletClient.signTypedData(typedData)
// POST it to the verify backend with the credential id. The chain does the rest.

The wallet renders the credential id, the destination and the expiry, because this returns typed data rather than a digest. A consent screen the holder cannot read is not consent.

Check a gate before the user pays for a revert

import { checkGate, credentialTypeHash, gateReasonName, holderFromEvmAddress } from '@solidus-network/bridge'

const result = await checkGate({
  client: publicClient,
  mirror: mirrorAddress,
  holder: holderFromEvmAddress(account.address),
  credentialTypeHash: credentialTypeHash('KycL2'),
  issuerDidHash,
  maxAge: 86_400n,
})

if (!result.ok) {
  // 'no_export' | 'not_active' | 'issuer_not_accredited' | 'expired' | 'stale'
  show(`cannot deposit: ${gateReasonName(result.reason)}`)
}

checkGate walks the same checks in the same order as the on-chain gate, so the reason it gives is the reason the transaction would revert with.

stale means our transport has gone quiet for longer than maxAge, not that the credential is bad. The gate closes on silence on purpose: a destination chain that stops hearing from Solidus cannot learn about a revocation, so it stops trusting what it last heard.

You supply the client. This package ships no RPC URL of its own.

What is not here yet

Phase 1 is credential status only. Quotes, transfers and referral rebates arrive with the USDC and SLDS routes in later phases; encodeUsdcHook is present because the byte layout is already fixed, not because anything moves value yet. Nothing in this package holds a key or signs anything.