init static method

void init(
  1. Vault vault,
  2. String unlockPassword,
  3. Network network,
  4. int account,
)

Implementation

static void init(
    Vault vault, String unlockPassword, Network network, int account) {
  final nativePwd = unlockPassword.toNativeUtf8();
  final nativeNet = network.networkNativeName.toNativeUtf8();
  try {
    return DartApi.native.hydraPlugin
        .init(vault.ffi, nativePwd, nativeNet, account)
        .extract((res) => res.asVoid);
  } finally {
    calloc.free(nativeNet);
    calloc.free(nativePwd);
  }
}