Skip to content

tronpay/TronPay-Extension

Repository files navigation

TronPay Browser Extension

Download From Chrome WebStore

TronPay is a Browser Extension for Tron NetWork.
It can be used to debug smart contract, or play DApps with browser.

Build

  • Install Node.js version 8.9.3 or later.
  • Install local dependencies with npm install.
  • Build with development npm run dev.
  • Build for Publishing npm run build.

Uncompressed builds will found in ./build

DApp Developers

When TronPay is installed, TronPay will inject a TronWeb object into current document, you can find it in window.tronPay.tronWeb or window.tronWeb.
Note that you can use like this to check TronPay environment

window.addEventListener('load', function() {

  // Checking if the tronWeb has been injected
  if (typeof tronPay !== 'undefined') {
    tronWeb = tronPay.tronWeb || tronWeb
    if (tronWeb.isTronPay && tronWeb.ready) {
        // Now start you app & access tronWeb
    }
  } else {
    console.log('No tronWeb? You should install TronPay!')
  }
})

More TronWeb document can found in Tron NetWork Official.

Join TronPay community

License

TronPay is MIT licensed