@aibtc/mcp-server 1.40.0 → 1.41.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.
Files changed (51) hide show
  1. package/dist/services/credentials.d.ts +31 -0
  2. package/dist/services/credentials.d.ts.map +1 -0
  3. package/dist/services/credentials.js +162 -0
  4. package/dist/services/credentials.js.map +1 -0
  5. package/dist/services/erc8004.service.d.ts +28 -0
  6. package/dist/services/erc8004.service.d.ts.map +1 -1
  7. package/dist/services/erc8004.service.js +115 -0
  8. package/dist/services/erc8004.service.js.map +1 -1
  9. package/dist/services/unisat-indexer.d.ts +97 -0
  10. package/dist/services/unisat-indexer.d.ts.map +1 -0
  11. package/dist/services/unisat-indexer.js +178 -0
  12. package/dist/services/unisat-indexer.js.map +1 -0
  13. package/dist/tools/bounty-scanner.tools.d.ts +29 -0
  14. package/dist/tools/bounty-scanner.tools.d.ts.map +1 -0
  15. package/dist/tools/bounty-scanner.tools.js +405 -0
  16. package/dist/tools/bounty-scanner.tools.js.map +1 -0
  17. package/dist/tools/credentials.tools.d.ts +9 -0
  18. package/dist/tools/credentials.tools.d.ts.map +1 -0
  19. package/dist/tools/credentials.tools.js +151 -0
  20. package/dist/tools/credentials.tools.js.map +1 -0
  21. package/dist/tools/identity.tools.d.ts +22 -0
  22. package/dist/tools/identity.tools.d.ts.map +1 -0
  23. package/dist/tools/identity.tools.js +404 -0
  24. package/dist/tools/identity.tools.js.map +1 -0
  25. package/dist/tools/index.d.ts.map +1 -1
  26. package/dist/tools/index.js +15 -0
  27. package/dist/tools/index.js.map +1 -1
  28. package/dist/tools/runes.tools.d.ts +25 -0
  29. package/dist/tools/runes.tools.d.ts.map +1 -0
  30. package/dist/tools/runes.tools.js +464 -0
  31. package/dist/tools/runes.tools.js.map +1 -0
  32. package/dist/tools/skill-mappings.d.ts.map +1 -1
  33. package/dist/tools/skill-mappings.js +40 -0
  34. package/dist/tools/skill-mappings.js.map +1 -1
  35. package/dist/tools/souldinals.tools.d.ts +18 -0
  36. package/dist/tools/souldinals.tools.d.ts.map +1 -0
  37. package/dist/tools/souldinals.tools.js +551 -0
  38. package/dist/tools/souldinals.tools.js.map +1 -0
  39. package/dist/tools/stacking-lottery.tools.d.ts.map +1 -1
  40. package/dist/tools/stacking-lottery.tools.js +7 -4
  41. package/dist/tools/stacking-lottery.tools.js.map +1 -1
  42. package/dist/transactions/rune-transfer-builder.d.ts +46 -0
  43. package/dist/transactions/rune-transfer-builder.d.ts.map +1 -0
  44. package/dist/transactions/rune-transfer-builder.js +130 -0
  45. package/dist/transactions/rune-transfer-builder.js.map +1 -0
  46. package/dist/transactions/runestone-builder.d.ts +40 -0
  47. package/dist/transactions/runestone-builder.d.ts.map +1 -0
  48. package/dist/transactions/runestone-builder.js +76 -0
  49. package/dist/transactions/runestone-builder.js.map +1 -0
  50. package/package.json +1 -1
  51. package/skill/SKILL.md +1 -1
