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

//#region ../didcomm/src/modules/oob/helpers.ts
function outOfBandServiceToInlineKeysNumAlgo2Did(service) {
	return (0, __credo_ts_core.didDocumentToNumAlgo2Did)(new __credo_ts_core.DidDocumentBuilder("").addService(new __credo_ts_core.DidCommV1Service({
		id: service.id,
		serviceEndpoint: service.serviceEndpoint,
		accept: service.accept,
		recipientKeys: service.recipientKeys.map((recipientKey) => {
			const did = __credo_ts_core.DidKey.fromDid(recipientKey);
			return `${did.did}#${did.publicJwk.fingerprint}`;
		}),
		routingKeys: service.routingKeys?.map((routingKey) => {
			const did = __credo_ts_core.DidKey.fromDid(routingKey);
			return `${did.did}#${did.publicJwk.fingerprint}`;
		})
	})).build());
}
function outOfBandServiceToNumAlgo2Did(service) {
	const { didDocument } = (0, __credo_ts_core.createPeerDidDocumentFromServices)([{
		id: service.id,
		recipientKeys: service.recipientKeys.map(__credo_ts_core.didKeyToEd25519PublicJwk),
		serviceEndpoint: service.serviceEndpoint,
		routingKeys: service.routingKeys?.map(__credo_ts_core.didKeyToEd25519PublicJwk) ?? []
	}], false);
	return (0, __credo_ts_core.didDocumentToNumAlgo2Did)(didDocument);
}

//#endregion
exports.outOfBandServiceToInlineKeysNumAlgo2Did = outOfBandServiceToInlineKeysNumAlgo2Did;
exports.outOfBandServiceToNumAlgo2Did = outOfBandServiceToNumAlgo2Did;