@verified-network/verified-custody 0.1.9 → 0.2.0

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,12 @@
1
+ {
2
+ "presets": [
3
+ ["@babel/preset-env", {
4
+ "useBuiltIns": "entry",
5
+ "corejs": 3
6
+ }],
7
+ "@babel/preset-react"
8
+ ],
9
+ "plugins": [
10
+ "@babel/plugin-transform-runtime"
11
+ ]
12
+ }
@@ -0,0 +1,165 @@
1
+ import React$1 from 'react';
2
+
3
+ type VerifiedWalletAction = "connect_wallet" | "getPk" | "invitation" | "signRecovery" | "completeRecovery";
4
+ type VerifiedWalletVault = {
5
+ vaultId: string;
6
+ hashedVaultId?: string;
7
+ hashedVaultPin?: string;
8
+ CoSignerId?: string;
9
+ vId?: string;
10
+ vPh?: string;
11
+ cId?: string;
12
+ address?: string;
13
+ channel?: "sms" | "email";
14
+ pk?: string;
15
+ };
16
+ type VerifiedWalletTx = {
17
+ id: string;
18
+ };
19
+ interface VerifiedCustodyProps {
20
+ action?: VerifiedWalletAction;
21
+ actionText?: string;
22
+ origin?: string;
23
+ title?: string;
24
+ chainId?: number;
25
+ vaultData?: VerifiedWalletVault;
26
+ txData?: VerifiedWalletTx;
27
+ reqVaultData?: VerifiedWalletVault;
28
+ delayPageElement?: React.JSX.Element;
29
+ delayPageStyle?: React.CSSProperties;
30
+ helperFunctions?: VerifiedCustodyHelpers;
31
+ }
32
+ interface VerifiedCustodyHelpers {
33
+ sendCoSignerInvitation: (channel: "sms" | "email", cosigerId: string, cretorId: string, hashedCretorPin: string) => Promise<boolean>;
34
+ sendCreatorConfirmation: (channel: "sms" | "email", cretorId: string, cosigersList: [], requiredSigners: number) => Promise<boolean>;
35
+ sendCreatorInitiation: (channel: "sms" | "email", cretorId: string, hashedCretorPin: string, txId: number, requiredSigners: number) => Promise<boolean>;
36
+ sendCreatorSigned: (channel: "sms" | "email", cretorId: string, coSignerId: string) => Promise<boolean>;
37
+ sendCreatorCompleted: (channel: "sms" | "email", cretorId: string, txId: number) => Promise<boolean>;
38
+ sendCreatorAcceptance: (channel: "sms" | "email", creatorId: string, coSignerId: string) => Promise<boolean>;
39
+ sendCreatorRejection: (channel: "sms" | "email", creatorId: string, coSignerId: string) => Promise<boolean>;
40
+ }
41
+
42
+ declare const VerifiedCustody: (props: VerifiedCustodyProps) => React$1.JSX.Element;
43
+
44
+ declare const FTUPage: (props: {
45
+ fontsLoaded?: boolean;
46
+ popupView?: boolean;
47
+ action?: string;
48
+ vaultData?: any;
49
+ txData?: any;
50
+ chainId?: number;
51
+ defaultCountry?: {
52
+ area: string;
53
+ flag: string;
54
+ name: string;
55
+ };
56
+ showLogoPage?: boolean;
57
+ logoPageElement?: React$1.JSX.Element;
58
+ logoTimeoutTime?: number;
59
+ showStartupPage?: boolean;
60
+ startupPageElement?: React$1.JSX.Element;
61
+ setisOnboard?: (isOnboard: boolean) => void;
62
+ helperFunctions?: VerifiedCustodyHelpers;
63
+ }) => React$1.JSX.Element;
64
+
65
+ declare const EnterPinPage: (props: {
66
+ fontsLoaded?: boolean;
67
+ setisOnboard: (isOnboard: boolean) => void;
68
+ vaultId: string;
69
+ hashedVaultId: string;
70
+ encrptedPk: string;
71
+ vaultAddress: string;
72
+ vaultChannel: "sms" | "email";
73
+ actionText?: string;
74
+ title?: string;
75
+ origin?: string;
76
+ chainId?: number;
77
+ newChainId?: number;
78
+ action?: string;
79
+ reqVaultData?: any;
80
+ reqTxData?: any;
81
+ setIsLoading: (isLoading: boolean) => void;
82
+ helperFunctions?: VerifiedCustodyHelpers;
83
+ }) => React$1.JSX.Element;
84
+
85
+ declare const CreatePinPage: (props: {
86
+ setStep: (step: string) => void;
87
+ setIsLoading: (isLoading: boolean) => void;
88
+ setShowSuccessBtn: (showSuccessBtn: boolean) => void;
89
+ setSuccessBtnText: (successBtnText: string) => void;
90
+ setSuccessBtnNeutText: (successBtnNeutText: string) => void;
91
+ setSuccessBtnFunc: (successBtnFunc: any) => void;
92
+ setSuccessBtnNeutFunc: (successBtnNeutFunc: any) => void;
93
+ setActionHeaderText: (actionHeaderText: string) => void;
94
+ setActionFooterText: (actionFooterText: string) => void;
95
+ userNumberFmt: string;
96
+ userEmail: string;
97
+ selectedCountry: {
98
+ name: string;
99
+ area: string;
100
+ flag: string;
101
+ };
102
+ action?: string;
103
+ vaultData?: any;
104
+ txData?: any;
105
+ helperFunctions?: VerifiedCustodyHelpers;
106
+ }) => React$1.JSX.Element;
107
+
108
+ declare const ContactPage: (props: {
109
+ setStep: (step: string) => void;
110
+ setIsLoading: (isLoading: boolean) => void;
111
+ setUserNumberFmt: (number: string) => void;
112
+ userNumberFmt: string;
113
+ setUserEmail: (email: string) => void;
114
+ userEmail: string;
115
+ setSelectedCountry: (country: {
116
+ name: string;
117
+ area: string;
118
+ flag: string;
119
+ }) => void;
120
+ selectedCountry: {
121
+ name: string;
122
+ area: string;
123
+ flag: string;
124
+ };
125
+ allCountries: any;
126
+ }) => React$1.JSX.Element;
127
+
128
+ declare const OTPPage: (props: {
129
+ setStep: (step: string) => void;
130
+ setIsLoading: (isLoading: boolean) => void;
131
+ setUserNumberFmt: (number: string) => void;
132
+ setUserEmail: (email: string) => void;
133
+ selectedCountry: {
134
+ name: string;
135
+ area: string;
136
+ flag: string;
137
+ };
138
+ userNumberFmt: string;
139
+ userEmail: string;
140
+ }) => React$1.JSX.Element;
141
+
142
+ declare const AddCosignersPage: (props: {
143
+ setStep: (step: string) => void;
144
+ setIsLoading: (isLoading: boolean) => void;
145
+ userNumberFmt: string;
146
+ userEmail: string;
147
+ selectedCountry: {
148
+ name: string;
149
+ area: string;
150
+ flag: string;
151
+ };
152
+ allCountries: any;
153
+ defaultCountry?: {
154
+ area: string;
155
+ flag: string;
156
+ name: string;
157
+ };
158
+ helperFunctions?: VerifiedCustodyHelpers;
159
+ }) => React$1.JSX.Element;
160
+
161
+ declare const hashTheString: (text: string) => string;
162
+ declare const encryptString: (text: string, secretKey: string) => string;
163
+ declare const decryptString: (encryptedText: string, secretKey: string) => string;
164
+
165
+ export { AddCosignersPage as AddCoSignersPage, ContactPage, CreatePinPage, EnterPinPage, FTUPage, OTPPage, VerifiedCustody, decryptString, encryptString, hashTheString };
@@ -0,0 +1,165 @@
1
+ import React$1 from 'react';
2
+
3
+ type VerifiedWalletAction = "connect_wallet" | "getPk" | "invitation" | "signRecovery" | "completeRecovery";
4
+ type VerifiedWalletVault = {
5
+ vaultId: string;
6
+ hashedVaultId?: string;
7
+ hashedVaultPin?: string;
8
+ CoSignerId?: string;
9
+ vId?: string;
10
+ vPh?: string;
11
+ cId?: string;
12
+ address?: string;
13
+ channel?: "sms" | "email";
14
+ pk?: string;
15
+ };
16
+ type VerifiedWalletTx = {
17
+ id: string;
18
+ };
19
+ interface VerifiedCustodyProps {
20
+ action?: VerifiedWalletAction;
21
+ actionText?: string;
22
+ origin?: string;
23
+ title?: string;
24
+ chainId?: number;
25
+ vaultData?: VerifiedWalletVault;
26
+ txData?: VerifiedWalletTx;
27
+ reqVaultData?: VerifiedWalletVault;
28
+ delayPageElement?: React.JSX.Element;
29
+ delayPageStyle?: React.CSSProperties;
30
+ helperFunctions?: VerifiedCustodyHelpers;
31
+ }
32
+ interface VerifiedCustodyHelpers {
33
+ sendCoSignerInvitation: (channel: "sms" | "email", cosigerId: string, cretorId: string, hashedCretorPin: string) => Promise<boolean>;
34
+ sendCreatorConfirmation: (channel: "sms" | "email", cretorId: string, cosigersList: [], requiredSigners: number) => Promise<boolean>;
35
+ sendCreatorInitiation: (channel: "sms" | "email", cretorId: string, hashedCretorPin: string, txId: number, requiredSigners: number) => Promise<boolean>;
36
+ sendCreatorSigned: (channel: "sms" | "email", cretorId: string, coSignerId: string) => Promise<boolean>;
37
+ sendCreatorCompleted: (channel: "sms" | "email", cretorId: string, txId: number) => Promise<boolean>;
38
+ sendCreatorAcceptance: (channel: "sms" | "email", creatorId: string, coSignerId: string) => Promise<boolean>;
39
+ sendCreatorRejection: (channel: "sms" | "email", creatorId: string, coSignerId: string) => Promise<boolean>;
40
+ }
41
+
42
+ declare const VerifiedCustody: (props: VerifiedCustodyProps) => React$1.JSX.Element;
43
+
44
+ declare const FTUPage: (props: {
45
+ fontsLoaded?: boolean;
46
+ popupView?: boolean;
47
+ action?: string;
48
+ vaultData?: any;
49
+ txData?: any;
50
+ chainId?: number;
51
+ defaultCountry?: {
52
+ area: string;
53
+ flag: string;
54
+ name: string;
55
+ };
56
+ showLogoPage?: boolean;
57
+ logoPageElement?: React$1.JSX.Element;
58
+ logoTimeoutTime?: number;
59
+ showStartupPage?: boolean;
60
+ startupPageElement?: React$1.JSX.Element;
61
+ setisOnboard?: (isOnboard: boolean) => void;
62
+ helperFunctions?: VerifiedCustodyHelpers;
63
+ }) => React$1.JSX.Element;
64
+
65
+ declare const EnterPinPage: (props: {
66
+ fontsLoaded?: boolean;
67
+ setisOnboard: (isOnboard: boolean) => void;
68
+ vaultId: string;
69
+ hashedVaultId: string;
70
+ encrptedPk: string;
71
+ vaultAddress: string;
72
+ vaultChannel: "sms" | "email";
73
+ actionText?: string;
74
+ title?: string;
75
+ origin?: string;
76
+ chainId?: number;
77
+ newChainId?: number;
78
+ action?: string;
79
+ reqVaultData?: any;
80
+ reqTxData?: any;
81
+ setIsLoading: (isLoading: boolean) => void;
82
+ helperFunctions?: VerifiedCustodyHelpers;
83
+ }) => React$1.JSX.Element;
84
+
85
+ declare const CreatePinPage: (props: {
86
+ setStep: (step: string) => void;
87
+ setIsLoading: (isLoading: boolean) => void;
88
+ setShowSuccessBtn: (showSuccessBtn: boolean) => void;
89
+ setSuccessBtnText: (successBtnText: string) => void;
90
+ setSuccessBtnNeutText: (successBtnNeutText: string) => void;
91
+ setSuccessBtnFunc: (successBtnFunc: any) => void;
92
+ setSuccessBtnNeutFunc: (successBtnNeutFunc: any) => void;
93
+ setActionHeaderText: (actionHeaderText: string) => void;
94
+ setActionFooterText: (actionFooterText: string) => void;
95
+ userNumberFmt: string;
96
+ userEmail: string;
97
+ selectedCountry: {
98
+ name: string;
99
+ area: string;
100
+ flag: string;
101
+ };
102
+ action?: string;
103
+ vaultData?: any;
104
+ txData?: any;
105
+ helperFunctions?: VerifiedCustodyHelpers;
106
+ }) => React$1.JSX.Element;
107
+
108
+ declare const ContactPage: (props: {
109
+ setStep: (step: string) => void;
110
+ setIsLoading: (isLoading: boolean) => void;
111
+ setUserNumberFmt: (number: string) => void;
112
+ userNumberFmt: string;
113
+ setUserEmail: (email: string) => void;
114
+ userEmail: string;
115
+ setSelectedCountry: (country: {
116
+ name: string;
117
+ area: string;
118
+ flag: string;
119
+ }) => void;
120
+ selectedCountry: {
121
+ name: string;
122
+ area: string;
123
+ flag: string;
124
+ };
125
+ allCountries: any;
126
+ }) => React$1.JSX.Element;
127
+
128
+ declare const OTPPage: (props: {
129
+ setStep: (step: string) => void;
130
+ setIsLoading: (isLoading: boolean) => void;
131
+ setUserNumberFmt: (number: string) => void;
132
+ setUserEmail: (email: string) => void;
133
+ selectedCountry: {
134
+ name: string;
135
+ area: string;
136
+ flag: string;
137
+ };
138
+ userNumberFmt: string;
139
+ userEmail: string;
140
+ }) => React$1.JSX.Element;
141
+
142
+ declare const AddCosignersPage: (props: {
143
+ setStep: (step: string) => void;
144
+ setIsLoading: (isLoading: boolean) => void;
145
+ userNumberFmt: string;
146
+ userEmail: string;
147
+ selectedCountry: {
148
+ name: string;
149
+ area: string;
150
+ flag: string;
151
+ };
152
+ allCountries: any;
153
+ defaultCountry?: {
154
+ area: string;
155
+ flag: string;
156
+ name: string;
157
+ };
158
+ helperFunctions?: VerifiedCustodyHelpers;
159
+ }) => React$1.JSX.Element;
160
+
161
+ declare const hashTheString: (text: string) => string;
162
+ declare const encryptString: (text: string, secretKey: string) => string;
163
+ declare const decryptString: (encryptedText: string, secretKey: string) => string;
164
+
165
+ export { AddCosignersPage as AddCoSignersPage, ContactPage, CreatePinPage, EnterPinPage, FTUPage, OTPPage, VerifiedCustody, decryptString, encryptString, hashTheString };