Prerequisites
For successful utilization of this library, ensure you have ethers
version 6.12.1 or higher installed. The ethers
package isn't bundled within the SDK. Instead, we leverage peerDependencies
to maintain a lean package size.
Note
If your project uses version 5 of ethers
, consider installing version 6 alongside it. Adjust import paths via a bundler. Additionally, you might consider loading our SDK asynchronously using dynamic imports to optimize your application's initial load performance. Here's a sample configuration with webpack:
npm i ethers-6@npm:ethers@6.12.1
You can do something similar for other builders as well:
webpackConfig.plugins.push(
new webpack.NormalModuleReplacementPlugin(
/ethers$/m, (resource) => {
const isStakeWise = /@stakewise\/v3-sdk/.test(resource.context)
if (isStakeWise) {
resource.request = resource.request.replace(/ethers/, 'ethers-6')
}
}
)
)