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

@tron-wallet-kit/client

v0.1.0

Published

Headless client orchestration for TRON Wallet Kit.

Readme

@tron-wallet-kit/client

Headless client orchestration for TRON Wallet Kit. This package composes core wallet management, wallet descriptors, adapters, UI controllers, balance, identity, GasFree, and transaction helpers.

Install

pnpm add @tron-wallet-kit/client@latest

Quick Start

import { createWalletKit } from "@tron-wallet-kit/client";

const kit = createWalletKit({
  metadata: {
    name: "My TRON dApp",
    description: "Wallet connection for My TRON dApp",
    url: window.location.origin,
    icons: [`${window.location.origin}/icon.png`]
  },
  network: "mainnet",
  walletConnectProjectId: import.meta.env.VITE_WALLETCONNECT_PROJECT_ID,
  ui: { themeName: "light", toast: true }
});

kit.openModal();

If walletConnectProjectId is omitted, the WalletConnect adapter is not created.

metadata is used by WalletConnect and future auth prompts to identify the dApp. Legacy aliases (appName, appDescription, appUrl, appIcons) are still accepted, but new integrations should prefer metadata.

Common APIs

  • createWalletKit(config)
  • createWalletClient(config)
  • createDefaultAdapters(config)
  • kit.openModal()
  • kit.disconnect()
  • kit.refreshBalance()
  • kit.refreshIdentity()
  • kit.gasFree.getAddress()
  • kit.gasFree.getBalance()
  • kit.gasFree.setMode(mode)
  • kit.signMessage(request)
  • kit.transferTrx(request)
  • kit.transferTrc20(request)
  • kit.triggerSmartContract(request)

React dapps should normally consume these through @tron-wallet-kit/react.

GasFree

GasFree Phase 1 is an account-panel mode for showing a deterministic GasFree address and USDT balance. It is display-only; the kit does not render a send form.

Install the optional SDK when you enable GasFree:

pnpm add @gasfree/gasfree-sdk

For production browser apps, point apiBaseUrl at a same-origin backend proxy that signs GasFree provider API requests. The official provider account endpoint is GET /api/v1/address/{accountAddress}.

const kit = createWalletKit({
  metadata: { name: "My TRON dApp" },
  network: "mainnet",
  gasFree: {
    enabled: true,
    apiBaseUrl: "/api/gasfree"
  }
});

kit.gasFree.setMode("gasfree");
const gasFreeAddress = await kit.gasFree.getAddress();
const gasFreeBalance = await kit.gasFree.getBalance();

If your app cannot configure a provider API during local QA, use the opt-in on-chain TRC-20 balance resolver:

import { createTrc20GasFreeBalanceResolver } from "@tron-wallet-kit/client";

const kit = createWalletKit({
  metadata: { name: "My TRON dApp" },
  network: "mainnet",
  gasFree: {
    enabled: true,
    balanceResolver: createTrc20GasFreeBalanceResolver()
  }
});

Do not place a GasFree API secret in browser code. Use a backend proxy or apiHeaders backed by a server-side signer.

Transaction Preview

Use transactionPreview to inspect or confirm a human-readable summary before the kit asks the wallet to sign. createWalletKit shows the built-in confirmation dialog by default in browser contexts; pass ui.transactionPreview.enabled: false to disable it.

const kit = createWalletKit({
  metadata: { name: "My TRON dApp" },
  transactionPreview: {
    resolver: async (request, context) => {
      console.log(context.defaultPreview.summary);
      // Return a custom preview or leave the default TRON-native summary in place.
    },
    confirm: async (preview) => {
      // Return false to cancel before the wallet prompt opens.
      return window.confirm(preview.summary);
    }
  }
});

Recent Transactions

Broadcasted transactions are stored per account + network and are exposed through kit.manager.getTransactions(). The account panel uses the same list for its recent transaction view.

const kit = createWalletKit({
  metadata: { name: "My TRON dApp" },
  useBrowserStorage: true,
  transactionStore: {
    max: 20,
    staleSubmittedMs: 10 * 60 * 1000
  }
});

Status

This package is part of the TRON Wallet Kit 0.1.0 release line and is intended for the npm latest tag.

License

MIT