@verified-network/verified-custody 0.4.8 → 0.5.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/README.md +21 -19
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -57,11 +57,11 @@ The complete custody workflow component that handles new and existing users thro
|
|
|
57
57
|
|
|
58
58
|
<CreatePinPage /> Users either:
|
|
59
59
|
|
|
60
|
-
Create a
|
|
60
|
+
Create a new WebAuth Passkey to secure their account.
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
Authenticate with existing Passkey and get redirected accordingly.
|
|
63
63
|
|
|
64
|
-
Reset/Update their existing
|
|
64
|
+
Reset/Update their existing passkey
|
|
65
65
|
|
|
66
66
|
New user accounts are created here after verifying phone/email.
|
|
67
67
|
|
|
@@ -130,20 +130,20 @@ export interface VerifiedCustodyHelpers {
|
|
|
130
130
|
sendCoSignerInvitation: (
|
|
131
131
|
channel: "sms" | "email",
|
|
132
132
|
cosigerId: string,
|
|
133
|
-
|
|
133
|
+
creatorId: string,
|
|
134
134
|
hashedCretorPin: string
|
|
135
135
|
) => Promise<boolean>;
|
|
136
136
|
|
|
137
137
|
sendCreatorConfirmation: (
|
|
138
138
|
channel: "sms" | "email",
|
|
139
|
-
|
|
139
|
+
creatorId: string,
|
|
140
140
|
cosigersList: [],
|
|
141
141
|
requiredSigners: number
|
|
142
142
|
) => Promise<boolean>;
|
|
143
143
|
|
|
144
144
|
sendCreatorInitiation: (
|
|
145
145
|
channel: "sms" | "email",
|
|
146
|
-
|
|
146
|
+
creatorId: string,
|
|
147
147
|
hashedCretorPin: string,
|
|
148
148
|
txId: number,
|
|
149
149
|
requiredSigners: number
|
|
@@ -151,13 +151,15 @@ export interface VerifiedCustodyHelpers {
|
|
|
151
151
|
|
|
152
152
|
sendCreatorSigned: (
|
|
153
153
|
channel: "sms" | "email",
|
|
154
|
-
|
|
154
|
+
creatorId: string,
|
|
155
155
|
coSignerId: string
|
|
156
156
|
) => Promise<boolean>;
|
|
157
157
|
|
|
158
158
|
sendCreatorCompleted: (
|
|
159
159
|
channel: "sms" | "email",
|
|
160
|
-
|
|
160
|
+
creatorId: string,
|
|
161
|
+
coSignerId: string,
|
|
162
|
+
vaultPinHashed: string,
|
|
161
163
|
txId: number
|
|
162
164
|
) => Promise<boolean>;
|
|
163
165
|
|
|
@@ -190,7 +192,7 @@ export interface VerifiedCustodyHelpers {
|
|
|
190
192
|
channel: "sms" | "email"
|
|
191
193
|
cosigerId: string (email or phone number of the co-signer)
|
|
192
194
|
phone number must be in format +{countryCode}{10DigitNumber} e.g. +1098765432
|
|
193
|
-
|
|
195
|
+
creatorId: string (email or phone number of the wallet creator)
|
|
194
196
|
hashedCretorPin: string
|
|
195
197
|
It returns a Promise resolving to true on successful message delivery, otherwise false.
|
|
196
198
|
|
|
@@ -204,15 +206,15 @@ function App() {
|
|
|
204
206
|
const myCustomSendCoSignerInvitation = async (
|
|
205
207
|
channel: "sms" | "email",
|
|
206
208
|
cosigerId: string,
|
|
207
|
-
|
|
209
|
+
creatorId: string,
|
|
208
210
|
hashedCretorPin: string
|
|
209
211
|
): Promise<boolean> => {
|
|
210
212
|
try {
|
|
211
213
|
if (channel === "sms") {
|
|
212
|
-
// send SMS to cosigerId with
|
|
214
|
+
// send SMS to cosigerId with creatorId and hashedCretorPin
|
|
213
215
|
return true;
|
|
214
216
|
} else if (channel === "email") {
|
|
215
|
-
// send email to cosigerId with
|
|
217
|
+
// send email to cosigerId with creatorId and hashedCretorPin
|
|
216
218
|
return true;
|
|
217
219
|
}
|
|
218
220
|
return false;
|
|
@@ -223,16 +225,16 @@ function App() {
|
|
|
223
225
|
|
|
224
226
|
const myCustomSendCreatorConfirmation = async (
|
|
225
227
|
channel: "sms" | "email",
|
|
226
|
-
|
|
228
|
+
creatorId: string,
|
|
227
229
|
cosigersList: [],
|
|
228
230
|
requiredSigners: number
|
|
229
231
|
): Promise<boolean> => {
|
|
230
232
|
try {
|
|
231
233
|
if (channel === "sms") {
|
|
232
|
-
// send SMS showing coSigners and signing rules to
|
|
234
|
+
// send SMS showing coSigners and signing rules to creatorId
|
|
233
235
|
return true;
|
|
234
236
|
} else if (channel === "email") {
|
|
235
|
-
// send email showing coSigners and signing rules to
|
|
237
|
+
// send email showing coSigners and signing rules to creatorId
|
|
236
238
|
return true;
|
|
237
239
|
}
|
|
238
240
|
return false;
|
|
@@ -274,7 +276,7 @@ function App() {
|
|
|
274
276
|
const myCustomSendCoSignerInvitation = async (
|
|
275
277
|
channel: "sms" | "email",
|
|
276
278
|
cosigerId: string,
|
|
277
|
-
|
|
279
|
+
creatorId: string,
|
|
278
280
|
hashedCretorPin: string
|
|
279
281
|
): Promise<boolean> => {
|
|
280
282
|
// Implementation as above
|
|
@@ -282,7 +284,7 @@ function App() {
|
|
|
282
284
|
|
|
283
285
|
const myCustomSendCreatorConfirmation = async (
|
|
284
286
|
channel: "sms" | "email",
|
|
285
|
-
|
|
287
|
+
creatorId: string,
|
|
286
288
|
cosigersList: [],
|
|
287
289
|
requiredSigners: number
|
|
288
290
|
): Promise<boolean> => {
|
|
@@ -317,7 +319,7 @@ function App() {
|
|
|
317
319
|
const myCustomSendCoSignerInvitation = async (
|
|
318
320
|
channel: "sms" | "email",
|
|
319
321
|
cosigerId: string,
|
|
320
|
-
|
|
322
|
+
creatorId: string,
|
|
321
323
|
hashedCretorPin: string
|
|
322
324
|
): Promise<boolean> => {
|
|
323
325
|
// Implementation as above
|
|
@@ -325,7 +327,7 @@ function App() {
|
|
|
325
327
|
|
|
326
328
|
const myCustomSendCreatorConfirmation = async (
|
|
327
329
|
channel: "sms" | "email",
|
|
328
|
-
|
|
330
|
+
creatorId: string,
|
|
329
331
|
cosigersList: [],
|
|
330
332
|
requiredSigners: number
|
|
331
333
|
): Promise<boolean> => {
|
package/dist/index.d.mts
CHANGED
|
@@ -56,12 +56,12 @@ interface VerifiedCustodyProps {
|
|
|
56
56
|
}>;
|
|
57
57
|
}
|
|
58
58
|
interface VerifiedCustodyHelpers {
|
|
59
|
-
sendCoSignerInvitation: (channel: "sms" | "email", cosigerId: string,
|
|
60
|
-
sendCreatorConfirmation: (channel: "sms" | "email",
|
|
61
|
-
sendCreatorInitiation: (channel: "sms" | "email",
|
|
62
|
-
sendCreatorSigned: (channel: "sms" | "email",
|
|
63
|
-
sendCreatorCompleted: (channel: "sms" | "email",
|
|
64
|
-
sendCreatorAuthChanged: (channel: "sms" | "email",
|
|
59
|
+
sendCoSignerInvitation: (channel: "sms" | "email", cosigerId: string, creatorId: string, hashedCretorPin: string) => Promise<boolean>;
|
|
60
|
+
sendCreatorConfirmation: (channel: "sms" | "email", creatorId: string, cosigersList: [], requiredSigners: number, hashedCretorPin: string, isRemoved?: boolean) => Promise<boolean>;
|
|
61
|
+
sendCreatorInitiation: (channel: "sms" | "email", creatorId: string, hashedCretorPin: string, txId: number, requiredSigners: number) => Promise<boolean>;
|
|
62
|
+
sendCreatorSigned: (channel: "sms" | "email", creatorId: string, coSignerId: string, vaultPinHashed: string) => Promise<boolean>;
|
|
63
|
+
sendCreatorCompleted: (channel: "sms" | "email", creatorId: string, coSignerId: string, vaultPinHashed: string, txId: number) => Promise<boolean>;
|
|
64
|
+
sendCreatorAuthChanged: (channel: "sms" | "email", creatorId: string, vaultPinHashed: string, oldVaultPinHashed: string, timestamp: number) => Promise<boolean>;
|
|
65
65
|
sendCreatorAcceptance: (channel: "sms" | "email", creatorId: string, coSignerId: string, vaultPinHashed: string) => Promise<boolean>;
|
|
66
66
|
sendCreatorRejection: (channel: "sms" | "email", creatorId: string, coSignerId: string, vaultPinHashed: string) => Promise<boolean>;
|
|
67
67
|
sendOTPVerification: (creatorUniqueId: string, channel: "sms" | "email", creatorId: string) => Promise<boolean>;
|
package/dist/index.d.ts
CHANGED
|
@@ -56,12 +56,12 @@ interface VerifiedCustodyProps {
|
|
|
56
56
|
}>;
|
|
57
57
|
}
|
|
58
58
|
interface VerifiedCustodyHelpers {
|
|
59
|
-
sendCoSignerInvitation: (channel: "sms" | "email", cosigerId: string,
|
|
60
|
-
sendCreatorConfirmation: (channel: "sms" | "email",
|
|
61
|
-
sendCreatorInitiation: (channel: "sms" | "email",
|
|
62
|
-
sendCreatorSigned: (channel: "sms" | "email",
|
|
63
|
-
sendCreatorCompleted: (channel: "sms" | "email",
|
|
64
|
-
sendCreatorAuthChanged: (channel: "sms" | "email",
|
|
59
|
+
sendCoSignerInvitation: (channel: "sms" | "email", cosigerId: string, creatorId: string, hashedCretorPin: string) => Promise<boolean>;
|
|
60
|
+
sendCreatorConfirmation: (channel: "sms" | "email", creatorId: string, cosigersList: [], requiredSigners: number, hashedCretorPin: string, isRemoved?: boolean) => Promise<boolean>;
|
|
61
|
+
sendCreatorInitiation: (channel: "sms" | "email", creatorId: string, hashedCretorPin: string, txId: number, requiredSigners: number) => Promise<boolean>;
|
|
62
|
+
sendCreatorSigned: (channel: "sms" | "email", creatorId: string, coSignerId: string, vaultPinHashed: string) => Promise<boolean>;
|
|
63
|
+
sendCreatorCompleted: (channel: "sms" | "email", creatorId: string, coSignerId: string, vaultPinHashed: string, txId: number) => Promise<boolean>;
|
|
64
|
+
sendCreatorAuthChanged: (channel: "sms" | "email", creatorId: string, vaultPinHashed: string, oldVaultPinHashed: string, timestamp: number) => Promise<boolean>;
|
|
65
65
|
sendCreatorAcceptance: (channel: "sms" | "email", creatorId: string, coSignerId: string, vaultPinHashed: string) => Promise<boolean>;
|
|
66
66
|
sendCreatorRejection: (channel: "sms" | "email", creatorId: string, coSignerId: string, vaultPinHashed: string) => Promise<boolean>;
|
|
67
67
|
sendOTPVerification: (creatorUniqueId: string, channel: "sms" | "email", creatorId: string) => Promise<boolean>;
|