@ledgerhq/revault-sdk 0.12.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.
Files changed (45) hide show
  1. package/LICENSE.md +202 -0
  2. package/README.md +18 -0
  3. package/lib/bake.cjs +812 -0
  4. package/lib/bake.cjs.map +1 -0
  5. package/lib/bake.d.cts +2659 -0
  6. package/lib/bake.d.ts +2659 -0
  7. package/lib/bake.js +812 -0
  8. package/lib/bake.js.map +1 -0
  9. package/lib/chunk-DPHEFR6E.js +493 -0
  10. package/lib/chunk-DPHEFR6E.js.map +1 -0
  11. package/lib/chunk-QOP5LA3E.cjs +35 -0
  12. package/lib/chunk-QOP5LA3E.cjs.map +1 -0
  13. package/lib/chunk-VCAQTGQE.cjs +493 -0
  14. package/lib/chunk-VCAQTGQE.cjs.map +1 -0
  15. package/lib/chunk-VHZJP75X.js +35 -0
  16. package/lib/chunk-VHZJP75X.js.map +1 -0
  17. package/lib/device.cjs +13 -0
  18. package/lib/device.cjs.map +1 -0
  19. package/lib/device.d.cts +50 -0
  20. package/lib/device.d.ts +50 -0
  21. package/lib/device.js +13 -0
  22. package/lib/device.js.map +1 -0
  23. package/lib/engine.cjs +704 -0
  24. package/lib/engine.cjs.map +1 -0
  25. package/lib/engine.d.cts +18 -0
  26. package/lib/engine.d.ts +18 -0
  27. package/lib/engine.js +704 -0
  28. package/lib/engine.js.map +1 -0
  29. package/lib/index.cjs +1 -0
  30. package/lib/index.cjs.map +1 -0
  31. package/lib/index.d.cts +13 -0
  32. package/lib/index.d.ts +13 -0
  33. package/lib/index.js +1 -0
  34. package/lib/index.js.map +1 -0
  35. package/lib/onboarding.cjs +160 -0
  36. package/lib/onboarding.cjs.map +1 -0
  37. package/lib/onboarding.d.cts +1735 -0
  38. package/lib/onboarding.d.ts +1735 -0
  39. package/lib/onboarding.js +160 -0
  40. package/lib/onboarding.js.map +1 -0
  41. package/lib/types-BYNH6EdK.d.cts +199 -0
  42. package/lib/types-CsvE9Mlb.d.cts +159 -0
  43. package/lib/types-CsvE9Mlb.d.ts +159 -0
  44. package/lib/types-DHZzeq9X.d.ts +199 -0
  45. package/package.json +75 -0
