@verified-network/verified-custody 0.1.8 → 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.
- package/babel.config.json +12 -0
- package/dist/index.d.mts +165 -0
- package/dist/index.d.ts +165 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +31 -38
- package/src/components/overlays.tsx +61 -0
- package/src/components/search.tsx +381 -0
- package/src/components/slider.tsx +29 -0
- package/src/components/success.tsx +142 -0
- package/src/customTypes.d.ts +37 -0
- package/src/index.ts +17 -0
- package/src/pages/addCosigners.tsx +1014 -0
- package/src/pages/contact.tsx +280 -0
- package/src/pages/createPin.tsx +693 -0
- package/src/pages/enterPin.tsx +821 -0
- package/src/pages/ftu.tsx +244 -0
- package/src/pages/index.tsx +170 -0
- package/src/pages/otp.tsx +410 -0
- package/src/services/contracts.ts +817 -0
- package/src/services/store.tsx +65 -0
- package/src/style.css +2030 -0
- package/src/utils/config.ts +103 -0
- package/src/utils/constants.ts +1966 -0
- package/src/utils/helpers.tsx +334 -0
- package/src/utils/types.ts +85 -0
- package/tsconfig.json +16 -0
- package/tsup.config.ts +36 -0
- package/README.md +0 -93
- package/dist/assets/icon128.png +0 -0
- package/dist/assets/icon16.png +0 -0
- package/dist/assets/icon32.png +0 -0
- package/dist/assets/icon48.png +0 -0
- package/dist/autoreload-bg.1777342b.js +0 -392
- package/dist/autoreload.af9e0afa.js +0 -393
- package/dist/main.js +0 -2
- package/dist/main.js.LICENSE.txt +0 -190
- package/dist/manifest.json +0 -39
- package/dist/src/scripts/background.js +0 -866
- package/dist/src/scripts/content.js +0 -22029
- package/dist/src/static/options.b1269179.js +0 -22033
- package/dist/src/static/options.html +0 -9
- package/dist/src/static/popup.e3c8c7b7.js +0 -22043
- package/dist/src/static/popup.html +0 -9
- package/dist/webext-prod/assets/icon128.png +0 -0
- package/dist/webext-prod/assets/icon16.png +0 -0
- package/dist/webext-prod/assets/icon32.png +0 -0
- package/dist/webext-prod/assets/icon48.png +0 -0
- package/dist/webext-prod/manifest.json +0 -36
- package/dist/webext-prod/src/scripts/background.js +0 -2
- package/dist/webext-prod/src/scripts/background.js.map +0 -1
- package/dist/webext-prod/src/scripts/content.js +0 -35
- package/dist/webext-prod/src/scripts/content.js.map +0 -1
- package/dist/webext-prod/src/static/options.a111dcd9.js +0 -2
- package/dist/webext-prod/src/static/options.a111dcd9.js.map +0 -1
- package/dist/webext-prod/src/static/options.html +0 -1
- package/dist/webext-prod/src/static/popup.70071e3e.js +0 -35
- package/dist/webext-prod/src/static/popup.70071e3e.js.map +0 -1
- package/dist/webext-prod/src/static/popup.cc04f56e.js +0 -2
- package/dist/webext-prod/src/static/popup.cc04f56e.js.map +0 -1
- package/dist/webext-prod/src/static/popup.e8a65b8a.js +0 -35
- package/dist/webext-prod/src/static/popup.e8a65b8a.js.map +0 -1
- package/dist/webext-prod/src/static/popup.html +0 -1
package/dist/index.d.mts
ADDED
|
@@ -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 };
|
package/dist/index.d.ts
ADDED
|
@@ -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 };
|