asRpcService method
Turns this raw client into an rpc client that can be used to create a
Web3Client
:
Future<void> main() async {
final eth = window.ethereum;
if (eth == null) {
print('MetaMask is not available');
return;
}
final client = Web3Client.custom(eth.asRpcService());
}
Implementation
RpcService asRpcService() => _MetaMaskRpcService(this);