Connecting Blockchains with Web3Auth
Web3Auth is the frontend authentication system for your dApp. Once the user is authenticated, the Web3Auth SDK returns a provider. A provider is how libraries like web3.js & ethers.js talk to the blockchain. Providers take JSON-RPC requests and return the response. This is normally done by submitting the request to an HTTP or IPC socket-based server. With Web3Auth, you get two types of providers, depending on the product you use:
Web3Auth is Chain Agnostic
By default, Web3Auth supports the secp256k1
and ed25519
key curves. While these key curves serve
the majority of blockchains out there, certain blockchains have different curve implementations of
their own. While for our MPC products, you need dedicated providers to interact with certain
blockchains, with Web3Auth non-MPC products you can interact with any blockchain of your choice.
In Web3Auth non-MPC Products, the ability to export the user's private key comes in handy. This private key can be utilized by the dApp to interact with the chain.
You can read more about this in our Connect with Other Blockchains section.
Web3Auth is composable - you can combine it with meta-transaction flows, multisigs, and other cryptographic protocols. It is easy to build on top of, and generally fits in with most other technology stacks, including but not limited to; your favorite scalability solutions, meta transactions, smart contract wallets, different elliptic curve pairs and even RSA.
Private Key Providers (non-MPC)
The Private Key Providers work with the majority of Web3Auth products, including Plug and Play SDKs, Single Factor Auth SDKs, and tKey SSS (v1) SDKs. As the name suggests these providers are a wrapper around the user's private key, which is dynamically reconstructed with Shamir's Secret Sharing and is present in the user's frontend.
Once the authentication happens, the returned result from the Web3Auth network is taken up by the provider to give a common interface to interact with the blockchain of your choice. Currently, Web3Auth supports the following private key providers for Web SDKs:
- EIP1193 Private Key Provider: For connecting to EVM based chains
- Solana Private Key Provider: For connecting with Solana Blockchain
- XRPL Private Key Provider: For connecting with XRPL Blockchain
- Common Private Key Provider: For connecting with any blockchain.
MPC Providers
The Threshold Signature Scheme-based MPC Providers work with our MPC Core Kit SDK. These providers generate a signature of the particular key curve the provider is configured for and accordingly gives you the interface to initialize with the blockchain it is configured for. Currently, Web3Auth MPC Core Kit supports the following providers:
- EIP1193 MPC Provider: For connecting with EVM-based chains [Available by default within the SDK]
- Bitcoin MPC Provider (coming soon)
- Solana MPC Provider (coming soon)
Reference Guides for Blockchain Connections
You can check out the following guides we've written for certain blockchains. We have covered a wide variety of EVM and EVM Chains, supported by multiple web3auth providers.
EVM Chain Guides
Non EVM Chain guides
Adding JSON RPC APIs
Web3Auth providers give you a standard way of interacting with the blockchain. However, alongside that, it is recommended to use JSON RPC APIs, which help you connect to the blockchain without the need to run your own instance/ nodes. There are many services which offer a web API for accessing different blockchains:
Infura
Infura is the leading platform for Ethereum infrastructure. It provides a gateway to the Ethereum network, allowing developers to build and scale decentralized applications without having to run their own infrastructure. Most of the Web3Auth backend infrastructure runs on Infura APIs.
Quicknode
Quicknode is a managed blockchain node service that provides high-performance access to 15+ blockchains, including Ethereum, Gnosis (xDAI), Polygon, Binance
Smart Chain, Avalanche, Fantom, Solana, Optimism, Arbitrum (+Nova), Algorand, Harmony, Celo, Neon, Terra and Bitcoin networks. They're the biggest node providers for the Solana Ecosystem, and our major partners for Solana infrastructure.
Alchemy
As a developer platform, Alchemy provides a suite of developer toolings and abstractions including JSON RPC APIs across all major chains, an ethers.js SDK, and a library of enhanced APIs like their NFT APIs.
Ankr
Ankr is a decentralized cloud computing platform that provides a full suite of infrastructure services for blockchain developers. Most of the examples in our documentation use Ankr's Public JSON RPC APIs, to help you kickstart.
dRPC
dRPC is a new type of RPC services, that combined 30+ RPC provider across the globe in one computation pool, to provide best possible reliability and latency.
Faucets for Different Blockchains
Faucets are services that provide users with a small amount of cryptocurrency for free. These are often used for testing purposes or to onboard new users to a blockchain network. Here are some popular faucet services for different test blockchains:
- Amoy Polygon faucet
- Avalanche
- Base Sepolia Faucet
- Binance Smart Chain Faucet
- Cosmos
- Optimism
- Polkadot Rococo / Westend / Paseo
- Sepolia Ethereum Faucet
- Solana
- Gnosis
- Lisk