@lifeready/core 9.0.7 → 10.0.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 (225) hide show
  1. package/fesm2022/lifeready-core.mjs +10522 -0
  2. package/fesm2022/lifeready-core.mjs.map +1 -0
  3. package/package.json +21 -16
  4. package/types/lifeready-core.d.ts +5329 -0
  5. package/bundles/lifeready-core.umd.js +0 -13231
  6. package/bundles/lifeready-core.umd.js.map +0 -1
  7. package/bundles/lifeready-core.umd.min.js +0 -2
  8. package/bundles/lifeready-core.umd.min.js.map +0 -1
  9. package/esm2015/lib/_common/ast.js +0 -41
  10. package/esm2015/lib/_common/deferred-promise.js +0 -24
  11. package/esm2015/lib/_common/exceptions.js +0 -186
  12. package/esm2015/lib/_common/index.js +0 -3
  13. package/esm2015/lib/_common/kc-lodash.js +0 -11
  14. package/esm2015/lib/_common/key.js +0 -28
  15. package/esm2015/lib/_common/queries.gql.js +0 -43
  16. package/esm2015/lib/_common/run-outside-angular.js +0 -80
  17. package/esm2015/lib/_common/storage.js +0 -28
  18. package/esm2015/lib/_common/types.js +0 -2
  19. package/esm2015/lib/_common/utils.js +0 -73
  20. package/esm2015/lib/api/lr-apollo.service.js +0 -47
  21. package/esm2015/lib/api/lr-graphql/index.js +0 -6
  22. package/esm2015/lib/api/lr-graphql/lr-graphql.service.js +0 -170
  23. package/esm2015/lib/api/lr-graphql/lr-merged-mutation.js +0 -216
  24. package/esm2015/lib/api/lr-graphql/lr-mutation-base.js +0 -51
  25. package/esm2015/lib/api/lr-graphql/lr-mutation.js +0 -91
  26. package/esm2015/lib/api/lr-graphql/lr.service.js +0 -18
  27. package/esm2015/lib/api/query-processor/common-processors.service.js +0 -94
  28. package/esm2015/lib/api/query-processor/index.js +0 -3
  29. package/esm2015/lib/api/query-processor/query-processor.service.js +0 -307
  30. package/esm2015/lib/api/query-processor/tp-password-reset-processor.service.js +0 -110
  31. package/esm2015/lib/api/types/graphql.types.js +0 -8
  32. package/esm2015/lib/api/types/index.js +0 -3
  33. package/esm2015/lib/api/types/lr-graphql.types.js +0 -182
  34. package/esm2015/lib/auth/auth.config.js +0 -57
  35. package/esm2015/lib/auth/auth.gql.private.js +0 -85
  36. package/esm2015/lib/auth/auth.service.js +0 -616
  37. package/esm2015/lib/auth/auth.types.js +0 -19
  38. package/esm2015/lib/contact-card/contact-card.gql.js +0 -79
  39. package/esm2015/lib/contact-card/contact-card.service.js +0 -156
  40. package/esm2015/lib/contact-card/contact-card2.gql.js +0 -29
  41. package/esm2015/lib/contact-card/contact-card2.service.js +0 -103
  42. package/esm2015/lib/encryption/encryption.service.js +0 -188
  43. package/esm2015/lib/file-upload/file-upload.service.js +0 -70
  44. package/esm2015/lib/file-upload/file-upload.types.js +0 -2
  45. package/esm2015/lib/idle/idle.service.js +0 -159
  46. package/esm2015/lib/idle/idle.types.js +0 -7
  47. package/esm2015/lib/item/item.gql.js +0 -166
  48. package/esm2015/lib/item/item.gql.private.js +0 -41
  49. package/esm2015/lib/item/item.service.js +0 -662
  50. package/esm2015/lib/item/item.types.js +0 -2
  51. package/esm2015/lib/key/key-factory.service.js +0 -226
  52. package/esm2015/lib/key/key-graph.service.js +0 -314
  53. package/esm2015/lib/key/key-meta.service.js +0 -153
  54. package/esm2015/lib/key/key.service.js +0 -124
  55. package/esm2015/lib/key/key.types.js +0 -16
  56. package/esm2015/lib/key-exchange/key-exchange.gql.js +0 -174
  57. package/esm2015/lib/key-exchange/key-exchange.service.js +0 -496
  58. package/esm2015/lib/lbop/lbop.service.js +0 -351
  59. package/esm2015/lib/life-ready.config.js +0 -96
  60. package/esm2015/lib/life-ready.module.js +0 -42
  61. package/esm2015/lib/lock/lock.gql.js +0 -40
  62. package/esm2015/lib/lock/lock.service.js +0 -64
  63. package/esm2015/lib/notification/notification.gql.js +0 -43
  64. package/esm2015/lib/notification/notification.service.js +0 -118
  65. package/esm2015/lib/password/password.gql.js +0 -28
  66. package/esm2015/lib/password/password.service.js +0 -309
  67. package/esm2015/lib/persist/persist.service.js +0 -181
  68. package/esm2015/lib/plan/plan.gql.js +0 -91
  69. package/esm2015/lib/plan/plan.service.js +0 -191
  70. package/esm2015/lib/plan/plan.types.js +0 -2
  71. package/esm2015/lib/profile/profile-details.service.js +0 -261
  72. package/esm2015/lib/profile/profile.gql.js +0 -170
  73. package/esm2015/lib/profile/profile.service.js +0 -166
  74. package/esm2015/lib/profile/profile.types.js +0 -45
  75. package/esm2015/lib/register/register.service.js +0 -173
  76. package/esm2015/lib/register/register.types.js +0 -3
  77. package/esm2015/lib/reminder/reminder.gql.js +0 -27
  78. package/esm2015/lib/reminder/reminder.service.js +0 -85
  79. package/esm2015/lib/reminder/reminder.types.js +0 -2
  80. package/esm2015/lib/scenario/scenario.constants.js +0 -2
  81. package/esm2015/lib/scenario/scenario.controller.js +0 -34
  82. package/esm2015/lib/scenario/scenario.gql.js +0 -90
  83. package/esm2015/lib/scenario/scenario.private.gql.js +0 -200
  84. package/esm2015/lib/scenario/scenario.service.js +0 -679
  85. package/esm2015/lib/scenario/scenario.types.js +0 -2
  86. package/esm2015/lib/server-config/server-config.gql.js +0 -9
  87. package/esm2015/lib/server-config/server-config.service.js +0 -41
  88. package/esm2015/lib/shared-contact-card/shared-contact-card.service.js +0 -119
  89. package/esm2015/lib/shared-contact-card/shared-contact-card2.gql.js +0 -41
  90. package/esm2015/lib/shared-contact-card/shared-contact-card2.service.js +0 -117
  91. package/esm2015/lib/slip39/slip39.service.js +0 -167
  92. package/esm2015/lib/time/time.service.js +0 -152
  93. package/esm2015/lib/tp-assembly/tp-assembly.js +0 -363
  94. package/esm2015/lib/tp-assembly/tp-assembly.private.gql.js +0 -22
  95. package/esm2015/lib/tp-assembly/tp-assembly.types.js +0 -2
  96. package/esm2015/lib/tp-password-reset/tp-password-reset-request.service.js +0 -98
  97. package/esm2015/lib/tp-password-reset/tp-password-reset-user.service.js +0 -121
  98. package/esm2015/lib/tp-password-reset/tp-password-reset.constants.js +0 -4
  99. package/esm2015/lib/tp-password-reset/tp-password-reset.controller.js +0 -34
  100. package/esm2015/lib/tp-password-reset/tp-password-reset.gql.js +0 -74
  101. package/esm2015/lib/tp-password-reset/tp-password-reset.private.gql.js +0 -166
  102. package/esm2015/lib/tp-password-reset/tp-password-reset.private.service.js +0 -54
  103. package/esm2015/lib/tp-password-reset/tp-password-reset.service.js +0 -110
  104. package/esm2015/lib/tp-password-reset/tp-password-reset.types.js +0 -2
  105. package/esm2015/lib/trusted-party/trusted-party.gql.js +0 -96
  106. package/esm2015/lib/trusted-party/trusted-party.gql.private.js +0 -51
  107. package/esm2015/lib/trusted-party/trusted-party.service.js +0 -461
  108. package/esm2015/lib/trusted-party/trusted-party.types.js +0 -2
  109. package/esm2015/lib/two-factor/two-factor.service.js +0 -74
  110. package/esm2015/lib/user/user.gql.js +0 -32
  111. package/esm2015/lib/user/user.service.js +0 -58
  112. package/esm2015/lib/user/user.types.js +0 -2
  113. package/esm2015/lib/web-crypto/web-crypto.service.js +0 -29
  114. package/esm2015/lifeready-core.js +0 -17
  115. package/esm2015/public-api.js +0 -60
  116. package/fesm2015/lifeready-core.js +0 -10970
  117. package/fesm2015/lifeready-core.js.map +0 -1
  118. package/lib/_common/ast.d.ts +0 -11
  119. package/lib/_common/deferred-promise.d.ts +0 -12
  120. package/lib/_common/exceptions.d.ts +0 -126
  121. package/lib/_common/index.d.ts +0 -2
  122. package/lib/_common/kc-lodash.d.ts +0 -5
  123. package/lib/_common/key.d.ts +0 -14
  124. package/lib/_common/queries.gql.d.ts +0 -4
  125. package/lib/_common/run-outside-angular.d.ts +0 -14
  126. package/lib/_common/storage.d.ts +0 -13
  127. package/lib/_common/types.d.ts +0 -15
  128. package/lib/_common/utils.d.ts +0 -12
  129. package/lib/api/lr-apollo.service.d.ts +0 -15
  130. package/lib/api/lr-graphql/index.d.ts +0 -5
  131. package/lib/api/lr-graphql/lr-graphql.service.d.ts +0 -81
  132. package/lib/api/lr-graphql/lr-merged-mutation.d.ts +0 -46
  133. package/lib/api/lr-graphql/lr-mutation-base.d.ts +0 -28
  134. package/lib/api/lr-graphql/lr-mutation.d.ts +0 -48
  135. package/lib/api/lr-graphql/lr.service.d.ts +0 -9
  136. package/lib/api/query-processor/common-processors.service.d.ts +0 -36
  137. package/lib/api/query-processor/index.d.ts +0 -2
  138. package/lib/api/query-processor/query-processor.service.d.ts +0 -18
  139. package/lib/api/query-processor/tp-password-reset-processor.service.d.ts +0 -15
  140. package/lib/api/types/graphql.types.d.ts +0 -30
  141. package/lib/api/types/index.d.ts +0 -2
  142. package/lib/api/types/lr-graphql.types.d.ts +0 -807
  143. package/lib/auth/auth.config.d.ts +0 -5
  144. package/lib/auth/auth.gql.private.d.ts +0 -25
  145. package/lib/auth/auth.service.d.ts +0 -72
  146. package/lib/auth/auth.types.d.ts +0 -70
  147. package/lib/contact-card/contact-card.gql.d.ts +0 -7
  148. package/lib/contact-card/contact-card.service.d.ts +0 -53
  149. package/lib/contact-card/contact-card2.gql.d.ts +0 -25
  150. package/lib/contact-card/contact-card2.service.d.ts +0 -64
  151. package/lib/encryption/encryption.service.d.ts +0 -42
  152. package/lib/file-upload/file-upload.service.d.ts +0 -15
  153. package/lib/file-upload/file-upload.types.d.ts +0 -5
  154. package/lib/idle/idle.service.d.ts +0 -47
  155. package/lib/idle/idle.types.d.ts +0 -10
  156. package/lib/item/item.gql.d.ts +0 -134
  157. package/lib/item/item.gql.private.d.ts +0 -35
  158. package/lib/item/item.service.d.ts +0 -201
  159. package/lib/item/item.types.d.ts +0 -95
  160. package/lib/key/key-factory.service.d.ts +0 -40
  161. package/lib/key/key-graph.service.d.ts +0 -41
  162. package/lib/key/key-meta.service.d.ts +0 -51
  163. package/lib/key/key.service.d.ts +0 -36
  164. package/lib/key/key.types.d.ts +0 -86
  165. package/lib/key-exchange/key-exchange.gql.d.ts +0 -141
  166. package/lib/key-exchange/key-exchange.service.d.ts +0 -179
  167. package/lib/lbop/lbop.service.d.ts +0 -99
  168. package/lib/life-ready.config.d.ts +0 -26
  169. package/lib/life-ready.module.d.ts +0 -5
  170. package/lib/lock/lock.gql.d.ts +0 -27
  171. package/lib/lock/lock.service.d.ts +0 -34
  172. package/lib/notification/notification.gql.d.ts +0 -37
  173. package/lib/notification/notification.service.d.ts +0 -64
  174. package/lib/password/password.gql.d.ts +0 -3
  175. package/lib/password/password.service.d.ts +0 -79
  176. package/lib/persist/persist.service.d.ts +0 -31
  177. package/lib/plan/plan.gql.d.ts +0 -69
  178. package/lib/plan/plan.service.d.ts +0 -111
  179. package/lib/plan/plan.types.d.ts +0 -16
  180. package/lib/profile/profile-details.service.d.ts +0 -20
  181. package/lib/profile/profile.gql.d.ts +0 -21
  182. package/lib/profile/profile.service.d.ts +0 -32
  183. package/lib/profile/profile.types.d.ts +0 -121
  184. package/lib/register/register.service.d.ts +0 -25
  185. package/lib/register/register.types.d.ts +0 -6
  186. package/lib/reminder/reminder.gql.d.ts +0 -23
  187. package/lib/reminder/reminder.service.d.ts +0 -33
  188. package/lib/reminder/reminder.types.d.ts +0 -17
  189. package/lib/scenario/scenario.constants.d.ts +0 -1
  190. package/lib/scenario/scenario.controller.d.ts +0 -10
  191. package/lib/scenario/scenario.gql.d.ts +0 -78
  192. package/lib/scenario/scenario.private.gql.d.ts +0 -16
  193. package/lib/scenario/scenario.service.d.ts +0 -655
  194. package/lib/scenario/scenario.types.d.ts +0 -64
  195. package/lib/server-config/server-config.gql.d.ts +0 -5
  196. package/lib/server-config/server-config.service.d.ts +0 -9
  197. package/lib/shared-contact-card/shared-contact-card.service.d.ts +0 -33
  198. package/lib/shared-contact-card/shared-contact-card2.gql.d.ts +0 -36
  199. package/lib/shared-contact-card/shared-contact-card2.service.d.ts +0 -45
  200. package/lib/slip39/slip39.service.d.ts +0 -42
  201. package/lib/time/time.service.d.ts +0 -26
  202. package/lib/tp-assembly/tp-assembly.d.ts +0 -177
  203. package/lib/tp-assembly/tp-assembly.private.gql.d.ts +0 -5
  204. package/lib/tp-assembly/tp-assembly.types.d.ts +0 -40
  205. package/lib/tp-password-reset/tp-password-reset-request.service.d.ts +0 -16
  206. package/lib/tp-password-reset/tp-password-reset-user.service.d.ts +0 -29
  207. package/lib/tp-password-reset/tp-password-reset.constants.d.ts +0 -3
  208. package/lib/tp-password-reset/tp-password-reset.controller.d.ts +0 -10
  209. package/lib/tp-password-reset/tp-password-reset.gql.d.ts +0 -63
  210. package/lib/tp-password-reset/tp-password-reset.private.gql.d.ts +0 -163
  211. package/lib/tp-password-reset/tp-password-reset.private.service.d.ts +0 -59
  212. package/lib/tp-password-reset/tp-password-reset.service.d.ts +0 -112
  213. package/lib/tp-password-reset/tp-password-reset.types.d.ts +0 -40
  214. package/lib/trusted-party/trusted-party.gql.d.ts +0 -85
  215. package/lib/trusted-party/trusted-party.gql.private.d.ts +0 -40
  216. package/lib/trusted-party/trusted-party.service.d.ts +0 -192
  217. package/lib/trusted-party/trusted-party.types.d.ts +0 -31
  218. package/lib/two-factor/two-factor.service.d.ts +0 -15
  219. package/lib/user/user.gql.d.ts +0 -8
  220. package/lib/user/user.service.d.ts +0 -9
  221. package/lib/user/user.types.d.ts +0 -16
  222. package/lib/web-crypto/web-crypto.service.d.ts +0 -5
  223. package/lifeready-core.d.ts +0 -16
  224. package/lifeready-core.metadata.json +0 -1
  225. package/public-api.d.ts +0 -56
