## API Report File for "@cashu/cashu-ts"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts

import { WeierstrassPoint } from '@noble/curves/abstract/weierstrass.js';

// @public
export class Amount {
    // (undocumented)
    add(other: AmountLike): Amount;
    ceilPercent(numerator: number, denominator?: number): Amount;
    clamp(min: AmountLike, max: AmountLike): Amount;
    compareTo(other: AmountLike): -1 | 0 | 1;
    // (undocumented)
    divideBy(divisor: AmountLike): Amount;
    // (undocumented)
    equals(other: AmountLike): boolean;
    floorPercent(numerator: number, denominator?: number): Amount;
    static from(input: AmountLike): Amount;
    // (undocumented)
    greaterThan(other: AmountLike): boolean;
    // (undocumented)
    greaterThanOrEqual(other: AmountLike): boolean;
    inRange(min: AmountLike, max: AmountLike): boolean;
    isSafeNumber(): boolean;
    // (undocumented)
    isZero(): boolean;
    // (undocumented)
    lessThan(other: AmountLike): boolean;
    // (undocumented)
    lessThanOrEqual(other: AmountLike): boolean;
    // (undocumented)
    static max(a: AmountLike, b: AmountLike): Amount;
    // (undocumented)
    static min(a: AmountLike, b: AmountLike): Amount;
    // (undocumented)
    modulo(divisor: AmountLike): Amount;
    // (undocumented)
    multiplyBy(factor: AmountLike): Amount;
    // (undocumented)
    static one(): Amount;
    scaledBy(numerator: AmountLike, denominator: AmountLike): Amount;
    // (undocumented)
    subtract(other: AmountLike): Amount;
    // (undocumented)
    static sum(values: Iterable<AmountLike>): Amount;
    toBigInt(): bigint;
    toJSON(): string;
    toNumber(): number;
    toNumberUnsafe(): number;
    toString(): string;
    withUnit(unit: string): AmountWithUnit;
    // (undocumented)
    static zero(): Amount;
}

// @public (undocumented)
export class AmountError extends CTSError {
    constructor(message: string);
}

// @public
export type AmountLike = number | bigint | string | Amount;

// @public
export class AmountWithUnit {
    constructor(amount: Amount, unit: string);
    // (undocumented)
    add(other: AmountWithUnit): AmountWithUnit;
    // (undocumented)
    ceilPercent(numerator: number, denominator?: number): AmountWithUnit;
    // (undocumented)
    clamp(min: AmountWithUnit, max: AmountWithUnit): AmountWithUnit;
    // (undocumented)
    compareTo(other: AmountWithUnit): -1 | 0 | 1;
    // (undocumented)
    divideBy(divisor: AmountLike): AmountWithUnit;
    // (undocumented)
    equals(other: AmountWithUnit): boolean;
    // (undocumented)
    floorPercent(numerator: number, denominator?: number): AmountWithUnit;
    // (undocumented)
    static from(value: AmountLike, unit: string): AmountWithUnit;
    // (undocumented)
    greaterThan(other: AmountWithUnit): boolean;
    // (undocumented)
    greaterThanOrEqual(other: AmountWithUnit): boolean;
    // (undocumented)
    inRange(min: AmountWithUnit, max: AmountWithUnit): boolean;
    // (undocumented)
    isSafeNumber(): boolean;
    // (undocumented)
    isZero(): boolean;
    // (undocumented)
    lessThan(other: AmountWithUnit): boolean;
    // (undocumented)
    lessThanOrEqual(other: AmountWithUnit): boolean;
    // (undocumented)
    static max(a: AmountWithUnit, b: AmountWithUnit): AmountWithUnit;
    // (undocumented)
    static min(a: AmountWithUnit, b: AmountWithUnit): AmountWithUnit;
    // (undocumented)
    modulo(divisor: AmountLike): AmountWithUnit;
    // (undocumented)
    multiplyBy(factor: AmountLike): AmountWithUnit;
    // (undocumented)
    static one(unit: string): AmountWithUnit;
    // (undocumented)
    scaledBy(numerator: AmountLike, denominator: AmountLike): AmountWithUnit;
    // (undocumented)
    subtract(other: AmountWithUnit): AmountWithUnit;
    static sum(values: Iterable<AmountWithUnit>, unit?: string): AmountWithUnit;
    toAmount(): Amount;
    // (undocumented)
    toBigInt(): bigint;
    // (undocumented)
    toJSON(): {
        amount: string;
        unit: string;
    };
    // (undocumented)
    toNumber(): number;
    toString(): string;
    // (undocumented)
    readonly unit: string;
    // (undocumented)
    static zero(unit: string): AmountWithUnit;
}

// @public (undocumented)
export class AmountWithUnitError extends CTSError {
    constructor(message: string);
}

// @public
export function assertSecretKind(allowed: SecretKind | SecretKind[], secret: Secret | string): Secret;

// @public
export class AuthManager implements AuthProvider {
    constructor(mintUrl: string, opts?: AuthManagerOptions);
    // (undocumented)
    get activeAuthKeysetId(): string | undefined;
    attachOIDC(oidc: OIDCAuth): this;
    ensure(minTokens: number): Promise<void>;
    ensureCAT(minValidSecs?: number): Promise<string | undefined>;
    exportPool(): Proof[];
    getBlindAuthToken(input: {
        method: 'GET' | 'POST';
        path: string;
    }): Promise<string>;
    // (undocumented)
    getCAT(): string | undefined;
    // (undocumented)
    get hasCAT(): boolean;
    importPool(proofs: Proof[], mode?: 'replace' | 'merge'): void;
    // (undocumented)
    get poolSize(): number;
    // (undocumented)
    get poolTarget(): number;
    // (undocumented)
    setCAT(cat: string | undefined): void;
}

// @public (undocumented)
export type AuthManagerOptions = {
    maxPerMint?: number;
    desiredPoolSize?: number;
    request?: RequestFn;
    logger?: Logger;
};

// @public (undocumented)
export interface AuthProvider {
    // (undocumented)
    ensure?(minTokens: number): Promise<void>;
    ensureCAT?(minValiditySec?: number): Promise<string | undefined>;
    // (undocumented)
    getBlindAuthToken(input: {
        method: 'GET' | 'POST';
        path: string;
    }): Promise<string>;
    // (undocumented)
    getCAT(): string | undefined;
    // (undocumented)
    setCAT(cat: string | undefined): void;
}

// @public
export interface BatchMintPreview<TQuote extends Pick<MintQuoteBaseResponse, 'quote' | 'pubkey'> = MintQuoteBaseResponse> {
    keysetId: string;
    // (undocumented)
    method: string;
    outputData: OutputDataLike[];
    payload: BatchMintRequest;
    quotes: TQuote[];
}

// @public
export type BatchMintRequest = {
    quotes: string[];
    quote_amounts: Amount[];
    outputs: SerializedBlindedMessage[];
    signatures?: Array<string | null>;
};

// @public
export function blindMessage(secret: Uint8Array, r?: bigint): RawBlindedMessage;

// @public (undocumented)
export type BlindSignature = {
    C_: WeierstrassPoint<bigint>;
    id: string;
};

// @public (undocumented)
export type CancellerLike = SubscriptionCanceller | Promise<SubscriptionCanceller>;

// @public
export const CheckStateEnum: {
    readonly UNSPENT: "UNSPENT";
    readonly PENDING: "PENDING";
    readonly SPENT: "SPENT";
};

// @public (undocumented)
export type CheckStateEnum = (typeof CheckStateEnum)[keyof typeof CheckStateEnum];

// @public
export type CheckStatePayload = {
    Ys: string[];
};

// @public
export type CheckStateResponse = {
    states: ProofState[];
};

// @public (undocumented)
export type CompleteMeltOptions = {
    preferAsync?: boolean;
    extraPayload?: Record<string, unknown>;
};

// @public
export function computeMessageDigest(message: string): Uint8Array;

// @public (undocumented)
export function computeMessageDigest(message: string, asHex: false): Uint8Array;

// @public (undocumented)
export function computeMessageDigest(message: string, asHex: true): string;

// @public
export class ConsoleLogger implements Logger {
    constructor(minLevel?: LogLevel);
    // (undocumented)
    debug(msg: string, ctx?: Record<string, unknown>): void;
    // (undocumented)
    error(msg: string, ctx?: Record<string, unknown>): void;
    // (undocumented)
    info(msg: string, ctx?: Record<string, unknown>): void;
    // (undocumented)
    log(level: LogLevel, message: string, context?: Record<string, unknown>): void;
    // (undocumented)
    trace(msg: string, ctx?: Record<string, unknown>): void;
    // (undocumented)
    warn(msg: string, ctx?: Record<string, unknown>): void;
}

// @public (undocumented)
export function constructUnblindedSignature(blindSig: BlindSignature, r: bigint, secret: Uint8Array, key: WeierstrassPoint<bigint>): UnblindedSignature;

// @public
export interface CounterRange {
    // (undocumented)
    count: number;
    // (undocumented)
    start: number;
}

// @public (undocumented)
export interface CounterSource {
    advanceToAtLeast(keysetId: string, minNext: number): Promise<void>;
    reserve(keysetId: string, n: number): Promise<CounterRange>;
    setNext?(keysetId: string, next: number): Promise<void>;
    snapshot?(): Promise<Record<string, number>>;
}

// @public
export function createAuthWallet(mintUrl: string, options?: {
    authPool?: number;
    oidc?: OIDCAuthOptions;
    logger?: Logger;
}): Promise<{
    mint: Mint;
    auth: AuthManager;
    oidc: OIDCAuth;
    wallet: Wallet;
}>;

// @public (undocumented)
export function createBlindSignature(B_: WeierstrassPoint<bigint>, privateKey: Uint8Array, id: string): BlindSignature;

// @public
export const createDLEQProof: (B_: WeierstrassPoint<bigint>, a: Uint8Array) => DLEQ;

