@ton-agent-kit/plugin-identity 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 +64 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,64 @@
1
+ # @ton-agent-kit/plugin-identity
2
+
3
+ Identity plugin for on-chain agent registration, discovery, and reputation management on TON. Agents can register themselves, discover other agents by capability, and query reputation scores backed by a Tact smart contract.
4
+
5
+ Part of [TON Agent Kit](https://github.com/Andy00L/ton-agent-kit).
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @ton-agent-kit/plugin-identity @ton-agent-kit/core zod
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```typescript
16
+ import { TonAgentKit, KeypairWallet } from "@ton-agent-kit/core";
17
+ import IdentityPlugin from "@ton-agent-kit/plugin-identity";
18
+
19
+ const agent = new TonAgentKit(wallet).use(IdentityPlugin);
20
+
21
+ // Register the agent on-chain
22
+ await agent.runAction("register_agent", {
23
+ name: "my-agent",
24
+ services: ["swap", "analytics"],
25
+ });
26
+
27
+ // Discover other agents
28
+ const agents = await agent.runAction("discover_agent", {
29
+ service: "swap",
30
+ });
31
+
32
+ // Check reputation
33
+ const rep = await agent.runAction("get_agent_reputation", {
34
+ agentAddress: "EQBx...",
35
+ });
36
+ console.log(rep.score);
37
+ ```
38
+
39
+ ## Actions
40
+
41
+ | Action | Description |
42
+ |---|---|
43
+ | `register_agent` | Register the current agent on-chain with metadata. |
44
+ | `discover_agent` | Discover registered agents, optionally filtered by service. |
45
+ | `get_agent_reputation` | Query an agent's on-chain reputation score. |
46
+ | `deploy_reputation_contract` | Deploy a new Reputation smart contract. |
47
+ | `withdraw_reputation_fees` | Withdraw accumulated fees from the Reputation contract. |
48
+ | `process_pending_ratings` | Process queued ratings into finalized scores. |
49
+ | `get_open_disputes` | List currently open reputation disputes. |
50
+ | `trigger_cleanup` | Trigger cleanup of expired or stale agent registrations. |
51
+ | `get_agent_cleanup_info` | Get cleanup eligibility info for an agent. |
52
+
53
+ ## Documentation
54
+
55
+ See [docs/reputation-system.md](https://github.com/Andy00L/ton-agent-kit/blob/main/docs/reputation-system.md) for the full reputation system design.
56
+
57
+ ## Links
58
+
59
+ - [GitHub](https://github.com/Andy00L/ton-agent-kit)
60
+ - [npm](https://www.npmjs.com/package/@ton-agent-kit/plugin-identity)
61
+
62
+ ## License
63
+
64
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ton-agent-kit/plugin-identity",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Identity plugin for TON Agent Kit — agent registry, discovery, and reputation",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",