/**
 * LIT Action Types and Interfaces (SDK boundary)
 *
 * This file provides the strongly-typed SDK view of LIT Actions and
 * re-exports the action registry interfaces from the @gvnrdao/dh-lit-actions
 * package so that action names and configs stay in sync across packages.
 */
import type { DiamondHandsLitActions, LitActionName } from "@gvnrdao/dh-lit-actions";
import type { UcdMintValidatorResult, BtcWithdrawalValidatorResult, LiquidationValidatorResult, ExtendPositionValidatorResult, ProcessPaymentValidatorResult, LoanVaultBtcBalanceValidatorResult } from "./lit-actions-results.i";
/**
 * Re-export registry types so SDK consumers can use the same action name space.
 */
export type { DiamondHandsLitActions, LitActionName };
/**
 * Core LIT Action execution description.
 *
 * TParams describes the jsParams structure, TAuth describes the authSig shape.
 * Both default to safe, unknown-based records instead of `any`.
 */
export interface ILitAction<TParams extends Record<string, unknown> = Record<string, unknown>, TAuth = LitActionAuth> {
    code: string;
    ipfsId?: string;
    jsParams: TParams;
    authSig: TAuth;
}
/**
 * Parameters passed to lit-node-client.executeJs.
 *
 * This mirrors ILitAction but is named for historic reasons.
 */
export interface LitActionParams<TParams extends Record<string, unknown> = Record<string, unknown>, TAuth = LitActionAuth> {
    code: string;
    jsParams: TParams;
    authSig: TAuth;
    debug?: boolean;
    pkpId?: string;
    userAddress?: string;
    /**
     * Collateral amount used by some actions (e.g. mint flows).
     * Replaces legacy btcAmount naming.
     */
    collateralAmount?: string;
}
/**
 * Raw result returned from LIT Action execution.
 *
 * Callers are encouraged to wrap this in action-specific result
 * types instead of accessing the generic `data` bag directly.
 */
export interface LitActionResult<TData = unknown> {
    success: boolean;
    signedData?: unknown;
    decryptedData?: unknown;
    claimedKeyId?: string;
    signatures?: unknown;
    /**
     * Alias for signatures used by some helpers.
     */
    signature?: string;
    decryptions?: unknown;
    claims?: unknown;
    response?: string;
    logs?: string;
    /**
     * Action-specific payload. Prefer narrowing this via generics.
     */
    data?: TData;
    /**
     * Human-readable error (if any).
     */
    error?: string;
}
/**
 * Discriminated union of typed results for the core Diamond Hands actions.
 *
 * This can be used by higher-level SDK helpers to express that a given
 * execution is expected to return a particular validator payload.
 */
export type DiamondHandsLitActionResult = LitActionResult<UcdMintValidatorResult> | LitActionResult<BtcWithdrawalValidatorResult> | LitActionResult<LiquidationValidatorResult> | LitActionResult<ExtendPositionValidatorResult> | LitActionResult<ProcessPaymentValidatorResult> | LitActionResult<LoanVaultBtcBalanceValidatorResult>;
/**
 * Standard EIP-191 style authorization signature used by LIT.
 */
export interface LitActionAuth {
    sig: string;
    derivedVia: string;
    signedMessage: string;
    address: string;
}
/**
 * Generic validation result used by some helper actions.
 *
 * Callers should prefer action-specific result types where available.
 */
export interface LitActionValidationResult<TDetails = unknown> {
    valid: boolean;
    error?: string;
    details?: TDetails;
}
