UNPKG

@funkit/connect

Version:

Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.

22 lines (21 loc) 1.18 kB
import { type LightningQuoteResponse } from '@funkit/api-base'; import { type Address } from 'viem'; import type { GeneralWalletContextProps } from '../../providers/GeneralWalletProvider'; export declare function usdToSats(usd: number | undefined, btcPrice: number | undefined): bigint | undefined; type UseLightningQuoteParams = { depositAddr: Address | undefined; walletAddress: GeneralWalletContextProps['walletAddress']; targetChain: string | undefined; targetAsset: Address | undefined; fiatAmount: number | undefined; }; /** * Holds the displayed invoice until its real `expiresAtMs`, then reveals the * prefetched replacement. `useLightningQuote` prefetches the next invoice early, * so revealing it on arrival would reset the QR/timer while the current invoice * is still valid. * */ export declare function useDeferredQuote(latestQuote: LightningQuoteResponse | undefined): LightningQuoteResponse | undefined; export declare const useLightningQuote: ({ depositAddr, walletAddress, targetChain, targetAsset, fiatAmount, }: UseLightningQuoteParams) => import("@tanstack/react-query").UseQueryResult<LightningQuoteResponse, Error>; export {};