create static method

Future<LedgerConnection> create({
  1. required LedgerConnectionGetPublicKey getPublicKey,
  2. required LedgerConnectionSign connectionSign,
})

Implementation

static Future<LedgerConnection> create({
  required LedgerConnectionGetPublicKey getPublicKey,
  required LedgerConnectionSign connectionSign,
}) async {
  final instance = LedgerConnection._(getPublicKey, connectionSign);

  final lib = createLib();
  instance.connection = await lib.newStaticMethodLedgerConnectionDartWrapper(
    instanceHash: instance.instanceHash,
  );

  return instance;
}