import { Equal, FastCheck, Hash, Inspectable, Schema } from "effect";
import * as CBOR from "./CBOR.js";
import * as CostModel from "./CostModel.js";
import * as Data from "./Data.js";
import * as Redeemer from "./Redeemer.js";
import * as ScriptDataHash from "./ScriptDataHash.js";
/**
 * A redeemer map key: `[tag, index]`.
 *
 * Mirrors the CDDL: `[tag : redeemer_tag, index : uint .size 4]`
 *
 * @since 2.0.0
 * @category model
 */
export type RedeemerKey = readonly [Redeemer.RedeemerTag, bigint];
/**
 * Create a string key from a RedeemerKey for lookup convenience.
 *
 * @since 2.0.0
 * @category utilities
 */
export declare const keyToString: ([tag, index]: RedeemerKey) => string;
declare const RedeemerValue_base: Schema.Class<RedeemerValue, {
    data: Schema.SchemaClass<Data.Data, Data.Data, never>;
    exUnits: typeof Redeemer.ExUnits;
}, Schema.Struct.Encoded<{
    data: Schema.SchemaClass<Data.Data, Data.Data, never>;
    exUnits: typeof Redeemer.ExUnits;
}>, never, {
    readonly data: Data.Data;
} & {
    readonly exUnits: Redeemer.ExUnits;
}, {}, {}>;
/**
 * A redeemer map entry value: `[data, ex_units]`.
 *
 * Mirrors the CDDL: `[data : plutus_data, ex_units : ex_units]`
 *
 * @since 2.0.0
 * @category model
 */
export declare class RedeemerValue extends RedeemerValue_base {
    [Equal.symbol](that: unknown): boolean;
    [Hash.symbol](): number;
}
declare const RedeemerMap_base: Schema.TaggedClass<RedeemerMap, "RedeemerMap", {
    readonly _tag: Schema.tag<"RedeemerMap">;
} & {
    value: Schema.Map$<Schema.Tuple2<Schema.Literal<["spend", "mint", "cert", "reward", "vote", "propose"]>, typeof Schema.BigIntFromSelf>, Schema.SchemaClass<RedeemerValue, RedeemerValue, never>>;
}>;
/**
 * Redeemers in map format (Conway recommended).
 *
 * Mirrors the CDDL exactly:
 * ```
 * { + [tag : redeemer_tag, index : uint .size 4] => [ data : plutus_data, ex_units : ex_units ] }
 * ```
 *
 * The map is keyed by `[tag, index]` tuples. Note: JS Map uses reference
 * equality for non-primitive keys, so lookups by tuple won't work — use
 * `get()` or `toArray()` helpers instead.
 *
 * @since 2.0.0
 * @category model
 */
export declare class RedeemerMap extends RedeemerMap_base {
    /**
     * Look up a redeemer entry by tag and index.
     *
     * @since 2.0.0
     * @category accessors
     */
    get(tag: Redeemer.RedeemerTag, index: bigint): RedeemerValue | undefined;
    /**
     * Number of redeemer entries.
     *
     * @since 2.0.0
     * @category accessors
     */
    get size(): number;
    /**
     * Convert to an array of `Redeemer` objects (convenience for consumers).
     *
     * @since 2.0.0
     * @category conversions
     */
    toArray(): ReadonlyArray<Redeemer.Redeemer>;
    toJSON(): {
        _tag: "RedeemerMap";
        entries: {
            key: {
                tag: "vote" | "mint" | "spend" | "cert" | "reward" | "propose";
                index: string;
            };
            value: {
                data: Data.Data;
                exUnits: {
                    mem: string;
                    steps: string;
                };
            };
        }[];
    };
    toString(): string;
    [Inspectable.NodeInspectSymbol](): unknown;
    [Equal.symbol](that: unknown): boolean;
    [Hash.symbol](): number;
}
/**
 * Create a `RedeemerMap` from an array of `Redeemer` objects.
 *
 * @since 2.0.0
 * @category constructors
 */
