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

@ravenhouse/compliant-bridge

v0.1.0

Published

Headless SDK for Aztec-Ethereum compliant bridging with ZK Passport verification

Readme

@ravenhouse/compliant-bridge

Headless SDK for Aztec-Ethereum compliant bridging with ZK Passport verification.

Features

  • Framework-agnostic (works with React, Vue, vanilla JS, etc.)
  • Pre-configured networks (devnet, sandbox, testnet)
  • ZK Passport identity verification integration
  • Type-safe TypeScript API
  • L1 → L2 token bridging
  • Comprehensive token management

Installation

npm install @ravenhouse/compliant-bridge
# or
bun add @ravenhouse/compliant-bridge
# or
yarn add @ravenhouse/compliant-bridge

Quick Start

import { CompliantBridge, networks } from '@ravenhouse/compliant-bridge';

// Initialize the SDK
const bridge = new CompliantBridge({
  network: networks.devnet,
  l1Wallet: myEthereumWallet,  // Your L1 wallet client (Wagmi/viem)
  l2Wallet: myAztecWallet,      // Your L2 wallet client (Aztec/Azguard)
  backendApiUrl: 'https://api.ravenhouse.xyz'
});

// Get supported tokens
const tokens = bridge.getSupportedTokens();
const rht = bridge.getToken('RHT');

// Execute L1 → L2 bridge
const result = await bridge.bridgeL1ToL2({
  token: rht,
  amount: '100.5',
  isPrivate: true,
  onStep: (step) => {
    console.log(`${step.label}: ${step.status}`);
    if (step.explorerUrl) {
      console.log(`View transaction: ${step.explorerUrl}`);
    }
  }
});

console.log('Bridge result:', result);

API Reference

CompliantBridge

Main SDK class for bridge operations.

Constructor

new CompliantBridge(config: BridgeConfig)

Parameters:

  • network: Network configuration (devnet, sandbox, or testnet)
  • l1Wallet: L1 wallet client (Ethereum/Wagmi)
  • l2Wallet: L2 wallet client (Aztec/Azguard)
  • backendApiUrl: Backend API URL for verification
  • logger?: Optional logger instance
  • timeouts?: Optional timeout configuration

Methods

bridgeL1ToL2(params: L1ToL2Params): Promise<BridgeResult>

Bridge tokens from L1 (Ethereum) to L2 (Aztec).

Parameters:

  • token: Token to bridge
  • amount: Amount to bridge (decimal string, e.g., "100.5")
  • isPrivate: Whether to bridge privately
  • onStep?: Callback for step progress updates

Returns: Promise<BridgeResult>

getSupportedTokens(): TokenConfig[]

Get all supported tokens for the current network.

getToken(symbol: string): TokenConfig | undefined

Get a specific token by symbol.

BridgeResult

Result of a bridge operation.

interface BridgeResult {
  success: boolean;
  direction: 'l1-to-l2' | 'l2-to-l1';
  amount: string;
  symbol: string;
  finalTxHash?: string;
  explorerUrl?: string;
  message: string;
  steps: BridgeStep[];
}

TokenConfig

Token configuration.

interface TokenConfig {
  symbol: string;
  name: string;
  decimals: number;
  icon?: string;
  isNative?: boolean;
  l1: {
    tokenAddress: string | null;
    portalAddress: string;
    feeAssetHandlerAddress: string;
  };
  l2: {
    tokenAddress: string;
    bridgeAddress: string;
    dripper?: string;
  };
}

IdentityVerifier

Check and manage user verification status.

const verifier = bridge.verifier;

// Check if user is verified
const status = await verifier.checkStatus(aztecAddress);
console.log(status.isVerified); // boolean

Supported Networks

  • devnet: Aztec devnet with Sepolia L1
  • sandbox: Local development environment
  • testnet: Aztec testnet with Sepolia L1

Supported Tokens

  • RHT: Raven House Test token
  • ETH: Ethereum (bridged as WETH)

Wallet Integration

L1 Wallet (Ethereum/Wagmi)

Your L1 wallet client must implement:

interface L1WalletClient {
  account: { address: string };
  extend(actions: any): L1WalletClient;
}

Example with Wagmi:

import { useWalletClient } from 'wagmi';

function useCompliantBridge() {
  const { data: walletClient } = useWalletClient();

  const bridge = useMemo(() => {
    if (!walletClient) return null;

    return new CompliantBridge({
      network: networks.devnet,
      l1Wallet: walletClient,
      l2Wallet: myAztecWallet,
      backendApiUrl: 'https://api.ravenhouse.xyz'
    });
  }, [walletClient]);

  return bridge;
}

L2 Wallet (Aztec/Azguard)

Your L2 wallet client must implement:

interface L2WalletClient {
  request(method: string, params: any): Promise<any>;
  account: string;
  sessionId: string;
}

Example with Azguard:

const l2Wallet = {
  account: aztecAccountAddress,
  sessionId: aztecSessionId,
  request: (method, params) => azguardClient.request(method, params)
};

Error Handling

The SDK provides specific error types:

import {
  BridgeError,
  VerificationError,
  WalletError,
  TokenError,
  NetworkError,
  TransactionError
} from '@ravenhouse/compliant-bridge';

try {
  const result = await bridge.bridgeL1ToL2({ ... });
} catch (error) {
  if (error instanceof TokenError) {
    console.error('Token error:', error.message);
  } else if (error instanceof WalletError) {
    console.error('Wallet error:', error.message);
  } else if (error instanceof BridgeError) {
    console.error('Bridge error:', error.message);
  }
}

Examples

See the examples/ directory for complete integration examples with different frameworks.

License

MIT

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Support

For issues and questions, please use the GitHub issue tracker.