@safetech/inheriti-client-sdk 1.17.3 → 1.17.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/browser.d.ts +70 -2
- package/dist/browser.js +1 -1
- package/dist/index.js +1 -1
- package/dist/inheriti-client-sdk.umd.js +82 -47
- package/dist/node.d.ts +13 -2
- package/dist/node.js +1 -1
- package/dist/sdk-types.d.ts +434 -140
- package/dist/src/elements/browser-plan-material-reconstructor.d.ts +23 -0
- package/dist/src/elements/core-plan-material-builder.d.ts +1 -0
- package/dist/src/elements/elements-api-port.d.ts +78 -3
- package/dist/src/elements/elements-client.d.ts +56 -5
- package/dist/src/elements/http-elements-api-port.d.ts +20 -1
- package/dist/src/elements/index.d.ts +7 -3
- package/dist/src/elements/master-key-acquisition.d.ts +46 -0
- package/dist/src/elements/node-plan-material-reconstructor.d.ts +9 -6
- package/dist/src/elements/plan-operations.d.ts +62 -4
- package/dist/src/elements/scoped-reveal.d.ts +62 -1
- package/dist/src/elements/ssdp-v2-plan-material-reconstructor.d.ts +17 -0
- package/node.ts +14 -3
- package/package.json +2 -2
package/node.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { NodeSharedConfigurationSdkOptions } from '@safetech/inheriti-core-
|
|
|
3
3
|
import ElementsClient from './src/elements/elements-client';
|
|
4
4
|
import type { KeyVault } from './src/elements/key-vault';
|
|
5
5
|
import type { MasterKeyResolver } from './src/elements/master-key';
|
|
6
|
+
import type { ElementsClientOptions } from './src/elements/elements-client';
|
|
6
7
|
import type { StatePort } from './src/elements/state-port';
|
|
7
8
|
import HttpElementsApiPort from './src/elements/http-elements-api-port';
|
|
8
9
|
import NodePlanMaterialReconstructor from './src/elements/node-plan-material-reconstructor';
|
|
@@ -11,8 +12,14 @@ export interface NodeElementsClientOptions extends NodeSharedConfigurationSdkOpt
|
|
|
11
12
|
environment: 'TEST' | 'LIVE';
|
|
12
13
|
keyVault?: KeyVault;
|
|
13
14
|
state?: StatePort;
|
|
14
|
-
/**
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Resolves master keys per plan reference. A host that composes its own custody passes this;
|
|
17
|
+
* one that only declares what it holds passes `masterKey` instead and lets the client compose
|
|
18
|
+
* acquisition — including asking the device that holds the key.
|
|
19
|
+
*/
|
|
20
|
+
masterKeys?: MasterKeyResolver;
|
|
21
|
+
/** What custody this host holds locally. See `ElementsClientOptions['masterKey']`. */
|
|
22
|
+
masterKey?: ElementsClientOptions['masterKey'];
|
|
16
23
|
/** The Application this client acts for; needed to wrap keys of plans it creates. */
|
|
17
24
|
applicationId: string;
|
|
18
25
|
}
|
|
@@ -26,7 +33,7 @@ export function createNodeElementsClient(options: NodeElementsClientOptions): El
|
|
|
26
33
|
};
|
|
27
34
|
const coreSdk = createNodeSharedConfigurationSdk({ apiUrl: options.apiUrl, getBearerToken: options.getBearerToken, transport, workerUrl: options.workerUrl, reconciliationConcurrency: options.reconciliationConcurrency, eventListeners: options.eventListeners });
|
|
28
35
|
const api = new HttpElementsApiPort(options.apiUrl, options.environment, options.getBearerToken, transport);
|
|
29
|
-
return new ElementsClient(coreSdk, { keyVault: options.keyVault, state: options.state, api, reconstructor: new NodePlanMaterialReconstructor(), masterKeys: options.masterKeys, applicationId: options.applicationId, assetDecoder: decodeAssetContainer });
|
|
36
|
+
return new ElementsClient(coreSdk, { keyVault: options.keyVault, state: options.state, api, reconstructor: new NodePlanMaterialReconstructor(), masterKeys: options.masterKeys, masterKey: options.masterKey, applicationId: options.applicationId, assetDecoder: decodeAssetContainer });
|
|
30
37
|
}
|
|
31
38
|
|
|
32
39
|
export { ElementsClient };
|
|
@@ -42,6 +49,10 @@ export { MasterKeyRequired, StaticMasterKeyResolver, masterKeyRefFor, masterKeyR
|
|
|
42
49
|
export type { MasterKeyRef, MasterKeyResolver } from './src/elements/master-key';
|
|
43
50
|
export { unwrapDekWithMasterKey } from './src/elements/unwrap-dek';
|
|
44
51
|
export { RelayMasterKeySource, MasterKeyRelayExpired, MasterKeyRelayTimedOut } from './src/elements/relay-master-key-source';
|
|
52
|
+
export { createMasterKeyResolver } from './src/elements/master-key-acquisition';
|
|
53
|
+
export type { MasterKeySource } from '@safetech/inheriti-core-sdk';
|
|
54
|
+
export type { DeclaredMasterKeySource, MasterKeyAcquisitionOptions } from './src/elements/master-key-acquisition';
|
|
55
|
+
export type { MasterKeyAcquisition, MasterKeyRelaySessionOpened, MasterKeyRelaySessionState } from './src/elements/elements-api-port';
|
|
45
56
|
export type { MasterKeyRelayPort } from './src/elements/relay-master-key-source';
|
|
46
57
|
// The guided-create path is the one a non-browser host drives itself, so the Node entry has to
|
|
47
58
|
// carry it: the orchestration, the Core-backed material builder, and the contract types and
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@safetech/inheriti-client-sdk",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.5",
|
|
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.
|
|
45
|
+
"@safetech/inheriti-core-sdk": "4.0.20"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@rollup/plugin-alias": "^5.1.1",
|