@safetech/inheriti-client-sdk 1.17.6 → 1.17.8

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.
@@ -20,6 +20,12 @@ export interface ConsumedRevealField {
20
20
  value: unknown;
21
21
  }
22
22
  export type RevealFieldDestination = (fields: readonly ConsumedRevealField[]) => void | Promise<void>;
23
+ export type RevealAssetDestination = (asset: {
24
+ id: string;
25
+ fileName?: string;
26
+ mimeType?: string;
27
+ bytes: Uint8Array;
28
+ }) => void | Promise<void>;
23
29
  /**
24
30
  * Where a reveal has got to, in the order a reveal runs.
25
31
  *
@@ -38,7 +44,7 @@ export type RevealPhase =
38
44
  * one-shot material release. A host that derives its own key never sees this phase — it passes
39
45
  * through in a single call — so its presence means a person has to answer on SafeKey Mobile.
40
46
  */
41
- 'WAITING_FOR_MASTER_KEY' | 'STARTING' | 'WAITING_FOR_DMS' | 'WAITING_FOR_AUTHENTICATION' | 'WAITING_FOR_MODERATION' | 'RELEASING_MATERIAL' | 'WAITING_FOR_CUSTODIAN_CLAIM' | 'WAITING_FOR_CUSTODIAN' | 'RECONSTRUCTING' | 'OPEN' | 'DENIED' | 'EXPIRED' | 'PARTICIPANT_REVOKED' | 'RECONCILIATION_REQUIRED' | 'STOPPED_BY_DMS' | 'ENDED'
47
+ 'WAITING_FOR_MASTER_KEY' | 'STARTING' | 'WAITING_FOR_DMS' | 'WAITING_FOR_AUTHENTICATION' | 'WAITING_FOR_MODERATION' | 'RELEASING_MATERIAL' | 'WAITING_FOR_CUSTODIAN_CLAIM' | 'WAITING_FOR_CUSTODIAN' | 'CUSTODIAN_SHARE_DISTRIBUTED' | 'RECONSTRUCTING' | 'OPEN' | 'DENIED' | 'EXPIRED' | 'PARTICIPANT_REVOKED' | 'RECONCILIATION_REQUIRED' | 'STOPPED_BY_DMS' | 'ENDED'
42
48
  /** A stage this build has not been taught to name. Stages are additive, so it is a wait. */
43
49
  | 'CONTINUING';
44
50
  export interface RevealProgress {
@@ -72,6 +78,7 @@ export interface RevealHandle {
72
78
  field<TValue = unknown>(selector: AssetFieldSelector, options?: RevealFieldOptions): Promise<TValue>;
73
79
  /** Authorize, decode and deliver fields without returning their plaintext to the caller. */
74
80
  consumeFields(fields: readonly RevealFieldConsumption[], destination: RevealFieldDestination): Promise<void>;
81
+ exportAsset(selector: string, destination: RevealAssetDestination): Promise<void>;
75
82
  close(reason?: RevealCloseReason): Promise<void>;
76
83
  [Symbol.asyncDispose](): Promise<void>;
77
84
  }
@@ -15,3 +15,10 @@ export default class SsdpV2PlanMaterialReconstructor implements PlanMaterialReco
15
15
  constructor(processor: () => SsdpV2Processor);
16
16
  reconstruct(material: CollectedPlanMaterial, masterKeyHex?: string): Promise<Uint8Array>;
17
17
  }
