// Generated by dts-bundle-generator v6.13.0

import { DataTransformer } from '@trpc/server';
import { Draft } from 'immer';
import { Dispatch, SetStateAction } from 'react';
import { DraftFunction, Updater } from 'use-immer';

declare const UnsignedVCValidator: z.ZodObject<{
	"@context": z.ZodArray<z.ZodUnion<[
		z.ZodString,
		z.ZodRecord<z.ZodString, z.ZodAny>
	]>>;
	id: z.ZodOptional<z.ZodString>;
	type: z.ZodArray<z.ZodString>;
	issuer: z.ZodUnion<[
		z.ZodString,
		z.ZodObject<{
			id: z.ZodOptional<z.ZodString>;
			type: z.ZodUnion<[
				z.ZodString,
				z.ZodOptional<z.ZodArray<z.ZodString>>
			]>;
			name: z.ZodOptional<z.ZodString>;
			url: z.ZodOptional<z.ZodString>;
			phone: z.ZodOptional<z.ZodString>;
			description: z.ZodOptional<z.ZodString>;
			endorsement: z.ZodOptional<z.ZodArray<z.ZodAny>>;
			image: z.ZodOptional<z.ZodUnion<[
				z.ZodString,
				z.ZodObject<{
					id: z.ZodString;
					type: z.ZodString;
					caption: z.ZodOptional<z.ZodString>;
				}, z.core.$strip>
			]>>;
			email: z.ZodOptional<z.ZodString>;
			address: z.ZodOptional<z.ZodObject<{
				type: z.ZodUnion<[
					z.ZodString,
					z.ZodArray<z.ZodString>
				]>;
				addressCountry: z.ZodOptional<z.ZodString>;
				addressCountryCode: z.ZodOptional<z.ZodString>;
				addressRegion: z.ZodOptional<z.ZodString>;
				addressLocality: z.ZodOptional<z.ZodString>;
				streetAddress: z.ZodOptional<z.ZodString>;
				postOfficeBoxNumber: z.ZodOptional<z.ZodString>;
				postalCode: z.ZodOptional<z.ZodString>;
				geo: z.ZodOptional<z.ZodObject<{
					type: z.ZodUnion<[
						z.ZodString,
						z.ZodArray<z.ZodString>
					]>;
					latitude: z.ZodNumber;
					longitude: z.ZodNumber;
				}, z.core.$strip>>;
			}, z.core.$strip>>;
			otherIdentifier: z.ZodOptional<z.ZodArray<z.ZodObject<{
				type: z.ZodUnion<[
					z.ZodString,
					z.ZodArray<z.ZodString>
				]>;
				identifier: z.ZodString;
				identifierType: z.ZodUnion<[
					z.ZodEnum<{
						sourcedId: "sourcedId";
						systemId: "systemId";
						productId: "productId";
						userName: "userName";
						accountId: "accountId";
						emailAddress: "emailAddress";
						nationalIdentityNumber: "nationalIdentityNumber";
						isbn: "isbn";
						issn: "issn";
						lisSourcedId: "lisSourcedId";
						oneRosterSourcedId: "oneRosterSourcedId";
						sisSourcedId: "sisSourcedId";
						ltiContextId: "ltiContextId";
						ltiDeploymentId: "ltiDeploymentId";
						ltiToolId: "ltiToolId";
						ltiPlatformId: "ltiPlatformId";
						ltiUserId: "ltiUserId";
						identifier: "identifier";
					}>,
					z.ZodString
				]>;
			}, z.core.$strip>>>;
			official: z.ZodOptional<z.ZodString>;
			parentOrg: z.ZodOptional<z.ZodAny>;
			familyName: z.ZodOptional<z.ZodString>;
			givenName: z.ZodOptional<z.ZodString>;
			additionalName: z.ZodOptional<z.ZodString>;
			patronymicName: z.ZodOptional<z.ZodString>;
			honorificPrefix: z.ZodOptional<z.ZodString>;
			honorificSuffix: z.ZodOptional<z.ZodString>;
			familyNamePrefix: z.ZodOptional<z.ZodString>;
			dateOfBirth: z.ZodOptional<z.ZodString>;
		}, z.core.$catchall<z.ZodAny>>
	]>;
	credentialSubject: z.ZodUnion<[
		z.ZodObject<{
			id: z.ZodOptional<z.ZodString>;
		}, z.core.$catchall<z.ZodAny>>,
		z.ZodArray<z.ZodObject<{
			id: z.ZodOptional<z.ZodString>;
		}, z.core.$catchall<z.ZodAny>>>
	]>;
	refreshService: z.ZodOptional<z.ZodUnion<[
		z.ZodObject<{
			id: z.ZodOptional<z.ZodString>;
			type: z.ZodString;
		}, z.core.$catchall<z.ZodAny>>,
		z.ZodArray<z.ZodObject<{
			id: z.ZodOptional<z.ZodString>;
			type: z.ZodString;
		}, z.core.$catchall<z.ZodAny>>>
	]>>;
	credentialSchema: z.ZodOptional<z.ZodUnion<[
		z.ZodObject<{
			id: z.ZodString;
			type: z.ZodString;
		}, z.core.$catchall<z.ZodAny>>,
		z.ZodArray<z.ZodObject<{
			id: z.ZodString;
			type: z.ZodString;
		}, z.core.$catchall<z.ZodAny>>>
	]>>;
	issuanceDate: z.ZodOptional<z.ZodString>;
	expirationDate: z.ZodOptional<z.ZodString>;
	credentialStatus: z.ZodOptional<z.ZodUnion<[
		z.ZodObject<{
			type: z.ZodString;
			id: z.ZodString;
		}, z.core.$catchall<z.ZodAny>>,
		z.ZodArray<z.ZodObject<{
			type: z.ZodString;
			id: z.ZodString;
		}, z.core.$catchall<z.ZodAny>>>
	]>>;
	name: z.ZodOptional<z.ZodString>;
	description: z.ZodOptional<z.ZodString>;
	validFrom: z.ZodOptional<z.ZodString>;
	validUntil: z.ZodOptional<z.ZodString>;
	status: z.ZodOptional<z.ZodUnion<[
		z.ZodObject<{
			type: z.ZodString;
			id: z.ZodString;
		}, z.core.$catchall<z.ZodAny>>,
		z.ZodArray<z.ZodObject<{
			type: z.ZodString;
			id: z.ZodString;
		}, z.core.$catchall<z.ZodAny>>>
	]>>;
	termsOfUse: z.ZodOptional<z.ZodUnion<[
		z.ZodObject<{
			type: z.ZodString;
			id: z.ZodOptional<z.ZodString>;
		}, z.core.$catchall<z.ZodAny>>,
		z.ZodArray<z.ZodObject<{
			type: z.ZodString;
			id: z.ZodOptional<z.ZodString>;
		}, z.core.$catchall<z.ZodAny>>>
	]>>;
	evidence: z.ZodOptional<z.ZodUnion<readonly [
		z.ZodObject<{
			id: z.ZodOptional<z.ZodString>;
			type: z.ZodArray<z.ZodString>;
			name: z.ZodOptional<z.ZodString>;
			narrative: z.ZodOptional<z.ZodString>;
			description: z.ZodOptional<z.ZodString>;
			genre: z.ZodOptional<z.ZodString>;
			audience: z.ZodOptional<z.ZodString>;
		}, z.core.$catchall<z.ZodAny>>,
		z.ZodArray<z.ZodObject<{
			id: z.ZodOptional<z.ZodString>;
			type: z.ZodArray<z.ZodString>;
			name: z.ZodOptional<z.ZodString>;
			narrative: z.ZodOptional<z.ZodString>;
			description: z.ZodOptional<z.ZodString>;
			genre: z.ZodOptional<z.ZodString>;
			audience: z.ZodOptional<z.ZodString>;
		}, z.core.$catchall<z.ZodAny>>>
	]>>;
	renderMethod: z.ZodOptional<z.ZodUnion<readonly [
		z.ZodUnion<readonly [
			z.ZodObject<{
				type: z.ZodLiteral<"TemplateRenderMethod">;
				renderSuite: z.ZodString;
				template: z.ZodString;
				renderProperty: z.ZodOptional<z.ZodArray<z.ZodString>>;
				outputPreference: z.ZodOptional<z.ZodObject<{
					mediaType: z.ZodString;
				}, z.core.$strip>>;
			}, z.core.$strip>,
			z.ZodRecord<z.ZodString, z.ZodAny>
		]>,
		z.ZodArray<z.ZodUnion<readonly [
			z.ZodObject<{
				type: z.ZodLiteral<"TemplateRenderMethod">;
				renderSuite: z.ZodString;
				template: z.ZodString;
				renderProperty: z.ZodOptional<z.ZodArray<z.ZodString>>;
				outputPreference: z.ZodOptional<z.ZodObject<{
					mediaType: z.ZodString;
				}, z.core.$strip>>;
			}, z.core.$strip>,
			z.ZodRecord<z.ZodString, z.ZodAny>
		]>>
	]>>;
}, z.core.$catchall<z.ZodAny>>;
export type UnsignedVC = z.infer<typeof UnsignedVCValidator>;
declare const VCValidator: z.ZodObject<{
	"@context": z.ZodArray<z.ZodUnion<[
		z.ZodString,
		z.ZodRecord<z.ZodString, z.ZodAny>
	]>>;
	id: z.ZodOptional<z.ZodString>;
	type: z.ZodArray<z.ZodString>;
	issuer: z.ZodUnion<[
		z.ZodString,
		z.ZodObject<{
			id: z.ZodOptional<z.ZodString>;
			type: z.ZodUnion<[
				z.ZodString,
				z.ZodOptional<z.ZodArray<z.ZodString>>
			]>;
			name: z.ZodOptional<z.ZodString>;
			url: z.ZodOptional<z.ZodString>;
			phone: z.ZodOptional<z.ZodString>;
			description: z.ZodOptional<z.ZodString>;
			endorsement: z.ZodOptional<z.ZodArray<z.ZodAny>>;
			image: z.ZodOptional<z.ZodUnion<[
				z.ZodString,
				z.ZodObject<{
					id: z.ZodString;
					type: z.ZodString;
					caption: z.ZodOptional<z.ZodString>;
				}, z.core.$strip>
			]>>;
			email: z.ZodOptional<z.ZodString>;
			address: z.ZodOptional<z.ZodObject<{
				type: z.ZodUnion<[
					z.ZodString,
					z.ZodArray<z.ZodString>
				]>;
				addressCountry: z.ZodOptional<z.ZodString>;
				addressCountryCode: z.ZodOptional<z.ZodString>;
				addressRegion: z.ZodOptional<z.ZodString>;
				addressLocality: z.ZodOptional<z.ZodString>;
				streetAddress: z.ZodOptional<z.ZodString>;
				postOfficeBoxNumber: z.ZodOptional<z.ZodString>;
				postalCode: z.ZodOptional<z.ZodString>;
				geo: z.ZodOptional<z.ZodObject<{
					type: z.ZodUnion<[
						z.ZodString,
						z.ZodArray<z.ZodString>
					]>;
					latitude: z.ZodNumber;
					longitude: z.ZodNumber;
				}, z.core.$strip>>;
			}, z.core.$strip>>;
			otherIdentifier: z.ZodOptional<z.ZodArray<z.ZodObject<{
				type: z.ZodUnion<[
					z.ZodString,
					z.ZodArray<z.ZodString>
				]>;
				identifier: z.ZodString;
				identifierType: z.ZodUnion<[
					z.ZodEnum<{
						sourcedId: "sourcedId";
						systemId: "systemId";
						productId: "productId";
						userName: "userName";
						accountId: "accountId";
						emailAddress: "emailAddress";
						nationalIdentityNumber: "nationalIdentityNumber";
						isbn: "isbn";
						issn: "issn";
						lisSourcedId: "lisSourcedId";
						oneRosterSourcedId: "oneRosterSourcedId";
						sisSourcedId: "sisSourcedId";
						ltiContextId: "ltiContextId";
						ltiDeploymentId: "ltiDeploymentId";
						ltiToolId: "ltiToolId";
						ltiPlatformId: "ltiPlatformId";
						ltiUserId: "ltiUserId";
						identifier: "identifier";
					}>,
					z.ZodString
				]>;
			}, z.core.$strip>>>;
			official: z.ZodOptional<z.ZodString>;
			parentOrg: z.ZodOptional<z.ZodAny>;
			familyName: z.ZodOptional<z.ZodString>;
			givenName: z.ZodOptional<z.ZodString>;
			additionalName: z.ZodOptional<z.ZodString>;
			patronymicName: z.ZodOptional<z.ZodString>;
			honorificPrefix: z.ZodOptional<z.ZodString>;
			honorificSuffix: z.ZodOptional<z.ZodString>;
			familyNamePrefix: z.ZodOptional<z.ZodString>;
			dateOfBirth: z.ZodOptional<z.ZodString>;
		}, z.core.$catchall<z.ZodAny>>
	]>;
	credentialSubject: z.ZodUnion<[
		z.ZodObject<{
			id: z.ZodOptional<z.ZodString>;
		}, z.core.$catchall<z.ZodAny>>,
		z.ZodArray<z.ZodObject<{
			id: z.ZodOptional<z.ZodString>;
		}, z.core.$catchall<z.ZodAny>>>
	]>;
	refreshService: z.ZodOptional<z.ZodUnion<[
		z.ZodObject<{
			id: z.ZodOptional<z.ZodString>;
			type: z.ZodString;
		}, z.core.$catchall<z.ZodAny>>,
		z.ZodArray<z.ZodObject<{
			id: z.ZodOptional<z.ZodString>;
			type: z.ZodString;
		}, z.core.$catchall<z.ZodAny>>>
	]>>;
	credentialSchema: z.ZodOptional<z.ZodUnion<[
		z.ZodObject<{
			id: z.ZodString;
			type: z.ZodString;
		}, z.core.$catchall<z.ZodAny>>,
		z.ZodArray<z.ZodObject<{
			id: z.ZodString;
			type: z.ZodString;
		}, z.core.$catchall<z.ZodAny>>>
	]>>;
	issuanceDate: z.ZodOptional<z.ZodString>;
	expirationDate: z.ZodOptional<z.ZodString>;
	credentialStatus: z.ZodOptional<z.ZodUnion<[
		z.ZodObject<{
			type: z.ZodString;
			id: z.ZodString;
		}, z.core.$catchall<z.ZodAny>>,
		z.ZodArray<z.ZodObject<{
			type: z.ZodString;
			id: z.ZodString;
		}, z.core.$catchall<z.ZodAny>>>
	]>>;
	name: z.ZodOptional<z.ZodString>;
	description: z.ZodOptional<z.ZodString>;
	validFrom: z.ZodOptional<z.ZodString>;
	validUntil: z.ZodOptional<z.ZodString>;
	status: z.ZodOptional<z.ZodUnion<[
		z.ZodObject<{
			type: z.ZodString;
			id: z.ZodString;
		}, z.core.$catchall<z.ZodAny>>,
		z.ZodArray<z.ZodObject<{
			type: z.ZodString;
			id: z.ZodString;
		}, z.core.$catchall<z.ZodAny>>>
	]>>;
	termsOfUse: z.ZodOptional<z.ZodUnion<[
		z.ZodObject<{
			type: z.ZodString;
			id: z.ZodOptional<z.ZodString>;
		}, z.core.$catchall<z.ZodAny>>,
		z.ZodArray<z.ZodObject<{
			type: z.ZodString;
			id: z.ZodOptional<z.ZodString>;
		}, z.core.$catchall<z.ZodAny>>>
	]>>;
	evidence: z.ZodOptional<z.ZodUnion<readonly [
		z.ZodObject<{
			id: z.ZodOptional<z.ZodString>;
			type: z.ZodArray<z.ZodString>;
			name: z.ZodOptional<z.ZodString>;
			narrative: z.ZodOptional<z.ZodString>;
			description: z.ZodOptional<z.ZodString>;
			genre: z.ZodOptional<z.ZodString>;
			audience: z.ZodOptional<z.ZodString>;
		}, z.core.$catchall<z.ZodAny>>,
		z.ZodArray<z.ZodObject<{
			id: z.ZodOptional<z.ZodString>;
			type: z.ZodArray<z.ZodString>;
			name: z.ZodOptional<z.ZodString>;
			narrative: z.ZodOptional<z.ZodString>;
			description: z.ZodOptional<z.ZodString>;
			genre: z.ZodOptional<z.ZodString>;
			audience: z.ZodOptional<z.ZodString>;
		}, z.core.$catchall<z.ZodAny>>>
	]>>;
	renderMethod: z.ZodOptional<z.ZodUnion<readonly [
		z.ZodUnion<readonly [
			z.ZodObject<{
				type: z.ZodLiteral<"TemplateRenderMethod">;
				renderSuite: z.ZodString;
				template: z.ZodString;
				renderProperty: z.ZodOptional<z.ZodArray<z.ZodString>>;
				outputPreference: z.ZodOptional<z.ZodObject<{
					mediaType: z.ZodString;
				}, z.core.$strip>>;
			}, z.core.$strip>,
			z.ZodRecord<z.ZodString, z.ZodAny>
		]>,
		z.ZodArray<z.ZodUnion<readonly [
			z.ZodObject<{
				type: z.ZodLiteral<"TemplateRenderMethod">;
				renderSuite: z.ZodString;
				template: z.ZodString;
				renderProperty: z.ZodOptional<z.ZodArray<z.ZodString>>;
				outputPreference: z.ZodOptional<z.ZodObject<{
					mediaType: z.ZodString;
				}, z.core.$strip>>;
			}, z.core.$strip>,
			z.ZodRecord<z.ZodString, z.ZodAny>
		]>>
	]>>;
	proof: z.ZodUnion<[
		z.ZodObject<{
			type: z.ZodString;
			created: z.ZodString;
			challenge: z.ZodOptional<z.ZodString>;
			domain: z.ZodOptional<z.ZodString>;
			nonce: z.ZodOptional<z.ZodString>;
			proofPurpose: z.ZodString;
			verificationMethod: z.ZodString;
			jws: z.ZodOptional<z.ZodString>;
		}, z.core.$catchall<z.ZodAny>>,
		z.ZodArray<z.ZodObject<{
			type: z.ZodString;
			created: z.ZodString;
			challenge: z.ZodOptional<z.ZodString>;
			domain: z.ZodOptional<z.ZodString>;
			nonce: z.ZodOptional<z.ZodString>;
			proofPurpose: z.ZodString;
			verificationMethod: z.ZodString;
			jws: z.ZodOptional<z.ZodString>;
		}, z.core.$catchall<z.ZodAny>>>
	]>;
}, z.core.$catchall<z.ZodAny>>;
export type VC = z.infer<typeof VCValidator>;
declare const CredentialFormatValidator: z.ZodEnum<{
	"w3c-vc-2.0": "w3c-vc-2.0";
	"w3c-vc-1.1": "w3c-vc-1.1";
	"jwt-vc-json": "jwt-vc-json";
	"dc+sd-jwt": "dc+sd-jwt";
	"vc+sd-jwt": "vc+sd-jwt";
	mso_mdoc: "mso_mdoc";
}>;
export type CredentialFormat = z.infer<typeof CredentialFormatValidator>;
export type StoredCredentialEnvelope = {
	format: CredentialFormat;
	data: string | Uint8Array;
	[key: string]: unknown;
};
/**
 * Format-discriminated read view over a stored credential. Returned
 * by `toStoredCredential(record)` in `@learncard/helpers`.
 *
 * The `data` field carries the correct wire-form representation for
 * the credential's format:
 *   - W3C VCs: the JSON-LD VC object (also what `record.vc` holds)
 *   - JWT-VC: the compact JWS string (extracted from `record.vc.proof.jwt`
 *     if the record uses the legacy LDP-around-JWT envelope, otherwise
 *     the raw string from `record.rawWireForm`)
 *   - SD-JWT-VC: the compact `<JWT>~<disclosures>~` string
 *   - mDoc: base64url-encoded CBOR bytes (stored as a string for
 *     LearnCloud's JSON-only encrypted store; consumers base64-decode
 *     when they need raw bytes)
 *
 * Format-aware consumers pattern-match on `format` and use `data`.
 * Legacy consumers continue to read `record.vc` directly — the
 * projector is opt-in, never required.
 */
