@ar.io/wayfinder-core 1.7.1-alpha.1 → 1.7.1

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
@@ -431,10 +431,12 @@ const wayfinder = new Wayfinder({
431
431
  Wayfinder can be configured to work with the [x402 payment protocol](https://docs.ar.io/learn/gateways/x402-payments#what-is-x402) for paid gateway services and higher rate limits. This allows you to seamlessly make requests that may require payment without having to manually handle payment flows.
432
432
 
433
433
  > [!IMPORTANT]
434
- > To use x402 payments, you need to install the `@ar.io/wayfinder-x402-fetch` package.
434
+ > To get started, install the `@ar.io/wayfinder-x402-fetch` package.
435
+
436
+ The `@ar.io/wayfinder-x402-fetch` package is a simple wrapper of the [x402-fetch](https://github.com/coinbase/x402/tree/1d4c253aef959b73b46d42e7f0ccf30c7ce64955/typescript/packages/x402-fetch) library, which creates a fetch implementation to automatically handles x402 payment flows. You can use this fetch implementation with Wayfinder to enable x402 payments for your requests.
435
437
 
436
438
  ```javascript
437
- import { createWayfinderClient } from '@ar.io/wayfinder-core';
439
+ import { createWayfinderClient, StaticRoutingStrategy } from '@ar.io/wayfinder-core';
438
440
  import { createX402Fetch } from '@ar.io/wayfinder-x402-fetch';
439
441
  import { privateKeyToAccount } from 'viem/accounts';
440
442
 
@@ -447,7 +449,7 @@ const x402Fetch = createX402Fetch({
447
449
  walletClient: account,
448
450
  });
449
451
 
450
- // Create Wayfinder client with x402 fetch
452
+ // Create Wayfinder client with x402 fetch to handle payments
451
453
  const wayfinder = createWayfinderClient({
452
454
  fetch: x402Fetch,
453
455
  routingSettings: {
package/dist/index.d.ts CHANGED
@@ -26,6 +26,7 @@ export * from './gateways/network.js';
26
26
  export * from './gateways/simple-cache.js';
27
27
  export * from './gateways/static.js';
28
28
  export * from './gateways/local-storage-cache.js';
29
+ export * from './gateways/trusted-peers.js';
29
30
  export * from './verification/data-root-verification.js';
30
31
  export * from './verification/hash-verification.js';
31
32
  export * from './verification/signature-verification.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,cAAc,YAAY,CAAC;AAG3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sCAAsC,CAAC;AACrD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AAGvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAGlD,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0CAA0C,CAAC;AACzD,cAAc,uCAAuC,CAAC;AAGtD,cAAc,cAAc,CAAC;AAG7B,cAAc,aAAa,CAAC;AAG5B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,cAAc,YAAY,CAAC;AAG3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sCAAsC,CAAC;AACrD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AAGvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAG5C,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0CAA0C,CAAC;AACzD,cAAc,uCAAuC,CAAC;AAGtD,cAAc,cAAc,CAAC;AAG7B,cAAc,aAAa,CAAC;AAG5B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
package/dist/index.js CHANGED
@@ -29,6 +29,7 @@ export * from './gateways/network.js';
29
29
  export * from './gateways/simple-cache.js';
30
30
  export * from './gateways/static.js';
31
31
  export * from './gateways/local-storage-cache.js';
32
+ export * from './gateways/trusted-peers.js';
32
33
  // verification strategies
33
34
  export * from './verification/data-root-verification.js';
34
35
  export * from './verification/hash-verification.js';
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.7.1-alpha.1";
17
+ export declare const WAYFINDER_CORE_VERSION = "v1.7.1";
18
18
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,sBAAsB,mBAAmB,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,sBAAsB,WAAW,CAAC"}
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.7.1-alpha.1';
17
+ export const WAYFINDER_CORE_VERSION = 'v1.7.1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/wayfinder-core",
3
- "version": "1.7.1-alpha.1",
3
+ "version": "1.7.1",
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",