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

tronweb-mobile

v6.2.1-m-2.0.3

Published

tronweb-mobile is a JavaScript library provided for use within the **TronLink App**, designed to integrate Tron-related capabilities into DApp environments.

Readme

tronweb-mobile

tronweb-mobile is a JavaScript library provided for use within the TronLink App, designed to integrate Tron-related capabilities into DApp environments.

The library is based on TronWeb, integrating its methods and functions while overriding signature-related capabilities. This allows DApps to invoke TronLink App’s internal signing workflow directly through global objects.

Features

  • Integrates core methods and functions from TronWeb
  • Automatically injected into the page environment when a DApp is opened in the TronLink App
  • Exposes unified global objects to maintain compatibility with existing Tron DApps
  • Overrides signature methods so that all signing operations are handled internally by the TronLink App
  • Supports TIP-6963 multi injected provider discovery for seamless wallet detection

Injection Mechanism

When a user opens a DApp using the TronLink App:

  • tronweb-mobile.js is automatically injected into the WebView
  • DApps do not need to manually import or initialize the library
  • The TronLink App's capabilities can be accessed directly through global objects

Global Objects

tronweb-mobile injects the following global objects into the page environment:

  • window.tronWeb
  • window.tron
  • window.tronLink

DApps can use these objects to interact with the Tron network and perform signing operations.

Overridden Signature Methods

tronweb-mobile overrides and intercepts the following signature-related methods:

  • sign
  • multiSign
  • signTransaction
  • signMessageV2
  • _signTypedData

When a DApp invokes any of these methods, the process is as follows:

  1. The call is intercepted by tronweb-mobile
  2. The request is forwarded to the TronLink App via global objects (tron, tronLink, or tronWeb)
  3. The TronLink App prompts the user for confirmation and completes the signing process internally
  4. The signature result is returned to the DApp

All signing operations are completed inside the TronLink App. DApps never have direct access to the user’s private keys.

TIP-6963: Multi Injected Provider Discovery

tronweb-mobile implements TIP-6963, a provider discovery protocol mirroring EIP-6963 for the TRON ecosystem. It allows DApps to discover injected wallet providers via window events rather than relying on the race condition of window.tronWeb.

How It Works

  1. Wallet announces — On initialization, tronweb-mobile dispatches a TIP6963:announceProvider event containing provider info (uuid, name, icon, rdns) and the provider object
  2. DApp requests — A DApp dispatches TIP6963:requestProvider to request announcement from all available wallets
  3. Wallet re-announces — tronweb-mobile listens for TIP6963:requestProvider and re-announces itself

DApp Integration

// Discover all injected TRON wallets
window.addEventListener('TIP6963:announceProvider', (event) => {
    const { info, provider } = event.detail;
    console.log(`Discovered wallet: ${info.name} (${info.rdns})`);
    // Use `provider` to interact with the wallet
});

// Trigger discovery
window.dispatchEvent(new Event('TIP6963:requestProvider'));

Provider Info

| Field | Value | |--------|-------------------| | name | TronLink | | rdns | io.tronlink | | uuid | (per-session UUID) | | icon | TronLink logo |

Usage Examples

To get started, retrieve the global objects in your JavaScript file:

const { tronWeb, tron, tronLink } = window;

Transaction signing example:

const signedTx = await tronWeb.trx.sign(transaction)

Message signing example:

const signature = await tronWeb.trx.signMessageV2(message)

When running inside the TronLink App environment, the above calls will automatically trigger the in-app signing confirmation flow.

Applicable Scenarios

  • DApps running inside the TronLink App WebView
  • Decentralized applications that need to interact with the Tron network
  • Projects built on TronWeb that require API compatibility

Notes

  • tronweb-mobile is only injected in the TronLink App environment
  • The library will not be available in standard browser environments
  • DApps should check for the existence of window.tronWeb or window.tronLink at runtime

Contribution

If you would like to contribute to tronweb-mobile, you can follow these steps:

Prerequisites

  • Node.js: v18.19.0 (recommended to use nvm for version management)
  • pnpm: v7.32.0 (install via npm install -g [email protected])

Steps

  • Fork this repository and clone it locally
  • Install the dependencies: pnpm install
  • Make your changes to the code
  • Build the tronweb-mobile distribution files: pnpm build
  • (Optional) Open a DApp inside the TronLink App to verify that the injection works correctly
  • Run the tests: pnpm test
  • Push your changes and submit a Pull Request

License

MIT