Ant Design Web3 officially provides @ant-design/web3-solana
to adapt to Solana. It is an Ant Design Web3 Solana adapter based on Solana Web3.js. It provides the ability to connect to Solana for the components of @ant-design/web3
.
We support rich configurations of wallets, protocols, and interaction methods. For most DApps, we recommend using the following configuration:
The recommended configuration mainly includes:
quickConnect
to provide quick connection entry to simplify user operations.simple
mode and disable group to simplify the interface.To reduce the size of the package you're including, you need to manually configure the wallets
to import the relevant wallets. You can export the necessary resources from @ant-design/web3-assets
and @solana/wallet-adapter-ADAPTER_YOUR_NEED
. If you don't find the resources you need, you can let us know by submitting a GitHub issue. You can also configure it yourself or submit a Pull Request to us for support.
@solana/wallet-adapter-ADAPTER_YOUR_NEED
:
Available adapters can be found here: wallet-adapters
We have built-in support for the Solana mainnet (mainnet-beta
). To support other networks, you need to configure the chains
and import the relevant resources. The import process is similar to that for wallets.
TipLink is a lightweight wallet. We support it through the built-in TipLinkWallet, which you can use directly.
You can also find more information about TipLink Wallet Adapter here: TipLink Wallet Adapter
You can use more components together. The content related to the chain in the component will be obtained from the adapter. Of course, the properties configured directly on the component have a higher priority.
Property | Description | Type | Default | Version |
---|---|---|---|---|
rpcProvider | RPC provider for connecting nodes | (chain?: Chain) => string | - | - |
connectionConfig | Configuration for instantiating a Connection | ConnectionConfig | - | - |
balance | Whether to display balance | boolean | - | - |
chains | Chains | SolanaChainConfig[] | - | - |
wallets | Wallets | WalletFactory[] | - | - |
autoConnect | Whether to connect automatically | boolean | false | - |
autoAddRegisteredWallets | Whether to automatically add registered plugin wallets | boolean | false | - |
walletProviderProps | Transparent to WalletProvider | WalletProviderProps | - | - |
locale | Multilingual settings | Locale | - | - |
walletConnect | WalletConnect configs | UniversalProviderOpts | - | - |