@t2000/sdk 0.10.4 → 0.11.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.
package/README.md CHANGED
@@ -5,7 +5,7 @@ The complete TypeScript SDK for AI agent bank accounts on Sui. Send USDC, earn y
5
5
  [![npm](https://img.shields.io/npm/v/@t2000/sdk)](https://www.npmjs.com/package/@t2000/sdk)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
7
7
 
8
- **[Website](https://t2000.ai)** · **[GitHub](https://github.com/mission69b/t2000)** · **[CLI](https://www.npmjs.com/package/@t2000/cli)** · **[x402](https://www.npmjs.com/package/@t2000/x402)**
8
+ **[Website](https://t2000.ai)** · **[GitHub](https://github.com/mission69b/t2000)** · **[CLI](https://www.npmjs.com/package/@t2000/cli)** · **[x402](https://www.npmjs.com/package/@t2000/x402)** · **[MCP](https://www.npmjs.com/package/@t2000/mcp)**
9
9
 
10
10
  ## Installation
11
11
 
@@ -129,6 +129,20 @@ const agent = T2000.fromPrivateKey('suiprivkey1q...');
129
129
  | `agent.sentinelInfo(id)` | Get sentinel details (from API or on-chain) | `SentinelAgent` |
130
130
  | `agent.sentinelAttack(id, prompt, fee?)` | Full attack flow: request → TEE → settle | `SentinelAttackResult` |
131
131
 
132
+ ### Safeguards (Enforcer)
133
+
134
+ | Method | Description | Returns |
135
+ |--------|-------------|---------|
136
+ | `agent.enforcer.getConfig()` | Get safeguard settings | `SafeguardConfig` |
137
+ | `agent.enforcer.set({ maxPerTx?, maxDailySend? })` | Set per-transaction and/or daily send limits | `void` |
138
+ | `agent.enforcer.lock()` | Lock agent (freeze all operations) | `void` |
139
+ | `agent.enforcer.unlock(pin)` | Unlock agent | `void` |
140
+ | `agent.enforcer.check(amount)` | Check if amount is allowed under limits | `void` (throws `SafeguardError` if not) |
141
+ | `agent.enforcer.recordUsage(amount)` | Record send for daily limit tracking | `void` |
142
+ | `agent.enforcer.isConfigured()` | Whether safeguards are set up | `boolean` |
143
+
144
+ **Types:** `SafeguardConfig` — `{ maxPerTx?, maxDailySend?, locked? }` · `SafeguardError` — thrown when limits exceeded or agent locked
145
+
132
146
  ### Key Management
133
147
 
134
148
  ```typescript
@@ -321,6 +335,10 @@ pnpm --filter @t2000/sdk test
321
335
 
322
336
  Fees are collected by the t2000 protocol treasury on-chain.
323
337
 
338
+ ## MCP Server
339
+
340
+ The SDK powers the [`@t2000/mcp`](https://www.npmjs.com/package/@t2000/mcp) server — 16 tools and 3 prompts for Claude Desktop, Cursor, and any MCP-compatible AI platform. Run `t2000 mcp` to start.
341
+
324
342
  ## License
325
343
 
326
344
  MIT — see [LICENSE](https://github.com/mission69b/t2000/blob/main/LICENSE)