@t2000/sdk 0.10.4 → 0.11.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 +14 -0
- package/dist/adapters/index.cjs.map +1 -1
- package/dist/adapters/index.js.map +1 -1
- package/dist/index.cjs +184 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +61 -3
- package/dist/index.d.ts +61 -3
- package/dist/index.js +182 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -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
|