export declare const makeRedeemerMap: (redeemers: ReadonlyArray<Redeemer.Redeemer>) => RedeemerMap;
declare const RedeemerArray_base: Schema.TaggedClass<RedeemerArray, "RedeemerArray", {
    readonly _tag: Schema.tag<"RedeemerArray">;
} & {
    value: Schema.Array$<typeof Redeemer.Redeemer>;
}>;
/**
 * Redeemers in legacy array format.
 *
 * Mirrors the CDDL:
 * ```
 * [ + redeemer ]
 * ```
 *
 * Backwards compatible — will be deprecated in the next era.
 * Prefer `RedeemerMap` for new transactions.
 *
 * @since 2.0.0
 * @category model
 */
export declare class RedeemerArray extends RedeemerArray_base {
    /**
     * Number of redeemer entries.
     *
     * @since 2.0.0
     * @category accessors
     */
    get size(): number;
    /**
     * Convert to an array of `Redeemer` objects (identity for array format).
     *
     * @since 2.0.0
     * @category conversions
     */
    toArray(): ReadonlyArray<Redeemer.Redeemer>;
    toJSON(): {
        _tag: "RedeemerArray";
        value: {
            _tag: string;
            tag: "vote" | "mint" | "spend" | "cert" | "reward" | "propose";
            index: string;
            data: Data.Data;
            exUnits: {
                mem: string;
                steps: string;
            };
        }[];
    };
    toString(): string;
    [Inspectable.NodeInspectSymbol](): unknown;
    [Equal.symbol](that: unknown): boolean;
    [Hash.symbol](): number;
}
/**
 * Union schema for redeemers — accepts either map or array format.
 * Follows the Credential pattern: `Credential = Union(KeyHash, ScriptHash)`.
 *
 * @since 2.0.0
 * @category schemas
 */
export declare const Redeemers: Schema.Union<[typeof RedeemerMap, typeof RedeemerArray]>;
/**
 * Union type: `RedeemerMap | RedeemerArray`
 *
 * @since 2.0.0
 * @category model
 */
export type Redeemers = typeof Redeemers.Type;
/**
 * CDDL schema for array format: `[ + redeemer ]`
 *
 * @since 2.0.0
 * @category schemas
 */
export declare const ArrayCDDLSchema: Schema.Array$<Schema.Tuple<[Schema.SchemaClass<bigint, bigint, never>, Schema.SchemaClass<bigint, bigint, never>, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>, Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>]>>;
/**
 * CDDL transformation for array format → `RedeemerArray`.
 *
 * @since 2.0.0
 * @category schemas
 */
export declare const FromArrayCDDL: Schema.transformOrFail<Schema.Array$<Schema.Tuple<[Schema.SchemaClass<bigint, bigint, never>, Schema.SchemaClass<bigint, bigint, never>, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>, Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>]>>, Schema.SchemaClass<RedeemerArray, RedeemerArray, never>, never>;
/**
 * CDDL schema for map format: `{ + [tag, index] => [data, ex_units] }`
 *
 * Uses `MapFromSelf` (not `Map`) so the Encoded type is a JS Map — matching
 * how `CBOR.FromBytes` represents CBOR major-type-5 maps at runtime.
 * This is the same pattern used by Withdrawals, Mint, MultiAsset, CostModel.
 *
 * @since 2.0.0
 * @category schemas
 */
export declare const MapCDDLSchema: Schema.MapFromSelf<Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>, Schema.Tuple2<Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>, Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>>>;
/**
 * CDDL transformation for map format → `RedeemerMap`.
 *
 * @since 2.0.0
 * @category schemas
 */
export declare const FromMapCDDL: Schema.transformOrFail<Schema.MapFromSelf<Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>, Schema.Tuple2<Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>, Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>>>, Schema.SchemaClass<RedeemerMap, RedeemerMap, never>, never>;
/**
 * Default CDDL schema (map format — Conway recommended).
 *
 * @since 2.0.0
 * @category schemas
 */
export declare const CDDLSchema: Schema.MapFromSelf<Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>, Schema.Tuple2<Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>, Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>>>;
/**
 * Default CDDL transformation (map format).
 *
 * @since 2.0.0
 * @category schemas
 */
