@naylence/runtime 0.3.5-test.922 → 0.3.5-test.923

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.
@@ -3,23 +3,23 @@
3
3
  var core = require('@naylence/core');
4
4
  var zod = require('zod');
5
5
  var factory = require('@naylence/factory');
6
+ var ed25519 = require('@noble/ed25519');
7
+ var sha2_js = require('@noble/hashes/sha2.js');
6
8
  var chacha_js = require('@noble/ciphers/chacha.js');
7
9
  var ed25519_js = require('@noble/curves/ed25519.js');
8
10
  var hkdf_js = require('@noble/hashes/hkdf.js');
9
- var sha2_js = require('@noble/hashes/sha2.js');
10
11
  var utils_js = require('@noble/hashes/utils.js');
11
12
  var yaml = require('yaml');
12
13
  var fastify = require('fastify');
13
14
  var websocketPlugin = require('@fastify/websocket');
14
- var ed25519 = require('@noble/ed25519');
15
15
 
16
16
  // This file is auto-generated during build - do not edit manually
17
- // Generated from package.json version: 0.3.5-test.922
17
+ // Generated from package.json version: 0.3.5-test.923
18
18
  /**
19
19
  * The package version, injected at build time.
20
20
  * @internal
21
21
  */
22
- const VERSION = '0.3.5-test.922';
22
+ const VERSION = '0.3.5-test.923';
23
23
 
24
24
  /**
25
25
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -25266,6 +25266,146 @@ function encodeUtf8(value) {
25266
25266
  throw new Error('No UTF-8 encoder available in this environment');
25267
25267
  }
25268
25268
 
25269
+ if (!ed25519.hashes.sha512) {
25270
+ ed25519.hashes.sha512 = (message) => sha2_js.sha512(message);
25271
+ }
25272
+ function normalizeSignerOptions(options) {
25273
+ if (!options || typeof options !== 'object') {
25274
+ return {};
25275
+ }
25276
+ const candidate = options;
25277
+ const result = {
25278
+ ...options,
25279
+ };
25280
+ const cryptoProvider = resolveAlias(candidate, ['cryptoProvider', 'crypto_provider']);
25281
+ if (cryptoProvider !== undefined) {
25282
+ result.cryptoProvider = cryptoProvider ?? null;
25283
+ }
25284
+ const signingConfig = resolveAlias(candidate, ['signingConfig', 'signing_config']);
25285
+ if (signingConfig !== undefined) {
25286
+ result.signingConfig = signingConfig;
25287
+ }
25288
+ const privateKeyPem = resolveAlias(candidate, [
25289
+ 'privateKeyPem',
25290
+ 'private_key_pem',
25291
+ ]);
25292
+ if (privateKeyPem !== undefined) {
25293
+ result.privateKeyPem = privateKeyPem;
25294
+ }
25295
+ const keyId = resolveAlias(candidate, [
25296
+ 'keyId',
25297
+ 'key_id',
25298
+ ]);
25299
+ if (keyId !== undefined) {
25300
+ result.keyId = keyId;
25301
+ }
25302
+ return result;
25303
+ }
25304
+ class EdDSAEnvelopeSigner {
25305
+ constructor(options = {}) {
25306
+ const normalized = normalizeSignerOptions(options);
25307
+ const provider = normalized.cryptoProvider ?? null;
25308
+ if (!provider) {
25309
+ throw new Error('No crypto provider is configured for signing');
25310
+ }
25311
+ this.crypto = provider;
25312
+ const signingConfigOption = normalized.signingConfig;
25313
+ if (signingConfigOption instanceof SigningConfig) {
25314
+ this.signingConfig = signingConfigOption;
25315
+ }
25316
+ else if (signingConfigOption) {
25317
+ this.signingConfig = new SigningConfig(signingConfigOption);
25318
+ }
25319
+ else {
25320
+ this.signingConfig = new SigningConfig();
25321
+ }
25322
+ this.explicitPrivateKey = normalized.privateKeyPem;
25323
+ this.explicitKeyId = normalized.keyId;
25324
+ }
25325
+ signEnvelope(envelope, { physicalPath }) {
25326
+ if (!envelope.sid) {
25327
+ throw new Error('Envelope missing sid');
25328
+ }
25329
+ const frame = envelope.frame;
25330
+ if (frame.type === 'Data') {
25331
+ const dataFrame = frame;
25332
+ if (!dataFrame.pd) {
25333
+ const payload = dataFrame.payload ?? '';
25334
+ const payloadString = payload === '' ? '' : canonicalJson(payload);
25335
+ dataFrame.pd = secureDigest(payloadString);
25336
+ }
25337
+ }
25338
+ const digest = frameDigest(frame);
25339
+ const immutable = canonicalJson(immutableHeaders(envelope));
25340
+ const sidDigest = secureDigest(physicalPath);
25341
+ const tbs = new Uint8Array(encodeUtf8(sidDigest).length +
25342
+ 1 +
25343
+ encodeUtf8(immutable).length +
25344
+ 1 +
25345
+ encodeUtf8(digest).length);
25346
+ const sidBytes = encodeUtf8(sidDigest);
25347
+ const immBytes = encodeUtf8(immutable);
25348
+ const digBytes = encodeUtf8(digest);
25349
+ let offset = 0;
25350
+ tbs.set(sidBytes, offset);
25351
+ offset += sidBytes.length;
25352
+ tbs[offset] = 0x1f;
25353
+ offset += 1;
25354
+ tbs.set(immBytes, offset);
25355
+ offset += immBytes.length;
25356
+ tbs[offset] = 0x1f;
25357
+ offset += 1;
25358
+ tbs.set(digBytes, offset);
25359
+ const privateKey = this.loadPrivateKey();
25360
+ const signatureBytes = ed25519.sign(tbs, privateKey);
25361
+ const signature = urlsafeBase64Encode(signatureBytes);
25362
+ const kid = this.determineKeyId();
25363
+ const signatureHeader = {
25364
+ kid,
25365
+ val: signature,
25366
+ alg: 'EdDSA',
25367
+ };
25368
+ const secHeader = envelope.sec ?? {};
25369
+ secHeader.sig = signatureHeader;
25370
+ envelope.sec = secHeader;
25371
+ return envelope;
25372
+ }
25373
+ loadPrivateKey() {
25374
+ const pem = this.explicitPrivateKey ??
25375
+ readStringProperty(this.crypto, 'signingPrivatePem', 'signing_private_pem');
25376
+ if (!pem) {
25377
+ throw new Error('Crypto provider does not expose a signing private key');
25378
+ }
25379
+ return parseEd25519PrivateKey(pem);
25380
+ }
25381
+ determineKeyId() {
25382
+ if (this.explicitKeyId) {
25383
+ return this.explicitKeyId;
25384
+ }
25385
+ if (this.signingConfig.signingMaterial === core.SigningMaterial.X509_CHAIN) {
25386
+ const certificateProvider = this
25387
+ .crypto;
25388
+ const jwk = certificateProvider.nodeJwk?.();
25389
+ if (jwk && typeof jwk === 'object' && 'kid' in jwk && 'x5c' in jwk) {
25390
+ const kid = jwk.kid;
25391
+ if (typeof kid === 'string' && kid.length > 0) {
25392
+ return kid;
25393
+ }
25394
+ }
25395
+ }
25396
+ const fallback = readStringProperty(this.crypto, 'signatureKeyId', 'signature_key_id');
25397
+ if (!fallback) {
25398
+ throw new Error('Crypto provider does not expose a signature key id');
25399
+ }
25400
+ return fallback;
25401
+ }
25402
+ }
25403
+
25404
+ var eddsaEnvelopeSigner = /*#__PURE__*/Object.freeze({
25405
+ __proto__: null,
25406
+ EdDSAEnvelopeSigner: EdDSAEnvelopeSigner
25407
+ });
25408
+
25269
25409
  const logger$x = getLogger('naylence.fame.security.auth.jwt_token_issuer');
