const require_rolldown_runtime = require('../../../../../../_virtual/rolldown_runtime.js');
const require_DidCommMediationRecipientService = require('./DidCommMediationRecipientService.js');
let __credo_ts_core = require("@credo-ts/core");
__credo_ts_core = require_rolldown_runtime.__toESM(__credo_ts_core);

//#region ../didcomm/src/modules/routing/services/helpers.ts
async function getMediationRecordForDidDocument(agentContext, didDocument) {
	const [mediatorRecord] = await agentContext.resolve(require_DidCommMediationRecipientService.DidCommMediationRecipientService).findAllMediatorsByQuery(agentContext, { recipientKeys: didDocument.recipientKeys.map((key) => __credo_ts_core.TypedArrayEncoder.toBase58(key.publicKey.publicKey)) });
	return mediatorRecord;
}

//#endregion
exports.getMediationRecordForDidDocument = getMediationRecordForDidDocument;