/**
 * 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)
 */
// ─── Typed errors ─────────────────────────────────────────────────────────
export class BastionPolicyViolationError extends Error {
    action;
    tenantId;
    cause;
    constructor(message, action, tenantId, cause) {
        super(message);
        this.action = action;
        this.tenantId = tenantId;
        this.cause = cause;
        this.name = "BastionPolicyViolationError";
        Object.setPrototypeOf(this, new.target.prototype);
    }
}
export class BastionInsufficientFundsError extends Error {
    required;
    available;
    cause;
    constructor(required, available, cause) {
        super(`Insufficient funds: required ${required}, available ${available}`);
        this.required = required;
        this.available = available;
        this.cause = cause;
        this.name = "BastionInsufficientFundsError";
        Object.setPrototypeOf(this, new.target.prototype);
    }
}
export class BastionSlippageExceededError extends Error {
    max_slippage_bps;
    actual_slippage_bps;
    cause;
    constructor(max_slippage_bps, actual_slippage_bps, cause) {
        super(`Slippage exceeded: max ${max_slippage_bps} bps, actual ${actual_slippage_bps} bps`);
        this.max_slippage_bps = max_slippage_bps;
        this.actual_slippage_bps = actual_slippage_bps;
        this.cause = cause;
        this.name = "BastionSlippageExceededError";
        Object.setPrototypeOf(this, new.target.prototype);
    }
}
export class BastionContractError extends Error {
    contract_call;
    contract_error;
    cause;
    constructor(contract_call, contract_error, cause) {
        super(`Contract error on ${contract_call}: ${contract_error}`);
        this.contract_call = contract_call;
        this.contract_error = contract_error;
        this.cause = cause;
        this.name = "BastionContractError";
        Object.setPrototypeOf(this, new.target.prototype);
    }
}
export class BastionTransferUnauthorizedError extends Error {
    reason;
    cause;
    constructor(message, reason, cause) {
        super(message);
        this.reason = reason;
        this.cause = cause;
        this.name = "BastionTransferUnauthorizedError";
        Object.setPrototypeOf(this, new.target.prototype);
    }
}
//# sourceMappingURL=bastion-action.js.map