import type { OutputScriptType } from "./scriptType.js";
/** All valid chain codes as a const tuple */
export declare const chainCodes: readonly [0, 1, 10, 11, 20, 21, 30, 31, 40, 41, 360, 361];
/** A valid chain code value */
export type ChainCode = (typeof chainCodes)[number];
/** Whether a chain is for receiving (external) or change (internal) addresses */
export type Scope = "internal" | "external";
/**
 * Assert that a number is a valid chain code.
 * @throws Error if the number is not a valid chain code
 */
export declare function assertChainCode(n: number): ChainCode;
/**
 * ChainCode namespace with utility functions for working with chain codes.
 */
export declare const ChainCode: {
    /**
     * Check if a value is a valid chain code.
     *
     * @example
     * ```typescript
     * if (ChainCode.is(maybeChain)) {
     *   // maybeChain is now typed as ChainCode
     *   const scope = ChainCode.scope(maybeChain);
     * }
     * ```
     */
    is(n: unknown): n is ChainCode;
    /**
     * Get the chain code for a script type and scope.
     *
     * @example
     * ```typescript
     * const externalP2wsh = ChainCode.value("p2wsh", "external"); // 20
     * const internalP2tr = ChainCode.value("p2trLegacy", "internal"); // 31
     * ```
     */
    value(scriptType: OutputScriptType | "p2tr", scope: Scope): ChainCode;
    /**
     * Get the scope (external/internal) for a chain code.
     *
     * @example
     * ```typescript
     * ChainCode.scope(0);  // "external"
     * ChainCode.scope(1);  // "internal"
     * ChainCode.scope(20); // "external"
     * ```
     */
    scope(chainCode: ChainCode): Scope;
    /**
     * Get the script type for a chain code.
     *
     * @example
     * ```typescript
     * ChainCode.scriptType(0);  // "p2sh"
     * ChainCode.scriptType(20); // "p2wsh"
     * ChainCode.scriptType(40); // "p2trMusig2"
     * ```
     */
    scriptType(chainCode: ChainCode): OutputScriptType;
};
