@xkova/sdk 0.1.0-alpha.8 → 0.1.0-alpha.9

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 CHANGED
@@ -164,6 +164,12 @@ provider proofs and workforce session credentials on the server. Provider
164
164
  admission does not replace wallet possession, current signer eligibility,
165
165
  independent-person quorum or confirmed chain settlement.
166
166
 
167
+ Workforce session staff IDs and assigned treasury/token IDs use the API's
168
+ canonical 22-character base62 bodies (`stf_`, `vlt_`, `ctk_`). Preserve these
169
+ opaque values exactly. Server SDK alpha.9 fixes alpha.8's incorrect rejection
170
+ of these API responses. The separate enrollment typed-data UUID strings must
171
+ also remain unchanged; they are not the session's public resource IDs.
172
+
167
173
  Call resource methods with typed inputs:
168
174
 
169
175
  ```ts
@@ -367,7 +367,7 @@ function parseSession(value) {
367
367
  throw new Error('Invalid workforce session identity');
368
368
  }
369
369
  }
370
- if (!/^stf_[a-f0-9]{32}$/i.test(text(raw, 'staff_id')))
370
+ if (!/^stf_[0-9A-Za-z]{22}$/.test(text(raw, 'staff_id')))
371
371
  throw new Error('Invalid workforce staff identity');
372
372
  const expires = timestamp(raw, 'expires_at'), absolute = timestamp(raw, 'absolute_expires_at');
373
373
  if (expires > absolute || typeof raw.action_authorization_enabled !== 'boolean')
@@ -378,8 +378,8 @@ function parseSession(value) {
378
378
  strings(raw.scopes);
379
379
  strings(grants.treasury_wallet_ids);
380
380
  strings(grants.customer_token_ids);
381
- if (!strings(grants.treasury_wallet_ids).every((id) => /^vlt_[a-f0-9]{32}$/i.test(id)) ||
382
- !strings(grants.customer_token_ids).every((id) => /^ctk_[a-f0-9]{32}$/i.test(id))) {
381
+ if (!strings(grants.treasury_wallet_ids).every((id) => /^vlt_[0-9A-Za-z]{22}$/.test(id)) ||
382
+ !strings(grants.customer_token_ids).every((id) => /^ctk_[0-9A-Za-z]{22}$/.test(id))) {
383
383
  throw new Error('Invalid workforce resource identity');
384
384
  }
385
385
  return raw;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xkova/sdk",
3
- "version": "0.1.0-alpha.8",
3
+ "version": "0.1.0-alpha.9",
4
4
  "description": "TypeScript SDK for the XKOVA API.",
5
5
  "homepage": "https://docs.xkova.com",
6
6
  "repository": {