🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@tronweb3/tronwallet-adapter-binance

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tronweb3/tronwallet-adapter-binance

Wallet adapter for Binance Wallet app on Android and iOS

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
2
Created
Source

@tronweb3/tronwallet-adapter-binance

This package provides an adapter to enable TRON DApps to connect to the Binance Wallet.

Demo

import { BinanceWalletAdapter } from '@tronweb3/tronwallet-adapter-binance';

const adapter = new BinanceWalletAdapter();
// connect to BinanceWallet
await adapter.connect();

// then you can get address
console.log(adapter.address);

const tronWeb = new TronWeb({
    fullHost: 'https://api.trongrid.io',
});

// create a send TRX transaction
const unSignedTransaction = await tronWeb.transactionBuilder.sendTrx(
    targetAddress,
    100,
    adapter.address
);
// using adapter to sign the transaction
const signedTransaction = await adapter.signTransaction(unSignedTransaction);
// broadcast the transaction
await tronWeb.trx.sendRawTransaction(signedTransaction);

Documentation

API

  • Constructor(config: BinanceWalletAdapterConfig)
interface BinanceWalletAdapterConfig {
    /**
     * Set if open Wallet's website when wallet is not installed.
     * Default is true.
     */
    openUrlWhenWalletNotFound?: boolean;
    /**
     * Timeout in millisecond for checking if Binance wallet is supported.
     * Default is 2 * 1000ms
     */
    checkTimeout?: number;
}
  • network() method is supported to get current network information. The type of returned value is Network as follows:

    export enum NetworkType {
        Mainnet = 'Mainnet',
        Shasta = 'Shasta',
        Nile = 'Nile',
        /**
         * When use custom node
         */
        Unknown = 'Unknown',
    }
    
    export type Network = {
        networkType: NetworkType;
        chainId: string;
        fullNode: string;
        solidityNode: string;
        eventServer: string;
    };
    

Caveats

  • Binance Wallet App doesn't implement multiSign() and switchChain().
  • Binance Wallet App supports the following events:
    • connect
    • disconnect
    • accountsChanged

For more information about tronwallet adapters, please refer to @tronweb3/tronwallet-adapters

Keywords

TRON

FAQs

Package last updated on 25 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts