uniport-sdk 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.
@@ -0,0 +1,65 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ /**
4
+ * Uniport SDK Types
5
+ *
6
+ * Component props and UI state types
7
+ */
8
+ /** Props for the UniportButton component */
9
+ interface UniportButtonProps {
10
+ /** Recipient address on Sui */
11
+ recipient: string;
12
+ /** Refund address (optional, will use connected wallet if not provided) */
13
+ refundAddress?: string;
14
+ /** Destination token on Sui (default: suiUSDC) */
15
+ destinationToken?: 'suiSUI' | 'suiUSDC';
16
+ /** Request a specific amount (in destination token units) */
17
+ amount?: string;
18
+ /** Button label */
19
+ label?: string;
20
+ /** Button variant */
21
+ variant?: 'default' | 'compact' | 'outline';
22
+ /** Disable the button */
23
+ disabled?: boolean;
24
+ /** Class name for custom styling */
25
+ className?: string;
26
+ /** Callback when payment completes */
27
+ onSuccess?: (result: {
28
+ txHash: string;
29
+ amount: string;
30
+ }) => void;
31
+ /** Callback when payment fails */
32
+ onError?: (error: Error) => void;
33
+ /** Callback when modal opens/closes */
34
+ onOpenChange?: (open: boolean) => void;
35
+ }
36
+ /** Props for the UniportModal component */
37
+ interface UniportModalProps {
38
+ /** Whether the modal is open */
39
+ open: boolean;
40
+ /** Callback to close the modal */
41
+ onClose: () => void;
42
+ /** Recipient address on Sui */
43
+ recipient: string;
44
+ /** Optional refund address */
45
+ refundAddress?: string;
46
+ /** Destination token */
47
+ destinationToken?: 'suiSUI' | 'suiUSDC';
48
+ /** Amount to request */
49
+ amount?: string;
50
+ /** Callback when payment completes */
51
+ onSuccess?: (result: {
52
+ txHash: string;
53
+ amount: string;
54
+ }) => void;
55
+ /** Callback when payment fails */
56
+ onError?: (error: Error) => void;
57
+ }
58
+ /** Payment state for UI */
59
+ type PaymentState = 'idle' | 'selecting' | 'quoting' | 'awaiting_deposit' | 'processing' | 'success' | 'error';
60
+
61
+ declare function UniportButton({ recipient, refundAddress, destinationToken, amount, label, variant, disabled, className, onSuccess, onError, onOpenChange, }: UniportButtonProps): react_jsx_runtime.JSX.Element;
62
+
63
+ declare function UniportModal({ open, onClose, recipient, refundAddress, destinationToken, amount: initialAmount, onSuccess, onError, }: UniportModalProps): react_jsx_runtime.JSX.Element | null;
64
+
65
+ export { type PaymentState as P, UniportButton as U, type UniportButtonProps as a, UniportModal as b, type UniportModalProps as c };
@@ -0,0 +1,65 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ /**
4
+ * Uniport SDK Types
5
+ *
6
+ * Component props and UI state types
7
+ */
8
+ /** Props for the UniportButton component */
9
+ interface UniportButtonProps {
10
+ /** Recipient address on Sui */
11
+ recipient: string;
12
+ /** Refund address (optional, will use connected wallet if not provided) */
13
+ refundAddress?: string;
14
+ /** Destination token on Sui (default: suiUSDC) */
15
+ destinationToken?: 'suiSUI' | 'suiUSDC';
16
+ /** Request a specific amount (in destination token units) */
17
+ amount?: string;
18
+ /** Button label */
19
+ label?: string;
20
+ /** Button variant */
21
+ variant?: 'default' | 'compact' | 'outline';
22
+ /** Disable the button */
23
+ disabled?: boolean;
24
+ /** Class name for custom styling */
25
+ className?: string;
26
+ /** Callback when payment completes */
27
+ onSuccess?: (result: {
28
+ txHash: string;
29
+ amount: string;
30
+ }) => void;
31
+ /** Callback when payment fails */
32
+ onError?: (error: Error) => void;
33
+ /** Callback when modal opens/closes */
34
+ onOpenChange?: (open: boolean) => void;
35
+ }
36
+ /** Props for the UniportModal component */
37
+ interface UniportModalProps {
38
+ /** Whether the modal is open */
39
+ open: boolean;
40
+ /** Callback to close the modal */
41
+ onClose: () => void;
42
+ /** Recipient address on Sui */
43
+ recipient: string;
44
+ /** Optional refund address */
45
+ refundAddress?: string;
46
+ /** Destination token */
47
+ destinationToken?: 'suiSUI' | 'suiUSDC';
48
+ /** Amount to request */
49
+ amount?: string;
50
+ /** Callback when payment completes */
51
+ onSuccess?: (result: {
52
+ txHash: string;
53
+ amount: string;
54
+ }) => void;
55
+ /** Callback when payment fails */
56
+ onError?: (error: Error) => void;
57
+ }
58
+ /** Payment state for UI */
59
+ type PaymentState = 'idle' | 'selecting' | 'quoting' | 'awaiting_deposit' | 'processing' | 'success' | 'error';
60
+
61
+ declare function UniportButton({ recipient, refundAddress, destinationToken, amount, label, variant, disabled, className, onSuccess, onError, onOpenChange, }: UniportButtonProps): react_jsx_runtime.JSX.Element;
62
+
63
+ declare function UniportModal({ open, onClose, recipient, refundAddress, destinationToken, amount: initialAmount, onSuccess, onError, }: UniportModalProps): react_jsx_runtime.JSX.Element | null;
64
+
65
+ export { type PaymentState as P, UniportButton as U, type UniportButtonProps as a, UniportModal as b, type UniportModalProps as c };