export type StoredCredential = {
	format: "w3c-vc-2.0";
	data: VC;
} | {
	format: "w3c-vc-1.1";
	data: VC;
} | {
	format: "jwt-vc-json";
	data: string;
} | {
	format: "dc+sd-jwt";
	data: string;
} | {
	format: "vc+sd-jwt";
	data: string;
} | {
	format: "mso_mdoc";
	data: string;
};
export type CredentialRecord<Metadata extends Record<string, any> = Record<never, never>> = {
	id: string;
	uri: string;
	/**
	 * Wire-format discriminator for the credential. Optional — when
	 * absent, legacy readers infer it from `vc` shape (see
	 * `toStoredCredential` in `@learncard/helpers`). Populated on new
	 * writes once the consumer is format-aware.
	 *
	 * Added in ADR-0001 Phase 1 as additive metadata; existing
	 * records without this field continue to work unchanged.
	 */
	format?: CredentialFormat;
	/**
	 * Optional semantic type hint for fast filtering without parsing
	 * the full credential — `vct` for SD-JWT-VC, last-non-VC type for
	 * W3C VCs, doctype for mDoc. Added in ADR-0001 Phase 1.
	 */
	semanticType?: string;
	/**
	 * On-the-wire representation for formats whose `vc` field cannot
	 * hold the canonical form (SD-JWT compact, JWT-VC compact, base64
	 * mDoc CBOR). Undefined for W3C VCs (`vc` IS the wire form). Added
	 * in ADR-0001 Phase 1.
	 */
	rawWireForm?: string;
	[key: string]: any;
} & Metadata;
declare const JWEValidator: z.ZodObject<{
	protected: z.ZodString;
	iv: z.ZodString;
	ciphertext: z.ZodString;
	tag: z.ZodString;
	aad: z.ZodOptional<z.ZodString>;
	recipients: z.ZodOptional<z.ZodArray<z.ZodObject<{
		header: z.ZodObject<{
			alg: z.ZodString;
			iv: z.ZodString;
			tag: z.ZodString;
			epk: z.ZodOptional<z.ZodObject<{
				kty: z.ZodOptional<z.ZodString>;
				crv: z.ZodOptional<z.ZodString>;
				x: z.ZodOptional<z.ZodString>;
				y: z.ZodOptional<z.ZodOptional<z.ZodString>>;
				n: z.ZodOptional<z.ZodOptional<z.ZodString>>;
				d: z.ZodOptional<z.ZodOptional<z.ZodString>>;
			}, z.core.$strip>>;
			kid: z.ZodOptional<z.ZodString>;
			apv: z.ZodOptional<z.ZodString>;
			apu: z.ZodOptional<z.ZodString>;
		}, z.core.$strip>;
		encrypted_key: z.ZodString;
	}, z.core.$strip>>>;
}, z.core.$strip>;
export type JWE = z.infer<typeof JWEValidator>;
declare const BitstringStatusPurposeValidator: z.ZodEnum<{
	revocation: "revocation";
	suspension: "suspension";
}>;
export type BitstringStatusPurpose = z.infer<typeof BitstringStatusPurposeValidator>;
declare const BitstringStatusListEntryValidator: z.ZodObject<{
	id: z.ZodOptional<z.ZodString>;
	type: z.ZodLiteral<"BitstringStatusListEntry">;
	statusPurpose: z.ZodEnum<{
		revocation: "revocation";
		suspension: "suspension";
	}>;
	statusListIndex: z.ZodString;
	statusListCredential: z.ZodString;
}, z.core.$strip>;
export type BitstringStatusListEntry = z.infer<typeof BitstringStatusListEntryValidator>;
declare const Providers: {
	filestack: typeof filestack;
	unsplash: typeof unsplash;
	discord: typeof discord;
};
export declare const getProvider: (url?: string) => keyof typeof Providers | null;
export declare const changeQuality: (url: string, quality: number) => string;
export declare const fixUrl: (url: string, mimetype?: string, webp?: boolean) => string;
export declare const generateSrcSet: (url: string, resolutions: number[], options?: {
	mimetype?: string;
	fix?: boolean;
	webp?: boolean;
}) => string;
export declare const resizeAndChangeQuality: (url: string, size: number, quality: number, options?: {
	mimetype?: string;
	fix?: boolean;
	webp?: boolean;
}) => string;
export declare const DEFAULT_RESOLUTIONS: number[];
/**
 * Gets an array of URLs from a srcSet string
 *
 * @param srcSet HTML srcSet string (e.g. 'test.com/img 100w, test.com/img2 200w')
 *
 * @return URLs
 */
