Developers who are familiar with web3js can install @ant-design/web3-eth-web3js and use it with the component library. Most of the usage is consistent with the wagmi adapter.
npm install @ant-design/web3 @ant-design/web3-eth-web3js web3 --save
This example shows basic usage using the web3js adapter. We provide useWeb3js react hooks to obtain web3 instances, and you can use them in components to perform on-chain operations.
This example shows how to use the web3js adapter to sign messages. For more example methods, please refer to web3js documentation.
| Property | Description | Type | Default | Version |
|---|---|---|---|---|
| wallets | Wallets | WalletFactory[] | - | - |
| chains | Chains | Chain[] | - | - |
| ens | Whether to display ENS | boolean | - | - |
| balance | Whether to display balance | boolean | - | - |
| locale | Multilingual settings | Locale | - | - |
| eip6963 | Whether to use EIP6963 protocol wallet and related configurations | boolean | EIP6963Config | false | |
| walletConnect | Whether to use the Wallet Connect protocol | false | WalletConnectOptions | false | |
| storage | Persists config's state between sessions. | false | WagmiStorage | - | next |