// @public
export function createEphemeralCounterSource(initial?: Record<string, number>): CounterSource;

// @public
export function createHTLCHash(preimage?: string): {
    hash: string;
    preimage: string;
};

// @public
export function createHTLCsecret(hash: string, tags?: string[][]): string;

// @public
export function createNewMintKeys(pow2height: IntRange<0, 65>, seed?: Uint8Array, options?: {
    expiry?: number;
    input_fee_ppk?: number;
    unit?: string;
    versionByte?: number;
}): KeysetPair;

// @public
export function createP2PKsecret(pubkey: string, tags?: string[][]): string;

// @public
export function createRandomRawBlindedMessage(): RawBlindedMessage;

// @public (undocumented)
export function createRandomSecretKey(): Uint8Array<ArrayBufferLike>;

// @public
export function createSecret(kind: SecretKind, data: string, tags?: string[][]): string;

// @public
export class CTSError extends Error {
    constructor(message: string, options?: {
        cause?: unknown;
    });
    // (undocumented)
    readonly cause?: unknown;
}

// @public
export function decodePaymentRequest(paymentRequest: string): PaymentRequest_2;

// @public @deprecated (undocumented)
export const deriveBlindingFactor: (seed: Uint8Array, keysetId: string, counter: number) => Uint8Array;

// @public
export function deriveKeysetId(keys: Keys, options?: DeriveKeysetIdOptions): string;

// @public (undocumented)
export type DeriveKeysetIdOptions = {
    expiry?: number;
    input_fee_ppk?: number;
    unit?: string;
    versionByte?: number;
    isDeprecatedBase64?: boolean;
};

// @public
export function deriveP2BKBlindedPubkeys(pubkeys: string[], eBytes?: Uint8Array): {
    blinded: string[];
    Ehex: string;
};

// @public
export function deriveP2BKSecretKey(privkey: string | bigint, rBlind: string | bigint, blindPubkey?: Uint8Array, naturalPub?: Uint8Array): string | null;

// @public
export function deriveP2BKSecretKeys(Ehex: string, privateKey: string | string[], blindPubKey: string | string[]): string[];

// @public @deprecated (undocumented)
export const deriveSecret: (seed: Uint8Array, keysetId: string, counter: number) => Uint8Array;

// @public
export function deriveSecretAndBlindingFactor(seed: Uint8Array, keysetId: string, counter: number): {
    blindingFactor: Uint8Array;
    secret: Uint8Array;
};

// @public (undocumented)
export function deserializeMintKeys(serializedMintKeys: SerializedMintKeys): RawMintKeys;

// @public
export function deserializeProofs(json: string | string[] | ProofLike[]): Proof[];

// @public (undocumented)
export type DeviceStartResponse = {
    device_code: string;
    user_code: string;
    verification_uri: string;
    verification_uri_complete?: string;
    interval?: number;
    expires_in?: number;
};

// @public (undocumented)
export type DigestInput = Uint8Array | string;

// @public (undocumented)
export type DLEQ = {
    s: Uint8Array;
    e: Uint8Array;
    r?: bigint;
};

// @public (undocumented)
export type Enumerate<N extends number, Acc extends number[] = []> = Acc['length'] extends N ? Acc[number] : Enumerate<N, [...Acc, Acc['length']]>;

// @public
export function findSigningKey(pubkey: string, privkeys: string | string[]): string;

// @public
export function getDataField(secret: Secret | string): string;

// @public
export function getDecodedToken(tokenString: string, keysetIds: readonly string[]): Token;

// @public
export function getDecodedTokenBinary(bytes: Uint8Array): Token;

// @public
export function getEncodedToken(token: Token, opts?: {
    removeDleq?: boolean;
}): string;

// @public
export function getEncodedTokenBinary(token: Token): Uint8Array;

// @public
export function getHTLCWitnessPreimage(witness: Proof['witness']): string | undefined;

// @public
export type GetInfoResponse = {
    name: string;
    pubkey: string;
    version: string;
    description?: string;
    description_long?: string;
    icon_url?: string;
    contact: MintContactInfo[];
    nuts: {
        '4': {
            methods: SwapMethod[];
            disabled: boolean;
        };
        '5': {
            methods: SwapMethod[];
            disabled: boolean;
        };
        '7'?: {
            supported: boolean;
        };
        '8'?: {
            supported: boolean;
        };
        '9'?: {
            supported: boolean;
        };
        '10'?: {
            supported: boolean;
        };
        '11'?: {
            supported: boolean;
        };
        '12'?: {
            supported: boolean;
        };
        '14'?: {
            supported: boolean;
        };
        '15'?: {
            methods: MPPMethod[];
        };
        '17'?: {
            supported: WebSocketSupport[];
        };
        '19'?: {
            ttl: number | null;
            cached_endpoints: Array<{
                method: 'GET' | 'POST';
                path: string;
            }>;
        };
        '20'?: {
            supported: boolean;
        };
        '21'?: {
            openid_discovery: string;
            client_id: string;
            protected_endpoints?: Array<{
                method: 'GET' | 'POST';
                path: string;
            }>;
        };
        '22'?: {
            bat_max_mint: number;
            protected_endpoints: Array<{
                method: 'GET' | 'POST';
                path: string;
            }>;
        };
        '29'?: Nut29Info;
    };
    motd?: string;
};

// @public
export function getKeysetAmounts(keyset: Keys, order?: 'asc' | 'desc'): Amount[];

// @public (undocumented)
export const getKeysetIdInt: (keysetId: string) => bigint;

// @public
export type GetKeysetsResponse = {
    keysets: MintKeyset[];
};

// @public
export type GetKeysResponse = {
    keysets: MintKeys[];
};

// @public
export function getP2PKExpectedWitnessPubkeys(secretStr: string | Secret): string[];

// @public
export function getP2PKSigFlag(secretStr: string | Secret): SigFlag;

// @public
export function getP2PKWitnessSignatures(witness: Proof['witness']): string[];

// @public (undocumented)
export function getPubKeyFromPrivKey(privKey: Uint8Array): Uint8Array<ArrayBufferLike>;

// @public
export function getSecretData(secret: Secret | string): SecretData;

// @public
export function getSecretKind(secret: Secret | string): SecretKind;

// @public
export function getTag(secret: Secret | string, key: string): string[] | undefined;

// @public
export function getTagInt(secret: Secret | string, key: string): number | undefined;

// @public
export function getTags(secret: Secret | string): string[][];

// @public
export function getTagScalar(secret: Secret | string, key: string): string | undefined;

// @public
export function getTokenMetadata(token: string): TokenMetadata;

// @public
export function getValidSigners(signatures: string[], message: string, pubkeys: string[]): string[];

// @public
export function hasCorrespondingKey(amount: AmountLike, keyset: Keys): boolean;

// @public (undocumented)
export function hash_e(pubkeys: Array<WeierstrassPoint<bigint>>): Uint8Array;

// @public (undocumented)
export function hashToCurve(secret: Uint8Array): WeierstrassPoint<bigint>;

// @public
export type HasKeysetId = {
    id: string;
};

// @public
export type HasKeysetKeys = {
    id: string;
    keys: Keys;
};

// @public
export function hasP2PKSignedProof(pubkey: string, proof: Proof, message?: string): boolean;

// @public
export function hasTag(secret: Secret | string, key: string): boolean;

// @public
export function hasValidDleq(proof: Proof, keyset: HasKeysetKeys, opts?: {
    require?: boolean;
}): boolean;

// @public
export type HTLCWitness = {
    preimage: string;
    signatures?: string[];
};

// @public
export class HttpResponseError extends CTSError {
    constructor(message: string, status: number, options?: {
        cause?: unknown;
    });
    // (undocumented)
    status: number;
}

// @public (undocumented)
export function injectWebSocketImpl(ws: typeof WebSocket): void;

// @public (undocumented)
export type IntRange<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>>;

// @public
export function isHTLCSpendAuthorised(proof: Proof, logger?: Logger, message?: string): boolean;

// @public
export function isP2PKSpendAuthorised(proof: Proof, logger?: Logger, message?: string): boolean;

// @public
export const JSONInt: JSONIntApi;

// @public (undocumented)
export interface JSONIntApi {
    parse(source: string, reviver?: (this: unknown, key: string, value: unknown) => unknown, options?: {
        strict?: boolean;
        fallbackTo?: 'number' | 'string' | 'error';
    }): unknown;
    stringify(value: unknown, replacer?: ((this: unknown, key: string, value: unknown) => unknown) | ReadonlyArray<string | number>, space?: string | number): string | undefined;
}

// @public (undocumented)
export type JsonRpcReqParams = {
    kind: RpcSubKinds;
    filters: string[];
    subId: string;
};

// @public
export class KeyChain {
    constructor(mint: string | Mint, unit: string);
    get cache(): KeyChainCache;
    static cacheToMintDTO(cache: KeyChainCache): {
        keysets: MintKeyset[];
        keys: MintKeys[];
    };
    ensureKeysetKeys(id: string): Promise<Keyset>;
    static fromCache(mint: string | Mint, unit: string, cache: KeyChainCache): KeyChain;
    getAllKeys(): MintKeys[];
    getAllKeysetIds(): string[];
    getCheapestKeyset(): Keyset;
    getKeyset(id?: string): Keyset;
    getKeysets(): Keyset[];
    init(forceRefresh?: boolean): Promise<void>;
    loadFromCache(cache: KeyChainCache): void;
    static mintToCacheDTO(mintUrl: string, allKeysets: MintKeyset[], allKeys: MintKeys[]): KeyChainCache;
}

// @public
export type KeyChainCache = {
    keysets: KeysetCache[];
    mintUrl: string;
    savedAt?: number;
};

// @public
export type Keys = {
    [amount: string]: string;
};

