@opentron/tronweb-from-provider
v0.4.39
Published
Creates a tronweb object using a web3 provider. For backwards compatibility with Tron dApps that use the tronweb api.
Downloads
45
Readme
@opentron/tronweb-from-provider
Creates a tronweb object using a web3 provider. For backwards compatibility with Tron dApps that use the tronweb API.
See tronweb-from-provider-deom for a demo.
Install
npm install @opentron/tronweb-from-provider
Usage
import createTronwebFromProvider from "@opentron/tronweb-from-provider";
import createJavaTronProvider from "@opentron/java-tron-provider";
const provider = createJavaTronProvider({
network: "nile",
});
const tronweb = createTronwebFromProvider();
console.log(tronweb.defaultAddress);