fromString static method

JsonRpcMethod fromString(
  1. String? method
)

fromString.

Implementation

static JsonRpcMethod fromString(String? method) {
  if (method == null) {
    throw WalletException('Method cannot be null', code: -32602);
  }
  final found = tryFromString(method);
  if (found != null) return found;
  throw WalletException('Unknown JSON-RPC method: $method', code: -32601);
}