export declare const FromCDDL: Schema.transformOrFail<Schema.MapFromSelf<Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>, Schema.Tuple2<Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>, Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>>>, Schema.SchemaClass<RedeemerMap, RedeemerMap, never>, never>;
/**
 * CBOR bytes schema for array format.
 *
 * @since 2.0.0
 * @category schemas
 */
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.Array$<Schema.Tuple<[Schema.SchemaClass<bigint, bigint, never>, Schema.SchemaClass<bigint, bigint, never>, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>, Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>]>>, Schema.SchemaClass<RedeemerArray, RedeemerArray, never>, never>>;
/**
 * CBOR hex schema for array format.
 *
 * @since 2.0.0
 * @category schemas
 */
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.Array$<Schema.Tuple<[Schema.SchemaClass<bigint, bigint, never>, Schema.SchemaClass<bigint, bigint, never>, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>, Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>]>>, Schema.SchemaClass<RedeemerArray, RedeemerArray, never>, never>>>;
/**
 * CBOR bytes schema for map format.
 *
 * @since 2.0.0
 * @category schemas
 */
export declare const FromCBORBytesMap: (options?: CBOR.CodecOptions) => Schema.transform<Schema.transformOrFail<typeof Schema.Uint8ArrayFromSelf, Schema.declare<CBOR.CBOR, CBOR.CBOR, readonly [], never>, never>, Schema.transformOrFail<Schema.MapFromSelf<Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>, Schema.Tuple2<Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>, Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>>>, Schema.SchemaClass<RedeemerMap, RedeemerMap, never>, never>>;
/**
 * CBOR hex schema for map format.
 *
 * @since 2.0.0
 * @category schemas
 */
export declare const FromCBORHexMap: (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.MapFromSelf<Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>, Schema.Tuple2<Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>, Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>>>, Schema.SchemaClass<RedeemerMap, RedeemerMap, never>, never>>>;
/**
 * FastCheck arbitrary for Redeemers — generates both map and array variants.
 *
 * @since 2.0.0
 * @category arbitrary
 */
export declare const arbitrary: FastCheck.Arbitrary<Redeemers>;
/**
 * Parse from CBOR bytes (array format).
 *
 * @since 2.0.0
 * @category parsing
 */
export declare const fromCBORBytes: (bytes: Uint8Array, options?: CBOR.CodecOptions) => RedeemerArray;
/**
 * Parse from CBOR hex string (array format).
 *
 * @since 2.0.0
 * @category parsing
 */
export declare const fromCBORHex: (hex: string, options?: CBOR.CodecOptions) => RedeemerArray;
/**
 * Parse from CBOR bytes (map format).
 *
 * @since 2.0.0
 * @category parsing
 */
export declare const fromCBORBytesMap: (bytes: Uint8Array, options?: CBOR.CodecOptions) => RedeemerMap;
/**
 * Parse from CBOR hex string (map format).
 *
 * @since 2.0.0
 * @category parsing
 */
export declare const fromCBORHexMap: (hex: string, options?: CBOR.CodecOptions) => RedeemerMap;
/**
 * Encode to CBOR bytes (array format).
 *
 * @since 2.0.0
 * @category encoding
 */
export declare const toCBORBytes: (data: RedeemerArray, options?: CBOR.CodecOptions) => Uint8Array<ArrayBufferLike>;
/**
 * Encode to CBOR hex string (array format).
 *
 * @since 2.0.0
 * @category encoding
 */
export declare const toCBORHex: (data: RedeemerArray, options?: CBOR.CodecOptions) => string;
/**
 * Encode to CBOR bytes (map format).
 *
 * @since 2.0.0
 * @category encoding
 */
export declare const toCBORBytesMap: (data: RedeemerMap, options?: CBOR.CodecOptions) => Uint8Array<ArrayBufferLike>;
/**
 * Encode to CBOR hex string (map format).
 *
 * @since 2.0.0
 * @category encoding
 */
export declare const toCBORHexMap: (data: RedeemerMap, options?: CBOR.CodecOptions) => string;
/**
 * Compute script_data_hash using standard module encoders.
 *
 * Accepts the concrete `Redeemers` union type — encoding format is determined
 * by `_tag` (`RedeemerMap` → map CBOR, `RedeemerArray` → array CBOR).
 *
 * The payload format per CDDL spec is raw concatenation (not a CBOR structure):
 * ```
 * redeemers_bytes || datums_bytes || language_views_bytes
 * ```
 *
 * @since 2.0.0
 * @category hashing
 */
export declare const toScriptDataHash: (redeemers: Redeemers, costModels: CostModel.CostModels, datums?: ReadonlyArray<Data.Data>, options?: CBOR.CodecOptions) => ScriptDataHash.ScriptDataHash;
export {};
//# sourceMappingURL=Redeemers.d.ts.map