request<T> method
Use request to submit RPC requests with method
and optionally params
to Ethereum via Wallet Connect.
Returns a Future of generic type that resolves to the result of the RPC method call.
Implementation
Future<T> request<T>(String method, [dynamic params]) async {
switch (T) {
case BigInt:
return BigInt.parse(await request<String>(method, params)) as T;
default:
return promiseToFuture<T>(
callMethod(
impl,
'request',
[
_RequestArgumentsImpl(
method: method, params: params != null ? params : [])
],
),
);
}
}