// @public (undocumented)
export class Keyset {
    constructor(id: string, unit: string, active: boolean, input_fee_ppk?: number, final_expiry?: number);
    // (undocumented)
    get expiry(): number | undefined;
    // (undocumented)
    get fee(): number;
    static fromMintApi(meta: MintKeyset, keys?: MintKeys): Keyset;
    // (undocumented)
    get hasHexId(): boolean;
    // (undocumented)
    get hasKeys(): boolean;
    // (undocumented)
    get id(): string;
    // (undocumented)
    get isActive(): boolean;
    // (undocumented)
    get keys(): Record<number, string>;
    set keys(keys: Record<number, string>);
    toMintKeys(): MintKeys | null;
    toMintKeyset(): MintKeyset;
    // (undocumented)
    get unit(): string;
    verify(): boolean;
    static verifyKeysetId(keys: MintKeys): boolean;
}

// @public
export type KeysetCache = MintKeyset & {
    keys?: Keys;
};

// @public (undocumented)
export type KeysetPair = {
    keysetId: string;
    pubKeys: RawMintKeys;
    privKeys: RawMintKeys;
};

// @public (undocumented)
export type LockState = 'PERMANENT' | 'ACTIVE' | 'EXPIRED';

// @public (undocumented)
export interface Logger {
    // (undocumented)
    debug(message: string, context?: Record<string, unknown>): void;
    // (undocumented)
    error(message: string, context?: Record<string, unknown>): void;
    // (undocumented)
    info(message: string, context?: Record<string, unknown>): void;
    // (undocumented)
    log(level: LogLevel, message: string, context?: Record<string, unknown>): void;
    // (undocumented)
    trace(message: string, context?: Record<string, unknown>): void;
    // (undocumented)
    warn(message: string, context?: Record<string, unknown>): void;
}

// @public
export type LogLevel = 'error' | 'warn' | 'info' | 'debug' | 'trace';

// @public
export function maybeDeriveP2BKPrivateKeys(privateKey: string | string[], proof: Proof): string[];

// @public
export const meetsSignerThreshold: (signatures: string[], message: string, pubkeys: string[], threshold?: number) => boolean;

// @public
export class MeltBuilder<TQuote extends Pick<MeltQuoteBaseResponse, 'amount' | 'quote'> = MeltQuoteBolt11Response> {
    constructor(wallet: Wallet, method: string, quote: TQuote, proofs: ProofLike[]);
    asCustom(data: OutputDataLike[]): this;
    asDeterministic(counter?: number, denoms?: AmountLike[]): this;
    asFactory(factory: OutputDataFactory, denoms?: AmountLike[]): this;
    asP2PK(options: P2PKOptions, denoms?: AmountLike[]): this;
    asRandom(denoms?: AmountLike[]): this;
    keyset(id: string): this;
    onCountersReserved(cb: OnCountersReserved): this;
    prepare(): Promise<MeltPreview<TQuote>>;
    privkey(k: string | string[]): this;
    run(): Promise<MeltProofsResponse<TQuote>>;
}

// @public
export class MeltOnchainBuilder {
    constructor(wallet: Wallet, quote: MeltQuoteOnchainResponse, proofs: ProofLike[]);
    feeIndex(index: number): this;
    keyset(id: string): this;
    privkey(k: string | string[]): this;
    run(): Promise<MeltProofsResponse<MeltQuoteOnchainResponse>>;
}

// @public
export interface MeltPreview<TQuote extends Pick<MeltQuoteBaseResponse, 'quote'> = MeltQuoteBaseResponse> {
    inputs: Proof[];
    keysetId: string;
    // (undocumented)
    method: string;
    outputData: OutputDataLike[];
    quote: TQuote;
}

// @public
export type MeltProofsConfig = {
    keysetId?: string;
    privkey?: string | string[];
    onCountersReserved?: OnCountersReserved;
};

// @public
export type MeltProofsResponse<TQuote extends Pick<MeltQuoteBaseResponse, 'quote'> = MeltQuoteBaseResponse> = {
    quote: TQuote;
    change: Proof[];
    outputData: OutputDataLike[];
};

// @public
export type MeltQuoteBaseRequest = {
    unit: string;
    request: string;
};

// @public
export type MeltQuoteBaseResponse = {
    quote: string;
    amount: Amount;
    unit: string;
    state: MeltQuoteState;
    expiry: number;
    change?: SerializedBlindedSignature[];
};

// @public
export type MeltQuoteBolt11Request = MeltQuoteBaseRequest & {
    options?: {
        amountless?: {
            amount_msat: AmountLike;
        };
        mpp?: {
            amount: AmountLike;
        };
    };
};

// @public
export type MeltQuoteBolt11Response = MeltQuoteBaseResponse & {
    request: string;
    fee_reserve: Amount;
    payment_preimage: string | null;
};

// @public
export type MeltQuoteBolt12Request = MeltQuoteBaseRequest & {
    options?: {
        amountless?: {
            amount_msat: AmountLike;
        };
    };
};

// @public
export type MeltQuoteBolt12Response = MeltQuoteBolt11Response;

// @public
export type MeltQuoteOnchainFeeOption = {
    fee_index: number;
    fee_reserve: Amount;
    estimated_blocks: number;
};

// @public
export type MeltQuoteOnchainRequest = MeltQuoteBaseRequest & {
    amount: AmountLike;
};

// @public
export type MeltQuoteOnchainResponse = MeltQuoteBaseResponse & {
    request: string;
    fee_options: MeltQuoteOnchainFeeOption[];
    selected_fee_index: number | null;
    outpoint: string | null;
};

// @public (undocumented)
export const MeltQuoteState: {
    readonly UNPAID: "UNPAID";
    readonly PENDING: "PENDING";
    readonly PAID: "PAID";
};

// @public (undocumented)
export type MeltQuoteState = (typeof MeltQuoteState)[keyof typeof MeltQuoteState];

// @public
export type MeltRequest = {
    quote: string;
    inputs: Proof[];
    outputs?: SerializedBlindedMessage[];
    prefer_async?: boolean;
} & Record<string, unknown>;

// @public
export class Mint {
    constructor(mintUrl: string, options?: {
        customRequest?: RequestFn;
        authProvider?: AuthProvider;
        logger?: Logger;
    });
    check(checkPayload: CheckStatePayload, customRequest?: RequestFn): Promise<CheckStateResponse>;
    checkMeltQuote<TRes extends MeltQuoteBaseResponse = MeltQuoteBaseResponse>(method: string, quote: string, options?: {
        customRequest?: RequestFn;
        normalize?: (raw: Record<string, unknown>) => TRes;
    }): Promise<TRes>;
    checkMeltQuoteBolt11(quote: string, customRequest?: RequestFn): Promise<MeltQuoteBolt11Response>;
    checkMeltQuoteBolt12(quote: string, customRequest?: RequestFn): Promise<MeltQuoteBolt12Response>;
    checkMeltQuoteOnchain(quote: string, customRequest?: RequestFn): Promise<MeltQuoteOnchainResponse>;
    checkMintQuote<TRes extends MintQuoteBaseResponse = MintQuoteBaseResponse>(method: string, quote: string, options?: {
        customRequest?: RequestFn;
        normalize?: (raw: Record<string, unknown>) => TRes;
    }): Promise<TRes>;
    checkMintQuoteBolt11(quote: string, customRequest?: RequestFn): Promise<MintQuoteBolt11Response>;
    checkMintQuoteBolt12(quote: string, customRequest?: RequestFn): Promise<MintQuoteBolt12Response>;
    checkMintQuoteOnchain(quote: string, customRequest?: RequestFn): Promise<MintQuoteOnchainResponse>;
    connectWebSocket(): Promise<void>;
    createMeltQuote<TRes extends MeltQuoteBaseResponse = MeltQuoteBaseResponse>(method: string, payload: Record<string, unknown>, options?: {
        customRequest?: RequestFn;
        normalize?: (raw: Record<string, unknown>) => TRes;
    }): Promise<TRes>;
    createMeltQuoteBolt11(meltQuotePayload: MeltQuoteBolt11Request, customRequest?: RequestFn): Promise<MeltQuoteBolt11Response>;
    createMeltQuoteBolt12(meltQuotePayload: MeltQuoteBolt12Request, customRequest?: RequestFn): Promise<MeltQuoteBolt12Response>;
    createMeltQuoteOnchain(meltQuotePayload: MeltQuoteOnchainRequest, customRequest?: RequestFn): Promise<MeltQuoteOnchainResponse>;
    createMintQuote<TRes extends MintQuoteBaseResponse = MintQuoteBaseResponse>(method: string, payload: Record<string, unknown>, options?: {
        customRequest?: RequestFn;
        normalize?: (raw: Record<string, unknown>) => TRes;
    }): Promise<TRes>;
    createMintQuoteBolt11(mintQuotePayload: MintQuoteBolt11Request, customRequest?: RequestFn): Promise<MintQuoteBolt11Response>;
    createMintQuoteBolt12(mintQuotePayload: MintQuoteBolt12Request, customRequest?: RequestFn): Promise<MintQuoteBolt12Response>;
    createMintQuoteOnchain(mintQuotePayload: MintQuoteOnchainRequest, customRequest?: RequestFn): Promise<MintQuoteOnchainResponse>;
    disconnectWebSocket(): void;
    getInfo(customRequest?: RequestFn): Promise<GetInfoResponse>;
    getKeys(keysetId?: string, mintUrl?: string, customRequest?: RequestFn): Promise<GetKeysResponse>;
    getKeySets(customRequest?: RequestFn): Promise<GetKeysetsResponse>;
    getLazyMintInfo(customRequest?: RequestFn): Promise<MintInfo>;
    get lastResponseMetadata(): ResponseMeta | undefined;
    melt<TRes extends Record<string, unknown> = Record<string, unknown>>(method: string, meltPayload: MeltRequest, options?: {
        customRequest?: RequestFn;
        normalize?: (raw: Record<string, unknown>) => MeltQuoteBaseResponse & TRes;
    }): Promise<MeltQuoteBaseResponse & TRes>;
    meltBolt11(meltPayload: MeltRequest, options?: {
        customRequest?: RequestFn;
    }): Promise<MeltQuoteBolt11Response>;
    meltBolt12(meltPayload: MeltRequest, options?: {
        customRequest?: RequestFn;
    }): Promise<MeltQuoteBolt12Response>;
    meltOnchain(meltPayload: MeltRequest, options?: {
        customRequest?: RequestFn;
    }): Promise<MeltQuoteOnchainResponse>;
    mint<TRes extends Record<string, unknown> = Record<string, unknown>>(method: string, mintPayload: MintRequest, options?: {
        customRequest?: RequestFn;
        normalize?: (raw: Record<string, unknown>) => MintResponse & TRes;
    }): Promise<MintResponse & TRes>;
    mintBatch<TRes extends Record<string, unknown> = Record<string, unknown>>(method: string, mintPayload: BatchMintRequest, options?: {
        customRequest?: RequestFn;
        normalize?: (raw: Record<string, unknown>) => MintResponse & TRes;
    }): Promise<MintResponse & TRes>;
    mintBatchBolt11(mintPayload: BatchMintRequest, customRequest?: RequestFn): Promise<MintResponse>;
    mintBatchBolt12(mintPayload: BatchMintRequest, customRequest?: RequestFn): Promise<MintResponse>;
    mintBolt11(mintPayload: MintRequest, customRequest?: RequestFn): Promise<MintResponse>;
    mintBolt12(mintPayload: MintRequest, customRequest?: RequestFn): Promise<MintResponse>;
    mintOnchain(mintPayload: MintRequest, customRequest?: RequestFn): Promise<MintResponse>;
    // (undocumented)
    get mintUrl(): string;
    oidcAuth(opts?: OIDCAuthOptions): Promise<OIDCAuth>;
    restore(restorePayload: PostRestorePayload, customRequest?: RequestFn): Promise<PostRestoreResponse>;
    setMintInfo(mintInfo: MintInfo | GetInfoResponse): void;
    swap(swapPayload: SwapRequest, customRequest?: RequestFn): Promise<SwapResponse>;
    // (undocumented)
    get webSocketConnection(): WSConnection | undefined;
}

