fromEncryptedJson static method

Future<Wallet> fromEncryptedJson(
  1. String json,
  2. String password, [
  3. void progressCallback(
    1. double progress
    )?
])

Create an instance from an encrypted json wallet with password.

If progress is provided it will be called during decryption with a value between 0 and 1 indicating the progress towards completion.

Implementation

static Future<Wallet> fromEncryptedJson(
  String json,
  String password, [
  void Function(double progress)? progressCallback,
]) async =>
    Wallet._(
      await promiseToFuture<_WalletImpl>(
        _WalletImpl.fromEncryptedJson(
          json,
          password,
          progressCallback != null ? allowInterop(progressCallback) : null,
        ),
      ),
    );