@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.
@@ -12,11 +12,11 @@ var ed25519_js = require('@noble/curves/ed25519.js');
12
12
  var hkdf_js = require('@noble/hashes/hkdf.js');
13
13
  var sha2_js = require('@noble/hashes/sha2.js');
14
14
  var utils_js = require('@noble/hashes/utils.js');
15
+ var ed25519 = require('@noble/ed25519');
15
16
  var fastify = require('fastify');
16
17
  var websocketPlugin = require('@fastify/websocket');
17
18
  var formbody = require('@fastify/formbody');
18
19
  var node_crypto = require('node:crypto');
19
- var ed25519 = require('@noble/ed25519');
20
20
 
21
21
  /**
22
22
  * Cross-platform logging utilities for Naylence Fame
@@ -5372,12 +5372,12 @@ for (const [name, config] of Object.entries(SQLITE_PROFILES)) {
5372
5372
  }
5373
5373
 
5374
5374
  // This file is auto-generated during build - do not edit manually
5375
- // Generated from package.json version: 0.3.5-test.922
5375
+ // Generated from package.json version: 0.3.5-test.923
5376
5376
  /**
5377
5377
  * The package version, injected at build time.
5378
5378
  * @internal
5379
5379
  */
5380
- const VERSION = '0.3.5-test.922';
5380
+ const VERSION = '0.3.5-test.923';
5381
5381
 
