TronLink Docs
Homepage
  • Introduction
  • HD Wallets
  • TronLink App
    • Asset Management
      • Custom Token
    • DeepLink
      • Open Wallet
      • Open DApp
      • Login by TronLink
      • Transfer
      • Sign Transaction
      • Sign Message
      • Result Code
    • DApp Support
      • TronLink Integration
      • DApp Explorer
  • TronLink Wallet Extension
    • Request TronLink Extension
      • Connect Website
      • Add Token
    • Receive messages from TronLink
      • Account Change Message
      • Network Change Message
      • Successful connection message
      • Disconnect website message
      • Messages to Be Deprecated
        • User rejects connection
        • User disconnects from the website
        • User accepts connection
        • User requests to connect to the website
  • DApp
    • Start Developing
    • Multi-Signature Transfer
    • Message Signature
    • General Transfer
    • Stake2.0
Powered by GitBook
On this page
  1. DApp

Multi-Signature Transfer

PreviousStart DevelopingNextMessage Signature

Last updated 2 years ago

Overview

For this section, you may refer to

Specification

Example

if (window.tronLink.ready) {
  const tronweb = tronLink.tronWeb;
  const toAddress = "TRKb2nAnCBfwxnLxgoKJro6VbyA6QmsuXq";
  const activePermissionId = 2;
  const tx = await tronweb.transactionBuilder.sendTrx(
    toAddress, 10,
    { permissionId: activePermissionId}
  ); // step 1
  try {
    const signedTx = await tronweb.trx.multiSign(tx, undefined, activePermissionId); // step 2
    await tronweb.trx.sendRawTransaction(signedTx); // step 3
  } catch (e) {}
}

If the user chooses “Reject” in the pop-up window, an exception will be thrown, which the developer can catch for further processing. If the user chooses “Sign” in the pop-up window, the DApp receives and broadcasts the signed transaction.

General Transfer