export declare const getUrlsFromSrcSet: (srcSet: string) => [
	string,
	string
][];
/** Quantizes a number to the closest number in an array of numbers */
export declare const quantizeValue: (value: number, array: number[]) => number;
export declare const isNotMaybe: <T>(value?: T | null | undefined) => value is T;
export declare const filterMaybes: <T>(array?: (T | null | undefined)[]) => T[];
export declare const capitalizeFirstLetter: (string: string) => string;
/**
 * Formats a number into a friendlier string i.e. 1,234 becomes 1.2K
 */
export declare const formatNumber: (num: number) => string;
export type SetState<T> = Dispatch<SetStateAction<T>>;
export type UpdaterArgs<T> = T | DraftFunction<T>;
export type CurriedReturn<ValueArg, Value> = undefined extends ValueArg ? (innerValue: Value) => void : void;
export type InnerImmerOuterImmer<State> = <Field extends keyof Draft<State>, Value extends UpdaterArgs<Draft<State>[Field]>, ValueArg extends Value | undefined>(field: Field, value?: ValueArg) => CurriedReturn<ValueArg, Value>;
export type InnerReactOuterImmer<State> = <Field extends keyof Draft<State>, Value extends SetStateAction<Draft<State>[Field]>, ValueArg extends Value | undefined>(field: Field, value?: ValueArg) => CurriedReturn<ValueArg, Value>;
export type InnerImmerOuterReact<State> = <Field extends keyof State, Value extends UpdaterArgs<State[Field]>, ValueArg extends Value | undefined>(field: Field, value?: ValueArg) => CurriedReturn<ValueArg, Value>;
export type InnerReactOuterReact<State> = <Field extends keyof State, Value extends SetStateAction<State[Field]>, ValueArg extends Value | undefined>(field: Field, value?: ValueArg) => CurriedReturn<ValueArg, Value>;
export declare function innerImmerOuterImmer<State, Field extends keyof Draft<State>, Value extends UpdaterArgs<Draft<State>[Field]>>(setState: Updater<State>, field: Field): (innerValue: NonNullable<Value>) => void;
export declare function innerImmerOuterImmer<State, Field extends keyof Draft<State>, Value extends UpdaterArgs<Draft<State>[Field]>, ValueArg extends Value | undefined>(setState: Updater<State>, field: Field, value: ValueArg): void;
/**
 * Curry function to allow innerImmerOuterImmer to be used without constantly passing in setState
 *
 * Use like so:
 *
 * [state, setState] = useImmer<{ num: number; string: string; }>({ num: 1, string: 'str' });
 *
 * const updateField = curriedInnerImmerOuterImmer(setState);
 *
 * updateField('num', 3); // Updates state to { num: 3, string: 'str' }
 *
 * updateField(
 *     'num',
 *     oldNum => {
 *         oldNum += 1;
 *     },
 * ); // Updates state to { num: 4, string: 'str' }
 *
 * updateField(setState, 'num', 'three'); // TS Error due to invalid type
 */
