/**
 * BastionActionPort — host adapter for Bastion DeFi capabilities.
 *
 * Implements the manifest ∩ client_policies validation gate (T-E invariant).
 * All actions must pass through validateAgainstClientPolicies before HTTP execution.
 *
 * Source: MASTER-PLAN-v5.md §1.3.1, §2.3 (Q-Bastion-1..4)
 */
export type TokenAddress = string & {
    readonly __brand: "TokenAddress";
};
export type VaultAddress = string & {
    readonly __brand: "VaultAddress";
};
export type TenantId = string;
export interface SwapParams {
    readonly token_in: TokenAddress;
    readonly token_out: TokenAddress;
    readonly amount: string;
    readonly max_slippage_bps: number;
    readonly deadline: number;
}
export interface DepositParams {
    readonly vault_address: VaultAddress;
    readonly amount: string;
    readonly token: TokenAddress;
}
export interface WithdrawParams {
    readonly vault_address: VaultAddress;
    readonly shares: string;
}
export interface TransferParams {
    readonly recipient: string;
    readonly amount: string;
    readonly token: TokenAddress;
}
export interface ActionContext {
    readonly tenantId: TenantId;
    readonly manifestHash: string;
    readonly runId: string;
    readonly legalBasis?: string;
    readonly jurisdictionsContext?: string[];
}
export interface SwapResult {
    readonly tx_hash: string;
    readonly amount_out: string;
    readonly actual_slippage_bps: number;
    readonly executed_at: Date;
}
export interface DepositResult {
    readonly tx_hash: string;
    readonly shares_minted: string;
    readonly deposit_amount: string;
}
export interface WithdrawResult {
    readonly tx_hash: string;
    readonly amount_withdrawn: string;
}
export interface TransferResult {
    readonly tx_hash: string;
    readonly recipient: string;
    readonly amount: string;
}
export interface ClientPolicy {
    readonly max_slippage_bps: number;
    readonly allowed_pairs: readonly [TokenAddress, TokenAddress][];
    readonly daily_volume_cap: string;
    readonly deposit_cap: string;
    readonly allowed_actions: readonly ("swap" | "deposit" | "withdraw" | "transfer")[];
    readonly cache_ttl_seconds: number;
}
export interface PolicyValidation {
    readonly valid: boolean;
    readonly violations: readonly string[];
    readonly policy_hash?: string;
}
export interface BastionActionPort {
    /**
     * Swap tokens on Bastion CoW intents.
     * Throws BastionSlippageExceededError if actual slippage > max_slippage_bps.
     */
    swap(params: SwapParams, ctx: ActionContext): Promise<SwapResult>;
    /**
     * Deposit into a Bastion vault.
     * Throws BastionInsufficientFundsError if user balance < amount.
     */
    deposit(params: DepositParams, ctx: ActionContext): Promise<DepositResult>;
    /**
     * Withdraw shares from a Bastion vault.
     */
    withdraw(params: WithdrawParams, ctx: ActionContext): Promise<WithdrawResult>;
    /**
     * Transfer tokens. Requires legalBasis in ctx per TFR Art 4.
     * Throws BastionTransferUnauthorizedError if legalBasis absent.
     */
    transfer(params: TransferParams, ctx: ActionContext): Promise<TransferResult>;
    /**
     * Validate action against manifest ∩ client_policies intersection (T-E invariant).
     * Caches client_policies for tenant TTL 60s; invalidation event-driven.
     * Throws BastionPolicyViolationError if action ∉ intersection.
     */
    validateAgainstClientPolicies(action: "swap" | "deposit" | "withdraw" | "transfer", tenantId: TenantId, params?: Partial<SwapParams & DepositParams>): Promise<PolicyValidation>;
}
export declare class BastionPolicyViolationError extends Error {
    readonly action: string;
    readonly tenantId: TenantId;
    readonly cause?: unknown | undefined;
    constructor(message: string, action: string, tenantId: TenantId, cause?: unknown | undefined);
}
export declare class BastionInsufficientFundsError extends Error {
    readonly required: string;
    readonly available: string;
    readonly cause?: unknown | undefined;
    constructor(required: string, available: string, cause?: unknown | undefined);
}
export declare class BastionSlippageExceededError extends Error {
    readonly max_slippage_bps: number;
    readonly actual_slippage_bps: number;
    readonly cause?: unknown | undefined;
    constructor(max_slippage_bps: number, actual_slippage_bps: number, cause?: unknown | undefined);
}
export declare class BastionContractError extends Error {
    readonly contract_call: string;
    readonly contract_error: string;
    readonly cause?: unknown | undefined;
    constructor(contract_call: string, contract_error: string, cause?: unknown | undefined);
}
export declare class BastionTransferUnauthorizedError extends Error {
    readonly reason: "missing_legal_basis" | "jurisdiction_blocked";
    readonly cause?: unknown | undefined;
    constructor(message: string, reason: "missing_legal_basis" | "jurisdiction_blocked", cause?: unknown | undefined);
}
//# sourceMappingURL=bastion-action.d.ts.map