/** * Challenger derivation utilities — counting local challengers for UI-level * validation (e.g. minimum deposit amounts) and deriving the exact * local-challenger set a claimer's tx graph is built from. */ /** * Compute the number of local challengers for a vault. * * Mirrors the VP's `compute_num_challengers()` logic: * local challengers = {vault_provider} ∪ {vault_keepers} − {depositor} * * Keys are normalized to x-only lowercase hex before comparison, so * `0x`-prefixed, compressed, or mixed-case keys are handled correctly. * * @param vaultProviderPubkey - Vault provider BTC public key * @param vaultKeeperPubkeys - Vault keeper BTC public keys * @param depositorPubkey - Depositor (claimer) BTC public key * @returns Number of local challengers */ export declare function computeNumLocalChallengers(vaultProviderPubkey: string, vaultKeeperPubkeys: string[], depositorPubkey: string): number; /** Roles a claimer can hold; determines which local-challenger rule applies. */ export interface DeriveLocalChallengersParams { /** The graph's claimer (VP, a vault keeper, or the depositor). */ claimerBtcPubkey: string; /** Depositor registered on-chain for the vault. */ depositorBtcPubkey: string; /** Vault provider registered on-chain for the vault. */ vaultProviderBtcPubkey: string; /** Vault keepers registered on-chain for the vault. */ vaultKeeperBtcPubkeys: string[]; } /** * Derive the local-challenger set for a claimer's graph. * * Byte-for-byte mirror of btc-vault `derive_challengers_for` * (`crates/vault/src/tx_graph/graph.rs:257-284`): * - depositor-as-claimer → vault keepers only (VP excluded) * - VP- or VK-claimer → `({VP} ∪ VKs) − {claimer}`, sorted and deduplicated * * The protocol guarantees the depositor is not a vault keeper * (`TxGraphParams::validate`), so the depositor filter in the first branch is * defense-in-depth; it surfaces a clear error if a misconfigured context ever * violates the invariant. * * @throws If no local challenger remains, or (depositor path) the keeper set * contains duplicates — both mean the signing context is misconfigured. */ export declare function deriveLocalChallengers(params: DeriveLocalChallengersParams): string[]; //# sourceMappingURL=challengers.d.ts.map