export declare const curriedInnerImmerOuterImmer: <State>(setState: Updater<State>) => InnerImmerOuterImmer<State>;
export declare function innerReactOuterImmer<State, Field extends keyof Draft<State>, Value extends SetStateAction<Draft<State>[Field]>>(setState: Updater<State>, field: Field): (innerValue: NonNullable<Value>) => void;
export declare function innerReactOuterImmer<State, Field extends keyof Draft<State>, Value extends SetStateAction<Draft<State>[Field]>, ValueArg extends Value | undefined>(setState: Updater<State>, field: Field, value: ValueArg): void;
/**
 * Curry function to allow innerReactOuterImmer to be used without constantly passing in setState
 *
 * Use like so:
 *
 * [state, setState] = useImmer<{ num: number; string: string; }>({ num: 1, string: 'str' });
 *
 * const updateField = curriedUpdateImmerSetStateField(setState);
 *
 * updateField('num', 3); // Updates state to { num: 3, string: 'str' }
 *
 * updateField('num', oldNum => oldNum + 1); // Updates state to { num: 4, string: 'str' }
 *
 * updateField(setState, 'num', 'three'); // TS Error due to invalid type
 */
export declare const curriedInnerReactOuterImmer: <State>(setState: Updater<State>) => InnerReactOuterImmer<State>;
export declare function innerImmerOuterReact<State, Field extends keyof State, Value extends UpdaterArgs<State[Field]>>(setState: SetState<State>, field: Field): (innerValue: NonNullable<Value>) => void;
export declare function innerImmerOuterReact<State, Field extends keyof State, Value extends UpdaterArgs<State[Field]>, ValueArg extends Value | undefined>(setState: SetState<State>, field: Field, value: ValueArg): void;
/**
 * Curry function to allow innerImmerOuterReact to be used without constantly passing in setState
 *
 * Use like so:
 *
 * [state, setState] = useImmer<{ num: number; string: string; }>({ num: 1, string: 'str' });
 *
 * const updateField = curriedInnerImmerOuterImmer(setState);
 *
 * updateField('num', 3); // Updates state to { num: 3, string: 'str' }
 *
 * updateField(
 *     'num',
 *     oldNum => {
 *         oldNum += 1;
 *     },
 * ); // Updates state to { num: 4, string: 'str' }
 *
 * updateField(setState, 'num', 'three'); // TS Error due to invalid type
 */
