TronPay is a Browser Extension for Tron NetWork.
It can be used to debug smart contract, or play DApps with browser.
- 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
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.
- Telegram: https://t.me/joinchat/FYpRMRHjRvBoEfjjgPwWhg
- Twitter: https://twitter.com/TronPayOfficia1
TronPay is MIT licensed