// @public
export class MintBuilder<M extends MintMethod, HasPrivKey extends boolean = M extends 'bolt12' | 'onchain' ? false : true> {
    constructor(wallet: Wallet, method: M, amount: AmountLike, quote: MintQuoteFor<M>);
    asCustom(data: OutputDataLike[]): this;
    asDeterministic(counter?: number, denoms?: AmountLike[]): this;
    asFactory(factory: OutputDataFactory, denoms?: AmountLike[]): this;
    asP2PK(options: P2PKOptions, denoms?: AmountLike[]): this;
    asRandom(denoms?: AmountLike[]): this;
    keyset(id: string): this;
    onCountersReserved(cb: OnCountersReserved): this;
    prepare(this: MintBuilder<M, true>): Promise<M extends 'bolt11' ? MintPreview<MintQuoteBolt11Response> : M extends 'bolt12' ? MintPreview<MintQuoteBolt12Response> : MintPreview<MintQuoteOnchainResponse>>;
    privkey(k: string): MintBuilder<M, true>;
    proofsWeHave(p: Array<Pick<ProofLike, 'amount'>>): this;
    run(this: MintBuilder<M, true>): Promise<Proof[]>;
}

// @public (undocumented)
export type MintContactInfo = {
    method: string;
    info: string;
};

// @public (undocumented)
export class MintInfo {
    constructor(info: GetInfoResponse, logger?: Logger);
    // (undocumented)
    get cache(): GetInfoResponse;
    // (undocumented)
    get contact(): MintContactInfo[];
    // (undocumented)
    get description(): string | undefined;
    // (undocumented)
    get description_long(): string | undefined;
    // (undocumented)
    isSupported(num: 4 | 5): {
        disabled: boolean;
        params: SwapMethod[];
    };
    // (undocumented)
    isSupported(num: 7 | 8 | 9 | 10 | 11 | 12 | 14 | 20): {
        supported: boolean;
    };
    // (undocumented)
    isSupported(num: 17): {
        supported: boolean;
        params?: WebSocketSupport[];
    };
    // (undocumented)
    isSupported(num: 15): {
        supported: boolean;
        params?: MPPMethod[];
    };
    // (undocumented)
    isSupported(num: 19): {
        supported: boolean;
        params?: Nut19Policy;
    };
    // (undocumented)
    isSupported(num: 29): {
        supported: boolean;
        params?: Nut29Info;
    };
    // (undocumented)
    get motd(): string | undefined;
    // (undocumented)
    get name(): string;
    // (undocumented)
    static normalizeInfo(info: GetInfoResponse, logger?: Logger): GetInfoResponse;
    // (undocumented)
    get nuts(): {
        '4': {
            methods: SwapMethod[];
            disabled: boolean;
        };
        '5': {
            methods: SwapMethod[];
            disabled: boolean;
        };
        '7'?: {
            supported: boolean;
        };
        '8'?: {
            supported: boolean;
        };
        '9'?: {
            supported: boolean;
        };
        '10'?: {
            supported: boolean;
        };
        '11'?: {
            supported: boolean;
        };
        '12'?: {
            supported: boolean;
        };
        '14'?: {
            supported: boolean;
        };
        '15'?: {
            methods: MPPMethod[];
        };
        '17'?: {
            supported: WebSocketSupport[];
        };
        '19'?: {
            ttl: number | null;
            cached_endpoints: Array<{
                method: "GET" | "POST";
                path: string;
            }>;
        };
        '20'?: {
            supported: boolean;
        };
        '21'?: {
            openid_discovery: string;
            client_id: string;
            protected_endpoints?: Array<{
                method: "GET" | "POST";
                path: string;
            }>;
        };
        '22'?: {
            bat_max_mint: number;
            protected_endpoints: Array<{
                method: "GET" | "POST";
                path: string;
            }>;
        };
        '29'?: Nut29Info;
    };
    // (undocumented)
    get pubkey(): string;
    // (undocumented)
    requiresBlindAuthToken(method: 'GET' | 'POST', path: string): boolean;
    // (undocumented)
    requiresClearAuthToken(method: 'GET' | 'POST', path: string): boolean;
    // (undocumented)
    supportsAmountless(method?: string, unit?: string): boolean;
    supportsMintMeltMethod(op: 'mint' | 'melt', method: string, unit: string): boolean;
    supportsNut04Description(method: 'bolt11' | 'bolt12', unit?: string): boolean;
    // (undocumented)
    get version(): string;
}

// @public
export type MintKeys = {
    id: string;
    unit: string;
    active?: boolean;
    input_fee_ppk?: number;
    final_expiry?: number;
    keys: Keys;
};

// @public
export type MintKeyset = {
    id: string;
    unit: string;
    active: boolean;
    input_fee_ppk?: number;
    final_expiry?: number;
};

// @public (undocumented)
export type MintMethod = 'bolt11' | 'bolt12' | 'onchain';

// @public
export class MintOperationError extends HttpResponseError {
    constructor(code: number, detail: string);
    // (undocumented)
    code: number;
}

// @public
export interface MintPreview<TQuote extends Pick<MintQuoteBaseResponse, 'quote'> = MintQuoteBaseResponse> {
    keysetId: string;
    // (undocumented)
    method: string;
    outputData: OutputDataLike[];
    payload: MintRequest;
    quote: TQuote;
}

// @public
export type MintProofsConfig = {
    keysetId?: string;
    privkey?: string | string[];
    proofsWeHave?: Array<Pick<ProofLike, 'amount'>>;
    onCountersReserved?: OnCountersReserved;
};

// @public
export type MintQuoteBaseRequest = {
    unit: string;
    pubkey?: string;
};

// @public
export type MintQuoteBaseResponse = {
    quote: string;
    request: string;
    unit: string;
    pubkey?: string;
};

// @public
export type MintQuoteBolt11Request = MintQuoteBaseRequest & {
    amount: AmountLike;
    description?: string;
};

// @public
export type MintQuoteBolt11Response = MintQuoteBaseResponse & {
    amount: Amount;
    state: MintQuoteState;
    expiry: number | null;
};

// @public
export type MintQuoteBolt12Request = MintQuoteBaseRequest & {
    amount?: AmountLike;
    description?: string;
};

// @public
export type MintQuoteBolt12Response = MintQuoteBaseResponse & {
    amount: Amount | null;
    expiry: number | null;
    pubkey: string;
    amount_paid: Amount;
    amount_issued: Amount;
};

// @public (undocumented)
export type MintQuoteFor<M extends MintMethod> = M extends 'bolt11' ? string | MintQuoteBolt11Response : M extends 'bolt12' ? MintQuoteBolt12Response : MintQuoteOnchainResponse;

// @public
export type MintQuoteOnchainRequest = MintQuoteBaseRequest & {
    pubkey: string;
};

// @public
export type MintQuoteOnchainResponse = MintQuoteBaseResponse & {
    expiry: number | null;
    pubkey: string;
    amount_paid: Amount;
    amount_issued: Amount;
};

// @public (undocumented)
export const MintQuoteState: {
    readonly UNPAID: "UNPAID";
    readonly PAID: "PAID";
    readonly ISSUED: "ISSUED";
};

// @public (undocumented)
export type MintQuoteState = (typeof MintQuoteState)[keyof typeof MintQuoteState];

// @public
export type MintRequest = {
    quote: string;
    outputs: SerializedBlindedMessage[];
    signature?: string;
};

// @public
export type MintResponse = {
    signatures: SerializedBlindedSignature[];
};

// @public
export type MPPMethod = {
    method: string;
    unit: string;
};

// @public
export class NetworkError extends CTSError {
    constructor(message: string, options?: {
        cause?: unknown;
    });
}