export declare const curriedInnerImmerOuterReact: <State>(setState: SetState<State>) => InnerImmerOuterReact<State>;
export declare function innerReactOuterReact<State, Field extends keyof State, Value extends SetStateAction<State[Field]>>(setState: SetState<State>, field: Field): (innerValue: NonNullable<Value>) => void;
export declare function innerReactOuterReact<State, Field extends keyof State, Value extends SetStateAction<State[Field]>, ValueArg extends Value | undefined>(setState: SetState<State>, field: Field, value: ValueArg): void;
/**
 * Curry function to allow updateSetStateField to be used without constantly passing in setState
 *
 * If possible, please consider updating your useState calls to useImmer and using the immer
 * versions of these functions
 *
 * Use like so:
 *
 * [state, setState] = useState<{ num: number; string: string; }>({ num: 1, string: 'str' });
 *
 * const updateField = curriedInnerReactOuterReact(setState);
 *
 * updateField('num', 3); // Updates state to { num: 3, string: 'str' }
 *
 * updateField('num', oldNum => oldNum + 1); // Updates state to { num: 4, string: 'str' }
 *
 * updateField(setState, 'num', 'three'); // TS Error due to invalid type
 */
export declare const curriedInnerReactOuterReact: <State>(setState: SetState<State>) => InnerReactOuterReact<State>;
export declare function curriedStateSlice<State>(setState: Updater<State>): InnerImmerOuterImmer<State>;
export declare function curriedStateSlice<State>(setState: Updater<State>, options: {
	inner: "immer";
	outer: "immer";
}): InnerImmerOuterImmer<State>;
export declare function curriedStateSlice<State>(setState: Updater<State>, options: {
	inner: "immer";
	outer: "react";
}): InnerImmerOuterReact<State>;
export declare function curriedStateSlice<State>(setState: SetState<State>, options: {
	inner: "react";
	outer: "immer";
}): InnerReactOuterImmer<State>;
export declare function curriedStateSlice<State>(setState: SetState<State>, options: {
	inner: "react";
	outer: "react";
}): InnerReactOuterReact<State>;
export type UpdateSlice<State> = {
	(index: number): Updater<State>;
	(index: number, value: UpdaterArgs<State>): void;
};
export type CurriedArraySlice = {
	<State>(setState: SetState<State[]>): UpdateSlice<State>;
	<State>(setState: SetState<State[]>, index: number): Updater<State>;
	<State>(setState: SetState<State[]>, index: number, value: State): void;
};
export declare const curriedArraySlice: CurriedArraySlice;
export type ImmerArraySlice = {
	<State>(setState: Updater<State[]>): UpdateSlice<State>;
	<State>(setState: Updater<State[]>, index: number): Updater<State>;
	<State>(setState: Updater<State[]>, index: number, value: State): void;
};
export declare const immerArraySlice: ImmerArraySlice;
export declare const getCredentialStatusArray: (credential: unknown) => Record<string, unknown>[];
export declare const isBitstringStatusListEntry: (status: unknown) => status is BitstringStatusListEntry;
export declare const getBitstringStatusListEntries: (credential: unknown) => BitstringStatusListEntry[];
export declare const getBitstringStatusListEntryForPurpose: (credential: unknown, statusPurpose: BitstringStatusPurpose) => BitstringStatusListEntry | undefined;
export declare const getBitstringStatusListBit: (bitstring: Uint8Array, index: number) => boolean;
export declare const setBitstringStatusListBit: (bitstring: Uint8Array, index: number, value: boolean) => void;
export declare const ImageResizingValidator: z.ZodObject<{
	type: z.ZodLiteral<"resizing">;
}, z.core.$strip>;
export type ImageResizing = z.infer<typeof ImageResizingValidator>;
export declare const ImageUploadingValidator: z.ZodObject<{
	type: z.ZodLiteral<"uploading">;
	progress: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
export type ImageUploading = z.infer<typeof ImageUploadingValidator>;
export declare const ImageWithLoadingStateValdator: z.ZodObject<{
	image: z.ZodString;
	loading: z.ZodOptional<z.ZodUnion<readonly [
		z.ZodObject<{
			type: z.ZodLiteral<"resizing">;
		}, z.core.$strip>,
		z.ZodObject<{
			type: z.ZodLiteral<"uploading">;
			progress: z.ZodOptional<z.ZodNumber>;
		}, z.core.$strip>
	]>>;
}, z.core.$strip>;
export type ImageWithLoadingState = z.infer<typeof ImageWithLoadingStateValdator>;
export type FilestackImage = {
	filename: string;
	handle: string;
	mimetype: string;
	originalFile: {
		name: string;
		size: number;
		type: string;
	};
	originalPath: string;
	size: number;
	source: string;
	status: string;
	uploadId: string;
	url: string;
};
export type Simplify<T> = {
	[KeyType in keyof T]: T[KeyType];
};
export type Maybify<T> = Simplify<{
	[P in keyof T]?: Maybify<T[P]> | null;
}>;
/** If Maybify gives you an exceeds maximum length error, try this one!  */
export type PerformantMaybify<T> = {
	[P in keyof T]?: PerformantMaybify<T[P]> | null;
};
export type DeepValues<ObjectType extends object> = {
	[Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object ? DeepValues<ObjectType[Key]> : ObjectType[Key];
}[keyof ObjectType & (string | number)];
export interface Nothing {
}
export type Other<T> = T & Nothing;
export type SuggestString<Literals extends string> = Literals | Other<string>;
export type DeepPartial<T> = T extends Date ? T : T extends object ? {
	[P in keyof T]?: DeepPartial<T[P]>;
} : T;
export declare const isNotUndefined: <T>(value: T | null | undefined) => value is T;
export declare const filterUndefined: <T>(arr: (T | null | undefined)[]) => T[];
/**
 * App installation age restriction logic shared between frontend and backend.
 *
 * This helper evaluates whether a user can install an app based on:
 * - Hard age blocks (min_age) - always blocks, even with guardian approval
 * - Soft age restrictions (age_rating) - can be approved by guardian for child profiles
 * - Contract requirements - require guardian approval for child profiles
 */
export type AppInstallCheckResult = {
	action: "proceed";
} | {
	action: "hard_blocked";
	reason: string;
} | {
	action: "require_dob";
	reason: string;
} | {
	action: "require_guardian_approval";
	reason: string;
};
export type AppInstallCheckInput = {
	/** Whether the user is a child profile (managed account) */
	isChildProfile: boolean;
	/** User's age calculated from DOB, null if DOB is unknown */
	userAge: number | null;
	/** Hard minimum age requirement (blocks completely, no guardian override) */
	minAge?: number;
	/** Soft age rating string (e.g., '4+', '9+', '12+', '17+') */
	ageRating?: string;
	/** Whether the app has an associated consent contract */
	hasContract: boolean;
	/** Whether guardian approval has already been obtained (for backend validation) */
	hasGuardianApproval?: boolean;
};
/**
 * Evaluates whether a user can install an app based on age restrictions and profile type.
 *
 * Cases:
 * 1. Hard block: min_age violation (blocks completely, cannot be overridden)
 * 2. Child profile scenarios:
 *    2a. Child age unknown → require DOB entry (with guardian approval)
 *    2b. No age rating specified → require guardian approval
 *    2c. Child too young for age rating → require guardian approval
 *    2d. App has a contract → require guardian approval
 *    2e. Child old enough, no contract → proceed without guardian
 * 3. Adult user old enough → proceed
 *
 * @param input - The check parameters
 * @returns The action to take and reason if blocked/requires approval
 */
export declare const checkAppInstallEligibility: (input: AppInstallCheckInput) => AppInstallCheckResult;
/**
 * Map age_rating strings to numeric minimum ages.
 */
export declare const AGE_RATING_TO_MIN_AGE: Record<string, number>;
/**
 * Calculate age in years from a date of birth string.
 * @param dob - Date of birth as ISO string or parseable date string
 * @returns Age in years, or null if the date is invalid
 */
export declare const calculateAgeFromDob: (dob?: string | null) => number | null;
/**
 * Project a `CredentialRecord` into a format-discriminated read view.
 *
 * Two paths into the same output:
 *
 * 1. **Explicit format**: if the record carries an explicit `format`
 *    discriminator (and `rawWireForm` where required), the projector
 *    trusts it. This is the path new format-aware writers take.
 *
 * 2. **Inferred from shape** (legacy fallback): for records that
 *    pre-date format-tagging, the projector inspects `record.vc` and
 *    infers the format. W3C VCs → `w3c-vc-2.0` / `w3c-vc-1.1` based
 *    on `@context`; transitional SD-JWT wrappers (which never shipped
 *    but exist on branch `lc-1796-3`) → `dc+sd-jwt` with the compact
 *    extracted from `proof.jwt`; legacy JWT-VC envelopes → `jwt-vc-json`.
 *
 * Returns a `StoredCredential` for every conceivable record. Never
 * throws — credentials with unrecognizable shape fall back to
 * `w3c-vc-1.1` with `data = record.vc` so legacy consumers keep
 * something they can read.
 *
 * This projector is the SAFETY NET that makes the format-tagging
 * migration non-breaking: writers can adopt format-tagging at their
 * own pace; readers using this projector see the right discriminator
 * either way.
 */
export declare const toStoredCredential: (record: CredentialRecord) => StoredCredential;
/**
 * Extract the meaningful identifying segment from an SD-JWT-VC `vct` claim
 * so it can be projected onto the W3C-VC `type` array and `name` field.
 *
 * Returns `undefined` for vct values where no meaningful name can be
 * derived (numeric-only URN tails, empty string). Shared between the
 * receipt-time wrapper synthesizer and the read-time display projector
 * so SD-JWT credentials produce the same wrapper shape on both paths.
 */
export declare const extractVctSegment: (vct: string) => string | undefined;
/**
 * PascalCase identifier suitable for the W3C-VC `type` array. Picks acronyms
 * for short single-word lowercase segments ("pid" → "PID") and otherwise
 * concatenates capitalized words ("playground-credential" → "PlaygroundCredential").
 */
export declare const deriveTypeFromVct: (vct: string | undefined) => string | undefined;
/**
 * Human-readable display name for the `name` field. Same input handling
 * as {@link deriveTypeFromVct} but keeps spaces between words so it reads
 * naturally in UIs ("Playground Credential" not "PlaygroundCredential").
 */
export declare const deriveNameFromVct: (vct: string | undefined) => string | undefined;
export declare const stripSdJwtReservedClaims: (claims: Record<string, unknown>) => Record<string, unknown>;
export declare const synthesizeDidJwk: (jwk: Record<string, unknown>) => string | undefined;
export declare const deriveSdJwtIssuedAtIso: (options: {
	issuedAt?: Date;
	notBefore?: Date;
	iat?: number;
	nbf?: number;
}) => string;
/**
 * Read-path shim: when a storage plugin returns a `StoredCredentialEnvelope` (because we
 * wrote a native non-W3C format like SD-JWT-VC), legacy UI components
 * that read `.credentialSubject` / `.issuer` / `.proof` need a VC-shaped
 * object. This projector synthesizes a minimal display-only VC from the
 * envelope so existing consumers keep working without per-component
 * format awareness.
 *
 * For SD-JWT-VC: decodes the unsigned JWS payload (signature is NOT
 * verified here — verification belongs to the dedicated verify chain),
 * surfaces the disclosed claims under `credentialSubject`, preserves
 * the compact form under `proof.jwt` and `proof.type = 'SdJwtCompactProof'`
 * so anything that already understands the SD-JWT-Compact-Proof shape
 * keeps working.
 *
 * For JWT-VC: decodes the JWS payload, returns its `vc` claim.
 *
 * For mDoc / unknown formats: returns `undefined` — the caller MUST
 * branch on format (`record.format === 'mso_mdoc'`) and use a
 * format-specific display path. We don't fabricate a fake VC for
 * binary credentials.
 *
 * This projector is intentionally LOSSY for SD-JWT — it produces a
 * display-only view, NOT a re-issuable credential. Egress paths
 * (sharing, presenting, re-uploading) MUST go through
 * `serializeForWire(stored)` (Phase 3) to recover the canonical
 * compact form from `envelope.data`. NEVER re-serialize from the
 * projected VC.
 */
export declare const projectEnvelopeToDisplayVc: (envelope: StoredCredentialEnvelope) => VC | undefined;
/**
 * Convenience: detect an envelope on the wire and return a legacy VC
 * shape suitable for downstream W3C-only consumers. Returns the input
 * unchanged if it's not an envelope (so callers can wrap any
 * `read.get` result without branching themselves).
 */
export declare const resolveStorageReadResult: (value: VC | StoredCredentialEnvelope | undefined) => VC | StoredCredentialEnvelope | undefined;
/** Generates a did:web for a user given the app domain and profile ID. */
export declare const getDidWeb: (domain: string, profileId: string) => string;
/**
 * Determines whether or not a string is a valid hexadecimal string
 *
 * E.g. 'abc123' is valid hex, 'zzz' is not
 */
export declare const isHex: (str: string) => boolean;
/** Determines whether or not an object is an encrypted JWE */
export declare const isEncrypted: (item: Record<string, any>) => item is JWE;
/**
 * tRPC data transformer that handles RegExp serialization/deserialization
 */
export declare const RegExpTransformer: DataTransformer;
/**
 * Determines if a credential uses VC 2.0 format by checking the context array
 */
export declare const isVC2Format: (credential: UnsignedVC | VC) => boolean;
/** Unwraps a boost credential from a CertifiedBoostCredential, if it is one */
export declare const unwrapBoostCredential: (vc?: VC | UnsignedVC) => any;
/**
 * Checks if a DID is an app-specific did:web
 *
 * App did:webs follow the pattern: `did:web:learncard.app:app:&lt;slug&gt;`
 *
 * @param did - The DID to check
 * @returns true if the DID is an app did:web, false otherwise
 */
export declare const isAppDidWeb: (did?: string) => boolean;

export {};
