@use-glyph/sdk-react 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +17 -0
- package/README.md +152 -0
- package/dist/EIP1193Strategy.js +116 -0
- package/dist/PrivyStrategy.js +92 -0
- package/dist/assets/sdk-react.css +1 -0
- package/dist/index.js +17858 -0
- package/dist/sdk-react.es.js +28 -0
- package/dist/sdk-react.umd.js +151 -0
- package/dist/types/assets/svg/APEIcon.d.ts +2 -0
- package/dist/types/assets/svg/APE_ETH.d.ts +1 -0
- package/dist/types/assets/svg/APE_USD.d.ts +1 -0
- package/dist/types/assets/svg/APE_WAPE.d.ts +1 -0
- package/dist/types/assets/svg/ActivityIcon.d.ts +5 -0
- package/dist/types/assets/svg/ApechainIcon.d.ts +1 -0
- package/dist/types/assets/svg/ApecoinIcon.d.ts +2 -0
- package/dist/types/assets/svg/BackIcon.d.ts +2 -0
- package/dist/types/assets/svg/CaretDownIcon.d.ts +1 -0
- package/dist/types/assets/svg/CopyIcon.d.ts +5 -0
- package/dist/types/assets/svg/EditIcon.d.ts +2 -0
- package/dist/types/assets/svg/FailureIcon.d.ts +1 -0
- package/dist/types/assets/svg/GlyphIcon.d.ts +2 -0
- package/dist/types/assets/svg/HelpIcon.d.ts +1 -0
- package/dist/types/assets/svg/HomeIcon.d.ts +2 -0
- package/dist/types/assets/svg/InfoIcon.d.ts +1 -0
- package/dist/types/assets/svg/LinkIcon.d.ts +1 -0
- package/dist/types/assets/svg/LoadingCircleIcon..d.ts +2 -0
- package/dist/types/assets/svg/NetworkIcon.d.ts +1 -0
- package/dist/types/assets/svg/NoTokenIcon.d.ts +1 -0
- package/dist/types/assets/svg/PlusSign.d.ts +1 -0
- package/dist/types/assets/svg/ProfileViewPattern.d.ts +2 -0
- package/dist/types/assets/svg/QRIcon.d.ts +1 -0
- package/dist/types/assets/svg/SuccessIcon.d.ts +1 -0
- package/dist/types/assets/svg/SuccessViewPattern.d.ts +2 -0
- package/dist/types/assets/svg/TokensIcon.d.ts +2 -0
- package/dist/types/assets/svg/TxReceiveIcon.d.ts +1 -0
- package/dist/types/assets/svg/TxSendIcon.d.ts +1 -0
- package/dist/types/assets/svg/WalletIcon.d.ts +1 -0
- package/dist/types/assets/svg/WalletsTabFilledIcon.d.ts +2 -0
- package/dist/types/assets/svg/WalletsTabOutlinedIcon.d.ts +2 -0
- package/dist/types/components/GlyphWidget.d.ts +3 -0
- package/dist/types/components/GlyphWidgetButton.d.ts +3 -0
- package/dist/types/components/LoginButton.d.ts +2 -0
- package/dist/types/components/LogoutButton.d.ts +2 -0
- package/dist/types/components/SignUpButton.d.ts +2 -0
- package/dist/types/components/shared/ActivityRow.d.ts +10 -0
- package/dist/types/components/shared/CopyButton.d.ts +10 -0
- package/dist/types/components/shared/LinkWithIcon.d.ts +4 -0
- package/dist/types/components/shared/UserAvatar.d.ts +8 -0
- package/dist/types/components/shared/WalletViewFooterNav.d.ts +8 -0
- package/dist/types/components/shared/WalletViewHeader.d.ts +11 -0
- package/dist/types/components/shared/WalletViewTemplate.d.ts +10 -0
- package/dist/types/components/shared/skeletons/ActivityRowSkeleton.d.ts +1 -0
- package/dist/types/components/ui/accordion.d.ts +7 -0
- package/dist/types/components/ui/button.d.ts +15 -0
- package/dist/types/components/ui/drawer.d.ts +27 -0
- package/dist/types/components/ui/input-helper.d.ts +8 -0
- package/dist/types/components/ui/input.d.ts +26 -0
- package/dist/types/components/ui/popover.d.ts +6 -0
- package/dist/types/components/ui/select.d.ts +13 -0
- package/dist/types/components/ui/skeleton.d.ts +2 -0
- package/dist/types/components/ui/sonner.d.ts +4 -0
- package/dist/types/components/ui/tooltip-element.d.ts +14 -0
- package/dist/types/components/ui/tooltip.d.ts +8 -0
- package/dist/types/components/widget/UnsupportedChainOverlay.d.ts +5 -0
- package/dist/types/components/widget/Wallet.d.ts +4 -0
- package/dist/types/components/widget/WalletActivityTab.d.ts +4 -0
- package/dist/types/components/widget/WalletFundFailedView.d.ts +8 -0
- package/dist/types/components/widget/WalletFundPendingView.d.ts +8 -0
- package/dist/types/components/widget/WalletFundSuccessView.d.ts +8 -0
- package/dist/types/components/widget/WalletFundView.d.ts +8 -0
- package/dist/types/components/widget/WalletHomeTab.d.ts +6 -0
- package/dist/types/components/widget/WalletLinkedAccountsTab.d.ts +1 -0
- package/dist/types/components/widget/WalletMainView.d.ts +12 -0
- package/dist/types/components/widget/WalletProfileView.d.ts +4 -0
- package/dist/types/components/widget/WalletReceiveView.d.ts +4 -0
- package/dist/types/components/widget/WalletSendFundEnterAddressView.d.ts +12 -0
- package/dist/types/components/widget/WalletSendFundFailedView.d.ts +10 -0
- package/dist/types/components/widget/WalletSendFundPendingView.d.ts +13 -0
- package/dist/types/components/widget/WalletSendFundSuccessView.d.ts +10 -0
- package/dist/types/components/widget/WalletSendFundView.d.ts +23 -0
- package/dist/types/components/widget/WalletTokensTab.d.ts +1 -0
- package/dist/types/components/widget/WidgetGradient.d.ts +4 -0
- package/dist/types/context/GlyphContext.d.ts +18 -0
- package/dist/types/context/GlyphProvider.d.ts +3 -0
- package/dist/types/context/GlyphUserDataContext.d.ts +9 -0
- package/dist/types/context/GlyphUserDataProvider.d.ts +5 -0
- package/dist/types/context/GlyphViewContext.d.ts +12 -0
- package/dist/types/context/GlyphViewProvider.d.ts +4 -0
- package/dist/types/context/strategies/EIP1193Strategy.d.ts +4 -0
- package/dist/types/context/strategies/LoadingStrategy.d.ts +5 -0
- package/dist/types/context/strategies/PrivyStrategy.d.ts +3 -0
- package/dist/types/hooks/useActivity.d.ts +30 -0
- package/dist/types/hooks/useBalances.d.ts +4 -0
- package/dist/types/hooks/useGlyph.d.ts +49 -0
- package/dist/types/hooks/useGlyphApi.d.ts +3 -0
- package/dist/types/hooks/useGlyphFunding.d.ts +17 -0
- package/dist/types/hooks/useGlyphFundingApi.d.ts +45 -0
- package/dist/types/hooks/useGlyphView.d.ts +3 -0
- package/dist/types/hooks/useMediaQuery.d.ts +2 -0
- package/dist/types/hooks/useNativeGlyphConnection.d.ts +11 -0
- package/dist/types/index.d.ts +20 -0
- package/dist/types/lib/constants.d.ts +45 -0
- package/dist/types/lib/eip1193/GlyphWalletProvider.d.ts +40 -0
- package/dist/types/lib/eip1193/glyphWalletConnector.d.ts +35 -0
- package/dist/types/lib/eip1193/glyphWalletRK.d.ts +18 -0
- package/dist/types/lib/intl.d.ts +2 -0
- package/dist/types/lib/numericInputs.d.ts +2 -0
- package/dist/types/lib/popup.d.ts +11 -0
- package/dist/types/lib/privy/GlyphPrivyProvider.d.ts +25 -0
- package/dist/types/lib/privy/InjectWagmiConnector.d.ts +5 -0
- package/dist/types/lib/privy/usePrivyCrossAppProvider.d.ts +15 -0
- package/dist/types/lib/providers.d.ts +6889 -0
- package/dist/types/lib/svg.d.ts +4 -0
- package/dist/types/lib/utils.d.ts +128 -0
- package/dist/types/types/GlyphWidgetTypes.d.ts +90 -0
- package/dist/types/types/index.d.ts +1 -0
- package/package.json +98 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function APE_ETH(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function APE_USD(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function WAPEIcon(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ApechainIcon(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CaretDownIcon(props: React.SVGProps<SVGSVGElement>): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function FailureIcon(props: React.SVGProps<SVGSVGElement>): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function HelpIcon(props: React.SVGProps<SVGSVGElement>): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function InfoIcon(props: React.SVGProps<SVGSVGElement>): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function LinkIcon(props: React.SVGProps<SVGSVGElement>): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NetworkIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function NoTokenIcon(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function PlusSign(props: React.SVGProps<SVGSVGElement>): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function QRIcon(props: React.SVGProps<SVGSVGElement>): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SuccessIcon(props: React.SVGProps<SVGSVGElement>): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function TxReceiveIcon(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function TxSendIcon(props: React.SVGProps<SVGSVGElement>): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const WalletIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface CopyButtonProps {
|
|
3
|
+
text: string;
|
|
4
|
+
textToCopy?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
textClassName?: string;
|
|
7
|
+
iconClassName?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: React.NamedExoticComponent<CopyButtonProps>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { WalletMainViewTab } from '../../lib/constants';
|
|
3
|
+
interface WalletViewFooterNavProps {
|
|
4
|
+
tab: WalletMainViewTab;
|
|
5
|
+
setTab: (tab: WalletMainViewTab) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: React.NamedExoticComponent<WalletViewFooterNavProps>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface WalletViewHeaderProps {
|
|
3
|
+
fullScreenHeader?: {
|
|
4
|
+
title?: string;
|
|
5
|
+
onBackClick?: () => void;
|
|
6
|
+
onCloseClick?: () => void;
|
|
7
|
+
};
|
|
8
|
+
onProfileClick?: () => void;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: React.NamedExoticComponent<WalletViewHeaderProps>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type SelectedView = "main" | "add-funds";
|
|
2
|
+
export type WalletScreenProps = {
|
|
3
|
+
header?: React.ReactNode;
|
|
4
|
+
content: React.ReactNode;
|
|
5
|
+
footer?: React.ReactNode;
|
|
6
|
+
footerCols?: boolean;
|
|
7
|
+
mainFooter?: boolean;
|
|
8
|
+
setView?: (view: SelectedView) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare function WalletViewTemplate({ mainFooter, ...props }: WalletScreenProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ActivityRowSkeleton(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const buttonVariantsClasses: (props?: ({
|
|
4
|
+
variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "tertiary" | "ghost" | "cube" | null | undefined;
|
|
5
|
+
size?: "icon" | "default" | "login" | "cube" | "sm" | "lg" | null | undefined;
|
|
6
|
+
shadow?: boolean | null | undefined;
|
|
7
|
+
scale?: boolean | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariantsClasses> {
|
|
10
|
+
asChild?: boolean;
|
|
11
|
+
shadow?: boolean;
|
|
12
|
+
scale?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
export { Button, buttonVariantsClasses as buttonVariants };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Drawer as DrawerPrimitive } from 'vaul';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const Drawer: {
|
|
4
|
+
({ shouldScaleBackground, repositionInputs, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
declare const DrawerTrigger: React.ForwardRefExoticComponent<import('@radix-ui/react-dialog').DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
declare const DrawerPortal: typeof import('vaul').Portal;
|
|
9
|
+
declare const DrawerClose: React.ForwardRefExoticComponent<import('@radix-ui/react-dialog').DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
declare const DrawerHandle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
11
|
+
preventCycle?: boolean | undefined;
|
|
12
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const DrawerOverlay: React.ForwardRefExoticComponent<Omit<Omit<import('@radix-ui/react-dialog').DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<import('@radix-ui/react-dialog').DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
15
|
+
childrenWrapperClassName?: string;
|
|
16
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const DrawerHeader: {
|
|
18
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
declare const DrawerFooter: {
|
|
22
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
25
|
+
declare const DrawerTitle: React.ForwardRefExoticComponent<Omit<import('@radix-ui/react-dialog').DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
26
|
+
declare const DrawerDescription: React.ForwardRefExoticComponent<Omit<import('@radix-ui/react-dialog').DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
27
|
+
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DrawerHandle };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
label?: {
|
|
4
|
+
value: string;
|
|
5
|
+
htmlFor: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
floatingLabel?: boolean;
|
|
8
|
+
};
|
|
9
|
+
leadingIcon?: {
|
|
10
|
+
element: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
trailingIcon?: {
|
|
14
|
+
element: React.ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
parentClassName?: string;
|
|
18
|
+
bodyClassName?: string;
|
|
19
|
+
supportingText?: {
|
|
20
|
+
value: string;
|
|
21
|
+
isError?: boolean;
|
|
22
|
+
className?: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
26
|
+
export { Input };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { Popover, PopoverContent, PopoverTrigger };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
|
+
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
4
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
6
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
declare function TooltipElement({ contentClassName, triggerClassName, description, children, side, align, defaultOpen, open, onOpenChange, stopPropagation }: {
|
|
3
|
+
contentClassName?: string;
|
|
4
|
+
triggerClassName?: string;
|
|
5
|
+
description: React.ReactNode;
|
|
6
|
+
stopPropagation: boolean;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
side?: "bottom" | "top" | "right" | "left" | undefined;
|
|
9
|
+
align?: "center" | "end" | "start" | undefined;
|
|
10
|
+
defaultOpen?: boolean;
|
|
11
|
+
open?: boolean | null;
|
|
12
|
+
onOpenChange?: ((open: boolean) => void) | undefined;
|
|
13
|
+
}): React.ReactElement;
|
|
14
|
+
export default TooltipElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
4
|
+
declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
5
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const TooltipArrow: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
7
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TooltipArrow };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { INTERNAL_GRADIENT_TYPE } from '../../lib/constants';
|
|
2
|
+
export declare const Wallet: import('react').MemoExoticComponent<({ setGradientType }: {
|
|
3
|
+
setGradientType: React.Dispatch<React.SetStateAction<INTERNAL_GRADIENT_TYPE | undefined>>;
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { INTERNAL_GRADIENT_TYPE } from '../../lib/constants';
|
|
2
|
+
export type WalletFundProps = {
|
|
3
|
+
onBack: () => void;
|
|
4
|
+
onEnd: () => void;
|
|
5
|
+
onShowActivity: () => void;
|
|
6
|
+
setGradientType: React.Dispatch<React.SetStateAction<INTERNAL_GRADIENT_TYPE | undefined>>;
|
|
7
|
+
};
|
|
8
|
+
export declare function WalletFundView({ onBack, onEnd, onShowActivity, setGradientType }: WalletFundProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function WalletLinkedAccountsTab(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { INTERNAL_GRADIENT_TYPE, WalletMainViewTab } from '../../lib/constants';
|
|
2
|
+
export type WalletMainProps = {
|
|
3
|
+
onProfileClick: () => void;
|
|
4
|
+
onAddFunds: () => void;
|
|
5
|
+
onSendFunds: () => void;
|
|
6
|
+
onReceive: () => void;
|
|
7
|
+
activeMainViewScreen: WalletMainViewTab;
|
|
8
|
+
setActiveMainViewScreen: (screen: WalletMainViewTab) => void;
|
|
9
|
+
expandFirstActivityRow?: boolean;
|
|
10
|
+
setGradientType: React.Dispatch<React.SetStateAction<INTERNAL_GRADIENT_TYPE | undefined>>;
|
|
11
|
+
};
|
|
12
|
+
export declare function WalletMainView({ onAddFunds, onSendFunds, onReceive, onProfileClick, activeMainViewScreen, setActiveMainViewScreen, expandFirstActivityRow, setGradientType }: WalletMainProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SendView } from '../../lib/constants';
|
|
3
|
+
interface WalletSendFundEnterAddressViewProps {
|
|
4
|
+
onBack: () => void;
|
|
5
|
+
setView: (view: SendView) => void;
|
|
6
|
+
setRecipientAddress: (address: string) => void;
|
|
7
|
+
setRecipientAddressError: (error: string) => void;
|
|
8
|
+
recipientAddress: string;
|
|
9
|
+
recipientAddressError: string | null;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: React.NamedExoticComponent<WalletSendFundEnterAddressViewProps>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface WalletSendFundFailedViewProps {
|
|
3
|
+
onEnd: () => void;
|
|
4
|
+
onShowActivity: () => void;
|
|
5
|
+
txHash: string | undefined;
|
|
6
|
+
txBlockExplorerUrl: string | undefined;
|
|
7
|
+
txBlockExplorerName: string | undefined;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: React.NamedExoticComponent<WalletSendFundFailedViewProps>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SendFundQuote } from './WalletSendFundView';
|
|
3
|
+
interface WalletSendFundPendingViewProps {
|
|
4
|
+
onBack: () => void;
|
|
5
|
+
txHash: string | undefined;
|
|
6
|
+
txBlockExplorerUrl: string | undefined;
|
|
7
|
+
txBlockExplorerName: string | undefined;
|
|
8
|
+
quote: SendFundQuote;
|
|
9
|
+
tokenSymbol: string;
|
|
10
|
+
TokenIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: React.NamedExoticComponent<WalletSendFundPendingViewProps>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SendFundQuote } from './WalletSendFundView';
|
|
3
|
+
interface WalletSendFundSuccessViewProps {
|
|
4
|
+
onEnd: () => void;
|
|
5
|
+
onShowActivity: () => void;
|
|
6
|
+
quote: SendFundQuote;
|
|
7
|
+
tokenSymbol: string;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: React.NamedExoticComponent<WalletSendFundSuccessViewProps>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Hex } from 'viem';
|
|
2
|
+
import { INTERNAL_GRADIENT_TYPE } from '../../lib/constants';
|
|
3
|
+
export type WalletSendFundProps = {
|
|
4
|
+
onBack: () => void;
|
|
5
|
+
onEnd: () => void;
|
|
6
|
+
onShowActivity: () => void;
|
|
7
|
+
setGradientType: React.Dispatch<React.SetStateAction<INTERNAL_GRADIENT_TYPE | undefined>>;
|
|
8
|
+
};
|
|
9
|
+
export type SendFundQuote = {
|
|
10
|
+
tokenAddress: Hex;
|
|
11
|
+
receivable_amount: bigint;
|
|
12
|
+
receivable_amount_in_token: number;
|
|
13
|
+
receivable_amount_in_currency: number;
|
|
14
|
+
estimated_fees_amount: string;
|
|
15
|
+
estimated_fees_amount_in_currency: number | undefined;
|
|
16
|
+
currency: string;
|
|
17
|
+
in_amount: string;
|
|
18
|
+
receiver_address: Hex;
|
|
19
|
+
maxPriorityFeePerGas: bigint;
|
|
20
|
+
maxFeePerGas: bigint;
|
|
21
|
+
gasLimit: bigint;
|
|
22
|
+
};
|
|
23
|
+
export declare function WalletSendFundView({ onBack, onEnd, onShowActivity, setGradientType }: WalletSendFundProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function WalletTokensTab(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { GlyphInterface } from '../hooks/useGlyph';
|
|
2
|
+
export type GlyphApiFetch = (_path: string, _options?: RequestInit) => Promise<Response>;
|
|
3
|
+
export interface GlyphContextType extends GlyphInterface {
|
|
4
|
+
/**
|
|
5
|
+
* A fetch-like function for making authenticated requests to the Glyph Widget API.
|
|
6
|
+
* This function automatically includes authentication headers and handles token refresh.
|
|
7
|
+
*
|
|
8
|
+
* Returns null if the context is not ready or the user is not authenticated.
|
|
9
|
+
*
|
|
10
|
+
* @param input - The URL or Request object for the API endpoint
|
|
11
|
+
* @param init - Optional RequestInit configuration object
|
|
12
|
+
* @returns Promise resolving to the Response from the API, or null if not authenticated
|
|
13
|
+
*/
|
|
14
|
+
apiFetch: GlyphApiFetch | null;
|
|
15
|
+
}
|
|
16
|
+
export declare const EmptyGlyphContext: GlyphContextType;
|
|
17
|
+
export declare const GlyphContext: import('react').Context<GlyphContextType | null>;
|
|
18
|
+
export declare function createApiFetch(baseUrl: string, getToken?: () => Promise<string>, baseHeaders?: Record<string, string>): GlyphApiFetch;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GlyphWidgetBalances, GlyphWidgetUser } from '../types';
|
|
2
|
+
interface GlyphUserDataContextType {
|
|
3
|
+
user: GlyphWidgetUser | null;
|
|
4
|
+
refreshUser: (force?: boolean) => Promise<void>;
|
|
5
|
+
balances: GlyphWidgetBalances | null;
|
|
6
|
+
refreshBalances: (force?: boolean, cbs?: Record<string, (diffAmount: number) => void>) => Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export declare const GlyphUserDataContext: import('react').Context<GlyphUserDataContextType | undefined>;
|
|
9
|
+
export {};
|