Integrate with Web3.js
Use Blocto wallet SDK with your existing web3.js integration
You can use Blocto wallet service with your current web3.js integration with only a few simple lines of code.
Note that Blocto SDK for EVM-compatible chains is still in Beta. APIs are subject to breaking changes.
Installation
Install from npm/yarn/pnpm
Usage
Initiate Blocto SDK and Web3
Blocto SDK Parameters
Parameter | Type | Description | Required |
---|---|---|---|
| String (hex) | EVM chain ID to connect to Reference: EVM Networks | Yes |
| String | JSON RPC endpoint | Yes (only for Ethereum) |
| String | Blocto dApp ID | No |
You can then use the web3
object for on-chain interactions. For more documentation for what you can do with web3.js, check out
Supported Chain ID
Network | Chain ID |
---|---|
Ethereum Mainnet | 1 |
Ethereum Sepolia Testnet | 11155111 |
Arbitrum Mainnet | 42161 |
Optimism Mainnet | 10 |
Polygon Mainnet | 137 |
Polygon Amoy Testnet | 80002 |
BSC Mainnet | 56 |
BSC Chapel Testnet | 97 |
Avalanche Mainnet | 43114 |
Avalanche Fuji Testnet | 43113 |
Base Mainnet | 8453 |
Zora Mainnet | 7777777 |
Scroll Mainnet | 534352 |
Scroll Sepolia Testnet | 534351 |
Last updated