25270
25410
  let joseModulePromise = null;
25271
25411
  async function requireJose() {
@@ -39371,146 +39511,6 @@ var sharedSecretTokenVerifier = /*#__PURE__*/Object.freeze({
39371
39511
  SharedSecretTokenVerifier: SharedSecretTokenVerifier
39372
39512
  });
39373
39513
 
39374
- if (!ed25519.hashes.sha512) {
39375
- ed25519.hashes.sha512 = (message) => sha2_js.sha512(message);
39376
- }
39377
- function normalizeSignerOptions(options) {
39378
- if (!options || typeof options !== 'object') {
39379
- return {};
39380
- }
39381
- const candidate = options;
39382
- const result = {
39383
- ...options,
39384
- };
39385
- const cryptoProvider = resolveAlias(candidate, ['cryptoProvider', 'crypto_provider']);
39386
- if (cryptoProvider !== undefined) {
39387
- result.cryptoProvider = cryptoProvider ?? null;
39388
- }
39389
- const signingConfig = resolveAlias(candidate, ['signingConfig', 'signing_config']);
39390
- if (signingConfig !== undefined) {
39391
- result.signingConfig = signingConfig;
39392
- }
39393
- const privateKeyPem = resolveAlias(candidate, [
39394
- 'privateKeyPem',
39395
- 'private_key_pem',
39396
- ]);
39397
- if (privateKeyPem !== undefined) {
39398
- result.privateKeyPem = privateKeyPem;
39399
- }
39400
- const keyId = resolveAlias(candidate, [
39401
- 'keyId',
39402
- 'key_id',
39403
- ]);
39404
- if (keyId !== undefined) {
39405
- result.keyId = keyId;
39406
- }
39407
- return result;
39408
- }
39409
- class EdDSAEnvelopeSigner {
39410
- constructor(options = {}) {
39411
- const normalized = normalizeSignerOptions(options);
39412
- const provider = normalized.cryptoProvider ?? null;
39413
- if (!provider) {
39414
- throw new Error('No crypto provider is configured for signing');
39415
- }
39416
- this.crypto = provider;
39417
- const signingConfigOption = normalized.signingConfig;
39418
- if (signingConfigOption instanceof SigningConfig) {
39419
- this.signingConfig = signingConfigOption;
39420
- }
39421
- else if (signingConfigOption) {
39422
- this.signingConfig = new SigningConfig(signingConfigOption);
39423
- }
39424
- else {
39425
- this.signingConfig = new SigningConfig();
39426
- }
39427
- this.explicitPrivateKey = normalized.privateKeyPem;
39428
- this.explicitKeyId = normalized.keyId;
39429
- }
39430
- signEnvelope(envelope, { physicalPath }) {
39431
- if (!envelope.sid) {
39432
- throw new Error('Envelope missing sid');
39433
- }
39434
- const frame = envelope.frame;
39435
- if (frame.type === 'Data') {
39436
- const dataFrame = frame;
39437
- if (!dataFrame.pd) {
39438
- const payload = dataFrame.payload ?? '';
39439
- const payloadString = payload === '' ? '' : canonicalJson(payload);
39440
- dataFrame.pd = secureDigest(payloadString);
39441
- }
39442
- }
39443
- const digest = frameDigest(frame);
39444
- const immutable = canonicalJson(immutableHeaders(envelope));
39445
- const sidDigest = secureDigest(physicalPath);
39446
- const tbs = new Uint8Array(encodeUtf8(sidDigest).length +
39447
- 1 +
39448
- encodeUtf8(immutable).length +
39449
- 1 +
39450
- encodeUtf8(digest).length);
39451
- const sidBytes = encodeUtf8(sidDigest);
39452
- const immBytes = encodeUtf8(immutable);
39453
- const digBytes = encodeUtf8(digest);
39454
- let offset = 0;
39455
- tbs.set(sidBytes, offset);
39456
- offset += sidBytes.length;
39457
- tbs[offset] = 0x1f;
39458
- offset += 1;
39459
- tbs.set(immBytes, offset);
39460
- offset += immBytes.length;
39461
- tbs[offset] = 0x1f;
39462
- offset += 1;
39463
- tbs.set(digBytes, offset);
39464
- const privateKey = this.loadPrivateKey();
39465
- const signatureBytes = ed25519.sign(tbs, privateKey);
39466
- const signature = urlsafeBase64Encode(signatureBytes);
39467
- const kid = this.determineKeyId();
39468
- const signatureHeader = {
39469
- kid,
39470
- val: signature,
39471
- alg: 'EdDSA',
39472
- };
39473
- const secHeader = envelope.sec ?? {};
39474
- secHeader.sig = signatureHeader;
39475
- envelope.sec = secHeader;
39476
- return envelope;
39477
- }
39478
- loadPrivateKey() {
39479
- const pem = this.explicitPrivateKey ??
39480
- readStringProperty(this.crypto, 'signingPrivatePem', 'signing_private_pem');
39481
- if (!pem) {
39482
- throw new Error('Crypto provider does not expose a signing private key');
39483
- }
39484
- return parseEd25519PrivateKey(pem);
39485
- }
39486
- determineKeyId() {
39487
- if (this.explicitKeyId) {
39488
- return this.explicitKeyId;
39489
- }
39490
- if (this.signingConfig.signingMaterial === core.SigningMaterial.X509_CHAIN) {
39491
- const certificateProvider = this
39492
- .crypto;
39493
- const jwk = certificateProvider.nodeJwk?.();
39494
- if (jwk && typeof jwk === 'object' && 'kid' in jwk && 'x5c' in jwk) {
39495
- const kid = jwk.kid;
39496
- if (typeof kid === 'string' && kid.length > 0) {
39497
- return kid;
39498
- }
39499
- }
39500
- }
39501
- const fallback = readStringProperty(this.crypto, 'signatureKeyId', 'signature_key_id');
39502
- if (!fallback) {
39503
- throw new Error('Crypto provider does not expose a signature key id');
39504
- }
39505
- return fallback;
39506
- }
39507
- }
39508
-
39509
- var eddsaEnvelopeSigner = /*#__PURE__*/Object.freeze({
39510
- __proto__: null,
39511
- EdDSAEnvelopeSigner: EdDSAEnvelopeSigner
39512
- });
39513
-
39514
39514
  async function loadPublicKey(jwk, signingConfig) {
39515
39515
  if (jwk.x5c) {
39516
39516
  if (signingConfig.signingMaterial !== core.SigningMaterial.X509_CHAIN) {
@@ -39791,6 +39791,7 @@ exports.ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE = ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE;
39791
39791
  exports.ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER = ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER;
39792
39792
  exports.ENV_VAR_JWT_TRUSTED_ISSUER = ENV_VAR_JWT_TRUSTED_ISSUER;
39793
39793
  exports.ENV_VAR_SHOW_ENVELOPES = ENV_VAR_SHOW_ENVELOPES$1;
39794
+ exports.EdDSAEnvelopeSigner = EdDSAEnvelopeSigner;
39794
39795
  exports.EncryptedKeyValueStore = EncryptedKeyValueStore;
39795
39796
  exports.EncryptedStorageProviderBase = EncryptedStorageProviderBase;
39796
39797
  exports.EncryptedValue = EncryptedValue;
@@ -2,23 +2,23 @@ import { parseAddressComponents, FlowFlags, FameAddress, DEFAULT_POLLING_TIMEOUT
2
2
  export * from '@naylence/core';
3
3
  import { z, ZodError } from 'zod';
4
4
  import { AbstractResourceFactory, createResource as createResource$1, createDefaultResource, registerFactory, Expressions, ExtensionManager, ExpressionEvaluationPolicy, Registry, configValidator } from '@naylence/factory';
5
+ import { sign, hashes, verify } from '@noble/ed25519';
6
+ import { sha256, sha512 } from '@noble/hashes/sha2.js';
5
7
  import { chacha20poly1305 } from '@noble/ciphers/chacha.js';
6
8
  import { x25519 } from '@noble/curves/ed25519.js';
7
9
  import { hkdf } from '@noble/hashes/hkdf.js';
8
- import { sha256, sha512 } from '@noble/hashes/sha2.js';
9
10
  import { utf8ToBytes, bytesToHex, randomBytes, concatBytes } from '@noble/hashes/utils.js';
10
11
  import { parse } from 'yaml';
11
12
  import fastify from 'fastify';
12
13
  import websocketPlugin from '@fastify/websocket';
13
- import { sign, hashes, verify } from '@noble/ed25519';
14
14
 
15
15
  // This file is auto-generated during build - do not edit manually
16
- // Generated from package.json version: 0.3.5-test.922
16
+ // Generated from package.json version: 0.3.5-test.923
17
17
  /**
18
18
  * The package version, injected at build time.
19
19
  * @internal
20
20
  */
21
- const VERSION = '0.3.5-test.922';
21
+ const VERSION = '0.3.5-test.923';
22
22
 
23
23
  /**
24
24
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -25265,6 +25265,146 @@ function encodeUtf8(value) {
25265
25265
  throw new Error('No UTF-8 encoder available in this environment');
25266
25266
  }
25267
25267
 
25268
+ if (!hashes.sha512) {
25269
+ hashes.sha512 = (message) => sha512(message);
25270
+ }
25271
+ function normalizeSignerOptions(options) {
25272
+ if (!options || typeof options !== 'object') {
25273
+ return {};
25274
+ }
25275
+ const candidate = options;
25276
+ const result = {
25277
+ ...options,
25278
+ };
25279
+ const cryptoProvider = resolveAlias(candidate, ['cryptoProvider', 'crypto_provider']);
25280
+ if (cryptoProvider !== undefined) {
25281
+ result.cryptoProvider = cryptoProvider ?? null;
25282
+ }
25283
+ const signingConfig = resolveAlias(candidate, ['signingConfig', 'signing_config']);
25284
+ if (signingConfig !== undefined) {
25285
+ result.signingConfig = signingConfig;
25286
+ }
25287
+ const privateKeyPem = resolveAlias(candidate, [
25288
+ 'privateKeyPem',
25289
+ 'private_key_pem',
25290
+ ]);
25291
+ if (privateKeyPem !== undefined) {
25292
+ result.privateKeyPem = privateKeyPem;
25293
+ }
25294
+ const keyId = resolveAlias(candidate, [
25295
+ 'keyId',
25296
+ 'key_id',
25297
+ ]);
25298
+ if (keyId !== undefined) {
25299
+ result.keyId = keyId;
25300
+ }
25301
+ return result;
25302
+ }
25303
+ class EdDSAEnvelopeSigner {
25304
+ constructor(options = {}) {
25305
+ const normalized = normalizeSignerOptions(options);
25306
+ const provider = normalized.cryptoProvider ?? null;
25307
+ if (!provider) {
25308
+ throw new Error('No crypto provider is configured for signing');
25309
+ }
25310
+ this.crypto = provider;
25311
+ const signingConfigOption = normalized.signingConfig;
25312
+ if (signingConfigOption instanceof SigningConfig) {
25313
+ this.signingConfig = signingConfigOption;
25314
+ }
25315
+ else if (signingConfigOption) {
25316
+ this.signingConfig = new SigningConfig(signingConfigOption);
25317
+ }
25318
+ else {
25319
+ this.signingConfig = new SigningConfig();
25320
+ }
25321
+ this.explicitPrivateKey = normalized.privateKeyPem;
25322
+ this.explicitKeyId = normalized.keyId;
25323
+ }
25324
+ signEnvelope(envelope, { physicalPath }) {
25325
+ if (!envelope.sid) {
25326
+ throw new Error('Envelope missing sid');
25327
+ }
25328
+ const frame = envelope.frame;
25329
+ if (frame.type === 'Data') {
25330
+ const dataFrame = frame;
25331
+ if (!dataFrame.pd) {
25332
+ const payload = dataFrame.payload ?? '';
25333
+ const payloadString = payload === '' ? '' : canonicalJson(payload);
25334
+ dataFrame.pd = secureDigest(payloadString);
25335
+ }
25336
+ }
25337
+ const digest = frameDigest(frame);
25338
+ const immutable = canonicalJson(immutableHeaders(envelope));
25339
+ const sidDigest = secureDigest(physicalPath);
25340
+ const tbs = new Uint8Array(encodeUtf8(sidDigest).length +
25341
+ 1 +
25342
+ encodeUtf8(immutable).length +
25343
+ 1 +
25344
+ encodeUtf8(digest).length);
25345
+ const sidBytes = encodeUtf8(sidDigest);
25346
+ const immBytes = encodeUtf8(immutable);
25347
+ const digBytes = encodeUtf8(digest);
25348
+ let offset = 0;
25349
+ tbs.set(sidBytes, offset);
25350
+ offset += sidBytes.length;
25351
+ tbs[offset] = 0x1f;
25352
+ offset += 1;
25353
+ tbs.set(immBytes, offset);
25354
+ offset += immBytes.length;
25355
+ tbs[offset] = 0x1f;
25356
+ offset += 1;
25357
+ tbs.set(digBytes, offset);
25358
+ const privateKey = this.loadPrivateKey();
25359
+ const signatureBytes = sign(tbs, privateKey);
25360
+ const signature = urlsafeBase64Encode(signatureBytes);
25361
+ const kid = this.determineKeyId();
25362
+ const signatureHeader = {
25363
+ kid,
25364
+ val: signature,
25365
+ alg: 'EdDSA',
25366
+ };
25367
+ const secHeader = envelope.sec ?? {};
25368
+ secHeader.sig = signatureHeader;
25369
+ envelope.sec = secHeader;
25370
+ return envelope;
25371
+ }
25372
+ loadPrivateKey() {
25373
+ const pem = this.explicitPrivateKey ??
25374
+ readStringProperty(this.crypto, 'signingPrivatePem', 'signing_private_pem');
25375
+ if (!pem) {
25376
+ throw new Error('Crypto provider does not expose a signing private key');
25377
+ }
25378
+ return parseEd25519PrivateKey(pem);
25379
+ }
25380
+ determineKeyId() {
25381
+ if (this.explicitKeyId) {
25382
+ return this.explicitKeyId;
25383
+ }
25384
+ if (this.signingConfig.signingMaterial === SigningMaterial.X509_CHAIN) {
25385
+ const certificateProvider = this
25386
+ .crypto;
25387
+ const jwk = certificateProvider.nodeJwk?.();
25388
+ if (jwk && typeof jwk === 'object' && 'kid' in jwk && 'x5c' in jwk) {
25389
+ const kid = jwk.kid;
25390
+ if (typeof kid === 'string' && kid.length > 0) {
25391
+ return kid;
25392
+ }
25393
+ }
25394
+ }
25395
+ const fallback = readStringProperty(this.crypto, 'signatureKeyId', 'signature_key_id');
25396
+ if (!fallback) {
25397
+ throw new Error('Crypto provider does not expose a signature key id');
25398
+ }
25399
+ return fallback;
25400
+ }
25401
+ }
25402
+
25403
+ var eddsaEnvelopeSigner = /*#__PURE__*/Object.freeze({
25404
+ __proto__: null,
25405
+ EdDSAEnvelopeSigner: EdDSAEnvelopeSigner
25406
+ });
25407
+
25268
25408
  const logger$x = getLogger('naylence.fame.security.auth.jwt_token_issuer');
25269
25409
  let joseModulePromise = null;
25270
25410
  async function requireJose() {
@@ -39370,146 +39510,6 @@ var sharedSecretTokenVerifier = /*#__PURE__*/Object.freeze({
39370
39510
  SharedSecretTokenVerifier: SharedSecretTokenVerifier
39371
39511
  });
39372
39512
 
39373
- if (!hashes.sha512) {
39374
- hashes.sha512 = (message) => sha512(message);
39375
- }
39376
- function normalizeSignerOptions(options) {
39377
- if (!options || typeof options !== 'object') {
39378
- return {};
39379
- }
39380
- const candidate = options;
39381
- const result = {
39382
- ...options,
39383
- };
39384
- const cryptoProvider = resolveAlias(candidate, ['cryptoProvider', 'crypto_provider']);
39385
- if (cryptoProvider !== undefined) {
39386
- result.cryptoProvider = cryptoProvider ?? null;
39387
- }
39388
- const signingConfig = resolveAlias(candidate, ['signingConfig', 'signing_config']);
39389
- if (signingConfig !== undefined) {
39390
- result.signingConfig = signingConfig;
39391
- }
39392
- const privateKeyPem = resolveAlias(candidate, [
39393
- 'privateKeyPem',
39394
- 'private_key_pem',
39395
- ]);
39396
- if (privateKeyPem !== undefined) {
39397
- result.privateKeyPem = privateKeyPem;
39398
- }
39399
- const keyId = resolveAlias(candidate, [
39400
- 'keyId',
39401
- 'key_id',
39402
- ]);
39403
- if (keyId !== undefined) {
39404
- result.keyId = keyId;
39405
- }
39406
- return result;
39407
- }
39408
- class EdDSAEnvelopeSigner {
39409
- constructor(options = {}) {
39410
- const normalized = normalizeSignerOptions(options);
39411
- const provider = normalized.cryptoProvider ?? null;
39412
- if (!provider) {
39413
- throw new Error('No crypto provider is configured for signing');
39414
- }
39415
- this.crypto = provider;
39416
- const signingConfigOption = normalized.signingConfig;
39417
- if (signingConfigOption instanceof SigningConfig) {
39418
- this.signingConfig = signingConfigOption;
39419
- }
39420
- else if (signingConfigOption) {
39421
- this.signingConfig = new SigningConfig(signingConfigOption);
39422
- }
39423
- else {
39424
- this.signingConfig = new SigningConfig();
39425
- }
39426
- this.explicitPrivateKey = normalized.privateKeyPem;
39427
- this.explicitKeyId = normalized.keyId;
39428
- }
39429
- signEnvelope(envelope, { physicalPath }) {
39430
- if (!envelope.sid) {
39431
- throw new Error('Envelope missing sid');
39432
- }
39433
- const frame = envelope.frame;
39434
- if (frame.type === 'Data') {
39435
- const dataFrame = frame;
39436
- if (!dataFrame.pd) {
39437
- const payload = dataFrame.payload ?? '';
39438
- const payloadString = payload === '' ? '' : canonicalJson(payload);
39439
- dataFrame.pd = secureDigest(payloadString);
39440
- }
39441
- }
39442
- const digest = frameDigest(frame);
39443
- const immutable = canonicalJson(immutableHeaders(envelope));
39444
- const sidDigest = secureDigest(physicalPath);
39445
- const tbs = new Uint8Array(encodeUtf8(sidDigest).length +
39446
- 1 +
39447
- encodeUtf8(immutable).length +
39448
- 1 +
39449
- encodeUtf8(digest).length);
39450
- const sidBytes = encodeUtf8(sidDigest);
39451
- const immBytes = encodeUtf8(immutable);
39452
- const digBytes = encodeUtf8(digest);
39453
- let offset = 0;
39454
- tbs.set(sidBytes, offset);
39455
- offset += sidBytes.length;
39456
- tbs[offset] = 0x1f;
39457
- offset += 1;
39458
- tbs.set(immBytes, offset);
39459
- offset += immBytes.length;
39460
- tbs[offset] = 0x1f;
39461
- offset += 1;
39462
- tbs.set(digBytes, offset);
39463
- const privateKey = this.loadPrivateKey();
39464
- const signatureBytes = sign(tbs, privateKey);
39465
- const signature = urlsafeBase64Encode(signatureBytes);
39466
- const kid = this.determineKeyId();
39467
- const signatureHeader = {
39468
- kid,
39469
- val: signature,
39470
- alg: 'EdDSA',
39471
- };
39472
- const secHeader = envelope.sec ?? {};
39473
- secHeader.sig = signatureHeader;
39474
- envelope.sec = secHeader;
39475
- return envelope;
39476
- }
39477
- loadPrivateKey() {
39478
- const pem = this.explicitPrivateKey ??
39479
- readStringProperty(this.crypto, 'signingPrivatePem', 'signing_private_pem');
39480
- if (!pem) {
39481
- throw new Error('Crypto provider does not expose a signing private key');
39482
- }
39483
- return parseEd25519PrivateKey(pem);
39484
- }
39485
- determineKeyId() {
39486
- if (this.explicitKeyId) {
39487
- return this.explicitKeyId;
39488
- }
39489
- if (this.signingConfig.signingMaterial === SigningMaterial.X509_CHAIN) {
39490
- const certificateProvider = this
39491
- .crypto;
39492
- const jwk = certificateProvider.nodeJwk?.();
39493
- if (jwk && typeof jwk === 'object' && 'kid' in jwk && 'x5c' in jwk) {
39494
- const kid = jwk.kid;
39495
- if (typeof kid === 'string' && kid.length > 0) {
39496
- return kid;
39497
- }
39498
- }
39499
- }
39500
- const fallback = readStringProperty(this.crypto, 'signatureKeyId', 'signature_key_id');
39501
- if (!fallback) {
39502
- throw new Error('Crypto provider does not expose a signature key id');
39503
- }
39504
- return fallback;
39505
- }
39506
- }
39507
-
39508
- var eddsaEnvelopeSigner = /*#__PURE__*/Object.freeze({
39509
- __proto__: null,
39510
- EdDSAEnvelopeSigner: EdDSAEnvelopeSigner
39511
- });
39512
-
39513
39513
  async function loadPublicKey(jwk, signingConfig) {
39514
39514
  if (jwk.x5c) {
39515
39515
  if (signingConfig.signingMaterial !== SigningMaterial.X509_CHAIN) {
@@ -39747,4 +39747,4 @@ var websocketTransportProvisioner = /*#__PURE__*/Object.freeze({
39747
39747
  WebSocketTransportProvisionerFactory: WebSocketTransportProvisionerFactory
39748
39748
  });
39749
39749
 
39750
- export { ADMISSION_CLIENT_FACTORY_BASE_TYPE, ATTACHMENT_KEY_VALIDATOR_FACTORY_BASE_TYPE, AUTHORIZER_FACTORY_BASE_TYPE, AUTH_INJECTION_STRATEGY_FACTORY_BASE_TYPE, AnsiColor, AsyncLock, AttachmentKeyValidator, AuthInjectionStrategyFactory, AuthorizerFactory, BROADCAST_CHANNEL_CONNECTION_GRANT_TYPE, BackPressureFull, BaseAsyncConnector, BaseNodeEventListener, BindingManager, BindingStoreEntryRecord, BrowserAutoKeyCredentialProvider, BrowserWrappedKeyCredentialProvider, CERTIFICATE_MANAGER_FACTORY_BASE_TYPE, CREDENTIAL_PROVIDER_FACTORY_BASE_TYPE, CRYPTO_LEVEL_SECURITY_ORDER, CertificateManagerFactory, ConnectorConfigDefaults, ConnectorFactory, ConsoleMetricsEmitter, CryptoLevel, FACTORY_META$_ as DEFAULT_WELCOME_FACTORY_META, DefaultCryptoProvider, DefaultKeyManager, DefaultSecurityManager, DefaultSecurityPolicy, DefaultWelcomeService, DefaultWelcomeServiceFactory, DevFixedKeyCredentialProvider, ENCRYPTION_MANAGER_FACTORY_BASE_TYPE, ENVELOPE_SIGNER_FACTORY_BASE_TYPE, ENVELOPE_VERIFIER_FACTORY_BASE_TYPE, ENV_VAR_DEFAULT_ENCRYPTION_LEVEL, ENV_VAR_HMAC_SECRET, ENV_VAR_JWKS_URL, ENV_VAR_JWT_ALGORITHM, ENV_VAR_JWT_AUDIENCE$1 as ENV_VAR_JWT_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER, ENV_VAR_JWT_TRUSTED_ISSUER, ENV_VAR_SHOW_ENVELOPES$1 as ENV_VAR_SHOW_ENVELOPES, EncryptedKeyValueStore, EncryptedStorageProviderBase, EncryptedValue, EncryptionConfiguration, EncryptionManagerFactory, EncryptionResult, EncryptionStatus, EnvCredentialProvider, EnvelopeContext, EnvelopeListenerManager, EnvelopeSecurityHandler, EnvelopeSignerFactory, EnvelopeVerifierFactory, FACTORY_META$$ as FACTORY_META, FIXED_PREFIX_LEN, FameAuthorizedDeliveryContextSchema, FameConnectError, FameEnvironmentContext, FameError, FameMessageTooLarge, FameNode, FameNodeAuthorizationContextSchema, FameProtocolError, FameTransportClose, FlowController, GRANT_PURPOSE_NODE_ATTACH, HTTP_CONNECTION_GRANT_TYPE, HTTP_STATELESS_CONNECTOR_TYPE, INPAGE_CONNECTION_GRANT_TYPE, INPAGE_CONNECTOR_TYPE, InMemoryBinding, InMemoryFanoutBroker, InMemoryKeyValueStore, InMemoryReadWriteChannel, InMemoryStorageProvider, InPageConnector, IndexedDBKeyValueStore, IndexedDBStorageProvider, InvalidPassphraseError, JWKValidationError, KEY_MANAGER_FACTORY_BASE_TYPE, KEY_STORE_FACTORY_BASE_TYPE, KeyInfo, KeyManagementHandler, KeyManagerFactory, KeyStore, KeyStoreFactory, KeyValidationError, LOAD_BALANCER_STICKINESS_MANAGER_FACTORY_BASE_TYPE, LoadBalancerStickinessManagerFactory, LogLevel, LogLevelNames, MemoryMetricsEmitter, NODE_LIKE_FACTORY_BASE_TYPE, NODE_PLACEMENT_STRATEGY_FACTORY_BASE_TYPE, NoOpMetricsEmitter, NoSecurityPolicy, NodeFactory, NodePlacementStrategyFactory, NoneCredentialProvider, NoopEncryptionManager, NoopKeyValidator, NotAuthorized, PROFILE_NAME_GATED, PROFILE_NAME_GATED_CALLBACK, PROFILE_NAME_OPEN$1 as PROFILE_NAME_OPEN, PROFILE_NAME_OVERLAY, PROFILE_NAME_OVERLAY_CALLBACK, PROFILE_NAME_STRICT_OVERLAY, PromptCredentialProvider, REPLICA_STICKINESS_MANAGER_FACTORY_BASE_TYPE, REQUIRED_FIELDS_BY_KTY, ReplicaStickinessManagerFactory, RootSessionManager, RouteManager, RpcMixin, RpcProxy, SEALED_ENVELOPE_NONCE_LENGTH, SEALED_ENVELOPE_OVERHEAD, SEALED_ENVELOPE_PRIVATE_KEY_LENGTH, SEALED_ENVELOPE_PUBLIC_KEY_LENGTH, SEALED_ENVELOPE_TAG_LENGTH, SECURE_CHANNEL_MANAGER_FACTORY_BASE_TYPE, SECURITY_MANAGER_FACTORY_BASE_TYPE, SECURITY_POLICY_FACTORY_BASE_TYPE, STORAGE_PROVIDER_FACTORY_BASE_TYPE, SecretSource, SecretStoreCredentialProvider, SecureChannelFrameHandler, SecureChannelManagerFactory, SecurityAction, SecurityRequirements, Sentinel, SentinelFactory, SessionKeyCredentialProvider, SignaturePolicy, SigningConfig as SigningConfigClass, SigningConfiguration, SimpleLoadBalancerStickinessManager, SimpleLoadBalancerStickinessManagerFactory, StaticCredentialProvider, StorageAESEncryptionManager, TOKEN_ISSUER_FACTORY_BASE_TYPE, TOKEN_PROVIDER_FACTORY_BASE_TYPE, TOKEN_VERIFIER_FACTORY_BASE_TYPE, TRANSPORT_PROVISIONER_FACTORY_BASE_TYPE, TaskSpawner, TokenIssuerFactory, TokenProviderFactory, TokenVerifierFactory, TransportProvisionerFactory, TtlValidationError, UpstreamSessionManager, VALID_CURVES_BY_KTY, VALID_KEY_USES, VERSION, WEBSOCKET_CONNECTION_GRANT_TYPE, WELCOME_SERVICE_FACTORY_BASE_TYPE, WebSocketCloseCode, WebSocketConnector, WebSocketState, WelcomeServiceFactory, _NoopFlowController, __runtimePluginLoader, addEnvelopeFields, addLogLevel, addTimestamp, assertConnectionGrant, assertGrant, basicConfig, broadcastChannelGrantToConnectorConfig, camelToSnakeCase, canonicalJson, capitalizeFirstLetter, color, compareCryptoLevels, compiledPathPattern, consoleTransport, convertWildcardLogicalToDnsConstraint, createConnectorConfig, createEd25519Keypair, createHostLogicalUri, createLogicalUri, createNodeDeliveryContext, createResource, createRpcProxy, createRsaKeypair, createTransportCloseError, createX25519Keypair, credentialToString, currentTraceId$1 as currentTraceId, debounce, decodeBase64Url, decodeFameDataPayload, deepMerge, defaultJsonEncoder, delay, dropEmpty, enableLogging, encodeUtf8, ensureRuntimeFactoriesRegistered, extractId, extractPoolAddressBase, extractPoolBase, filterKeysByUse, formatTimestamp, formatTimestampForConsole$1 as formatTimestampForConsole, frameDigest, getCurrentEnvelope, getFameRoot, getKeyProvider, getKeyStore, getLogger, hasCryptoSupport, hostnameToLogical, hostnamesToLogicals, httpGrantToConnectorConfig, immutableHeaders, inPageGrantToConnectorConfig, isAuthInjectionStrategy, isBroadcastChannelConnectionGrant, isConnectionGrant, isConnectorConfig, isEnvelopeLoggingEnabled, isFameError, isFameErrorType, isGrant, isHttpConnectionGrant, isInPageConnectionGrant, isNodeLike, isPlainObject$3 as isPlainObject, isPoolAddress, isPoolLogical, isRegisterable, isTokenExpired, isTokenProvider, isTokenValid, isWebSocketConnectionGrant, jsonDumps, logicalPatternsToDnsConstraints, logicalToHostname, logicalsToHostnames, matchesPoolAddress, matchesPoolLogical, maybeAwait, nodeWelcomeRouter, nodeWelcomeRouterPlugin, normalizeBroadcastChannelConnectionGrant, normalizeEncryptionConfig, normalizeEnvelopeSnapshot, normalizeHttpConnectionGrant, normalizeInPageConnectionGrant, normalizeInboundCryptoRules, normalizeInboundSigningRules, normalizeOutboundCryptoRules, normalizeOutboundSigningRules, normalizePath, normalizeResponseCryptoRules, normalizeResponseSigningRules, normalizeSecretSource, normalizeSecurityRequirements, normalizeSigningConfig, normalizeWebSocketConnectionGrant, objectToBytes, operation, parseSealedEnvelope, pinoTransport, prettyModel$1 as prettyModel, registerDefaultFactories, registerDefaultKeyStoreFactory, registerNodePlacementStrategyFactory, registerRuntimeFactories, requireCryptoSupport, retryWithBackoff, safeColor, sealedDecrypt, sealedEncrypt, secureDigest, setKeyStore, showEnvelopes$1 as showEnvelopes, sleep, snakeToCamelCase, stringifyNonPrimitives, supportsColor, throttle, urlsafeBase64Decode, urlsafeBase64Encode, validateCacheTtlSec, validateEncryptionKey, validateHostLogical, validateHostLogicals, validateJwkComplete, validateJwkStructure, validateJwkUseField, validateJwtTokenTtlSec, validateKeyCorrelationTtlSec, validateLogical, validateLogicalSegment, validateOAuth2TtlSec, validateSigningKey, validateTtlSec, waitForAll, waitForAllSettled, waitForAny, websocketGrantToConnectorConfig, withEnvelopeContext, withEnvelopeContextAsync, withLegacySnakeCaseKeys, withLock, withTimeout };
39750
+ export { ADMISSION_CLIENT_FACTORY_BASE_TYPE, ATTACHMENT_KEY_VALIDATOR_FACTORY_BASE_TYPE, AUTHORIZER_FACTORY_BASE_TYPE, AUTH_INJECTION_STRATEGY_FACTORY_BASE_TYPE, AnsiColor, AsyncLock, AttachmentKeyValidator, AuthInjectionStrategyFactory, AuthorizerFactory, BROADCAST_CHANNEL_CONNECTION_GRANT_TYPE, BackPressureFull, BaseAsyncConnector, BaseNodeEventListener, BindingManager, BindingStoreEntryRecord, BrowserAutoKeyCredentialProvider, BrowserWrappedKeyCredentialProvider, CERTIFICATE_MANAGER_FACTORY_BASE_TYPE, CREDENTIAL_PROVIDER_FACTORY_BASE_TYPE, CRYPTO_LEVEL_SECURITY_ORDER, CertificateManagerFactory, ConnectorConfigDefaults, ConnectorFactory, ConsoleMetricsEmitter, CryptoLevel, FACTORY_META$_ as DEFAULT_WELCOME_FACTORY_META, DefaultCryptoProvider, DefaultKeyManager, DefaultSecurityManager, DefaultSecurityPolicy, DefaultWelcomeService, DefaultWelcomeServiceFactory, DevFixedKeyCredentialProvider, ENCRYPTION_MANAGER_FACTORY_BASE_TYPE, ENVELOPE_SIGNER_FACTORY_BASE_TYPE, ENVELOPE_VERIFIER_FACTORY_BASE_TYPE, ENV_VAR_DEFAULT_ENCRYPTION_LEVEL, ENV_VAR_HMAC_SECRET, ENV_VAR_JWKS_URL, ENV_VAR_JWT_ALGORITHM, ENV_VAR_JWT_AUDIENCE$1 as ENV_VAR_JWT_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER, ENV_VAR_JWT_TRUSTED_ISSUER, ENV_VAR_SHOW_ENVELOPES$1 as ENV_VAR_SHOW_ENVELOPES, EdDSAEnvelopeSigner, EncryptedKeyValueStore, EncryptedStorageProviderBase, EncryptedValue, EncryptionConfiguration, EncryptionManagerFactory, EncryptionResult, EncryptionStatus, EnvCredentialProvider, EnvelopeContext, EnvelopeListenerManager, EnvelopeSecurityHandler, EnvelopeSignerFactory, EnvelopeVerifierFactory, FACTORY_META$$ as FACTORY_META, FIXED_PREFIX_LEN, FameAuthorizedDeliveryContextSchema, FameConnectError, FameEnvironmentContext, FameError, FameMessageTooLarge, FameNode, FameNodeAuthorizationContextSchema, FameProtocolError, FameTransportClose, FlowController, GRANT_PURPOSE_NODE_ATTACH, HTTP_CONNECTION_GRANT_TYPE, HTTP_STATELESS_CONNECTOR_TYPE, INPAGE_CONNECTION_GRANT_TYPE, INPAGE_CONNECTOR_TYPE, InMemoryBinding, InMemoryFanoutBroker, InMemoryKeyValueStore, InMemoryReadWriteChannel, InMemoryStorageProvider, InPageConnector, IndexedDBKeyValueStore, IndexedDBStorageProvider, InvalidPassphraseError, JWKValidationError, KEY_MANAGER_FACTORY_BASE_TYPE, KEY_STORE_FACTORY_BASE_TYPE, KeyInfo, KeyManagementHandler, KeyManagerFactory, KeyStore, KeyStoreFactory, KeyValidationError, LOAD_BALANCER_STICKINESS_MANAGER_FACTORY_BASE_TYPE, LoadBalancerStickinessManagerFactory, LogLevel, LogLevelNames, MemoryMetricsEmitter, NODE_LIKE_FACTORY_BASE_TYPE, NODE_PLACEMENT_STRATEGY_FACTORY_BASE_TYPE, NoOpMetricsEmitter, NoSecurityPolicy, NodeFactory, NodePlacementStrategyFactory, NoneCredentialProvider, NoopEncryptionManager, NoopKeyValidator, NotAuthorized, PROFILE_NAME_GATED, PROFILE_NAME_GATED_CALLBACK, PROFILE_NAME_OPEN$1 as PROFILE_NAME_OPEN, PROFILE_NAME_OVERLAY, PROFILE_NAME_OVERLAY_CALLBACK, PROFILE_NAME_STRICT_OVERLAY, PromptCredentialProvider, REPLICA_STICKINESS_MANAGER_FACTORY_BASE_TYPE, REQUIRED_FIELDS_BY_KTY, ReplicaStickinessManagerFactory, RootSessionManager, RouteManager, RpcMixin, RpcProxy, SEALED_ENVELOPE_NONCE_LENGTH, SEALED_ENVELOPE_OVERHEAD, SEALED_ENVELOPE_PRIVATE_KEY_LENGTH, SEALED_ENVELOPE_PUBLIC_KEY_LENGTH, SEALED_ENVELOPE_TAG_LENGTH, SECURE_CHANNEL_MANAGER_FACTORY_BASE_TYPE, SECURITY_MANAGER_FACTORY_BASE_TYPE, SECURITY_POLICY_FACTORY_BASE_TYPE, STORAGE_PROVIDER_FACTORY_BASE_TYPE, SecretSource, SecretStoreCredentialProvider, SecureChannelFrameHandler, SecureChannelManagerFactory, SecurityAction, SecurityRequirements, Sentinel, SentinelFactory, SessionKeyCredentialProvider, SignaturePolicy, SigningConfig as SigningConfigClass, SigningConfiguration, SimpleLoadBalancerStickinessManager, SimpleLoadBalancerStickinessManagerFactory, StaticCredentialProvider, StorageAESEncryptionManager, TOKEN_ISSUER_FACTORY_BASE_TYPE, TOKEN_PROVIDER_FACTORY_BASE_TYPE, TOKEN_VERIFIER_FACTORY_BASE_TYPE, TRANSPORT_PROVISIONER_FACTORY_BASE_TYPE, TaskSpawner, TokenIssuerFactory, TokenProviderFactory, TokenVerifierFactory, TransportProvisionerFactory, TtlValidationError, UpstreamSessionManager, VALID_CURVES_BY_KTY, VALID_KEY_USES, VERSION, WEBSOCKET_CONNECTION_GRANT_TYPE, WELCOME_SERVICE_FACTORY_BASE_TYPE, WebSocketCloseCode, WebSocketConnector, WebSocketState, WelcomeServiceFactory, _NoopFlowController, __runtimePluginLoader, addEnvelopeFields, addLogLevel, addTimestamp, assertConnectionGrant, assertGrant, basicConfig, broadcastChannelGrantToConnectorConfig, camelToSnakeCase, canonicalJson, capitalizeFirstLetter, color, compareCryptoLevels, compiledPathPattern, consoleTransport, convertWildcardLogicalToDnsConstraint, createConnectorConfig, createEd25519Keypair, createHostLogicalUri, createLogicalUri, createNodeDeliveryContext, createResource, createRpcProxy, createRsaKeypair, createTransportCloseError, createX25519Keypair, credentialToString, currentTraceId$1 as currentTraceId, debounce, decodeBase64Url, decodeFameDataPayload, deepMerge, defaultJsonEncoder, delay, dropEmpty, enableLogging, encodeUtf8, ensureRuntimeFactoriesRegistered, extractId, extractPoolAddressBase, extractPoolBase, filterKeysByUse, formatTimestamp, formatTimestampForConsole$1 as formatTimestampForConsole, frameDigest, getCurrentEnvelope, getFameRoot, getKeyProvider, getKeyStore, getLogger, hasCryptoSupport, hostnameToLogical, hostnamesToLogicals, httpGrantToConnectorConfig, immutableHeaders, inPageGrantToConnectorConfig, isAuthInjectionStrategy, isBroadcastChannelConnectionGrant, isConnectionGrant, isConnectorConfig, isEnvelopeLoggingEnabled, isFameError, isFameErrorType, isGrant, isHttpConnectionGrant, isInPageConnectionGrant, isNodeLike, isPlainObject$3 as isPlainObject, isPoolAddress, isPoolLogical, isRegisterable, isTokenExpired, isTokenProvider, isTokenValid, isWebSocketConnectionGrant, jsonDumps, logicalPatternsToDnsConstraints, logicalToHostname, logicalsToHostnames, matchesPoolAddress, matchesPoolLogical, maybeAwait, nodeWelcomeRouter, nodeWelcomeRouterPlugin, normalizeBroadcastChannelConnectionGrant, normalizeEncryptionConfig, normalizeEnvelopeSnapshot, normalizeHttpConnectionGrant, normalizeInPageConnectionGrant, normalizeInboundCryptoRules, normalizeInboundSigningRules, normalizeOutboundCryptoRules, normalizeOutboundSigningRules, normalizePath, normalizeResponseCryptoRules, normalizeResponseSigningRules, normalizeSecretSource, normalizeSecurityRequirements, normalizeSigningConfig, normalizeWebSocketConnectionGrant, objectToBytes, operation, parseSealedEnvelope, pinoTransport, prettyModel$1 as prettyModel, registerDefaultFactories, registerDefaultKeyStoreFactory, registerNodePlacementStrategyFactory, registerRuntimeFactories, requireCryptoSupport, retryWithBackoff, safeColor, sealedDecrypt, sealedEncrypt, secureDigest, setKeyStore, showEnvelopes$1 as showEnvelopes, sleep, snakeToCamelCase, stringifyNonPrimitives, supportsColor, throttle, urlsafeBase64Decode, urlsafeBase64Encode, validateCacheTtlSec, validateEncryptionKey, validateHostLogical, validateHostLogicals, validateJwkComplete, validateJwkStructure, validateJwkUseField, validateJwtTokenTtlSec, validateKeyCorrelationTtlSec, validateLogical, validateLogicalSegment, validateOAuth2TtlSec, validateSigningKey, validateTtlSec, waitForAll, waitForAllSettled, waitForAny, websocketGrantToConnectorConfig, withEnvelopeContext, withEnvelopeContextAsync, withLegacySnakeCaseKeys, withLock, withTimeout };