UNPKG

@funkit/connect

Version:

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

74 lines (73 loc) 2.65 kB
import type { UseBluvoFlowHook } from '@bluvo/react'; import { type GenericFormOfPayment } from '@funkit/api-base'; import React from 'react'; export type BluvoQuote = UseBluvoFlowHook['quote']; export type BluvoWithdrawableBalance = UseBluvoFlowHook['walletBalances']; export type BluvoWithdrawal = UseBluvoFlowHook['withdrawal']; export type BluvoBrokerageMinMax = { minUsd: number; maxUsd: number; }; export declare enum BluvoExchangeType { Coinbase = "coinbase", Binance = "binance", Gemini = "gemini", Kraken = "kraken", Gate = "gate" } export type BluvoExchangeInfo = { icon: (size: number) => React.JSX.Element | null; name: string; }; export declare enum BluvoExchangeStatus { Live = "live", Offline = "offline", Maintenance = "maintenance", ComingSoon = "coming_soon" } export declare const BLUVO_MIN_DEPOSIT_BY_CUSTOMER: Record<string, number>; export declare const SUPPORTED_EXCHANGES: readonly [{ readonly exchange: BluvoExchangeType.Coinbase; readonly status: BluvoExchangeStatus.Live; }, { readonly exchange: BluvoExchangeType.Binance; readonly status: BluvoExchangeStatus.ComingSoon; }, { readonly exchange: BluvoExchangeType.Kraken; readonly status: BluvoExchangeStatus.ComingSoon; }, { readonly exchange: BluvoExchangeType.Gemini; readonly status: BluvoExchangeStatus.ComingSoon; }, { readonly exchange: BluvoExchangeType.Gate; readonly status: BluvoExchangeStatus.ComingSoon; }]; export declare const BLUVO_EXCHANGES: Readonly<Record<BluvoExchangeType, BluvoExchangeInfo>>; export declare function getExchangeIcon(brokerType: BluvoExchangeType, size: number): React.JSX.Element | null; export declare function getExchangeName(brokerType: BluvoExchangeType): string; export declare enum BrokerageKind { BLUVO = "bluvo", SWAPPED = "swapped" } export type BrokerageOption = { name: string; icon: React.ReactNode; status: BluvoExchangeStatus; hasActiveConnection: boolean; } & ({ kind: BrokerageKind.BLUVO; exchange: BluvoExchangeType; } | { kind: BrokerageKind.SWAPPED; fop: GenericFormOfPayment; }); export interface BluvoExchangeOptionInput { exchange: BluvoExchangeType; exchangeName: string; exchangeIcon: React.ReactNode; status: BluvoExchangeStatus; hasActiveConnection: boolean; } export declare function bluvoExchangeToBrokerageOption(option: BluvoExchangeOptionInput): BrokerageOption; export declare function fopToBrokerageOption(fop: GenericFormOfPayment, iconSize: number): BrokerageOption; export declare function brokerageOptionKey(option: BrokerageOption): string;