/*! * Copyright (c) 2022-2026 Digital Bazaar, Inc. All rights reserved. */ import type { IZcap } from '@interop/data-integrity-core'; /** * Helpers for deriving EDV URLs from authorization capabilities (zcaps). A * root zcap encodes its invocation target (an `https` EDV/document URL) in its * URN; a delegated zcap carries it as an `invocationTarget` property. These * functions extract that target and parse the EDV ID out of it. */ /** * The URN prefix used by a synthesized root zcap; the URL-encoded invocation * target follows it. */ export declare const ZCAP_ROOT_PREFIX = "urn:zcap:root:"; /** * Synthesizes the URN id of the root zcap whose invocation target is the given * URL. * * @param {object} options - The options to use. * @param {string} options.url - The invocation target URL (an EDV or document * URL). * * @returns {string} The root zcap URN. */ export declare function createRootZcapId({ url }: { url: string; }): string; /** * Gets the invocation target (an `https` URL) for a capability. * * @param {object} options - The options to use. * @param {object|string} [options.capability] - The authorization capability * (zcap), either a delegated/root zcap object or a root zcap URN string. * * @returns {string|null} The invocation target URL, or `null` if no capability * was given. */ export declare function getInvocationTarget({ capability }?: { capability?: IZcap | string; }): string | null; /** * Parses an EDV ID from a capability's invocation target. * * @param {object} options - The options to use. * @param {object|string} options.capability - The authorization capability * (zcap) to parse the EDV ID from. * * @returns {string} The ID of the EDV. */ export declare function parseEdvId({ capability }?: { capability?: IZcap | string; }): string; //# sourceMappingURL=zcapUrls.d.ts.map