import { FastCheck, Schema } from "effect";
import * as CBOR from "./CBOR.js";
import * as KeyHash from "./KeyHash.js";
import * as ScriptHash from "./ScriptHash.js";
/**
 * Credential schema representing either a key hash or script hash
 * credential = [0, addr_keyhash // 1, 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;
export type CredentialEncoded = typeof Credential.Encoded;
export declare const makeKeyHash: (hash: Uint8Array) => Credential;
export declare const makeScriptHash: (hash: Uint8Array) => Credential;
/**
 * Convert a Credential to a hex string of its hash.
 *
 * @since 2.0.0
 * @category encoding
 */
export declare const toHex: (credential: Credential) => string;
/**
 * Convert a Credential to a bech32 string.
 * Uses CIP-0005 prefixes: `addr_vkh` for KeyHash, `script` for ScriptHash.
 *
 * @since 2.0.0
 * @category encoding
 */
export declare const toBech32: (credential: Credential) => string;
/**
 * Check if the given value is a valid Credential
 *
 * @since 2.0.0
 * @category predicates
 */
export declare const is: (u: unknown, overrideOptions?: import("effect/SchemaAST").ParseOptions | number) => u is KeyHash.KeyHash | ScriptHash.ScriptHash;
export declare const CDDLSchema: Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>;
/**
 * CDDL schema for Credential as defined in the specification:
 * credential = [0, addr_keyhash // 1, script_hash]
 *
 * @since 2.0.0
 * @category schemas
 */
export declare const FromCDDL: Schema.transformOrFail<Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>, Schema.SchemaClass<KeyHash.KeyHash | ScriptHash.ScriptHash, KeyHash.KeyHash | ScriptHash.ScriptHash, never>, never>;
export declare const FromCBORBytes: (options?: CBOR.CodecOptions) => Schema.transform<Schema.transformOrFail<typeof Schema.Uint8ArrayFromSelf, Schema.declare<CBOR.CBOR, CBOR.CBOR, readonly [], never>, never>, Schema.transformOrFail<Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>, Schema.SchemaClass<KeyHash.KeyHash | ScriptHash.ScriptHash, KeyHash.KeyHash | ScriptHash.ScriptHash, never>, never>>;
export declare const FromCBORHex: (options?: CBOR.CodecOptions) => Schema.transform<Schema.Schema<Uint8Array<ArrayBufferLike>, string, never>, Schema.transform<Schema.transformOrFail<typeof Schema.Uint8ArrayFromSelf, Schema.declare<CBOR.CBOR, CBOR.CBOR, readonly [], never>, never>, Schema.transformOrFail<Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>, Schema.SchemaClass<KeyHash.KeyHash | ScriptHash.ScriptHash, KeyHash.KeyHash | ScriptHash.ScriptHash, never>, never>>>;
/**
 * FastCheck arbitrary for generating random Credential instances.
 * Randomly selects between generating a KeyHash or ScriptHash credential.
 *
 * @since 2.0.0
 * @category testing
 */
export declare const arbitrary: FastCheck.Arbitrary<KeyHash.KeyHash | ScriptHash.ScriptHash>;
/**
 * Parse a Credential from CBOR bytes.
 *
 * @since 2.0.0
 * @category parsing
 */
export declare const fromCBORBytes: (bytes: Uint8Array, options?: CBOR.CodecOptions) => Credential;
/**
 * Parse a Credential from CBOR hex string.
 *
 * @since 2.0.0
 * @category parsing
 */
export declare const fromCBORHex: (hex: string, options?: CBOR.CodecOptions) => Credential;
/**
 * Convert a Credential to CBOR bytes.
 *
 * @since 2.0.0
 * @category encoding
 */
export declare const toCBORBytes: (credential: Credential, options?: CBOR.CodecOptions) => Uint8Array;
/**
 * Convert a Credential to CBOR hex string.
 *
 * @since 2.0.0
 * @category encoding
 */
export declare const toCBORHex: (credential: Credential, options?: CBOR.CodecOptions) => string;
//# sourceMappingURL=Credential.d.ts.map