// @public
export function normalizeProofAmounts(raw: ProofLike[]): Proof[];

// @public
export type NUT10Option = {
    kind: string;
    data: string;
    tags: string[][];
};

// @public (undocumented)
export type Nut19Policy = {
    ttl: number;
    cached_endpoints: Array<{
        method: 'GET' | 'POST';
        path: string;
    }>;
};

// @public
export type Nut29Info = {
    methods?: string[];
    max_batch_size?: number;
};

// @public (undocumented)
export class OIDCAuth {
    constructor(discoveryUrl: string, opts?: OIDCAuthOptions);
    addTokenListener(fn: (t: TokenResponse) => void | Promise<void>): void;
    buildAuthCodeUrl(input: {
        redirectUri: string;
        codeChallenge: string;
        codeChallengeMethod?: 'S256' | 'plain';
        state?: string;
        scope?: string;
    }): Promise<string>;
    // (undocumented)
    devicePoll(device_code: string, intervalSec?: number): Promise<TokenResponse>;
    // (undocumented)
    deviceStart(): Promise<DeviceStartResponse>;
    exchangeAuthCode(input: {
        code: string;
        redirectUri: string;
        codeVerifier: string;
    }): Promise<TokenResponse>;
    // (undocumented)
    static fromMintInfo(info: {
        nuts: GetInfoResponse['nuts'];
    }, opts?: OIDCAuthOptions): OIDCAuth;
    generatePKCE(): {
        verifier: string;
        challenge: string;
    };
    // (undocumented)
    loadConfig(): Promise<OIDCConfig>;
    // (undocumented)
    passwordGrant(username: string, password: string): Promise<TokenResponse>;
    // (undocumented)
    refresh(refresh_token: string): Promise<TokenResponse>;
    // (undocumented)
    setClient(id: string): void;
    // (undocumented)
    setScope(scope?: string): void;
    startDeviceAuth(intervalSec?: number): Promise<DeviceStartResponse & {
        poll: () => Promise<TokenResponse>;
        cancel: () => void;
    }>;
}

// @public (undocumented)
export type OIDCAuthOptions = {
    clientId?: string;
    scope?: string;
    logger?: Logger;
    onTokens?: (t: TokenResponse) => void | Promise<void>;
};

// @public (undocumented)
export type OIDCConfig = {
    issuer: string;
    authorization_endpoint?: string;
    token_endpoint: string;
    device_authorization_endpoint?: string;
};

// @public (undocumented)
export type OnCountersReserved = (info: OperationCounters) => void;

// @public
export type OperationCounters = {
    keysetId: string;
    start: number;
    count: number;
    next: number;
};

// @public
export interface OutputConfig {
    // (undocumented)
    keep?: OutputType;
    // (undocumented)
    send: OutputType;
}

// @public (undocumented)
export class OutputData implements OutputDataLike {
    constructor(blindedMessage: SerializedBlindedMessage, blindingFactor: bigint, secret: Uint8Array, ephemeralE?: string);
    // (undocumented)
    blindedMessage: SerializedBlindedMessage;
    // (undocumented)
    blindingFactor: bigint;
    // (undocumented)
    static createDeterministicData(amount: AmountLike, seed: Uint8Array, counter: number, keyset: HasKeysetKeys, customSplit?: AmountLike[]): OutputData[];
    // (undocumented)
    static createP2PKData(p2pk: P2PKOptions, amount: AmountLike, keyset: HasKeysetKeys, customSplit?: AmountLike[]): OutputData[];
    // (undocumented)
    static createRandomData(amount: AmountLike, keyset: HasKeysetKeys, customSplit?: AmountLike[]): OutputData[];
    // (undocumented)
    static createSingleDeterministicData(amount: AmountLike, seed: Uint8Array, counter: number, keysetId: string): OutputData;
    // (undocumented)
    static createSingleP2PKData(p2pk: P2PKOptions, amount: AmountLike, keysetId: string): OutputData;
    // (undocumented)
    static createSingleRandomData(amount: AmountLike, keysetId: string): OutputData;
    static deserialize(serialized: SerializedOutputData): OutputData;
    // (undocumented)
    ephemeralE?: string;
    // (undocumented)
    secret: Uint8Array;
    static serialize(output: OutputDataLike): SerializedOutputData;
    static sumOutputAmounts(outputs: OutputDataLike[]): Amount;
    // (undocumented)
    toProof(sig: SerializedBlindedSignature, keyset: HasKeysetKeys): Proof;
}

// @public
export interface OutputDataCreator {
    // (undocumented)
    createDeterministicData(amount: AmountLike, seed: Uint8Array, counter: number, keyset: HasKeysetKeys, customSplit?: AmountLike[]): OutputDataLike[];
    // (undocumented)
    createP2PKData(p2pk: P2PKOptions, amount: AmountLike, keyset: HasKeysetKeys, customSplit?: AmountLike[]): OutputDataLike[];
    // (undocumented)
    createRandomData(amount: AmountLike, keyset: HasKeysetKeys, customSplit?: AmountLike[]): OutputDataLike[];
    // (undocumented)
    createSingleDeterministicData(amount: AmountLike, seed: Uint8Array, counter: number, keysetId: string): OutputDataLike;
    // (undocumented)
    createSingleP2PKData(p2pk: P2PKOptions, amount: AmountLike, keysetId: string): OutputDataLike;
    // (undocumented)
    createSingleRandomData(amount: AmountLike, keysetId: string): OutputDataLike;
}

// @public
export type OutputDataFactory = (amount: AmountLike, keys: HasKeysetKeys) => OutputDataLike;

// @public
export interface OutputDataLike {
    // (undocumented)
    blindedMessage: SerializedBlindedMessage;
    // (undocumented)
    blindingFactor: bigint;
    // (undocumented)
    ephemeralE?: string;
    // (undocumented)
    secret: Uint8Array;
    // (undocumented)
    toProof: (signature: SerializedBlindedSignature, keyset: HasKeysetKeys) => Proof;
}

// @public
export type OutputType = ({
    type: 'random';
} & SharedOutputTypeProps) | ({
    type: 'deterministic';
    counter: number;
} & SharedOutputTypeProps) | ({
    type: 'p2pk';
    options: P2PKOptions;
} & SharedOutputTypeProps) | ({
    type: 'factory';
    factory: OutputDataFactory;
} & SharedOutputTypeProps) | {
    type: 'custom';
    data: OutputDataLike[];
};

// @public
export const P2BK_DST: Uint8Array<ArrayBufferLike>;

// @public (undocumented)
export class P2PKBuilder {
    addHashlock(hashlock: string): this;
    // (undocumented)
    addLockPubkey(pk: string | string[]): this;
    // (undocumented)
    addRefundPubkey(pk: string | string[]): this;
    // (undocumented)
    addTag(key: string, values?: string[] | string): this;
    // (undocumented)
    addTags(tags: P2PKTag[]): this;
    // (undocumented)
    blindKeys(): this;
    // (undocumented)
    static fromOptions(opts: P2PKOptions): P2PKBuilder;
    // (undocumented)
    lockUntil(when: Date | number): this;
    // (undocumented)
    requireLockSignatures(n: number): this;
    // (undocumented)
    requireRefundSignatures(n: number): this;
    // (undocumented)
    sigAll(): this;
    // (undocumented)
    toOptions(): P2PKOptions;
}

// @public
export type P2PKOptions = {
    pubkey: string | string[];
    locktime?: number;
    refundKeys?: string[];
    requiredSignatures?: number;
    requiredRefundSignatures?: number;
    additionalTags?: P2PKTag[];
    blindKeys?: boolean;
    sigFlag?: SigFlag;
    hashlock?: string;
};

// @public
export interface P2PKPathInfo {
    pubkeys: string[];
    receivedSigners: string[];
    requiredSigners: number;
}

// @public (undocumented)
export type P2PKSpendingPath = 'MAIN' | 'REFUND' | 'UNLOCKED' | 'FAILED';

// @public
export type P2PKTag = [key: string, ...values: string[]];

// @public (undocumented)
export interface P2PKVerificationResult {
    lockState: LockState;
    locktime: number;
    main: P2PKPathInfo;
    path: P2PKSpendingPath;
    refund: P2PKPathInfo;
    success: boolean;
}

// @public
export type P2PKWitness = {
    signatures?: string[];
};

// @public
export function parseHTLCSecret(secret: string | Secret): Secret;

// @public
export function parseP2PKSecret(secret: string | Secret): Secret;

// @public
export function parseSecret(secret: string | Secret): Secret;

// @public (undocumented)
class PaymentRequest_2 {
    constructor(transport?: PaymentRequestTransport[] | undefined, id?: string | undefined, amount?: AmountLike, unit?: string | undefined, mints?: string[] | undefined, description?: string | undefined, singleUse?: boolean, nut10?: NUT10Option | undefined);
    // (undocumented)
    amount?: Amount;
    // (undocumented)
    description?: string | undefined;
    // (undocumented)
    static fromEncodedRequest(encodedRequest: string): PaymentRequest_2;
    static fromRawRequest(rawPaymentRequest: RawPaymentRequest): PaymentRequest_2;
    // (undocumented)
    getTransport(type: PaymentRequestTransportType): PaymentRequestTransport | undefined;
    // (undocumented)
    id?: string | undefined;
    // (undocumented)
    mints?: string[] | undefined;
    // (undocumented)
    nut10?: NUT10Option | undefined;
    // (undocumented)
    singleUse: boolean;
    toEncodedCreqA(): string;
    toEncodedCreqB(): string;
    // (undocumented)
    toEncodedRequest(): string;
    // (undocumented)
    toRawRequest(): RawPaymentRequest;
    // (undocumented)
    transport?: PaymentRequestTransport[] | undefined;
    // (undocumented)
    unit?: string | undefined;
}
export { PaymentRequest_2 as PaymentRequest }

