import { Schema, Inspectable, FastCheck } from "effect"; /** * The length in bytes of a TransactionHash. * * @since 2.0.0 * @category constants */ export declare const TRANSACTIONHASH_BYTES_LENGTH = 32; /** * The length in hex characters of a TransactionHash. * * @since 2.0.0 * @category constants */ export declare const TRANSACTIONHASH_HEX_LENGTH = 64; declare const TransactionHashError_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: "TransactionHashError"; } & Readonly; /** * Error class for TransactionHash related operations. * * @example * import { TransactionHash } from "@lucid-evolution/experimental"; * import assert from "assert"; * * const error = new TransactionHash.TransactionHashError({ message: "Invalid transaction hash" }); * assert(error.message === "Invalid transaction hash"); * * @since 2.0.0 * @category errors */ export declare class TransactionHashError extends TransactionHashError_base<{ message?: string; reason?: "InvalidHexLength" | "InvalidBytesLength" | "InvalidHexFormat" | "InvalidCBORFormat"; }> { } export declare const Hash: Schema.refine, Schema.SchemaClass, string & import("effect/Brand").Brand<"HexString">, never>>; declare const TransactionHash_base: Schema.TaggedClass; } & { hash: Schema.refine, Schema.SchemaClass, string & import("effect/Brand").Brand<"HexString">, never>>; }>; /** * Schema for TransactionHash. * * @since 2.0.0 * @category schemas */ export declare class TransactionHash extends TransactionHash_base { [Inspectable.NodeInspectSymbol](): { _tag: string; hash: string & import("effect/Brand").Brand<"HexString">; }; } /** * Schema for TransactionHash bytes validation. * * @since 2.0.0 * @category schemas */ export declare const TransactionHashBytes: Schema.SchemaClass, Uint8Array, never>; /** * Schema for transforming between Uint8Array and TransactionHash. * * @since 2.0.0 * @category encoding/decoding */ export declare const Bytes: Schema.transform, Uint8Array, never>, Schema.Schema; }, never>>; /** * Schema for transforming between hex string and TransactionHash. * * @since 2.0.0 * @category encoding/decoding */ export declare const HexString: Schema.transform, Schema.SchemaClass, string & import("effect/Brand").Brand<"HexString">, never>>, typeof TransactionHash>; /** * Schema for transforming between CBOR bytes and TransactionHash. * * @since 2.0.0 * @category encoding/decoding */ export declare const CBORBytes: Schema.transformOrFail, Uint8Array, readonly [], never>, typeof TransactionHash, never>; /** * Schema for transforming between CBOR hex and TransactionHash. * * @since 2.0.0 * @category encoding/decoding */ export declare const CBORHex: Schema.transformOrFail, string & import("effect/Brand").Brand<"HexString">, never>, typeof TransactionHash, never>; /** * Check if two TransactionHash instances are equal. * * @example * import { TransactionHash } from "@lucid-evolution/experimental"; * import assert from "assert"; * * @since 2.0.0 * @category equality */ export declare const equals: (a: TransactionHash, b: TransactionHash) => boolean; /** * Generate a random TransactionHash. * * @example * import { TransactionHash } from "@lucid-evolution/experimental"; * import { FastCheck } from "effect"; * import assert from "assert"; * * const randomSamples = FastCheck.sample(TransactionHash.generator, 20); * randomSamples.forEach((transactionHash) => { * assert(transactionHash.hash.length === 64); * }); * * @since 2.0.0 * @category generators */ export declare const generator: FastCheck.Arbitrary; export {}; //# sourceMappingURL=TransactionHash.d.ts.map