findTemplates method

  1. @override
Future<List<WalletTemplate>> findTemplates()

Fetches all templates. @returns A Promise that resolves to an array of WalletTemplate objects.

Implementation

@override
Future<List<sdk.WalletTemplate>> findTemplates() async {
  try {
    final result = await templatesStore.find(_instance);

    return result
        .map((json) => sdk.WalletTemplate(
            json.key, json["template"]! as String, json["lock"]! as String))
        .toList();
  } catch (e) {
    rethrow;
  }
}