pai
    Preparing search index...

    Function autoTopup

    • Buys more credit only when the key's balance is under the threshold.

      Parameters

      • apiKey: string
      • env: Env
      • opts: {
            amount_usd: number;
            below_usd: number;
            coin: "usdc" | "sol" | "usdcsol";
            onStatus?: (s: string) => void;
            sleep?: (ms: number) => Promise<void>;
            wallet?: string;
        }

      Returns Promise<AutoTopupResult>