18
+ export declare class PlanMaterialReconstructionFailed extends Error {
19
+ readonly code: 'plan_key_unwrap_failed' | 'plan_share_decryption_failed' | 'plan_share_reconstruction_failed';
20
+ readonly reason?: ReconstructionReason | undefined;
21
+ constructor(code: 'plan_key_unwrap_failed' | 'plan_share_decryption_failed' | 'plan_share_reconstruction_failed', reason?: ReconstructionReason | undefined);
22
+ }
23
+ type ReconstructionReason = string;
24
+ export {};
package/dist/test.d.ts CHANGED
@@ -1,2 +1,185 @@
1
- export declare const TestUtils: any;
1
+ export declare const TestUtils: {
2
+ ProtectionPlan: {
3
+ PlanDataAssetInputGenerator: {
4
+ plainText: (props?: {
5
+ id?: string;
6
+ name?: string;
7
+ secret?: {
8
+ text: string;
9
+ };
10
+ }) => import("@safetech/inheriti-core-sdk").DataAsset;
11
+ onlineAccount: (props?: any) => import("@safetech/inheriti-core-sdk").DataAsset;
12
+ recoveryCode: (props?: any) => import("@safetech/inheriti-core-sdk").DataAsset;
13
+ pinCode: (props?: any) => import("@safetech/inheriti-core-sdk").DataAsset;
14
+ apiKey: (props?: any) => import("@safetech/inheriti-core-sdk").DataAsset;
15
+ privateKey: (props?: any) => import("@safetech/inheriti-core-sdk").DataAsset;
16
+ seedPhrase: (props?: {
17
+ id?: string;
18
+ name?: string;
19
+ typeLength?: number;
20
+ secret?: {
21
+ words: string[];
22
+ };
23
+ }) => import("@safetech/inheriti-core-sdk").DataAsset;
24
+ paymentDebitCard: (props?: any) => import("@safetech/inheriti-core-sdk").DataAsset;
25
+ paymentCreditCard: (props?: any) => import("@safetech/inheriti-core-sdk").DataAsset;
26
+ };
27
+ };
28
+ RandomElementPickerMother: {
29
+ new (): {};
30
+ from(a: any): any;
31
+ };
32
+ SharedProtectionPlan: {};
33
+ DataAssetInputGenerator: {
34
+ new (): {};
35
+ plainText({ id: a, name: e, secret: i }?: {
36
+ id?: any;
37
+ name?: any;
38
+ }): {
39
+ id: any;
40
+ type: string;
41
+ meta: {
42
+ name: any;
43
+ };
44
+ secret: any;
45
+ };
46
+ userAndPassword({ id: a, name: e, notes: i, secret: r }?: {
47
+ id?: any;
48
+ name?: any;
49
+ notes?: any;
50
+ }): {
51
+ id: any;
52
+ type: string;
53
+ meta: {
54
+ name: any;
55
+ notes: any;
56
+ };
57
+ secret: any;
58
+ };
59
+ recoveryCode({ id: a, name: e, notes: i, secret: r }?: {
60
+ id?: any;
61
+ name?: any;
62
+ notes?: any;
63
+ }): {
64
+ id: any;
65
+ type: string;
66
+ meta: {
67
+ name: any;
68
+ notes: any;
69
+ };
70
+ secret: any;
71
+ };
72
+ pinCode({ id: a, name: e, notes: i, secret: r }?: {
73
+ id?: any;
74
+ name?: any;
75
+ notes?: any;
76
+ }): {
77
+ id: any;
78
+ type: string;
79
+ meta: {
80
+ name: any;
81
+ notes: any;
82
+ };
83
+ secret: any;
84
+ };
85
+ apiKey({ id: a, name: e, notes: i, secret: r }?: {
86
+ id?: any;
87
+ name?: any;
88
+ notes?: any;
89
+ }): {
90
+ id: any;
91
+ type: string;
92
+ meta: {
93
+ name: any;
94
+ notes: any;
95
+ };
96
+ secret: any;
97
+ };
98
+ privateKey({ id: a, name: e, notes: i, secret: r }?: {
99
+ id?: any;
100
+ name?: any;
101
+ notes?: any;
102
+ }): {
103
+ id: any;
104
+ type: string;
105
+ meta: {
106
+ name: any;
107
+ notes: any;
108
+ };
109
+ secret: any;
110
+ };
111
+ seedPhrase({ id: a, name: e, notes: i, typeLength: r, secret: n }?: {
112
+ id?: any;
113
+ name?: any;
114
+ notes?: any;
115
+ typeLength?: any;
116
+ }): {
117
+ id: any;
118
+ type: string;
119
+ meta: {
120
+ name: any;
121
+ notes: any;
122
+ };
123
+ secret: any;
124
+ };
125
+ paymentDebitCard({ id: a, name: e, notes: i, secret: r }?: {
126
+ id?: any;
127
+ name?: any;
128
+ notes?: any;
129
+ }): {
130
+ id: any;
131
+ type: string;
132
+ meta: {
133
+ name: any;
134
+ notes: any;
135
+ };
136
+ secret: any;
137
+ };
138
+ pdf({ id: a, name: e }?: {
139
+ id?: any;
140
+ name?: any;
141
+ }): {
142
+ id: any;
143
+ type: string;
144
+ meta: {
145
+ name: any;
146
+ mimeType: string;
147
+ isMedia: boolean;
148
+ };
149
+ secret: {
150
+ data: string;
151
+ mimeType: string;
152
+ };
153
+ };
154
+ video({ id: a, name: e }?: {
155
+ id?: any;
156
+ name?: any;
157
+ }): {
158
+ id: any;
159
+ type: string;
160
+ meta: {
161
+ name: any;
162
+ mimeType: string;
163
+ isMedia: boolean;
164
+ };
165
+ secret: {
166
+ data: string;
167
+ mimeType: string;
168
+ };
169
+ };
170
+ paymentCreditCard({ id: a, name: e, notes: i, secret: r }?: {
171
+ id?: any;
172
+ name?: any;
173
+ notes?: any;
174
+ }): {
175
+ id: any;
176
+ type: string;
177
+ meta: {
178
+ name: any;
179
+ notes: any;
180
+ };
181
+ secret: any;
182
+ };
183
+ };
184
+ };
2
185
  export { TestKeyVault, TestStatePort } from './src/elements/test-doubles';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@safetech/inheriti-client-sdk",
3
- "version": "1.17.6",
3
+ "version": "1.17.8",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -42,7 +42,7 @@
42
42
  "license": "MIT",
43
43
  "dependencies": {
44
44
  "@safetech/safekey-sdk": "^1.0.0",
45
- "@safetech/inheriti-core-sdk": "4.0.21"
45
+ "@safetech/inheriti-core-sdk": "4.0.28"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@rollup/plugin-alias": "^5.1.1",
@@ -87,11 +87,6 @@
87
87
  "publish-npm": "node esbuild.config.js && node scripts/publish-npm.js"
88
88
  },
89
89
  "files": [
90
- "dist",
91
- "README.md",
92
- "LICENSE",
93
- "docs",
94
- "index.ts",
95
- "node.ts"
90
+ "dist"
96
91
  ]
97
92
  }