@lifeready/core 1.0.11 → 1.0.13

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 (36) hide show
  1. package/bundles/lifeready-core.umd.js +1017 -66
  2. package/bundles/lifeready-core.umd.js.map +1 -1
  3. package/bundles/lifeready-core.umd.min.js +2 -2
  4. package/bundles/lifeready-core.umd.min.js.map +1 -1
  5. package/esm2015/lib/api/types/lr-graphql.types.js +1 -1
  6. package/esm2015/lib/scenario/scenario.constants.js +2 -0
  7. package/esm2015/lib/scenario/scenario.controller.js +34 -0
  8. package/esm2015/lib/scenario/scenario.gql.js +72 -0
  9. package/esm2015/lib/scenario/scenario.gql.private.js +198 -0
  10. package/esm2015/lib/scenario/scenario.service.js +538 -0
  11. package/esm2015/lib/scenario/scenario.types.js +1 -0
  12. package/esm2015/lib/trusted-parties/tp-assembly.gql.private.js +22 -0
  13. package/esm2015/lib/trusted-parties/tp-assembly.js +96 -12
  14. package/esm2015/lib/trusted-parties/tp-assembly.types.js +1 -0
  15. package/esm2015/lib/trusted-parties/tp-password-reset.controller.js +4 -1
  16. package/esm2015/lib/trusted-parties/tp-password-reset.service.js +1 -1
  17. package/esm2015/lifeready-core.js +2 -1
  18. package/esm2015/public-api.js +4 -1
  19. package/fesm2015/lifeready-core.js +933 -12
  20. package/fesm2015/lifeready-core.js.map +1 -1
  21. package/lib/api/types/lr-graphql.types.d.ts +2 -0
  22. package/lib/scenario/scenario.constants.d.ts +1 -0
  23. package/lib/scenario/scenario.controller.d.ts +10 -0
  24. package/lib/scenario/scenario.gql.d.ts +62 -0
  25. package/lib/scenario/scenario.gql.private.d.ts +16 -0
  26. package/lib/scenario/scenario.service.d.ts +233 -0
  27. package/lib/scenario/scenario.types.d.ts +50 -0
  28. package/lib/trusted-parties/tp-assembly.d.ts +7 -36
  29. package/lib/trusted-parties/tp-assembly.gql.private.d.ts +5 -0
  30. package/lib/trusted-parties/tp-assembly.types.d.ts +38 -0
  31. package/lib/trusted-parties/tp-password-reset.controller.d.ts +2 -0
  32. package/lib/trusted-parties/tp-password-reset.service.d.ts +1 -1
  33. package/lifeready-core.d.ts +1 -0
  34. package/lifeready-core.metadata.json +1 -1
  35. package/package.json +1 -1
  36. package/public-api.d.ts +3 -0