5382
5382
  /**
5383
5383
  * Fame errors module - Fame protocol specific error classes
@@ -26427,6 +26427,146 @@ function encodeUtf8(value) {
26427
26427
  throw new Error('No UTF-8 encoder available in this environment');
26428
26428
  }
26429
26429
 
26430
+ if (!ed25519.hashes.sha512) {
26431
+ ed25519.hashes.sha512 = (message) => sha2_js.sha512(message);
26432
+ }
26433
+ function normalizeSignerOptions(options) {
26434
+ if (!options || typeof options !== 'object') {
26435
+ return {};
26436
+ }
26437
+ const candidate = options;
26438
+ const result = {
26439
+ ...options,
26440
+ };
26441
+ const cryptoProvider = resolveAlias(candidate, ['cryptoProvider', 'crypto_provider']);
26442
+ if (cryptoProvider !== undefined) {
26443
+ result.cryptoProvider = cryptoProvider ?? null;
26444
+ }
26445
+ const signingConfig = resolveAlias(candidate, ['signingConfig', 'signing_config']);
26446
+ if (signingConfig !== undefined) {
26447
+ result.signingConfig = signingConfig;
26448
+ }
26449
+ const privateKeyPem = resolveAlias(candidate, [
26450
+ 'privateKeyPem',
26451
+ 'private_key_pem',
26452
+ ]);
26453
+ if (privateKeyPem !== undefined) {
26454
+ result.privateKeyPem = privateKeyPem;
26455
+ }
26456
+ const keyId = resolveAlias(candidate, [
26457
+ 'keyId',
26458
+ 'key_id',
26459
+ ]);
26460
+ if (keyId !== undefined) {
26461
+ result.keyId = keyId;
26462
+ }
26463
+ return result;
26464
+ }
26465
+ class EdDSAEnvelopeSigner {
26466
+ constructor(options = {}) {
26467
+ const normalized = normalizeSignerOptions(options);
26468
+ const provider = normalized.cryptoProvider ?? null;
26469
+ if (!provider) {
26470
+ throw new Error('No crypto provider is configured for signing');
26471
+ }
26472
+ this.crypto = provider;
26473
+ const signingConfigOption = normalized.signingConfig;
26474
+ if (signingConfigOption instanceof SigningConfig) {
26475
+ this.signingConfig = signingConfigOption;
26476
+ }
26477
+ else if (signingConfigOption) {
26478
+ this.signingConfig = new SigningConfig(signingConfigOption);
26479
+ }
26480
+ else {
26481
+ this.signingConfig = new SigningConfig();
26482
+ }
26483
+ this.explicitPrivateKey = normalized.privateKeyPem;
26484
+ this.explicitKeyId = normalized.keyId;
26485
+ }
26486
+ signEnvelope(envelope, { physicalPath }) {
26487
+ if (!envelope.sid) {
26488
+ throw new Error('Envelope missing sid');
26489
+ }
26490
+ const frame = envelope.frame;
26491
+ if (frame.type === 'Data') {
26492
+ const dataFrame = frame;
26493
+ if (!dataFrame.pd) {
26494
+ const payload = dataFrame.payload ?? '';
26495
+ const payloadString = payload === '' ? '' : canonicalJson(payload);
26496
+ dataFrame.pd = secureDigest(payloadString);
26497
+ }
26498
+ }
26499
+ const digest = frameDigest(frame);
26500
+ const immutable = canonicalJson(immutableHeaders(envelope));
26501
+ const sidDigest = secureDigest(physicalPath);
26502
+ const tbs = new Uint8Array(encodeUtf8(sidDigest).length +
26503
+ 1 +
26504
+ encodeUtf8(immutable).length +
26505
+ 1 +
26506
+ encodeUtf8(digest).length);
26507
+ const sidBytes = encodeUtf8(sidDigest);
26508
+ const immBytes = encodeUtf8(immutable);
26509
+ const digBytes = encodeUtf8(digest);
26510
+ let offset = 0;
26511
+ tbs.set(sidBytes, offset);
26512
+ offset += sidBytes.length;
26513
+ tbs[offset] = 0x1f;
26514
+ offset += 1;
26515
+ tbs.set(immBytes, offset);
26516
+ offset += immBytes.length;
26517
+ tbs[offset] = 0x1f;
26518
+ offset += 1;
26519
+ tbs.set(digBytes, offset);
26520
+ const privateKey = this.loadPrivateKey();
26521
+ const signatureBytes = ed25519.sign(tbs, privateKey);
26522
+ const signature = urlsafeBase64Encode(signatureBytes);
26523
+ const kid = this.determineKeyId();
26524
+ const signatureHeader = {
26525
+ kid,
26526
+ val: signature,
26527
+ alg: 'EdDSA',
26528
+ };
26529
+ const secHeader = envelope.sec ?? {};
26530
+ secHeader.sig = signatureHeader;
26531
+ envelope.sec = secHeader;
26532
+ return envelope;
26533
+ }
26534
+ loadPrivateKey() {
26535
+ const pem = this.explicitPrivateKey ??
26536
+ readStringProperty(this.crypto, 'signingPrivatePem', 'signing_private_pem');
26537
+ if (!pem) {
26538
+ throw new Error('Crypto provider does not expose a signing private key');
26539
+ }
26540
+ return parseEd25519PrivateKey(pem);
26541
+ }
26542
+ determineKeyId() {
26543
+ if (this.explicitKeyId) {
26544
+ return this.explicitKeyId;
26545
+ }
26546
+ if (this.signingConfig.signingMaterial === core.SigningMaterial.X509_CHAIN) {
26547
+ const certificateProvider = this
26548
+ .crypto;
26549
+ const jwk = certificateProvider.nodeJwk?.();
26550
+ if (jwk && typeof jwk === 'object' && 'kid' in jwk && 'x5c' in jwk) {
26551
+ const kid = jwk.kid;
26552
+ if (typeof kid === 'string' && kid.length > 0) {
26553
+ return kid;
26554
+ }
26555
+ }
26556
+ }
26557
+ const fallback = readStringProperty(this.crypto, 'signatureKeyId', 'signature_key_id');
26558
+ if (!fallback) {
26559
+ throw new Error('Crypto provider does not expose a signature key id');
26560
+ }
26561
+ return fallback;
26562
+ }
26563
+ }
26564
+
26565
+ var eddsaEnvelopeSigner = /*#__PURE__*/Object.freeze({
26566
+ __proto__: null,
26567
+ EdDSAEnvelopeSigner: EdDSAEnvelopeSigner
26568
+ });
26569
+
26430
26570
  // Legacy global crypto provider accessors are intentionally disabled to force
26431
26571
  // explicit dependency wiring. If a component still needs a global provider,
26432
26572
  // refactor it to accept one via configuration instead of re-enabling this code.
@@ -41589,146 +41729,6 @@ var sharedSecretTokenVerifier = /*#__PURE__*/Object.freeze({
41589
41729
  SharedSecretTokenVerifier: SharedSecretTokenVerifier
41590
41730
  });
41591
41731
 
