dataspace-client-sdk-node 0.2.0 → 0.2.2

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.
@@ -22,8 +22,6 @@ This guide is backend-only and uses `dataspace-client-sdk-node`.
22
22
  | `_exchange` token flow | Identity/business | Activation code exchange for initial access | Multi-ICA/operator catalog traversal |
23
23
  | SMART access token | Identity/business | Authorized protected operations via scopes | Infrastructure/operator-plane control |
24
24
 
25
- If your deployment does not require a transport credential, omit `bearerToken` entirely.
26
-
27
25
  Recommended initialization:
28
26
 
29
27
  ```ts
@@ -40,7 +38,6 @@ const backendWallet = new SeedWalletProvider(
40
38
 
41
39
  const client = new DataspaceNodeClient({
42
40
  baseUrl,
43
- bearerToken, // optional transport-plane credential if deployment requires it
44
41
  wallet: backendWallet,
45
42
  ctx: { tenantId, jurisdiction, sector },
46
43
  });
@@ -49,7 +46,7 @@ const client = new DataspaceNodeClient({
49
46
  Alternative (mutable context):
50
47
 
51
48
  ```ts
52
- const client = new DataspaceNodeClient({ baseUrl, bearerToken, wallet: backendWallet });
49
+ const client = new DataspaceNodeClient({ baseUrl, wallet: backendWallet });
53
50
  client.setContextOrg({ tenantId, jurisdiction, sector });
54
51
  client.setDefaultTimeoutSeconds(12);
55
52
  client.setDefaultIntervalSeconds(2);
@@ -99,15 +96,21 @@ async function submitDidcomm(
99
96
 
100
97
  ## Flow A. Legal Organization Onboarding (B2B)
101
98
 
102
- 1. Receive from frontend: `jurisdiction`, `sector`, `vpToken`.
103
- 2. Activate in GW:
99
+ 1. Verify legal-organization PDF in ICA and obtain:
100
+ - `OrganizationCredential` VC
101
+ - `LegalRepresentativeCredential` VC
102
+ 2. Build VP payload with both VCs and prepare `header.payload` for signature.
103
+ - integrator signs with controller key (ES256K / ES384 / ML-DSA depending on environment policy)
104
+ 3. Receive from frontend/backend session context: `jurisdiction`, `sector`, `tenantId`, signed `vpToken`.
105
+ 4. Activate in GW:
104
106
  - SDK method: `activateOrganizationInGatewaySimple(...)` (recommended)
105
107
  - SDK method: `activateOrganizationInGatewayFromIcaProof(...)` (advanced)
106
- 3. Complete legal organization order (always; amount may be `0`) using `offerId` returned by activation response.
108
+ 5. Complete legal organization order (always; amount may be `0`) using `offerId` returned by activation response.
107
109
  - `hostRegistryOrderBatchPath(...)`
108
110
  - `hostRegistryOrderPollPath(...)`
109
111
  - `submitAndPoll(...)`
110
- 4. Run DCR/token bootstrap:
112
+ 6. Run controller DCR/token bootstrap first (`_exchange` then `_dcr`), then employee flows.
113
+ 7. Run employee DCR/token bootstrap when employee is invited/activated:
111
114
  - `activateEmployeeDeviceWithActivationCodeSimple(...)` (recommended)
112
115
  - `activateEmployeeDeviceWithActivationCode(...)` (advanced)
113
116
  - `requestSmartTokenSimple(...)` (recommended)
@@ -118,7 +121,7 @@ async function submitDidcomm(
118
121
 
119
122
  ```ts
120
123
  app.post('/api/onboarding/legal/activate', async (req, res) => {
121
- const client = new DataspaceNodeClient({ baseUrl, bearerToken });
124
+ const client = new DataspaceNodeClient({ baseUrl });
122
125
  client.setContextOrg({
123
126
  tenantId: req.body.tenantId,
124
127
  jurisdiction: req.body.jurisdiction,
@@ -170,7 +173,7 @@ Async UX note:
170
173
 
171
174
  ```ts
172
175
  app.post('/api/onboarding/personal/register', async (req, res) => {
173
- const client = new DataspaceNodeClient({ baseUrl, bearerToken });
176
+ const client = new DataspaceNodeClient({ baseUrl });
174
177
  const ctx = {
175
178
  tenantId: req.body.tenantId,
176
179
  jurisdiction: req.body.jurisdiction,
package/package.json CHANGED
@@ -1,7 +1,17 @@
1
1
  {
2
2
  "name": "dataspace-client-sdk-node",
3
- "version": "0.2.0",
4
- "description": "Node.js SDK skeleton for GW/UNID DIDComm plain batch + async polling flows",
3
+ "version": "0.2.2",
4
+ "description": "Node.js SDK for DIDComm plain batch + async polling flows",
5
+ "license": "Apache-2.0",
6
+ "author": "Antifraud Services Inc.",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/Global-DataCare/dataspace-client-sdk-node.git"
10
+ },
11
+ "homepage": "https://github.com/Global-DataCare/dataspace-client-sdk-node#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/Global-DataCare/dataspace-client-sdk-node/issues"
14
+ },
5
15
  "type": "module",
6
16
  "main": "dist/index.js",
7
17
  "types": "dist/index.d.ts",