@@ -0,0 +1,151 @@
1
+ import { z } from "zod";
2
+ import { createJsonResponse, createErrorResponse } from "../utils/index.js";
3
+ import credentials from "../services/credentials.js";
4
+ /**
5
+ * Ensure the credential store is unlocked before operations.
6
+ * Uses ARC_CREDS_PASSWORD env var.
7
+ */
8
+ async function ensureUnlocked() {
9
+ if (!credentials.isUnlocked()) {
10
+ await credentials.unlock();
11
+ }
12
+ }
13
+ /**
14
+ * Register credential management tools with the MCP server.
15
+ *
16
+ * Provides encrypted credential storage (AES-256-GCM + scrypt KDF)
17
+ * at ~/.aibtc/credentials.enc. Password from ARC_CREDS_PASSWORD env var.
18
+ */
19
+ export function registerCredentialsTools(server) {
20
+ /**
21
+ * List stored credentials (service/key names only, no values)
22
+ */
23
+ server.registerTool("credentials_list", {
24
+ description: "List all stored credentials. Shows service names, key names, and last-updated timestamps. Does NOT reveal credential values.",
25
+ inputSchema: {},
26
+ }, async () => {
27
+ try {
28
+ await ensureUnlocked();
29
+ const entries = credentials.list();
30
+ return createJsonResponse({
31
+ count: entries.length,
32
+ credentials: entries,
33
+ storePath: credentials.storePath(),
34
+ });
35
+ }
36
+ catch (error) {
37
+ return createErrorResponse(error);
38
+ }
39
+ });
40
+ /**
41
+ * Get a credential value
42
+ */
43
+ server.registerTool("credentials_get", {
44
+ description: "Retrieve a stored credential value by service and key. Returns the decrypted value. WARNING: The returned value is sensitive — do not log or display it unnecessarily.",
45
+ inputSchema: {
46
+ service: z.string().min(1).describe("Service name (e.g. 'github', 'openrouter')"),
47
+ key: z.string().min(1).describe("Key name within the service (e.g. 'api_key', 'token')"),
48
+ },
49
+ }, async ({ service, key }) => {
50
+ try {
51
+ await ensureUnlocked();
52
+ const value = credentials.get(service, key);
53
+ if (value === null) {
54
+ return createJsonResponse({
55
+ found: false,
56
+ service,
57
+ key,
58
+ message: `No credential found for ${service}/${key}`,
59
+ });
60
+ }
61
+ return createJsonResponse({
62
+ found: true,
63
+ service,
64
+ key,
65
+ value,
66
+ });
67
+ }
68
+ catch (error) {
69
+ return createErrorResponse(error);
70
+ }
71
+ });
72
+ /**
73
+ * Set or update a credential
74
+ */
75
+ server.registerTool("credentials_set", {
76
+ description: "Store or update a credential. Encrypts the value with AES-256-GCM and saves to ~/.aibtc/credentials.enc. If the service/key pair already exists, it is updated.",
77
+ inputSchema: {
78
+ service: z.string().min(1).describe("Service name (e.g. 'github', 'openrouter')"),
79
+ key: z.string().min(1).describe("Key name within the service (e.g. 'api_key', 'token')"),
80
+ value: z
81
+ .string()
82
+ .min(1)
83
+ .describe("The credential value to store — WARNING: sensitive"),
84
+ },
85
+ }, async ({ service, key, value }) => {
86
+ try {
87
+ await ensureUnlocked();
88
+ const existed = credentials.get(service, key) !== null;
89
+ await credentials.set(service, key, value);
90
+ return createJsonResponse({
91
+ success: true,
92
+ action: existed ? "updated" : "created",
93
+ service,
94
+ key,
95
+ storedIn: credentials.storePath(),
96
+ });
97
+ }
98
+ catch (error) {
99
+ return createErrorResponse(error);
100
+ }
101
+ });
102
+ /**
103
+ * Delete a credential
104
+ */
105
+ server.registerTool("credentials_delete", {
106
+ description: "Remove a stored credential by service and key. The encrypted store file is rewritten without the deleted entry.",
107
+ inputSchema: {
108
+ service: z.string().min(1).describe("Service name (e.g. 'github', 'openrouter')"),
109
+ key: z.string().min(1).describe("Key name within the service (e.g. 'api_key', 'token')"),
110
+ },
111
+ }, async ({ service, key }) => {
112
+ try {
113
+ await ensureUnlocked();
114
+ const deleted = await credentials.del(service, key);
115
+ return createJsonResponse({
116
+ success: deleted,
117
+ service,
118
+ key,
119
+ message: deleted
120
+ ? `Credential ${service}/${key} deleted`
121
+ : `No credential found for ${service}/${key}`,
122
+ });
123
+ }
124
+ catch (error) {
125
+ return createErrorResponse(error);
126
+ }
127
+ });
128
+ /**
129
+ * Unlock / verify credential store
130
+ */
131
+ server.registerTool("credentials_unlock", {
132
+ description: "Verify that the credential store password works and show store info. Uses ARC_CREDS_PASSWORD env var. Creates a new empty store if none exists.",
133
+ inputSchema: {},
134
+ }, async () => {
135
+ try {
136
+ await credentials.unlock();
137
+ const entries = credentials.list();
138
+ return createJsonResponse({
139
+ success: true,
140
+ unlocked: true,
141
+ credentialCount: entries.length,
142
+ storePath: credentials.storePath(),
143
+ message: "Credential store unlocked and verified",
144
+ });
145
+ }
146
+ catch (error) {
147
+ return createErrorResponse(error);
148
+ }
149
+ });
150
+ }
151
+ //# sourceMappingURL=credentials.tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.tools.js","sourceRoot":"","sources":["../../src/tools/credentials.tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,WAAW,MAAM,4BAA4B,CAAC;AAErD;;;GAGG;AACH,KAAK,UAAU,cAAc;IAC3B,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,EAAE,CAAC;QAC9B,MAAM,WAAW,CAAC,MAAM,EAAE,CAAC;IAC7B,CAAC;AACH,C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,EAAE,IAAI;gBACd,eAAe,EAAE,OAAO,CAAC,MAAM;gBAC/B,SAAS,EAAE,WAAW,CAAC,SAAS,EAAE;gBAClC,OAAO,EAAE,wCAAwC;aAClD,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAC;QACpC,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Identity Tools (ERC-8004)
3
+ *
4
+ * MCP tools for on-chain agent identity management via the ERC-8004 identity registry.
5
+ *
6
+ * Read Tools (no wallet required):
7
+ * - identity_get_last_id - Get most recently minted agent ID
8
+ * - identity_get - Get agent identity info (owner, URI, wallet)
9
+ * - identity_get_metadata - Read a single metadata value by key
10
+ *
11
+ * Write Tools (wallet required):
12
+ * - identity_register - Register new agent identity on-chain
13
+ * - identity_set_uri - Update agent identity URI
14
+ * - identity_set_metadata - Set metadata key-value pair
15
+ * - identity_set_approval - Approve or revoke operator
16
+ * - identity_set_wallet - Link active wallet to agent identity
17
+ * - identity_unset_wallet - Remove agent wallet association
18
+ * - identity_transfer - Transfer identity NFT to new owner
19
+ */
20
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
21
+ export declare function registerIdentityTools(server: McpServer): void;
22
+ //# sourceMappingURL=identity.tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.tools.d.ts","sourceRoot":"","sources":["../../src/tools/identity.tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAapE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA8c7D"}
@@ -0,0 +1,404 @@
1
+ /**
2
+ * Identity Tools (ERC-8004)
3
+ *
4
+ * MCP tools for on-chain agent identity management via the ERC-8004 identity registry.
5
+ *
6
+ * Read Tools (no wallet required):
7
+ * - identity_get_last_id - Get most recently minted agent ID
8
+ * - identity_get - Get agent identity info (owner, URI, wallet)
9
+ * - identity_get_metadata - Read a single metadata value by key
10
+ *
11
+ * Write Tools (wallet required):
12
+ * - identity_register - Register new agent identity on-chain
13
+ * - identity_set_uri - Update agent identity URI
14
+ * - identity_set_metadata - Set metadata key-value pair
15
+ * - identity_set_approval - Approve or revoke operator
16
+ * - identity_set_wallet - Link active wallet to agent identity
17
+ * - identity_unset_wallet - Remove agent wallet association
18
+ * - identity_transfer - Transfer identity NFT to new owner
19
+ */
20
+ import { z } from "zod";
21
+ import { NETWORK, getExplorerTxUrl } from "../config/networks.js";
22
+ import { createJsonResponse, createErrorResponse } from "../utils/index.js";
23
+ import { getWalletManager } from "../services/wallet-manager.js";
24
+ import { Erc8004Service } from "../services/erc8004.service.js";
25
+ import { resolveFee } from "../utils/fee.js";
26
+ import { sponsoredSchema } from "./schemas.js";
27
+ import { normalizeHex, getCallerAddress } from "../utils/erc8004-helpers.js";
28
+ const MAX_METADATA_KEY_LENGTH = 128;
29
+ const MAX_METADATA_VALUE_BYTES = 512;
30
+ export function registerIdentityTools(server) {
31
+ const service = new Erc8004Service(NETWORK);
32
+ // ==========================================================================
33
+ // Read Tools (no wallet required)
34
+ // ==========================================================================
35
+ server.registerTool("identity_get_last_id", {
36
+ description: "Get the most recently minted agent ID from the ERC-8004 identity registry. " +
37
+ "Returns null if no agents have been registered.",
38
+ inputSchema: {},
39
+ }, async () => {
40
+ try {
41
+ const callerAddress = getCallerAddress();
42
+ const lastId = await service.getLastId(callerAddress);
43
+ return createJsonResponse({
44
+ success: true,
45
+ lastId,
46
+ message: lastId !== null
47
+ ? `Last minted agent ID: ${lastId}`
48
+ : "No agents registered yet",
49
+ network: NETWORK,
50
+ });
51
+ }
52
+ catch (error) {
53
+ return createErrorResponse(error);
54
+ }
55
+ });
56
+ server.registerTool("identity_get", {
57
+ description: "Get agent identity information from ERC-8004 identity registry. " +
58
+ "Returns owner address, URI, and wallet address if set.",
59
+ inputSchema: {
60
+ agentId: z.number().int().min(0).describe("Agent ID to look up"),
61
+ },
62
+ }, async ({ agentId }) => {
63
+ try {
64
+ const callerAddress = getCallerAddress();
65
+ const identity = await service.getIdentity(agentId, callerAddress);
66
+ if (!identity) {
67
+ return createJsonResponse({
68
+ success: false,
69
+ agentId,
70
+ message: "Agent ID not found",
71
+ });
72
+ }
73
+ return createJsonResponse({
74
+ success: true,
75
+ agentId: identity.agentId,
76
+ owner: identity.owner,
77
+ uri: identity.uri || "(no URI set)",
78
+ wallet: identity.wallet || "(no wallet set)",
79
+ network: NETWORK,
80
+ });
81
+ }
82
+ catch (error) {
83
+ return createErrorResponse(error);
84
+ }
85
+ });
86
+ server.registerTool("identity_get_metadata", {
87
+ description: "Read a single metadata value by key from an agent's ERC-8004 identity. " +
88
+ "Returns the raw buffer value as a hex string.",
89
+ inputSchema: {
90
+ agentId: z.number().int().min(0).describe("Agent ID to query"),
91
+ key: z.string().max(MAX_METADATA_KEY_LENGTH).describe("Metadata key to read"),
92
+ },
93
+ }, async ({ agentId, key }) => {
94
+ try {
95
+ const callerAddress = getCallerAddress();
96
+ const value = await service.getMetadata(agentId, key, callerAddress);
97
+ if (value === null) {
98
+ return createJsonResponse({
99
+ success: false,
100
+ agentId,
101
+ key,
102
+ message: `No metadata found for key "${key}" on agent ${agentId}`,
103
+ });
104
+ }
105
+ return createJsonResponse({
106
+ success: true,
107
+ agentId,
108
+ key,
109
+ value,
110
+ network: NETWORK,
111
+ });
112
+ }
113
+ catch (error) {
114
+ return createErrorResponse(error);
115
+ }
116
+ });
117
+ // ==========================================================================
118
+ // Write Tools (wallet required)
119
+ // ==========================================================================
120
+ server.registerTool("identity_register", {
121
+ description: "Register a new agent identity on-chain using ERC-8004 identity registry. " +
122
+ "Returns a transaction ID. Check the transaction result to get the assigned agent ID. " +
123
+ "Requires an unlocked wallet.",
124
+ inputSchema: {
125
+ uri: z
126
+ .string()
127
+ .optional()
128
+ .describe("URI pointing to agent metadata (IPFS, HTTP, etc.). Optional."),
129
+ metadata: z
130
+ .array(z.object({
131
+ key: z.string().max(MAX_METADATA_KEY_LENGTH).describe("Metadata key (max 128 chars)"),
132
+ value: z.string().describe("Metadata value as hex string (max 512 bytes)"),
133
+ }))
134
+ .optional()
135
+ .describe("Array of metadata key-value pairs. Values must be hex-encoded buffers. Optional."),
136
+ fee: z
137
+ .string()
138
+ .optional()
139
+ .describe('Fee preset ("low", "medium", "high") or micro-STX amount. Optional.'),
140
+ sponsored: sponsoredSchema,
141
+ },
142
+ }, async ({ uri, metadata, fee, sponsored }) => {
143
+ try {
144
+ const walletManager = getWalletManager();
145
+ const account = walletManager.getActiveAccount();
146
+ if (!account) {
147
+ throw new Error("No active wallet. Please unlock your wallet first.");
148
+ }
149
+ let parsedMetadata;
150
+ if (metadata && metadata.length > 0) {
151
+ parsedMetadata = metadata.map((m) => {
152
+ const normalized = normalizeHex(m.value, `metadata value for key "${m.key}"`);
153
+ const buf = Buffer.from(normalized, "hex");
154
+ if (buf.length > MAX_METADATA_VALUE_BYTES) {
155
+ throw new Error(`metadata value for key "${m.key}" exceeds ${MAX_METADATA_VALUE_BYTES} bytes (got ${buf.length})`);
156
+ }
157
+ return { key: m.key, value: buf };
158
+ });
159
+ }
160
+ const feeAmount = fee ? await resolveFee(fee, NETWORK, "contract_call") : undefined;
161
+ const result = await service.registerIdentity(account, uri, parsedMetadata, feeAmount, sponsored);
162
+ return createJsonResponse({
163
+ success: true,
164
+ txid: result.txid,
165
+ message: "Identity registration transaction submitted. " +
166
+ "Check transaction result to get your agent ID.",
167
+ network: NETWORK,
168
+ explorerUrl: getExplorerTxUrl(result.txid, NETWORK),
169
+ });
170
+ }
171
+ catch (error) {
172
+ return createErrorResponse(error);
173
+ }
174
+ });
175
+ server.registerTool("identity_set_uri", {
176
+ description: "Update the URI for an agent identity in the ERC-8004 identity registry. " +
177
+ "Requires an unlocked wallet. Must be called by agent owner or approved operator.",
178
+ inputSchema: {
179
+ agentId: z.number().int().min(0).describe("Agent ID to update"),
180
+ uri: z.string().describe("New URI pointing to agent metadata (IPFS, HTTP, etc.)"),
181
+ fee: z
182
+ .string()
183
+ .optional()
184
+ .describe('Fee preset ("low", "medium", "high") or micro-STX amount. Optional.'),
185
+ sponsored: sponsoredSchema,
186
+ },
187
+ }, async ({ agentId, uri, fee, sponsored }) => {
188
+ try {
189
+ const walletManager = getWalletManager();
190
+ const account = walletManager.getActiveAccount();
191
+ if (!account) {
192
+ throw new Error("No active wallet. Please unlock your wallet first.");
193
+ }
194
+ const feeAmount = fee ? await resolveFee(fee, NETWORK, "contract_call") : undefined;
195
+ const result = await service.updateIdentityUri(account, agentId, uri, feeAmount, sponsored);
196
+ return createJsonResponse({
197
+ success: true,
198
+ txid: result.txid,
199
+ message: `URI update transaction submitted for agent ${agentId}`,
200
+ agentId,
201
+ uri,
202
+ network: NETWORK,
203
+ explorerUrl: getExplorerTxUrl(result.txid, NETWORK),
204
+ });
205
+ }
206
+ catch (error) {
207
+ return createErrorResponse(error);
208
+ }
209
+ });
210
+ server.registerTool("identity_set_metadata", {
211
+ description: "Set a metadata key-value pair on an agent identity in the ERC-8004 identity registry. " +
212
+ "Value must be a hex-encoded buffer (max 512 bytes). " +
213
+ 'The key "agentWallet" is reserved — use identity_set_wallet instead. ' +
214
+ "Requires an unlocked wallet.",
215
+ inputSchema: {
216
+ agentId: z.number().int().min(0).describe("Agent ID to update"),
217
+ key: z.string().max(MAX_METADATA_KEY_LENGTH).describe("Metadata key (max 128 chars)"),
218
+ value: z
219
+ .string()
220
+ .describe('Metadata value as hex-encoded buffer (e.g., "616c696365" for "alice"). Max 512 bytes.'),
221
+ fee: z
222
+ .string()
223
+ .optional()
224
+ .describe('Fee preset ("low", "medium", "high") or micro-STX amount. Optional.'),
225
+ sponsored: sponsoredSchema,
226
+ },
227
+ }, async ({ agentId, key, value, fee, sponsored }) => {
228
+ try {
229
+ if (key === "agentWallet") {
230
+ throw new Error('The "agentWallet" key is reserved. Use identity_set_wallet or identity_unset_wallet instead.');
231
+ }
232
+ const walletManager = getWalletManager();
233
+ const account = walletManager.getActiveAccount();
234
+ if (!account) {
235
+ throw new Error("No active wallet. Please unlock your wallet first.");
236
+ }
237
+ const normalized = normalizeHex(value, "metadata value");
238
+ const buf = Buffer.from(normalized, "hex");
239
+ if (buf.length > MAX_METADATA_VALUE_BYTES) {
240
+ throw new Error(`metadata value exceeds ${MAX_METADATA_VALUE_BYTES} bytes (got ${buf.length})`);
241
+ }
242
+ const feeAmount = fee ? await resolveFee(fee, NETWORK, "contract_call") : undefined;
243
+ const result = await service.setMetadata(account, agentId, key, buf, feeAmount, sponsored);
244
+ return createJsonResponse({
245
+ success: true,
246
+ txid: result.txid,
247
+ message: `Metadata update transaction submitted for agent ${agentId}, key "${key}"`,
248
+ agentId,
249
+ key,
250
+ network: NETWORK,
251
+ explorerUrl: getExplorerTxUrl(result.txid, NETWORK),
252
+ });
253
+ }
254
+ catch (error) {
255
+ return createErrorResponse(error);
256
+ }
257
+ });
258
+ server.registerTool("identity_set_approval", {
259
+ description: "Approve or revoke an operator for an agent identity in the ERC-8004 identity registry. " +
260
+ "An approved operator can update URI, metadata, and wallet on behalf of the owner. " +
261
+ "Only the NFT owner can call this. Requires an unlocked wallet.",
262
+ inputSchema: {
263
+ agentId: z.number().int().min(0).describe("Agent ID to update"),
264
+ operator: z.string().describe("Stacks address of the operator to approve or revoke"),
265
+ approved: z
266
+ .boolean()
267
+ .optional()
268
+ .default(true)
269
+ .describe("Grant approval (true) or revoke (false). Defaults to true."),
270
+ fee: z
271
+ .string()
272
+ .optional()
273
+ .describe('Fee preset ("low", "medium", "high") or micro-STX amount. Optional.'),
274
+ sponsored: sponsoredSchema,
275
+ },
276
+ }, async ({ agentId, operator, approved, fee, sponsored }) => {
277
+ try {
278
+ const walletManager = getWalletManager();
279
+ const account = walletManager.getActiveAccount();
280
+ if (!account) {
281
+ throw new Error("No active wallet. Please unlock your wallet first.");
282
+ }
283
+ const feeAmount = fee ? await resolveFee(fee, NETWORK, "contract_call") : undefined;
284
+ const result = await service.setApproval(account, agentId, operator, approved, feeAmount, sponsored);
285
+ return createJsonResponse({
286
+ success: true,
287
+ txid: result.txid,
288
+ message: `Operator ${approved ? "approved" : "revoked"} for agent ${agentId}`,
289
+ agentId,
290
+ operator,
291
+ approved,
292
+ network: NETWORK,
293
+ explorerUrl: getExplorerTxUrl(result.txid, NETWORK),
294
+ });
295
+ }
296
+ catch (error) {
297
+ return createErrorResponse(error);
298
+ }
299
+ });
300
+ server.registerTool("identity_set_wallet", {
301
+ description: "Link the active Stacks wallet address to an agent identity in the ERC-8004 identity registry. " +
302
+ "Requires an unlocked wallet.",
303
+ inputSchema: {
304
+ agentId: z.number().int().min(0).describe("Agent ID to update"),
305
+ fee: z
306
+ .string()
307
+ .optional()
308
+ .describe('Fee preset ("low", "medium", "high") or micro-STX amount. Optional.'),
309
+ sponsored: sponsoredSchema,
310
+ },
311
+ }, async ({ agentId, fee, sponsored }) => {
312
+ try {
313
+ const walletManager = getWalletManager();
314
+ const account = walletManager.getActiveAccount();
315
+ if (!account) {
316
+ throw new Error("No active wallet. Please unlock your wallet first.");
317
+ }
318
+ const feeAmount = fee ? await resolveFee(fee, NETWORK, "contract_call") : undefined;
319
+ const result = await service.setWallet(account, agentId, feeAmount, sponsored);
320
+ return createJsonResponse({
321
+ success: true,
322
+ txid: result.txid,
323
+ message: `Wallet link transaction submitted for agent ${agentId}`,
324
+ agentId,
325
+ network: NETWORK,
326
+ explorerUrl: getExplorerTxUrl(result.txid, NETWORK),
327
+ });
328
+ }
329
+ catch (error) {
330
+ return createErrorResponse(error);
331
+ }
332
+ });
333
+ server.registerTool("identity_unset_wallet", {
334
+ description: "Remove the agent wallet association from an agent identity in the ERC-8004 identity registry. " +
335
+ "Requires an unlocked wallet.",
336
+ inputSchema: {
337
+ agentId: z.number().int().min(0).describe("Agent ID to update"),
338
+ fee: z
339
+ .string()
340
+ .optional()
341
+ .describe('Fee preset ("low", "medium", "high") or micro-STX amount. Optional.'),
342
+ sponsored: sponsoredSchema,
343
+ },
344
+ }, async ({ agentId, fee, sponsored }) => {
345
+ try {
346
+ const walletManager = getWalletManager();
347
+ const account = walletManager.getActiveAccount();
348
+ if (!account) {
349
+ throw new Error("No active wallet. Please unlock your wallet first.");
350
+ }
351
+ const feeAmount = fee ? await resolveFee(fee, NETWORK, "contract_call") : undefined;
352
+ const result = await service.unsetWallet(account, agentId, feeAmount, sponsored);
353
+ return createJsonResponse({
354
+ success: true,
355
+ txid: result.txid,
356
+ message: `Wallet unlink transaction submitted for agent ${agentId}`,
357
+ agentId,
358
+ network: NETWORK,
359
+ explorerUrl: getExplorerTxUrl(result.txid, NETWORK),
360
+ });
361
+ }
362
+ catch (error) {
363
+ return createErrorResponse(error);
364
+ }
365
+ });
366
+ server.registerTool("identity_transfer", {
367
+ description: "Transfer an agent identity NFT to a new owner in the ERC-8004 identity registry. " +
368
+ "This clears the agent wallet association — run identity_set_wallet after if needed. " +
369
+ "Requires an unlocked wallet.",
370
+ inputSchema: {
371
+ agentId: z.number().int().min(0).describe("Agent ID (token ID) to transfer"),
372
+ recipient: z.string().describe("Stacks address of the new owner"),
373
+ fee: z
374
+ .string()
375
+ .optional()
376
+ .describe('Fee preset ("low", "medium", "high") or micro-STX amount. Optional.'),
377
+ sponsored: sponsoredSchema,
378
+ },
379
+ }, async ({ agentId, recipient, fee, sponsored }) => {
380
+ try {
381
+ const walletManager = getWalletManager();
382
+ const account = walletManager.getActiveAccount();
383
+ if (!account) {
384
+ throw new Error("No active wallet. Please unlock your wallet first.");
385
+ }
386
+ const feeAmount = fee ? await resolveFee(fee, NETWORK, "contract_call") : undefined;
387
+ const result = await service.transferIdentity(account, agentId, recipient, feeAmount, sponsored);
388
+ return createJsonResponse({
389
+ success: true,
390
+ txid: result.txid,
391
+ message: `Identity transfer transaction submitted for agent ${agentId} to ${recipient}. ` +
392
+ "Note: agent wallet association is cleared on transfer.",
393
+ agentId,
394
+ recipient,
395
+ network: NETWORK,
396
+ explorerUrl: getExplorerTxUrl(result.txid, NETWORK),
397
+ });
398
+ }
399
+ catch (error) {
400
+ return createErrorResponse(error);
401
+ }
402
+ });
403
+ }
404
+ //# sourceMappingURL=identity.tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.tools.js","sourceRoot":"","sources":["../../src/tools/identity.tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE7E,MAAM,uBAAuB,GAAG,GAAG,CAAC;AACpC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAErC,MAAM,UAAU,qBAAqB,CAAC,MAAiB;IACrD,MAAM,OAAO,GAAG,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;IAE5C,6EAA6E;IAC7E,kCAAkC;IAClC,6EAA6E;IAE7E,MAAM,CAAC,YAAY,CACjB,sBAAsB,EACtB;QACE,WAAW,EACT,6EAA6E;YAC7E,iDAAiD;QACnD,WAAW,EAAE,EAAE;KAChB,EACD,KAAK,IAAI,EAAE;QACT,IAAI,CAAC;YACH,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;YACzC,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;YAEtD,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EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAkEpE;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA0GxD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAuEpE;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAyHxD"}
@@ -33,6 +33,11 @@ import { registerTaprootMultisigTools } from "./taproot-multisig.tools.js";
33
33
  import { registerJingswapTools } from "./jingswap.tools.js";
