// Open default viewAppKit.OpenModal();// Open network selection viewAppKit.OpenModal(ViewType.NetworkSearch);// Open account viewAppKit.OpenModal(ViewType.Account);
// Get active account in CAIP-10 formatAccount account = AppKit.Account;Debug.Log(account.Address); // e.g. '0x12345...'Debug.Log(account.ChainId); // e.g. 'eip155:1'Debug.Log(account.AccountId); // e.g. 'eip155:1:0x12345...'
Connect directly to a specific wallet, bypassing the modal UI on native platforms.
Copy
// Connect directly to MetaMask, bypassing the modal UI// On desktop, this opens a QR code with the MetaMask logo; some wallets will have a web wallet option too.// Wallet ID from https://walletguide.walletconnect.networkawait AppKit.ConnectAsync("c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96");// Also works with unlisted walletsawait AppKit.ConnectAsync(new Wallet{ Name = "React Native Wallet", ImageUrl = "https://github.com/reown-com/reown-dotnet/blob/develop/media/wallet-rn.png?raw=true", MobileLink = "rn-web3wallet://"});
// Get the latest block numberBigInteger blockNumber = await AppKit.Evm.RpcRequestAsync<BigInteger>("eth_blockNumber");// Get transaction by hashvar transaction = await AppKit.Evm.RpcRequestAsync<object>("eth_getTransactionByHash", "0x123...");// Call a custom method with multiple parametersvar result = await AppKit.Evm.RpcRequestAsync<object>("custom_method", param1, param2);