@@ -23,68 +23,215 @@ NFT: `AgentIdentity` / `AGENT`. Agent ID starts from 0. Same addresses on mainne
2323
2424## Read-only Queries
2525
26+ ### registry — Contract info
27+
28+ ``` bash
29+ morph-agent agentpay identity registry [--hoodi]
30+ ```
31+
32+ Returns: name, symbol, version, owner.
33+
34+ ### info — Agent info by ID
35+
36+ ``` bash
37+ morph-agent agentpay identity info --agent-id < id> [--hoodi]
38+ ```
39+
40+ | Parameter | Required | Description |
41+ | -----------| ----------| -------------|
42+ | ` --agent-id <id> ` | Yes | Agent ID (uint256, starts from 0) |
43+
44+ Returns: owner address, URI, bound wallet address.
45+
46+ ### balance — Agent count by address
47+
48+ ``` bash
49+ morph-agent agentpay identity balance -a < address> [--hoodi]
50+ ```
51+
52+ | Parameter | Required | Description |
53+ | -----------| ----------| -------------|
54+ | ` -a, --address <address> ` | Yes | Owner address to query |
55+
56+ ### total — Total registered agents
57+
58+ ``` bash
59+ morph-agent agentpay identity total [--hoodi]
60+ ```
61+
62+ ### metadata — Read agent metadata
63+
64+ ``` bash
65+ morph-agent agentpay identity metadata --agent-id < id> --key < key> [--hoodi]
66+ ```
67+
68+ | Parameter | Required | Description |
69+ | -----------| ----------| -------------|
70+ | ` --agent-id <id> ` | Yes | Agent ID |
71+ | ` --key <key> ` | Yes | Metadata key. Common keys: ` name ` , ` description ` , ` endpoint ` |
72+
73+ ### reputation — Reputation summary
74+
75+ ``` bash
76+ morph-agent agentpay identity reputation --agent-id < id> [--hoodi]
77+ ```
78+
79+ | Parameter | Required | Description |
80+ | -----------| ----------| -------------|
81+ | ` --agent-id <id> ` | Yes | Agent ID |
82+
83+ Returns: feedback count, total score, unique clients.
84+
85+ ### read-feedback — Single feedback entry
86+
87+ ``` bash
88+ morph-agent agentpay identity read-feedback --agent-id < id> --client < addr> --index < n> [--hoodi]
89+ ```
90+
91+ | Parameter | Required | Description |
92+ | -----------| ----------| -------------|
93+ | ` --agent-id <id> ` | Yes | Agent ID |
94+ | ` --client <address> ` | Yes | Address of the client who gave feedback |
95+ | ` --index <n> ` | Yes | Feedback index (starts from 1) |
96+
97+ ### reviews — All feedback for an agent
98+
2699``` bash
27- morph-agent agentpay identity registry [--hoodi] # Contract info
28- morph-agent agentpay identity info --agent-id < id> [--hoodi] # Agent info
29- morph-agent agentpay identity balance -a < address> [--hoodi] # Agent count
30- morph-agent agentpay identity metadata --agent-id < id> --key < key> [--hoodi] # Metadata
31- morph-agent agentpay identity reputation --agent-id < id> [--hoodi] # Reputation
32- morph-agent agentpay identity read-feedback --agent-id < id> --client < addr> --index < n> # Single feedback
33- morph-agent agentpay identity reviews --agent-id < id> [--include-revoked] # All feedback
100+ morph-agent agentpay identity reviews --agent-id < id> [--include-revoked] [--hoodi]
34101```
35102
103+ | Parameter | Required | Description |
104+ | -----------| ----------| -------------|
105+ | ` --agent-id <id> ` | Yes | Agent ID |
106+ | ` --include-revoked ` | No | Include revoked feedback entries |
107+
36108## Identity Management (broadcasts by default)
37109
110+ ### register — Register new agent (mint NFT)
111+
38112``` bash
39- # Register new Agent (mints NFT)
40- morph-agent agentpay identity register [-w < wallet> ] [--uri < url> ] [--dry-run]
113+ morph-agent agentpay identity register [-w < wallet> ] [--uri < url> ] [--dry-run] [--hoodi]
114+ ```
115+
116+ | Parameter | Required | Description |
117+ | -----------| ----------| -------------|
118+ | ` -w <wallet> ` / ` --sl <name> ` | No | Wallet (default: default wallet) |
119+ | ` --uri <url> ` | No | Agent metadata URI (e.g. ` https://example.com/agent.json ` ) |
120+
121+ ### set-metadata — Set metadata key-value
122+
123+ ``` bash
124+ morph-agent agentpay identity set-metadata [-w < wallet> ] --agent-id < id> --key < key> --value < value> [--dry-run] [--hoodi]
125+ ```
126+
127+ | Parameter | Required | Description |
128+ | -----------| ----------| -------------|
129+ | ` --agent-id <id> ` | Yes | Agent ID (must be owned by caller) |
130+ | ` --key <key> ` | Yes | Metadata key. Common keys: ` name ` , ` description ` , ` endpoint ` |
131+ | ` --value <value> ` | Yes | Metadata value (string) |
132+
133+ ### set-uri — Set agent URI
134+
135+ ``` bash
136+ morph-agent agentpay identity set-uri [-w < wallet> ] --agent-id < id> --uri < uri> [--dry-run] [--hoodi]
137+ ```
138+
139+ | Parameter | Required | Description |
140+ | -----------| ----------| -------------|
141+ | ` --agent-id <id> ` | Yes | Agent ID (must be owned by caller) |
142+ | ` --uri <uri> ` | Yes | New metadata URI |
41143
42- # Set metadata
43- morph-agent agentpay identity set-metadata [-w < wallet> ] --agent-id < id> --key < key> --value < value> [--dry-run]
144+ ### set-wallet — Bind operational wallet
44145
45- # Set Agent URI
46- morph-agent agentpay identity set-uri [-w < wallet> ] --agent-id < id> --uri < uri> [--dry-run]
146+ ``` bash
147+ morph-agent agentpay identity set-wallet [-w < wallet> ] --agent-id < id> --new-wallet < addr> --signature < hex> [--deadline < ts> ] [--dry-run] [--hoodi]
148+ ```
149+
150+ | Parameter | Required | Description |
151+ | -----------| ----------| -------------|
152+ | ` --agent-id <id> ` | Yes | Agent ID (must be owned by caller) |
153+ | ` --new-wallet <address> ` | Yes | New wallet address to bind |
154+ | ` --signature <hex> ` | Yes | EIP-712 signature from ` --new-wallet ` (prevents unauthorized binding) |
155+ | ` --deadline <timestamp> ` | No | Signature expiry (unix timestamp, default: now + 1 hour) |
47156
48- # Bind operational wallet (requires EIP-712 signature from new wallet)
49- morph-agent agentpay identity set-wallet [-w < wallet> ] --agent-id < id> --new-wallet < addr> --signature < hex> [--dry-run]
157+ ### unset-wallet — Unbind operational wallet
50158
51- # Unbind operational wallet
52- morph-agent agentpay identity unset-wallet [-w < wallet> ] --agent-id < id> [--dry-run]
159+ ``` bash
160+ morph-agent agentpay identity unset-wallet [-w < wallet> ] --agent-id < id> [--dry-run] [--hoodi]
53161```
54162
163+ | Parameter | Required | Description |
164+ | -----------| ----------| -------------|
165+ | ` --agent-id <id> ` | Yes | Agent ID (must be owned by caller) |
166+
55167## Reputation Operations (broadcasts by default)
56168
169+ ### feedback — Submit feedback
170+
57171``` bash
58- # Submit feedback
59- morph-agent agentpay identity feedback [-w < wallet > ] --agent-id < id > --value < n > [--tag1 < tag > ] [--tag2 < tag > ] [--dry-run]
172+ morph-agent agentpay identity feedback [-w < wallet > ] --agent-id < id > --value < n > [--tag1 < tag > ] [--tag2 < tag > ] [--endpoint < url > ] [--feedback-uri < uri > ] [--dry-run] [--hoodi]
173+ ```
60174
61- # Revoke feedback (index starts from 1)
62- morph-agent agentpay identity revoke-feedback [-w < wallet> ] --agent-id < id> --index < n> [--dry-run]
175+ | Parameter | Required | Description |
176+ | -----------| ----------| -------------|
177+ | ` --agent-id <id> ` | Yes | Agent ID to rate |
178+ | ` --value <n> ` | Yes | Feedback score (positive = good, negative = bad, integer) |
179+ | ` --tag1 <tag> ` | No | Category tag (e.g. ` quality ` , ` speed ` , ` accuracy ` ) |
180+ | ` --tag2 <tag> ` | No | Sub-category tag |
181+ | ` --endpoint <url> ` | No | Endpoint being rated |
182+ | ` --feedback-uri <uri> ` | No | Off-chain detailed feedback URI |
63183
64- # Append response to feedback
65- morph-agent agentpay identity append-response [-w < wallet> ] --agent-id < id> --client < addr> --index < n> --response-uri < uri> [--dry-run]
184+ ### revoke-feedback — Revoke your own feedback
185+
186+ ``` bash
187+ morph-agent agentpay identity revoke-feedback [-w < wallet> ] --agent-id < id> --index < n> [--dry-run] [--hoodi]
66188```
67189
190+ | Parameter | Required | Description |
191+ | -----------| ----------| -------------|
192+ | ` --agent-id <id> ` | Yes | Agent ID |
193+ | ` --index <n> ` | Yes | Feedback index to revoke (starts from 1) |
194+
195+ ### append-response — Respond to feedback
196+
197+ ``` bash
198+ morph-agent agentpay identity append-response [-w < wallet> ] --agent-id < id> --client < addr> --index < n> --response-uri < uri> [--dry-run] [--hoodi]
199+ ```
200+
201+ | Parameter | Required | Description |
202+ | -----------| ----------| -------------|
203+ | ` --agent-id <id> ` | Yes | Agent ID |
204+ | ` --client <address> ` | Yes | Client address who gave the feedback |
205+ | ` --index <n> ` | Yes | Feedback index |
206+ | ` --response-uri <uri> ` | Yes | Response URI (off-chain content link) |
207+
68208## Typical Workflows
69209
70210### Register Agent + Set Metadata
71211
72212``` bash
73- morph-agent agentpay identity register -w owner --uri " https://example.com/agent.json" morph-agent agentpay identity set-metadata -w owner --agent-id 1 --key name --value " MyAgent" morph-agent agentpay identity set-metadata -w owner --agent-id 1 --key endpoint --value " https://api.myagent.com" ` ` `
213+ morph-agent agentpay identity register -w owner --uri " https://example.com/agent.json"
214+ morph-agent agentpay identity set-metadata -w owner --agent-id 1 --key name --value " MyAgent"
215+ morph-agent agentpay identity set-metadata -w owner --agent-id 1 --key endpoint --value " https://api.myagent.com"
216+ ```
74217
75218### Feedback Cycle
76219
77220``` bash
78- morph-agent agentpay identity feedback -w user --agent-id 1 --value 100 --tag1 qualitymorph-agent agentpay identity reviews --agent-id 1
221+ morph-agent agentpay identity feedback -w user --agent-id 1 --value 100 --tag1 quality
222+ morph-agent agentpay identity reviews --agent-id 1
79223morph-agent agentpay identity reputation --agent-id 1
80224```
81225
82226## Transaction Mode Options
83227
228+ All write commands support these additional flags:
229+
84230| Option | Description |
85231| --------| -------------|
86232| ` --altfee <id> ` | Pay gas with ERC-20 (tx type 0x7f). IDs: 4=BGB, 5=USDT, 6=USDC |
87233| ` --eip7702 ` | EIP-7702 delegation (tx type 0x04) |
234+ | ` --dry-run ` | Preview transaction without sending |
88235
89236## Safety
90237
0 commit comments