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

@bleepay/web3

v0.0.7

Published

Bleepay SDK – Web3 wagmi connector and wallet integration

Readme

@bleepay/web3

Wagmi connector for Bleepay Wallet — session-based payments using a 6-digit code.

The user connects by entering a 6-digit code from the Bleepay mobile app. Once connected, the connector supports standard Ethereum methods (eth_sendTransaction, personal_sign, eth_signTypedData) as well as Bleep-specific methods for submitting multi-step transactions with pre-approval instructions.

Installation

npm install @bleepay/web3 @bleepay/ui @bleepay/core @wagmi/core viem

Setup

With wagmi + React

import { createBleepayConnector } from '@bleepay/web3';
import { createConfig, http } from 'wagmi';
import { mainnet, arbitrum } from 'wagmi/chains';

const bleepayConnector = createBleepayConnector({
  appInfo: {
    appName: 'My dApp',
    appUrl: 'https://mydapp.com',
    appIconUrl: 'https://mydapp.com/icon.png',
  },
});

export const config = createConfig({
  chains: [mainnet, arbitrum],
  connectors: [bleepayConnector],
  transports: {
    [mainnet.id]: http(),
    [arbitrum.id]: http(),
  },
});

With vanilla @wagmi/core

import { createBleepayConnector } from '@bleepay/web3';
import { createConfig, http, connect } from '@wagmi/core';
import { mainnet } from '@wagmi/core/chains';

const config = createConfig({
  chains: [mainnet],
  transports: { [mainnet.id]: http() },
  connectors: [
    createBleepayConnector({
      appInfo: { appName: 'My App', appUrl: 'https://myapp.com' },
      defaultChainId: mainnet.id,
    }),
  ],
});

const result = await connect(config, { connector: config.connectors[0] });
// Opens a modal — user enters their 6-digit Bleepay code
console.log(result.accounts); // ['0x...']

Execute a Bleep Transaction

Use bleep_redeem to submit one or more EVM transactions (e.g. a token swap with an approval pre-step) as a single atomic Bleepay voucher. The user confirms all steps in the mobile app.

import { useConnectorClient } from 'wagmi';
import { createEvmNetwork, createEvmPayment, createEvmSendTransactionInstruction } from '@bleepay/core';

const { data: client } = useConnectorClient();

const paymentIds = await client.request({
  method: 'bleep_redeem',
  params: [
    // networks
    [createEvmNetwork({ network: 'mainnet', chainId: 1 })],
    // extras — pre-steps executed before the main payment (e.g. ERC-20 approval)
    [
      createEvmSendTransactionInstruction({
        from: '0xYourAddress',
        to: '0xTokenAddress',
        value: '0x0',
        data: '0xApproveCalldata',
        networkIndex: 0,
      }),
    ],
    // payments — the main transaction(s)
    [
      createEvmPayment({
        from: '0xYourAddress',
        to: '0xContractAddress',
        value: '0x0',
        data: '0xSwapCalldata',
        networkIndex: 0,
      }),
    ],
    // expectedPayment (optional, pass null if not applicable)
    null,
    // displayData — labels shown in the transaction confirmation modal
    [
      { label: 'Pay', value: '100 USDT' },
      { label: 'Receive', value: '0.04 ETH' },
    ],
  ],
});

console.log('Payment IDs:', paymentIds); // string[]

Standard Ethereum methods

The connector also handles standard methods transparently — your existing wagmi hooks work as-is:

// eth_sendTransaction — routed through Bleepay
const hash = await client.request({
  method: 'eth_sendTransaction',
  params: [{ from: '0x...', to: '0x...', value: '0x0', data: '0x' }],
});

// personal_sign
const signature = await client.request({
  method: 'personal_sign',
  params: ['0xAddress', '0xMessage'],
});

Get Voucher by ID

const voucher = await client.request({
  method: 'bleep_getById',
  params: ['voucher-uuid'],
});

Options

createBleepayConnector(options: BleepayWalletConfig)

| Option | Type | Default | Description | |--------|------|---------|-------------| | appInfo.appName | string | — | App name shown to the payer in the Bleepay mobile app | | appInfo.appUrl | string | — | App URL | | appInfo.appIconUrl | string | — | App icon URL | | defaultChainId | number | 1 | Chain ID used after connecting | | showTransactionStatusModal | boolean | true | Show Bleepay's transaction status modal during bleep_redeem | | apiBaseUrl | string | — | Override the default Bleepay API base URL |

Session persistence

The connector persists the session to localStorage and automatically reconnects on page reload as long as the session is still active on the Bleepay backend. No action required — wagmi's reconnect will trigger this automatically.