import { CredentialPayload, IMessage, PresentationPayload, VerifiableCredential, VerifiablePresentation, W3CVerifiableCredential, W3CVerifiablePresentation } from '@veramo/core-types'; /** * Every Verifiable Credential `@context` property must contain this. * * @public */ export declare const MANDATORY_CREDENTIAL_CONTEXT = "https://www.w3.org/2018/credentials/v1"; /** * Processes an entry or an array of entries into an array of entries. If a `startWithEntry` param is provided, it is * set as the first item in the result array. * @param inputEntryOrArray - The input that needs to be transformed to an array. * @param startWithEntry - If this is provided, this element will be the first in the resulting array. * * @beta This API may change without a BREAKING CHANGE notice. */ export declare function processEntryToArray(inputEntryOrArray?: string | string[] | any, startWithEntry?: string): string[]; /** * Parses a {@link @veramo/core-types#W3CVerifiableCredential | W3CVerifiableCredential} and converts it to a * {@link @veramo/core-types#VerifiableCredential | VerifiableCredential} so it is easier to use programmatically. * * @param input - the raw credential to be transformed * @beta This API may change without a BREAKING CHANGE notice. */ export declare function decodeCredentialToObject(input: W3CVerifiableCredential): VerifiableCredential; /** * Parses a {@link @veramo/core-types#W3CVerifiablePresentation | W3CVerifiablePresentation} and converts it to a * {@link @veramo/core-types#VerifiablePresentation | VerifiablePresentation} so it is easier to use programmatically. * * @param input - the raw presentation to be transformed. * * @beta This API may change without a BREAKING CHANGE notice. */ export declare function decodePresentationToObject(input: W3CVerifiablePresentation): VerifiablePresentation; /** * Computes a hash for a given credential or presentation. * This hash is usable as an internal ID for database indexing * * @param input - the Credential or Presentation whose hash is neeeded * * @beta This API may change without a BREAKING CHANGE notice. */ export declare function computeEntryHash(input: W3CVerifiableCredential | W3CVerifiablePresentation | IMessage): string; /** * Decodes a credential or presentation and returns the issuer ID * `iss` from a JWT or `issuer`/`issuer.id` from a VC or `holder` from a VP * * @param input - the credential or presentation whose issuer/holder needs to be extracted. * @param options - options for the extraction * removeParameters - Remove all DID parameters from the issuer ID * * @beta This API may change without a BREAKING CHANGE notice. */ export declare function extractIssuer(input?: W3CVerifiableCredential | W3CVerifiablePresentation | CredentialPayload | PresentationPayload | null, options?: { removeParameters?: boolean; }): string; /** * Remove all DID query parameters and fragment components from a DID URL * * @param did - the DID URL that may contain query parameters * @returns DID URL without query parameters * * @example * ```TypeScript * removeDIDParameters('did:example:abc:0x123?service=agent&relativeRef=%2Fpath#version=42') * // Returns: 'did:example:abc:0x123' * * removeDIDParameters('https://example.com:3128/:abc:0x123?service=agent&relativeRef=%2Fpath#version=42') * // Returns: 'https://example.com:3128/:abc:0x123' * * removeDIDParameters('did:example:abc:0x123#version=42') * // Returns: 'did:example:abc:0x123' * ``` * * @beta This API may change without a BREAKING CHANGE notice. */ export declare function removeDIDParameters(did: string): string; //# sourceMappingURL=credential-utils.d.ts.map