Wallet Standard
Method | Supported |
---|---|
sign |
✅ |
setAddress |
✅ |
setNode |
✅ |
isConnected |
✅ |
signMessageV2 |
✅ |
multiSign |
✅ |
disconnect |
✅ |
getVersion |
✅ |
provider
const tronLink = window.bitkeep.tronLink; const tronWeb = window.bitkeep.tronWeb;
setAddress
Sets the default wallet address to be used (for sending transactions, checking balances, signing messages, etc.).
- This does not set the private key — it only sets the default “from” address.
- If you call methods like tronWeb.trx.sendTransaction() without explicitly specifying an address, this default one will be used.
- Commonly used alongside a private key or a wallet like TronLink.
tronWeb.setAddress('TXXXXXXX...');
setNode
Dynamically sets or replaces the current node configuration — for example, switching between FullNode, SolidityNode, or EventServer URLs.
- Usually, setting just the fullNode is enough — TronWeb will use the same URL for other nodes if not explicitly defined.
- Especially useful when connecting to a private chain or custom node.
// Set FullNode tronWeb.setNode('fullNode', 'https://api.trongrid.io'); // Set SolidityNode tronWeb.setNode('solidityNode', 'https://api.trongrid.io'); // Set EventServer tronWeb.setNode('eventServer', 'https://api.trongrid.io');
Connect

Preview
Parameters:
interface TronConnectInput { method: 'tron_requestAccounts' }
Returns:
interface TronConnectResult { code: number; message: string }
Usage
// @param TronConnectInput // @return TronConnectResult await tronLink.request({ method: "tron_requestAccounts" });
Try It
Loading live editor...
Disconect
Returns:
interface TronConnectResult { code: number; message: string }
Usage
// @param TronConnectInput // @return TronConnectResult await tronLink.disconnect();
Try It
Loading live editor...
SignMessageV2

Preview
Parameters:
type signedMessageV2Input string;
Returns
type signedMessageV2Output string;
Usage
// @param signedMessageV2Input // @return signedMessageOutput await tronWeb.trx.signMessageV2(message);
Try It
Loading live editor...
Send Transaction
Chrome
App

Preview

Preview
var tx = await tronweb.transactionBuilder.sendTrx( "TW8u1VSwbXY7o7H9kC8HmCNTiSXvD69Uiw", 1000000, tronWeb.defaultAddress.base58 ); var signedTx = await tronweb.trx.sign(tx); var broadcastTx = await tronweb.trx.sendRawTransaction(signedTx); console.log(broadcastTx); console.log(broadcastTx.txid); // Token let decimal = 18; let Contract = await tronWeb .contract() .at("TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7"); // WIN const decimalCall = Contract.decimals || Contract.DECIMALS; if (decimalCall) { decimal = await decimalCall().call(); } let broadcastTx = await Contract.transfer( "TW8u1VSwbXY7o7H9kC8HmCNTiSXvD69Uiw", // "0xde0b6b3a7640000" tronWeb.toHex(2 * Math.pow(10, decimal)) ).send(); // { feeLimit: 10000000 } console.log(broadcastTx);
Last updated on