Installing PnP Web Modal SDK
@web3auth/modal
- npm
- Yarn
- pnpm
npm install --save @web3auth/modal
yarn add @web3auth/modal
pnpm add @web3auth/modal
Add @web3auth/base
to your project
- npm
- Yarn
- pnpm
npm install --save @web3auth/base
yarn add @web3auth/base
pnpm add @web3auth/base
This package gives access to common types and interfaces for Web3Auth. This comes in handy by
providing you with a standard way of importing the values you need to work with the SDKs. We highly
recommend using it while working with Typescript
.
Add a Provider to your project
The @web3auth/modal
package requires a private key provider to facilitate interaction with your
preferred blockchain network. You can choose between the following providers based on your usecase.
- EIP1193 Private Key Provider for EVM Compatible Chains
- Solana Private Key Provider for Solana Blockchain
- XRPL Private Key Provider for XRPL Blockchain
- Common Private Key Provider for Connecting to any Blockchain
It's mandatory to provide privateKeyProvider
for your corresponding chain namespace. To know more
in-depth about providers, have a look at the Providers reference.
- EIP1193 Provider
- Solana Provider
- XRPL Provider
- Common Provider
- npm
- Yarn
- pnpm
npm install --save @web3auth/ethereum-provider
yarn add @web3auth/ethereum-provider
pnpm add @web3auth/ethereum-provider
- npm
- Yarn
- pnpm
npm install --save @web3auth/solana-provider
yarn add @web3auth/solana-provider
pnpm add @web3auth/solana-provider
- npm
- Yarn
- pnpm
npm install --save @web3auth/xrpl-provider
yarn add @web3auth/xrpl-provider
pnpm add @web3auth/xrpl-provider
- npm
- Yarn
- pnpm
npm install --save @web3auth/base-provider
yarn add @web3auth/base-provider
pnpm add @web3auth/base-provider
Troubleshooting
Bundler Issues: Missing Dependencies
You might face issues mentioning that certain dependencies are missing within the browser environment. These are node dependencies that need to be polyfilled in your application, to enable Web3Auth functionalities. Furthermore, your bundler needs to be reconfigured to use them while building the app. We have created guides for different bundlers to help you with this issue:
- Please check out our Vite Troubleshooting Guide
- Please check out our Webpack 5 Troubleshooting Guide