@@ -1,64 +0,0 @@
1
- import { AccessRoleChoice, JSONObject } from '../api/types';
2
- import { CreateTpAssemblyInput, UpdateTpAssemblyInput } from '../tp-assembly/tp-assembly.types';
3
- export interface ParticipantOptions {
4
- tpId: string;
5
- sharedCipherDataClearJson?: JSONObject;
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 ReceiverItemOptions {
13
- accessRole: AccessRoleChoice;
14
- sharedCipherDataClearJson?: JSONObject;
15
- }
16
- export interface ReceiverDirectoryOptions extends ReceiverItemOptions {
17
- directoryId: string;
18
- directoryKeyId?: string;
19
- }
20
- export interface ReceiverFileOptions extends ReceiverItemOptions {
21
- fileId: string;
22
- fileKeyId?: string;
23
- }
24
- export declare type CreateReceiverDirectoryOptions = ReceiverDirectoryOptions;
25
- export declare type UpdateReceiverDirectoryOptions = ReceiverDirectoryOptions;
26
- export declare type CreateReceiverFileOptions = ReceiverFileOptions;
27
- export declare type UpdateReceiverFileOptions = ReceiverFileOptions;
28
- export interface CreateReceiverOptions extends CreateParticipantOptions {
29
- addDirectories?: CreateReceiverDirectoryOptions[];
30
- addFiles?: CreateReceiverFileOptions[];
31
- }
32
- export interface UpdateReceiverOptions extends UpdateParticipantOptions {
33
- addDirectories?: CreateReceiverDirectoryOptions[];
34
- addFiles?: CreateReceiverFileOptions[];
35
- updateDirectories?: UpdateReceiverDirectoryOptions[];
36
- updateFiles?: UpdateReceiverFileOptions[];
37
- deleteDirectories?: string[];
38
- deleteFiles?: string[];
39
- }
40
- export declare type CreateClaimantOptions = CreateParticipantOptions;
41
- export declare type UpdateClaimantOptions = UpdateParticipantOptions;
42
- export interface CreateScenarioOptions {
43
- enabled: boolean;
44
- inactiveSeconds?: number;
45
- createAssembly?: CreateTpAssemblyInput;
46
- createReceivers?: CreateReceiverOptions[];
47
- createClaimants?: CreateClaimantOptions[];
48
- }
49
- export interface UpdateScenarioOptions {
50
- scenarioId: string;
51
- enabled: boolean;
52
- inactiveSeconds?: number;
53
- updateAssembly?: UpdateTpAssemblyInput;
54
- createReceivers?: CreateReceiverOptions[];
55
- updateReceivers?: UpdateReceiverOptions[];
56
- deleteReceivers?: string[];
57
- createClaimants?: CreateClaimantOptions[];
58
- updateClaimants?: UpdateClaimantOptions[];
59
- deleteClaimants?: string[];
60
- }
61
- export interface ResetScenarioOptions {
62
- scenarioId: string;
63
- enabled: boolean;
64
- }
@@ -1,5 +0,0 @@
1
- import { ServerConfig } from '../api/types';
2
- export interface ServerConfigQueryResult {
3
- serverConfig: Pick<Required<ServerConfig>, 'relayConnectionMaxLimit'>;
4
- }
5
- export declare const ServerConfigQuery: import("../_common/ast").TypedDocumentNode<ServerConfigQueryResult>;
@@ -1,9 +0,0 @@
1
- import { Injector, NgZone } from '@angular/core';
2
- import { LrService } from '../api/lr-graphql';
3
- export declare class ServerConfigService extends LrService {
4
- private ngZone;
5
- private injector;
6
- private serverConfig;
7
- constructor(ngZone: NgZone, injector: Injector);
8
- getConfig(): Promise<Pick<Required<import("../api/types").ServerConfig>, "relayConnectionMaxLimit">>;
9
- }
@@ -1,33 +0,0 @@
1
- import { LrApolloService } from '../api/lr-apollo.service';
2
- import { JSONObject } from '../api/types';
3
- import { EncryptionService } from '../encryption/encryption.service';
4
- import { KeyGraphService } from '../key/key-graph.service';
5
- import { KeyService } from '../key/key.service';
6
- import { Key } from '../key/key.types';
7
- import { SharedTrustedPartyDetails, TrustedPartyDetails } from '../profile/profile.types';
8
- import { User } from '../user/user.types';
9
- export declare const SharedContactCardFields = "\n id\n owner {\n id\n username\n }\n ownerKey {\n id\n }\n ownerCipherData\n receiver {\n id\n username\n }\n receiverKey {\n id\n }\n receiverCipherData\n sharedKey {\n id\n }\n sharedCipherData\n sharedCipherDataSig\n sharedCipherDataSigPxk {\n id\n }\n";
10
- export interface SharedContactCard {
11
- id: string;
12
- owner: User;
13
- ownerKey: Key;
14
- ownerCipherData: string;
15
- receiver: User;
16
- receiverKey: Key;
17
- receiverCipherData: string;
18
- sharedKey: Key;
19
- sharedCipherData: string;
20
- plainOwnerCipherDataJson: JSONObject;
21
- plainReceiverCipherDataJson: JSONObject;
22
- plainSharedCipherDataJson: JSONObject;
23
- }
24
- export declare class SharedContactCardService {
25
- private keyService;
26
- private lrApollo;
27
- private keyGraph;
28
- private encryptionService;
29
- constructor(keyService: KeyService, lrApollo: LrApolloService, keyGraph: KeyGraphService, encryptionService: EncryptionService);
30
- decryptSharedTrustedPartyDetails(cc: SharedContactCard): Promise<SharedTrustedPartyDetails>;
31
- decryptTrustedPartyDetails(cc: SharedContactCard): Promise<TrustedPartyDetails>;
32
- updateMySharedContactCard(id: string, ownedKeyId: string, sharedKeyId: string, contactCard: TrustedPartyDetails): Promise<void>;
33
- }
@@ -1,36 +0,0 @@
1
- import { ID } from '../api/types';
2
- export interface UpdateOwnedContactCardMutation {
3
- updateOwnedContactCard: {
4
- ownedContactCard: {
5
- id: ID;
6
- };
7
- };
8
- }
9
- export declare const UpdateOwnedContactCardMutation: import("../_common/ast").TypedDocumentNode<UpdateOwnedContactCardMutation>;
10
- export interface UpdateReceivedContactCardMutation {
11
- updateReceivedContactCard: {
12
- receivedContactCard: {
13
- id: ID;
14
- };
15
- };
16
- }
17
- export declare const UpdateReceivedContactCardMutation: import("../_common/ast").TypedDocumentNode<UpdateReceivedContactCardMutation>;
18
- export interface GetOwnedContactCardKeyIdsQuery {
19
- ownedContactCard: {
20
- sharedKey: {
21
- id: ID;
22
- };
23
- ownerKey: {
24
- id: ID;
25
- };
26
- };
27
- }
28
- export declare const GetOwnedContactCardKeyIdsQuery: import("../_common/ast").TypedDocumentNode<GetOwnedContactCardKeyIdsQuery>;
29
- export interface GetReceivedContactCardKeyIdQuery {
30
- receivedContactCard: {
31
- receiverKey: {
32
- id: ID;
33
- };
34
- };
35
- }
36
- export declare const GetReceivedContactCardKeyIdQuery: import("../_common/ast").TypedDocumentNode<GetReceivedContactCardKeyIdQuery>;
@@ -1,45 +0,0 @@
1
- import { NgZone } from '@angular/core';
2
- import { LrGraphQLService, LrMutation } from '../api/lr-graphql';
3
- import { LrRelayIdInput } from '../api/types';
4
- import { EncryptionService } from '../encryption/encryption.service';
5
- import { ContactCardReceiverCipherData, SendContactCardInput } from '../key-exchange/key-exchange.service';
6
- import { KeyGraphService } from '../key/key-graph.service';
7
- import { KeyService } from '../key/key.service';
8
- import { UpdateOwnedContactCardMutation, UpdateReceivedContactCardMutation } from './shared-contact-card2.gql';
9
- export interface UpdateOwnedContactCardInput extends SendContactCardInput {
10
- id: LrRelayIdInput;
11
- ownerKeyId?: LrRelayIdInput;
12
- sharedKeyId?: LrRelayIdInput;
13
- }
14
- export interface UpdateReceivedContactCardInput extends ContactCardReceiverCipherData {
15
- id: LrRelayIdInput;
16
- receiverKeyId?: LrRelayIdInput;
17
- }
18
- export declare class SharedContactCard2Service {
19
- private ngZone;
20
- private keyService;
21
- private keyGraph;
22
- private encryptionService;
23
- private lrGraphQL;
24
- constructor(ngZone: NgZone, keyService: KeyService, keyGraph: KeyGraphService, encryptionService: EncryptionService, lrGraphQL: LrGraphQLService);
25
- private getOwnedContactCardKeyIds;
26
- private getReceivedContactCardKeyId;
27
- updateOwnedContactCard({ id, ownerKeyId, sharedKeyId, ownerPlainDataJson, ownerCipherDataClearJson, sharedCipherDataClearJson, }: UpdateOwnedContactCardInput): Promise<LrMutation<UpdateOwnedContactCardMutation, {
28
- input: {
29
- id: string;
30
- ownerCipherData: string;
31
- ownerKeyId: string;
32
- sharedCipherDataSig: string;
33
- sharedKeyId: string;
34
- sigPxkId: string;
35
- ownerPlainDataSig: string;
36
- };
37
- }>>;
38
- updateReceivedContactCard({ id, receiverKeyId, receiverCipherDataClearJson, }: UpdateReceivedContactCardInput): Promise<LrMutation<UpdateReceivedContactCardMutation, {
39
- input: {
40
- id: string;
41
- receiverCipherData: string;
42
- receiverKeyId: string;
43
- };
44
- }>>;
45
- }
@@ -1,42 +0,0 @@
1
- export declare class SecretShare {
2
- assembly: number;
3
- subAssembly: number;
4
- mnemonics: string;
5
- constructor(assembly?: number, subAssembly?: number, mnemonics?: string);
6
- }
7
- export declare class SubAssembly {
8
- index: number;
9
- threshold: number;
10
- size: number;
11
- constructor(index: number, threshold?: number, size?: number);
12
- shares: SecretShare[];
13
- clearShares(): void;
14
- addShare(share: SecretShare): void;
15
- }
16
- export declare class Assembly {
17
- threshold: number;
18
- constructor(threshold?: number);
19
- subAssemblies: SubAssembly[];
20
- size(): number;
21
- clearSubAssemblies(): void;
22
- addSubAssembly(subAssembly: SubAssembly): void;
23
- }
24
- export declare class SubQuorum {
25
- subAssemblyIndex: number;
26
- shares: string[];
27
- constructor(subAssemblyIndex: number);
28
- clearShares(): void;
29
- addShare(share: string): void;
30
- }
31
- export declare class Quorum {
32
- subQuora: SubQuorum[];
33
- constructor();
34
- clearSubQuora(): void;
35
- addSubQuorum(subQuorum: SubQuorum): void;
36
- serialiseShares(): any[];
37
- }
38
- export declare class Slip39Service {
39
- generateShares(secret: any, passphrase: string, assembly: Assembly): Promise<void>;
40
- private minimalSet;
41
- recoverSecret(shares: string[], passphrase: string): Promise<string>;
42
- }
@@ -1,26 +0,0 @@
1
- import { AuthClass } from '@aws-amplify/auth/lib-esm/Auth';
2
- import { Apollo } from 'apollo-angular';
3
- export declare const ServerTimeQuery: import("graphql").DocumentNode;
4
- export declare class TimeService {
5
- private auth;
6
- private apollo;
7
- VERIFY_ENABLED: boolean;
8
- private readonly MAX_DIFF_MSEC;
9
- offsetMs: number;
10
- verified: boolean;
11
- constructor(auth: AuthClass, apollo: Apollo);
12
- private verifyCognito;
13
- private refresh;
14
- serverNow(): Promise<number>;
15
- /**
16
- * This is the sync version to get now. Call serverNow() first, otherwise this will print error
17
- * because the server time offset is not known. But it will return the current time as a fallback
18
- * so as to not introduce any crashes.
19
- *
20
- */
21
- now(): number;
22
- /**
23
- * Calls this.now() and converts to a Date object.
24
- */
25
- date(): Date;
26
- }
@@ -1,177 +0,0 @@
1
- import { Injector } from '@angular/core';
2
- import { JWK } from 'node-jose';
3
- import { LrGraphQLService } from '../api/lr-graphql';
4
- import { Connection, TpAssemblyNode, TpNode, TpSubAssemblyNode } from '../api/types';
5
- import { EncryptionService } from '../encryption/encryption.service';
6
- import { KeyFactoryService } from '../key/key-factory.service';
7
- import { KeyGraphService } from '../key/key-graph.service';
8
- import { KeyService } from '../key/key.service';
9
- import { Key } from '../key/key.types';
10
- import * as slip from '../slip39/slip39.service';
11
- import { CreateTpAssemblyInput, CreateTpSubAssemblyInput, PartialAssemblyKey, TpAssemblyApproverInput, UpdateTpAssemblyInput, UpdateTpSubAssemblyInput } from './tp-assembly.types';
12
- export declare abstract class TpAssemblyController {
13
- abstract slip39Passphrase: string;
14
- protected keyFactory: KeyFactoryService;
15
- protected keyService: KeyService;
16
- protected encryptionService: EncryptionService;
17
- protected keyGraph: KeyGraphService;
18
- protected slip39Service: slip.Slip39Service;
19
- protected lrGraphQl: LrGraphQLService;
20
- constructor(injector: Injector);
21
- abstract getTpWrappingKeyId(tp: TpNode): string;
22
- recoverAssemblyKey(partials: PartialAssemblyKey[]): Promise<JWK.Key>;
23
- protected prepareTpWrappingKey(tp: TpAssemblyApproverInput): Promise<Key>;
24
- protected prepareAssembly({ subjectKey, rootKey, }: {
25
- subjectKey: JWK.Key;
26
- rootKey: JWK.Key;
27
- }): Promise<{
28
- assemblyKey: JWK.Key;
29
- rawAssemblyKey: any;
30
- assemblyKeyParams: any;
31
- subjectKeyWrappedAssemblyKey: string;
32
- assemblyCipherData: string;
33
- assemblyKeyVerifierPbk: string;
34
- wrappedAssemblyKeyVerifierPrk: string;
35
- }>;
36
- protected prepareCreateSubAssemblies({ input, subjectKey, slipSubAssemblies, assemblyKeyParams, }: {
37
- input: CreateTpSubAssemblyInput[];
38
- subjectKey: JWK.Key;
39
- slipSubAssemblies: slip.SubAssembly[];
40
- assemblyKeyParams: any;
41
- }): Promise<{
42
- singleReject: boolean;
43
- quorum: number;
44
- subjectCipherData: string;
45
- createApprovers: {
46
- tpWrappingKeyId: string;
47
- tpWrappedSharedKey: string;
48
- subjectKeyWrappedSharedKey: string;
49
- sharedCipherData: string;
50
- sharedCipherApprovalData: string;
51
- sharedCipherPartialAssemblyKey: string;
52
- approverId: string;
53
- tpId: string;
54
- }[];
55
- }[]>;
56
- protected prepareUpdateSubAssemblies({ input, subjectKey, slipSubAssemblies, assemblyKeyParams, subAssemblies, }: {
57
- input: UpdateTpSubAssemblyInput[];
58
- subjectKey: JWK.Key;
59
- slipSubAssemblies: slip.SubAssembly[];
60
- assemblyKeyParams: any;
61
- subAssemblies: Connection<TpSubAssemblyNode>;
62
- }): Promise<{
63
- subAssemblyId: string;
64
- singleReject: boolean;
65
- quorum: number;
66
- subjectCipherData: string;
67
- createApprovers: {
68
- tpWrappingKeyId: string;
69
- tpWrappedSharedKey: string;
70
- subjectKeyWrappedSharedKey: string;
71
- sharedCipherData: string;
72
- sharedCipherApprovalData: string;
73
- sharedCipherPartialAssemblyKey: string;
74
- approverId: string;
75
- tpId: string;
76
- }[];
77
- updateApprovers: {
78
- tpWrappingKeyId: string;
79
- tpWrappedSharedKey: string;
80
- subjectKeyWrappedSharedKey: string;
81
- sharedCipherData: string;
82
- sharedCipherApprovalData: string;
83
- sharedCipherPartialAssemblyKey: string;
84
- approverId: string;
85
- tpId: string;
86
- }[];
87
- }[]>;
88
- private fillWrappingKeyId;
89
- private getInputApprovers;
90
- prepareCreate(input: CreateTpAssemblyInput): Promise<{
91
- assemblyKey: JWK.Key;
92
- mutationInput: {
93
- singleReject: boolean;
94
- quorum: number;
95
- subjectCipherData: string;
96
- createSubAssemblies: {
97
- singleReject: boolean;
98
- quorum: number;
99
- subjectCipherData: string;
100
- createApprovers: {
101
- tpWrappingKeyId: string;
102
- tpWrappedSharedKey: string;
103
- subjectKeyWrappedSharedKey: string;
104
- sharedCipherData: string;
105
- sharedCipherApprovalData: string;
106
- sharedCipherPartialAssemblyKey: string;
107
- approverId: string;
108
- tpId: string;
109
- }[];
110
- }[];
111
- rootKeyId: string;
112
- rootKeyWrappedSubjectKey: string;
113
- subjectKeyWrappedAssemblyKey: string;
114
- assemblyCipherData: string;
115
- assemblyKeyVerifierPbk: string;
116
- wrappedAssemblyKeyVerifierPrk: string;
117
- };
118
- }>;
119
- private getAssemblyApprovers;
120
- prepareUpdate(input: UpdateTpAssemblyInput, assembly: TpAssemblyNode): Promise<{
121
- assemblyKey: JWK.Key;
122
- mutationInput: {
123
- singleReject: boolean;
124
- quorum: number;
125
- subjectCipherData: string;
126
- subjectKeyId: string;
127
- createSubAssemblies: {
128
- singleReject: boolean;
129
- quorum: number;
130
- subjectCipherData: string;
131
- createApprovers: {
132
- tpWrappingKeyId: string;
133
- tpWrappedSharedKey: string;
134
- subjectKeyWrappedSharedKey: string;
135
- sharedCipherData: string;
136
- sharedCipherApprovalData: string;
137
- sharedCipherPartialAssemblyKey: string;
138
- approverId: string;
139
- tpId: string;
140
- }[];
141
- }[];
142
- updateSubAssemblies: {
143
- subAssemblyId: string;
144
- singleReject: boolean;
145
- quorum: number;
146
- subjectCipherData: string;
147
- createApprovers: {
148
- tpWrappingKeyId: string;
149
- tpWrappedSharedKey: string;
150
- subjectKeyWrappedSharedKey: string;
151
- sharedCipherData: string;
152
- sharedCipherApprovalData: string;
153
- sharedCipherPartialAssemblyKey: string;
154
- approverId: string;
155
- tpId: string;
156
- }[];
157
- updateApprovers: {
158
- tpWrappingKeyId: string;
159
- tpWrappedSharedKey: string;
160
- subjectKeyWrappedSharedKey: string;
161
- sharedCipherData: string;
162
- sharedCipherApprovalData: string;
163
- sharedCipherPartialAssemblyKey: string;
164
- approverId: string;
165
- tpId: string;
166
- }[];
167
- }[];
168
- subjectKeyWrappedAssemblyKey: string;
169
- assemblyCipherData: string;
170
- assemblyKeyVerifierPbk: string;
171
- wrappedAssemblyKeyVerifierPrk: string;
172
- };
173
- }>;
174
- private prepareApprover;
175
- validateApprovers(approvers: TpNode[]): void;
176
- protected prepareSlip39(subAssemblies: any, assemblyQuorum: number, rawAssemblyKey: string): Promise<slip.Assembly>;
177
- }
@@ -1,5 +0,0 @@
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>;
@@ -1,40 +0,0 @@
1
- import { JSONObject, JSONString } from '../api/types';
2
- import * as slip from '../slip39/slip39.service';
3
- export interface PartialAssemblyKey {
4
- slip39: {
5
- share: slip.SecretShare;
6
- subAssembly: {
7
- quorum: number;
8
- size: number;
9
- };
10
- };
11
- assemblyKeyParams: Record<string, JSONString>;
12
- }
13
- export interface CreateTpSubAssemblyInput {
14
- quorum: number;
15
- singleReject: boolean;
16
- approverTps: TpAssemblyApproverInput[];
17
- subjectCipherDataClearJson?: JSONObject;
18
- }
19
- export interface UpdateTpSubAssemblyInput extends CreateTpSubAssemblyInput {
20
- id: string;
21
- }
22
- export interface TpAssemblyInput {
23
- quorum: number;
24
- singleReject: boolean;
25
- subjectCipherDataClearJson?: JSONObject;
26
- }
27
- export interface CreateTpAssemblyInput extends TpAssemblyInput {
28
- createSubAssemblies: CreateTpSubAssemblyInput[];
29
- }
30
- export interface UpdateTpAssemblyInput extends TpAssemblyInput {
31
- createSubAssemblies?: CreateTpSubAssemblyInput[];
32
- updateSubAssemblies?: UpdateTpSubAssemblyInput[];
33
- deleteSubAssemblies?: string[];
34
- }
35
- export interface TpAssemblyApproverInput {
36
- tpId: string;
37
- wrappingKeyId?: string;
38
- sharedCipherDataClearJson?: JSONObject;
39
- sharedCipherApprovalDataClearJson?: JSONObject;
40
- }
@@ -1,16 +0,0 @@
1
- import { Injector, NgZone } from '@angular/core';
2
- import { LrMergedMutation, LrService } from '../api/lr-graphql';
3
- import { EncryptionService } from '../encryption/encryption.service';
4
- import { TpPasswordResetPrivateService } from './tp-password-reset.private.service';
5
- export declare class TpPasswordResetRequestService extends LrService {
6
- private ngZone;
7
- private injector;
8
- private encryptionService;
9
- private privateService;
10
- constructor(ngZone: NgZone, injector: Injector, encryptionService: EncryptionService, privateService: TpPasswordResetPrivateService);
11
- private activeRequestOrRaise;
12
- rejectRequest(sharedResetId: string): Promise<any>;
13
- rejectRequestMutation(sharedResetId: string): Promise<LrMergedMutation<import("./tp-password-reset.gql").RejectTpPasswordResetRequestMutationResult[]>>;
14
- approveRequest(sharedResetId: string, pbkFingerPrint?: string): Promise<any>;
15
- approveRequestMutation(sharedResetId: string, _pbkFingerPrint?: string): Promise<LrMergedMutation<import("./tp-password-reset.gql").ApproveTpPasswordResetRequestMutationResult[]>>;
16
- }
@@ -1,29 +0,0 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { Injector, NgZone } from '@angular/core';
3
- import { AuthClass } from '@aws-amplify/auth/lib-esm/Auth';
4
- import { ISignUpResult } from 'amazon-cognito-identity-js';
5
- import { LrService } from '../api/lr-graphql';
6
- import { EncryptionService } from '../encryption/encryption.service';
7
- import { KeyFactoryService } from '../key/key-factory.service';
8
- import { KcConfig } from '../life-ready.config';
9
- import { PasswordService } from '../password/password.service';
10
- import { RequestResetResult } from './tp-password-reset.types';
11
- export declare class TpPasswordResetUserService extends LrService {
12
- private ngZone;
13
- private injector;
14
- private config;
15
- private keyFactory;
16
- private encryptionService;
17
- private passwordService;
18
- private http;
19
- private auth;
20
- constructor(ngZone: NgZone, injector: Injector, config: KcConfig, keyFactory: KeyFactoryService, encryptionService: EncryptionService, passwordService: PasswordService, http: HttpClient, auth: AuthClass);
21
- verifyEmailContact(email: any): Promise<{
22
- claimId: string;
23
- }>;
24
- verifyContactRespond(claimId: string, claimCode: string): Promise<string>;
25
- requestReset(password: CryptoKey, claimId: string, claimToken: string): Promise<{
26
- requestResetResult: RequestResetResult;
27
- signUpResult: ISignUpResult;
28
- }>;
29
- }
@@ -1,3 +0,0 @@
1
- export declare const TP_PASSWORD_RESET_CLIENT_NONCE_LENGTH = 32;
2
- export declare const TP_PASSWORD_RESET_SLIP39_PASSPHRASE = "lifeready";
3
- export declare const TP_PASSWORD_RESET_USERNAME_SUFFIX = ".tp_password_reset";
@@ -1,10 +0,0 @@
1
- import { Injector, NgZone } from '@angular/core';
2
- import { TpNode } from '../api/types';
3
- import { TpAssemblyController } from '../tp-assembly/tp-assembly';
4
- export declare class TpPasswordResetAssemblyController extends TpAssemblyController {
5
- private ngZone;
6
- private injector;
7
- slip39Passphrase: string;
8
- constructor(ngZone: NgZone, injector: Injector);
9
- getTpWrappingKeyId(tp: TpNode): string;
10
- }
@@ -1,63 +0,0 @@
1
- import { ID, JSONObject } from '../api/types';
2
- export interface CancelTpPasswordResetRequestMutationResult {
3
- cancelTpPasswordResetRequest: {
4
- id: ID;
5
- };
6
- }
7
- export declare const CancelTpPasswordResetRequestMutation: import("../_common/ast").TypedDocumentNode<CancelTpPasswordResetRequestMutationResult>;
8
- export interface CreateTpAssemblyKeyChallengeMutationResult {
9
- createTpAssemblyKeyChallenge: {
10
- challenge: JSONObject;
11
- };
12
- }
13
- export declare const CreateTpAssemblyKeyChallengeMutation: import("../_common/ast").TypedDocumentNode<CreateTpAssemblyKeyChallengeMutationResult>;
14
- export interface PreCompleteTpPasswordResetRequestMutationResult {
15
- preCompleteTpPasswordResetRequest: {
16
- idpPassword: string;
17
- };
18
- }
19
- export declare const PreCompleteTpPasswordResetRequestMutation: import("../_common/ast").TypedDocumentNode<PreCompleteTpPasswordResetRequestMutationResult>;
20
- export interface CompleteTpPasswordResetRequestMutationResult {
21
- completeTpPasswordResetRequest: {
22
- id: ID;
23
- };
24
- }
25
- export declare const CompleteTpPasswordResetRequestMutation: import("../_common/ast").TypedDocumentNode<CompleteTpPasswordResetRequestMutationResult>;
26
- export interface ApproveTpPasswordResetRequestMutationResult {
27
- approveTpPasswordResetRequest: {
28
- claimApprover: {
29
- id: ID;
30
- };
31
- };
32
- }
33
- export declare const ApproveTpPasswordResetRequestMutation: import("../_common/ast").TypedDocumentNode<ApproveTpPasswordResetRequestMutationResult>;
34
- export interface RejectTpPasswordResetRequestMutationResult {
35
- rejectTpPasswordResetRequest: {
36
- claimApprover: {
37
- id: ID;
38
- };
39
- };
40
- }
41
- export declare const RejectTpPasswordResetRequestMutation: import("../_common/ast").TypedDocumentNode<RejectTpPasswordResetRequestMutationResult>;
42
- export interface CreateTpPasswordResetMutationResult {
43
- createTpPasswordReset: {
44
- tpPasswordReset: {
45
- id: ID;
46
- };
47
- };
48
- }
49
- export declare const CreateTpPasswordResetMutation: import("../_common/ast").TypedDocumentNode<CreateTpPasswordResetMutationResult>;
50
- export interface DeleteTpPasswordResetMutationResult {
51
- deleteTpPasswordReset: {
52
- id: ID;
53
- };
54
- }
55
- export declare const DeleteTpPasswordResetMutation: import("../_common/ast").TypedDocumentNode<DeleteTpPasswordResetMutationResult>;
56
- export interface UpdateTpPasswordResetMutationResult {
57
- updateTpPasswordReset: {
58
- tpPasswordReset: {
59
- id: ID;
60
- };
61
- };
62
- }
63
- export declare const UpdateTpPasswordResetMutation: import("../_common/ast").TypedDocumentNode<UpdateTpPasswordResetMutationResult>;