gdc-sdk-node-ts 2.4.16 → 2.4.22

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.
@@ -221,7 +221,10 @@ export class NodeManagedWallet {
221
221
  }
222
222
  const privateJwk = entry.privateMaterial;
223
223
  const keyObject = createPrivateKey({ key: privateJwk, format: 'jwk' });
224
- const signature = cryptoSign(this.resolveNodeDigestForAlgorithm(alg), Buffer.from(payloadBytes), keyObject);
224
+ // JWS uses the fixed-width IEEE P1363 ECDSA representation (R || S).
225
+ // Node defaults to ASN.1 DER, which produces a syntactically valid compact
226
+ // token that every JOSE verifier correctly rejects.
227
+ const signature = cryptoSign(this.resolveNodeDigestForAlgorithm(alg), Buffer.from(payloadBytes), { key: keyObject, dsaEncoding: 'ieee-p1363' });
225
228
  return Buffer.from(signature).toString('base64url');
226
229
  }
227
230
  /**
@@ -237,7 +240,7 @@ export class NodeManagedWallet {
237
240
  return this.cryptography.verifyBytes(Content.base64ToBytes(signature), payloadBytes, jwk);
238
241
  }
239
242
  const publicKey = createPublicKey({ key: jwk, format: 'jwk' });
240
- return cryptoVerify(this.resolveNodeDigestForAlgorithm(algorithm), Buffer.from(payloadBytes), publicKey, Buffer.from(signature, 'base64url'));
243
+ return cryptoVerify(this.resolveNodeDigestForAlgorithm(algorithm), Buffer.from(payloadBytes), { key: publicKey, dsaEncoding: 'ieee-p1363' }, Buffer.from(signature, 'base64url'));
241
244
  }
242
245
  /**
243
246
  * Encrypts one payload for the provided recipient public JWK.
@@ -11,7 +11,7 @@ import { type SmartTokenRequestInput } from './smart-token.js';
11
11
  import { type EmployeeDeviceActivationRequestInput, type EmployeeDeviceActivationResult, type EmployeeDeviceRevocationInput } from './device-activation.js';
12
12
  import { type OrganizationLicenseOrderConfirmInput } from './organization-license-order.js';
13
13
  import { type IndividualOrganizationBootstrapInput, type IndividualOrganizationStartResult } from './individual-start.js';
14
- import { type CommunicationIngestionInput, type BlockchainArtifactRegistrationInput, type VitalSignBatchCommunicationFromSearchResponseInput, type CommunicationParticipantRuntimeSearchInput, type ClinicalBundleSearchInput, type ClinicalSectionUpdateInput, type ClinicalSummaryReadResult, type ClinicalSummaryRequestInput, type ClinicalSummaryUpdateInput, type GrantProfessionalAccessInput, type GrantProfessionalAccessResult, type IndividualMemberLifecycleInput, type IndividualMemberLicenseAddInput, type IndividualMemberLicenseInvitationInput, type IndividualMemberLicenseTransitionInput, type LicenseListRuntimeSearchInput, type LicenseOfferRuntimeSearchInput, type LicenseOrderRuntimeSearchInput, type OrganizationEmployeeCreationInput, type OrganizationEmployeeLicenseAddInput, type OrganizationEmployeeLicenseInvitationInput, type OrganizationEmployeeLifecycleInput, type OrganizationEmployeeSearchInput, type ProfessionalAccessRequestInput, type ProfessionalAccessRequestResult, type RevokeProfessionalAccessInput, type RevokeProfessionalAccessResult, type RelatedPersonUpsertInput } from './resource-operations.js';
14
+ import { type CommunicationIngestionInput, type BlockchainArtifactRegistrationInput, type VitalSignBatchCommunicationFromSearchResponseInput, type CommunicationParticipantRuntimeSearchInput, type ClinicalBundleSearchInput, type ClinicalSectionUpdateInput, type ClinicalSummaryReadResult, type ClinicalSummaryRequestInput, type ClinicalSummaryUpdateInput, type GrantProfessionalAccessInput, type GrantProfessionalAccessResult, type IndividualMemberLifecycleInput, type IndividualMemberLicenseAddInput, type IndividualMemberLicenseInvitationInput, type IndividualMemberLicenseTransitionInput, type LicenseListRuntimeSearchInput, type LicenseOfferRuntimeSearchInput, type LicenseOrderRuntimeSearchInput, type OrganizationEmployeeCreationInput, type OrganizationEmployeeLicenseAddInput, type OrganizationEmployeeLicenseOfferInput, type OrganizationEmployeeLicenseInvitationInput, type OrganizationEmployeeLifecycleInput, type OrganizationEmployeeSearchInput, type ProfessionalAccessRequestInput, type ProfessionalAccessRequestResult, type RevokeProfessionalAccessInput, type RevokeProfessionalAccessResult, type RelatedPersonUpsertInput } from './resource-operations.js';
15
15
  import type { LegalOrganizationOrderInput } from './host-onboarding.js';
16
16
  import type { SmartTokenExchangeResult } from './smart-token.js';
17
17
  import { type OrganizationEmployeeProvisioningInput, type OrganizationEmployeeProvisioningResult } from './organization-employee-lifecycle.js';
@@ -299,6 +299,8 @@ export declare class HttpRuntimeClient implements NodeRuntimeClient {
299
299
  listOrganizationLicenses(ctx: RouteContext, input?: LicenseListRuntimeSearchInput): Promise<SubmitAndPollResult>;
300
300
  /** @deprecated Professional seats use Employee Offer and confirmed Order. */
