fetchOhttpKeys function

Future<OhttpKeys> fetchOhttpKeys({
  1. required String ohttpRelay,
  2. required String payjoinDirectory,
})

Fetch the ohttp keys from the specified payjoin directory via proxy.

  • ohttpRelay: The http CONNNECT method proxy to request the ohttp keys from a payjoin directory. Proxying requests for ohttp keys ensures a client IP address is never revealed to the payjoin directory.

  • payjoinDirectory: The payjoin directory from which to fetch the ohttp keys. This directory stores and forwards payjoin client payloads.

  • certDer (optional): The DER-encoded certificate to use for local HTTPS connections. This parameter is only available when the "_danger-local-https" feature is enabled.

Implementation

Future<OhttpKeys> fetchOhttpKeys({
  required String ohttpRelay,
  required String payjoinDirectory,
}) async {
  final res = await io.fetchOhttpKeys(
    ohttpRelay: ohttpRelay,
    payjoinDirectory: payjoinDirectory,
  );
  return OhttpKeys._(field0: res.field0);
}