@aibtc/mcp-server 1.70.1 → 1.72.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 +45 -8
- package/dist/bridge/index.js +4 -4
- package/dist/config/contracts.d.ts +4 -4
- package/dist/config/contracts.js +2 -2
- package/dist/config/networks.js +4 -1
- package/dist/endpoints/registry.d.ts +8 -26
- package/dist/endpoints/registry.js +7 -932
- package/dist/index.js +118 -42
- package/dist/services/stacking.service.d.ts +144 -45
- package/dist/services/stacking.service.js +416 -123
- package/dist/services/x402-discovery.service.d.ts +81 -0
- package/dist/services/x402-discovery.service.js +170 -0
- package/dist/tools/arxiv-research.tools.d.ts +1 -1
- package/dist/tools/arxiv-research.tools.js +6 -6
- package/dist/tools/at-stake-legion.tools.d.ts +1 -1
- package/dist/tools/at-stake-legion.tools.js +14 -14
- package/dist/tools/at-stake.tools.d.ts +1 -1
- package/dist/tools/at-stake.tools.js +17 -17
- package/dist/tools/bitcoin.tools.d.ts +1 -1
- package/dist/tools/bitcoin.tools.js +12 -12
- package/dist/tools/bitflow.tools.d.ts +1 -1
- package/dist/tools/bitflow.tools.js +21 -21
- package/dist/tools/bns.tools.d.ts +1 -1
- package/dist/tools/bns.tools.js +18 -18
- package/dist/tools/bounty-hint.d.ts +1 -1
- package/dist/tools/bounty-scanner.tools.d.ts +1 -1
- package/dist/tools/bounty-scanner.tools.js +20 -20
- package/dist/tools/child-inscription.tools.d.ts +1 -1
- package/dist/tools/child-inscription.tools.js +6 -6
- package/dist/tools/competition.tools.d.ts +1 -1
- package/dist/tools/competition.tools.js +4 -4
- package/dist/tools/contract.tools.d.ts +1 -1
- package/dist/tools/contract.tools.js +8 -8
- package/dist/tools/credentials.tools.d.ts +1 -1
- package/dist/tools/credentials.tools.js +8 -8
- package/dist/tools/defi.tools.d.ts +1 -1
- package/dist/tools/defi.tools.js +21 -21
- package/dist/tools/dual-stacking.tools.d.ts +1 -1
- package/dist/tools/dual-stacking.tools.js +7 -7
- package/dist/tools/earning.tools.d.ts +1 -1
- package/dist/tools/earning.tools.js +5 -5
- package/dist/tools/endpoint.tools.d.ts +1 -1
- package/dist/tools/endpoint.tools.js +92 -49
- package/dist/tools/identity.tools.d.ts +1 -1
- package/dist/tools/identity.tools.js +19 -19
- package/dist/tools/inbox-x402.tools.d.ts +1 -1
- package/dist/tools/inbox-x402.tools.js +2 -2
- package/dist/tools/inbox.tools.d.ts +1 -1
- package/dist/tools/inbox.tools.js +2 -2
- package/dist/tools/index.d.ts +6 -3
- package/dist/tools/index.js +69 -58
- package/dist/tools/inference-marketplace.tools.d.ts +1 -1
- package/dist/tools/inference-marketplace.tools.js +10 -10
- package/dist/tools/jingswap.tools.d.ts +1 -1
- package/dist/tools/jingswap.tools.js +30 -30
- package/dist/tools/legion.tools.d.ts +1 -1
- package/dist/tools/legion.tools.js +20 -20
- package/dist/tools/lightning.tools.d.ts +1 -1
- package/dist/tools/lightning.tools.js +14 -14
- package/dist/tools/mempool.tools.d.ts +1 -1
- package/dist/tools/mempool.tools.js +5 -5
- package/dist/tools/news.tools.d.ts +1 -1
- package/dist/tools/news.tools.js +2 -1
- package/dist/tools/nft.tools.d.ts +1 -1
- package/dist/tools/nft.tools.js +12 -12
- package/dist/tools/nonce.tools.d.ts +1 -1
- package/dist/tools/nonce.tools.js +8 -8
- package/dist/tools/nostr.tools.d.ts +1 -1
- package/dist/tools/nostr.tools.js +12 -12
- package/dist/tools/openrouter.tools.d.ts +1 -1
- package/dist/tools/openrouter.tools.js +4 -4
- package/dist/tools/ordinals-marketplace.tools.d.ts +1 -1
- package/dist/tools/ordinals-marketplace.tools.js +10 -10
- package/dist/tools/ordinals-p2p.tools.d.ts +1 -1
- package/dist/tools/ordinals-p2p.tools.js +18 -18
- package/dist/tools/ordinals.tools.d.ts +1 -1
- package/dist/tools/ordinals.tools.js +8 -8
- package/dist/tools/pillar-direct.tools.d.ts +1 -1
- package/dist/tools/pillar-direct.tools.js +59 -38
- package/dist/tools/pillar.tools.d.ts +1 -1
- package/dist/tools/pillar.tools.js +28 -26
- package/dist/tools/profiles.d.ts +51 -0
- package/dist/tools/profiles.js +111 -0
- package/dist/tools/psbt.tools.d.ts +1 -1
- package/dist/tools/psbt.tools.js +8 -8
- package/dist/tools/query.tools.d.ts +1 -1
- package/dist/tools/query.tools.js +12 -12
- package/dist/tools/relay-diagnostic.tools.d.ts +1 -1
- package/dist/tools/relay-diagnostic.tools.js +3 -3
- package/dist/tools/reputation.tools.d.ts +1 -1
- package/dist/tools/reputation.tools.js +22 -22
- package/dist/tools/runes.tools.d.ts +1 -1
- package/dist/tools/runes.tools.js +18 -18
- package/dist/tools/sbtc.tools.d.ts +1 -1
- package/dist/tools/sbtc.tools.js +14 -33
- package/dist/tools/scaffold.tools.d.ts +1 -1
- package/dist/tools/scaffold.tools.js +4 -4
- package/dist/tools/settings.tools.d.ts +1 -1
- package/dist/tools/settings.tools.js +9 -9
- package/dist/tools/signing.tools.d.ts +1 -1
- package/dist/tools/signing.tools.js +20 -20
- package/dist/tools/skill-mappings.js +4 -0
- package/dist/tools/souldinals.tools.d.ts +1 -1
- package/dist/tools/souldinals.tools.js +10 -10
- package/dist/tools/stacking-lottery.tools.d.ts +1 -1
- package/dist/tools/stacking-lottery.tools.js +11 -11
- package/dist/tools/stacking.tools.d.ts +1 -1
- package/dist/tools/stacking.tools.js +358 -50
- package/dist/tools/stacks-market.tools.d.ts +1 -1
- package/dist/tools/stacks-market.tools.js +22 -22
- package/dist/tools/styx.tools.d.ts +1 -1
- package/dist/tools/styx.tools.js +11 -11
- package/dist/tools/taproot-multisig.tools.d.ts +1 -1
- package/dist/tools/taproot-multisig.tools.js +5 -5
- package/dist/tools/tenero.tools.d.ts +1 -1
- package/dist/tools/tenero.tools.js +22 -22
- package/dist/tools/tokens.tools.d.ts +1 -1
- package/dist/tools/tokens.tools.js +10 -10
- package/dist/tools/transfer.tools.d.ts +1 -1
- package/dist/tools/transfer.tools.js +4 -4
- package/dist/tools/wallet-management.tools.d.ts +1 -1
- package/dist/tools/wallet-management.tools.js +16 -16
- package/dist/tools/wallet.tools.d.ts +1 -1
- package/dist/tools/wallet.tools.js +2 -2
- package/dist/tools/yield-dashboard.tools.d.ts +1 -1
- package/dist/tools/yield-dashboard.tools.js +18 -27
- package/dist/tools/yield-hunter.tools.d.ts +1 -1
- package/dist/tools/yield-hunter.tools.js +6 -6
- package/dist/utils/bitcoin.d.ts +8 -0
- package/dist/utils/bitcoin.js +24 -0
- package/dist/utils/fee.js +1 -1
- package/package.json +8 -7
- package/skill/SKILL.md +1 -1
- package/skill/references/stacks-defi.md +1 -1
|
@@ -194,7 +194,7 @@ Returns price, volume, and liquidity data for all trading pairs.
|
|
|
194
194
|
This endpoint does NOT require an API key.
|
|
195
195
|
|
|
196
196
|
Note: Bitflow is only available on mainnet.`,
|
|
197
|
-
inputSchema: {
|
|
197
|
+
inputSchema: z.object({
|
|
198
198
|
baseCurrency: z
|
|
199
199
|
.string()
|
|
200
200
|
.optional()
|
|
@@ -203,7 +203,7 @@ Note: Bitflow is only available on mainnet.`,
|
|
|
203
203
|
.string()
|
|
204
204
|
.optional()
|
|
205
205
|
.describe("Optional: filter by target currency contract ID"),
|
|
206
|
-
},
|
|
206
|
+
}),
|
|
207
207
|
}, async ({ baseCurrency, targetCurrency }) => {
|
|
208
208
|
try {
|
|
209
209
|
if (NETWORK !== "mainnet") {
|
|
@@ -250,7 +250,7 @@ Returns the list of tokens that can be swapped on Bitflow DEX.
|
|
|
250
250
|
No API key required — uses public endpoints (500 req/min).
|
|
251
251
|
|
|
252
252
|
Note: Bitflow is only available on mainnet.`,
|
|
253
|
-
inputSchema: {},
|
|
253
|
+
inputSchema: z.object({}),
|
|
254
254
|
}, async () => {
|
|
255
255
|
try {
|
|
256
256
|
if (NETWORK !== "mainnet") {
|
|
@@ -279,9 +279,9 @@ Returns all tokens that can be received when swapping from the specified token.
|
|
|
279
279
|
No API key required — uses public endpoints (500 req/min).
|
|
280
280
|
|
|
281
281
|
Note: Bitflow is only available on mainnet.`,
|
|
282
|
-
inputSchema: {
|
|
282
|
+
inputSchema: z.object({
|
|
283
283
|
tokenId: z.string().describe("The input token ID (contract address)"),
|
|
284
|
-
},
|
|
284
|
+
}),
|
|
285
285
|
}, async ({ tokenId }) => {
|
|
286
286
|
try {
|
|
287
287
|
if (NETWORK !== "mainnet") {
|
|
@@ -311,7 +311,7 @@ Returns the expected output amount and best route for swapping tokens.
|
|
|
311
311
|
No API key required — uses public endpoints (500 req/min).
|
|
312
312
|
|
|
313
313
|
Note: Bitflow is only available on mainnet.`,
|
|
314
|
-
inputSchema: {
|
|
314
|
+
inputSchema: z.object({
|
|
315
315
|
tokenX: z.string().describe("Input token ID (e.g. 'token-stx', 'token-sbtc')"),
|
|
316
316
|
tokenY: z.string().describe("Output token ID (e.g. 'token-sbtc', 'token-aeusdc')"),
|
|
317
317
|
amountIn: z
|
|
@@ -320,7 +320,7 @@ Note: Bitflow is only available on mainnet.`,
|
|
|
320
320
|
amountUnit: z
|
|
321
321
|
.enum(["human", "base"])
|
|
322
322
|
.describe("Required. Amount units: 'human' (frontend-style decimal, e.g. '2' for 2 STX) or 'base' (smallest integer units, e.g. '2000000' for 2 STX)."),
|
|
323
|
-
},
|
|
323
|
+
}),
|
|
324
324
|
}, async ({ tokenX, tokenY, amountIn, amountUnit }) => {
|
|
325
325
|
try {
|
|
326
326
|
if (NETWORK !== "mainnet") {
|
|
@@ -365,10 +365,10 @@ including multi-hop routes through intermediate tokens.
|
|
|
365
365
|
No API key required — uses public endpoints (500 req/min).
|
|
366
366
|
|
|
367
367
|
Note: Bitflow is only available on mainnet.`,
|
|
368
|
-
inputSchema: {
|
|
368
|
+
inputSchema: z.object({
|
|
369
369
|
tokenX: z.string().describe("Input token ID (e.g. 'token-stx', 'token-sbtc')"),
|
|
370
370
|
tokenY: z.string().describe("Output token ID (e.g. 'token-sbtc', 'token-aeusdc')"),
|
|
371
|
-
},
|
|
371
|
+
}),
|
|
372
372
|
}, async ({ tokenX, tokenY }) => {
|
|
373
373
|
try {
|
|
374
374
|
if (NETWORK !== "mainnet") {
|
|
@@ -404,7 +404,7 @@ No API key required — uses public endpoints (500 req/min).
|
|
|
404
404
|
Requires an unlocked wallet with sufficient token balance.
|
|
405
405
|
|
|
406
406
|
Note: Bitflow is only available on mainnet.`,
|
|
407
|
-
inputSchema: {
|
|
407
|
+
inputSchema: z.object({
|
|
408
408
|
tokenX: z.string().describe("Input token ID (contract address)"),
|
|
409
409
|
tokenY: z.string().describe("Output token ID (contract address)"),
|
|
410
410
|
amountIn: z
|
|
@@ -427,7 +427,7 @@ Note: Bitflow is only available on mainnet.`,
|
|
|
427
427
|
.optional()
|
|
428
428
|
.default(false)
|
|
429
429
|
.describe("Set true to execute swaps with price impact above 5%"),
|
|
430
|
-
},
|
|
430
|
+
}),
|
|
431
431
|
}, async ({ tokenX, tokenY, amountIn, amountUnit, slippageTolerance, fee, confirmHighImpact }) => {
|
|
432
432
|
try {
|
|
433
433
|
if (NETWORK !== "mainnet") {
|
|
@@ -487,12 +487,12 @@ Keeper contracts enable scheduled/automated token swaps.
|
|
|
487
487
|
No API key required — uses public endpoints (500 req/min).
|
|
488
488
|
|
|
489
489
|
Note: Bitflow is only available on mainnet.`,
|
|
490
|
-
inputSchema: {
|
|
490
|
+
inputSchema: z.object({
|
|
491
491
|
stacksAddress: z
|
|
492
492
|
.string()
|
|
493
493
|
.optional()
|
|
494
494
|
.describe("Stacks address (uses wallet if not specified)"),
|
|
495
|
-
},
|
|
495
|
+
}),
|
|
496
496
|
}, async ({ stacksAddress }) => {
|
|
497
497
|
try {
|
|
498
498
|
if (NETWORK !== "mainnet") {
|
|
@@ -523,7 +523,7 @@ Creates a pending order that will be executed by the Keeper service.
|
|
|
523
523
|
No API key required — uses public endpoints (500 req/min).
|
|
524
524
|
|
|
525
525
|
Note: Bitflow is only available on mainnet.`,
|
|
526
|
-
inputSchema: {
|
|
526
|
+
inputSchema: z.object({
|
|
527
527
|
contractIdentifier: z.string().describe("Keeper contract identifier"),
|
|
528
528
|
actionType: z.string().describe("Action type (e.g., 'SWAP_XYK_SWAP_HELPER')"),
|
|
529
529
|
fundingTokens: z
|
|
@@ -539,7 +539,7 @@ Note: Bitflow is only available on mainnet.`,
|
|
|
539
539
|
.optional()
|
|
540
540
|
.default(true)
|
|
541
541
|
.describe("Auto-adjust minimum received based on market (default true)"),
|
|
542
|
-
},
|
|
542
|
+
}),
|
|
543
543
|
}, async ({ contractIdentifier, actionType, fundingTokens, actionAmount, minReceivedAmount, autoAdjust }) => {
|
|
544
544
|
try {
|
|
545
545
|
if (NETWORK !== "mainnet") {
|
|
@@ -585,9 +585,9 @@ Retrieves the status and details of a specific order.
|
|
|
585
585
|
No API key required — uses public endpoints (500 req/min).
|
|
586
586
|
|
|
587
587
|
Note: Bitflow is only available on mainnet.`,
|
|
588
|
-
inputSchema: {
|
|
588
|
+
inputSchema: z.object({
|
|
589
589
|
orderId: z.string().describe("The order ID to retrieve"),
|
|
590
|
-
},
|
|
590
|
+
}),
|
|
591
591
|
}, async ({ orderId }) => {
|
|
592
592
|
try {
|
|
593
593
|
if (NETWORK !== "mainnet") {
|
|
@@ -615,9 +615,9 @@ Cancels a pending order before execution.
|
|
|
615
615
|
No API key required — uses public endpoints (500 req/min).
|
|
616
616
|
|
|
617
617
|
Note: Bitflow is only available on mainnet.`,
|
|
618
|
-
inputSchema: {
|
|
618
|
+
inputSchema: z.object({
|
|
619
619
|
orderId: z.string().describe("The order ID to cancel"),
|
|
620
|
-
},
|
|
620
|
+
}),
|
|
621
621
|
}, async ({ orderId }) => {
|
|
622
622
|
try {
|
|
623
623
|
if (NETWORK !== "mainnet") {
|
|
@@ -646,12 +646,12 @@ Retrieves user's keeper contracts and order history.
|
|
|
646
646
|
No API key required — uses public endpoints (500 req/min).
|
|
647
647
|
|
|
648
648
|
Note: Bitflow is only available on mainnet.`,
|
|
649
|
-
inputSchema: {
|
|
649
|
+
inputSchema: z.object({
|
|
650
650
|
stacksAddress: z
|
|
651
651
|
.string()
|
|
652
652
|
.optional()
|
|
653
653
|
.describe("Stacks address (uses wallet if not specified)"),
|
|
654
|
-
},
|
|
654
|
+
}),
|
|
655
655
|
}, async ({ stacksAddress }) => {
|
|
656
656
|
try {
|
|
657
657
|
if (NETWORK !== "mainnet") {
|
package/dist/tools/bns.tools.js
CHANGED
|
@@ -7,9 +7,9 @@ export function registerBnsTools(server) {
|
|
|
7
7
|
// Lookup BNS name
|
|
8
8
|
server.registerTool("lookup_bns_name", {
|
|
9
9
|
description: "Resolve a .btc domain name to its Stacks address.",
|
|
10
|
-
inputSchema: {
|
|
10
|
+
inputSchema: z.object({
|
|
11
11
|
name: z.string().describe("BNS name to lookup (e.g., 'alice.btc' or 'alice')"),
|
|
12
|
-
},
|
|
12
|
+
}),
|
|
13
13
|
}, async ({ name }) => {
|
|
14
14
|
try {
|
|
15
15
|
const bnsService = getBnsService(NETWORK);
|
|
@@ -37,12 +37,12 @@ export function registerBnsTools(server) {
|
|
|
37
37
|
// Reverse BNS lookup
|
|
38
38
|
server.registerTool("reverse_bns_lookup", {
|
|
39
39
|
description: "Get the BNS domain names owned by an address.",
|
|
40
|
-
inputSchema: {
|
|
40
|
+
inputSchema: z.object({
|
|
41
41
|
address: z
|
|
42
42
|
.string()
|
|
43
43
|
.optional()
|
|
44
44
|
.describe("Stacks address to lookup. Uses configured wallet if not provided."),
|
|
45
|
-
},
|
|
45
|
+
}),
|
|
46
46
|
}, async ({ address }) => {
|
|
47
47
|
try {
|
|
48
48
|
const bnsService = getBnsService(NETWORK);
|
|
@@ -62,9 +62,9 @@ export function registerBnsTools(server) {
|
|
|
62
62
|
// Get BNS name info
|
|
63
63
|
server.registerTool("get_bns_info", {
|
|
64
64
|
description: "Get detailed information about a BNS domain name.",
|
|
65
|
-
inputSchema: {
|
|
65
|
+
inputSchema: z.object({
|
|
66
66
|
name: z.string().describe("BNS name to lookup (e.g., 'alice.btc')"),
|
|
67
|
-
},
|
|
67
|
+
}),
|
|
68
68
|
}, async ({ name }) => {
|
|
69
69
|
try {
|
|
70
70
|
const bnsService = getBnsService(NETWORK);
|
|
@@ -89,9 +89,9 @@ export function registerBnsTools(server) {
|
|
|
89
89
|
// Check BNS availability
|
|
90
90
|
server.registerTool("check_bns_availability", {
|
|
91
91
|
description: "Check if a BNS domain name is available for registration.",
|
|
92
|
-
inputSchema: {
|
|
92
|
+
inputSchema: z.object({
|
|
93
93
|
name: z.string().describe("BNS name to check (e.g., 'alice')"),
|
|
94
|
-
},
|
|
94
|
+
}),
|
|
95
95
|
}, async ({ name }) => {
|
|
96
96
|
try {
|
|
97
97
|
const bnsService = getBnsService(NETWORK);
|
|
@@ -109,9 +109,9 @@ export function registerBnsTools(server) {
|
|
|
109
109
|
// Get BNS price
|
|
110
110
|
server.registerTool("get_bns_price", {
|
|
111
111
|
description: "Get the registration price for a BNS domain name.",
|
|
112
|
-
inputSchema: {
|
|
112
|
+
inputSchema: z.object({
|
|
113
113
|
name: z.string().describe("BNS name to check (e.g., 'alice')"),
|
|
114
|
-
},
|
|
114
|
+
}),
|
|
115
115
|
}, async ({ name }) => {
|
|
116
116
|
try {
|
|
117
117
|
const bnsService = getBnsService(NETWORK);
|
|
@@ -133,12 +133,12 @@ export function registerBnsTools(server) {
|
|
|
133
133
|
// List user domains
|
|
134
134
|
server.registerTool("list_user_domains", {
|
|
135
135
|
description: "List all BNS domains owned by an address.",
|
|
136
|
-
inputSchema: {
|
|
136
|
+
inputSchema: z.object({
|
|
137
137
|
address: z
|
|
138
138
|
.string()
|
|
139
139
|
.optional()
|
|
140
140
|
.describe("Stacks address to check. Uses configured wallet if not provided."),
|
|
141
|
-
},
|
|
141
|
+
}),
|
|
142
142
|
}, async ({ address }) => {
|
|
143
143
|
try {
|
|
144
144
|
const bnsService = getBnsService(NETWORK);
|
|
@@ -161,7 +161,7 @@ export function registerBnsTools(server) {
|
|
|
161
161
|
"This is the RECOMMENDED method — no preorder/register wait needed. " +
|
|
162
162
|
"Burns the name price in STX and mints the BNS NFT atomically. " +
|
|
163
163
|
"Works for all open namespaces (BNS V2).",
|
|
164
|
-
inputSchema: {
|
|
164
|
+
inputSchema: z.object({
|
|
165
165
|
name: z
|
|
166
166
|
.string()
|
|
167
167
|
.describe("BNS name to claim (e.g., 'myname' or 'myname.btc')"),
|
|
@@ -169,7 +169,7 @@ export function registerBnsTools(server) {
|
|
|
169
169
|
.string()
|
|
170
170
|
.optional()
|
|
171
171
|
.describe("Optional recipient address. Defaults to the wallet's own address."),
|
|
172
|
-
},
|
|
172
|
+
}),
|
|
173
173
|
}, async ({ name, sendTo }) => {
|
|
174
174
|
try {
|
|
175
175
|
const bnsService = getBnsService(NETWORK);
|
|
@@ -211,7 +211,7 @@ export function registerBnsTools(server) {
|
|
|
211
211
|
"Use this 2-step flow only for non-.btc namespaces or if claim-fast is unavailable. " +
|
|
212
212
|
"After preorder is confirmed (~10 minutes), call register_bns_name with the same salt. " +
|
|
213
213
|
"IMPORTANT: Save the returned salt - you'll need it for the register step!",
|
|
214
|
-
inputSchema: {
|
|
214
|
+
inputSchema: z.object({
|
|
215
215
|
name: z
|
|
216
216
|
.string()
|
|
217
217
|
.describe("BNS name to preorder (e.g., 'myname' or 'myname.btc')"),
|
|
@@ -219,7 +219,7 @@ export function registerBnsTools(server) {
|
|
|
219
219
|
.string()
|
|
220
220
|
.optional()
|
|
221
221
|
.describe("Optional salt for the preorder hash. If not provided, a random salt will be generated."),
|
|
222
|
-
},
|
|
222
|
+
}),
|
|
223
223
|
}, async ({ name, salt }) => {
|
|
224
224
|
try {
|
|
225
225
|
const bnsService = getBnsService(NETWORK);
|
|
@@ -262,14 +262,14 @@ export function registerBnsTools(server) {
|
|
|
262
262
|
"You MUST use the same salt from the preorder step. " +
|
|
263
263
|
"Only call this after the preorder transaction has been confirmed on-chain (~10 minutes). " +
|
|
264
264
|
"Auto-detects contract version: V2 for .btc names, V1 for other namespaces.",
|
|
265
|
-
inputSchema: {
|
|
265
|
+
inputSchema: z.object({
|
|
266
266
|
name: z
|
|
267
267
|
.string()
|
|
268
268
|
.describe("BNS name to register (must match the preordered name)"),
|
|
269
269
|
salt: z
|
|
270
270
|
.string()
|
|
271
271
|
.describe("The hex salt used in the preorder step (REQUIRED - must match exactly)"),
|
|
272
|
-
},
|
|
272
|
+
}),
|
|
273
273
|
}, async ({ name, salt }) => {
|
|
274
274
|
try {
|
|
275
275
|
const bnsService = getBnsService(NETWORK);
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* added to successful results — never to errors, and never touching the tool's
|
|
16
16
|
* own JSON payload.
|
|
17
17
|
*/
|
|
18
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
18
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
19
19
|
/**
|
|
20
20
|
* Tools that move or spend value. A hint is appended to their successful output.
|
|
21
21
|
*/
|
|
@@ -35,6 +35,6 @@
|
|
|
35
35
|
*
|
|
36
36
|
* Reference: https://aibtc.com/docs/bounties.txt, https://aibtc.com/api/openapi.json
|
|
37
37
|
*/
|
|
38
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
38
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
39
39
|
export declare function registerBountyScannerTools(server: McpServer): void;
|
|
40
40
|
//# sourceMappingURL=bounty-scanner.tools.d.ts.map
|
|
@@ -127,7 +127,7 @@ Filters:
|
|
|
127
127
|
Each bounty record includes a derived 'status' field computed from its timestamps.
|
|
128
128
|
|
|
129
129
|
No authentication required.`,
|
|
130
|
-
inputSchema: {
|
|
130
|
+
inputSchema: z.object({
|
|
131
131
|
status: bountyStatusSchema
|
|
132
132
|
.optional()
|
|
133
133
|
.describe("Filter by computed status. Default: 'active' (excludes terminal states)."),
|
|
@@ -139,7 +139,7 @@ No authentication required.`,
|
|
|
139
139
|
tag: z.string().optional().describe("Filter by a single tag"),
|
|
140
140
|
limit: z.number().int().min(1).max(100).optional().describe("Max results (default 20, max 100)"),
|
|
141
141
|
offset: z.number().int().min(0).optional().describe("Pagination offset"),
|
|
142
|
-
},
|
|
142
|
+
}),
|
|
143
143
|
}, async ({ status, poster, submitter, tag, limit, offset }) => {
|
|
144
144
|
try {
|
|
145
145
|
const params = new URLSearchParams();
|
|
@@ -175,9 +175,9 @@ Returns the bounty record, the first page of submissions, and:
|
|
|
175
175
|
- 'payment' hint (when status='winner-announced'): expectedMemo='BNTY:{bountyId}', recipientStxAddress, amountSats, sbtcContract
|
|
176
176
|
|
|
177
177
|
No authentication required.`,
|
|
178
|
-
inputSchema: {
|
|
178
|
+
inputSchema: z.object({
|
|
179
179
|
bounty_id: z.string().describe("Bounty ID"),
|
|
180
|
-
},
|
|
180
|
+
}),
|
|
181
181
|
}, async ({ bounty_id }) => {
|
|
182
182
|
try {
|
|
183
183
|
const data = await getJson(`${BOUNTY_BASE}/${encodeURIComponent(bounty_id)}`);
|
|
@@ -196,11 +196,11 @@ No authentication required.`,
|
|
|
196
196
|
Submissions are public (the inbox is public, so are bounty submissions).
|
|
197
197
|
|
|
198
198
|
No authentication required.`,
|
|
199
|
-
inputSchema: {
|
|
199
|
+
inputSchema: z.object({
|
|
200
200
|
bounty_id: z.string().describe("Bounty ID"),
|
|
201
201
|
limit: z.number().int().min(1).max(100).optional().describe("Max results (default 20)"),
|
|
202
202
|
offset: z.number().int().min(0).optional().describe("Pagination offset"),
|
|
203
|
-
},
|
|
203
|
+
}),
|
|
204
204
|
}, async ({ bounty_id, limit, offset }) => {
|
|
205
205
|
try {
|
|
206
206
|
const params = new URLSearchParams();
|
|
@@ -231,7 +231,7 @@ Fields:
|
|
|
231
231
|
- tags: optional list (max 5 tags, max 24 chars each)
|
|
232
232
|
|
|
233
233
|
Signs with BIP-322 over: "AIBTC Bounty Create | {posterBtc} | {title} | {description} | {rewardSats} | {expiresAt} | {tagsCommaJoined} | {signedAt}"`,
|
|
234
|
-
inputSchema: {
|
|
234
|
+
inputSchema: z.object({
|
|
235
235
|
title: z.string().min(1).max(120).describe("Bounty title (max 120 chars)"),
|
|
236
236
|
description: z.string().min(1).max(4000).describe("Task description (max 4000 chars)"),
|
|
237
237
|
reward_sats: z.number().int().positive().describe("Reward in satoshis"),
|
|
@@ -239,7 +239,7 @@ Signs with BIP-322 over: "AIBTC Bounty Create | {posterBtc} | {title} | {descrip
|
|
|
239
239
|
.string()
|
|
240
240
|
.describe("ISO 8601 expiry timestamp (e.g. '2026-06-01T00:00:00Z'). Min 1 hour, max 365 days from now."),
|
|
241
241
|
tags: z.array(z.string().max(24)).max(5).optional().describe("Up to 5 tags"),
|
|
242
|
-
},
|
|
242
|
+
}),
|
|
243
243
|
}, async ({ title, description, reward_sats, expires_at, tags }) => {
|
|
244
244
|
try {
|
|
245
245
|
const account = await requireBtcAccount();
|
|
@@ -281,11 +281,11 @@ Fields:
|
|
|
281
281
|
|
|
282
282
|
Signs with BIP-322 over: "AIBTC Bounty Submit | {bountyId} | {submitterBtc} | {message} | {contentUrl} | {signedAt}"
|
|
283
283
|
(contentUrl is the empty string when omitted)`,
|
|
284
|
-
inputSchema: {
|
|
284
|
+
inputSchema: z.object({
|
|
285
285
|
bounty_id: z.string().describe("Bounty ID to submit to"),
|
|
286
286
|
message: z.string().min(1).max(2000).describe("Submission message (max 2000 chars)"),
|
|
287
287
|
content_url: z.string().optional().describe("Optional link to the deliverable"),
|
|
288
|
-
},
|
|
288
|
+
}),
|
|
289
289
|
}, async ({ bounty_id, message, content_url }) => {
|
|
290
290
|
try {
|
|
291
291
|
const account = await requireBtcAccount();
|
|
@@ -320,10 +320,10 @@ to use for the payout. The poster has 7 days after acceptedAt to prove payment
|
|
|
320
320
|
with bounty_paid before the bounty flips to 'abandoned'.
|
|
321
321
|
|
|
322
322
|
Signs with BIP-322 over: "AIBTC Bounty Accept | {bountyId} | {submissionId} | {signedAt}"`,
|
|
323
|
-
inputSchema: {
|
|
323
|
+
inputSchema: z.object({
|
|
324
324
|
bounty_id: z.string().describe("Bounty ID"),
|
|
325
325
|
submission_id: z.string().describe("Submission ID to accept as the winner"),
|
|
326
|
-
},
|
|
326
|
+
}),
|
|
327
327
|
}, async ({ bounty_id, submission_id }) => {
|
|
328
328
|
try {
|
|
329
329
|
const account = await requireBtcAccount();
|
|
@@ -358,12 +358,12 @@ recipient = winner STX, amount ≥ rewardSats, memo equals 'BNTY:{bountyId}' byt
|
|
|
358
358
|
tx time > acceptedAt − 60s. The same txid cannot pay two bounties.
|
|
359
359
|
|
|
360
360
|
Signs with BIP-322 over: "AIBTC Bounty Paid | {bountyId} | {txid} | {signedAt}"`,
|
|
361
|
-
inputSchema: {
|
|
361
|
+
inputSchema: z.object({
|
|
362
362
|
bounty_id: z.string().describe("Bounty ID being paid"),
|
|
363
363
|
txid: z
|
|
364
364
|
.string()
|
|
365
365
|
.describe("Confirmed Stacks tx ID for the sBTC transfer with memo 'BNTY:{bountyId}'"),
|
|
366
|
-
},
|
|
366
|
+
}),
|
|
367
367
|
}, async ({ bounty_id, txid }) => {
|
|
368
368
|
try {
|
|
369
369
|
const account = await requireBtcAccount();
|
|
@@ -388,9 +388,9 @@ Signs with BIP-322 over: "AIBTC Bounty Paid | {bountyId} | {txid} | {signedAt}"`
|
|
|
388
388
|
description: `Cancel a bounty. Only the poster can call this, and only while status is 'open' or 'judging' (i.e. before any submission has been accepted).
|
|
389
389
|
|
|
390
390
|
Signs with BIP-322 over: "AIBTC Bounty Cancel | {bountyId} | {signedAt}"`,
|
|
391
|
-
inputSchema: {
|
|
391
|
+
inputSchema: z.object({
|
|
392
392
|
bounty_id: z.string().describe("Bounty ID to cancel"),
|
|
393
|
-
},
|
|
393
|
+
}),
|
|
394
394
|
}, async ({ bounty_id }) => {
|
|
395
395
|
try {
|
|
396
396
|
const account = await requireBtcAccount();
|
|
@@ -419,7 +419,7 @@ which are still open for submissions, which are in 'judging', and which need a w
|
|
|
419
419
|
Pass status='paid' / 'cancelled' / 'abandoned' to see specific terminal states. Pass include_terminal=true to fetch all states in parallel and return a combined view (up to 50 results).
|
|
420
420
|
|
|
421
421
|
No authentication required.`,
|
|
422
|
-
inputSchema: {
|
|
422
|
+
inputSchema: z.object({
|
|
423
423
|
btc_address: z
|
|
424
424
|
.string()
|
|
425
425
|
.optional()
|
|
@@ -431,7 +431,7 @@ No authentication required.`,
|
|
|
431
431
|
.boolean()
|
|
432
432
|
.optional()
|
|
433
433
|
.describe("If true, fetches active + paid + cancelled + abandoned in parallel and returns a combined view sorted by createdAt desc (up to 50 results)."),
|
|
434
|
-
},
|
|
434
|
+
}),
|
|
435
435
|
}, async ({ btc_address, status, include_terminal }) => {
|
|
436
436
|
try {
|
|
437
437
|
let address = btc_address;
|
|
@@ -461,7 +461,7 @@ on any row to see whether your specific submission was the one accepted, and whe
|
|
|
461
461
|
By default returns up to 50 active (non-terminal) bounties. Pass include_terminal=true for a combined view across all states.
|
|
462
462
|
|
|
463
463
|
No authentication required.`,
|
|
464
|
-
inputSchema: {
|
|
464
|
+
inputSchema: z.object({
|
|
465
465
|
btc_address: z
|
|
466
466
|
.string()
|
|
467
467
|
.optional()
|
|
@@ -473,7 +473,7 @@ No authentication required.`,
|
|
|
473
473
|
.boolean()
|
|
474
474
|
.optional()
|
|
475
475
|
.describe("If true, fetches all states in parallel and returns a combined view."),
|
|
476
|
-
},
|
|
476
|
+
}),
|
|
477
477
|
}, async ({ btc_address, status, include_terminal }) => {
|
|
478
478
|
try {
|
|
479
479
|
let address = btc_address;
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
* - inscribe_child: Step 1 - Broadcast commit tx for child inscription
|
|
11
11
|
* - inscribe_child_reveal: Step 2 - Broadcast reveal tx after commit confirms
|
|
12
12
|
*/
|
|
13
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
13
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
14
14
|
export declare function registerChildInscriptionTools(server: McpServer): void;
|
|
15
15
|
//# sourceMappingURL=child-inscription.tools.d.ts.map
|
|
@@ -24,7 +24,7 @@ export function registerChildInscriptionTools(server) {
|
|
|
24
24
|
description: "Calculate the total cost (in satoshis) for creating a child inscription. " +
|
|
25
25
|
"Accounts for the extra parent UTXO input and parent return output in the reveal transaction. " +
|
|
26
26
|
"Content should be provided as base64-encoded string.",
|
|
27
|
-
inputSchema: {
|
|
27
|
+
inputSchema: z.object({
|
|
28
28
|
contentType: z
|
|
29
29
|
.string()
|
|
30
30
|
.describe("MIME type (e.g., 'text/plain', 'image/png')"),
|
|
@@ -36,7 +36,7 @@ export function registerChildInscriptionTools(server) {
|
|
|
36
36
|
.positive()
|
|
37
37
|
.optional()
|
|
38
38
|
.describe("Fee rate in sat/vB (optional, defaults to current medium fee)"),
|
|
39
|
-
},
|
|
39
|
+
}),
|
|
40
40
|
}, async ({ contentType, contentBase64, feeRate }) => {
|
|
41
41
|
try {
|
|
42
42
|
const body = Buffer.from(contentBase64, "base64");
|
|
@@ -90,7 +90,7 @@ export function registerChildInscriptionTools(server) {
|
|
|
90
90
|
"This broadcasts the commit tx and returns immediately. After it confirms " +
|
|
91
91
|
"(typically 10-60 min), use `inscribe_child_reveal` to complete.\n\n" +
|
|
92
92
|
"Returns: commitTxid, revealAddress, revealAmount, parentInscriptionId, feeRate",
|
|
93
|
-
inputSchema: {
|
|
93
|
+
inputSchema: z.object({
|
|
94
94
|
contentType: z
|
|
95
95
|
.string()
|
|
96
96
|
.describe("MIME type (e.g., 'text/plain', 'image/png', 'text/html')"),
|
|
@@ -104,7 +104,7 @@ export function registerChildInscriptionTools(server) {
|
|
|
104
104
|
.union([z.enum(["fast", "medium", "slow"]), z.number().positive()])
|
|
105
105
|
.optional()
|
|
106
106
|
.describe("Fee rate: 'fast' (~10 min), 'medium' (~30 min), 'slow' (~1 hr), or number in sat/vB (default: medium)"),
|
|
107
|
-
},
|
|
107
|
+
}),
|
|
108
108
|
}, async ({ contentType, contentBase64, parentInscriptionId, feeRate }) => {
|
|
109
109
|
try {
|
|
110
110
|
// Check wallet session
|
|
@@ -205,7 +205,7 @@ export function registerChildInscriptionTools(server) {
|
|
|
205
205
|
"The reveal tx spends both the commit output and the parent inscription UTXO, " +
|
|
206
206
|
"returning the parent to your address and creating the child inscription.\n\n" +
|
|
207
207
|
"Returns: inscriptionId ({revealTxid}i0), parentInscriptionId on success",
|
|
208
|
-
inputSchema: {
|
|
208
|
+
inputSchema: z.object({
|
|
209
209
|
commitTxid: z
|
|
210
210
|
.string()
|
|
211
211
|
.length(64)
|
|
@@ -227,7 +227,7 @@ export function registerChildInscriptionTools(server) {
|
|
|
227
227
|
.union([z.enum(["fast", "medium", "slow"]), z.number().positive()])
|
|
228
228
|
.optional()
|
|
229
229
|
.describe("Fee rate for reveal tx (default: medium)"),
|
|
230
|
-
},
|
|
230
|
+
}),
|
|
231
231
|
}, async ({ commitTxid, revealAmount, contentType, contentBase64, parentInscriptionId, feeRate, }) => {
|
|
232
232
|
try {
|
|
233
233
|
// Check wallet session
|
|
@@ -19,6 +19,6 @@
|
|
|
19
19
|
* API spec + verifier implementation: aibtcdev/landing-page#734 (Phase 3.1).
|
|
20
20
|
* Schema source of truth: docs/rfc-d1-schema.md §swaps (migration 005).
|
|
21
21
|
*/
|
|
22
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
22
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
23
23
|
export declare function registerCompetitionTools(server: McpServer): void;
|
|
24
24
|
//# sourceMappingURL=competition.tools.d.ts.map
|
|
@@ -296,7 +296,7 @@ over the agent's swaps where \`tx_status === "success"\`. Prices come from Tener
|
|
|
296
296
|
- \`methodology: "mark_to_current"\`, \`priced_at\`: unix-millis stamp.
|
|
297
297
|
|
|
298
298
|
To be eligible for scoring, the agent needs **both** an aibtc.com website registration (dual-sig flow at https://aibtc.com) **and** an ERC-8004 agent_id (via \`identity_register\`). If \`registered: false\` or \`agent_id: null\`, complete the missing step and re-check. Pass \`include_pnl: false\` to skip the trades+Tenero round-trip when you only need the registration check. If no address is provided, uses the active wallet's Stacks address.`,
|
|
299
|
-
inputSchema: {
|
|
299
|
+
inputSchema: z.object({
|
|
300
300
|
address: stacksAddressSchema
|
|
301
301
|
.optional()
|
|
302
302
|
.describe("Stacks address of the agent. Defaults to the active wallet."),
|
|
@@ -304,7 +304,7 @@ To be eligible for scoring, the agent needs **both** an aibtc.com website regist
|
|
|
304
304
|
.boolean()
|
|
305
305
|
.optional()
|
|
306
306
|
.describe("Compute and attach `campaign_stats` (mark-to-current P&L over the agent's successful swaps). Defaults to true. Set false to skip the trades + Tenero round-trips when you only need the registration check."),
|
|
307
|
-
},
|
|
307
|
+
}),
|
|
308
308
|
}, async ({ address, include_pnl }) => {
|
|
309
309
|
try {
|
|
310
310
|
const target = await resolveAddress(address);
|
|
@@ -325,7 +325,7 @@ To be eligible for scoring, the agent needs **both** an aibtc.com website regist
|
|
|
325
325
|
description: `List an agent's trades from the concluded AIBTC trading competition.
|
|
326
326
|
|
|
327
327
|
Covers txids the agent submitted while the competition ran and txids discovered via passive address monitoring. Each entry is a swap row from migration 005: \`{ txid, sender, contract_id, function_name, token_in, amount_in, token_out, amount_out, burn_block_time, tx_status, source, scored_value, scored_at }\`. \`source\` distinguishes \`"agent"\` (your submission) from \`"cron"\` (nightly catch-up). Response: \`{ trades, next_cursor }\` — opaque cursor for pagination. If no address is provided, uses the active wallet's Stacks address.`,
|
|
328
|
-
inputSchema: {
|
|
328
|
+
inputSchema: z.object({
|
|
329
329
|
address: stacksAddressSchema
|
|
330
330
|
.optional()
|
|
331
331
|
.describe("Stacks address of the agent. Defaults to the active wallet."),
|
|
@@ -339,7 +339,7 @@ Covers txids the agent submitted while the competition ran and txids discovered
|
|
|
339
339
|
.string()
|
|
340
340
|
.optional()
|
|
341
341
|
.describe("Opaque pagination cursor from a previous response."),
|
|
342
|
-
},
|
|
342
|
+
}),
|
|
343
343
|
}, async ({ address, limit, cursor }) => {
|
|
344
344
|
try {
|
|
345
345
|
const target = await resolveAddress(address);
|
|
@@ -93,7 +93,7 @@ Post conditions constrain what assets the transaction can move. Each condition i
|
|
|
93
93
|
- STX: {type: 'stx', principal: 'SP...', conditionCode: 'eq'|'gt'|'gte'|'lt'|'lte', amount: '1000000'}
|
|
94
94
|
- FT: {type: 'ft', principal: 'SP...', asset: 'SP...contract', assetName: 'token-name', conditionCode: 'eq', amount: '1000'}
|
|
95
95
|
- NFT: {type: 'nft', principal: 'SP...', asset: 'SP...contract', assetName: 'nft-name', tokenId: '1', notSend?: boolean}`,
|
|
96
|
-
inputSchema: {
|
|
96
|
+
inputSchema: z.object({
|
|
97
97
|
contractAddress: z.string().describe("The contract deployer's address (e.g., SP2...)"),
|
|
98
98
|
contractName: z.string().describe("The contract name (e.g., 'my-token')"),
|
|
99
99
|
functionName: z.string().describe("The function to call (e.g., 'transfer')"),
|
|
@@ -114,7 +114,7 @@ Post conditions constrain what assets the transaction can move. Each condition i
|
|
|
114
114
|
.optional()
|
|
115
115
|
.describe("Optional fee: 'low' | 'medium' | 'high' preset or micro-STX amount. Clamped to 50,000 uSTX max for contract calls. If omitted, medium-priority fee is auto-resolved. Ignored when sponsored=true."),
|
|
116
116
|
sponsored: sponsoredSchema,
|
|
117
|
-
},
|
|
117
|
+
}),
|
|
118
118
|
}, async ({ contractAddress, contractName, functionName, functionArgs, postConditionMode, postConditions, fee, sponsored }) => {
|
|
119
119
|
try {
|
|
120
120
|
const account = await getAccount();
|
|
@@ -162,7 +162,7 @@ Post conditions constrain what assets the transaction can move. Each condition i
|
|
|
162
162
|
// Deploy contract
|
|
163
163
|
server.registerTool("deploy_contract", {
|
|
164
164
|
description: "Deploy a Clarity smart contract to the Stacks blockchain.",
|
|
165
|
-
inputSchema: {
|
|
165
|
+
inputSchema: z.object({
|
|
166
166
|
contractName: z.string().describe("Unique name for the contract (lowercase, hyphens allowed)"),
|
|
167
167
|
codeBody: z.string().describe("The complete Clarity source code"),
|
|
168
168
|
fee: z
|
|
@@ -170,7 +170,7 @@ Post conditions constrain what assets the transaction can move. Each condition i
|
|
|
170
170
|
.optional()
|
|
171
171
|
.describe("Optional fee: 'low' | 'medium' | 'high' preset or micro-STX amount. Clamped to 50,000 uSTX max for deployments. If omitted, medium-priority fee is auto-resolved. Ignored when sponsored=true."),
|
|
172
172
|
sponsored: sponsoredSchema,
|
|
173
|
-
},
|
|
173
|
+
}),
|
|
174
174
|
}, async ({ contractName, codeBody, fee, sponsored }) => {
|
|
175
175
|
try {
|
|
176
176
|
const account = await getAccount();
|
|
@@ -203,9 +203,9 @@ Post conditions constrain what assets the transaction can move. Each condition i
|
|
|
203
203
|
// Get transaction status
|
|
204
204
|
server.registerTool("get_transaction_status", {
|
|
205
205
|
description: "Check the status of a Stacks transaction by its txid.",
|
|
206
|
-
inputSchema: {
|
|
206
|
+
inputSchema: z.object({
|
|
207
207
|
txid: z.string().describe("The transaction ID (64 character hex string)"),
|
|
208
|
-
},
|
|
208
|
+
}),
|
|
209
209
|
}, async ({ txid }) => {
|
|
210
210
|
try {
|
|
211
211
|
const status = await getTransactionStatus(txid, NETWORK);
|
|
@@ -223,7 +223,7 @@ Post conditions constrain what assets the transaction can move. Each condition i
|
|
|
223
223
|
// Call read-only function
|
|
224
224
|
server.registerTool("call_read_only_function", {
|
|
225
225
|
description: "Call a read-only function on a smart contract (no signing required).",
|
|
226
|
-
inputSchema: {
|
|
226
|
+
inputSchema: z.object({
|
|
227
227
|
contractId: z.string().describe("Contract ID in format: address.contract-name"),
|
|
228
228
|
functionName: z.string().describe("The read-only function to call"),
|
|
229
229
|
functionArgs: z
|
|
@@ -231,7 +231,7 @@ Post conditions constrain what assets the transaction can move. Each condition i
|
|
|
231
231
|
.default([])
|
|
232
232
|
.describe("Function arguments. For explicit types: {type: 'uint'|'int'|'principal'|..., value: ...}"),
|
|
233
233
|
senderAddress: z.string().optional().describe("Optional sender address for the call"),
|
|
234
|
-
},
|
|
234
|
+
}),
|
|
235
235
|
}, async ({ contractId, functionName, functionArgs, senderAddress }) => {
|
|
236
236
|
try {
|
|
237
237
|
const hiro = getHiroApi(NETWORK);
|