41592
- if (!ed25519.hashes.sha512) {
41593
- ed25519.hashes.sha512 = (message) => sha2_js.sha512(message);
41594
- }
41595
- function normalizeSignerOptions(options) {
41596
- if (!options || typeof options !== 'object') {
41597
- return {};
41598
- }
41599
- const candidate = options;
41600
- const result = {
41601
- ...options,
41602
- };
41603
- const cryptoProvider = resolveAlias(candidate, ['cryptoProvider', 'crypto_provider']);
41604
- if (cryptoProvider !== undefined) {
41605
- result.cryptoProvider = cryptoProvider ?? null;
41606
- }
41607
- const signingConfig = resolveAlias(candidate, ['signingConfig', 'signing_config']);
41608
- if (signingConfig !== undefined) {
41609
- result.signingConfig = signingConfig;
41610
- }
41611
- const privateKeyPem = resolveAlias(candidate, [
41612
- 'privateKeyPem',
41613
- 'private_key_pem',
41614
- ]);
41615
- if (privateKeyPem !== undefined) {
41616
- result.privateKeyPem = privateKeyPem;
41617
- }
41618
- const keyId = resolveAlias(candidate, [
41619
- 'keyId',
41620
- 'key_id',
41621
- ]);
41622
- if (keyId !== undefined) {
41623
- result.keyId = keyId;
41624
- }
41625
- return result;
41626
- }
41627
- class EdDSAEnvelopeSigner {
41628
- constructor(options = {}) {
41629
- const normalized = normalizeSignerOptions(options);
41630
- const provider = normalized.cryptoProvider ?? null;
41631
- if (!provider) {
41632
- throw new Error('No crypto provider is configured for signing');
41633
- }
41634
- this.crypto = provider;
41635
- const signingConfigOption = normalized.signingConfig;
41636
- if (signingConfigOption instanceof SigningConfig) {
41637
- this.signingConfig = signingConfigOption;
41638
- }
41639
- else if (signingConfigOption) {
41640
- this.signingConfig = new SigningConfig(signingConfigOption);
41641
- }
41642
- else {
41643
- this.signingConfig = new SigningConfig();
41644
- }
41645
- this.explicitPrivateKey = normalized.privateKeyPem;
41646
- this.explicitKeyId = normalized.keyId;
41647
- }
41648
- signEnvelope(envelope, { physicalPath }) {
41649
- if (!envelope.sid) {
41650
- throw new Error('Envelope missing sid');
41651
- }
41652
- const frame = envelope.frame;
41653
- if (frame.type === 'Data') {
41654
- const dataFrame = frame;
41655
- if (!dataFrame.pd) {
41656
- const payload = dataFrame.payload ?? '';
41657
- const payloadString = payload === '' ? '' : canonicalJson(payload);
41658
- dataFrame.pd = secureDigest(payloadString);
41659
- }
41660
- }
41661
- const digest = frameDigest(frame);
41662
- const immutable = canonicalJson(immutableHeaders(envelope));
41663
- const sidDigest = secureDigest(physicalPath);
41664
- const tbs = new Uint8Array(encodeUtf8(sidDigest).length +
41665
- 1 +
41666
- encodeUtf8(immutable).length +
41667
- 1 +
41668
- encodeUtf8(digest).length);
41669
- const sidBytes = encodeUtf8(sidDigest);
41670
- const immBytes = encodeUtf8(immutable);
41671
- const digBytes = encodeUtf8(digest);
41672
- let offset = 0;
41673
- tbs.set(sidBytes, offset);
41674
- offset += sidBytes.length;
41675
- tbs[offset] = 0x1f;
41676
- offset += 1;
41677
- tbs.set(immBytes, offset);
41678
- offset += immBytes.length;
41679
- tbs[offset] = 0x1f;
41680
- offset += 1;
41681
- tbs.set(digBytes, offset);
41682
- const privateKey = this.loadPrivateKey();
41683
- const signatureBytes = ed25519.sign(tbs, privateKey);
41684
- const signature = urlsafeBase64Encode(signatureBytes);
41685
- const kid = this.determineKeyId();
41686
- const signatureHeader = {
41687
- kid,
41688
- val: signature,
41689
- alg: 'EdDSA',
41690
- };
41691
- const secHeader = envelope.sec ?? {};
41692
- secHeader.sig = signatureHeader;
41693
- envelope.sec = secHeader;
41694
- return envelope;
41695
- }
41696
- loadPrivateKey() {
41697
- const pem = this.explicitPrivateKey ??
41698
- readStringProperty(this.crypto, 'signingPrivatePem', 'signing_private_pem');
41699
- if (!pem) {
41700
- throw new Error('Crypto provider does not expose a signing private key');
41701
- }
41702
- return parseEd25519PrivateKey(pem);
41703
- }
41704
- determineKeyId() {
41705
- if (this.explicitKeyId) {
41706
- return this.explicitKeyId;
41707
- }
41708
- if (this.signingConfig.signingMaterial === core.SigningMaterial.X509_CHAIN) {
41709
- const certificateProvider = this
41710
- .crypto;
41711
- const jwk = certificateProvider.nodeJwk?.();
41712
- if (jwk && typeof jwk === 'object' && 'kid' in jwk && 'x5c' in jwk) {
41713
- const kid = jwk.kid;
41714
- if (typeof kid === 'string' && kid.length > 0) {
41715
- return kid;
41716
- }
41717
- }
41718
- }
41719
- const fallback = readStringProperty(this.crypto, 'signatureKeyId', 'signature_key_id');
41720
- if (!fallback) {
41721
- throw new Error('Crypto provider does not expose a signature key id');
41722
- }
41723
- return fallback;
41724
- }
41725
- }
41726
-
41727
- var eddsaEnvelopeSigner = /*#__PURE__*/Object.freeze({
41728
- __proto__: null,
41729
- EdDSAEnvelopeSigner: EdDSAEnvelopeSigner
41730
- });
41731
-
41732
41732
  async function loadPublicKey(jwk, signingConfig) {
41733
41733
  if (jwk.x5c) {
41734
41734
  if (signingConfig.signingMaterial !== core.SigningMaterial.X509_CHAIN) {
@@ -42010,6 +42010,7 @@ exports.ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE = ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE;
42010
42010
  exports.ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER = ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER;
42011
42011
  exports.ENV_VAR_JWT_TRUSTED_ISSUER = ENV_VAR_JWT_TRUSTED_ISSUER;
42012
42012
  exports.ENV_VAR_SHOW_ENVELOPES = ENV_VAR_SHOW_ENVELOPES$1;
42013
+ exports.EdDSAEnvelopeSigner = EdDSAEnvelopeSigner;
42013
42014
  exports.EncryptedKeyValueStore = EncryptedKeyValueStore;
42014
42015
  exports.EncryptedStorageProviderBase = EncryptedStorageProviderBase;
42015
42016
  exports.EncryptedValue = EncryptedValue;
@@ -11,11 +11,11 @@ import { x25519 } from '@noble/curves/ed25519.js';
11
11
  import { hkdf } from '@noble/hashes/hkdf.js';
12
12
  import { sha256, sha512 } from '@noble/hashes/sha2.js';
13
13
  import { utf8ToBytes, bytesToHex, randomBytes, concatBytes } from '@noble/hashes/utils.js';
14
+ import { hashes, sign, verify } from '@noble/ed25519';
14
15
  import fastify from 'fastify';
15
16
  import websocketPlugin from '@fastify/websocket';
16
17
  import formbody from '@fastify/formbody';
17
18
  import { createHash, timingSafeEqual, randomBytes as randomBytes$1 } from 'node:crypto';
18
- import { hashes, sign, verify } from '@noble/ed25519';
19
19
 
20
20
  /**
21
21
  * Cross-platform logging utilities for Naylence Fame
@@ -5371,12 +5371,12 @@ for (const [name, config] of Object.entries(SQLITE_PROFILES)) {
5371
5371
  }
5372
5372
 
5373
5373
  // This file is auto-generated during build - do not edit manually
5374
- // Generated from package.json version: 0.3.5-test.922
5374
+ // Generated from package.json version: 0.3.5-test.923
5375
5375
  /**
5376
5376
  * The package version, injected at build time.
5377
5377
  * @internal
5378
5378
  */
5379
- const VERSION = '0.3.5-test.922';
5379
+ const VERSION = '0.3.5-test.923';
5380
5380
 
5381
5381
  /**
5382
5382
  * Fame errors module - Fame protocol specific error classes
@@ -26426,6 +26426,146 @@ function encodeUtf8(value) {
26426
26426
  throw new Error('No UTF-8 encoder available in this environment');
26427
26427
  }
26428
26428
 
26429
+ if (!hashes.sha512) {
26430
+ hashes.sha512 = (message) => sha512(message);
26431
+ }
26432
+ function normalizeSignerOptions(options) {
26433
+ if (!options || typeof options !== 'object') {
26434
+ return {};
26435
+ }
26436
+ const candidate = options;
26437
+ const result = {
26438
+ ...options,
26439
+ };
26440
+ const cryptoProvider = resolveAlias(candidate, ['cryptoProvider', 'crypto_provider']);
26441
+ if (cryptoProvider !== undefined) {
26442
+ result.cryptoProvider = cryptoProvider ?? null;
26443
+ }
26444
+ const signingConfig = resolveAlias(candidate, ['signingConfig', 'signing_config']);
26445
+ if (signingConfig !== undefined) {
26446
+ result.signingConfig = signingConfig;
26447
+ }
26448
+ const privateKeyPem = resolveAlias(candidate, [
26449
+ 'privateKeyPem',
26450
+ 'private_key_pem',
26451
+ ]);
26452
+ if (privateKeyPem !== undefined) {
26453
+ result.privateKeyPem = privateKeyPem;
26454
+ }
26455
+ const keyId = resolveAlias(candidate, [
26456
+ 'keyId',
26457
+ 'key_id',
26458
+ ]);
26459
+ if (keyId !== undefined) {
26460
+ result.keyId = keyId;
26461
+ }
26462
+ return result;
26463
+ }
26464
+ class EdDSAEnvelopeSigner {
26465
+ constructor(options = {}) {
26466
+ const normalized = normalizeSignerOptions(options);
26467
+ const provider = normalized.cryptoProvider ?? null;
26468
+ if (!provider) {
26469
+ throw new Error('No crypto provider is configured for signing');
26470
+ }
26471
+ this.crypto = provider;
26472
+ const signingConfigOption = normalized.signingConfig;
26473
+ if (signingConfigOption instanceof SigningConfig) {
26474
+ this.signingConfig = signingConfigOption;
26475
+ }
26476
+ else if (signingConfigOption) {
26477
+ this.signingConfig = new SigningConfig(signingConfigOption);
26478
+ }
26479
+ else {
26480
+ this.signingConfig = new SigningConfig();
26481
+ }
26482
+ this.explicitPrivateKey = normalized.privateKeyPem;
26483
+ this.explicitKeyId = normalized.keyId;
26484
+ }
26485
+ signEnvelope(envelope, { physicalPath }) {
26486
+ if (!envelope.sid) {
26487
+ throw new Error('Envelope missing sid');
26488
+ }
26489
+ const frame = envelope.frame;
26490
+ if (frame.type === 'Data') {
26491
+ const dataFrame = frame;
26492
+ if (!dataFrame.pd) {
26493
+ const payload = dataFrame.payload ?? '';
26494
+ const payloadString = payload === '' ? '' : canonicalJson(payload);
26495
+ dataFrame.pd = secureDigest(payloadString);
26496
+ }
26497
+ }
26498
+ const digest = frameDigest(frame);
26499
+ const immutable = canonicalJson(immutableHeaders(envelope));
26500
+ const sidDigest = secureDigest(physicalPath);
26501
+ const tbs = new Uint8Array(encodeUtf8(sidDigest).length +
26502
+ 1 +
26503
+ encodeUtf8(immutable).length +
26504
+ 1 +
26505
+ encodeUtf8(digest).length);
26506
+ const sidBytes = encodeUtf8(sidDigest);
26507
+ const immBytes = encodeUtf8(immutable);
26508
+ const digBytes = encodeUtf8(digest);
26509
+ let offset = 0;
26510
+ tbs.set(sidBytes, offset);
26511
+ offset += sidBytes.length;
26512
+ tbs[offset] = 0x1f;
26513
+ offset += 1;
26514
+ tbs.set(immBytes, offset);
26515
+ offset += immBytes.length;
26516
+ tbs[offset] = 0x1f;
26517
+ offset += 1;
26518
+ tbs.set(digBytes, offset);
26519
+ const privateKey = this.loadPrivateKey();
26520
+ const signatureBytes = sign(tbs, privateKey);
26521
+ const signature = urlsafeBase64Encode(signatureBytes);
26522
+ const kid = this.determineKeyId();
26523
+ const signatureHeader = {
26524
+ kid,
26525
+ val: signature,
26526
+ alg: 'EdDSA',
26527
+ };
26528
+ const secHeader = envelope.sec ?? {};
26529
+ secHeader.sig = signatureHeader;
26530
+ envelope.sec = secHeader;
26531
+ return envelope;
26532
+ }
26533
+ loadPrivateKey() {
26534
+ const pem = this.explicitPrivateKey ??
26535
+ readStringProperty(this.crypto, 'signingPrivatePem', 'signing_private_pem');
26536
+ if (!pem) {
26537
+ throw new Error('Crypto provider does not expose a signing private key');
26538
+ }
26539
+ return parseEd25519PrivateKey(pem);
26540
+ }
26541
+ determineKeyId() {
26542
+ if (this.explicitKeyId) {
26543
+ return this.explicitKeyId;
26544
+ }
26545
+ if (this.signingConfig.signingMaterial === SigningMaterial.X509_CHAIN) {
26546
+ const certificateProvider = this
26547
+ .crypto;
26548
+ const jwk = certificateProvider.nodeJwk?.();
26549
+ if (jwk && typeof jwk === 'object' && 'kid' in jwk && 'x5c' in jwk) {
26550
+ const kid = jwk.kid;
26551
+ if (typeof kid === 'string' && kid.length > 0) {
26552
+ return kid;
26553
+ }
26554
+ }
26555
+ }
26556
+ const fallback = readStringProperty(this.crypto, 'signatureKeyId', 'signature_key_id');
26557
+ if (!fallback) {
26558
+ throw new Error('Crypto provider does not expose a signature key id');
26559
+ }
26560
+ return fallback;
26561
+ }
26562
+ }
26563
+
26564
+ var eddsaEnvelopeSigner = /*#__PURE__*/Object.freeze({
26565
+ __proto__: null,
26566
+ EdDSAEnvelopeSigner: EdDSAEnvelopeSigner
26567
+ });
26568
+
26429
26569
  // Legacy global crypto provider accessors are intentionally disabled to force
26430
26570
  // explicit dependency wiring. If a component still needs a global provider,
26431
26571
  // refactor it to accept one via configuration instead of re-enabling this code.
@@ -41588,146 +41728,6 @@ var sharedSecretTokenVerifier = /*#__PURE__*/Object.freeze({
41588
41728
  SharedSecretTokenVerifier: SharedSecretTokenVerifier
41589
41729
  });
41590
41730
 
41591
- if (!hashes.sha512) {
41592
- hashes.sha512 = (message) => sha512(message);
41593
- }
41594
- function normalizeSignerOptions(options) {
41595
- if (!options || typeof options !== 'object') {
41596
- return {};
41597
- }
41598
- const candidate = options;
41599
- const result = {
41600
- ...options,
41601
- };
41602
- const cryptoProvider = resolveAlias(candidate, ['cryptoProvider', 'crypto_provider']);
41603
- if (cryptoProvider !== undefined) {
41604
- result.cryptoProvider = cryptoProvider ?? null;
41605
- }
41606
- const signingConfig = resolveAlias(candidate, ['signingConfig', 'signing_config']);
41607
- if (signingConfig !== undefined) {
41608
- result.signingConfig = signingConfig;
41609
- }
41610
- const privateKeyPem = resolveAlias(candidate, [
41611
- 'privateKeyPem',
41612
- 'private_key_pem',
41613
- ]);
41614
- if (privateKeyPem !== undefined) {
41615
- result.privateKeyPem = privateKeyPem;
41616
- }
41617
- const keyId = resolveAlias(candidate, [
41618
- 'keyId',
41619
- 'key_id',
41620
- ]);
41621
- if (keyId !== undefined) {
41622
- result.keyId = keyId;
41623
- }
41624
- return result;
41625
- }
41626
- class EdDSAEnvelopeSigner {
41627
- constructor(options = {}) {
41628
- const normalized = normalizeSignerOptions(options);
41629
- const provider = normalized.cryptoProvider ?? null;
41630
- if (!provider) {
41631
- throw new Error('No crypto provider is configured for signing');
41632
- }
41633
- this.crypto = provider;
41634
- const signingConfigOption = normalized.signingConfig;
41635
- if (signingConfigOption instanceof SigningConfig) {
41636
- this.signingConfig = signingConfigOption;
41637
- }
41638
- else if (signingConfigOption) {
41639
- this.signingConfig = new SigningConfig(signingConfigOption);
41640
- }
41641
- else {
41642
- this.signingConfig = new SigningConfig();
41643
- }
41644
- this.explicitPrivateKey = normalized.privateKeyPem;
41645
- this.explicitKeyId = normalized.keyId;
41646
- }
41647
- signEnvelope(envelope, { physicalPath }) {
41648
- if (!envelope.sid) {
41649
- throw new Error('Envelope missing sid');
41650
- }
41651
- const frame = envelope.frame;
41652
- if (frame.type === 'Data') {
41653
- const dataFrame = frame;
41654
- if (!dataFrame.pd) {
41655
- const payload = dataFrame.payload ?? '';
41656
- const payloadString = payload === '' ? '' : canonicalJson(payload);
41657
- dataFrame.pd = secureDigest(payloadString);
41658
- }
41659
- }
41660
- const digest = frameDigest(frame);
41661
- const immutable = canonicalJson(immutableHeaders(envelope));
41662
- const sidDigest = secureDigest(physicalPath);
41663
- const tbs = new Uint8Array(encodeUtf8(sidDigest).length +
41664
- 1 +
41665
- encodeUtf8(immutable).length +
41666
- 1 +
41667
- encodeUtf8(digest).length);
41668
- const sidBytes = encodeUtf8(sidDigest);
41669
- const immBytes = encodeUtf8(immutable);
41670
- const digBytes = encodeUtf8(digest);
41671
- let offset = 0;
41672
- tbs.set(sidBytes, offset);
41673
- offset += sidBytes.length;
41674
- tbs[offset] = 0x1f;
41675
- offset += 1;
41676
- tbs.set(immBytes, offset);
41677
- offset += immBytes.length;
41678
- tbs[offset] = 0x1f;
41679
- offset += 1;
41680
- tbs.set(digBytes, offset);
41681
- const privateKey = this.loadPrivateKey();
41682
- const signatureBytes = sign(tbs, privateKey);
41683
- const signature = urlsafeBase64Encode(signatureBytes);
41684
- const kid = this.determineKeyId();
41685
- const signatureHeader = {
41686
- kid,
41687
- val: signature,
41688
- alg: 'EdDSA',
41689
- };
41690
- const secHeader = envelope.sec ?? {};
41691
- secHeader.sig = signatureHeader;
41692
- envelope.sec = secHeader;
41693
- return envelope;
41694
- }
41695
- loadPrivateKey() {
41696
- const pem = this.explicitPrivateKey ??
41697
- readStringProperty(this.crypto, 'signingPrivatePem', 'signing_private_pem');
41698
- if (!pem) {
41699
- throw new Error('Crypto provider does not expose a signing private key');
41700
- }
41701
- return parseEd25519PrivateKey(pem);
41702
- }
41703
- determineKeyId() {
41704
- if (this.explicitKeyId) {
41705
- return this.explicitKeyId;
41706
- }
41707
- if (this.signingConfig.signingMaterial === SigningMaterial.X509_CHAIN) {
41708
- const certificateProvider = this
41709
- .crypto;
41710
- const jwk = certificateProvider.nodeJwk?.();
41711
- if (jwk && typeof jwk === 'object' && 'kid' in jwk && 'x5c' in jwk) {
41712
- const kid = jwk.kid;
41713
- if (typeof kid === 'string' && kid.length > 0) {
41714
- return kid;
41715
- }
41716
- }
41717
- }
41718
- const fallback = readStringProperty(this.crypto, 'signatureKeyId', 'signature_key_id');
41719
- if (!fallback) {
41720
- throw new Error('Crypto provider does not expose a signature key id');
41721
- }
41722
- return fallback;
41723
- }
41724
- }
41725
-
41726
- var eddsaEnvelopeSigner = /*#__PURE__*/Object.freeze({
41727
- __proto__: null,
41728
- EdDSAEnvelopeSigner: EdDSAEnvelopeSigner
41729
- });
41730
-
41731
41731
  async function loadPublicKey(jwk, signingConfig) {
41732
41732
  if (jwk.x5c) {
41733
41733
  if (signingConfig.signingMaterial !== SigningMaterial.X509_CHAIN) {
@@ -41965,4 +41965,4 @@ var websocketTransportProvisioner = /*#__PURE__*/Object.freeze({
41965
41965
  WebSocketTransportProvisionerFactory: WebSocketTransportProvisionerFactory
41966
41966
  });
41967
41967
 
41968
- 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$Z as DEFAULT_WELCOME_FACTORY_META, DefaultCryptoProvider, DefaultHttpServer, 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$2 as ENV_VAR_JWT_ALGORITHM, ENV_VAR_JWT_AUDIENCE$2 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, FAME_FABRIC_FACTORY_BASE_TYPE, 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, HttpListener, HttpStatelessConnector, INPAGE_CONNECTION_GRANT_TYPE, INPAGE_CONNECTOR_TYPE, InMemoryBinding, InMemoryFanoutBroker, InMemoryKeyValueStore, InMemoryReadWriteChannel, InMemoryStorageProvider, InPageConnector, InPageListener, InProcessFameFabric, InProcessFameFabricFactory, 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, QueueFullError, 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, SQLiteKeyValueStore, SQLiteStorageProvider, 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_LISTENER_FACTORY_BASE_TYPE, TRANSPORT_PROVISIONER_FACTORY_BASE_TYPE, TaskSpawner, TokenIssuerFactory, TokenProviderFactory, TokenVerifierFactory, TransportListener, TransportProvisionerFactory, TtlValidationError, UpstreamSessionManager, VALID_CURVES_BY_KTY, VALID_KEY_USES, VERSION, WEBSOCKET_CONNECTION_GRANT_TYPE, WELCOME_SERVICE_FACTORY_BASE_TYPE, WebSocketCloseCode, WebSocketConnector, WebSocketListener, WebSocketState, WelcomeServiceFactory, _NoopFlowController, __runtimePluginLoader, addEnvelopeFields, addLogLevel, addTimestamp, assertConnectionGrant, assertGrant, basicConfig, broadcastChannelGrantToConnectorConfig, camelToSnakeCase, canonicalJson, capitalizeFirstLetter, color, compareCryptoLevels, compiledPathPattern, consoleTransport, convertWildcardLogicalToDnsConstraint, createConnectorConfig, createEd25519Keypair, createHostLogicalUri, createJwksRouter, createLogicalUri, createNodeDeliveryContext, createApp as createOAuth2ServerApp, createOAuth2TokenRouter, createOpenIDConfigurationRouter, 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, getHttpListenerInstance, getInPageListenerInstance, getKeyProvider, getKeyStore, getLogger, getWebsocketListenerInstance, 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, normalizeExtendedFameConfig, 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, main as runOAuth2Server, 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 };
41968
+ 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$Z as DEFAULT_WELCOME_FACTORY_META, DefaultCryptoProvider, DefaultHttpServer, 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$2 as ENV_VAR_JWT_ALGORITHM, ENV_VAR_JWT_AUDIENCE$2 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, FAME_FABRIC_FACTORY_BASE_TYPE, 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, HttpListener, HttpStatelessConnector, INPAGE_CONNECTION_GRANT_TYPE, INPAGE_CONNECTOR_TYPE, InMemoryBinding, InMemoryFanoutBroker, InMemoryKeyValueStore, InMemoryReadWriteChannel, InMemoryStorageProvider, InPageConnector, InPageListener, InProcessFameFabric, InProcessFameFabricFactory, 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, QueueFullError, 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, SQLiteKeyValueStore, SQLiteStorageProvider, 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_LISTENER_FACTORY_BASE_TYPE, TRANSPORT_PROVISIONER_FACTORY_BASE_TYPE, TaskSpawner, TokenIssuerFactory, TokenProviderFactory, TokenVerifierFactory, TransportListener, TransportProvisionerFactory, TtlValidationError, UpstreamSessionManager, VALID_CURVES_BY_KTY, VALID_KEY_USES, VERSION, WEBSOCKET_CONNECTION_GRANT_TYPE, WELCOME_SERVICE_FACTORY_BASE_TYPE, WebSocketCloseCode, WebSocketConnector, WebSocketListener, WebSocketState, WelcomeServiceFactory, _NoopFlowController, __runtimePluginLoader, addEnvelopeFields, addLogLevel, addTimestamp, assertConnectionGrant, assertGrant, basicConfig, broadcastChannelGrantToConnectorConfig, camelToSnakeCase, canonicalJson, capitalizeFirstLetter, color, compareCryptoLevels, compiledPathPattern, consoleTransport, convertWildcardLogicalToDnsConstraint, createConnectorConfig, createEd25519Keypair, createHostLogicalUri, createJwksRouter, createLogicalUri, createNodeDeliveryContext, createApp as createOAuth2ServerApp, createOAuth2TokenRouter, createOpenIDConfigurationRouter, 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, getHttpListenerInstance, getInPageListenerInstance, getKeyProvider, getKeyStore, getLogger, getWebsocketListenerInstance, 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, normalizeExtendedFameConfig, 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, main as runOAuth2Server, 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 };