@virtru/dsp-sdk 0.7.2 → 0.7.4

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/CHANGELOG.md CHANGED
@@ -1,6 +1,20 @@
1
1
  # Change Log - @virtru/dsp-sdk
2
2
 
3
- This log was last generated on Wed, 22 Apr 2026 16:33:37 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 28 Apr 2026 16:40:32 GMT and should not be manually modified.
4
+
5
+ ## 0.7.4
6
+ Tue, 28 Apr 2026 16:40:32 GMT
7
+
8
+ ### Patches
9
+
10
+ - Fix fips library dynamic import for vite 8
11
+
12
+ ## 0.7.3
13
+ Tue, 28 Apr 2026 15:37:06 GMT
14
+
15
+ ### Patches
16
+
17
+ - update opentdf-sdk to 0.16.0
4
18
 
5
19
  ## 0.7.2
6
20
  Wed, 22 Apr 2026 16:33:37 GMT
package/README.md CHANGED
@@ -35,18 +35,16 @@ npm install @virtru/dsp-sdk
35
35
  The following example demonstrates how to authenticate with DSP, initialize the platform client, and perform common operations such as tagging and fetching configuration.
36
36
 
37
37
  ```typescript
38
- import { AuthProviders, DSP } from '@virtru/dsp-sdk';
38
+ import { DSP, type Interceptor } from '@virtru/dsp-sdk';
39
39
 
40
- const authProvider = await AuthProviders.refreshAuthProvider({
41
- clientId: 'oids-client-id',
42
- exchange: 'refresh',
43
- refreshToken: 'refresh-token',
44
- oidcOrigin: 'oidc-issuer-url',
45
- });
40
+ const authInterceptor: Interceptor = (next) => async (req) => {
41
+ req.header.set('Authorization', 'Bearer access-token');
42
+ return next(req);
43
+ };
46
44
 
47
45
  const dsp = new DSP({
48
- authProvider,
49
46
  platformUrl: '/api',
47
+ interceptors: [authInterceptor],
50
48
  });
51
49
 
52
50
  // Tag PDP
@@ -100,7 +98,7 @@ const authProvider = await AuthProviders.clientSecretAuthProvider(
100
98
 
101
99
  // Initialize DSP with FIPS mode enabled
102
100
  const dsp = new DSP({
103
- authProvider,
101
+ authProvider, // Backward-compatible. Prefer interceptors for new integrations.
104
102
  platformUrl: 'https://dsp-platform-url',
105
103
  useFips: true, // Enables FIPS mode
106
104
  });
@@ -11,7 +11,7 @@ export { createAuthInterceptor, type Interceptor, createAuthProvider, createOpen
11
11
  /**
12
12
  * Exports the DSP wrapper of OpenTDF
13
13
  */
14
- export { DSP, createDSP } from './lib/dsp';
14
+ export { DSP, createDSP, type DSPOptions } from './lib/dsp';
15
15
  /**
16
16
  * Exports components of OpenTDF
17
17
  */
@@ -67,9 +67,10 @@ export const getVirtruCrypto = async () => {
67
67
  * Loaded dynamically so non-FIPS consumers do not require the optional peer.
68
68
  */
69
69
  export const initializeFipsCrypto = () => {
70
- // Keep specifier dynamic so Vite/Rollup does not eagerly resolve the optional
71
- // peer in non-FIPS builds; load occurs only when FIPS mode is enabled.
72
- const modulePath = '@virtru-private/fips-crypto-js';
70
+ // .join() prevents esbuild from constant-folding the specifier into a string
71
+ // literal, which would cause Vite 8's import-analysis to error on the
72
+ // unresolvable bare specifier. @vite-ignore kept for defense in depth.
73
+ const modulePath = ['@virtru-private', 'fips-crypto-js'].join('/');
73
74
  void import(/* @vite-ignore */ modulePath).catch((err) => {
74
75
  console.error('Virtru FIPS crypto initialization failed: @virtru-private/fips-crypto-js is not installed.', err);
75
76
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@virtru/dsp-sdk",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "main": "dist/src/index.js",
6
6
  "exports": {
@@ -54,7 +54,7 @@
54
54
  "@bufbuild/protobuf": "^2.7.0",
55
55
  "@connectrpc/connect": "~2.0.2",
56
56
  "@connectrpc/connect-web": "~2.0.2",
57
- "@opentdf/sdk": "0.10.0-rc.97",
57
+ "@opentdf/sdk": "0.16.0",
58
58
  "asn1js": "^3.0.5",
59
59
  "pkijs": "^3.0.19"
60
60
  },