

const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.js');
const require_CredoError = require('../../../error/CredoError.js');
require('../../../error/index.js');
let did_resolver = require("did-resolver");
did_resolver = require_rolldown_runtime.__toESM(did_resolver);

//#region src/modules/dids/domain/parse.ts
function parseDid(did) {
	const parsed = tryParseDid(did);
	if (!parsed) throw new require_CredoError.CredoError(`Error parsing did '${did}'`);
	return parsed;
}
function tryParseDid(did) {
	return (0, did_resolver.parse)(did);
}

//#endregion
exports.parseDid = parseDid;
exports.tryParseDid = tryParseDid;