// @public (undocumented)
export type PaymentRequestPayload = {
    id?: string;
    memo?: string;
    unit: string;
    mint: string;
    proofs: Proof[];
};

// @public (undocumented)
export type PaymentRequestTransport = {
    type: PaymentRequestTransportType;
    target: string;
    tags?: string[][];
};

// @public (undocumented)
export enum PaymentRequestTransportType {
    // (undocumented)
    NOSTR = "nostr",
    // (undocumented)
    POST = "post"
}

// @public (undocumented)
export function pointFromBytes(bytes: Uint8Array): WeierstrassPoint<bigint>;

// @public (undocumented)
export function pointFromHex(hex: string): WeierstrassPoint<bigint>;

// @public
export type PostRestorePayload = {
    outputs: SerializedBlindedMessage[];
};

// @public
export type PostRestoreResponse = {
    outputs: SerializedBlindedMessage[];
    signatures: SerializedBlindedSignature[];
};

// @public (undocumented)
export type PrepareMeltConfig = MeltProofsConfig & {
    nut08Change?: boolean;
};

// @public
export type PrivKey = Uint8Array | string;

// @public
export type Proof = {
    id: string;
    amount: Amount;
    secret: string;
    C: string;
    dleq?: SerializedDLEQ;
    p2pk_e?: string;
    witness?: string | P2PKWitness | HTLCWitness;
};

// @public
export type ProofLike = Omit<Proof, 'amount'> & {
    amount: AmountLike;
};

// @public
export type ProofState = {
    Y: string;
    state: CheckStateEnum;
    witness: string | null;
};

// @public
export class RateLimitError extends HttpResponseError {
    constructor(message: string, retryAfterMs?: number | undefined);
    // (undocumented)
    readonly retryAfterMs?: number | undefined;
}

// @public (undocumented)
export type RawBlindedMessage = {
    B_: WeierstrassPoint<bigint>;
    r: bigint;
    secret: Uint8Array;
};

// @public (undocumented)
export type RawMintKeys = {
    [k: string]: Uint8Array;
};

// @public (undocumented)
export type RawNUT10Option = {
    k: string;
    d: string;
    t: string[][];
};

// @public (undocumented)
export type RawPaymentRequest = {
    i?: string;
    a?: number | bigint;
    u?: string;
    s?: boolean;
    m?: string[];
    d?: string;
    t?: RawTransport[];
    nut10?: RawNUT10Option;
};

// @public (undocumented)
export type RawTransport = {
    t: PaymentRequestTransportType;
    a: string;
    g?: string[][];
};

// @public
export class ReceiveBuilder {
    constructor(wallet: Wallet, token: Token | string | ProofLike[]);
    asCustom(data: OutputDataLike[]): this;
    asDeterministic(counter?: number, denoms?: AmountLike[]): this;
    asFactory(factory: OutputDataFactory, denoms?: AmountLike[]): this;
    asP2PK(options: P2PKOptions, denoms?: AmountLike[]): this;
    asRandom(denoms?: AmountLike[]): this;
    keyset(id: string): this;
    onCountersReserved(cb: OnCountersReserved): this;
    prepare(): Promise<SwapPreview>;
    privkey(k: string | string[]): this;
    proofsWeHave(p: Array<Pick<ProofLike, 'amount'>>): this;
    requireDleq(on?: boolean): this;
    run(): Promise<Proof[]>;
}

// @public
export type ReceiveConfig = {
    keysetId?: string;
    privkey?: string | string[];
    requireDleq?: boolean;
    proofsWeHave?: Array<Pick<ProofLike, 'amount'>>;
    onCountersReserved?: OnCountersReserved;
};

// @public (undocumented)
export type RequestArgs = {
    endpoint: string;
    requestBody?: Record<string, unknown>;
    headers?: Record<string, string>;
    logger?: Logger;
};

// @public (undocumented)
export type RequestFn = <T = unknown>(args: RequestOptions) => Promise<T>;

// @public (undocumented)
export type RequestOptions = RequestArgs & Omit<RequestInit, 'body' | 'headers'> & Partial<Nut19Policy> & {
    requestTimeout?: number;
    onResponseMeta?: (meta: ResponseMeta) => void;
};

// @public
export type ResponseMeta = {
    endpoint: string;
    status: number;
    retryAfterMs?: number;
    rateLimit?: string;
    rateLimitPolicy?: string;
    headers: Headers;
};

// @public (undocumented)
export type RestoreConfig = {
    keysetId?: string;
};

// @public (undocumented)
export type RpcSubKinds = 'bolt11_mint_quote' | 'bolt11_melt_quote' | 'proof_state';

// @public
export const schnorrSignDigest: (digest: DigestInput, privateKey: PrivKey) => string;

// @public
export const schnorrSignMessage: (message: string, privateKey: PrivKey) => string;

// @public
export const schnorrVerifyMessage: (signature: string, message: string, pubkey: string, throws?: boolean) => boolean;

// @public (undocumented)
export type Secret = [SecretKind, SecretData];

// @public (undocumented)
export interface SecretData {
    // (undocumented)
    data: string;
    // (undocumented)
    nonce: string;
    // (undocumented)
    tags?: string[][];
}

// @public (undocumented)
export type SecretKind = 'P2PK' | 'HTLC' | (string & {});

// @public (undocumented)
export type SecretsPolicy = 'auto' | 'deterministic' | 'random';

// @public (undocumented)
export type SelectProofs = (proofs: ProofLike[], amountToSelect: AmountLike, keyChain: KeyChain, includeFees?: boolean, exactMatch?: boolean, logger?: Logger) => SendResponse;

// @public (undocumented)
export function selectProofsRGLI(proofs: ProofLike[], amountToSelect: AmountLike, keyChain: KeyChain, includeFees?: boolean, exactMatch?: boolean, _logger?: Logger): SendResponse;

// @public
export class SendBuilder {
    constructor(wallet: Wallet, amount: AmountLike, proofs: ProofLike[]);
    asCustom(data: OutputDataLike[]): this;
    asDeterministic(counter?: number, denoms?: AmountLike[]): this;
    asFactory(factory: OutputDataFactory, denoms?: AmountLike[]): this;
    asP2PK(options: P2PKOptions, denoms?: AmountLike[]): this;
    asRandom(denoms?: AmountLike[]): this;
    includeFees(on?: boolean): this;
    keepAsCustom(data: OutputDataLike[]): this;
    keepAsDeterministic(counter?: number, denoms?: AmountLike[]): this;
    keepAsFactory(factory: OutputDataFactory, denoms?: AmountLike[]): this;
    keepAsP2PK(options: P2PKOptions, denoms?: AmountLike[]): this;
    keepAsRandom(denoms?: AmountLike[]): this;
    keyset(id: string): this;
    offlineCloseMatch(requireDleq?: boolean): this;
    offlineExactOnly(requireDleq?: boolean): this;
    onCountersReserved(cb: OnCountersReserved): this;
    prepare(): Promise<SwapPreview>;
    privkey(k: string | string[]): this;
    proofsWeHave(p: Array<Pick<ProofLike, 'amount'>>): this;
    run(): Promise<SendResponse>;
}

// @public
export type SendConfig = {
    keysetId?: string;
    privkey?: string | string[];
    includeFees?: boolean;
    proofsWeHave?: Array<Pick<ProofLike, 'amount'>>;
    onCountersReserved?: OnCountersReserved;
};

// @public
export type SendOfflineConfig = {
    requireDleq?: boolean;
    includeFees?: boolean;
    exactMatch?: boolean;
};

// @public
export type SendResponse = {
    keep: Proof[];
    send: Proof[];
    serialized?: Array<{
        proof: Proof;
        keep: boolean;
    }>;
};

// @public
export type SerializedBlindedMessage = {
    amount: Amount;
    B_: string;
    id: string;
};

// @public
export type SerializedBlindedSignature = {
    id: string;
    amount: Amount;
    C_: string;
    dleq?: SerializedDLEQ;
};

// @public (undocumented)
export type SerializedDLEQ = {
    s: string;
    e: string;
    r?: string;
};

// @public (undocumented)
export type SerializedMintKeys = {
    [k: string]: string;
};

// @public
export type SerializedOutputData = {
    blindedMessage: {
        amount: string;
        B_: string;
        id: string;
    };
    blindingFactor: string;
    secret: string;
    ephemeralE?: string;
};

// @public (undocumented)
export function serializeMintKeys(mintKeys: RawMintKeys): SerializedMintKeys;

// @public
export function serializeProofs(proofs: Proof | Proof[]): string[];

// @public
export function setGlobalRequestOptions(options: Partial<RequestOptions>): void;

// @public
export interface SharedOutputTypeProps {
    denominations?: AmountLike[];
}

// @public (undocumented)
export const SigAll: SigAllApi;

// @public
export type SigAllApi = {
    computeDigests: (inputs: Array<Pick<Proof, 'secret' | 'C'>>, outputs: SerializedBlindedMessage[], quoteId?: string) => SigAllDigests;
    extractSwapPackage: (preview: SwapPreview) => SigAllSigningPackage;
    extractMeltPackage: <TQuote extends Pick<MeltQuoteBaseResponse, 'quote'>>(preview: MeltPreview<TQuote>) => SigAllSigningPackage;
    serializePackage: (pkg: SigAllSigningPackage) => string;
    deserializePackage: (input: string, options?: {
        validateDigest?: boolean;
    }) => SigAllSigningPackage;
    signPackage: (pkg: SigAllSigningPackage, privkey: string) => SigAllSigningPackage;
    signDigest: (hexDigest: string, privkey: string) => string;
    mergeSwapPackage: (pkg: SigAllSigningPackage, preview: SwapPreview) => SwapPreview;
    mergeMeltPackage: <TQuote extends Pick<MeltQuoteBaseResponse, 'quote'>>(pkg: SigAllSigningPackage, preview: MeltPreview<TQuote>) => MeltPreview<TQuote>;
};