301
301
  addFreeOrganizationEmployeeLicenses(ctx: RouteContext, input: OrganizationEmployeeLicenseAddInput): Promise<SubmitAndPollResult>;
302
+ /** Starts the commercial Offer flow for additional professional seats. */
303
+ requestOrganizationEmployeeLicenseOffer(ctx: RouteContext, input: OrganizationEmployeeLicenseOfferInput): Promise<SubmitAndPollResult>;
302
304
  searchOrganizationLicenseOffers(ctx: RouteContext, input: LicenseOfferRuntimeSearchInput): Promise<SubmitAndPollResult>;
303
305
  listOrganizationLicenseOffers(ctx: RouteContext, input?: LicenseOfferRuntimeSearchInput): Promise<SubmitAndPollResult>;
304
306
  searchOrganizationLicenseOrders(ctx: RouteContext, input: LicenseOrderRuntimeSearchInput): Promise<SubmitAndPollResult>;
@@ -12,7 +12,7 @@ import { activateEmployeeDeviceWithActivationCodeWithDeps, activateEmployeeDevic
12
12
  import { extractOfferIdFromResponseBody, extractOfferPreviewFromResponseBody, } from './order-offer-summary.js';
13
13
  import { confirmOrganizationLicenseOrderWithDeps } from './organization-license-order.js';
14
14
  import { startIndividualOrganizationWithDeps } from './individual-start.js';
15
- import { createOrganizationEmployeeWithDeps, issueOrganizationEmployeeLicenseWithDeps, disableIndividualMemberWithDeps, disableIndividualOrganizationWithDeps, disableOrganizationEmployeeWithDeps, listIndividualLicenseOffersWithDeps, listIndividualLicenseOrdersWithDeps, listIndividualLicensesWithDeps, addFreeIndividualMemberLicensesWithDeps, issueIndividualMemberLicenseWithDeps, transitionIndividualMemberLicenseWithDeps, listOrganizationLicenseOffersWithDeps, listOrganizationLicenseOrdersWithDeps, listOrganizationLicensesWithDeps, grantProfessionalAccessWithDeps, buildClinicalSectionUpdateIngestion, buildClinicalSummaryUpdateIngestion, ingestCommunicationAndUpdateIndexWithDeps, requestProfessionalAccessWithDeps, buildVitalSignBatchCommunicationFromSearchResponse, registerBlockchainArtifactAndUpdateIndexWithDeps, requestClinicalSummaryWithDeps, revokeProfessionalAccessWithDeps, searchCommunicationParticipantsWithDeps, purgeIndividualMemberWithDeps, purgeIndividualOrganizationWithDeps, purgeOrganizationEmployeeWithDeps, prepareEmployeeLifecycleMessageForTransport, searchIndividualLicensesWithDeps, searchIndividualLicenseOffersWithDeps, searchIndividualLicenseOrdersWithDeps, searchOrganizationLicensesWithDeps, searchOrganizationLicenseOffersWithDeps, searchOrganizationLicenseOrdersWithDeps, searchOrganizationEmployeesWithDeps, searchClinicalBundleWithDeps, searchLatestIpsWithDeps, upsertRelatedPersonAndPollWithDeps, normalizeCommunicationPathFormatSegment, addFreeOrganizationEmployeeLicensesWithDeps, } from './resource-operations.js';
15
+ import { createOrganizationEmployeeWithDeps, issueOrganizationEmployeeLicenseWithDeps, disableIndividualMemberWithDeps, disableIndividualOrganizationWithDeps, disableOrganizationEmployeeWithDeps, listIndividualLicenseOffersWithDeps, listIndividualLicenseOrdersWithDeps, listIndividualLicensesWithDeps, addFreeIndividualMemberLicensesWithDeps, issueIndividualMemberLicenseWithDeps, transitionIndividualMemberLicenseWithDeps, listOrganizationLicenseOffersWithDeps, listOrganizationLicenseOrdersWithDeps, listOrganizationLicensesWithDeps, grantProfessionalAccessWithDeps, buildClinicalSectionUpdateIngestion, buildClinicalSummaryUpdateIngestion, ingestCommunicationAndUpdateIndexWithDeps, requestProfessionalAccessWithDeps, buildVitalSignBatchCommunicationFromSearchResponse, registerBlockchainArtifactAndUpdateIndexWithDeps, requestClinicalSummaryWithDeps, revokeProfessionalAccessWithDeps, searchCommunicationParticipantsWithDeps, purgeIndividualMemberWithDeps, purgeIndividualOrganizationWithDeps, purgeOrganizationEmployeeWithDeps, prepareEmployeeLifecycleMessageForTransport, searchIndividualLicensesWithDeps, searchIndividualLicenseOffersWithDeps, searchIndividualLicenseOrdersWithDeps, searchOrganizationLicensesWithDeps, searchOrganizationLicenseOffersWithDeps, searchOrganizationLicenseOrdersWithDeps, searchOrganizationEmployeesWithDeps, searchClinicalBundleWithDeps, searchLatestIpsWithDeps, upsertRelatedPersonAndPollWithDeps, normalizeCommunicationPathFormatSegment, addFreeOrganizationEmployeeLicensesWithDeps, requestOrganizationEmployeeLicenseOfferWithDeps, } from './resource-operations.js';
16
16
  import { listOrganizationEmployeeLifecycleWithDeps, provisionOrganizationEmployeeWithDeps, } from './organization-employee-lifecycle.js';
17
17
  import { submitAndPollWithMethods } from './orchestration/client-port.js';
18
18
  import { buildRuntimeHeaders, fetchWithTimeout, parseResponseBody, pollBatchResponseWithRuntimeConfig, postJsonWithRuntimeConfig, postRenderedWithRuntimeConfig, } from './runtime-transport.js';
@@ -484,6 +484,16 @@ export class HttpRuntimeClient {
484
484
  : this.submitAndPoll.bind(this),
485
485
  });
