This repository provides Wax WalletConnect functionality in ReactJS for developing DApp With Wax WalletConnect.
WAX WalletConnect Functional:
- Connect Session WalletConnect.
- Call methods wallet connect testnet or mainnet. Ex: Sign Message, Sign Transaction, Sign And Push Transaction.
- Api Get Information.
Install package @wax-wallet-connect/sdk-core
npm install @wax-wallet-connect/sdk-core
Define signClient Options and Web3Modal Actions.
` const signClientOpts = { logger: '...', projectId: '...', metadata: '...', ... };
const web3ModalOpts = { projectId: '....', themeMode: '...', ... }; `
Define Context Provider With Init Options.
<ChainDataContextProvider> <ClientContextProvider web3ModalOpts={web3ModalOpts} signClientOpts={signClientOpts} ... > <JsonRpcContextProvider> {..YOUR_CODE_HERE...} </JsonRpcContextProvider> </ClientContextProvider> </ChainDataContextProvider>
Example:
const { connect,... } = useWalletConnectClient();
Example:
const { waxRpc, serializeTransaction,... } = useWalletConnectClient();
const { chainData } = useChainData()
Create a new file .env
at the PROJECT-ROOT
and copy/paste the following environment variables.