import { Schema, FastCheck, Inspectable } from "effect"; /** * The length in bytes of a ScriptHash. * * @since 2.0.0 * @category constants */ export declare const SCRIPTHASH_BYTES_LENGTH = 28; /** * The length in hex characters of a ScriptHash. * * @since 2.0.0 * @category constants */ export declare const SCRIPTHASH_HEX_LENGTH = 56; declare const ScriptHashError_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: "ScriptHashError"; } & Readonly; /** * Error class for ScriptHash related operations. * * @example * import { ScriptHash } from "@lucid-evolution/experimental"; * import assert from "assert"; * * const error = new ScriptHash.ScriptHashError({ message: "Invalid script hash" }); * assert(error.message === "Invalid script hash"); * * @since 2.0.0 * @category errors */ export declare class ScriptHashError extends ScriptHashError_base<{ message?: string; reason?: "InvalidHexLength" | "InvalidBytesLength" | "InvalidHexFormat" | "InvalidCBORFormat"; }> { } declare const NominalType: unique symbol; export interface ScriptHash { readonly [NominalType]: unique symbol; } declare const ScriptHash_base: Schema.TaggedClass; } & { hash: Schema.SchemaClass, string & import("effect/Brand").Brand<"HexString">, never>; }>; /** * Schema for ScriptHash representing a script hash credential. * Follows CIP-0019 binary representation. * * @since 2.0.0 * @category schemas */ export declare class ScriptHash extends ScriptHash_base { [Inspectable.NodeInspectSymbol](): { _tag: string; hash: string & import("effect/Brand").Brand<"HexString">; }; } export declare const ScriptHashBytes: Schema.SchemaClass, Uint8Array, never>; export declare const Bytes: Schema.transform, Uint8Array, never>, typeof ScriptHash>; export declare const ScriptHashFromHex: Schema.transform, string & import("effect/Brand").Brand<"HexString">, never>, typeof ScriptHash>; /** * Check if two ScriptHash instances are equal. * * @since 2.0.0 * @category equality */ export declare const equals: (a: ScriptHash, b: ScriptHash) => boolean; /** * Generate a random ScriptHash. * * @example * import { ScriptHash } from "@lucid-evolution/experimental"; * import { FastCheck } from "effect"; * import assert from "assert"; * * const randomSamples = FastCheck.sample(ScriptHash.generator, 20); * randomSamples.forEach((scriptHash) => { * assert(scriptHash.hash.length === 56); * }); * * @since 2.0.0 * @category generators */ export declare const generator: FastCheck.Arbitrary; export {}; //# sourceMappingURL=ScriptHash.d.ts.map