@agether/openclaw-plugin 1.1.0 → 1.1.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 +52 -18
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,27 +2,34 @@
2
2
 
3
3
  OpenClaw plugin for **Agether** — on-chain credit protocol for AI agents on Base.
4
4
 
5
+ ## Prerequisites
6
+
7
+ - [OpenClaw](https://docs.openclaw.ai) installed and running (`npm i -g openclaw`)
8
+ - A Telegram bot connected (or any other OpenClaw channel)
9
+ - A wallet private key with some ETH on **Base** (chain 8453) for gas
10
+
5
11
  ## Install
6
12
 
7
13
  ```bash
8
- openclaw plugin install @agether/openclaw-plugin
14
+ openclaw plugins install @agether/openclaw-plugin
9
15
  ```
10
16
 
11
17
  ## Configure
12
18
 
13
- Add your private key to the plugin config (OpenClaw will prompt on first use, or set it manually):
19
+ Edit `~/.openclaw/openclaw.json` and add the `agether` entry under `plugins.entries`:
14
20
 
15
21
  ```jsonc
16
- // ~/.openclaw/config.json
22
+ // ~/.openclaw/openclaw.json
17
23
  {
18
24
  "plugins": {
19
25
  "entries": {
20
26
  "agether": {
27
+ "enabled": true,
21
28
  "config": {
22
29
  "privateKey": "0x...", // required — your wallet PK
23
- "agentId": "17676", // optional — set after registration
24
- "rpcUrl": "https://base-rpc.publicnode.com", // optional
25
- "backendUrl": "http://95.179.189.214:3001" // optional
30
+ "rpcUrl": "https://base-rpc.publicnode.com", // optional (default)
31
+ "backendUrl": "http://95.179.189.214:3001", // optional (default)
32
+ "autoDraw": false // optional — auto-borrow for x402 payments
26
33
  }
27
34
  }
28
35
  }
@@ -30,8 +37,22 @@ Add your private key to the plugin config (OpenClaw will prompt on first use, or
30
37
  }
31
38
  ```
32
39
 
40
+ Then restart the gateway:
41
+
42
+ ```bash
43
+ openclaw gateway --force
44
+ ```
45
+
33
46
  > ⚠️ **Never share your private key.** The `privateKey` field is marked as sensitive in the plugin manifest.
34
47
 
48
+ ## Verify
49
+
50
+ ```bash
51
+ openclaw plugins list
52
+ ```
53
+
54
+ You should see `Agether Credit` with status `loaded`.
55
+
35
56
  ## Tools
36
57
 
37
58
  Once installed, the following tools are available to your AI agent:
@@ -43,13 +64,15 @@ Once installed, the following tools are available to your AI agent:
43
64
  | `agether_score` | Get Bayesian credit score with 5-factor breakdown |
44
65
  | `morpho_status` | Show all Morpho credit positions |
45
66
  | `morpho_deposit` | Deposit collateral (WETH, wstETH, cbETH) |
67
+ | `morpho_deposit_and_borrow` | Deposit collateral + borrow USDC in one step |
68
+ | `morpho_sponsor` | Human deposits collateral for an agent (by ID or address) |
46
69
  | `morpho_borrow` | Borrow USDC against deposited collateral |
47
70
  | `morpho_repay` | Repay USDC debt |
48
71
  | `morpho_withdraw` | Withdraw collateral back to EOA |
49
72
  | `morpho_compare` | Compare collateral options with current prices |
50
73
  | `morpho_markets` | List supported Morpho Blue markets |
51
74
  | `wallet_fund` | Transfer USDC from EOA into AgentAccount |
52
- | `x402_pay` | Make paid API calls via x402 protocol |
75
+ | `x402_pay` | Make paid API calls via x402 protocol (supports auto-draw) |
53
76
 
54
77
  ## Commands
55
78
 
@@ -60,22 +83,33 @@ Quick commands that run without AI:
60
83
 
61
84
  ## Quick Start
62
85
 
63
- 1. Install the plugin
64
- 2. Set your private key in config
65
- 3. Ask your agent: *"Register me as an agent on Agether"*
66
- 4. Fund with ETH (for gas) and collateral (WETH/wstETH/cbETH)
67
- 5. Ask: *"Deposit 0.05 WETH and borrow $50 USDC"*
86
+ 1. Install the plugin: `openclaw plugins install @agether/openclaw-plugin`
87
+ 2. Add config to `~/.openclaw/openclaw.json` (see above)
88
+ 3. Restart: `openclaw gateway --force`
89
+ 4. Open Telegram and send to your bot: *"What is my balance?"*
90
+ 5. Ask: *"Register me as an agent on Agether"*
91
+ 6. Fund your wallet with ETH (for gas) and WETH/wstETH/cbETH (for collateral)
92
+ 7. Ask: *"Deposit 0.05 WETH and borrow $50 USDC"*
93
+
94
+ ## Getting Collateral on Base
95
+
96
+ - **ETH**: Bridge from Ethereum via [Base Bridge](https://bridge.base.org) or buy on any exchange that supports Base
97
+ - **WETH**: Wrap ETH on [Uniswap](https://app.uniswap.org) (Base) or use `weth.deposit()` directly
98
+ - **wstETH / cbETH**: Swap on [Uniswap](https://app.uniswap.org) or bridge from Ethereum
68
99
 
69
- ## Requirements
100
+ ## Config Options
70
101
 
71
- - Wallet with ETH on **Base** (chain 8453) for gas
72
- - Collateral tokens (WETH, wstETH, or cbETH) for Morpho credit
73
- - Backend running at the configured `backendUrl`
102
+ | Option | Required | Default | Description |
103
+ |---|---|---|---|
104
+ | `privateKey` | | | Wallet private key for signing transactions |
105
+ | `rpcUrl` | — | `https://base-rpc.publicnode.com` | Base RPC endpoint |
106
+ | `backendUrl` | — | `http://95.179.189.214:3001` | Agether backend API |
107
+ | `autoDraw` | — | `false` | Auto-borrow from credit line when USDC is insufficient for x402 payments |
74
108
 
75
109
  ## Links
76
110
 
77
- - [Agether SDK](https://www.npmjs.com/package/@agether/sdk)
78
- - [ERC-8004 Standard](https://eips.ethereum.org/EIPS/eip-8004)
111
+ - [Agether SDK](https://www.npmjs.com/package/@agether/sdk) — CLI + TypeScript clients
112
+ - [ERC-8004 Standard](https://eips.ethereum.org/EIPS/eip-8004) — Agent Identity
79
113
 
80
114
  ## License
81
115
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agether/openclaw-plugin",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "OpenClaw plugin for Agether — on-chain credit for AI agents",
5
5
  "main": "src/index.ts",
6
6
  "openclaw": {