@ar.io/wayfinder-core 1.4.2 → 1.4.3

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/dist/client.d.ts CHANGED
@@ -15,7 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  import type { AoARIORead } from '@ar.io/sdk';
18
- import type { GatewaySelection, GatewaysProvider, Logger, RoutingOption, RoutingStrategy, VerificationOption, VerificationStrategy } from './types.js';
18
+ import type { GatewaySelection, GatewaysProvider, Logger, RoutingOption, RoutingStrategy, TelemetrySettings, VerificationOption, VerificationStrategy } from './types.js';
19
19
  import { Wayfinder } from './wayfinder.js';
20
20
  export interface CreateWayfinderClientOptions {
21
21
  /**
@@ -85,6 +85,11 @@ export interface CreateWayfinderClientOptions {
85
85
  * @default 'random'
86
86
  */
87
87
  fallbackStrategy?: RoutingOption;
88
+ /**
89
+ * Telemetry configuration for OpenTelemetry tracing
90
+ * @default { enabled: false }
91
+ */
92
+ telemetry?: TelemetrySettings;
88
93
  }
89
94
  /**
90
95
  * Helper function to construct a routing strategy
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAU7C,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,MAAM,EACN,aAAa,EACb,eAAe,EAGf,kBAAkB,EAClB,oBAAoB,EAErB,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAsB3C,MAAM,WAAW,4BAA4B;IAC3C;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;;OAGG;IACH,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAElC;;;;OAIG;IACH,gBAAgB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AE,UAAU,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;;OAGG;IACH,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAElC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAEpC;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAE3B;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IAEzC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAEpC;;;OAGG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAElC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAE5C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,aAAa,CAAC;IAEjC;;;OAGG;IACH,SAAS,CAAC,EAAE,iBAAiB,CAAC;CAC/B;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAC7B,UAAU,aAAa,EACvB,SAAS,GAAG,KACX,eAQF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAClC,UAAU,kBAAkB,EAC5B,SAAS,GAAG,KACX,oBAQF,CAAC;AAEF;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,GAAE,4BAAiC,GACzC,SAAS,CAoHX;AAED,eAAO,MAAM,eAAe,8BAAwB,CAAC"}
package/dist/client.js CHANGED
@@ -79,7 +79,7 @@ export const useVerificationStrategy = (strategy, config) => {
79
79
  * Uses static gateways by default. Provide an `ario` instance to use NetworkGatewaysProvider
80
80
  */
81
81
  export function createWayfinderClient(options = {}) {
82
- const { routing = 'random', verification = 'disabled', trustedGateways = ['https://permagate.io'], cache = false, gatewaySelection = 'top-ranked', logger, ario, gatewaysProvider: customGatewaysProvider, routingStrategy: customRoutingStrategy, verificationStrategy: customVerificationStrategy, preferredGateway = 'https://arweave.net', fallbackStrategy = 'random', } = options;
82
+ const { routing = 'random', verification = 'disabled', trustedGateways = ['https://permagate.io'], cache = false, gatewaySelection = 'top-ranked', logger, ario, gatewaysProvider: customGatewaysProvider, routingStrategy: customRoutingStrategy, verificationStrategy: customVerificationStrategy, preferredGateway = 'https://arweave.net', fallbackStrategy = 'random', telemetry, } = options;
83
83
  // Parse cache configuration
84
84
  const cacheEnabled = !!cache;
85
85
  const cacheTTLSeconds = typeof cache === 'object' ? cache.ttlSeconds : 300; // 5 minutes default
@@ -161,6 +161,7 @@ export function createWayfinderClient(options = {}) {
161
161
  routingSettings: {
162
162
  strategy: routingStrategy,
163
163
  },
164
+ telemetrySettings: telemetry,
164
165
  };
165
166
  // Only add verification settings if not disabled
166
167
  if (verificationEnabled && verificationStrategy) {
package/dist/version.d.ts CHANGED
@@ -14,5 +14,5 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- export declare const WAYFINDER_CORE_VERSION = "v1.4.2";
17
+ export declare const WAYFINDER_CORE_VERSION = "v1.4.3";
18
18
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -14,4 +14,4 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- export const WAYFINDER_CORE_VERSION = 'v1.4.2';
17
+ export const WAYFINDER_CORE_VERSION = 'v1.4.3';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/wayfinder-core",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "WayFinder core library for intelligently routing to optimal AR.IO gateways",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",