@daimo/pay
Version:
Seamless crypto payments. Onboard users from any chain, any coin into your app with one click.
66 lines (60 loc) • 2.27 kB
TypeScript
import React$1, { ReactNode } from 'react';
type Hash = `0x${string}`;
type CustomAvatarProps = {
address?: Hash | undefined;
ensName?: string | undefined;
ensImage?: string;
size: number;
radius: number;
};
/** Icon for an Ethereum address. Supports ENS names and avatars. */
declare const Avatar: React$1.FC<{
address?: Hash | undefined;
name?: string | undefined;
size?: number;
radius?: number;
}>;
type Languages$1 = "ar-AE" | "en-US" | "ee-EE" | "es-ES" | "fa-IR" | "fr-FR" | "ja-JP" | "pt-BR" | "zh-CN" | "ca-AD" | "ru-RU" | "zh-CN" | "tr-TR" | "vi-VN";
type Languages = Languages$1;
type Theme = "auto" | "web95" | "retro" | "soft" | "midnight" | "minimal" | "rounded" | "nouns";
type Mode = "light" | "dark" | "auto";
type CustomTheme = any;
type All = {
theme?: Theme;
mode?: Mode;
customTheme?: CustomTheme;
lang?: Languages;
};
/** Global options, across all pay buttons and payments. */
type DaimoPayContextOptions = {
language?: Languages;
hideBalance?: boolean;
hideTooltips?: boolean;
hideQuestionMarkCTA?: boolean;
hideRecentBadge?: boolean;
/** Avoids layout shift when the DaimoPay modal is open by adding padding to the body */
avoidLayoutShift?: boolean;
/** Automatically embeds Google Font of the current theme. Does not work with custom themes */
embedGoogleFonts?: boolean;
truncateLongENSAddress?: boolean;
reducedMotion?: boolean;
disclaimer?: ReactNode | string;
bufferPolyfill?: boolean;
customAvatar?: React.FC<CustomAvatarProps>;
initialChainId?: number;
enforceSupportedChains?: boolean;
ethereumOnboardingUrl?: string;
walletOnboardingUrl?: string;
/** Blur the background when the modal is open */
overlayBlur?: number;
/** Disable mobile wallet injector detection */
disableMobileInjector?: boolean;
};
/** Modal UI options, set on the pay button triggering that modal. */
type DaimoPayModalOptions = {
closeOnSuccess?: boolean;
resetOnSuccess?: boolean;
connectedWalletOnly?: boolean;
};
export { Avatar as A };
export type { CustomTheme as C, DaimoPayContextOptions as D, Languages as L, Mode as M, Theme as T, DaimoPayModalOptions as a, CustomAvatarProps as b, All as c };