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

@meddleware/walrus-relay

v0.1.16

Published

Shared Vue 3 UI for the Walrus upload relay: relay selection + tip estimation, NFT-gate access, and a blob-upload widget. Built on @meddleware/walrus-client + @meddleware/nft-gate-client.

Downloads

3,405

Readme

@meddleware/walrus-relay

License: 0BSD

Shared Vue 3 UI for the Walrus upload relay: relay selection + tip estimation, NFT-gate access, and a blob-upload widget. Built on @meddleware/walrus-client (the Walrus storage client) and @meddleware/nft-gate-client (the access-gate wire format).

Consumed by @meddleware/walrus-ui (the standalone uploader) and the token-deployer app (icon upload), so the relay logic lives in exactly one place.

Install

npm install @meddleware/walrus-relay

The package ships TypeScript/SFC source (no build step); your app's bundler compiles it. At your app entry, import the design tokens once:

import '@meddleware/design-tokens/tokens.css' // defines the CSS vars used here

Exports

| Export | Kind | Purpose | |---|---|---| | useWalrusRelay(hosts, access?) | composable | Relay selection + /v1/tip-config health check + cost estimate. hosts = { operator, public }. | | useAccessGate({ gate, getClient }) | composable | NFT-gate ownership / purchase / access-proof. gate: RelayGateConfig \| null (null ⇒ open). | | WalrusUpload | component | File picker + relay selector + upload. App injects performUpload (keeps @mysten/walrus + wallet out of this package). | | TipConfigBadge | component | Live relay reachability + tip badge. | | AccessGateCta | component | "Purchase access" CTA when gated and the wallet lacks the NFT. | | probeRelay / parseTipFromConfig | fn | Pure relay /v1/tip-config helpers (unit-testable, no deps). | | walrusBlobUrl / WALRUS_AGGREGATOR_HOSTS | fn/const | Raw-blob aggregator URL builder. | | MAX_SINGLE_RESERVATION_EPOCHS | const | 53 — Walrus max_epochs_ahead. | | ACCESS_GATE_PACKAGE_ID / ACCESS_GATE_PLATFORM_CONFIG_ID | const | Hardcoded Meddleware commission-routing IDs. |

Design notes

  • Injection over import. WalrusUpload takes a performUpload(bytes, { relayHost, onStatus }) callback rather than importing @mysten/walrus or a wallet. This keeps the package light, wallet-agnostic, and preserves the lazy-load boundary (the app decides when to pull the wasm chunk). The app wires performUpload with @meddleware/walrus-client's createWalrusClient / createBlobUploadFlow.
  • Parameterized hosts. useWalrusRelay takes the operator/public host pair so each app injects its own relay hostnames for the active network.
  • One access-gate implementation. useAccessGate builds on @meddleware/nft-gate-client (ownership, purchase/consume PTBs, challenge, proof) — not a private copy.
  • Commission enforcement. ACCESS_GATE_PACKAGE_ID and ACCESS_GATE_PLATFORM_CONFIG_ID are hardcoded in src/constants.ts so every operator deployment routes the on-chain 20 bps commission to the Meddleware treasury. See CLAUDE.md.

Test

npm test          # Vitest: pure helpers + composables against a fake client
npm run type-check

License

0BSD