@obul.ai/obulx-x402 0.2.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.
Files changed (2) hide show
  1. package/README.md +23 -0
  2. package/package.json +31 -0
package/README.md ADDED
@@ -0,0 +1,23 @@
1
+ # @obul.ai/obulx-x402
2
+
3
+ Direct x402 support for `@obul.ai/obulx`.
4
+
5
+ Install this only if you need direct x402 mode (non-proxy). The `@obul.ai/obulx` CLI will auto-detect and load this package when `--network` is used.
6
+
7
+ ## Install
8
+ ```bash
9
+ npm install -g @obul.ai/obulx-x402
10
+ ```
11
+
12
+ ## Library
13
+ ```ts
14
+ import { obulxFetchDirect } from "@obul.ai/obulx-x402"
15
+
16
+ await obulxFetchDirect({
17
+ url: "https://x402.example.com/resource",
18
+ method: "GET",
19
+ networks: ["base"],
20
+ autoApproveLimit: "1000",
21
+ privateKey: process.env.OBUL_X402_PRIVATE_KEY
22
+ })
23
+ ```
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@obul.ai/obulx-x402",
3
+ "version": "0.2.1",
4
+ "description": "Direct x402 support for obulx.",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist",
16
+ "README.md"
17
+ ],
18
+ "sideEffects": false,
19
+ "scripts": {
20
+ "build": "tsc -p tsconfig.json",
21
+ "typecheck": "tsc -p tsconfig.json --noEmit"
22
+ },
23
+ "dependencies": {
24
+ "@obul.ai/obulx": "0.2.0",
25
+ "x402-fetch": "^0.6.6",
26
+ "viem": "^2.21.26"
27
+ },
28
+ "devDependencies": {
29
+ "@types/node": "^20.11.30"
30
+ }
31
+ }