@tanakayuto/intmax402-client 0.2.2 → 0.3.0
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 +23 -1
- package/dist/client.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
|
-
# @intmax402
|
|
1
|
+
# @tanakayuto/intmax402-client
|
|
2
2
|
|
|
3
3
|
Part of [intmax402](https://github.com/zaq2989/intmax402) — HTTP 402, reimagined for AI agents.
|
|
4
4
|
|
|
5
5
|
See [main README](https://github.com/zaq2989/intmax402) for full documentation.
|
|
6
|
+
|
|
7
|
+
## Network
|
|
8
|
+
|
|
9
|
+
By default, the client connects to **Ethereum mainnet** via INTMAX ZK L2 (Scroll).
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { INTMAX402Client } from '@tanakayuto/intmax402-client'
|
|
13
|
+
|
|
14
|
+
// Mainnet (default)
|
|
15
|
+
const client = new INTMAX402Client({ privateKey: process.env.ETH_PRIVATE_KEY! })
|
|
16
|
+
|
|
17
|
+
// Testnet (for development)
|
|
18
|
+
const testClient = new INTMAX402Client({
|
|
19
|
+
privateKey: process.env.ETH_PRIVATE_KEY!,
|
|
20
|
+
environment: 'testnet',
|
|
21
|
+
})
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
| Environment | Network | RPC |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| `mainnet` (default) | Ethereum mainnet + Scroll | `https://api.rpc.intmax.io?network=ethereum` |
|
|
27
|
+
| `testnet` | Sepolia + Scroll Sepolia | `https://sepolia.gateway.tenderly.co` |
|
package/dist/client.js
CHANGED
|
@@ -19,7 +19,7 @@ class INTMAX402Client {
|
|
|
19
19
|
throw new Error("Invalid private key: must be a 32-byte hex string (0x-prefixed)");
|
|
20
20
|
}
|
|
21
21
|
this.wallet = new ethers_1.ethers.Wallet(options.privateKey);
|
|
22
|
-
this.environment = options.environment || "
|
|
22
|
+
this.environment = options.environment || "mainnet";
|
|
23
23
|
}
|
|
24
24
|
async init() {
|
|
25
25
|
this.initialized = true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanakayuto/intmax402-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"typecheck": "tsc --noEmit"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@tanakayuto/intmax402-core": "^0.
|
|
12
|
+
"@tanakayuto/intmax402-core": "^0.3.0",
|
|
13
13
|
"ethers": "^6.0.0",
|
|
14
14
|
"intmax2-server-sdk": "^1.5.2"
|
|
15
15
|
},
|