@@ -0,0 +1,1735 @@
1
+ import { OnboardingFullStateResponse, OnboardingStep } from '@ledgerhq/revault-api';
2
+ import { Logger } from './index.cjs';
3
+ import { E as Engine, W as WithOnboarding } from './types-BYNH6EdK.cjs';
4
+ import './types-CsvE9Mlb.cjs';
5
+ import '@trpc/client';
6
+ import '@trpc/server';
7
+
8
+ declare const STEPS: {
9
+ /**
10
+ * Devices claiming
11
+ */
12
+ readonly PENDING_DEVICE_CLAIMS: ({ state, engine }: {
13
+ engine: Engine<WithOnboarding>;
14
+ state: OnboardingFullStateResponse;
15
+ }, logger: Logger) => Promise<{
16
+ id: string;
17
+ workspaceName: string;
18
+ createdAt: Date;
19
+ wrappingKey: {
20
+ ephemeralPubKey: string;
21
+ ephemeralCertificate: {
22
+ signature: string;
23
+ codeHash: string;
24
+ attestationPub: string;
25
+ certificate: string;
26
+ };
27
+ fragments: {
28
+ pubKey: string;
29
+ blob: string;
30
+ ephemeralPubKey: string;
31
+ ephemeralCertificate: {
32
+ signature: string;
33
+ codeHash: string;
34
+ attestationPub: string;
35
+ certificate: string;
36
+ };
37
+ }[];
38
+ } | null;
39
+ step: "COMPLETED" | "PENDING_DEVICE_CLAIMS" | "PENDING_WRAPPING_KEY_PROVISIONING" | "PENDING_MASTER_ADMINS_REGISTRATION_INIT" | "PENDING_MASTER_ADMINS_REGISTRATION" | "PENDING_SHARED_OWNERS_REGISTRATION_INIT" | "PENDING_SHARED_OWNERS_REGISTRATION" | "PENDING_REVIEW_BY_MASTER_ADMINS" | "PENDING_SEED_PROVISIONING" | "PENDING_WORKSPACE_INITIALIZATION";
40
+ completedAt: Date | null;
41
+ claimedDevices: {
42
+ pubKey: string;
43
+ deviceUserId: string;
44
+ role: "WRAPPING_KEY_OWNER" | "SHARED_OWNER" | "MASTER_ADMIN";
45
+ deviceName: string;
46
+ }[];
47
+ masterAdmins: {
48
+ name: string;
49
+ pubKey: string;
50
+ role: "MASTER_ADMIN";
51
+ psdModel: "BLUE" | "STAX";
52
+ registrationChallenge: {
53
+ requestId: string;
54
+ challenge: string;
55
+ handshake: string;
56
+ handshakeAttestation: {
57
+ signature: string;
58
+ codeHash: string;
59
+ attestationPub: string;
60
+ certificate: string;
61
+ };
62
+ ephemeralPublicKey: string;
63
+ ephemeralPublicKeyAttestation: {
64
+ signature: string;
65
+ codeHash: string;
66
+ attestationPub: string;
67
+ certificate: string;
68
+ };
69
+ u2fRegisterData: string;
70
+ ciphertext: string;
71
+ };
72
+ registrationResponse: {
73
+ u2fKeyHandle: string;
74
+ certificate: {
75
+ signature: string;
76
+ codeHash: string;
77
+ attestationPub: string;
78
+ certificate: string;
79
+ };
80
+ u2fRegister: string;
81
+ registerData: string;
82
+ validationKey: string;
83
+ pairingPayload: string;
84
+ } | null;
85
+ review: {
86
+ challenge: {
87
+ challengeType: "PSD";
88
+ wActions: string[];
89
+ handshake: string;
90
+ handshakeAttestation: {
91
+ signature: string;
92
+ codeHash: string;
93
+ attestationPub: string;
94
+ certificate: string;
95
+ };
96
+ partitionId: string;
97
+ };
98
+ signature: string | null;
99
+ } | null;
100
+ }[];
101
+ sharedOwners: {
102
+ name: string;
103
+ pubKey: string;
104
+ role: "SHARED_OWNER";
105
+ psdModel: "BLUE" | "STAX";
106
+ registrationChallenge: {
107
+ requestId: string;
108
+ challenge: string;
109
+ handshake: string;
110
+ handshakeAttestation: {
111
+ signature: string;
112
+ codeHash: string;
113
+ attestationPub: string;
114
+ certificate: string;
115
+ };
116
+ ephemeralPublicKey: string;
117
+ ephemeralPublicKeyAttestation: {
118
+ signature: string;
119
+ codeHash: string;
120
+ attestationPub: string;
121
+ certificate: string;
122
+ };
123
+ u2fRegisterData: string;
124
+ ciphertext: string;
125
+ };
126
+ registrationResponse: {
127
+ u2fKeyHandle: string;
128
+ certificate: {
129
+ signature: string;
130
+ codeHash: string;
131
+ attestationPub: string;
132
+ certificate: string;
133
+ };
134
+ u2fRegister: string;
135
+ registerData: string;
136
+ validationKey: string;
137
+ pairingPayload: string;
138
+ } | null;
139
+ review: {
140
+ seedChallenge: {
141
+ blob: string;
142
+ challengeType: "PSD";
143
+ certificate: {
144
+ signature: string;
145
+ codeHash: string;
146
+ attestationPub: string;
147
+ certificate: string;
148
+ };
149
+ wActions: string[];
150
+ handshake: string;
151
+ handshakeAttestation: {
152
+ signature: string;
153
+ codeHash: string;
154
+ attestationPub: string;
155
+ certificate: string;
156
+ };
157
+ partitionId: string;
158
+ ephemeralPublicKey: string;
159
+ kkHandshake: string;
160
+ kkHandshakeAttestation: {
161
+ signature: string;
162
+ codeHash: string;
163
+ attestationPub: string;
164
+ certificate: string;
165
+ };
166
+ };
167
+ seedFragment: {
168
+ handshake: string;
169
+ handshakeAttestation: {
170
+ signature: string;
171
+ codeHash: string;
172
+ attestationPub: string;
173
+ certificate: string;
174
+ };
175
+ approverBlob: string;
176
+ challengeResponse: string;
177
+ } | null;
178
+ } | null;
179
+ }[];
180
+ }>;
181
+ /**
182
+ * Wrapping Key provisioning
183
+ */
184
+ readonly PENDING_WRAPPING_KEY_PROVISIONING: ({ state, engine }: {
185
+ engine: Engine<WithOnboarding>;
186
+ state: OnboardingFullStateResponse;
187
+ }, logger: Logger) => Promise<{
188
+ id: string;
189
+ workspaceName: string;
190
+ createdAt: Date;
191
+ wrappingKey: {
192
+ ephemeralPubKey: string;
193
+ ephemeralCertificate: {
194
+ signature: string;
195
+ codeHash: string;
196
+ attestationPub: string;
197
+ certificate: string;
198
+ };
199
+ fragments: {
200
+ pubKey: string;
201
+ blob: string;
202
+ ephemeralPubKey: string;
203
+ ephemeralCertificate: {
204
+ signature: string;
205
+ codeHash: string;
206
+ attestationPub: string;
207
+ certificate: string;
208
+ };
209
+ }[];
210
+ } | null;
211
+ step: "COMPLETED" | "PENDING_DEVICE_CLAIMS" | "PENDING_WRAPPING_KEY_PROVISIONING" | "PENDING_MASTER_ADMINS_REGISTRATION_INIT" | "PENDING_MASTER_ADMINS_REGISTRATION" | "PENDING_SHARED_OWNERS_REGISTRATION_INIT" | "PENDING_SHARED_OWNERS_REGISTRATION" | "PENDING_REVIEW_BY_MASTER_ADMINS" | "PENDING_SEED_PROVISIONING" | "PENDING_WORKSPACE_INITIALIZATION";
212
+ completedAt: Date | null;
213
+ claimedDevices: {
214
+ pubKey: string;
215
+ deviceUserId: string;
216
+ role: "WRAPPING_KEY_OWNER" | "SHARED_OWNER" | "MASTER_ADMIN";
217
+ deviceName: string;
218
+ }[];
219
+ masterAdmins: {
220
+ name: string;
221
+ pubKey: string;
222
+ role: "MASTER_ADMIN";
223
+ psdModel: "BLUE" | "STAX";
224
+ registrationChallenge: {
225
+ requestId: string;
226
+ challenge: string;
227
+ handshake: string;
228
+ handshakeAttestation: {
229
+ signature: string;
230
+ codeHash: string;
231
+ attestationPub: string;
232
+ certificate: string;
233
+ };
234
+ ephemeralPublicKey: string;
235
+ ephemeralPublicKeyAttestation: {
236
+ signature: string;
237
+ codeHash: string;
238
+ attestationPub: string;
239
+ certificate: string;
240
+ };
241
+ u2fRegisterData: string;
242
+ ciphertext: string;
243
+ };
244
+ registrationResponse: {
245
+ u2fKeyHandle: string;
246
+ certificate: {
247
+ signature: string;
248
+ codeHash: string;
249
+ attestationPub: string;
250
+ certificate: string;
251
+ };
252
+ u2fRegister: string;
253
+ registerData: string;
254
+ validationKey: string;
255
+ pairingPayload: string;
256
+ } | null;
257
+ review: {
258
+ challenge: {
259
+ challengeType: "PSD";
260
+ wActions: string[];
261
+ handshake: string;
262
+ handshakeAttestation: {
263
+ signature: string;
264
+ codeHash: string;
265
+ attestationPub: string;
266
+ certificate: string;
267
+ };
268
+ partitionId: string;
269
+ };
270
+ signature: string | null;
271
+ } | null;
272
+ }[];
273
+ sharedOwners: {
274
+ name: string;
275
+ pubKey: string;
276
+ role: "SHARED_OWNER";
277
+ psdModel: "BLUE" | "STAX";
278
+ registrationChallenge: {
279
+ requestId: string;
280
+ challenge: string;
281
+ handshake: string;
282
+ handshakeAttestation: {
283
+ signature: string;
284
+ codeHash: string;
285
+ attestationPub: string;
286
+ certificate: string;
287
+ };
288
+ ephemeralPublicKey: string;
289
+ ephemeralPublicKeyAttestation: {
290
+ signature: string;
291
+ codeHash: string;
292
+ attestationPub: string;
293
+ certificate: string;
294
+ };
295
+ u2fRegisterData: string;
296
+ ciphertext: string;
297
+ };
298
+ registrationResponse: {
299
+ u2fKeyHandle: string;
300
+ certificate: {
301
+ signature: string;
302
+ codeHash: string;
303
+ attestationPub: string;
304
+ certificate: string;
305
+ };
306
+ u2fRegister: string;
307
+ registerData: string;
308
+ validationKey: string;
309
+ pairingPayload: string;
310
+ } | null;
311
+ review: {
312
+ seedChallenge: {
313
+ blob: string;
314
+ challengeType: "PSD";
315
+ certificate: {
316
+ signature: string;
317
+ codeHash: string;
318
+ attestationPub: string;
319
+ certificate: string;
320
+ };
321
+ wActions: string[];
322
+ handshake: string;
323
+ handshakeAttestation: {
324
+ signature: string;
325
+ codeHash: string;
326
+ attestationPub: string;
327
+ certificate: string;
328
+ };
329
+ partitionId: string;
330
+ ephemeralPublicKey: string;
331
+ kkHandshake: string;
332
+ kkHandshakeAttestation: {
333
+ signature: string;
334
+ codeHash: string;
335
+ attestationPub: string;
336
+ certificate: string;
337
+ };
338
+ };
339
+ seedFragment: {
340
+ handshake: string;
341
+ handshakeAttestation: {
342
+ signature: string;
343
+ codeHash: string;
344
+ attestationPub: string;
345
+ certificate: string;
346
+ };
347
+ approverBlob: string;
348
+ challengeResponse: string;
349
+ } | null;
350
+ } | null;
351
+ }[];
352
+ }>;
353
+ /**
354
+ * Init Master Admins registration
355
+ */
356
+ readonly PENDING_MASTER_ADMINS_REGISTRATION_INIT: ({ engine, state }: {
357
+ engine: Engine<WithOnboarding>;
358
+ state: OnboardingFullStateResponse;
359
+ }) => Promise<{
360
+ id: string;
361
+ workspaceName: string;
362
+ createdAt: Date;
363
+ wrappingKey: {
364
+ ephemeralPubKey: string;
365
+ ephemeralCertificate: {
366
+ signature: string;
367
+ codeHash: string;
368
+ attestationPub: string;
369
+ certificate: string;
370
+ };
371
+ fragments: {
372
+ pubKey: string;
373
+ blob: string;
374
+ ephemeralPubKey: string;
375
+ ephemeralCertificate: {
376
+ signature: string;
377
+ codeHash: string;
378
+ attestationPub: string;
379
+ certificate: string;
380
+ };
381
+ }[];
382
+ } | null;
383
+ step: "COMPLETED" | "PENDING_DEVICE_CLAIMS" | "PENDING_WRAPPING_KEY_PROVISIONING" | "PENDING_MASTER_ADMINS_REGISTRATION_INIT" | "PENDING_MASTER_ADMINS_REGISTRATION" | "PENDING_SHARED_OWNERS_REGISTRATION_INIT" | "PENDING_SHARED_OWNERS_REGISTRATION" | "PENDING_REVIEW_BY_MASTER_ADMINS" | "PENDING_SEED_PROVISIONING" | "PENDING_WORKSPACE_INITIALIZATION";
384
+ completedAt: Date | null;
385
+ claimedDevices: {
386
+ pubKey: string;
387
+ deviceUserId: string;
388
+ role: "WRAPPING_KEY_OWNER" | "SHARED_OWNER" | "MASTER_ADMIN";
389
+ deviceName: string;
390
+ }[];
391
+ masterAdmins: {
392
+ name: string;
393
+ pubKey: string;
394
+ role: "MASTER_ADMIN";
395
+ psdModel: "BLUE" | "STAX";
396
+ registrationChallenge: {
397
+ requestId: string;
398
+ challenge: string;
399
+ handshake: string;
400
+ handshakeAttestation: {
401
+ signature: string;
402
+ codeHash: string;
403
+ attestationPub: string;
404
+ certificate: string;
405
+ };
406
+ ephemeralPublicKey: string;
407
+ ephemeralPublicKeyAttestation: {
408
+ signature: string;
409
+ codeHash: string;
410
+ attestationPub: string;
411
+ certificate: string;
412
+ };
413
+ u2fRegisterData: string;
414
+ ciphertext: string;
415
+ };
416
+ registrationResponse: {
417
+ u2fKeyHandle: string;
418
+ certificate: {
419
+ signature: string;
420
+ codeHash: string;
421
+ attestationPub: string;
422
+ certificate: string;
423
+ };
424
+ u2fRegister: string;
425
+ registerData: string;
426
+ validationKey: string;
427
+ pairingPayload: string;
428
+ } | null;
429
+ review: {
430
+ challenge: {
431
+ challengeType: "PSD";
432
+ wActions: string[];
433
+ handshake: string;
434
+ handshakeAttestation: {
435
+ signature: string;
436
+ codeHash: string;
437
+ attestationPub: string;
438
+ certificate: string;
439
+ };
440
+ partitionId: string;
441
+ };
442
+ signature: string | null;
443
+ } | null;
444
+ }[];
445
+ sharedOwners: {
446
+ name: string;
447
+ pubKey: string;
448
+ role: "SHARED_OWNER";
449
+ psdModel: "BLUE" | "STAX";
450
+ registrationChallenge: {
451
+ requestId: string;
452
+ challenge: string;
453
+ handshake: string;
454
+ handshakeAttestation: {
455
+ signature: string;
456
+ codeHash: string;
457
+ attestationPub: string;
458
+ certificate: string;
459
+ };
460
+ ephemeralPublicKey: string;
461
+ ephemeralPublicKeyAttestation: {
462
+ signature: string;
463
+ codeHash: string;
464
+ attestationPub: string;
465
+ certificate: string;
466
+ };
467
+ u2fRegisterData: string;
468
+ ciphertext: string;
469
+ };
470
+ registrationResponse: {
471
+ u2fKeyHandle: string;
472
+ certificate: {
473
+ signature: string;
474
+ codeHash: string;
475
+ attestationPub: string;
476
+ certificate: string;
477
+ };
478
+ u2fRegister: string;
479
+ registerData: string;
480
+ validationKey: string;
481
+ pairingPayload: string;
482
+ } | null;
483
+ review: {
484
+ seedChallenge: {
485
+ blob: string;
486
+ challengeType: "PSD";
487
+ certificate: {
488
+ signature: string;
489
+ codeHash: string;
490
+ attestationPub: string;
491
+ certificate: string;
492
+ };
493
+ wActions: string[];
494
+ handshake: string;
495
+ handshakeAttestation: {
496
+ signature: string;
497
+ codeHash: string;
498
+ attestationPub: string;
499
+ certificate: string;
500
+ };
501
+ partitionId: string;
502
+ ephemeralPublicKey: string;
503
+ kkHandshake: string;
504
+ kkHandshakeAttestation: {
505
+ signature: string;
506
+ codeHash: string;
507
+ attestationPub: string;
508
+ certificate: string;
509
+ };
510
+ };
511
+ seedFragment: {
512
+ handshake: string;
513
+ handshakeAttestation: {
514
+ signature: string;
515
+ codeHash: string;
516
+ attestationPub: string;
517
+ certificate: string;
518
+ };
519
+ approverBlob: string;
520
+ challengeResponse: string;
521
+ } | null;
522
+ } | null;
523
+ }[];
524
+ }>;
525
+ /**
526
+ * Master Admins registration
527
+ */
528
+ readonly PENDING_MASTER_ADMINS_REGISTRATION: ({ state, engine }: {
529
+ engine: Engine<WithOnboarding>;
530
+ state: OnboardingFullStateResponse;
531
+ }, logger: Logger) => Promise<{
532
+ id: string;
533
+ workspaceName: string;
534
+ createdAt: Date;
535
+ wrappingKey: {
536
+ ephemeralPubKey: string;
537
+ ephemeralCertificate: {
538
+ signature: string;
539
+ codeHash: string;
540
+ attestationPub: string;
541
+ certificate: string;
542
+ };
543
+ fragments: {
544
+ pubKey: string;
545
+ blob: string;
546
+ ephemeralPubKey: string;
547
+ ephemeralCertificate: {
548
+ signature: string;
549
+ codeHash: string;
550
+ attestationPub: string;
551
+ certificate: string;
552
+ };
553
+ }[];
554
+ } | null;
555
+ step: "COMPLETED" | "PENDING_DEVICE_CLAIMS" | "PENDING_WRAPPING_KEY_PROVISIONING" | "PENDING_MASTER_ADMINS_REGISTRATION_INIT" | "PENDING_MASTER_ADMINS_REGISTRATION" | "PENDING_SHARED_OWNERS_REGISTRATION_INIT" | "PENDING_SHARED_OWNERS_REGISTRATION" | "PENDING_REVIEW_BY_MASTER_ADMINS" | "PENDING_SEED_PROVISIONING" | "PENDING_WORKSPACE_INITIALIZATION";
556
+ completedAt: Date | null;
557
+ claimedDevices: {
558
+ pubKey: string;
559
+ deviceUserId: string;
560
+ role: "WRAPPING_KEY_OWNER" | "SHARED_OWNER" | "MASTER_ADMIN";
561
+ deviceName: string;
562
+ }[];
563
+ masterAdmins: {
564
+ name: string;
565
+ pubKey: string;
566
+ role: "MASTER_ADMIN";
567
+ psdModel: "BLUE" | "STAX";
568
+ registrationChallenge: {
569
+ requestId: string;
570
+ challenge: string;
571
+ handshake: string;
572
+ handshakeAttestation: {
573
+ signature: string;
574
+ codeHash: string;
575
+ attestationPub: string;
576
+ certificate: string;
577
+ };
578
+ ephemeralPublicKey: string;
579
+ ephemeralPublicKeyAttestation: {
580
+ signature: string;
581
+ codeHash: string;
582
+ attestationPub: string;
583
+ certificate: string;
584
+ };
585
+ u2fRegisterData: string;
586
+ ciphertext: string;
587
+ };
588
+ registrationResponse: {
589
+ u2fKeyHandle: string;
590
+ certificate: {
591
+ signature: string;
592
+ codeHash: string;
593
+ attestationPub: string;
594
+ certificate: string;
595
+ };
596
+ u2fRegister: string;
597
+ registerData: string;
598
+ validationKey: string;
599
+ pairingPayload: string;
600
+ } | null;
601
+ review: {
602
+ challenge: {
603
+ challengeType: "PSD";
604
+ wActions: string[];
605
+ handshake: string;
606
+ handshakeAttestation: {
607
+ signature: string;
608
+ codeHash: string;
609
+ attestationPub: string;
610
+ certificate: string;
611
+ };
612
+ partitionId: string;
613
+ };
614
+ signature: string | null;
615
+ } | null;
616
+ }[];
617
+ sharedOwners: {
618
+ name: string;
619
+ pubKey: string;
620
+ role: "SHARED_OWNER";
621
+ psdModel: "BLUE" | "STAX";
622
+ registrationChallenge: {
623
+ requestId: string;
624
+ challenge: string;
625
+ handshake: string;
626
+ handshakeAttestation: {
627
+ signature: string;
628
+ codeHash: string;
629
+ attestationPub: string;
630
+ certificate: string;
631
+ };
632
+ ephemeralPublicKey: string;
633
+ ephemeralPublicKeyAttestation: {
634
+ signature: string;
635
+ codeHash: string;
636
+ attestationPub: string;
637
+ certificate: string;
638
+ };
639
+ u2fRegisterData: string;
640
+ ciphertext: string;
641
+ };
642
+ registrationResponse: {
643
+ u2fKeyHandle: string;
644
+ certificate: {
645
+ signature: string;
646
+ codeHash: string;
647
+ attestationPub: string;
648
+ certificate: string;
649
+ };
650
+ u2fRegister: string;
651
+ registerData: string;
652
+ validationKey: string;
653
+ pairingPayload: string;
654
+ } | null;
655
+ review: {
656
+ seedChallenge: {
657
+ blob: string;
658
+ challengeType: "PSD";
659
+ certificate: {
660
+ signature: string;
661
+ codeHash: string;
662
+ attestationPub: string;
663
+ certificate: string;
664
+ };
665
+ wActions: string[];
666
+ handshake: string;
667
+ handshakeAttestation: {
668
+ signature: string;
669
+ codeHash: string;
670
+ attestationPub: string;
671
+ certificate: string;
672
+ };
673
+ partitionId: string;
674
+ ephemeralPublicKey: string;
675
+ kkHandshake: string;
676
+ kkHandshakeAttestation: {
677
+ signature: string;
678
+ codeHash: string;
679
+ attestationPub: string;
680
+ certificate: string;
681
+ };
682
+ };
683
+ seedFragment: {
684
+ handshake: string;
685
+ handshakeAttestation: {
686
+ signature: string;
687
+ codeHash: string;
688
+ attestationPub: string;
689
+ certificate: string;
690
+ };
691
+ approverBlob: string;
692
+ challengeResponse: string;
693
+ } | null;
694
+ } | null;
695
+ }[];
696
+ }>;
697
+ /**
698
+ * Init Shared Owners registration
699
+ */
700
+ readonly PENDING_SHARED_OWNERS_REGISTRATION_INIT: ({ engine, state }: {
701
+ engine: Engine<WithOnboarding>;
702
+ state: OnboardingFullStateResponse;
703
+ }) => Promise<{
704
+ id: string;
705
+ workspaceName: string;
706
+ createdAt: Date;
707
+ wrappingKey: {
708
+ ephemeralPubKey: string;
709
+ ephemeralCertificate: {
710
+ signature: string;
711
+ codeHash: string;
712
+ attestationPub: string;
713
+ certificate: string;
714
+ };
715
+ fragments: {
716
+ pubKey: string;
717
+ blob: string;
718
+ ephemeralPubKey: string;
719
+ ephemeralCertificate: {
720
+ signature: string;
721
+ codeHash: string;
722
+ attestationPub: string;
723
+ certificate: string;
724
+ };
725
+ }[];
726
+ } | null;
727
+ step: "COMPLETED" | "PENDING_DEVICE_CLAIMS" | "PENDING_WRAPPING_KEY_PROVISIONING" | "PENDING_MASTER_ADMINS_REGISTRATION_INIT" | "PENDING_MASTER_ADMINS_REGISTRATION" | "PENDING_SHARED_OWNERS_REGISTRATION_INIT" | "PENDING_SHARED_OWNERS_REGISTRATION" | "PENDING_REVIEW_BY_MASTER_ADMINS" | "PENDING_SEED_PROVISIONING" | "PENDING_WORKSPACE_INITIALIZATION";
728
+ completedAt: Date | null;
729
+ claimedDevices: {
730
+ pubKey: string;
731
+ deviceUserId: string;
732
+ role: "WRAPPING_KEY_OWNER" | "SHARED_OWNER" | "MASTER_ADMIN";
733
+ deviceName: string;
734
+ }[];
735
+ masterAdmins: {
736
+ name: string;
737
+ pubKey: string;
738
+ role: "MASTER_ADMIN";
739
+ psdModel: "BLUE" | "STAX";
740
+ registrationChallenge: {
741
+ requestId: string;
742
+ challenge: string;
743
+ handshake: string;
744
+ handshakeAttestation: {
745
+ signature: string;
746
+ codeHash: string;
747
+ attestationPub: string;
748
+ certificate: string;
749
+ };
750
+ ephemeralPublicKey: string;
751
+ ephemeralPublicKeyAttestation: {
752
+ signature: string;
753
+ codeHash: string;
754
+ attestationPub: string;
755
+ certificate: string;
756
+ };
757
+ u2fRegisterData: string;
758
+ ciphertext: string;
759
+ };
760
+ registrationResponse: {
761
+ u2fKeyHandle: string;
762
+ certificate: {
763
+ signature: string;
764
+ codeHash: string;
765
+ attestationPub: string;
766
+ certificate: string;
767
+ };
768
+ u2fRegister: string;
769
+ registerData: string;
770
+ validationKey: string;
771
+ pairingPayload: string;
772
+ } | null;
773
+ review: {
774
+ challenge: {
775
+ challengeType: "PSD";
776
+ wActions: string[];
777
+ handshake: string;
778
+ handshakeAttestation: {
779
+ signature: string;
780
+ codeHash: string;
781
+ attestationPub: string;
782
+ certificate: string;
783
+ };
784
+ partitionId: string;
785
+ };
786
+ signature: string | null;
787
+ } | null;
788
+ }[];
789
+ sharedOwners: {
790
+ name: string;
791
+ pubKey: string;
792
+ role: "SHARED_OWNER";
793
+ psdModel: "BLUE" | "STAX";
794
+ registrationChallenge: {
795
+ requestId: string;
796
+ challenge: string;
797
+ handshake: string;
798
+ handshakeAttestation: {
799
+ signature: string;
800
+ codeHash: string;
801
+ attestationPub: string;
802
+ certificate: string;
803
+ };
804
+ ephemeralPublicKey: string;
805
+ ephemeralPublicKeyAttestation: {
806
+ signature: string;
807
+ codeHash: string;
808
+ attestationPub: string;
809
+ certificate: string;
810
+ };
811
+ u2fRegisterData: string;
812
+ ciphertext: string;
813
+ };
814
+ registrationResponse: {
815
+ u2fKeyHandle: string;
816
+ certificate: {
817
+ signature: string;
818
+ codeHash: string;
819
+ attestationPub: string;
820
+ certificate: string;
821
+ };
822
+ u2fRegister: string;
823
+ registerData: string;
824
+ validationKey: string;
825
+ pairingPayload: string;
826
+ } | null;
827
+ review: {
828
+ seedChallenge: {
829
+ blob: string;
830
+ challengeType: "PSD";
831
+ certificate: {
832
+ signature: string;
833
+ codeHash: string;
834
+ attestationPub: string;
835
+ certificate: string;
836
+ };
837
+ wActions: string[];
838
+ handshake: string;
839
+ handshakeAttestation: {
840
+ signature: string;
841
+ codeHash: string;
842
+ attestationPub: string;
843
+ certificate: string;
844
+ };
845
+ partitionId: string;
846
+ ephemeralPublicKey: string;
847
+ kkHandshake: string;
848
+ kkHandshakeAttestation: {
849
+ signature: string;
850
+ codeHash: string;
851
+ attestationPub: string;
852
+ certificate: string;
853
+ };
854
+ };
855
+ seedFragment: {
856
+ handshake: string;
857
+ handshakeAttestation: {
858
+ signature: string;
859
+ codeHash: string;
860
+ attestationPub: string;
861
+ certificate: string;
862
+ };
863
+ approverBlob: string;
864
+ challengeResponse: string;
865
+ } | null;
866
+ } | null;
867
+ }[];
868
+ }>;
869
+ /**
870
+ * Shared Owners registration
871
+ */
872
+ readonly PENDING_SHARED_OWNERS_REGISTRATION: ({ state, engine }: {
873
+ engine: Engine<WithOnboarding>;
874
+ state: OnboardingFullStateResponse;
875
+ }, logger: Logger) => Promise<{
876
+ id: string;
877
+ workspaceName: string;
878
+ createdAt: Date;
879
+ wrappingKey: {
880
+ ephemeralPubKey: string;
881
+ ephemeralCertificate: {
882
+ signature: string;
883
+ codeHash: string;
884
+ attestationPub: string;
885
+ certificate: string;
886
+ };
887
+ fragments: {
888
+ pubKey: string;
889
+ blob: string;
890
+ ephemeralPubKey: string;
891
+ ephemeralCertificate: {
892
+ signature: string;
893
+ codeHash: string;
894
+ attestationPub: string;
895
+ certificate: string;
896
+ };
897
+ }[];
898
+ } | null;
899
+ step: "COMPLETED" | "PENDING_DEVICE_CLAIMS" | "PENDING_WRAPPING_KEY_PROVISIONING" | "PENDING_MASTER_ADMINS_REGISTRATION_INIT" | "PENDING_MASTER_ADMINS_REGISTRATION" | "PENDING_SHARED_OWNERS_REGISTRATION_INIT" | "PENDING_SHARED_OWNERS_REGISTRATION" | "PENDING_REVIEW_BY_MASTER_ADMINS" | "PENDING_SEED_PROVISIONING" | "PENDING_WORKSPACE_INITIALIZATION";
900
+ completedAt: Date | null;
901
+ claimedDevices: {
902
+ pubKey: string;
903
+ deviceUserId: string;
904
+ role: "WRAPPING_KEY_OWNER" | "SHARED_OWNER" | "MASTER_ADMIN";
905
+ deviceName: string;
906
+ }[];
907
+ masterAdmins: {
908
+ name: string;
909
+ pubKey: string;
910
+ role: "MASTER_ADMIN";
911
+ psdModel: "BLUE" | "STAX";
912
+ registrationChallenge: {
913
+ requestId: string;
914
+ challenge: string;
915
+ handshake: string;
916
+ handshakeAttestation: {
917
+ signature: string;
918
+ codeHash: string;
919
+ attestationPub: string;
920
+ certificate: string;
921
+ };
922
+ ephemeralPublicKey: string;
923
+ ephemeralPublicKeyAttestation: {
924
+ signature: string;
925
+ codeHash: string;
926
+ attestationPub: string;
927
+ certificate: string;
928
+ };
929
+ u2fRegisterData: string;
930
+ ciphertext: string;
931
+ };
932
+ registrationResponse: {
933
+ u2fKeyHandle: string;
934
+ certificate: {
935
+ signature: string;
936
+ codeHash: string;
937
+ attestationPub: string;
938
+ certificate: string;
939
+ };
940
+ u2fRegister: string;
941
+ registerData: string;
942
+ validationKey: string;
943
+ pairingPayload: string;
944
+ } | null;
945
+ review: {
946
+ challenge: {
947
+ challengeType: "PSD";
948
+ wActions: string[];
949
+ handshake: string;
950
+ handshakeAttestation: {
951
+ signature: string;
952
+ codeHash: string;
953
+ attestationPub: string;
954
+ certificate: string;
955
+ };
956
+ partitionId: string;
957
+ };
958
+ signature: string | null;
959
+ } | null;
960
+ }[];
961
+ sharedOwners: {
962
+ name: string;
963
+ pubKey: string;
964
+ role: "SHARED_OWNER";
965
+ psdModel: "BLUE" | "STAX";
966
+ registrationChallenge: {
967
+ requestId: string;
968
+ challenge: string;
969
+ handshake: string;
970
+ handshakeAttestation: {
971
+ signature: string;
972
+ codeHash: string;
973
+ attestationPub: string;
974
+ certificate: string;
975
+ };
976
+ ephemeralPublicKey: string;
977
+ ephemeralPublicKeyAttestation: {
978
+ signature: string;
979
+ codeHash: string;
980
+ attestationPub: string;
981
+ certificate: string;
982
+ };
983
+ u2fRegisterData: string;
984
+ ciphertext: string;
985
+ };
986
+ registrationResponse: {
987
+ u2fKeyHandle: string;
988
+ certificate: {
989
+ signature: string;
990
+ codeHash: string;
991
+ attestationPub: string;
992
+ certificate: string;
993
+ };
994
+ u2fRegister: string;
995
+ registerData: string;
996
+ validationKey: string;
997
+ pairingPayload: string;
998
+ } | null;
999
+ review: {
1000
+ seedChallenge: {
1001
+ blob: string;
1002
+ challengeType: "PSD";
1003
+ certificate: {
1004
+ signature: string;
1005
+ codeHash: string;
1006
+ attestationPub: string;
1007
+ certificate: string;
1008
+ };
1009
+ wActions: string[];
1010
+ handshake: string;
1011
+ handshakeAttestation: {
1012
+ signature: string;
1013
+ codeHash: string;
1014
+ attestationPub: string;
1015
+ certificate: string;
1016
+ };
1017
+ partitionId: string;
1018
+ ephemeralPublicKey: string;
1019
+ kkHandshake: string;
1020
+ kkHandshakeAttestation: {
1021
+ signature: string;
1022
+ codeHash: string;
1023
+ attestationPub: string;
1024
+ certificate: string;
1025
+ };
1026
+ };
1027
+ seedFragment: {
1028
+ handshake: string;
1029
+ handshakeAttestation: {
1030
+ signature: string;
1031
+ codeHash: string;
1032
+ attestationPub: string;
1033
+ certificate: string;
1034
+ };
1035
+ approverBlob: string;
1036
+ challengeResponse: string;
1037
+ } | null;
1038
+ } | null;
1039
+ }[];
1040
+ }>;
1041
+ /**
1042
+ * Review by master admins
1043
+ */
1044
+ readonly PENDING_REVIEW_BY_MASTER_ADMINS: ({ state, engine }: {
1045
+ engine: Engine<WithOnboarding>;
1046
+ state: OnboardingFullStateResponse;
1047
+ }, logger: Logger) => Promise<{
1048
+ id: string;
1049
+ workspaceName: string;
1050
+ createdAt: Date;
1051
+ wrappingKey: {
1052
+ ephemeralPubKey: string;
1053
+ ephemeralCertificate: {
1054
+ signature: string;
1055
+ codeHash: string;
1056
+ attestationPub: string;
1057
+ certificate: string;
1058
+ };
1059
+ fragments: {
1060
+ pubKey: string;
1061
+ blob: string;
1062
+ ephemeralPubKey: string;
1063
+ ephemeralCertificate: {
1064
+ signature: string;
1065
+ codeHash: string;
1066
+ attestationPub: string;
1067
+ certificate: string;
1068
+ };
1069
+ }[];
1070
+ } | null;
1071
+ step: "COMPLETED" | "PENDING_DEVICE_CLAIMS" | "PENDING_WRAPPING_KEY_PROVISIONING" | "PENDING_MASTER_ADMINS_REGISTRATION_INIT" | "PENDING_MASTER_ADMINS_REGISTRATION" | "PENDING_SHARED_OWNERS_REGISTRATION_INIT" | "PENDING_SHARED_OWNERS_REGISTRATION" | "PENDING_REVIEW_BY_MASTER_ADMINS" | "PENDING_SEED_PROVISIONING" | "PENDING_WORKSPACE_INITIALIZATION";
1072
+ completedAt: Date | null;
1073
+ claimedDevices: {
1074
+ pubKey: string;
1075
+ deviceUserId: string;
1076
+ role: "WRAPPING_KEY_OWNER" | "SHARED_OWNER" | "MASTER_ADMIN";
1077
+ deviceName: string;
1078
+ }[];
1079
+ masterAdmins: {
1080
+ name: string;
1081
+ pubKey: string;
1082
+ role: "MASTER_ADMIN";
1083
+ psdModel: "BLUE" | "STAX";
1084
+ registrationChallenge: {
1085
+ requestId: string;
1086
+ challenge: string;
1087
+ handshake: string;
1088
+ handshakeAttestation: {
1089
+ signature: string;
1090
+ codeHash: string;
1091
+ attestationPub: string;
1092
+ certificate: string;
1093
+ };
1094
+ ephemeralPublicKey: string;
1095
+ ephemeralPublicKeyAttestation: {
1096
+ signature: string;
1097
+ codeHash: string;
1098
+ attestationPub: string;
1099
+ certificate: string;
1100
+ };
1101
+ u2fRegisterData: string;
1102
+ ciphertext: string;
1103
+ };
1104
+ registrationResponse: {
1105
+ u2fKeyHandle: string;
1106
+ certificate: {
1107
+ signature: string;
1108
+ codeHash: string;
1109
+ attestationPub: string;
1110
+ certificate: string;
1111
+ };
1112
+ u2fRegister: string;
1113
+ registerData: string;
1114
+ validationKey: string;
1115
+ pairingPayload: string;
1116
+ } | null;
1117
+ review: {
1118
+ challenge: {
1119
+ challengeType: "PSD";
1120
+ wActions: string[];
1121
+ handshake: string;
1122
+ handshakeAttestation: {
1123
+ signature: string;
1124
+ codeHash: string;
1125
+ attestationPub: string;
1126
+ certificate: string;
1127
+ };
1128
+ partitionId: string;
1129
+ };
1130
+ signature: string | null;
1131
+ } | null;
1132
+ }[];
1133
+ sharedOwners: {
1134
+ name: string;
1135
+ pubKey: string;
1136
+ role: "SHARED_OWNER";
1137
+ psdModel: "BLUE" | "STAX";
1138
+ registrationChallenge: {
1139
+ requestId: string;
1140
+ challenge: string;
1141
+ handshake: string;
1142
+ handshakeAttestation: {
1143
+ signature: string;
1144
+ codeHash: string;
1145
+ attestationPub: string;
1146
+ certificate: string;
1147
+ };
1148
+ ephemeralPublicKey: string;
1149
+ ephemeralPublicKeyAttestation: {
1150
+ signature: string;
1151
+ codeHash: string;
1152
+ attestationPub: string;
1153
+ certificate: string;
1154
+ };
1155
+ u2fRegisterData: string;
1156
+ ciphertext: string;
1157
+ };
1158
+ registrationResponse: {
1159
+ u2fKeyHandle: string;
1160
+ certificate: {
1161
+ signature: string;
1162
+ codeHash: string;
1163
+ attestationPub: string;
1164
+ certificate: string;
1165
+ };
1166
+ u2fRegister: string;
1167
+ registerData: string;
1168
+ validationKey: string;
1169
+ pairingPayload: string;
1170
+ } | null;
1171
+ review: {
1172
+ seedChallenge: {
1173
+ blob: string;
1174
+ challengeType: "PSD";
1175
+ certificate: {
1176
+ signature: string;
1177
+ codeHash: string;
1178
+ attestationPub: string;
1179
+ certificate: string;
1180
+ };
1181
+ wActions: string[];
1182
+ handshake: string;
1183
+ handshakeAttestation: {
1184
+ signature: string;
1185
+ codeHash: string;
1186
+ attestationPub: string;
1187
+ certificate: string;
1188
+ };
1189
+ partitionId: string;
1190
+ ephemeralPublicKey: string;
1191
+ kkHandshake: string;
1192
+ kkHandshakeAttestation: {
1193
+ signature: string;
1194
+ codeHash: string;
1195
+ attestationPub: string;
1196
+ certificate: string;
1197
+ };
1198
+ };
1199
+ seedFragment: {
1200
+ handshake: string;
1201
+ handshakeAttestation: {
1202
+ signature: string;
1203
+ codeHash: string;
1204
+ attestationPub: string;
1205
+ certificate: string;
1206
+ };
1207
+ approverBlob: string;
1208
+ challengeResponse: string;
1209
+ } | null;
1210
+ } | null;
1211
+ }[];
1212
+ }>;
1213
+ /**
1214
+ * Seed provisioning
1215
+ */
1216
+ readonly PENDING_SEED_PROVISIONING: ({ state, engine }: {
1217
+ engine: Engine<WithOnboarding>;
1218
+ state: OnboardingFullStateResponse;
1219
+ }, logger: Logger) => Promise<{
1220
+ id: string;
1221
+ workspaceName: string;
1222
+ createdAt: Date;
1223
+ wrappingKey: {
1224
+ ephemeralPubKey: string;
1225
+ ephemeralCertificate: {
1226
+ signature: string;
1227
+ codeHash: string;
1228
+ attestationPub: string;
1229
+ certificate: string;
1230
+ };
1231
+ fragments: {
1232
+ pubKey: string;
1233
+ blob: string;
1234
+ ephemeralPubKey: string;
1235
+ ephemeralCertificate: {
1236
+ signature: string;
1237
+ codeHash: string;
1238
+ attestationPub: string;
1239
+ certificate: string;
1240
+ };
1241
+ }[];
1242
+ } | null;
1243
+ step: "COMPLETED" | "PENDING_DEVICE_CLAIMS" | "PENDING_WRAPPING_KEY_PROVISIONING" | "PENDING_MASTER_ADMINS_REGISTRATION_INIT" | "PENDING_MASTER_ADMINS_REGISTRATION" | "PENDING_SHARED_OWNERS_REGISTRATION_INIT" | "PENDING_SHARED_OWNERS_REGISTRATION" | "PENDING_REVIEW_BY_MASTER_ADMINS" | "PENDING_SEED_PROVISIONING" | "PENDING_WORKSPACE_INITIALIZATION";
1244
+ completedAt: Date | null;
1245
+ claimedDevices: {
1246
+ pubKey: string;
1247
+ deviceUserId: string;
1248
+ role: "WRAPPING_KEY_OWNER" | "SHARED_OWNER" | "MASTER_ADMIN";
1249
+ deviceName: string;
1250
+ }[];
1251
+ masterAdmins: {
1252
+ name: string;
1253
+ pubKey: string;
1254
+ role: "MASTER_ADMIN";
1255
+ psdModel: "BLUE" | "STAX";
1256
+ registrationChallenge: {
1257
+ requestId: string;
1258
+ challenge: string;
1259
+ handshake: string;
1260
+ handshakeAttestation: {
1261
+ signature: string;
1262
+ codeHash: string;
1263
+ attestationPub: string;
1264
+ certificate: string;
1265
+ };
1266
+ ephemeralPublicKey: string;
1267
+ ephemeralPublicKeyAttestation: {
1268
+ signature: string;
1269
+ codeHash: string;
1270
+ attestationPub: string;
1271
+ certificate: string;
1272
+ };
1273
+ u2fRegisterData: string;
1274
+ ciphertext: string;
1275
+ };
1276
+ registrationResponse: {
1277
+ u2fKeyHandle: string;
1278
+ certificate: {
1279
+ signature: string;
1280
+ codeHash: string;
1281
+ attestationPub: string;
1282
+ certificate: string;
1283
+ };
1284
+ u2fRegister: string;
1285
+ registerData: string;
1286
+ validationKey: string;
1287
+ pairingPayload: string;
1288
+ } | null;
1289
+ review: {
1290
+ challenge: {
1291
+ challengeType: "PSD";
1292
+ wActions: string[];
1293
+ handshake: string;
1294
+ handshakeAttestation: {
1295
+ signature: string;
1296
+ codeHash: string;
1297
+ attestationPub: string;
1298
+ certificate: string;
1299
+ };
1300
+ partitionId: string;
1301
+ };
1302
+ signature: string | null;
1303
+ } | null;
1304
+ }[];
1305
+ sharedOwners: {
1306
+ name: string;
1307
+ pubKey: string;
1308
+ role: "SHARED_OWNER";
1309
+ psdModel: "BLUE" | "STAX";
1310
+ registrationChallenge: {
1311
+ requestId: string;
1312
+ challenge: string;
1313
+ handshake: string;
1314
+ handshakeAttestation: {
1315
+ signature: string;
1316
+ codeHash: string;
1317
+ attestationPub: string;
1318
+ certificate: string;
1319
+ };
1320
+ ephemeralPublicKey: string;
1321
+ ephemeralPublicKeyAttestation: {
1322
+ signature: string;
1323
+ codeHash: string;
1324
+ attestationPub: string;
1325
+ certificate: string;
1326
+ };
1327
+ u2fRegisterData: string;
1328
+ ciphertext: string;
1329
+ };
1330
+ registrationResponse: {
1331
+ u2fKeyHandle: string;
1332
+ certificate: {
1333
+ signature: string;
1334
+ codeHash: string;
1335
+ attestationPub: string;
1336
+ certificate: string;
1337
+ };
1338
+ u2fRegister: string;
1339
+ registerData: string;
1340
+ validationKey: string;
1341
+ pairingPayload: string;
1342
+ } | null;
1343
+ review: {
1344
+ seedChallenge: {
1345
+ blob: string;
1346
+ challengeType: "PSD";
1347
+ certificate: {
1348
+ signature: string;
1349
+ codeHash: string;
1350
+ attestationPub: string;
1351
+ certificate: string;
1352
+ };
1353
+ wActions: string[];
1354
+ handshake: string;
1355
+ handshakeAttestation: {
1356
+ signature: string;
1357
+ codeHash: string;
1358
+ attestationPub: string;
1359
+ certificate: string;
1360
+ };
1361
+ partitionId: string;
1362
+ ephemeralPublicKey: string;
1363
+ kkHandshake: string;
1364
+ kkHandshakeAttestation: {
1365
+ signature: string;
1366
+ codeHash: string;
1367
+ attestationPub: string;
1368
+ certificate: string;
1369
+ };
1370
+ };
1371
+ seedFragment: {
1372
+ handshake: string;
1373
+ handshakeAttestation: {
1374
+ signature: string;
1375
+ codeHash: string;
1376
+ attestationPub: string;
1377
+ certificate: string;
1378
+ };
1379
+ approverBlob: string;
1380
+ challengeResponse: string;
1381
+ } | null;
1382
+ } | null;
1383
+ }[];
1384
+ }>;
1385
+ /**
1386
+ * Workspace initialization
1387
+ */
1388
+ readonly PENDING_WORKSPACE_INITIALIZATION: ({ state, engine }: {
1389
+ engine: Engine<WithOnboarding>;
1390
+ state: OnboardingFullStateResponse;
1391
+ }) => Promise<{
1392
+ id: string;
1393
+ workspaceName: string;
1394
+ createdAt: Date;
1395
+ wrappingKey: {
1396
+ ephemeralPubKey: string;
1397
+ ephemeralCertificate: {
1398
+ signature: string;
1399
+ codeHash: string;
1400
+ attestationPub: string;
1401
+ certificate: string;
1402
+ };
1403
+ fragments: {
1404
+ pubKey: string;
1405
+ blob: string;
1406
+ ephemeralPubKey: string;
1407
+ ephemeralCertificate: {
1408
+ signature: string;
1409
+ codeHash: string;
1410
+ attestationPub: string;
1411
+ certificate: string;
1412
+ };
1413
+ }[];
1414
+ } | null;
1415
+ step: "COMPLETED" | "PENDING_DEVICE_CLAIMS" | "PENDING_WRAPPING_KEY_PROVISIONING" | "PENDING_MASTER_ADMINS_REGISTRATION_INIT" | "PENDING_MASTER_ADMINS_REGISTRATION" | "PENDING_SHARED_OWNERS_REGISTRATION_INIT" | "PENDING_SHARED_OWNERS_REGISTRATION" | "PENDING_REVIEW_BY_MASTER_ADMINS" | "PENDING_SEED_PROVISIONING" | "PENDING_WORKSPACE_INITIALIZATION";
1416
+ completedAt: Date | null;
1417
+ claimedDevices: {
1418
+ pubKey: string;
1419
+ deviceUserId: string;
1420
+ role: "WRAPPING_KEY_OWNER" | "SHARED_OWNER" | "MASTER_ADMIN";
1421
+ deviceName: string;
1422
+ }[];
1423
+ masterAdmins: {
1424
+ name: string;
1425
+ pubKey: string;
1426
+ role: "MASTER_ADMIN";
1427
+ psdModel: "BLUE" | "STAX";
1428
+ registrationChallenge: {
1429
+ requestId: string;
1430
+ challenge: string;
1431
+ handshake: string;
1432
+ handshakeAttestation: {
1433
+ signature: string;
1434
+ codeHash: string;
1435
+ attestationPub: string;
1436
+ certificate: string;
1437
+ };
1438
+ ephemeralPublicKey: string;
1439
+ ephemeralPublicKeyAttestation: {
1440
+ signature: string;
1441
+ codeHash: string;
1442
+ attestationPub: string;
1443
+ certificate: string;
1444
+ };
1445
+ u2fRegisterData: string;
1446
+ ciphertext: string;
1447
+ };
1448
+ registrationResponse: {
1449
+ u2fKeyHandle: string;
1450
+ certificate: {
1451
+ signature: string;
1452
+ codeHash: string;
1453
+ attestationPub: string;
1454
+ certificate: string;
1455
+ };
1456
+ u2fRegister: string;
1457
+ registerData: string;
1458
+ validationKey: string;
1459
+ pairingPayload: string;
1460
+ } | null;
1461
+ review: {
1462
+ challenge: {
1463
+ challengeType: "PSD";
1464
+ wActions: string[];
1465
+ handshake: string;
1466
+ handshakeAttestation: {
1467
+ signature: string;
1468
+ codeHash: string;
1469
+ attestationPub: string;
1470
+ certificate: string;
1471
+ };
1472
+ partitionId: string;
1473
+ };
1474
+ signature: string | null;
1475
+ } | null;
1476
+ }[];
1477
+ sharedOwners: {
1478
+ name: string;
1479
+ pubKey: string;
1480
+ role: "SHARED_OWNER";
1481
+ psdModel: "BLUE" | "STAX";
1482
+ registrationChallenge: {
1483
+ requestId: string;
1484
+ challenge: string;
1485
+ handshake: string;
1486
+ handshakeAttestation: {
1487
+ signature: string;
1488
+ codeHash: string;
1489
+ attestationPub: string;
1490
+ certificate: string;
1491
+ };
1492
+ ephemeralPublicKey: string;
1493
+ ephemeralPublicKeyAttestation: {
1494
+ signature: string;
1495
+ codeHash: string;
1496
+ attestationPub: string;
1497
+ certificate: string;
1498
+ };
1499
+ u2fRegisterData: string;
1500
+ ciphertext: string;
1501
+ };
1502
+ registrationResponse: {
1503
+ u2fKeyHandle: string;
1504
+ certificate: {
1505
+ signature: string;
1506
+ codeHash: string;
1507
+ attestationPub: string;
1508
+ certificate: string;
1509
+ };
1510
+ u2fRegister: string;
1511
+ registerData: string;
1512
+ validationKey: string;
1513
+ pairingPayload: string;
1514
+ } | null;
1515
+ review: {
1516
+ seedChallenge: {
1517
+ blob: string;
1518
+ challengeType: "PSD";
1519
+ certificate: {
1520
+ signature: string;
1521
+ codeHash: string;
1522
+ attestationPub: string;
1523
+ certificate: string;
1524
+ };
1525
+ wActions: string[];
1526
+ handshake: string;
1527
+ handshakeAttestation: {
1528
+ signature: string;
1529
+ codeHash: string;
1530
+ attestationPub: string;
1531
+ certificate: string;
1532
+ };
1533
+ partitionId: string;
1534
+ ephemeralPublicKey: string;
1535
+ kkHandshake: string;
1536
+ kkHandshakeAttestation: {
1537
+ signature: string;
1538
+ codeHash: string;
1539
+ attestationPub: string;
1540
+ certificate: string;
1541
+ };
1542
+ };
1543
+ seedFragment: {
1544
+ handshake: string;
1545
+ handshakeAttestation: {
1546
+ signature: string;
1547
+ codeHash: string;
1548
+ attestationPub: string;
1549
+ certificate: string;
1550
+ };
1551
+ approverBlob: string;
1552
+ challengeResponse: string;
1553
+ } | null;
1554
+ } | null;
1555
+ }[];
1556
+ }>;
1557
+ /**
1558
+ * Onboarding completed
1559
+ */
1560
+ readonly COMPLETED: ({ state }: {
1561
+ engine: Engine<WithOnboarding>;
1562
+ state: OnboardingFullStateResponse;
1563
+ }) => Promise<{
1564
+ id: string;
1565
+ workspaceName: string;
1566
+ createdAt: Date;
1567
+ wrappingKey: {
1568
+ ephemeralPubKey: string;
1569
+ ephemeralCertificate: {
1570
+ signature: string;
1571
+ codeHash: string;
1572
+ attestationPub: string;
1573
+ certificate: string;
1574
+ };
1575
+ fragments: {
1576
+ pubKey: string;
1577
+ blob: string;
1578
+ ephemeralPubKey: string;
1579
+ ephemeralCertificate: {
1580
+ signature: string;
1581
+ codeHash: string;
1582
+ attestationPub: string;
1583
+ certificate: string;
1584
+ };
1585
+ }[];
1586
+ } | null;
1587
+ step: "COMPLETED" | "PENDING_DEVICE_CLAIMS" | "PENDING_WRAPPING_KEY_PROVISIONING" | "PENDING_MASTER_ADMINS_REGISTRATION_INIT" | "PENDING_MASTER_ADMINS_REGISTRATION" | "PENDING_SHARED_OWNERS_REGISTRATION_INIT" | "PENDING_SHARED_OWNERS_REGISTRATION" | "PENDING_REVIEW_BY_MASTER_ADMINS" | "PENDING_SEED_PROVISIONING" | "PENDING_WORKSPACE_INITIALIZATION";
1588
+ completedAt: Date | null;
1589
+ claimedDevices: {
1590
+ pubKey: string;
1591
+ deviceUserId: string;
1592
+ role: "WRAPPING_KEY_OWNER" | "SHARED_OWNER" | "MASTER_ADMIN";
1593
+ deviceName: string;
1594
+ }[];
1595
+ masterAdmins: {
1596
+ name: string;
1597
+ pubKey: string;
1598
+ role: "MASTER_ADMIN";
1599
+ psdModel: "BLUE" | "STAX";
1600
+ registrationChallenge: {
1601
+ requestId: string;
1602
+ challenge: string;
1603
+ handshake: string;
1604
+ handshakeAttestation: {
1605
+ signature: string;
1606
+ codeHash: string;
1607
+ attestationPub: string;
1608
+ certificate: string;
1609
+ };
1610
+ ephemeralPublicKey: string;
1611
+ ephemeralPublicKeyAttestation: {
1612
+ signature: string;
1613
+ codeHash: string;
1614
+ attestationPub: string;
1615
+ certificate: string;
1616
+ };
1617
+ u2fRegisterData: string;
1618
+ ciphertext: string;
1619
+ };
1620
+ registrationResponse: {
1621
+ u2fKeyHandle: string;
1622
+ certificate: {
1623
+ signature: string;
1624
+ codeHash: string;
1625
+ attestationPub: string;
1626
+ certificate: string;
1627
+ };
1628
+ u2fRegister: string;
1629
+ registerData: string;
1630
+ validationKey: string;
1631
+ pairingPayload: string;
1632
+ } | null;
1633
+ review: {
1634
+ challenge: {
1635
+ challengeType: "PSD";
1636
+ wActions: string[];
1637
+ handshake: string;
1638
+ handshakeAttestation: {
1639
+ signature: string;
1640
+ codeHash: string;
1641
+ attestationPub: string;
1642
+ certificate: string;
1643
+ };
1644
+ partitionId: string;
1645
+ };
1646
+ signature: string | null;
1647
+ } | null;
1648
+ }[];
1649
+ sharedOwners: {
1650
+ name: string;
1651
+ pubKey: string;
1652
+ role: "SHARED_OWNER";
1653
+ psdModel: "BLUE" | "STAX";
1654
+ registrationChallenge: {
1655
+ requestId: string;
1656
+ challenge: string;
1657
+ handshake: string;
1658
+ handshakeAttestation: {
1659
+ signature: string;
1660
+ codeHash: string;
1661
+ attestationPub: string;
1662
+ certificate: string;
1663
+ };
1664
+ ephemeralPublicKey: string;
1665
+ ephemeralPublicKeyAttestation: {
1666
+ signature: string;
1667
+ codeHash: string;
1668
+ attestationPub: string;
1669
+ certificate: string;
1670
+ };
1671
+ u2fRegisterData: string;
1672
+ ciphertext: string;
1673
+ };
1674
+ registrationResponse: {
1675
+ u2fKeyHandle: string;
1676
+ certificate: {
1677
+ signature: string;
1678
+ codeHash: string;
1679
+ attestationPub: string;
1680
+ certificate: string;
1681
+ };
1682
+ u2fRegister: string;
1683
+ registerData: string;
1684
+ validationKey: string;
1685
+ pairingPayload: string;
1686
+ } | null;
1687
+ review: {
1688
+ seedChallenge: {
1689
+ blob: string;
1690
+ challengeType: "PSD";
1691
+ certificate: {
1692
+ signature: string;
1693
+ codeHash: string;
1694
+ attestationPub: string;
1695
+ certificate: string;
1696
+ };
1697
+ wActions: string[];
1698
+ handshake: string;
1699
+ handshakeAttestation: {
1700
+ signature: string;
1701
+ codeHash: string;
1702
+ attestationPub: string;
1703
+ certificate: string;
1704
+ };
1705
+ partitionId: string;
1706
+ ephemeralPublicKey: string;
1707
+ kkHandshake: string;
1708
+ kkHandshakeAttestation: {
1709
+ signature: string;
1710
+ codeHash: string;
1711
+ attestationPub: string;
1712
+ certificate: string;
1713
+ };
1714
+ };
1715
+ seedFragment: {
1716
+ handshake: string;
1717
+ handshakeAttestation: {
1718
+ signature: string;
1719
+ codeHash: string;
1720
+ attestationPub: string;
1721
+ certificate: string;
1722
+ };
1723
+ approverBlob: string;
1724
+ challengeResponse: string;
1725
+ } | null;
1726
+ } | null;
1727
+ }[];
1728
+ }>;
1729
+ };
1730
+ declare function onboard({ engine, untilStep, }: {
1731
+ engine: Engine<WithOnboarding>;
1732
+ untilStep?: OnboardingStep;
1733
+ }, logger: Logger): Promise<void>;
1734
+
1735
+ export { STEPS, onboard };