- More options
The code snippet below sets Torus Wallet as the default login method for a DApp,
add one of the following
script tags to end of
body in your
The script tag creates a
window.torus object, which you can initialize and use
as described above.
You may also choose to load the embed via IPFS:
Integrating with the Torus Wallet gives you a provider, which can be wrapped by the Web3. This instance functions similar to Metamask's Web3 provider and we have taken great care to make it compatible with Metamask's Web3 APIs.
If you are developing with the Torus Wallet in a local environment with ganache, https is necessary to interact with app.tor.us. Check out steps to get started.
In general, the Torus wallet integration only works in a secure browser environment, as it needs access to browser APIs like window.open and window.crypto.