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

@provablehq/veil-aleo-react-hooks

v0.4.1

Published

React hooks and providers for the building web apps.

Readme

@provablehq/veil-aleo-react-hooks

React bindings for the Veil Aleo SDK.

Provides a VeilProvider context provider and a useVeilWallet hook that wrap the Provable/Aleo wallet adapters (Shield, Leo, Puzzle, Fox). Reach for it when building a React app that connects a wallet and needs viem-shaped clients: the hook hands back a publicClient for chain reads and, once a wallet connects, a walletClient for transactions — no manual adapter bridging. react (>=18) is a peer dependency.

Installation

pnpm add @provablehq/veil-aleo-react-hooks @provablehq/veil-core react

react is a peer dependency — the caller supplies it.

Usage

Wrap the app in VeilProvider, then call useVeilWallet in any component below it. The provider configures all known Aleo wallets; the hook derives its network from the provider unless the caller overrides it.

import { VeilProvider, useVeilWallet } from '@provablehq/veil-aleo-react-hooks'

function Root() {
  return (
    <VeilProvider network="mainnet">
      <Wallet />
    </VeilProvider>
  )
}

function Wallet() {
  const {
    publicClient,   // read-only client, always available
    walletClient,   // write client, defined once connected
    address,        // connected address, or null
    connected,
    connecting,
    connect,        // connect(walletName?) selects + connects in one step
    disconnect,
    wallets,        // available wallets with install status
    selectWallet,   // select a wallet by name before connecting
  } = useVeilWallet()

  if (!connected) {
    return (
      <button disabled={connecting} onClick={() => connect('Shield Wallet')}>
        {connecting ? 'Connecting…' : 'Connect'}
      </button>
    )
  }

  async function send() {
    // walletClient is defined here because `connected` is true.
    const txId = await walletClient!.writeContract({
      program: 'credits.aleo',
      function: 'transfer_public',
      inputs: ['aleo1...', '100u64'],
    })
    console.log(txId)
  }

  return (
    <div>
      <span>{address}</span>
      <button onClick={send}>Send</button>
      <button onClick={disconnect}>Disconnect</button>
    </div>
  )
}

Chain reads run without a connected wallet:

const { publicClient } = useVeilWallet()
const balance = await publicClient.getBalance({ address: 'aleo1...' })

Configuration

VeilProvider (VeilProviderProps) accepts:

  • network'mainnet' or 'testnet'. Defaults to 'mainnet'.
  • autoConnect — reconnect to the previously used wallet. Defaults to true.
  • decryptPermission — decrypt permission level. Defaults to UponRequest.
  • programs — program ids to register with the wallet for decrypt permissions.
  • wallets — override the default wallet list (Shield, Leo, Puzzle, Fox).
  • recordAccess — connect-time record/field grant for privacy-preserving wallets.
  • readAddress — set false to transact without the dApp learning the address. Defaults to true.
  • algorithmsAllowed — allowlist authorizing derived transaction inputs (e.g. blinding algorithms).

useVeilWallet (UseVeilWalletConfig) accepts:

  • rpcUrl — RPC endpoint. Defaults to the Provable mainnet API.
  • network — transport network. Defaults to the provider's network.

The hook re-exports PublicClient, WalletClient, AleoWalletAdapter, and AnyWalletAdapter so the caller can type consumers without extra imports.