Package Exports
- @web3auth/solana-provider
- @web3auth/solana-provider/dist/solanaProvider.cjs.js
- @web3auth/solana-provider/dist/solanaProvider.esm.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@web3auth/solana-provider) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Web3Auth Solana Provider
Web3Auth is where passwordless auth meets non-custodial key infrastructure for Web3 apps and wallets. By aggregating OAuth (Google, Twitter, Discord) logins, different wallets and innovative Multi Party Computation (MPC) - Web3Auth provides a seamless login experience to every user on your application.
Web3Auth Solana Provider can be used to interact with wallet or connected Solana chain using RPC calls. This is a Solana chain compatible JRPC provider.
📖 Documentation
Read more about Web3Auth Ethereum Provider in the official Web3Auth Documentation.
🔗 Installation
npm install --save @web3auth/solana-provider
🩹 Example
import { PrivateKeyWallet } from "@web3auth/solana-provider";
/*
privKey: any secp512k1 private key.
*/
async setProvider(privKey: string) {
this.PrivateKeyProvider = new PrivateKeyWallet({
config: {
/*
pass the chain config that you want to connect with
all chainConfig fields are required.
*/
chainConfig: {
rpcTarget: "https://ssc-dao.genesysgo.net", // This is the testnet RPC we have added, please pass on your own endpoint while creating an app
displayName: "solana",
ticker: "SOL",
tickerName: "Solana",
},
},
});
/*
pass user's private key here.
after calling setupProvider, we can use
this.ethereumPrivateKeyProvider._providerProxy as a eip1193 provider
*/
const provider = await this.PrivateKeyProvider.solanaPrivateKey(privKey);
}
Checkout the examples for your preferred blockchain and platform in our examples repository
🌐 Demo
Checkout the Web3Auth Demo to see how Web3Auth can be used in your application.
💬 Troubleshooting and Discussions
- Have a look at our GitHub Discussions to see if anyone has any questions or issues you might be having.
- Checkout our Troubleshooting Documentation Page to know the common issues and solutions
- Join our Discord to join our community and get private integration support or help with your integration.