initialize method

  1. @override
Future<void> initialize(
  1. JsonRpcWebsocketClient client,
  2. Uri walletUri, {
  3. Duration? timeLimit,
})
override

Performs any setup required by the scenario prior to establishing an encrypted session (e.g. launching the mobile wallet application or waiting for a ping frame).

Throws an exception to abort the request.

Implementation

@override
Future<void> initialize(
  final JsonRpcWebsocketClient client,
  final Uri walletUri, {
  final Duration? timeLimit,
}) async {
  await client.connect(timeLimit: timeLimit);
  await _pingCompleter.future;
}