musdQueryKeys: {
    balance: (
        chainId: number,
        address: `0x${string}`,
    ) => readonly ["musd", number, "balance", `0x${string}`];
    borrowingPower: (
        chainId: number,
        collateral: bigint,
    ) => readonly ["musd", number, "borrowingPower", string];
    oraclePrice: (chainId: number) => readonly ["musd", number, "oraclePrice"];
    trove: (
        chainId: number,
        address: `0x${string}`,
    ) => readonly ["musd", number, "trove", `0x${string}`];
} = ...

Stable TanStack query keys (chainId + method + args). Hooks that share a key dedupe to a single fetch (e.g. useTrove / useHealthFactor / useLiquidationPrice for one address differ only by select). bigints are stringified, TanStack hashes keys with JSON.stringify, which throws on bigint.

Type declaration

  • Readonlybalance: (
        chainId: number,
        address: `0x${string}`,
    ) => readonly ["musd", number, "balance", `0x${string}`]

    Query key for an MUSD balance read.

  • ReadonlyborrowingPower: (
        chainId: number,
        collateral: bigint,
    ) => readonly ["musd", number, "borrowingPower", string]

    Query key for a borrowing-power preview (collateral stringified, keys are JSON-hashed).

  • ReadonlyoraclePrice: (chainId: number) => readonly ["musd", number, "oraclePrice"]

    Query key for the oracle BTC/USD price.

  • Readonlytrove: (
        chainId: number,
        address: `0x${string}`,
    ) => readonly ["musd", number, "trove", `0x${string}`]

    Query key for a Trove read (shared by useTrove/useHealthFactor/useLiquidationPrice).