34
34
  import { registerSigningTools } from "./signing.tools.js";
35
35
  import { registerNewsTools } from "./news.tools.js";
36
+ import { registerIdentityTools } from "./identity.tools.js";
37
+ import { registerCredentialsTools } from "./credentials.tools.js";
38
+ import { registerSouldinalsTools } from "./souldinals.tools.js";
39
+ import { registerBountyScannerTools } from "./bounty-scanner.tools.js";
40
+ import { registerRunesTools } from "./runes.tools.js";
36
41
  import { getSkillForTool } from "./skill-mappings.js";
37
42
  /**
38
43
  * Wraps server.registerTool to inject _meta.skill from TOOL_SKILL_MAP when a mapping exists.
@@ -134,6 +139,16 @@ export function registerAllTools(server) {
134
139
  registerSigningTools(server);
135
140
  // AIBTC News (signal feed, leaderboard, file signals)
136
141
  registerNewsTools(server);
142
+ // Identity (ERC-8004 on-chain agent identity management)
143
+ registerIdentityTools(server);
144
+ // Credentials (encrypted credential store — list, get, set, delete, unlock)
145
+ registerCredentialsTools(server);
146
+ // Souldinals (soul.md child inscriptions — inscribe, reveal, list, load, display traits)
147
+ registerSouldinalsTools(server);
148
+ // Bounty Scanner (bounty.drx4.xyz — list, match, claim, status, my-claims)
149
+ registerBountyScannerTools(server);
150
+ // Runes (Bitcoin-native fungible tokens — list, query, holders, activity, balances)
151
+ registerRunesTools(server);
137
152
  restoreRegisterTool();
138
153
  }
139
154
  //# sourceMappingURL=index.js.map