486
486
  }
487
+ /** Starts the commercial Offer flow for additional professional seats. */
488
+ async requestOrganizationEmployeeLicenseOffer(ctx, input) {
489
+ return requestOrganizationEmployeeLicenseOfferWithDeps(ctx, input, {
490
+ organizationLicenseActionPath: this.paths.organizationLicenseActionPath.bind(this.paths),
491
+ organizationLicenseActionPollPath: this.paths.organizationLicenseActionPollPath.bind(this.paths),
492
+ submitAndPoll: this.transportProfile === TransportProfiles.DidcommEncryptedForm
493
+ ? (submitPath, pollPath, payload, pollOptions) => this.submitClinicalMessageAndPoll(submitPath, pollPath, payload, this.transportProfile, pollOptions)
494
+ : this.submitAndPoll.bind(this),
495
+ });
496
+ }
487
497
  async searchOrganizationLicenseOffers(ctx, input) {
488
498
  return searchOrganizationLicenseOffersWithDeps(ctx, input, {
489
499
  organizationLicenseOfferSearchPath: this.paths.organizationLicenseOfferSearchPath.bind(this.paths),
@@ -18,7 +18,7 @@ import type { EnsureFamilyOrganizationRegistrationInput, EnsureFamilyOrganizatio
18
18
  import type { OrganizationLicenseOrderConfirmInput } from '../organization-license-order.js';
19
19
  import type { SmartTokenExchangeResult, SmartTokenRequestInput } from '../smart-token.js';
20
20
  import type { DigitalTwinMaterializationInput, DigitalTwinSearchInput, DigitalTwinSelectionInput } from '../digital-twin.js';
21
- import type { CommunicationIngestionInput, BlockchainArtifactRegistrationInput, CommunicationParticipantRuntimeSearchInput, ClinicalBundleSearchInput, ClinicalSectionUpdateInput, ClinicalSummaryReadResult, ClinicalSummaryRequestInput, ClinicalSummaryUpdateInput, VitalSignBatchCommunicationFromSearchResponseInput, DigitalTwinGenerationInput, GrantProfessionalAccessInput, GrantProfessionalAccessResult, IndividualMemberLifecycleInput, IndividualMemberLicenseAddInput, IndividualMemberLicenseInvitationInput, IndividualMemberLicenseTransitionInput, IpsOrFhirImportInput, OrganizationEmployeeCreationInput, OrganizationEmployeeLicenseAddInput, OrganizationEmployeeLicenseInvitationInput, OrganizationEmployeeLifecycleInput, OrganizationEmployeeSearchInput, ProfessionalAccessRequestInput, ProfessionalAccessRequestResult, RevokeProfessionalAccessInput, RevokeProfessionalAccessResult, RelatedPersonUpsertInput } from '../resource-operations.js';
21
+ import type { CommunicationIngestionInput, BlockchainArtifactRegistrationInput, CommunicationParticipantRuntimeSearchInput, ClinicalBundleSearchInput, ClinicalSectionUpdateInput, ClinicalSummaryReadResult, ClinicalSummaryRequestInput, ClinicalSummaryUpdateInput, VitalSignBatchCommunicationFromSearchResponseInput, DigitalTwinGenerationInput, GrantProfessionalAccessInput, GrantProfessionalAccessResult, IndividualMemberLifecycleInput, IndividualMemberLicenseAddInput, IndividualMemberLicenseInvitationInput, IndividualMemberLicenseTransitionInput, IpsOrFhirImportInput, OrganizationEmployeeCreationInput, OrganizationEmployeeLicenseAddInput, OrganizationEmployeeLicenseOfferInput, OrganizationEmployeeLicenseInvitationInput, OrganizationEmployeeLifecycleInput, OrganizationEmployeeSearchInput, ProfessionalAccessRequestInput, ProfessionalAccessRequestResult, RevokeProfessionalAccessInput, RevokeProfessionalAccessResult, RelatedPersonUpsertInput } from '../resource-operations.js';
22
22
  /**
23
23
  * Shared node-runtime activation input.
24
24
  *
@@ -82,6 +82,7 @@ export type RuntimeClient = {
82
82
  searchOrganizationLicenses?: (ctx: RouteContext, input: LicenseListRuntimeSearchInput) => Promise<SubmitAndPollResult>;
83
83
  listOrganizationLicenses?: (ctx: RouteContext, input?: LicenseListRuntimeSearchInput) => Promise<SubmitAndPollResult>;
84
84
  addFreeOrganizationEmployeeLicenses?: (ctx: RouteContext, input: OrganizationEmployeeLicenseAddInput) => Promise<SubmitAndPollResult>;
85
+ requestOrganizationEmployeeLicenseOffer?: (ctx: RouteContext, input: OrganizationEmployeeLicenseOfferInput) => Promise<SubmitAndPollResult>;
85
86
  searchOrganizationLicenseOffers?: (ctx: RouteContext, input: LicenseOfferRuntimeSearchInput) => Promise<SubmitAndPollResult>;
86
87
  listOrganizationLicenseOffers?: (ctx: RouteContext, input?: LicenseOfferRuntimeSearchInput) => Promise<SubmitAndPollResult>;
87
88
  searchOrganizationLicenseOrders?: (ctx: RouteContext, input: LicenseOrderRuntimeSearchInput) => Promise<SubmitAndPollResult>;
@@ -5,7 +5,7 @@ import type { EmployeeDeviceActivationResult, EmployeeDeviceActivationRequestInp
5
5
  import type { SmartTokenExchangeResult, SmartTokenRequestInput } from '../smart-token.js';
6
6
  import type { OrganizationLicenseOrderConfirmInput } from '../organization-license-order.js';
7
7
  import type { NodeCapability } from '../session.js';
8
- import type { LicenseListRuntimeSearchInput, LicenseOfferRuntimeSearchInput, LicenseOrderRuntimeSearchInput, OrganizationEmployeeCreationInput, OrganizationEmployeeLicenseAddInput, OrganizationEmployeeLicenseInvitationInput, OrganizationEmployeeLifecycleInput, OrganizationEmployeeSearchInput } from '../resource-operations.js';
8
+ import type { LicenseListRuntimeSearchInput, LicenseOfferRuntimeSearchInput, LicenseOrderRuntimeSearchInput, OrganizationEmployeeCreationInput, OrganizationEmployeeLicenseAddInput, OrganizationEmployeeLicenseOfferInput, OrganizationEmployeeLicenseInvitationInput, OrganizationEmployeeLifecycleInput, OrganizationEmployeeSearchInput } from '../resource-operations.js';
9
9
  import type { OrganizationEmployeeProvisioningInput, OrganizationEmployeeProvisioningResult } from '../organization-employee-lifecycle.js';
10
10
  import type { OrganizationEmployeeLifecycleRecord } from 'gdc-common-utils-ts/models/organization-employee-lifecycle';
11
11
  /**
@@ -85,6 +85,8 @@ export declare class OrganizationControllerSdk {
85
85
  listLicenses(ctx: RouteContext, input?: LicenseListRuntimeSearchInput): Promise<SubmitAndPollResult>;
86
86
  /** @deprecated Professional seats use Employee Offer and confirmed Order. */
87
87
  addFreeEmployeeLicenses(ctx: RouteContext, input: OrganizationEmployeeLicenseAddInput): Promise<SubmitAndPollResult>;
88
+ /** Requests an Offer for additional employee seats before invitations. */
89
+ requestEmployeeLicenseOffer(ctx: RouteContext, input: OrganizationEmployeeLicenseOfferInput): Promise<SubmitAndPollResult>;
88
90
  /**
89
91
  * Searches commercial license offers known for the current organization.
90
92
  */
@@ -115,6 +115,10 @@ export class OrganizationControllerSdk {
115
115
  addFreeEmployeeLicenses(ctx, input) {
116
116
  return requireClientMethod(this.client, 'addFreeOrganizationEmployeeLicenses')(ctx, input);
117
117
  }
118
+ /** Requests an Offer for additional employee seats before invitations. */
119
+ requestEmployeeLicenseOffer(ctx, input) {
120
+ return requireClientMethod(this.client, 'requestOrganizationEmployeeLicenseOffer')(ctx, input);
121
+ }
118
122
  /**
119
123
  * Searches commercial license offers known for the current organization.
120
124
  */
@@ -133,8 +133,8 @@ export type IndividualMemberLicenseAddInput = {
133
133
  intervalMs?: number;
134
134
  };
135
135
  };
136
- /** Adds zero-cost employee seats on an explicitly configured test network. */
137
- export type OrganizationEmployeeLicenseAddInput = {
136
+ /** Requests a host-authored Offer for additional professional employee seats. */
137
+ export type OrganizationEmployeeLicenseOfferInput = {
138
138
  quantity: number;
139
139
  requestThid?: string;
140
140
  pollOptions?: {
@@ -142,6 +142,8 @@ export type OrganizationEmployeeLicenseAddInput = {
142
142
  intervalMs?: number;
143
143
  };
144
144
  };
145
+ /** @deprecated Use `OrganizationEmployeeLicenseOfferInput`. */
146
+ export type OrganizationEmployeeLicenseAddInput = OrganizationEmployeeLicenseOfferInput;
145
147
  /** Input shared by invitation acceptance, deactivation and release. */
146
148
  export type IndividualMemberLicenseTransitionInput = {
147
149
  /** Required for controller deactivation/release; acceptance resolves by code. */
@@ -669,8 +671,13 @@ type OrganizationLicenseMutationDeps = {
669
671
  organizationLicenseActionPollPath: (ctx: RouteContext, action: string) => string;
670
672
  submitAndPoll: IndividualLicenseMutationDeps['submitAndPoll'];
671
673
  };
672
- /** @deprecated Professional seats always use Employee Offer and confirmed Order. */
673
- export declare function addFreeOrganizationEmployeeLicensesWithDeps(_routeCtx: RouteContext, _input: OrganizationEmployeeLicenseAddInput, _deps: OrganizationLicenseMutationDeps): Promise<SubmitAndPollResult>;
674
+ /**
675
+ * Requests a professional-seat Offer without creating or assigning seats.
676
+ * The returned Offer must be accepted through the existing paid Order flow.
677
+ */
678
+ export declare function requestOrganizationEmployeeLicenseOfferWithDeps(routeCtx: RouteContext, input: OrganizationEmployeeLicenseOfferInput, deps: OrganizationLicenseMutationDeps): Promise<SubmitAndPollResult>;
679
+ /** @deprecated Use `requestOrganizationEmployeeLicenseOfferWithDeps`. */
680
+ export declare function addFreeOrganizationEmployeeLicensesWithDeps(routeCtx: RouteContext, input: OrganizationEmployeeLicenseAddInput, deps: OrganizationLicenseMutationDeps): Promise<SubmitAndPollResult>;
674
681
  /**
675
682
  * Reserves one available household/member seat for a selected contact.
676
683
  *
@@ -243,9 +243,24 @@ export async function searchIndividualLicensesWithDeps(routeCtx, input, deps) {
243
243
  export async function listIndividualLicensesWithDeps(routeCtx, input, deps) {
244
244
  return searchIndividualLicensesWithDeps(routeCtx, input || {}, deps);
245
245
  }
246
- /** @deprecated Professional seats always use Employee Offer and confirmed Order. */
247
- export async function addFreeOrganizationEmployeeLicensesWithDeps(_routeCtx, _input, _deps) {
248
- throw new Error('Professional seats require Employee Offer and Order payment verification; License/_add is not supported.');
246
+ /**
247
+ * Requests a professional-seat Offer without creating or assigning seats.
248
+ * The returned Offer must be accepted through the existing paid Order flow.
249
+ */
250
+ export async function requestOrganizationEmployeeLicenseOfferWithDeps(routeCtx, input, deps) {
251
+ const entry = buildLicensePurchaseEntry({
252
+ quantity: input.quantity,
253
+ userClass: 'employee',
254
+ type: 'web',
255
+ });
256
+ return deps.submitAndPoll(deps.organizationLicenseActionPath(routeCtx, '_add'), deps.organizationLicenseActionPollPath(routeCtx, '_add'), {
257
+ thid: input.requestThid || `organization-license-offer-${createRuntimeUuid()}`,
258
+ body: { resourceType: 'Bundle', type: 'batch', data: [entry] },
259
+ }, input.pollOptions);
260
+ }
261
+ /** @deprecated Use `requestOrganizationEmployeeLicenseOfferWithDeps`. */
262
+ export async function addFreeOrganizationEmployeeLicensesWithDeps(routeCtx, input, deps) {
263
+ return requestOrganizationEmployeeLicenseOfferWithDeps(routeCtx, input, deps);
249
264
  }
250
265
  /**
251
266
  * Reserves one available household/member seat for a selected contact.
@@ -1,6 +1,7 @@
1
1
  // Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
2
2
  import { randomBytes } from 'node:crypto';
3
3
  import { IdentityDcrMetadataFields, IdentityDeviceInfoFields } from 'gdc-common-utils-ts/constants/identity-auth';
4
+ import { ActorKinds } from 'gdc-common-utils-ts/constants/actor-session';
4
5
  import { TransportProfiles, } from 'gdc-sdk-core-ts';
5
6
  import { NodeManagedWallet } from './node-managed-wallet.js';
6
7
  import { NodeHttpClient } from './node-runtime-client.js';
@@ -182,6 +183,7 @@ export class ServerProfileSessionManager {
182
183
  clientAssertion: assertion,
183
184
  clientAssertionType: 'private_key_jwt',
184
185
  smartTokenKind: 'openid-smart',
186
+ acrValues: profileSmartAcrValues(profile.actorKind),
185
187
  scopes: unique(input.scopes),
186
188
  tokenCacheKey: `profile:${profile.profileId}:${input.subjectDid}:${unique(input.scopes).join(',')}`,
187
189
  });
@@ -222,7 +224,7 @@ export class ServerProfileSessionManager {
222
224
  scopes: session.scopes,
223
225
  accessToken: await this.options.sealer.unseal(session.sealedAccessToken, `${sessionId}:access-token`),
224
226
  secureTransportAdapter: {
225
- pack: (message) => wallet.packForRecipientWithContext(message, profile.providerDid, { context }),
227
+ pack: (message) => wallet.packForRecipientWithContext(bindTransportActor(message, profile.actorDid, profile.clientId), profile.providerDid, { context }),
226
228
  unpack: async (jwe) => (await wallet.unpackWithContext(jwe, { context })).content,
227
229
  },
228
230
  confidentialStorageAdapter: {
@@ -303,6 +305,21 @@ export class ServerProfileSessionManager {
303
305
  }
304
306
  now() { return this.options.now?.() || new Date(); }
305
307
  }
308
+ /**
309
+ * Binds every direct resource action and async poll to the actor and DCR client
310
+ * stored in the server profile. The caller may author the business body and
311
+ * thread id, but cannot replace either verification identity.
312
+ */
313
+ function bindTransportActor(message, actorDid, clientId) {
314
+ return { ...message, iss: actorDid, client_id: clientId };
315
+ }
316
+ /** Keeps the OpenID proof class aligned with the durable actor profile. */
317
+ function profileSmartAcrValues(actorKind) {
318
+ return actorKind === ActorKinds.IndividualController
319
+ || actorKind === ActorKinds.IndividualMember
320
+ ? 'urn:antifraud:acr:openid4vp:individual'
321
+ : 'urn:antifraud:acr:openid4vp:employee';
322
+ }
306
323
  async function buildWalletClientAssertion(wallet, profile, audience, now) {
307
324
  const seconds = Math.floor(now.getTime() / 1000);
308
325
  return wallet.signCompactJws(walletContext(profile.walletKeyDerivationId || profile.profileId), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdc-sdk-node-ts",
3
- "version": "2.4.16",
3
+ "version": "2.4.22",
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.",
@@ -38,7 +38,7 @@
38
38
  "test:e2e:live-gw:clean": "bash ./scripts/run-live-gw-clean.sh"
39
39
  },
40
40
  "dependencies": {
41
- "gdc-common-utils-ts": "2.5.12",
41
+ "gdc-common-utils-ts": "2.5.15",
42
42
  "gdc-sdk-core-ts": "~2.3.18"
43
43
  },
44
44
  "devDependencies": {