import { Schema, FastCheck } from "effect";
import * as KeyHash from "./KeyHash.js";
import * as ScriptHash from "./ScriptHash.js";
declare const CredentialError_base: new = {}>(args: import("effect/Types").Equals extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
readonly _tag: "CredentialError";
} & Readonly;
/**
* Extends TaggedError for better error handling and categorization
*
* @since 2.0.0
* @category errors
*/
export declare class CredentialError extends CredentialError_base<{
message: string;
cause?: unknown;
}> {
}
/**
* Credential schema representing either a key hash or script hash
* Used to identify ownership of addresses or stake rights
*
* @since 2.0.0
* @category schemas
*/
export declare const Credential: Schema.Union<[typeof KeyHash.KeyHash, typeof ScriptHash.ScriptHash]>;
/**
* Type representing a credential that can be either a key hash or script hash
* Used in various address formats to identify ownership
*
* @since 2.0.0
* @category model
*/
export type Credential = typeof Credential.Type;
/**
* Check if the given value is a valid Credential
*
* @since 2.0.0
* @category predicates
*/
export declare const isCredential: (u: unknown, overrideOptions?: import("effect/SchemaAST").ParseOptions | number) => u is KeyHash.KeyHash | ScriptHash.ScriptHash;
export declare const CBORBytes: Schema.transformOrFail, Uint8Array, readonly [], never>, Schema.Union<[typeof KeyHash.KeyHash, typeof ScriptHash.ScriptHash]>, never>;
export declare const CBORHex: Schema.transformOrFail, string & import("effect/Brand").Brand<"HexString">, never>, Schema.Union<[typeof KeyHash.KeyHash, typeof ScriptHash.ScriptHash]>, never>;
/**
* Check if two Credential instances are equal.
*
* @since 2.0.0
* @category equality
*/
export declare const equals: (a: Credential, b: Credential) => boolean;
/**
* Generate a random Credential.
* Randomly selects between generating a KeyHash or ScriptHash credential.
*
* @example
* import { Credential } from "@lucid-evolution/experimental";
* import { FastCheck } from "effect";
* import assert from "assert";
*
* const randomSamples = FastCheck.sample(Credential.generator, 20);
* randomSamples.forEach((credential) => {
* assert(credential._tag === "KeyHash" || credential._tag === "ScriptHash");
* assert(credential.hash.length === 56);
* });
*
* @since 2.0.0
* @category generators
*/
export declare const generator: FastCheck.Arbitrary;
export {};
//# sourceMappingURL=Credential.d.ts.map