// @public (undocumented)
export type SigAllDigests = {
    legacy: string;
    current: string;
};

// @public
export type SigAllSigningPackage = {
    version: 'sigallA';
    type: 'swap' | 'melt';
    quote?: string;
    inputs: Array<Pick<Proof, 'secret' | 'C'>>;
    outputs: SerializedBlindedMessage[];
    digests: {
        legacy?: string;
        current: string;
    };
    witness?: {
        signatures: string[];
    };
};

// @public (undocumented)
export type SigFlag = (typeof SigFlags)[keyof typeof SigFlags];

// @public (undocumented)
export const SigFlags: {
    readonly SIG_INPUTS: "SIG_INPUTS";
    readonly SIG_ALL: "SIG_ALL";
};

// @public (undocumented)
export function signMintQuote(privkey: string, quote: string, blindedMessages: SerializedBlindedMessage[]): string;

// @public
export function signP2PKProof(proof: Proof, privateKey: PrivKey, message?: string): Proof;

// @public
export function signP2PKProofs(proofs: Proof[], privateKey: PrivKey | PrivKey[], logger?: Logger, message?: string): Proof[];

// @public
export function sortProofsById(proofs: Proof[]): Proof[];

// @public
export function splitAmount(value: AmountLike, keyset: Keys, split?: AmountLike[], order?: 'desc' | 'asc'): Amount[];

// @public
export function stripDleq(proofs: Proof[]): Array<Omit<Proof, 'dleq'>>;

// @public (undocumented)
export type SubscribeOpts = {
    signal?: AbortSignal;
};

// @public (undocumented)
export type SubscriptionCanceller = () => void;

// @public
export function sumProofs(proofs: Array<Pick<ProofLike, 'amount'>>): Amount;

// @public
export type SwapMethod = {
    method: string;
    unit: string;
    min_amount: AmountLike | null;
    max_amount: AmountLike | null;
    description?: boolean;
    options?: {
        description?: boolean;
        amountless?: boolean;
        confirmations?: number;
    };
};

// @public
export type SwapPreview = {
    amount: Amount;
    fees: Amount;
    keysetId: string;
    inputs: Proof[];
    sendOutputs?: OutputDataLike[];
    keepOutputs?: OutputDataLike[];
    unselectedProofs?: Proof[];
};

// @public
export type SwapRequest = {
    inputs: Proof[];
    outputs: SerializedBlindedMessage[];
};

// @public
export type SwapResponse = {
    signatures: SerializedBlindedSignature[];
};

// @public
export type SwapTransaction = {
    payload: SwapRequest;
    outputData: OutputDataLike[];
    keepVector: boolean[];
    sortedIndices: number[];
};

// @public
export type Token = {
    mint: string;
    proofs: Proof[];
    memo?: string;
    unit?: string;
};

// @public
export type TokenMetadata = {
    unit: string;
    memo?: string;
    mint: string;
    amount: Amount;
    incompleteProofs: Array<Omit<Proof, 'id'>>;
};

// @public (undocumented)
export type TokenResponse = {
    access_token?: string;
    token_type?: string;
    expires_in?: number;
    refresh_token?: string;
    id_token?: string;
    scope?: string;
    error?: string;
    error_description?: string;
};

// @public (undocumented)
export type UnblindedSignature = {
    C: WeierstrassPoint<bigint>;
    secret: Uint8Array;
    id: string;
};

// @public (undocumented)
export function unblindSignature(C_: WeierstrassPoint<bigint>, r: bigint, A: WeierstrassPoint<bigint>): WeierstrassPoint<bigint>;

// @public @deprecated (undocumented)
export function verifyDleqIfPresent(proof: Proof, keyset: HasKeysetKeys): boolean;

// @public (undocumented)
export const verifyDLEQProof: (dleq: DLEQ, B_: WeierstrassPoint<bigint>, C_: WeierstrassPoint<bigint>, A: WeierstrassPoint<bigint>) => boolean;

// @public (undocumented)
export const verifyDLEQProof_reblind: (secret: Uint8Array, // secret
dleq: DLEQ, C: WeierstrassPoint<bigint>, // unblinded e-cash signature point
A: WeierstrassPoint<bigint>) => boolean;

// @public
export function verifyHTLCHash(preimage: string, hash: string): boolean;

// @public
export function verifyHTLCSpendingConditions(proof: Proof, logger?: Logger, message?: string): P2PKVerificationResult;

// @public (undocumented)
export function verifyMintQuoteSignature(pubkey: string, quote: string, blindedMessages: SerializedBlindedMessage[], signature: string): boolean;

// @public
export function verifyP2PKSpendingConditions(proof: Proof, logger?: Logger, message?: string): P2PKVerificationResult;

// @public (undocumented)
export function verifyUnblindedSignature(proof: UnblindedSignature, privKey: Uint8Array): boolean;

// @public
export class Wallet {
    constructor(mint: Mint | string, options?: {
        unit?: string;
        authProvider?: AuthProvider;
        keysetId?: string;
        bip39seed?: Uint8Array;
        secretsPolicy?: SecretsPolicy;
        counterSource?: CounterSource;
        counterInit?: Record<string, number>;
        denominationTarget?: number;
        selectProofs?: SelectProofs;
        outputDataCreator?: OutputDataCreator;
        requireSigDleq?: boolean;
        logger?: Logger;
    });
    batchRestore(gapLimit?: number, batchSize?: number, counter?: number, keysetId?: string): Promise<{
        proofs: Proof[];
        lastCounterWithSignature?: number;
    }>;
    bindKeyset(id: string): void;
    checkMeltQuote<TRes extends MeltQuoteBaseResponse = MeltQuoteBaseResponse>(method: string, quote: string | Pick<TRes, 'quote'>, options?: {
        normalize?: (raw: Record<string, unknown>) => TRes;
    }): Promise<TRes>;
    checkMeltQuoteBolt11(quote: string | MeltQuoteBolt11Response): Promise<MeltQuoteBolt11Response>;
    checkMeltQuoteBolt12(quote: string): Promise<MeltQuoteBolt12Response>;
    checkMeltQuoteOnchain(quote: string): Promise<MeltQuoteOnchainResponse>;
    checkMintQuote<TRes extends MintQuoteBaseResponse = MintQuoteBaseResponse>(method: string, quote: string | Pick<TRes, 'quote'>, options?: {
        normalize?: (raw: Record<string, unknown>) => TRes;
    }): Promise<TRes>;
    checkMintQuoteBolt11(quote: string | MintQuoteBolt11Response): Promise<MintQuoteBolt11Response>;
    checkMintQuoteBolt12(quote: string): Promise<MintQuoteBolt12Response>;
    checkMintQuoteOnchain(quote: string): Promise<MintQuoteOnchainResponse>;
    checkProofsStates(proofs: Array<Pick<Proof, 'secret'>>): Promise<ProofState[]>;
    completeBatchMint(batchPreview: BatchMintPreview<Pick<MintQuoteBaseResponse, 'quote'>>): Promise<Proof[]>;
    completeMelt<TQuote extends Pick<MeltQuoteBaseResponse, 'quote'> = MeltQuoteBaseResponse>(meltPreview: MeltPreview<TQuote>, privkey?: string | string[], options?: CompleteMeltOptions): Promise<MeltProofsResponse<TQuote>>;
    // @deprecated (undocumented)
    completeMelt<TQuote extends Pick<MeltQuoteBaseResponse, 'quote'> = MeltQuoteBaseResponse>(meltPreview: MeltPreview<TQuote>, privkey?: string | string[], preferAsync?: boolean): Promise<MeltProofsResponse<TQuote>>;
    completeMint(mintPreview: MintPreview<Pick<MintQuoteBaseResponse, 'quote'>>): Promise<Proof[]>;
    completeSwap(swapPreview: SwapPreview, privkey?: string | string[]): Promise<SendResponse>;
    readonly counters: WalletCounters;
    createLockedMintQuote(amount: AmountLike, pubkey: string, description?: string): Promise<MintQuoteBolt11Response>;
    createMeltChangeProofs(outputData: OutputDataLike[], changeSigs: SerializedBlindedSignature[]): Proof[];
    createMeltQuote<TRes extends MeltQuoteBaseResponse = MeltQuoteBaseResponse>(method: string, payload: Record<string, unknown>, options?: {
        normalize?: (raw: Record<string, unknown>) => TRes;
    }): Promise<TRes>;
    createMeltQuoteBolt11(invoice: string, amountMsat?: AmountLike): Promise<MeltQuoteBolt11Response>;
    createMeltQuoteBolt12(offer: string, amountMsat?: AmountLike): Promise<MeltQuoteBolt12Response>;
    createMeltQuoteOnchain(address: string, amount: AmountLike): Promise<MeltQuoteOnchainResponse>;
    createMintQuote<TRes extends MintQuoteBaseResponse = MintQuoteBaseResponse>(method: string, payload: Record<string, unknown>, options?: {
        normalize?: (raw: Record<string, unknown>) => TRes;
    }): Promise<TRes>;
    createMintQuoteBolt11(amount: AmountLike, description?: string): Promise<MintQuoteBolt11Response>;
    createMintQuoteBolt12(pubkey: string, options?: {
        amount?: AmountLike;
        description?: string;
    }): Promise<MintQuoteBolt12Response>;
    createMintQuoteOnchain(pubkey: string): Promise<MintQuoteOnchainResponse>;
    createMultiPathMeltQuote(invoice: string, millisatPartialAmount: AmountLike): Promise<MeltQuoteBolt11Response>;
    decodeToken(token: string): Token;
    defaultOutputType(): OutputType;
    getFeesForKeyset(nInputs: number, keysetId: string): Amount;
    getFeesForProofs(proofs: Array<Pick<Proof, 'id'>>): Amount;
    getKeyset(id?: string): Keyset;
    getMintInfo(): MintInfo;
    groupProofsByState<T extends ProofLike = Proof>(proofs: T[]): Promise<{
        unspent: T[];
        pending: T[];
        spent: T[];
    }>;
    get keyChain(): KeyChain;
    get keysetId(): string;
    loadMint(forceRefresh?: boolean): Promise<void>;
    loadMintFromCache(mintInfo: GetInfoResponse, cache: KeyChainCache): void;
    // (undocumented)
    get logger(): Logger;
    maxSpendableAfterFees(proofs: ProofLike[], feeReserve?: AmountLike): Amount;
    meltProofs<TQuote extends Pick<MeltQuoteBaseResponse, 'amount' | 'quote'>>(method: string, meltQuote: TQuote, proofsToSend: ProofLike[], config?: MeltProofsConfig, outputType?: OutputType): Promise<MeltProofsResponse<TQuote>>;
    meltProofsBolt11(meltQuote: MeltQuoteBolt11Response, proofsToSend: ProofLike[], config?: MeltProofsConfig, outputType?: OutputType): Promise<MeltProofsResponse<MeltQuoteBolt11Response>>;
    meltProofsBolt12(meltQuote: MeltQuoteBolt12Response, proofsToSend: ProofLike[], config?: MeltProofsConfig, outputType?: OutputType): Promise<MeltProofsResponse<MeltQuoteBolt12Response>>;
    meltProofsOnchain(meltQuote: MeltQuoteOnchainResponse, proofsToSend: ProofLike[], feeIndex: number, config?: MeltProofsConfig): Promise<MeltProofsResponse<MeltQuoteOnchainResponse>>;
    readonly mint: Mint;
    mintProofs<TQuote extends Pick<MintQuoteBaseResponse, 'quote'>>(method: string, amount: AmountLike, quote: TQuote, config?: MintProofsConfig, outputType?: OutputType): Promise<Proof[]>;
    mintProofsBolt11(amount: AmountLike, quote: string | MintQuoteBolt11Response, config?: MintProofsConfig, outputType?: OutputType): Promise<Proof[]>;
    mintProofsBolt12(amount: AmountLike, quote: MintQuoteBolt12Response, privkey: string, config?: {
        keysetId?: string;
    }, outputType?: OutputType): Promise<Proof[]>;
    mintProofsOnchain(amount: AmountLike, quote: MintQuoteOnchainResponse, privkey: string, config?: {
        keysetId?: string;
    }, outputType?: OutputType): Promise<Proof[]>;
    readonly on: WalletEvents;
    readonly ops: WalletOps;
    prepareBatchMint<TQuote extends Pick<MintQuoteBaseResponse, 'quote' | 'pubkey'>>(method: string, entries: Array<{
        amount: AmountLike;
        quote: TQuote;
    }>, config?: MintProofsConfig, outputType?: OutputType): Promise<BatchMintPreview<TQuote>>;
    prepareMelt<TQuote extends Pick<MeltQuoteBaseResponse, 'amount' | 'quote'>>(method: string, meltQuote: TQuote, proofsToSend: ProofLike[], config?: PrepareMeltConfig, outputType?: OutputType): Promise<MeltPreview<TQuote>>;
    prepareMint<TQuote extends Pick<MintQuoteBaseResponse, 'quote'>>(method: string, amount: AmountLike, quote: TQuote, config?: MintProofsConfig, outputType?: OutputType): Promise<MintPreview<TQuote>>;
    prepareSwapToReceive(token: Token | string | ProofLike[], config?: ReceiveConfig, outputType?: OutputType): Promise<SwapPreview>;
    prepareSwapToSend(amount: AmountLike, proofs: ProofLike[], config?: SendConfig, outputConfig?: OutputConfig): Promise<SwapPreview>;
    receive(token: Token | string | ProofLike[], config?: ReceiveConfig, outputType?: OutputType): Promise<Proof[]>;
    restore(start: number, count: number, config?: RestoreConfig): Promise<{
        proofs: Proof[];
        lastCounterWithSignature?: number;
    }>;
    selectProofsToSend(proofs: ProofLike[], amountToSend: AmountLike, includeFees?: boolean, exactMatch?: boolean): SendResponse;
    send(amount: AmountLike, proofs: ProofLike[], config?: SendConfig, outputConfig?: OutputConfig): Promise<SendResponse>;
    sendOffline(amount: AmountLike, proofs: ProofLike[], config?: SendOfflineConfig): SendResponse;
    signP2PKProofs(proofs: ProofLike[], privkey: string | string[], outputData?: OutputDataLike[], quoteId?: string): Proof[];
    get unit(): string;
    withKeyset(id: string, opts?: {
        counterSource?: CounterSource;
    }): Wallet;
}

