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

@hieco/wallet

v1.0.0

Published

Headless Hedera wallet connection SDK for Hieco

Readme

@hieco/wallet

@hieco/wallet is the headless Hieco wallet runtime for browser apps that want full control over wallet state, QR pairing, extension flows, restore behavior, and signer handoff.

It is the package to use when you want to own the wallet experience instead of inheriting one.

Why This Package Exists

Wallet connection is rarely just a button. Real apps need to manage:

  • the current session
  • a pending QR or extension connection attempt
  • installed and unavailable wallets
  • reconnect and restore behavior
  • a signer that can move into the rest of the Hieco stack

@hieco/wallet keeps that complexity in one runtime so your UI can stay focused on presentation.

When To Use It

Choose @hieco/wallet when you are building:

  • a browser app outside React
  • a custom wallet modal, drawer, or inline picker
  • your own framework integration on top of the headless runtime
  • a product that needs direct control over pairing, restore, and disconnect flows

If you want the React wrapper, use @hieco/wallet-react.

Installation

npm install @hieco/wallet
pnpm add @hieco/wallet
yarn add @hieco/wallet
bun add @hieco/wallet

Quick Start

import { createWallet } from "@hieco/wallet";

const wallet = createWallet({
  projectId: "YOUR_WALLETCONNECT_PROJECT_ID",
  app: {
    name: "My Hieco App",
    description: "Wallet connection for My Hieco App",
    url: "https://example.com",
    icons: ["https://example.com/icon.png"],
  },
});

const session = await wallet.connectQr();

console.log(session.accountId);
console.log(session.signer);

How To Think About The Runtime

One wallet runtime owns:

  • one configured chain
  • one active session
  • one shared pending connection attempt
  • one wallet catalog

That shared pending attempt is the key behavioral detail. connectQr() and connectExtension(walletId) join the same in-flight attempt until it settles or gets canceled. That makes custom wallet UI easier to reason about because the runtime, not the component tree, owns the connection lifecycle.

Common Workflows

Read wallet state

const state = wallet.snapshot();

console.log(state.session?.accountId);
console.log(state.connection?.uri);

Build your own wallet picker

import { createWallet, getConnectableWallets, getUnavailableWallets } from "@hieco/wallet";

const wallet = createWallet({
  projectId: "YOUR_WALLETCONNECT_PROJECT_ID",
  app: {
    name: "My Hieco App",
    description: "Wallet connection for My Hieco App",
    url: "https://example.com",
    icons: ["https://example.com/icon.png"],
  },
});

const stop = wallet.subscribe(() => {
  const state = wallet.snapshot();

  console.log(getConnectableWallets(state));
  console.log(getUnavailableWallets(state));
});

Restore a previous session

const wallet = createWallet({
  projectId: "YOUR_WALLETCONNECT_PROJECT_ID",
  app: {
    name: "My Hieco App",
    description: "Wallet connection for My Hieco App",
    url: "https://example.com",
    icons: ["https://example.com/icon.png"],
  },
  restoreOnStart: true,
});

await wallet.restore();

Pass the signer into Hieco

import { hieco } from "@hieco/sdk";

const session = await wallet.connectQr();
const client = hieco({ network: "testnet" }).as(session.signer);

Runtime Boundaries

Runtime creation is safe in shared app code and SSR environments, but connection actions are browser-only:

  • connectQr()
  • connectExtension()
  • disconnect()
  • restore()

That split is deliberate. You can mount the runtime safely during app setup and defer real wallet work until the browser is available.

Subpath Exports

The package also ships focused subpaths for apps that want a narrower import surface:

  • @hieco/wallet/chains
  • @hieco/wallet/selectors
  • @hieco/wallet/state
  • @hieco/wallet/wallets

Those are useful when you want chain definitions, selector helpers, or curated wallet metadata without importing the entire package namespace.

Packaging And Runtime Support

The wallet package publishes:

  • browser-targeted ESM build output
  • dependencies kept external for the consuming app or bundler
  • conditional exports for browser, worker, workerd, node, and default

That keeps the package easier to consume across modern frontend and edge-style runtimes while preserving the browser-only behavior of actual wallet interactions.

API At A Glance

Core exports:

  • createWallet
  • getConnectableWallets
  • getUnavailableWallets
  • hederaMainnet()
  • hederaTestnet()
  • hederaPreviewnet()
  • hederaDevnet()
  • hashpack()
  • kabila()
  • genericWalletConnectWallet()
  • getDefaultWallets()

Key runtime methods:

  • snapshot()
  • subscribe(listener)
  • connectQr()
  • connectExtension(walletId)
  • cancelConnection()
  • disconnect()
  • restore()
  • destroy()

Related Packages