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

@reforgelab/auth-bridge

v0.1.6

Published

A Sdk to handle centralized personal message signature and verify it on chain to borrow a key object

Readme

@reforgelab/auth-bridge

A TypeScript SDK for interacting with the Auth Bridge smart contract on Sui blockchain. This SDK handles centralized personal message signature verification and secure capability borrowing.

Installation

npm install @reforgelab/auth-bridge

Features

  • 🔐 Centralized Authentication: Secure signature-based authentication system
  • 🔑 Capability Management: Safe borrowing and returning of sensitive capabilities
  • 📝 Message Signing: Ed25519 signature construction and verification
  • ⚡ Transaction Building: Easy integration with Sui transaction blocks
  • 🛠️ TypeScript Support: Full type safety and IntelliSense support

Quick Start

import { AuthBridgeSdk } from '@reforgelab/auth-bridge';
import { Transaction } from '@mysten/sui/transactions';

// Initialize SDK with private key (for backend use)
const sdk = new AuthBridgeSdk(privateKeyBytes);

// Or initialize without key (for frontend, using signature service)
const sdk = new AuthBridgeSdk();

Core Workflows

1. Initialize Authentication Protocol

const tx = new Transaction();

await sdk.initialize({
  key: mintCapId,
  input_keys: ['amount', 'recipient'],
  output_keys: ['recipient'],
  protocol: collectionId,
  centralizedAddress: '0x...',
  capType: 'MintCap',
  protocolType: 'Collection',
  tx
});

2. Sign In with Authentication

// Construct signature
const signature = await sdk.constructSignature({
  sendersAddress: '0x...',
  capType: 'MintCap', 
  protocolType: 'Collection',
  options: {
    message: ['1000', '0x...'], // amount, recipient
    salt: 'unique-nonce'
  }
});

// Sign in to get authentication
const { transaction, authentication } = await sdk.signin({
  protocolWrapper: protocolId,
  holderCap: holderCapId,
  fullSignature: signature,
  data: new Map([
    ['amount', '1000'],
    ['recipient', '0x...']
  ]),
  capType: 'MintCap',
  protocolType: 'Collection',
  tx: new Transaction()
});

3. Borrow and Use Capability

// Borrow capability
const { transaction, cap, borrowPotatao } = await sdk.borrowCap({
  holderCap: holderCapId,
  authentication,
  capType: 'MintCap',
  tx: transaction
});

// Use capability for secure operations
transaction.moveCall({
  target: `${packageId}::nft::mint`,
  arguments: [cap, /* other args */]
});

// Return capability
await sdk.returnCap({
  tx: transaction,
  cap,
  capType: 'MintCap', 
  holderCap: holderCapId,
  borrowPotatao
});

API Reference

Class: AuthBridgeSdk

Constructor

  • new AuthBridgeSdk(privateKey?: Uint8Array | string)

Methods

  • initialize(params: InitializeParams): Promise<Transaction>
  • signin(params: SigninParams): Promise<{transaction: Transaction, authentication: any}>
  • constructSignature(params: ConstructSignatureParams): Promise<Uint8Array | null>
  • borrowCap(params: BorrowCapParams): Promise<{transaction: Transaction, cap: any, borrowPotatao: any}>
  • returnCap(params: ReturnCapParams): Promise<Transaction>
  • withdrawCap(params: WithdrawCapParams): Promise<Transaction>

Dependencies

  • @mysten/sui: Sui TypeScript SDK
  • @mysten/bcs: Binary Canonical Serialization
  • @mysten/kiosk: Sui Kiosk framework
  • axios: HTTP client for signature services

Development

# Install dependencies
bun install

# Format code
bun run format

# Type check
tsc --noEmit

License

MIT License

Keywords

sui, framework, auth, sdk