// @public
export class WalletCounters {
    constructor(src: CounterSource);
    advanceToAtLeast(keysetId: string, minNext: number): Promise<void>;
    peekNext(keysetId: string): Promise<number>;
    setNext(keysetId: string, next: number): Promise<void>;
    snapshot(): Promise<Record<string, number>>;
}

// @public (undocumented)
export class WalletEvents {
    constructor(wallet: Wallet);
    countersReserved(cb: (payload: OperationCounters) => void, opts?: SubscribeOpts): SubscriptionCanceller;
    group(): SubscriptionCanceller & {
        add: (c: CancellerLike) => CancellerLike;
        cancelled: boolean;
    };
    meltQuotePaid(id: string, cb: (p: MeltQuoteBolt11Response) => void, err: (e: Error) => void, opts?: SubscribeOpts): Promise<SubscriptionCanceller>;
    meltQuoteUpdates(ids: string[], cb: (p: MeltQuoteBolt11Response) => void, err: (e: Error) => void, opts?: SubscribeOpts): Promise<SubscriptionCanceller>;
    mintQuotePaid(id: string, cb: (p: MintQuoteBolt11Response) => void, err: (e: Error) => void, opts?: SubscribeOpts): Promise<SubscriptionCanceller>;
    mintQuoteUpdates(ids: string[], cb: (p: MintQuoteBolt11Response) => void, err: (e: Error) => void, opts?: SubscribeOpts): Promise<SubscriptionCanceller>;
    onceAnyMintPaid(ids: string[], opts?: {
        signal?: AbortSignal;
        timeoutMs?: number;
        failOnError?: boolean;
    }): Promise<{
        id: string;
        quote: MintQuoteBolt11Response;
    }>;
    onceMeltPaid(id: string, opts?: {
        signal?: AbortSignal;
        timeoutMs?: number;
    }): Promise<MeltQuoteBolt11Response>;
    onceMintPaid(id: string, opts?: {
        signal?: AbortSignal;
        timeoutMs?: number;
    }): Promise<MintQuoteBolt11Response>;
    proofStatesStream<P extends ProofLike = Proof>(proofs: P[], opts?: {
        signal?: AbortSignal;
        maxBuffer?: number;
        drop?: 'oldest' | 'newest';
        onDrop?: (payload: ProofState & {
            proof: P;
        }) => void;
    }): AsyncIterable<ProofState & {
        proof: P;
    }>;
    proofStateUpdates<T extends ProofLike = Proof>(proofs: T[], cb: (payload: ProofState & {
        proof: T;
    }) => void, err: (e: Error) => void, opts?: SubscribeOpts): Promise<SubscriptionCanceller>;
}

// @public
export class WalletOps {
    constructor(wallet: Wallet);
    // (undocumented)
    meltBolt11(quote: MeltQuoteBolt11Response, proofs: ProofLike[]): MeltBuilder<MeltQuoteBolt11Response>;
    // (undocumented)
    meltBolt12(quote: MeltQuoteBolt12Response, proofs: ProofLike[]): MeltBuilder<MeltQuoteBolt11Response>;
    meltOnchain(quote: MeltQuoteOnchainResponse, proofs: ProofLike[]): MeltOnchainBuilder;
    // (undocumented)
    mintBolt11(amount: AmountLike, quote: MintQuoteFor<'bolt11'>): MintBuilder<"bolt11", true>;
    // (undocumented)
    mintBolt12(amount: AmountLike, quote: MintQuoteFor<'bolt12'>): MintBuilder<"bolt12", false>;
    mintOnchain(amount: AmountLike, quote: MintQuoteFor<'onchain'>): MintBuilder<"onchain", false>;
    // (undocumented)
    receive(token: Token | string | ProofLike[]): ReceiveBuilder;
    // (undocumented)
    send(amount: AmountLike, proofs: ProofLike[]): SendBuilder;
}

// @public
export type WebSocketSupport = {
    method: string;
    unit: string;
    commands: string[];
};

// @public (undocumented)
export class WSConnection {
    constructor(url: string, logger?: Logger);
    // (undocumented)
    get activeSubscriptions(): string[];
    // (undocumented)
    addSubListener<TPayload = unknown>(subId: string, callback: (payload: TPayload) => void): void;
    cancelSubscription<TPayload = unknown>(subId: string, callback: (payload: TPayload) => void, errorCallback?: (e: Error) => void): void;
    // (undocumented)
    close(): void;
    // (undocumented)
    connect(timeoutMs?: number): Promise<void>;
    // (undocumented)
    createSubscription<TPayload = unknown>(params: Omit<JsonRpcReqParams, 'subId'>, callback: (payload: TPayload) => void, errorCallback: (e: Error) => void): string;
    // (undocumented)
    ensureConnection(timeoutMs?: number): Promise<void>;
    // (undocumented)
    onClose(callback: (e: CloseEvent) => void): void;
    // (undocumented)
    sendRequest(method: 'subscribe', params: JsonRpcReqParams): void;
    // (undocumented)
    sendRequest(method: 'unsubscribe', params: {
        subId: string;
    }): void;
    // (undocumented)
    setLogger(logger: Logger): void;
    // (undocumented)
    readonly url: URL;
}

// (No @packageDocumentation comment for this package)

```
