gdc-sdk-node-ts 2.4.10 → 2.4.12

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.
@@ -358,9 +358,11 @@ export class NodeManagedWallet {
358
358
  header: {
359
359
  typ: 'JWS',
360
360
  },
361
- claims: {
362
- payload: content,
363
- },
361
+ // GW KMS decodes the JWS claims as the DIDComm message itself. Wrapping
362
+ // the message in `{ payload: ... }` hides `iss`, `thid` and `body` one
363
+ // level too deep and makes every encrypted resource action fail before
364
+ // routing or signature verification.
365
+ claims: content,
364
366
  key: signingKey,
365
367
  });
366
368
  return this.buildCompactJwe(options.context, {
@@ -404,8 +406,16 @@ export class NodeManagedWallet {
404
406
  throw new Error('NodeManagedWallet.unpackWithContext expected a compact JWS payload.');
405
407
  }
406
408
  const payload = Content.base64UrlSafeToJSON(parts[1]);
409
+ const decodedPayload = payload;
410
+ const legacyWrappedContent = Object.keys(decodedPayload).length === 1
411
+ && decodedPayload.payload
412
+ && typeof decodedPayload.payload === 'object'
413
+ ? decodedPayload.payload
414
+ : decodedPayload;
407
415
  return {
408
- content: payload.payload,
416
+ // Read the canonical direct-message JWS and retain compatibility
417
+ // with SDK <=2.4.11 envelopes already queued by an outbox.
418
+ content: legacyWrappedContent,
409
419
  meta: {
410
420
  jwe: { protected: decodedProtectedHeader },
411
421
  jws: {
@@ -673,6 +673,8 @@ type OrganizationLicenseMutationDeps = {
673
673
  * Requests additional zero-cost employee seats from a GW test-network.
674
674
  * Production callers must use the provider-payment and confirmed Order flow;
675
675
  * the gateway enforces that environment boundary independently of this SDK.
676
+ * The request keeps the canonical outer DIDComm identity fields because secure
677
+ * transports sign this envelope before encrypting it for the gateway.
676
678
  */
677
679
  export declare function addFreeOrganizationEmployeeLicensesWithDeps(routeCtx: RouteContext, input: OrganizationEmployeeLicenseAddInput, deps: OrganizationLicenseMutationDeps): Promise<SubmitAndPollResult>;
678
680
  /**
@@ -247,6 +247,8 @@ export async function listIndividualLicensesWithDeps(routeCtx, input, deps) {
247
247
  * Requests additional zero-cost employee seats from a GW test-network.
248
248
  * Production callers must use the provider-payment and confirmed Order flow;
249
249
  * the gateway enforces that environment boundary independently of this SDK.
250
+ * The request keeps the canonical outer DIDComm identity fields because secure
251
+ * transports sign this envelope before encrypting it for the gateway.
250
252
  */
251
253
  export async function addFreeOrganizationEmployeeLicensesWithDeps(routeCtx, input, deps) {
252
254
  const entry = buildLicensePurchaseEntry({
@@ -257,6 +259,10 @@ export async function addFreeOrganizationEmployeeLicensesWithDeps(routeCtx, inpu
257
259
  priceCurrency: 'EUR',
258
260
  });
259
261
  return deps.submitAndPoll(deps.organizationLicenseActionPath(routeCtx, '_add'), deps.organizationLicenseActionPollPath(routeCtx, '_add'), {
262
+ jti: `jti-${createRuntimeUuid()}`,
263
+ iss: routeCtx.tenantId,
264
+ aud: routeCtx.tenantId,
265
+ type: 'application/didcomm-plain+json',
260
266
  thid: input.requestThid || `organization-license-add-${createRuntimeUuid()}`,
261
267
  body: { resourceType: 'Bundle', type: 'batch', data: [entry] },
262
268
  }, input.pollOptions);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdc-sdk-node-ts",
3
- "version": "2.4.10",
3
+ "version": "2.4.12",
4
4
  "description": "Next-generation Node runtime package for the GDC SDK family",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Antifraud Services Inc.",