JavaScript
You can import Pools SDK into your JavaScript dapp to enable your users to easily connect to the Pools Wallet. The following instructions work for web dapps based on standard JavaScript. You can also see instructions for the following JavaScript-based platforms:
React
Pure JavaScript
Other web frameworks
React Native
Node.js
Electron
Steps
1. Install the SDK
In your project directory, install the SDK using Yarn or npm:
or
2. Import the SDK
In your project script, add the following to import the SDK:
3. Instantiate the SDK
Instantiate the SDK using any options:
4. Use the SDK
Use the SDK by calling any provider API methods. Always call eth_requestAccounts
using ethereum.request()
first, since it prompts the installation or connection popup to appear.
Last updated