create static method

Future<SessionInitializer> create({
  1. required Url directory,
  2. required OhttpKeys ohttpKeys,
  3. required String address,
  4. required BigInt expireAfter,
  5. required Network network,
  6. required Url ohttpRelay,
})

Implementation

static Future<SessionInitializer> create(
    {required Url directory,
    required OhttpKeys ohttpKeys,
    required String address,
    required BigInt expireAfter,
    required Network network,
    required Url ohttpRelay}) async {
  try {
    final res = await FfiSessionInitializer.newInstance(
        directory: directory,
        ohttpKeys: ohttpKeys,
        ohttpRelay: ohttpRelay,
        address: address,
        expireAfter: expireAfter,
        network: network);
    return SessionInitializer._(field0: res.field0);
  } on error.PayjoinError catch (e) {
    throw mapPayjoinError(e);
  }
}