createFromWallet static method

Future<Client> createFromWallet(
  1. Api api,
  2. Signer wallet, {
  3. List<Codec<Object>> customCodecs = const [],
})

This creates a new Client instance using the Signer to trigger signature prompts to acquire user authentication keys.

Implementation

static Future<Client> createFromWallet(
  Api api,
  Signer wallet, {
  List<Codec> customCodecs = const [],
}) async {
  var client = await _createUninitialized(api, wallet.address, customCodecs);
  await client._auth.authenticateWithCredentials(wallet);
  await client._contacts.ensureSavedContact(client._auth.keys);
  return client;
}