import { DidCommMediationRecipientService } from "./DidCommMediationRecipientService.mjs";
import { TypedArrayEncoder } from "@credo-ts/core";

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

//#endregion
export { getMediationRecordForDidDocument };
//# sourceMappingURL=helpers.mjs.map