@@ -351,7 +351,9 @@ export interface TpSubAssemblyNode extends Node, TimeStamped {
351
351
  export interface TpAssemblyApproverNode extends Node, TimeStamped {
352
352
  sharedKey?: KeyNode;
353
353
  sharedCipherData?: string;
354
+ sharedCipherDataClearJson?: any;
354
355
  sharedCipherApprovalData?: string;
356
+ sharedCipherApprovalDataClearJson?: any;
355
357
  tp?: TpNode;
356
358
  }
357
359
  export interface SharedTpPasswordResetNode extends Node, TimeStamped {
@@ -0,0 +1 @@
1
+ export declare const SCENARIO_SLIP39_PASSPHRASE = "lifeready";
@@ -0,0 +1,10 @@
1
+ import { Injector, NgZone } from '@angular/core';
2
+ import { TpNode } from '../api/types';
3
+ import { TpAssemblyController } from '../trusted-parties/tp-assembly';
4
+ export declare class ScenarioAssemblyController extends TpAssemblyController {
5
+ private ngZone;
6
+ private injector;
7
+ slip39Passphrase: string;
8
+ constructor(ngZone: NgZone, injector: Injector);
9
+ getTpWrappingKeyId(tp: TpNode): string;
10
+ }
@@ -0,0 +1,62 @@
1
+ export interface CreateScenarioMutationResult {
2
+ createScenario: {
3
+ scenario: {
4
+ id: string;
5
+ };
6
+ };
7
+ }
8
+ export declare const CreateScenarioMutation: import("../_common/ast").TypedDocumentNode<CreateScenarioMutationResult>;
9
+ export interface UpdateScenarioMutationResult {
10
+ updateScenario: {
11
+ scenario: {
12
+ id: string;
13
+ };
14
+ };
15
+ }
16
+ export declare const UpdateScenarioMutation: import("../_common/ast").TypedDocumentNode<UpdateScenarioMutationResult>;
17
+ export interface DeleteScenarioMutationResult {
18
+ deleteScenario: {
19
+ id: string;
20
+ };
21
+ }
22
+ export declare const DeleteScenarioMutation: import("../_common/ast").TypedDocumentNode<DeleteScenarioMutationResult>;
23
+ export interface CreateScenarioClaimMutationResult {
24
+ createScenarioClaim: {
25
+ sharedClaim: {
26
+ id: string;
27
+ };
28
+ };
29
+ }
30
+ export declare const CreateScenarioClaimMutation: import("../_common/ast").TypedDocumentNode<CreateScenarioClaimMutationResult>;
31
+ export interface CancelScenarioClaimMutationResult {
32
+ cancelScenarioClaim: {
33
+ sharedClaim: {
34
+ id: string;
35
+ };
36
+ };
37
+ }
38
+ export declare const CancelScenarioClaimMutation: import("../_common/ast").TypedDocumentNode<CancelScenarioClaimMutationResult>;
39
+ export interface RejectScenarioClaimMutationResult {
40
+ rejectScenarioClaim: {
41
+ claimApprover: {
42
+ id: string;
43
+ };
44
+ };
45
+ }
46
+ export declare const RejectScenarioClaimMutation: import("../_common/ast").TypedDocumentNode<RejectScenarioClaimMutationResult>;
47
+ export interface ApproveScenarioClaimMutationResult {
48
+ approveScenarioClaim: {
49
+ claimApprover: {
50
+ id: string;
51
+ };
52
+ };
53
+ }
54
+ export declare const ApproveScenarioClaimMutation: import("../_common/ast").TypedDocumentNode<ApproveScenarioClaimMutationResult>;
55
+ export interface ReceiveScenarioClaimMutationResult {
56
+ receiveScenarioClaim: {
57
+ sharedClaim: {
58
+ id: string;
59
+ };
60
+ };
61
+ }
62
+ export declare const ReceiveScenarioClaimMutation: import("../_common/ast").TypedDocumentNode<ReceiveScenarioClaimMutationResult>;
@@ -0,0 +1,16 @@
1
+ import { ScenarioNode, SharedScenarioNode } from '../api/types';
2
+ /**
3
+ * This is a query that is used internally by the services for mutations. It
4
+ * contains the minimum amount of information for the information the services
5
+ * need. You'll probably want to write your own query to your liking if you
6
+ * want to retrieve a scenario. For example, there a separate query in the
7
+ * scenario.service.spec.ts
8
+ */
9
+ export interface ScenarioQueryResult {
10
+ scenario: ScenarioNode;
11
+ }
12
+ export declare const ScenarioQuery: import("../_common/ast").TypedDocumentNode<ScenarioQueryResult>;
13
+ export interface SharedScenarioQueryResult {
14
+ sharedScenario: SharedScenarioNode;
15
+ }
16
+ export declare const SharedScenarioQuery: import("../_common/ast").TypedDocumentNode<SharedScenarioQueryResult>;
@@ -0,0 +1,233 @@
1
+ import { Injector, NgZone } from '@angular/core';
2
+ import { LrMergedMutation, LrMutation, LrService } from '../api/lr-graphql';
3
+ import { KeyGraphService } from '../cryptography/key-graph.service';
4
+ import { Item2Service } from '../items2/item2.service';
5
+ import { ScenarioAssemblyController } from './scenario.controller';
6
+ import { CreateScenarioOptions, ResetScenarioOptions, UpdateScenarioOptions } from './scenario.types';
7
+ import { EncryptionService } from '../cryptography/encryption.service';
8
+ export declare function throwClaimIdMismatch(): void;
9
+ export declare function throwClaimNotApproved(): void;
10
+ export declare class ScenarioService extends LrService {
11
+ private ngZone;
12
+ private injector;
13
+ private keyGraph;
14
+ private item2Service;
15
+ private assemblyController;
16
+ private encryptionService;
17
+ constructor(ngZone: NgZone, injector: Injector, keyGraph: KeyGraphService, item2Service: Item2Service, assemblyController: ScenarioAssemblyController, encryptionService: EncryptionService);
18
+ static SLIP39_PASSPHRASE: string;
19
+ private prepareAddReceiverDirectory;
20
+ private prepareUpdateReceiverDirectory;
21
+ createScenario(options: CreateScenarioOptions): Promise<import("./scenario.gql").CreateScenarioMutationResult>;
22
+ createScenarioMutation(options: CreateScenarioOptions): Promise<LrMutation<import("./scenario.gql").CreateScenarioMutationResult, {
23
+ input: {
24
+ enabled: boolean;
25
+ createAssembly: {
26
+ singleReject: boolean;
27
+ quorum: number;
28
+ subjectCipherData: string;
29
+ createSubAssemblies: {
30
+ singleReject: boolean;
31
+ quorum: number;
32
+ subjectCipherData: string;
33
+ createApprovers: {
34
+ tpWrappingKeyId: string;
35
+ tpWrappedSharedKey: string;
36
+ subjectKeyWrappedSharedKey: string;
37
+ sharedCipherData: string;
38
+ sharedCipherApprovalData: string;
39
+ sharedCipherPartialAssemblyKey: string;
40
+ approverId: string;
41
+ tpId: string;
42
+ }[];
43
+ }[];
44
+ rootKeyId: string;
45
+ rootKeyWrappedSubjectKey: string;
46
+ subjectKeyWrappedAssemblyKey: string;
47
+ assemblyCipherData: string;
48
+ assemblyKeyVerifierPbk: string;
49
+ wrappedAssemblyKeyVerifierPrk: string;
50
+ };
51
+ createReceivers: {
52
+ addDirectories: {
53
+ directoryId: string;
54
+ wrappedItemKey: string;
55
+ accessRole: import("../api/types").AccessRoleChoice;
56
+ sharedCipherData: string;
57
+ }[];
58
+ tpId: string;
59
+ tpSharedKeyId: string;
60
+ tpSharedKeyWrappedSharedKey: string;
61
+ sharedCipherData: string;
62
+ }[];
63
+ createClaimants: {
64
+ tpId: string;
65
+ tpSharedKeyId: string;
66
+ tpSharedKeyWrappedSharedKey: string;
67
+ sharedCipherData: string;
68
+ }[];
69
+ };
70
+ }>>;
71
+ updateScenario(options: UpdateScenarioOptions): Promise<import("./scenario.gql").UpdateScenarioMutationResult>;
72
+ updateScenarioMutation(options: UpdateScenarioOptions): Promise<LrMutation<import("./scenario.gql").UpdateScenarioMutationResult, {
73
+ input: {
74
+ scenarioId: string;
75
+ enabled: boolean;
76
+ updateAssembly: any;
77
+ createReceivers: {
78
+ addDirectories: {
79
+ directoryId: string;
80
+ wrappedItemKey: string;
81
+ accessRole: import("../api/types").AccessRoleChoice;
82
+ sharedCipherData: string;
83
+ }[];
84
+ tpId: string;
85
+ tpSharedKeyId: string;
86
+ tpSharedKeyWrappedSharedKey: string;
87
+ sharedCipherData: string;
88
+ }[];
89
+ updateReceivers: {
90
+ addDirectories: {
91
+ directoryId: string;
92
+ wrappedItemKey: string;
93
+ accessRole: import("../api/types").AccessRoleChoice;
94
+ sharedCipherData: string;
95
+ }[];
96
+ updateDirectories: {
97
+ directoryId: string;
98
+ wrappedItemKey: string;
99
+ accessRole: import("../api/types").AccessRoleChoice;
100
+ sharedCipherData: string;
101
+ }[];
102
+ deleteDirectories: string[];
103
+ tpId: string;
104
+ sharedKeyId: string;
105
+ sharedCipherData: string;
106
+ }[];
107
+ deleteReceivers: string[];
108
+ createClaimants: {
109
+ tpId: string;
110
+ tpSharedKeyId: string;
111
+ tpSharedKeyWrappedSharedKey: string;
112
+ sharedCipherData: string;
113
+ }[];
114
+ updateClaimants: {
115
+ tpId: string;
116
+ sharedKeyId: string;
117
+ sharedCipherData: string;
118
+ }[];
119
+ deleteClaimants: string[];
120
+ };
121
+ }>>;
122
+ resetScenario(options: ResetScenarioOptions): Promise<import("./scenario.gql").UpdateScenarioMutationResult>;
123
+ resetScenarioMutation(options: ResetScenarioOptions): Promise<LrMutation<import("./scenario.gql").UpdateScenarioMutationResult, {
124
+ input: {
125
+ scenarioId: string;
126
+ enabled: boolean;
127
+ updateAssembly: any;
128
+ createReceivers: {
129
+ addDirectories: {
130
+ directoryId: string;
131
+ wrappedItemKey: string;
132
+ accessRole: import("../api/types").AccessRoleChoice;
133
+ sharedCipherData: string;
134
+ }[];
135
+ tpId: string;
136
+ tpSharedKeyId: string;
137
+ tpSharedKeyWrappedSharedKey: string;
138
+ sharedCipherData: string;
139
+ }[];
140
+ updateReceivers: {
141
+ addDirectories: {
142
+ directoryId: string;
143
+ wrappedItemKey: string;
144
+ accessRole: import("../api/types").AccessRoleChoice;
145
+ sharedCipherData: string;
146
+ }[];
147
+ updateDirectories: {
148
+ directoryId: string;
149
+ wrappedItemKey: string;
150
+ accessRole: import("../api/types").AccessRoleChoice;
151
+ sharedCipherData: string;
152
+ }[];
153
+ deleteDirectories: string[];
154
+ tpId: string;
155
+ sharedKeyId: string;
156
+ sharedCipherData: string;
157
+ }[];
158
+ deleteReceivers: string[];
159
+ createClaimants: {
160
+ tpId: string;
161
+ tpSharedKeyId: string;
162
+ tpSharedKeyWrappedSharedKey: string;
163
+ sharedCipherData: string;
164
+ }[];
165
+ updateClaimants: {
166
+ tpId: string;
167
+ sharedKeyId: string;
168
+ sharedCipherData: string;
169
+ }[];
170
+ deleteClaimants: string[];
171
+ };
172
+ }>>;
173
+ deleteScenario(scenarioId: string): Promise<import("./scenario.gql").DeleteScenarioMutationResult>;
174
+ deleteScenarioMutation(scenarioId: string): Promise<LrMutation<import("./scenario.gql").DeleteScenarioMutationResult, {
175
+ input: {
176
+ scenarioId: string;
177
+ };
178
+ }>>;
179
+ createClaim(scenarioId: string): Promise<import("./scenario.gql").CreateScenarioClaimMutationResult>;
180
+ createClaimMutation(scenarioId: string): Promise<LrMutation<import("./scenario.gql").CreateScenarioClaimMutationResult, {
181
+ input: {
182
+ scenarioId: string;
183
+ };
184
+ }>>;
185
+ cancelClaim(claimId: string): Promise<import("./scenario.gql").CancelScenarioClaimMutationResult>;
186
+ cancelClaimMutation(claimId: string): Promise<LrMutation<import("./scenario.gql").CancelScenarioClaimMutationResult, {
187
+ input: {
188
+ claimId: string;
189
+ };
190
+ }>>;
191
+ rejectClaim(sharedScenarioId: string, claimId: string): Promise<any>;
192
+ rejectClaimMutation(sharedScenarioId: string, claimId: string): Promise<LrMergedMutation<import("./scenario.gql").RejectScenarioClaimMutationResult[]>>;
193
+ approveClaim(sharedScenarioId: string, sharedClaimId: string): Promise<any>;
194
+ approveClaimMutation(sharedScenarioId: string, sharedClaimId: string): Promise<LrMergedMutation<import("./scenario.gql").ApproveScenarioClaimMutationResult[]>>;
195
+ receiveClaim(scenarioId: string, sharedClaimId: string): Promise<import("./scenario.gql").ReceiveScenarioClaimMutationResult>;
196
+ receiveClaimMutation(scenarioId: string, sharedClaimId: string): Promise<LrMutation<import("./scenario.gql").ReceiveScenarioClaimMutationResult, {
197
+ input: {
198
+ scenarioClaimId: string;
199
+ receiverDirectories: {
200
+ receiverDirectoryId: string;
201
+ receiverSharedKeyWrappedItemKey: any;
202
+ }[];
203
+ };
204
+ }>>;
205
+ private getScenario;
206
+ private getSharedScenario;
207
+ private getParticipantTpsKeys;
208
+ private fillTpSharedKeyId;
209
+ private prepareCreateScenarioMutation;
210
+ private prepareUpdateScenario;
211
+ private prepareReceiverDirectory;
212
+ private prepareCreateReceiver;
213
+ private prepareUpdateReceiver;
214
+ private prepareExistingReceiver;
215
+ private prepareExistingReceivers;
216
+ private prepareCreateParticipant;
217
+ private prepareUpdateParticipant;
218
+ private prepareCreateClaimant;
219
+ private prepareUpdateClaimant;
220
+ prepareClaim(scenarioId: string, sharedClaimId: string): Promise<{
221
+ scenarioClaimId: string;
222
+ receiverDirectories: {
223
+ receiverDirectoryId: string;
224
+ receiverSharedKeyWrappedItemKey: any;
225
+ }[];
226
+ }>;
227
+ private recoverAssemblyKey;
228
+ private asClaimApprovers;
229
+ private prepareApproveClaimMutations;
230
+ private prepareApproveClaim;
231
+ private prepareReceiverApproval;
232
+ private prepareRejectClaimMutations;
233
+ }
@@ -0,0 +1,50 @@
1
+ import { AccessRoleChoice } from '../api/types';
2
+ import { CreateTpAssemblyInput, UpdateTpAssemblyInput } from '../trusted-parties/tp-assembly.types';
3
+ export interface ParticipantOptions {
4
+ tpId: string;
5
+ sharedCipherDataClearJson: any;
6
+ }
7
+ export interface CreateParticipantOptions extends ParticipantOptions {
8
+ /** This is the TP.sharedKey used to wrap the approver shared key which will be created. */
9
+ tpSharedKeyId?: string;
10
+ }
11
+ export declare type UpdateParticipantOptions = ParticipantOptions;
12
+ export interface ReceiverDirectoryOptions {
13
+ directoryId: string;
14
+ directoryKeyId?: string;
15
+ accessRole: AccessRoleChoice;
16
+ sharedCipherDataClearJson: any;
17
+ }
18
+ export declare type CreateReceiverDirectoryOptions = ReceiverDirectoryOptions;
19
+ export declare type UpdateReceiverDirectoryOptions = ReceiverDirectoryOptions;
20
+ export interface CreateReceiverOptions extends CreateParticipantOptions {
21
+ addDirectories?: CreateReceiverDirectoryOptions[];
22
+ }
23
+ export interface UpdateReceiverOptions extends UpdateParticipantOptions {
24
+ addDirectories?: CreateReceiverDirectoryOptions[];
25
+ updateDirectories?: UpdateReceiverDirectoryOptions[];
26
+ deleteDirectories?: string[];
27
+ }
28
+ export declare type CreateClaimantOptions = CreateParticipantOptions;
29
+ export declare type UpdateClaimantOptions = UpdateParticipantOptions;
30
+ export interface CreateScenarioOptions {
31
+ enabled: boolean;
32
+ createAssembly?: CreateTpAssemblyInput;
33
+ createReceivers?: CreateReceiverOptions[];
34
+ createClaimants?: CreateClaimantOptions[];
35
+ }
36
+ export interface UpdateScenarioOptions {
37
+ scenarioId: string;
38
+ enabled: boolean;
39
+ updateAssembly?: UpdateTpAssemblyInput;
40
+ createReceivers?: CreateReceiverOptions[];
41
+ updateReceivers?: UpdateReceiverOptions[];
42
+ deleteReceivers?: string[];
43
+ createClaimants?: CreateClaimantOptions[];
44
+ updateClaimants?: UpdateClaimantOptions[];
45
+ deleteClaimants?: string[];
46
+ }
47
+ export interface ResetScenarioOptions {
48
+ scenarioId: string;
49
+ enabled: boolean;
50
+ }
@@ -7,42 +7,8 @@ import { KeyGraphService } from '../cryptography/key-graph.service';
7
7
  import * as slip from '../cryptography/slip39.service';
8
8
  import { Key } from '../cryptography/cryptography.types';
9
9
  import { KeyService } from '../cryptography/key.service';
10
- export interface PartialAssemblyKey {
11
- slip39: {
12
- share: slip.SecretShare;
13
- subAssembly: {
14
- quorum: number;
15
- size: number;
16
- };
17
- };
18
- assemblyKeyParams: object;
19
- }
20
- export interface CreateTpSubAssemblyInput {
21
- quorum: number;
22
- singleReject: boolean;
23
- approverTps: TpAssemblyApproverInput[];
24
- subjectCipherDataClearJson?: any;
25
- }
26
- export interface UpdateTpSubAssemblyInput extends CreateTpSubAssemblyInput {
27
- id: string;
28
- }
29
- export interface TpAssemblyInput {
30
- quorum: number;
31
- singleReject: boolean;
32
- }
33
- export interface CreateTpAssemblyInput extends TpAssemblyInput {
34
- createSubAssemblies: CreateTpSubAssemblyInput[];
35
- }
36
- export interface UpdateTpAssemblyInput extends TpAssemblyInput {
37
- createSubAssemblies?: CreateTpSubAssemblyInput[];
38
- updateSubAssemblies: UpdateTpSubAssemblyInput[];
39
- }
40
- export interface TpAssemblyApproverInput {
41
- tpId: string;
42
- wrappingKeyId: string;
43
- sharedCipherDataClearJson?: any;
44
- sharedCipherApprovalDataClearJson?: any;
45
- }
10
+ import { CreateTpAssemblyInput, CreateTpSubAssemblyInput, PartialAssemblyKey, TpAssemblyApproverInput, UpdateTpAssemblyInput, UpdateTpSubAssemblyInput } from './tp-assembly.types';
11
+ import { LrGraphQLService } from '../api/lr-graphql';
46
12
  export declare abstract class TpAssemblyController {
47
13
  abstract slip39Passphrase: string;
48
14
  protected keyFactory: KeyFactoryService;
@@ -50,7 +16,9 @@ export declare abstract class TpAssemblyController {
50
16
  protected encryptionService: EncryptionService;
51
17
  protected keyGraph: KeyGraphService;
52
18
  protected slip39Service: slip.Slip39Service;
19
+ protected lrGraphQl: LrGraphQLService;
53
20
  constructor(injector: Injector);
21
+ abstract getTpWrappingKeyId(tp: TpNode): string;
54
22
  recoverAssemblyKey(partials: PartialAssemblyKey[]): Promise<JWK.Key>;
55
23
  protected prepareTpWrappingKey(tp: TpAssemblyApproverInput): Promise<Key>;
56
24
  protected prepareAssembly({ subjectKey, rootKey, }: {
@@ -117,6 +85,8 @@ export declare abstract class TpAssemblyController {
117
85
  tpId: string;
118
86
  }[];
119
87
  }[]>;
88
+ private fillWrappingKeyId;
89
+ private getInputApprovers;
120
90
  prepareCreate(input: CreateTpAssemblyInput): Promise<{
121
91
  assemblyKey: JWK.Key;
122
92
  mutationInput: {
@@ -146,6 +116,7 @@ export declare abstract class TpAssemblyController {
146
116
  wrappedAssemblyKeyVerifierPrk: string;
147
117
  };
148
118
  }>;
119
+ private getAssemblyApprovers;
149
120
  prepareUpdate(input: UpdateTpAssemblyInput, assembly: TpAssemblyNode): Promise<{
150
121
  assemblyKey: JWK.Key;
151
122
  mutationInput: {
@@ -0,0 +1,5 @@
1
+ import { Connection, TpNode } from '../api/types';
2
+ export interface TpsKeysQueryResult {
3
+ tps: Connection<TpNode>;
4
+ }
5
+ export declare const TpsKeysQuery: import("../_common/ast").TypedDocumentNode<TpsKeysQueryResult>;
@@ -0,0 +1,38 @@
1
+ import * as slip from '../cryptography/slip39.service';
2
+ export interface PartialAssemblyKey {
3
+ slip39: {
4
+ share: slip.SecretShare;
5
+ subAssembly: {
6
+ quorum: number;
7
+ size: number;
8
+ };
9
+ };
10
+ assemblyKeyParams: object;
11
+ }
12
+ export interface CreateTpSubAssemblyInput {
13
+ quorum: number;
14
+ singleReject: boolean;
15
+ approverTps: TpAssemblyApproverInput[];
16
+ subjectCipherDataClearJson?: any;
17
+ }
18
+ export interface UpdateTpSubAssemblyInput extends CreateTpSubAssemblyInput {
19
+ id: string;
20
+ }
21
+ export interface TpAssemblyInput {
22
+ quorum: number;
23
+ singleReject: boolean;
24
+ }
25
+ export interface CreateTpAssemblyInput extends TpAssemblyInput {
26
+ createSubAssemblies: CreateTpSubAssemblyInput[];
27
+ }
28
+ export interface UpdateTpAssemblyInput extends TpAssemblyInput {
29
+ createSubAssemblies?: CreateTpSubAssemblyInput[];
30
+ updateSubAssemblies?: UpdateTpSubAssemblyInput[];
31
+ deleteSubAssemblies?: string[];
32
+ }
33
+ export interface TpAssemblyApproverInput {
34
+ tpId: string;
35
+ wrappingKeyId?: string;
36
+ sharedCipherDataClearJson?: any;
37
+ sharedCipherApprovalDataClearJson?: any;
38
+ }
@@ -1,8 +1,10 @@
1
1
  import { Injector, NgZone } from '@angular/core';
2
+ import { TpNode } from '../api/types';
2
3
  import { TpAssemblyController } from './tp-assembly';
3
4
  export declare class TpPasswordResetAssemblyController extends TpAssemblyController {
4
5
  private ngZone;
5
6
  private injector;
6
7
  slip39Passphrase: string;
7
8
  constructor(ngZone: NgZone, injector: Injector);
9
+ getTpWrappingKeyId(tp: TpNode): string;
8
10
  }
@@ -1,9 +1,9 @@
1
1
  import { Injector, NgZone } from '@angular/core';
2
2
  import { Key } from '../cryptography/cryptography.types';
3
- import { CreateTpAssemblyInput, UpdateTpAssemblyInput } from './tp-assembly';
4
3
  import { TpPasswordResetAssemblyController } from './tp-password-reset.controller';
5
4
  import { LrMutation, LrService } from '../api/lr-graphql';
6
5
  import { TpNode } from '../api/types';
6
+ import { CreateTpAssemblyInput, UpdateTpAssemblyInput } from './tp-assembly.types';
7
7
  export interface TpAssemblyApprovers {
8
8
  id: string;
9
9
  tp: {
@@ -7,5 +7,6 @@ export { LrGraphQLService as ɵb, LrService as ɵi } from './lib/api/lr-graphql'
7
7
  export { TpPasswordResetProcessorService as ɵc } from './lib/api/query-processor/tp-password-reset-processor.service';
8
8
  export { SharedContactCardFields as ɵg, SharedContactCardService as ɵh } from './lib/api/shared-contact-card.service';
9
9
  export { TimeService as ɵa } from './lib/api/time.service';
10
+ export { ScenarioAssemblyController as ɵj } from './lib/scenario/scenario.controller';
10
11
  export { TpAssemblyController as ɵf } from './lib/trusted-parties/tp-assembly';
11
12
  export { TpPasswordResetAssemblyController as ɵe } from './lib/trusted-parties/tp-password-reset.controller';