@mezo-org/passport 0.15.1-dev.7 → 0.16.0-dev.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/dist/src/api/auth.d.ts +9 -0
- package/dist/src/api/auth.d.ts.map +1 -1
- package/dist/src/api/auth.js +7 -0
- package/dist/src/api/auth.js.map +1 -1
- package/dist/src/assets/DefaultAvatar.d.ts +5 -0
- package/dist/src/assets/DefaultAvatar.d.ts.map +1 -0
- package/dist/src/assets/DefaultAvatar.js +21 -0
- package/dist/src/assets/DefaultAvatar.js.map +1 -0
- package/dist/src/assets/EditIcon.d.ts +5 -0
- package/dist/src/assets/EditIcon.d.ts.map +1 -0
- package/dist/src/assets/EditIcon.js +10 -0
- package/dist/src/assets/EditIcon.js.map +1 -0
- package/dist/src/components/Dropdown/ConnectedTrigger.d.ts +8 -0
- package/dist/src/components/Dropdown/ConnectedTrigger.d.ts.map +1 -0
- package/dist/src/components/Dropdown/ConnectedTrigger.js +39 -0
- package/dist/src/components/Dropdown/ConnectedTrigger.js.map +1 -0
- package/dist/src/components/Dropdown/Content.d.ts +8 -0
- package/dist/src/components/Dropdown/Content.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Content.js +29 -0
- package/dist/src/components/Dropdown/Content.js.map +1 -0
- package/dist/src/components/Dropdown/DisconnectedTrigger.d.ts +7 -0
- package/dist/src/components/Dropdown/DisconnectedTrigger.d.ts.map +1 -0
- package/dist/src/components/Dropdown/DisconnectedTrigger.js +13 -0
- package/dist/src/components/Dropdown/DisconnectedTrigger.js.map +1 -0
- package/dist/src/components/Dropdown/Dropdown.d.ts +23 -0
- package/dist/src/components/Dropdown/Dropdown.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Dropdown.js +45 -0
- package/dist/src/components/Dropdown/Dropdown.js.map +1 -0
- package/dist/src/components/Dropdown/ListingItem.d.ts +14 -0
- package/dist/src/components/Dropdown/ListingItem.d.ts.map +1 -0
- package/dist/src/components/Dropdown/ListingItem.js +42 -0
- package/dist/src/components/Dropdown/ListingItem.js.map +1 -0
- package/dist/src/components/Dropdown/NestedViewLayout.d.ts +8 -0
- package/dist/src/components/Dropdown/NestedViewLayout.d.ts.map +1 -0
- package/dist/src/components/Dropdown/NestedViewLayout.js +33 -0
- package/dist/src/components/Dropdown/NestedViewLayout.js.map +1 -0
- package/dist/src/components/Dropdown/Receive/Receive.d.ts +4 -0
- package/dist/src/components/Dropdown/Receive/Receive.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Receive/Receive.js +64 -0
- package/dist/src/components/Dropdown/Receive/Receive.js.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountAddressActions.d.ts +4 -0
- package/dist/src/components/Dropdown/Root/AccountAddressActions.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountAddressActions.js +49 -0
- package/dist/src/components/Dropdown/Root/AccountAddressActions.js.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountBalance.d.ts +6 -0
- package/dist/src/components/Dropdown/Root/AccountBalance.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountBalance.js +32 -0
- package/dist/src/components/Dropdown/Root/AccountBalance.js.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountBtcListing.d.ts +6 -0
- package/dist/src/components/Dropdown/Root/AccountBtcListing.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountBtcListing.js +28 -0
- package/dist/src/components/Dropdown/Root/AccountBtcListing.js.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountError.d.ts +8 -0
- package/dist/src/components/Dropdown/Root/AccountError.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountError.js +17 -0
- package/dist/src/components/Dropdown/Root/AccountError.js.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountMusdListing.d.ts +4 -0
- package/dist/src/components/Dropdown/Root/AccountMusdListing.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountMusdListing.js +21 -0
- package/dist/src/components/Dropdown/Root/AccountMusdListing.js.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountOtherAssets.d.ts +8 -0
- package/dist/src/components/Dropdown/Root/AccountOtherAssets.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Root/AccountOtherAssets.js +43 -0
- package/dist/src/components/Dropdown/Root/AccountOtherAssets.js.map +1 -0
- package/dist/src/components/Dropdown/Root/Root.d.ts +8 -0
- package/dist/src/components/Dropdown/Root/Root.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Root/Root.js +49 -0
- package/dist/src/components/Dropdown/Root/Root.js.map +1 -0
- package/dist/src/components/Dropdown/Root/WalletAddress.d.ts +4 -0
- package/dist/src/components/Dropdown/Root/WalletAddress.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Root/WalletAddress.js +66 -0
- package/dist/src/components/Dropdown/Root/WalletAddress.js.map +1 -0
- package/dist/src/components/Dropdown/Root/WelcomeBlock.d.ts +6 -0
- package/dist/src/components/Dropdown/Root/WelcomeBlock.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Root/WelcomeBlock.js +88 -0
- package/dist/src/components/Dropdown/Root/WelcomeBlock.js.map +1 -0
- package/dist/src/components/Dropdown/Settings/InlineEditField.d.ts +12 -0
- package/dist/src/components/Dropdown/Settings/InlineEditField.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Settings/InlineEditField.js +95 -0
- package/dist/src/components/Dropdown/Settings/InlineEditField.js.map +1 -0
- package/dist/src/components/Dropdown/Settings/Settings.d.ts +4 -0
- package/dist/src/components/Dropdown/Settings/Settings.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Settings/Settings.js +36 -0
- package/dist/src/components/Dropdown/Settings/Settings.js.map +1 -0
- package/dist/src/components/Dropdown/SlotNumber.d.ts +19 -0
- package/dist/src/components/Dropdown/SlotNumber.d.ts.map +1 -0
- package/dist/src/components/Dropdown/SlotNumber.js +67 -0
- package/dist/src/components/Dropdown/SlotNumber.js.map +1 -0
- package/dist/src/components/Dropdown/TestnetTopBanner.d.ts +3 -0
- package/dist/src/components/Dropdown/TestnetTopBanner.d.ts.map +1 -0
- package/dist/src/components/Dropdown/TestnetTopBanner.js +14 -0
- package/dist/src/components/Dropdown/TestnetTopBanner.js.map +1 -0
- package/dist/src/components/Dropdown/index.d.ts +3 -0
- package/dist/src/components/Dropdown/index.d.ts.map +1 -0
- package/dist/src/components/Dropdown/index.js +2 -0
- package/dist/src/components/Dropdown/index.js.map +1 -0
- package/dist/src/components/index.d.ts +2 -0
- package/dist/src/components/index.d.ts.map +1 -0
- package/dist/src/components/index.js +2 -0
- package/dist/src/components/index.js.map +1 -0
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/index.js +1 -0
- package/dist/src/hooks/index.js.map +1 -1
- package/dist/src/hooks/useAcceptDocuments.d.ts +18 -0
- package/dist/src/hooks/useAcceptDocuments.d.ts.map +1 -1
- package/dist/src/hooks/useAuthenticateWithWallet.d.ts +11 -11
- package/dist/src/hooks/useCreateAccount.d.ts +18 -0
- package/dist/src/hooks/useCreateAccount.d.ts.map +1 -1
- package/dist/src/hooks/useSignInWithWallet.d.ts +11 -11
- package/dist/src/hooks/useSignUpWithWallet.d.ts +11 -11
- package/dist/src/hooks/useUpdateMezoId.d.ts +18 -0
- package/dist/src/hooks/useUpdateMezoId.d.ts.map +1 -1
- package/dist/src/hooks/useUpdateUserProfile.d.ts +171 -0
- package/dist/src/hooks/useUpdateUserProfile.d.ts.map +1 -0
- package/dist/src/hooks/useUpdateUserProfile.js +19 -0
- package/dist/src/hooks/useUpdateUserProfile.js.map +1 -0
- package/dist/src/hooks/useWalletAccount.d.ts +2 -5
- package/dist/src/hooks/useWalletAccount.d.ts.map +1 -1
- package/dist/src/hooks/useWalletAccount.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/stores/dropdownStore.d.ts +2 -1
- package/dist/src/stores/dropdownStore.d.ts.map +1 -1
- package/dist/src/stores/dropdownStore.js +1 -0
- package/dist/src/stores/dropdownStore.js.map +1 -1
- package/dist/src/utils/validation.d.ts +13 -0
- package/dist/src/utils/validation.d.ts.map +1 -0
- package/dist/src/utils/validation.js +34 -0
- package/dist/src/utils/validation.js.map +1 -0
- package/dist/src/utils/validation.test.d.ts +2 -0
- package/dist/src/utils/validation.test.d.ts.map +1 -0
- package/dist/src/utils/validation.test.js +63 -0
- package/dist/src/utils/validation.test.js.map +1 -0
- package/package.json +10 -7
- package/src/api/auth.ts +22 -0
- package/src/assets/DefaultAvatar.tsx +74 -0
- package/src/assets/EditIcon.tsx +33 -0
- package/src/components/Dropdown/ConnectedTrigger.tsx +76 -0
- package/src/components/Dropdown/Content.tsx +56 -0
- package/src/components/Dropdown/DisconnectedTrigger.tsx +36 -0
- package/src/components/Dropdown/Dropdown.tsx +100 -0
- package/src/components/Dropdown/ListingItem.tsx +176 -0
- package/src/components/Dropdown/NestedViewLayout.tsx +88 -0
- package/src/components/Dropdown/README.md +41 -0
- package/src/components/Dropdown/Receive/Receive.tsx +144 -0
- package/src/components/Dropdown/Root/AccountAddressActions.tsx +99 -0
- package/src/components/Dropdown/Root/AccountBalance.tsx +69 -0
- package/src/components/Dropdown/Root/AccountBtcListing.tsx +53 -0
- package/src/components/Dropdown/Root/AccountError.tsx +34 -0
- package/src/components/Dropdown/Root/AccountMusdListing.tsx +45 -0
- package/src/components/Dropdown/Root/AccountOtherAssets.tsx +85 -0
- package/src/components/Dropdown/Root/Root.tsx +104 -0
- package/src/components/Dropdown/Root/WalletAddress.tsx +123 -0
- package/src/components/Dropdown/Root/WelcomeBlock.tsx +173 -0
- package/src/components/Dropdown/Settings/InlineEditField.tsx +212 -0
- package/src/components/Dropdown/Settings/Settings.tsx +87 -0
- package/src/components/Dropdown/SlotNumber.tsx +131 -0
- package/src/components/Dropdown/TestnetTopBanner.tsx +32 -0
- package/src/components/Dropdown/index.ts +2 -0
- package/src/components/index.ts +1 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useUpdateUserProfile.ts +34 -0
- package/src/hooks/useWalletAccount.ts +2 -8
- package/src/index.ts +1 -0
- package/src/stores/dropdownStore.ts +1 -0
- package/src/utils/validation.test.ts +97 -0
- package/src/utils/validation.ts +35 -0
|
@@ -15,11 +15,11 @@ declare function useSignInWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
15
15
|
failureReason: Error | null;
|
|
16
16
|
isPaused: boolean;
|
|
17
17
|
submittedAt: number;
|
|
18
|
-
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
19
|
-
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
18
|
+
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void | undefined, unknown>;
|
|
19
|
+
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void | undefined, unknown>;
|
|
20
20
|
} | {
|
|
21
21
|
data: undefined;
|
|
22
|
-
variables: number | void;
|
|
22
|
+
variables: number | void | undefined;
|
|
23
23
|
error: null;
|
|
24
24
|
isError: false;
|
|
25
25
|
isIdle: false;
|
|
@@ -32,12 +32,12 @@ declare function useSignInWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
32
32
|
failureReason: Error | null;
|
|
33
33
|
isPaused: boolean;
|
|
34
34
|
submittedAt: number;
|
|
35
|
-
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
36
|
-
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
35
|
+
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void | undefined, unknown>;
|
|
36
|
+
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void | undefined, unknown>;
|
|
37
37
|
} | {
|
|
38
38
|
data: undefined;
|
|
39
39
|
error: Error;
|
|
40
|
-
variables: number | void;
|
|
40
|
+
variables: number | void | undefined;
|
|
41
41
|
isError: true;
|
|
42
42
|
isIdle: false;
|
|
43
43
|
isPending: false;
|
|
@@ -49,12 +49,12 @@ declare function useSignInWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
49
49
|
failureReason: Error | null;
|
|
50
50
|
isPaused: boolean;
|
|
51
51
|
submittedAt: number;
|
|
52
|
-
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
53
|
-
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
52
|
+
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void | undefined, unknown>;
|
|
53
|
+
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void | undefined, unknown>;
|
|
54
54
|
} | {
|
|
55
55
|
data: Session;
|
|
56
56
|
error: null;
|
|
57
|
-
variables: number | void;
|
|
57
|
+
variables: number | void | undefined;
|
|
58
58
|
isError: false;
|
|
59
59
|
isIdle: false;
|
|
60
60
|
isPending: false;
|
|
@@ -66,8 +66,8 @@ declare function useSignInWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
66
66
|
failureReason: Error | null;
|
|
67
67
|
isPaused: boolean;
|
|
68
68
|
submittedAt: number;
|
|
69
|
-
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
70
|
-
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
69
|
+
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void | undefined, unknown>;
|
|
70
|
+
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void | undefined, unknown>;
|
|
71
71
|
};
|
|
72
72
|
export { useSignInWithWallet };
|
|
73
73
|
//# sourceMappingURL=useSignInWithWallet.d.ts.map
|
|
@@ -15,11 +15,11 @@ declare function useSignUpWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
15
15
|
failureReason: Error | null;
|
|
16
16
|
isPaused: boolean;
|
|
17
17
|
submittedAt: number;
|
|
18
|
-
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
19
|
-
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
18
|
+
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void | undefined, unknown>;
|
|
19
|
+
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void | undefined, unknown>;
|
|
20
20
|
} | {
|
|
21
21
|
data: undefined;
|
|
22
|
-
variables: number | void;
|
|
22
|
+
variables: number | void | undefined;
|
|
23
23
|
error: null;
|
|
24
24
|
isError: false;
|
|
25
25
|
isIdle: false;
|
|
@@ -32,12 +32,12 @@ declare function useSignUpWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
32
32
|
failureReason: Error | null;
|
|
33
33
|
isPaused: boolean;
|
|
34
34
|
submittedAt: number;
|
|
35
|
-
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
36
|
-
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
35
|
+
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void | undefined, unknown>;
|
|
36
|
+
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void | undefined, unknown>;
|
|
37
37
|
} | {
|
|
38
38
|
data: undefined;
|
|
39
39
|
error: Error;
|
|
40
|
-
variables: number | void;
|
|
40
|
+
variables: number | void | undefined;
|
|
41
41
|
isError: true;
|
|
42
42
|
isIdle: false;
|
|
43
43
|
isPending: false;
|
|
@@ -49,12 +49,12 @@ declare function useSignUpWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
49
49
|
failureReason: Error | null;
|
|
50
50
|
isPaused: boolean;
|
|
51
51
|
submittedAt: number;
|
|
52
|
-
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
53
|
-
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
52
|
+
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void | undefined, unknown>;
|
|
53
|
+
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void | undefined, unknown>;
|
|
54
54
|
} | {
|
|
55
55
|
data: Session;
|
|
56
56
|
error: null;
|
|
57
|
-
variables: number | void;
|
|
57
|
+
variables: number | void | undefined;
|
|
58
58
|
isError: false;
|
|
59
59
|
isIdle: false;
|
|
60
60
|
isPending: false;
|
|
@@ -66,8 +66,8 @@ declare function useSignUpWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
66
66
|
failureReason: Error | null;
|
|
67
67
|
isPaused: boolean;
|
|
68
68
|
submittedAt: number;
|
|
69
|
-
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
70
|
-
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
69
|
+
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void | undefined, unknown>;
|
|
70
|
+
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void | undefined, unknown>;
|
|
71
71
|
};
|
|
72
72
|
export { useSignUpWithWallet };
|
|
73
73
|
//# sourceMappingURL=useSignUpWithWallet.d.ts.map
|
|
@@ -24,6 +24,8 @@ export declare function useUpdateMezoId(mutationOptions?: Omit<MutationOptions<U
|
|
|
24
24
|
acceptedAt?: string;
|
|
25
25
|
isCurrentVersionAccepted: boolean;
|
|
26
26
|
}>;
|
|
27
|
+
email?: string;
|
|
28
|
+
telegram?: string;
|
|
27
29
|
}, Error, string, unknown>;
|
|
28
30
|
updateMezoIdAsync: import("@tanstack/react-query").UseMutateAsyncFunction<{
|
|
29
31
|
mezoId: string;
|
|
@@ -34,6 +36,8 @@ export declare function useUpdateMezoId(mutationOptions?: Omit<MutationOptions<U
|
|
|
34
36
|
acceptedAt?: string;
|
|
35
37
|
isCurrentVersionAccepted: boolean;
|
|
36
38
|
}>;
|
|
39
|
+
email?: string;
|
|
40
|
+
telegram?: string;
|
|
37
41
|
}, Error, string, unknown>;
|
|
38
42
|
} | {
|
|
39
43
|
data: undefined;
|
|
@@ -59,6 +63,8 @@ export declare function useUpdateMezoId(mutationOptions?: Omit<MutationOptions<U
|
|
|
59
63
|
acceptedAt?: string;
|
|
60
64
|
isCurrentVersionAccepted: boolean;
|
|
61
65
|
}>;
|
|
66
|
+
email?: string;
|
|
67
|
+
telegram?: string;
|
|
62
68
|
}, Error, string, unknown>;
|
|
63
69
|
updateMezoIdAsync: import("@tanstack/react-query").UseMutateAsyncFunction<{
|
|
64
70
|
mezoId: string;
|
|
@@ -69,6 +75,8 @@ export declare function useUpdateMezoId(mutationOptions?: Omit<MutationOptions<U
|
|
|
69
75
|
acceptedAt?: string;
|
|
70
76
|
isCurrentVersionAccepted: boolean;
|
|
71
77
|
}>;
|
|
78
|
+
email?: string;
|
|
79
|
+
telegram?: string;
|
|
72
80
|
}, Error, string, unknown>;
|
|
73
81
|
} | {
|
|
74
82
|
data: undefined;
|
|
@@ -94,6 +102,8 @@ export declare function useUpdateMezoId(mutationOptions?: Omit<MutationOptions<U
|
|
|
94
102
|
acceptedAt?: string;
|
|
95
103
|
isCurrentVersionAccepted: boolean;
|
|
96
104
|
}>;
|
|
105
|
+
email?: string;
|
|
106
|
+
telegram?: string;
|
|
97
107
|
}, Error, string, unknown>;
|
|
98
108
|
updateMezoIdAsync: import("@tanstack/react-query").UseMutateAsyncFunction<{
|
|
99
109
|
mezoId: string;
|
|
@@ -104,6 +114,8 @@ export declare function useUpdateMezoId(mutationOptions?: Omit<MutationOptions<U
|
|
|
104
114
|
acceptedAt?: string;
|
|
105
115
|
isCurrentVersionAccepted: boolean;
|
|
106
116
|
}>;
|
|
117
|
+
email?: string;
|
|
118
|
+
telegram?: string;
|
|
107
119
|
}, Error, string, unknown>;
|
|
108
120
|
} | {
|
|
109
121
|
data: {
|
|
@@ -115,6 +127,8 @@ export declare function useUpdateMezoId(mutationOptions?: Omit<MutationOptions<U
|
|
|
115
127
|
acceptedAt?: string;
|
|
116
128
|
isCurrentVersionAccepted: boolean;
|
|
117
129
|
}>;
|
|
130
|
+
email?: string;
|
|
131
|
+
telegram?: string;
|
|
118
132
|
};
|
|
119
133
|
error: null;
|
|
120
134
|
variables: string;
|
|
@@ -138,6 +152,8 @@ export declare function useUpdateMezoId(mutationOptions?: Omit<MutationOptions<U
|
|
|
138
152
|
acceptedAt?: string;
|
|
139
153
|
isCurrentVersionAccepted: boolean;
|
|
140
154
|
}>;
|
|
155
|
+
email?: string;
|
|
156
|
+
telegram?: string;
|
|
141
157
|
}, Error, string, unknown>;
|
|
142
158
|
updateMezoIdAsync: import("@tanstack/react-query").UseMutateAsyncFunction<{
|
|
143
159
|
mezoId: string;
|
|
@@ -148,6 +164,8 @@ export declare function useUpdateMezoId(mutationOptions?: Omit<MutationOptions<U
|
|
|
148
164
|
acceptedAt?: string;
|
|
149
165
|
isCurrentVersionAccepted: boolean;
|
|
150
166
|
}>;
|
|
167
|
+
email?: string;
|
|
168
|
+
telegram?: string;
|
|
151
169
|
}, Error, string, unknown>;
|
|
152
170
|
};
|
|
153
171
|
//# sourceMappingURL=useUpdateMezoId.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUpdateMezoId.d.ts","sourceRoot":"","sources":["../../../src/hooks/useUpdateMezoId.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,eAAe,EACf,YAAY,EACb,MAAM,uBAAuB,CAAA;AAG9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAElD,wBAAgB,eAAe,CAC7B,eAAe,GAAE,IAAI,CACnB,eAAe,CAAC,oBAAoB,EAAE,YAAY,EAAE,MAAM,CAAC,EAC3D,YAAY,GAAG,aAAa,CACxB
|
|
1
|
+
{"version":3,"file":"useUpdateMezoId.d.ts","sourceRoot":"","sources":["../../../src/hooks/useUpdateMezoId.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,eAAe,EACf,YAAY,EACb,MAAM,uBAAuB,CAAA;AAG9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAElD,wBAAgB,eAAe,CAC7B,eAAe,GAAE,IAAI,CACnB,eAAe,CAAC,oBAAoB,EAAE,YAAY,EAAE,MAAM,CAAC,EAC3D,YAAY,GAAG,aAAa,CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBP"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { MutationOptions, DefaultError } from "@tanstack/react-query";
|
|
2
|
+
import type { UpdateAccountRequest, UpdateAccountResponse } from "../api";
|
|
3
|
+
export declare function useUpdateUserProfile(mutationOptions?: Omit<MutationOptions<UpdateAccountResponse, DefaultError, UpdateAccountRequest>, "mutationFn" | "mutationKey">): {
|
|
4
|
+
data: undefined;
|
|
5
|
+
variables: undefined;
|
|
6
|
+
error: null;
|
|
7
|
+
isError: false;
|
|
8
|
+
isIdle: true;
|
|
9
|
+
isPending: false;
|
|
10
|
+
isSuccess: false;
|
|
11
|
+
status: "idle";
|
|
12
|
+
reset: () => void;
|
|
13
|
+
context: unknown;
|
|
14
|
+
failureCount: number;
|
|
15
|
+
failureReason: Error | null;
|
|
16
|
+
isPaused: boolean;
|
|
17
|
+
submittedAt: number;
|
|
18
|
+
updateProfile: import("@tanstack/react-query").UseMutateFunction<{
|
|
19
|
+
mezoId: string;
|
|
20
|
+
hasModifiedMezoId: boolean;
|
|
21
|
+
linkedAccounts: import("../api").LinkedAccount[];
|
|
22
|
+
documents?: Record<import("../api").DocumentType, {
|
|
23
|
+
acceptedVersion?: string;
|
|
24
|
+
acceptedAt?: string;
|
|
25
|
+
isCurrentVersionAccepted: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
email?: string;
|
|
28
|
+
telegram?: string;
|
|
29
|
+
}, Error, UpdateAccountRequest, unknown>;
|
|
30
|
+
updateProfileAsync: import("@tanstack/react-query").UseMutateAsyncFunction<{
|
|
31
|
+
mezoId: string;
|
|
32
|
+
hasModifiedMezoId: boolean;
|
|
33
|
+
linkedAccounts: import("../api").LinkedAccount[];
|
|
34
|
+
documents?: Record<import("../api").DocumentType, {
|
|
35
|
+
acceptedVersion?: string;
|
|
36
|
+
acceptedAt?: string;
|
|
37
|
+
isCurrentVersionAccepted: boolean;
|
|
38
|
+
}>;
|
|
39
|
+
email?: string;
|
|
40
|
+
telegram?: string;
|
|
41
|
+
}, Error, UpdateAccountRequest, unknown>;
|
|
42
|
+
} | {
|
|
43
|
+
data: undefined;
|
|
44
|
+
variables: UpdateAccountRequest;
|
|
45
|
+
error: null;
|
|
46
|
+
isError: false;
|
|
47
|
+
isIdle: false;
|
|
48
|
+
isPending: true;
|
|
49
|
+
isSuccess: false;
|
|
50
|
+
status: "pending";
|
|
51
|
+
reset: () => void;
|
|
52
|
+
context: unknown;
|
|
53
|
+
failureCount: number;
|
|
54
|
+
failureReason: Error | null;
|
|
55
|
+
isPaused: boolean;
|
|
56
|
+
submittedAt: number;
|
|
57
|
+
updateProfile: import("@tanstack/react-query").UseMutateFunction<{
|
|
58
|
+
mezoId: string;
|
|
59
|
+
hasModifiedMezoId: boolean;
|
|
60
|
+
linkedAccounts: import("../api").LinkedAccount[];
|
|
61
|
+
documents?: Record<import("../api").DocumentType, {
|
|
62
|
+
acceptedVersion?: string;
|
|
63
|
+
acceptedAt?: string;
|
|
64
|
+
isCurrentVersionAccepted: boolean;
|
|
65
|
+
}>;
|
|
66
|
+
email?: string;
|
|
67
|
+
telegram?: string;
|
|
68
|
+
}, Error, UpdateAccountRequest, unknown>;
|
|
69
|
+
updateProfileAsync: import("@tanstack/react-query").UseMutateAsyncFunction<{
|
|
70
|
+
mezoId: string;
|
|
71
|
+
hasModifiedMezoId: boolean;
|
|
72
|
+
linkedAccounts: import("../api").LinkedAccount[];
|
|
73
|
+
documents?: Record<import("../api").DocumentType, {
|
|
74
|
+
acceptedVersion?: string;
|
|
75
|
+
acceptedAt?: string;
|
|
76
|
+
isCurrentVersionAccepted: boolean;
|
|
77
|
+
}>;
|
|
78
|
+
email?: string;
|
|
79
|
+
telegram?: string;
|
|
80
|
+
}, Error, UpdateAccountRequest, unknown>;
|
|
81
|
+
} | {
|
|
82
|
+
data: undefined;
|
|
83
|
+
error: Error;
|
|
84
|
+
variables: UpdateAccountRequest;
|
|
85
|
+
isError: true;
|
|
86
|
+
isIdle: false;
|
|
87
|
+
isPending: false;
|
|
88
|
+
isSuccess: false;
|
|
89
|
+
status: "error";
|
|
90
|
+
reset: () => void;
|
|
91
|
+
context: unknown;
|
|
92
|
+
failureCount: number;
|
|
93
|
+
failureReason: Error | null;
|
|
94
|
+
isPaused: boolean;
|
|
95
|
+
submittedAt: number;
|
|
96
|
+
updateProfile: import("@tanstack/react-query").UseMutateFunction<{
|
|
97
|
+
mezoId: string;
|
|
98
|
+
hasModifiedMezoId: boolean;
|
|
99
|
+
linkedAccounts: import("../api").LinkedAccount[];
|
|
100
|
+
documents?: Record<import("../api").DocumentType, {
|
|
101
|
+
acceptedVersion?: string;
|
|
102
|
+
acceptedAt?: string;
|
|
103
|
+
isCurrentVersionAccepted: boolean;
|
|
104
|
+
}>;
|
|
105
|
+
email?: string;
|
|
106
|
+
telegram?: string;
|
|
107
|
+
}, Error, UpdateAccountRequest, unknown>;
|
|
108
|
+
updateProfileAsync: import("@tanstack/react-query").UseMutateAsyncFunction<{
|
|
109
|
+
mezoId: string;
|
|
110
|
+
hasModifiedMezoId: boolean;
|
|
111
|
+
linkedAccounts: import("../api").LinkedAccount[];
|
|
112
|
+
documents?: Record<import("../api").DocumentType, {
|
|
113
|
+
acceptedVersion?: string;
|
|
114
|
+
acceptedAt?: string;
|
|
115
|
+
isCurrentVersionAccepted: boolean;
|
|
116
|
+
}>;
|
|
117
|
+
email?: string;
|
|
118
|
+
telegram?: string;
|
|
119
|
+
}, Error, UpdateAccountRequest, unknown>;
|
|
120
|
+
} | {
|
|
121
|
+
data: {
|
|
122
|
+
mezoId: string;
|
|
123
|
+
hasModifiedMezoId: boolean;
|
|
124
|
+
linkedAccounts: import("../api").LinkedAccount[];
|
|
125
|
+
documents?: Record<import("../api").DocumentType, {
|
|
126
|
+
acceptedVersion?: string;
|
|
127
|
+
acceptedAt?: string;
|
|
128
|
+
isCurrentVersionAccepted: boolean;
|
|
129
|
+
}>;
|
|
130
|
+
email?: string;
|
|
131
|
+
telegram?: string;
|
|
132
|
+
};
|
|
133
|
+
error: null;
|
|
134
|
+
variables: UpdateAccountRequest;
|
|
135
|
+
isError: false;
|
|
136
|
+
isIdle: false;
|
|
137
|
+
isPending: false;
|
|
138
|
+
isSuccess: true;
|
|
139
|
+
status: "success";
|
|
140
|
+
reset: () => void;
|
|
141
|
+
context: unknown;
|
|
142
|
+
failureCount: number;
|
|
143
|
+
failureReason: Error | null;
|
|
144
|
+
isPaused: boolean;
|
|
145
|
+
submittedAt: number;
|
|
146
|
+
updateProfile: import("@tanstack/react-query").UseMutateFunction<{
|
|
147
|
+
mezoId: string;
|
|
148
|
+
hasModifiedMezoId: boolean;
|
|
149
|
+
linkedAccounts: import("../api").LinkedAccount[];
|
|
150
|
+
documents?: Record<import("../api").DocumentType, {
|
|
151
|
+
acceptedVersion?: string;
|
|
152
|
+
acceptedAt?: string;
|
|
153
|
+
isCurrentVersionAccepted: boolean;
|
|
154
|
+
}>;
|
|
155
|
+
email?: string;
|
|
156
|
+
telegram?: string;
|
|
157
|
+
}, Error, UpdateAccountRequest, unknown>;
|
|
158
|
+
updateProfileAsync: import("@tanstack/react-query").UseMutateAsyncFunction<{
|
|
159
|
+
mezoId: string;
|
|
160
|
+
hasModifiedMezoId: boolean;
|
|
161
|
+
linkedAccounts: import("../api").LinkedAccount[];
|
|
162
|
+
documents?: Record<import("../api").DocumentType, {
|
|
163
|
+
acceptedVersion?: string;
|
|
164
|
+
acceptedAt?: string;
|
|
165
|
+
isCurrentVersionAccepted: boolean;
|
|
166
|
+
}>;
|
|
167
|
+
email?: string;
|
|
168
|
+
telegram?: string;
|
|
169
|
+
}, Error, UpdateAccountRequest, unknown>;
|
|
170
|
+
};
|
|
171
|
+
//# sourceMappingURL=useUpdateUserProfile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUpdateUserProfile.d.ts","sourceRoot":"","sources":["../../../src/hooks/useUpdateUserProfile.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,eAAe,EACf,YAAY,EACb,MAAM,uBAAuB,CAAA;AAG9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAA;AAEzE,wBAAgB,oBAAoB,CAClC,eAAe,GAAE,IAAI,CACnB,eAAe,CAAC,qBAAqB,EAAE,YAAY,EAAE,oBAAoB,CAAC,EAC1E,YAAY,GAAG,aAAa,CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBP"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useQueryClient, useMutation, } from "@tanstack/react-query";
|
|
2
|
+
import { useAuthApiClient } from "./useAuthApiClient";
|
|
3
|
+
import { QUERY_KEYS } from "./constants";
|
|
4
|
+
export function useUpdateUserProfile(mutationOptions = {}) {
|
|
5
|
+
const queryClient = useQueryClient();
|
|
6
|
+
const authApiClient = useAuthApiClient();
|
|
7
|
+
const { onSuccess: customOnSuccess, ...restMutationOptions } = mutationOptions;
|
|
8
|
+
const { mutate, mutateAsync, ...rest } = useMutation({
|
|
9
|
+
mutationFn: (updates) => authApiClient.updateAccount(updates),
|
|
10
|
+
onSuccess: (data, variables, context) => {
|
|
11
|
+
queryClient.resetQueries({ queryKey: [QUERY_KEYS.ACCOUNT] });
|
|
12
|
+
if (customOnSuccess)
|
|
13
|
+
customOnSuccess(data, variables, context);
|
|
14
|
+
},
|
|
15
|
+
...restMutationOptions,
|
|
16
|
+
});
|
|
17
|
+
return { updateProfile: mutate, updateProfileAsync: mutateAsync, ...rest };
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=useUpdateUserProfile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUpdateUserProfile.js","sourceRoot":"","sources":["../../../src/hooks/useUpdateUserProfile.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,WAAW,GAGZ,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAGxC,MAAM,UAAU,oBAAoB,CAClC,kBAGI,EAAE;IAEN,MAAM,WAAW,GAAG,cAAc,EAAE,CAAA;IACpC,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAA;IAExC,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,mBAAmB,EAAE,GAAG,eAAe,CAAA;IAE9E,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,WAAW,CAAC;QACnD,UAAU,EAAE,CAAC,OAA6B,EAAE,EAAE,CAC5C,aAAa,CAAC,aAAa,CAAC,OAAO,CAAC;QACtC,SAAS,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;YACtC,WAAW,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;YAE5D,IAAI,eAAe;gBAAE,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,CAAA;QAChE,CAAC;QACD,GAAG,mBAAmB;KACvB,CAAC,CAAA;IAEF,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,kBAAkB,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,CAAA;AAC5E,CAAC"}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { Address } from "viem";
|
|
2
|
-
import {
|
|
3
|
-
type UseWalletAccountReturn = Omit<UseAccountReturnType, "
|
|
2
|
+
import { UseAccountReturnType } from "wagmi";
|
|
3
|
+
type UseWalletAccountReturn = Omit<UseAccountReturnType, "address"> & {
|
|
4
4
|
accountAddress?: Address;
|
|
5
5
|
walletAddress?: string;
|
|
6
|
-
isConnected: boolean;
|
|
7
6
|
networkFamily: "bitcoin" | "evm";
|
|
8
|
-
connector?: Connector;
|
|
9
|
-
chainId?: number;
|
|
10
7
|
};
|
|
11
8
|
export declare function useWalletAccount(): UseWalletAccountReturn;
|
|
12
9
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWalletAccount.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWalletAccount.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAC9B,OAAO,
|
|
1
|
+
{"version":3,"file":"useWalletAccount.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWalletAccount.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAC9B,OAAO,EAAc,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAExD,KAAK,sBAAsB,GAAG,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,GAAG;IACpE,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,SAAS,GAAG,KAAK,CAAA;CACjC,CAAA;AAED,wBAAgB,gBAAgB,IAAI,sBAAsB,CA6CzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWalletAccount.js","sourceRoot":"","sources":["../../../src/hooks/useWalletAccount.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAE/B,OAAO,
|
|
1
|
+
{"version":3,"file":"useWalletAccount.js","sourceRoot":"","sources":["../../../src/hooks/useWalletAccount.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAE/B,OAAO,EAAE,UAAU,EAAwB,MAAM,OAAO,CAAA;AAQxD,MAAM,UAAU,gBAAgB;IAC9B,MAAM,EACJ,OAAO,EAAE,UAAU,EACnB,SAAS,EACT,OAAO,EACP,WAAW,EACX,GAAG,IAAI,EACR,GAAG,UAAU,EAAE,CAAA;IAEhB,MAAM,aAAa,GAAG,OAAO,CAC3B,GAAG,EAAE,CAAC,CAAC,SAAS,EAAE,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,EAC3D,CAAC,SAAS,CAAC,CACZ,CAAA;IAED,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,QAAQ,CAAC;QACjC,QAAQ,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC;QACzB,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,eAAe,GACnB,SACD,CAAC,kBAAkB,EAAE,CAAA;YAEtB,MAAM,OAAO,GAAG,MAAM,eAAe,CAAC,UAAU,EAAE,CAAA;YAClD,MAAM,OAAO,GAAG,MAAM,eAAe,CAAC,UAAU,EAAE,CAAA;YAElD,OAAO;gBACL,OAAO;gBACP,OAAO;aACR,CAAA;QACH,CAAC;QACD,OAAO,EAAE,aAAa,KAAK,SAAS,IAAI,CAAC,CAAC,SAAS;KACpD,CAAC,CAAA;IAEF,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,OAAO,IAAI,EAAE,CAAA;IAE7C,OAAO;QACL,cAAc,EAAE,UAAU;QAC1B,aAAa,EAAE,UAAU,IAAI,UAAU;QACvC,WAAW,EACT,WAAW;YACX,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;QAC7D,aAAa;QACb,SAAS;QACT,OAAO;QACP,GAAG,IAAI;KACR,CAAA;AACH,CAAC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from "./components";
|
|
1
2
|
export { unisatWalletMezoMainnet, unisatWalletMezoTestnet, okxWalletMezoMainnet, okxWalletMezoTestnet, xverseWalletMezoMainnet, xverseWalletMezoTestnet, getDefaultWallets, getConfig, } from "./config";
|
|
2
3
|
export * from "./constants";
|
|
3
4
|
export * from "./hooks";
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,GACV,MAAM,UAAU,CAAA;AACjB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,GACV,MAAM,UAAU,CAAA;AACjB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAA"}
|
package/dist/src/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from "./components";
|
|
1
2
|
export { unisatWalletMezoMainnet, unisatWalletMezoTestnet, okxWalletMezoMainnet, okxWalletMezoTestnet, xverseWalletMezoMainnet, xverseWalletMezoTestnet, getDefaultWallets, getConfig, } from "./config";
|
|
2
3
|
export * from "./constants";
|
|
3
4
|
export * from "./hooks";
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,GACV,MAAM,UAAU,CAAA;AACjB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,GACV,MAAM,UAAU,CAAA;AACjB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdownStore.d.ts","sourceRoot":"","sources":["../../../src/stores/dropdownStore.ts"],"names":[],"mappings":"AAEA,oBAAY,YAAY;IACtB,IAAI,SAAS;IACb,OAAO,YAAY;
|
|
1
|
+
{"version":3,"file":"dropdownStore.d.ts","sourceRoot":"","sources":["../../../src/stores/dropdownStore.ts"],"names":[],"mappings":"AAEA,oBAAY,YAAY;IACtB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,QAAQ,aAAa;CACtB;AAED,UAAU,aAAa;IACrB,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAA;IACrC,YAAY,EAAE,MAAM,OAAO,CAAA;CAC5B;AAED,QAAA,MAAM,gBAAgB,4EAInB,CAAA;AAEH,eAAe,gBAAgB,CAAA"}
|
|
@@ -3,6 +3,7 @@ export var DropdownView;
|
|
|
3
3
|
(function (DropdownView) {
|
|
4
4
|
DropdownView["ROOT"] = "ROOT";
|
|
5
5
|
DropdownView["RECEIVE"] = "RECEIVE";
|
|
6
|
+
DropdownView["SETTINGS"] = "SETTINGS";
|
|
6
7
|
})(DropdownView || (DropdownView = {}));
|
|
7
8
|
const useDropdownStore = create((set, get) => ({
|
|
8
9
|
view: DropdownView.ROOT,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdownStore.js","sourceRoot":"","sources":["../../../src/stores/dropdownStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAEhC,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"dropdownStore.js","sourceRoot":"","sources":["../../../src/stores/dropdownStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAEhC,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;AACvB,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;AAQD,MAAM,gBAAgB,GAAG,MAAM,CAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;IAC5D,IAAI,EAAE,YAAY,CAAC,IAAI;IACvB,OAAO,EAAE,CAAC,IAAkB,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC;IAC9C,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,IAAI,KAAK,YAAY,CAAC,IAAI;CACrD,CAAC,CAAC,CAAA;AAEH,eAAe,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validates an email address.
|
|
3
|
+
* @param value - The email address to validate
|
|
4
|
+
* @returns An error message if invalid, null if valid or empty
|
|
5
|
+
*/
|
|
6
|
+
export declare function validateEmail(value: string): string | null;
|
|
7
|
+
/**
|
|
8
|
+
* Validates a Telegram handle.
|
|
9
|
+
* @param value - The Telegram handle to validate (with or without @ prefix)
|
|
10
|
+
* @returns An error message if invalid, null if valid or empty
|
|
11
|
+
*/
|
|
12
|
+
export declare function validateTelegram(value: string): string | null;
|
|
13
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/utils/validation.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQ1D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAY7D"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
2
|
+
/**
|
|
3
|
+
* Validates an email address.
|
|
4
|
+
* @param value - The email address to validate
|
|
5
|
+
* @returns An error message if invalid, null if valid or empty
|
|
6
|
+
*/
|
|
7
|
+
export function validateEmail(value) {
|
|
8
|
+
if (!value) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
if (!EMAIL_REGEX.test(value)) {
|
|
12
|
+
return "Please enter a valid email address";
|
|
13
|
+
}
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Validates a Telegram handle.
|
|
18
|
+
* @param value - The Telegram handle to validate (with or without @ prefix)
|
|
19
|
+
* @returns An error message if invalid, null if valid or empty
|
|
20
|
+
*/
|
|
21
|
+
export function validateTelegram(value) {
|
|
22
|
+
if (!value) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
const handle = value.startsWith("@") ? value.slice(1) : value;
|
|
26
|
+
if (handle.length < 5) {
|
|
27
|
+
return "Telegram handle must be at least 5 characters";
|
|
28
|
+
}
|
|
29
|
+
if (!/^[a-zA-Z0-9_]+$/.test(handle)) {
|
|
30
|
+
return "Telegram handle can only contain letters, numbers, and underscores";
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../src/utils/validation.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG,4BAA4B,CAAA;AAEhD;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,IAAI,CAAA;IACb,CAAC;IACD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO,oCAAoC,CAAA;IAC7C,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,IAAI,CAAA;IACb,CAAC;IACD,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;IAC7D,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,OAAO,+CAA+C,CAAA;IACxD,CAAC;IACD,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACpC,OAAO,oEAAoE,CAAA;IAC7E,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.test.d.ts","sourceRoot":"","sources":["../../../src/utils/validation.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { validateEmail, validateTelegram } from "./validation";
|
|
2
|
+
describe("validateEmail", () => {
|
|
3
|
+
it("returns null for empty string", () => {
|
|
4
|
+
expect(validateEmail("")).toBeNull();
|
|
5
|
+
});
|
|
6
|
+
it("returns null for valid email", () => {
|
|
7
|
+
expect(validateEmail("user@example.com")).toBeNull();
|
|
8
|
+
});
|
|
9
|
+
it("returns null for valid email with subdomain", () => {
|
|
10
|
+
expect(validateEmail("user@mail.example.com")).toBeNull();
|
|
11
|
+
});
|
|
12
|
+
it("returns null for valid email with plus addressing", () => {
|
|
13
|
+
expect(validateEmail("user+tag@example.com")).toBeNull();
|
|
14
|
+
});
|
|
15
|
+
it("returns error for email without @", () => {
|
|
16
|
+
expect(validateEmail("userexample.com")).toBe("Please enter a valid email address");
|
|
17
|
+
});
|
|
18
|
+
it("returns error for email without domain", () => {
|
|
19
|
+
expect(validateEmail("user@")).toBe("Please enter a valid email address");
|
|
20
|
+
});
|
|
21
|
+
it("returns error for email without TLD", () => {
|
|
22
|
+
expect(validateEmail("user@example")).toBe("Please enter a valid email address");
|
|
23
|
+
});
|
|
24
|
+
it("returns error for email with spaces", () => {
|
|
25
|
+
expect(validateEmail("user @example.com")).toBe("Please enter a valid email address");
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
describe("validateTelegram", () => {
|
|
29
|
+
it("returns null for empty string", () => {
|
|
30
|
+
expect(validateTelegram("")).toBeNull();
|
|
31
|
+
});
|
|
32
|
+
it("returns null for valid handle without @", () => {
|
|
33
|
+
expect(validateTelegram("username")).toBeNull();
|
|
34
|
+
});
|
|
35
|
+
it("returns null for valid handle with @", () => {
|
|
36
|
+
expect(validateTelegram("@username")).toBeNull();
|
|
37
|
+
});
|
|
38
|
+
it("returns null for handle with numbers", () => {
|
|
39
|
+
expect(validateTelegram("user123")).toBeNull();
|
|
40
|
+
});
|
|
41
|
+
it("returns null for handle with underscores", () => {
|
|
42
|
+
expect(validateTelegram("user_name")).toBeNull();
|
|
43
|
+
});
|
|
44
|
+
it("returns null for exactly 5 character handle", () => {
|
|
45
|
+
expect(validateTelegram("abcde")).toBeNull();
|
|
46
|
+
});
|
|
47
|
+
it("returns error for handle shorter than 5 characters", () => {
|
|
48
|
+
expect(validateTelegram("abcd")).toBe("Telegram handle must be at least 5 characters");
|
|
49
|
+
});
|
|
50
|
+
it("returns error for handle with @ that is too short", () => {
|
|
51
|
+
expect(validateTelegram("@abcd")).toBe("Telegram handle must be at least 5 characters");
|
|
52
|
+
});
|
|
53
|
+
it("returns error for handle with special characters", () => {
|
|
54
|
+
expect(validateTelegram("user-name")).toBe("Telegram handle can only contain letters, numbers, and underscores");
|
|
55
|
+
});
|
|
56
|
+
it("returns error for handle with spaces", () => {
|
|
57
|
+
expect(validateTelegram("user name")).toBe("Telegram handle can only contain letters, numbers, and underscores");
|
|
58
|
+
});
|
|
59
|
+
it("returns error for handle with dots", () => {
|
|
60
|
+
expect(validateTelegram("user.name")).toBe("Telegram handle can only contain letters, numbers, and underscores");
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=validation.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.test.js","sourceRoot":"","sources":["../../../src/utils/validation.test.ts"],"names":[],"mappings":"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"}
|