flying-whale-mcp-server 1.48.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 (450) hide show
  1. package/README.md +575 -0
  2. package/dist/config/bitcoin-constants.d.ts +41 -0
  3. package/dist/config/bitcoin-constants.d.ts.map +1 -0
  4. package/dist/config/bitcoin-constants.js +41 -0
  5. package/dist/config/bitcoin-constants.js.map +1 -0
  6. package/dist/config/caip.d.ts +66 -0
  7. package/dist/config/caip.d.ts.map +1 -0
  8. package/dist/config/caip.js +84 -0
  9. package/dist/config/caip.js.map +1 -0
  10. package/dist/config/contracts.d.ts +215 -0
  11. package/dist/config/contracts.d.ts.map +1 -0
  12. package/dist/config/contracts.js +245 -0
  13. package/dist/config/contracts.js.map +1 -0
  14. package/dist/config/index.d.ts +4 -0
  15. package/dist/config/index.d.ts.map +1 -0
  16. package/dist/config/index.js +4 -0
  17. package/dist/config/index.js.map +1 -0
  18. package/dist/config/networks.d.ts +11 -0
  19. package/dist/config/networks.d.ts.map +1 -0
  20. package/dist/config/networks.js +21 -0
  21. package/dist/config/networks.js.map +1 -0
  22. package/dist/config/pillar.d.ts +3 -0
  23. package/dist/config/pillar.d.ts.map +1 -0
  24. package/dist/config/pillar.js +6 -0
  25. package/dist/config/pillar.js.map +1 -0
  26. package/dist/config/sponsor.d.ts +19 -0
  27. package/dist/config/sponsor.d.ts.map +1 -0
  28. package/dist/config/sponsor.js +26 -0
  29. package/dist/config/sponsor.js.map +1 -0
  30. package/dist/endpoints/index.d.ts +2 -0
  31. package/dist/endpoints/index.d.ts.map +1 -0
  32. package/dist/endpoints/index.js +2 -0
  33. package/dist/endpoints/index.js.map +1 -0
  34. package/dist/endpoints/registry.d.ts +41 -0
  35. package/dist/endpoints/registry.d.ts.map +1 -0
  36. package/dist/endpoints/registry.js +1240 -0
  37. package/dist/endpoints/registry.js.map +1 -0
  38. package/dist/index.d.ts +3 -0
  39. package/dist/index.d.ts.map +1 -0
  40. package/dist/index.js +159 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/services/bitflow.service.d.ts +160 -0
  43. package/dist/services/bitflow.service.d.ts.map +1 -0
  44. package/dist/services/bitflow.service.js +426 -0
  45. package/dist/services/bitflow.service.js.map +1 -0
  46. package/dist/services/bns.service.d.ts +114 -0
  47. package/dist/services/bns.service.d.ts.map +1 -0
  48. package/dist/services/bns.service.js +472 -0
  49. package/dist/services/bns.service.js.map +1 -0
  50. package/dist/services/credentials.d.ts +31 -0
  51. package/dist/services/credentials.d.ts.map +1 -0
  52. package/dist/services/credentials.js +162 -0
  53. package/dist/services/credentials.js.map +1 -0
  54. package/dist/services/defi.service.d.ts +221 -0
  55. package/dist/services/defi.service.d.ts.map +1 -0
  56. package/dist/services/defi.service.js +661 -0
  57. package/dist/services/defi.service.js.map +1 -0
  58. package/dist/services/erc8004.service.d.ts +174 -0
  59. package/dist/services/erc8004.service.d.ts.map +1 -0
  60. package/dist/services/erc8004.service.js +546 -0
  61. package/dist/services/erc8004.service.js.map +1 -0
  62. package/dist/services/hiro-api.d.ts +499 -0
  63. package/dist/services/hiro-api.d.ts.map +1 -0
  64. package/dist/services/hiro-api.js +447 -0
  65. package/dist/services/hiro-api.js.map +1 -0
  66. package/dist/services/inscription-parser.d.ts +122 -0
  67. package/dist/services/inscription-parser.d.ts.map +1 -0
  68. package/dist/services/inscription-parser.js +163 -0
  69. package/dist/services/inscription-parser.js.map +1 -0
  70. package/dist/services/mempool-api.d.ts +261 -0
  71. package/dist/services/mempool-api.d.ts.map +1 -0
  72. package/dist/services/mempool-api.js +245 -0
  73. package/dist/services/mempool-api.js.map +1 -0
  74. package/dist/services/nft.service.d.ts +71 -0
  75. package/dist/services/nft.service.d.ts.map +1 -0
  76. package/dist/services/nft.service.js +163 -0
  77. package/dist/services/nft.service.js.map +1 -0
  78. package/dist/services/nonce-tracker.d.ts +135 -0
  79. package/dist/services/nonce-tracker.d.ts.map +1 -0
  80. package/dist/services/nonce-tracker.js +315 -0
  81. package/dist/services/nonce-tracker.js.map +1 -0
  82. package/dist/services/ordinal-indexer.d.ts +128 -0
  83. package/dist/services/ordinal-indexer.d.ts.map +1 -0
  84. package/dist/services/ordinal-indexer.js +126 -0
  85. package/dist/services/ordinal-indexer.js.map +1 -0
  86. package/dist/services/pillar-api.service.d.ts +11 -0
  87. package/dist/services/pillar-api.service.d.ts.map +1 -0
  88. package/dist/services/pillar-api.service.js +53 -0
  89. package/dist/services/pillar-api.service.js.map +1 -0
  90. package/dist/services/sbtc-deposit.service.d.ts +246 -0
  91. package/dist/services/sbtc-deposit.service.d.ts.map +1 -0
  92. package/dist/services/sbtc-deposit.service.js +376 -0
  93. package/dist/services/sbtc-deposit.service.js.map +1 -0
  94. package/dist/services/sbtc.service.d.ts +72 -0
  95. package/dist/services/sbtc.service.d.ts.map +1 -0
  96. package/dist/services/sbtc.service.js +193 -0
  97. package/dist/services/sbtc.service.js.map +1 -0
  98. package/dist/services/scaffold.service.d.ts +47 -0
  99. package/dist/services/scaffold.service.d.ts.map +1 -0
  100. package/dist/services/scaffold.service.js +1298 -0
  101. package/dist/services/scaffold.service.js.map +1 -0
  102. package/dist/services/signing-key.service.d.ts +82 -0
  103. package/dist/services/signing-key.service.d.ts.map +1 -0
  104. package/dist/services/signing-key.service.js +339 -0
  105. package/dist/services/signing-key.service.js.map +1 -0
  106. package/dist/services/stacking.service.d.ts +58 -0
  107. package/dist/services/stacking.service.d.ts.map +1 -0
  108. package/dist/services/stacking.service.js +166 -0
  109. package/dist/services/stacking.service.js.map +1 -0
  110. package/dist/services/tenero-api.d.ts +76 -0
  111. package/dist/services/tenero-api.d.ts.map +1 -0
  112. package/dist/services/tenero-api.js +108 -0
  113. package/dist/services/tenero-api.js.map +1 -0
  114. package/dist/services/tokens.service.d.ts +63 -0
  115. package/dist/services/tokens.service.d.ts.map +1 -0
  116. package/dist/services/tokens.service.js +132 -0
  117. package/dist/services/tokens.service.js.map +1 -0
  118. package/dist/services/unisat-indexer.d.ts +97 -0
  119. package/dist/services/unisat-indexer.d.ts.map +1 -0
  120. package/dist/services/unisat-indexer.js +178 -0
  121. package/dist/services/unisat-indexer.js.map +1 -0
  122. package/dist/services/wallet-manager.d.ts +120 -0
  123. package/dist/services/wallet-manager.d.ts.map +1 -0
  124. package/dist/services/wallet-manager.js +512 -0
  125. package/dist/services/wallet-manager.js.map +1 -0
  126. package/dist/services/x402.service.d.ts +119 -0
  127. package/dist/services/x402.service.d.ts.map +1 -0
  128. package/dist/services/x402.service.js +479 -0
  129. package/dist/services/x402.service.js.map +1 -0
  130. package/dist/tools/arxiv-research.tools.d.ts +16 -0
  131. package/dist/tools/arxiv-research.tools.d.ts.map +1 -0
  132. package/dist/tools/arxiv-research.tools.js +433 -0
  133. package/dist/tools/arxiv-research.tools.js.map +1 -0
  134. package/dist/tools/bitcoin.tools.d.ts +15 -0
  135. package/dist/tools/bitcoin.tools.d.ts.map +1 -0
  136. package/dist/tools/bitcoin.tools.js +475 -0
  137. package/dist/tools/bitcoin.tools.js.map +1 -0
  138. package/dist/tools/bitflow.tools.d.ts +3 -0
  139. package/dist/tools/bitflow.tools.d.ts.map +1 -0
  140. package/dist/tools/bitflow.tools.js +676 -0
  141. package/dist/tools/bitflow.tools.js.map +1 -0
  142. package/dist/tools/bns.tools.d.ts +3 -0
  143. package/dist/tools/bns.tools.d.ts.map +1 -0
  144. package/dist/tools/bns.tools.js +294 -0
  145. package/dist/tools/bns.tools.js.map +1 -0
  146. package/dist/tools/bounty-scanner.tools.d.ts +29 -0
  147. package/dist/tools/bounty-scanner.tools.d.ts.map +1 -0
  148. package/dist/tools/bounty-scanner.tools.js +370 -0
  149. package/dist/tools/bounty-scanner.tools.js.map +1 -0
  150. package/dist/tools/child-inscription.tools.d.ts +15 -0
  151. package/dist/tools/child-inscription.tools.d.ts.map +1 -0
  152. package/dist/tools/child-inscription.tools.js +338 -0
  153. package/dist/tools/child-inscription.tools.js.map +1 -0
  154. package/dist/tools/contract.tools.d.ts +3 -0
  155. package/dist/tools/contract.tools.d.ts.map +1 -0
  156. package/dist/tools/contract.tools.js +258 -0
  157. package/dist/tools/contract.tools.js.map +1 -0
  158. package/dist/tools/credentials.tools.d.ts +9 -0
  159. package/dist/tools/credentials.tools.d.ts.map +1 -0
  160. package/dist/tools/credentials.tools.js +151 -0
  161. package/dist/tools/credentials.tools.js.map +1 -0
  162. package/dist/tools/defi.tools.d.ts +3 -0
  163. package/dist/tools/defi.tools.d.ts.map +1 -0
  164. package/dist/tools/defi.tools.js +469 -0
  165. package/dist/tools/defi.tools.js.map +1 -0
  166. package/dist/tools/dual-stacking.tools.d.ts +3 -0
  167. package/dist/tools/dual-stacking.tools.d.ts.map +1 -0
  168. package/dist/tools/dual-stacking.tools.js +281 -0
  169. package/dist/tools/dual-stacking.tools.js.map +1 -0
  170. package/dist/tools/endpoint.tools.d.ts +3 -0
  171. package/dist/tools/endpoint.tools.d.ts.map +1 -0
  172. package/dist/tools/endpoint.tools.js +393 -0
  173. package/dist/tools/endpoint.tools.js.map +1 -0
  174. package/dist/tools/erc8004.tools.d.ts +21 -0
  175. package/dist/tools/erc8004.tools.d.ts.map +1 -0
  176. package/dist/tools/erc8004.tools.js +329 -0
  177. package/dist/tools/erc8004.tools.js.map +1 -0
  178. package/dist/tools/flying-whale.tools.d.ts +46 -0
  179. package/dist/tools/flying-whale.tools.d.ts.map +1 -0
  180. package/dist/tools/flying-whale.tools.js +586 -0
  181. package/dist/tools/flying-whale.tools.js.map +1 -0
  182. package/dist/tools/identity.tools.d.ts +22 -0
  183. package/dist/tools/identity.tools.d.ts.map +1 -0
  184. package/dist/tools/identity.tools.js +404 -0
  185. package/dist/tools/identity.tools.js.map +1 -0
  186. package/dist/tools/inbox.tools.d.ts +3 -0
  187. package/dist/tools/inbox.tools.d.ts.map +1 -0
  188. package/dist/tools/inbox.tools.js +457 -0
  189. package/dist/tools/inbox.tools.js.map +1 -0
  190. package/dist/tools/index.d.ts +6 -0
  191. package/dist/tools/index.d.ts.map +1 -0
  192. package/dist/tools/index.js +189 -0
  193. package/dist/tools/index.js.map +1 -0
  194. package/dist/tools/jingswap.tools.d.ts +3 -0
  195. package/dist/tools/jingswap.tools.d.ts.map +1 -0
  196. package/dist/tools/jingswap.tools.js +584 -0
  197. package/dist/tools/jingswap.tools.js.map +1 -0
  198. package/dist/tools/mempool.tools.d.ts +13 -0
  199. package/dist/tools/mempool.tools.d.ts.map +1 -0
  200. package/dist/tools/mempool.tools.js +125 -0
  201. package/dist/tools/mempool.tools.js.map +1 -0
  202. package/dist/tools/news.tools.d.ts +27 -0
  203. package/dist/tools/news.tools.d.ts.map +1 -0
  204. package/dist/tools/news.tools.js +443 -0
  205. package/dist/tools/news.tools.js.map +1 -0
  206. package/dist/tools/nft.tools.d.ts +3 -0
  207. package/dist/tools/nft.tools.d.ts.map +1 -0
  208. package/dist/tools/nft.tools.js +159 -0
  209. package/dist/tools/nft.tools.js.map +1 -0
  210. package/dist/tools/nonce.tools.d.ts +11 -0
  211. package/dist/tools/nonce.tools.d.ts.map +1 -0
  212. package/dist/tools/nonce.tools.js +689 -0
  213. package/dist/tools/nonce.tools.js.map +1 -0
  214. package/dist/tools/nostr.tools.d.ts +3 -0
  215. package/dist/tools/nostr.tools.d.ts.map +1 -0
  216. package/dist/tools/nostr.tools.js +409 -0
  217. package/dist/tools/nostr.tools.js.map +1 -0
  218. package/dist/tools/openrouter.tools.d.ts +3 -0
  219. package/dist/tools/openrouter.tools.d.ts.map +1 -0
  220. package/dist/tools/openrouter.tools.js +664 -0
  221. package/dist/tools/openrouter.tools.js.map +1 -0
  222. package/dist/tools/ordinals-marketplace.tools.d.ts +21 -0
  223. package/dist/tools/ordinals-marketplace.tools.d.ts.map +1 -0
  224. package/dist/tools/ordinals-marketplace.tools.js +428 -0
  225. package/dist/tools/ordinals-marketplace.tools.js.map +1 -0
  226. package/dist/tools/ordinals-p2p.tools.d.ts +21 -0
  227. package/dist/tools/ordinals-p2p.tools.d.ts.map +1 -0
  228. package/dist/tools/ordinals-p2p.tools.js +621 -0
  229. package/dist/tools/ordinals-p2p.tools.js.map +1 -0
  230. package/dist/tools/ordinals.tools.d.ts +15 -0
  231. package/dist/tools/ordinals.tools.d.ts.map +1 -0
  232. package/dist/tools/ordinals.tools.js +389 -0
  233. package/dist/tools/ordinals.tools.js.map +1 -0
  234. package/dist/tools/pillar-direct.tools.d.ts +3 -0
  235. package/dist/tools/pillar-direct.tools.d.ts.map +1 -0
  236. package/dist/tools/pillar-direct.tools.js +1209 -0
  237. package/dist/tools/pillar-direct.tools.js.map +1 -0
  238. package/dist/tools/pillar.tools.d.ts +3 -0
  239. package/dist/tools/pillar.tools.d.ts.map +1 -0
  240. package/dist/tools/pillar.tools.js +896 -0
  241. package/dist/tools/pillar.tools.js.map +1 -0
  242. package/dist/tools/psbt.helpers.d.ts +12 -0
  243. package/dist/tools/psbt.helpers.d.ts.map +1 -0
  244. package/dist/tools/psbt.helpers.js +34 -0
  245. package/dist/tools/psbt.helpers.js.map +1 -0
  246. package/dist/tools/psbt.tools.d.ts +3 -0
  247. package/dist/tools/psbt.tools.d.ts.map +1 -0
  248. package/dist/tools/psbt.tools.js +384 -0
  249. package/dist/tools/psbt.tools.js.map +1 -0
  250. package/dist/tools/query.tools.d.ts +3 -0
  251. package/dist/tools/query.tools.d.ts.map +1 -0
  252. package/dist/tools/query.tools.js +280 -0
  253. package/dist/tools/query.tools.js.map +1 -0
  254. package/dist/tools/relay-diagnostic.tools.d.ts +8 -0
  255. package/dist/tools/relay-diagnostic.tools.d.ts.map +1 -0
  256. package/dist/tools/relay-diagnostic.tools.js +120 -0
  257. package/dist/tools/relay-diagnostic.tools.js.map +1 -0
  258. package/dist/tools/reputation.tools.d.ts +24 -0
  259. package/dist/tools/reputation.tools.d.ts.map +1 -0
  260. package/dist/tools/reputation.tools.js +449 -0
  261. package/dist/tools/reputation.tools.js.map +1 -0
  262. package/dist/tools/runes.tools.d.ts +25 -0
  263. package/dist/tools/runes.tools.d.ts.map +1 -0
  264. package/dist/tools/runes.tools.js +464 -0
  265. package/dist/tools/runes.tools.js.map +1 -0
  266. package/dist/tools/sbtc.tools.d.ts +3 -0
  267. package/dist/tools/sbtc.tools.d.ts.map +1 -0
  268. package/dist/tools/sbtc.tools.js +507 -0
  269. package/dist/tools/sbtc.tools.js.map +1 -0
  270. package/dist/tools/scaffold.tools.d.ts +3 -0
  271. package/dist/tools/scaffold.tools.d.ts.map +1 -0
  272. package/dist/tools/scaffold.tools.js +309 -0
  273. package/dist/tools/scaffold.tools.js.map +1 -0
  274. package/dist/tools/schemas.d.ts +9 -0
  275. package/dist/tools/schemas.d.ts.map +1 -0
  276. package/dist/tools/schemas.js +14 -0
  277. package/dist/tools/schemas.js.map +1 -0
  278. package/dist/tools/session-guard.d.ts +104 -0
  279. package/dist/tools/session-guard.d.ts.map +1 -0
  280. package/dist/tools/session-guard.js +330 -0
  281. package/dist/tools/session-guard.js.map +1 -0
  282. package/dist/tools/settings.tools.d.ts +6 -0
  283. package/dist/tools/settings.tools.d.ts.map +1 -0
  284. package/dist/tools/settings.tools.js +251 -0
  285. package/dist/tools/settings.tools.js.map +1 -0
  286. package/dist/tools/signing.tools.d.ts +29 -0
  287. package/dist/tools/signing.tools.d.ts.map +1 -0
  288. package/dist/tools/signing.tools.js +1364 -0
  289. package/dist/tools/signing.tools.js.map +1 -0
  290. package/dist/tools/skill-mappings.d.ts +15 -0
  291. package/dist/tools/skill-mappings.d.ts.map +1 -0
  292. package/dist/tools/skill-mappings.js +387 -0
  293. package/dist/tools/skill-mappings.js.map +1 -0
  294. package/dist/tools/souldinals.tools.d.ts +18 -0
  295. package/dist/tools/souldinals.tools.d.ts.map +1 -0
  296. package/dist/tools/souldinals.tools.js +551 -0
  297. package/dist/tools/souldinals.tools.js.map +1 -0
  298. package/dist/tools/stacking-lottery.tools.d.ts +3 -0
  299. package/dist/tools/stacking-lottery.tools.d.ts.map +1 -0
  300. package/dist/tools/stacking-lottery.tools.js +425 -0
  301. package/dist/tools/stacking-lottery.tools.js.map +1 -0
  302. package/dist/tools/stacking.tools.d.ts +3 -0
  303. package/dist/tools/stacking.tools.d.ts.map +1 -0
  304. package/dist/tools/stacking.tools.js +112 -0
  305. package/dist/tools/stacking.tools.js.map +1 -0
  306. package/dist/tools/stacks-market.tools.d.ts +22 -0
  307. package/dist/tools/stacks-market.tools.d.ts.map +1 -0
  308. package/dist/tools/stacks-market.tools.js +630 -0
  309. package/dist/tools/stacks-market.tools.js.map +1 -0
  310. package/dist/tools/styx.tools.d.ts +20 -0
  311. package/dist/tools/styx.tools.d.ts.map +1 -0
  312. package/dist/tools/styx.tools.js +399 -0
  313. package/dist/tools/styx.tools.js.map +1 -0
  314. package/dist/tools/taproot-multisig.tools.d.ts +17 -0
  315. package/dist/tools/taproot-multisig.tools.d.ts.map +1 -0
  316. package/dist/tools/taproot-multisig.tools.js +236 -0
  317. package/dist/tools/taproot-multisig.tools.js.map +1 -0
  318. package/dist/tools/tenero.tools.d.ts +22 -0
  319. package/dist/tools/tenero.tools.d.ts.map +1 -0
  320. package/dist/tools/tenero.tools.js +318 -0
  321. package/dist/tools/tenero.tools.js.map +1 -0
  322. package/dist/tools/tokens.tools.d.ts +3 -0
  323. package/dist/tools/tokens.tools.d.ts.map +1 -0
  324. package/dist/tools/tokens.tools.js +159 -0
  325. package/dist/tools/tokens.tools.js.map +1 -0
  326. package/dist/tools/transfer.tools.d.ts +3 -0
  327. package/dist/tools/transfer.tools.d.ts.map +1 -0
  328. package/dist/tools/transfer.tools.js +78 -0
  329. package/dist/tools/transfer.tools.js.map +1 -0
  330. package/dist/tools/wallet-management.tools.d.ts +6 -0
  331. package/dist/tools/wallet-management.tools.d.ts.map +1 -0
  332. package/dist/tools/wallet-management.tools.js +459 -0
  333. package/dist/tools/wallet-management.tools.js.map +1 -0
  334. package/dist/tools/wallet.tools.d.ts +3 -0
  335. package/dist/tools/wallet.tools.d.ts.map +1 -0
  336. package/dist/tools/wallet.tools.js +123 -0
  337. package/dist/tools/wallet.tools.js.map +1 -0
  338. package/dist/tools/yield-dashboard.tools.d.ts +17 -0
  339. package/dist/tools/yield-dashboard.tools.d.ts.map +1 -0
  340. package/dist/tools/yield-dashboard.tools.js +559 -0
  341. package/dist/tools/yield-dashboard.tools.js.map +1 -0
  342. package/dist/tools/yield-hunter.tools.d.ts +3 -0
  343. package/dist/tools/yield-hunter.tools.d.ts.map +1 -0
  344. package/dist/tools/yield-hunter.tools.js +576 -0
  345. package/dist/tools/yield-hunter.tools.js.map +1 -0
  346. package/dist/transactions/bitcoin-builder.d.ts +175 -0
  347. package/dist/transactions/bitcoin-builder.d.ts.map +1 -0
  348. package/dist/transactions/bitcoin-builder.js +227 -0
  349. package/dist/transactions/bitcoin-builder.js.map +1 -0
  350. package/dist/transactions/builder.d.ts +117 -0
  351. package/dist/transactions/builder.d.ts.map +1 -0
  352. package/dist/transactions/builder.js +234 -0
  353. package/dist/transactions/builder.js.map +1 -0
  354. package/dist/transactions/child-inscription-builder.d.ts +112 -0
  355. package/dist/transactions/child-inscription-builder.d.ts.map +1 -0
  356. package/dist/transactions/child-inscription-builder.js +269 -0
  357. package/dist/transactions/child-inscription-builder.js.map +1 -0
  358. package/dist/transactions/clarity-values.d.ts +67 -0
  359. package/dist/transactions/clarity-values.d.ts.map +1 -0
  360. package/dist/transactions/clarity-values.js +169 -0
  361. package/dist/transactions/clarity-values.js.map +1 -0
  362. package/dist/transactions/inscription-builder.d.ts +212 -0
  363. package/dist/transactions/inscription-builder.d.ts.map +1 -0
  364. package/dist/transactions/inscription-builder.js +250 -0
  365. package/dist/transactions/inscription-builder.js.map +1 -0
  366. package/dist/transactions/post-conditions.d.ts +29 -0
  367. package/dist/transactions/post-conditions.d.ts.map +1 -0
  368. package/dist/transactions/post-conditions.js +105 -0
  369. package/dist/transactions/post-conditions.js.map +1 -0
  370. package/dist/transactions/rune-transfer-builder.d.ts +46 -0
  371. package/dist/transactions/rune-transfer-builder.d.ts.map +1 -0
  372. package/dist/transactions/rune-transfer-builder.js +128 -0
  373. package/dist/transactions/rune-transfer-builder.js.map +1 -0
  374. package/dist/transactions/runestone-builder.d.ts +40 -0
  375. package/dist/transactions/runestone-builder.d.ts.map +1 -0
  376. package/dist/transactions/runestone-builder.js +76 -0
  377. package/dist/transactions/runestone-builder.js.map +1 -0
  378. package/dist/transactions/sponsor-builder.d.ts +30 -0
  379. package/dist/transactions/sponsor-builder.d.ts.map +1 -0
  380. package/dist/transactions/sponsor-builder.js +184 -0
  381. package/dist/transactions/sponsor-builder.js.map +1 -0
  382. package/dist/utils/bip322.d.ts +48 -0
  383. package/dist/utils/bip322.d.ts.map +1 -0
  384. package/dist/utils/bip322.js +110 -0
  385. package/dist/utils/bip322.js.map +1 -0
  386. package/dist/utils/bitcoin.d.ts +234 -0
  387. package/dist/utils/bitcoin.d.ts.map +1 -0
  388. package/dist/utils/bitcoin.js +329 -0
  389. package/dist/utils/bitcoin.js.map +1 -0
  390. package/dist/utils/encryption.d.ts +33 -0
  391. package/dist/utils/encryption.d.ts.map +1 -0
  392. package/dist/utils/encryption.js +110 -0
  393. package/dist/utils/encryption.js.map +1 -0
  394. package/dist/utils/erc8004-helpers.d.ts +18 -0
  395. package/dist/utils/erc8004-helpers.d.ts.map +1 -0
  396. package/dist/utils/erc8004-helpers.js +39 -0
  397. package/dist/utils/erc8004-helpers.js.map +1 -0
  398. package/dist/utils/errors.d.ts +94 -0
  399. package/dist/utils/errors.d.ts.map +1 -0
  400. package/dist/utils/errors.js +150 -0
  401. package/dist/utils/errors.js.map +1 -0
  402. package/dist/utils/fee.d.ts +56 -0
  403. package/dist/utils/fee.d.ts.map +1 -0
  404. package/dist/utils/fee.js +127 -0
  405. package/dist/utils/fee.js.map +1 -0
  406. package/dist/utils/formatting.d.ts +51 -0
  407. package/dist/utils/formatting.d.ts.map +1 -0
  408. package/dist/utils/formatting.js +114 -0
  409. package/dist/utils/formatting.js.map +1 -0
  410. package/dist/utils/index.d.ts +10 -0
  411. package/dist/utils/index.d.ts.map +1 -0
  412. package/dist/utils/index.js +10 -0
  413. package/dist/utils/index.js.map +1 -0
  414. package/dist/utils/redact.d.ts +10 -0
  415. package/dist/utils/redact.d.ts.map +1 -0
  416. package/dist/utils/redact.js +16 -0
  417. package/dist/utils/redact.js.map +1 -0
  418. package/dist/utils/relay-health.d.ts +74 -0
  419. package/dist/utils/relay-health.d.ts.map +1 -0
  420. package/dist/utils/relay-health.js +274 -0
  421. package/dist/utils/relay-health.js.map +1 -0
  422. package/dist/utils/storage.d.ts +145 -0
  423. package/dist/utils/storage.d.ts.map +1 -0
  424. package/dist/utils/storage.js +300 -0
  425. package/dist/utils/storage.js.map +1 -0
  426. package/dist/utils/tokens.d.ts +13 -0
  427. package/dist/utils/tokens.d.ts.map +1 -0
  428. package/dist/utils/tokens.js +24 -0
  429. package/dist/utils/tokens.js.map +1 -0
  430. package/dist/utils/x402-protocol.d.ts +131 -0
  431. package/dist/utils/x402-protocol.d.ts.map +1 -0
  432. package/dist/utils/x402-protocol.js +58 -0
  433. package/dist/utils/x402-protocol.js.map +1 -0
  434. package/dist/utils/x402-recovery.d.ts +39 -0
  435. package/dist/utils/x402-recovery.d.ts.map +1 -0
  436. package/dist/utils/x402-recovery.js +85 -0
  437. package/dist/utils/x402-recovery.js.map +1 -0
  438. package/dist/yield-hunter/index.d.ts +9 -0
  439. package/dist/yield-hunter/index.d.ts.map +1 -0
  440. package/dist/yield-hunter/index.js +314 -0
  441. package/dist/yield-hunter/index.js.map +1 -0
  442. package/package.json +78 -0
  443. package/skill/README.md +108 -0
  444. package/skill/SKILL.md +245 -0
  445. package/skill/references/genesis-lifecycle.md +464 -0
  446. package/skill/references/inscription-workflow.md +297 -0
  447. package/skill/references/pillar-wallet.md +213 -0
  448. package/skill/references/stacks-defi.md +482 -0
  449. package/skill/references/troubleshooting.md +211 -0
  450. package/skill/references/x402-inbox.md +145 -0
package/README.md ADDED
@@ -0,0 +1,575 @@
1
+ # @aibtc/mcp-server
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@aibtc/mcp-server.svg)](https://www.npmjs.com/package/@aibtc/mcp-server)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+
6
+ Bitcoin-native MCP server for AI agents: BTC/STX wallets, DeFi yield, sBTC peg, NFTs, and x402 payments.
7
+
8
+ ## Features
9
+
10
+ - **Bitcoin L1** - Check balances, send BTC, manage UTXOs via mempool.space
11
+ - **Agent's Own Wallet** - Agents get their own wallet to perform blockchain transactions
12
+ - **Secure Storage** - Wallets encrypted with AES-256-GCM and stored locally
13
+ - **150+ Tools** - Bitcoin L1 + comprehensive Stacks L2 operations
14
+ - **sBTC Support** - Native Bitcoin on Stacks operations
15
+ - **Token Operations** - SIP-010 fungible token transfers and queries
16
+ - **NFT Support** - SIP-009 NFT holdings, transfers, and metadata
17
+ - **DeFi Trading** - ALEX DEX swaps and Zest Protocol lending/borrowing
18
+ - **Stacking/PoX** - Stacking status and delegation
19
+ - **BNS Domains** - .btc domain lookups and management (V1 + V2)
20
+ - **x402 Payments** - Automatic payment handling for paid APIs
21
+
22
+ ## Quick Start
23
+
24
+ ### Claude Code (Terminal)
25
+
26
+ ```bash
27
+ npx @aibtc/mcp-server@latest --install
28
+ ```
29
+
30
+ That's it! This automatically configures Claude Code. Restart your terminal and start chatting.
31
+
32
+ ### Claude Desktop (App)
33
+
34
+ ```bash
35
+ npx @aibtc/mcp-server@latest --install --desktop
36
+ ```
37
+
38
+ This detects your OS and writes to the correct Claude Desktop config file:
39
+
40
+ | OS | Config Path |
41
+ |----|-------------|
42
+ | macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` |
43
+ | Linux | `~/.config/Claude/claude_desktop_config.json` |
44
+ | Windows | `%APPDATA%/Claude/claude_desktop_config.json` |
45
+
46
+ Restart Claude Desktop after installing.
47
+
48
+ ### Testnet Mode
49
+
50
+ Add `--testnet` to either command:
51
+
52
+ ```bash
53
+ # Claude Code on testnet
54
+ npx @aibtc/mcp-server@latest --install --testnet
55
+
56
+ # Claude Desktop on testnet
57
+ npx @aibtc/mcp-server@latest --install --desktop --testnet
58
+ ```
59
+
60
+ > **Why npx?** Using `npx @aibtc/mcp-server@latest` ensures you always get the newest version automatically. Global installs (`npm install -g`) won't auto-update.
61
+
62
+ ### Manual Configuration
63
+
64
+ If you prefer to configure manually, add the following to your config file.
65
+
66
+ **Claude Code** (`~/.claude.json`):
67
+
68
+ ```json
69
+ {
70
+ "mcpServers": {
71
+ "aibtc": {
72
+ "command": "npx",
73
+ "args": ["@aibtc/mcp-server@latest"],
74
+ "env": {
75
+ "NETWORK": "mainnet"
76
+ }
77
+ }
78
+ }
79
+ }
80
+ ```
81
+
82
+ **Claude Desktop** (`claude_desktop_config.json` -- see path table above):
83
+
84
+ ```json
85
+ {
86
+ "mcpServers": {
87
+ "aibtc": {
88
+ "command": "npx",
89
+ "args": ["-y", "@aibtc/mcp-server@latest"],
90
+ "env": {
91
+ "NETWORK": "mainnet"
92
+ }
93
+ }
94
+ }
95
+ }
96
+ ```
97
+
98
+ > **Note:** Claude Desktop requires the `-y` flag in args so npx doesn't prompt for confirmation.
99
+
100
+ ## Giving Claude a Wallet
101
+
102
+ When you first use @aibtc/mcp-server, Claude doesn't have a wallet. Here's the smooth onboarding flow:
103
+
104
+ ### Example Conversation
105
+
106
+ ```
107
+ You: What's your wallet address?
108
+
109
+ Claude: I don't have a wallet yet. Would you like to assign me one?
110
+ I can either create a fresh wallet or you can import an existing one.
111
+
112
+ You: Create a new wallet called "agent-wallet"
113
+
114
+ Claude: What password should I use to protect the wallet?
115
+
116
+ You: use "secure123password"
117
+
118
+ Claude: I now have a wallet! My address is ST1ABC...XYZ
119
+
120
+ IMPORTANT: Please save this recovery phrase securely:
121
+ "word1 word2 word3 ... word24"
122
+
123
+ This phrase will NOT be shown again. It's the only way to recover
124
+ the wallet if the password is forgotten.
125
+
126
+ You: Send 10 STX to ST2DEF...
127
+
128
+ Claude: Done! I've sent 10 STX to ST2DEF...
129
+ Transaction: 0x123...
130
+ ```
131
+
132
+ ### Wallet States
133
+
134
+ | State | What Claude Says | What To Do |
135
+ |-------|-----------------|------------|
136
+ | No wallet | "I don't have a wallet yet" | Use `wallet_create` or `wallet_import` |
137
+ | Locked | "My wallet is locked" | Use `wallet_unlock` with password |
138
+ | Ready | "My address is ST..." | Claude can perform transactions |
139
+
140
+ ### Session Management
141
+
142
+ - By default, the wallet auto-locks after 15 minutes
143
+ - You can change this with `wallet_set_timeout` (set to 0 to disable)
144
+ - Use `wallet_lock` to manually lock the wallet
145
+ - Use `wallet_unlock` when you need Claude to transact again
146
+
147
+ ## Wallet Storage
148
+
149
+ Claude's wallets are stored locally on your machine:
150
+
151
+ ```
152
+ ~/.aibtc/
153
+ ├── wallets.json # Wallet index (names, addresses - no secrets)
154
+ ├── config.json # Active wallet, settings
155
+ └── wallets/
156
+ └── [wallet-id]/
157
+ └── keystore.json # Encrypted mnemonic (AES-256-GCM + Scrypt)
158
+ ```
159
+
160
+ **Security:**
161
+ - AES-256-GCM encryption with Scrypt key derivation
162
+ - Password required to unlock
163
+ - Mnemonics never stored in plaintext
164
+ - File permissions set to owner-only (0600)
165
+
166
+ ## Bitcoin L1 Support
167
+
168
+ Each wallet automatically derives both a **Stacks address** and a **Bitcoin address** from the same mnemonic using BIP39/BIP32 standards.
169
+
170
+ **Derivation Paths (BIP84):**
171
+ - Mainnet: `m/84'/0'/0'/0/0` (Bitcoin coin type 0)
172
+ - Testnet: `m/84'/1'/0'/0/0` (Bitcoin testnet coin type 1)
173
+
174
+ **Address Format:**
175
+ - Mainnet: `bc1q...` (Native SegWit P2WPKH)
176
+ - Testnet: `tb1q...` (Native SegWit P2WPKH)
177
+
178
+ **Capabilities:**
179
+ - Full Bitcoin L1 transaction support (send BTC)
180
+ - Balance and UTXO queries via mempool.space API
181
+ - Fee estimation (fast/medium/slow)
182
+ - P2WPKH (native SegWit) transactions for optimal fees
183
+
184
+ **Example:**
185
+ ```
186
+ You: Create a wallet called "my-wallet"
187
+ Claude: I've created a wallet with:
188
+ Stacks address: ST1ABC...
189
+ Bitcoin address: bc1q...
190
+
191
+ You: Send 50000 sats to bc1q...
192
+ Claude: Done! Transaction broadcast: abc123...
193
+ ```
194
+
195
+ Both addresses are derived from the same recovery phrase, making it easy to manage both Layer 1 (Bitcoin) and Layer 2 (Stacks) assets.
196
+
197
+ ## Available Tools (150+ total)
198
+
199
+ ### Wallet Management
200
+ | Tool | Description |
201
+ |------|-------------|
202
+ | `wallet_create` | Create a new wallet for Claude |
203
+ | `wallet_import` | Import an existing wallet for Claude |
204
+ | `wallet_unlock` | Unlock Claude's wallet |
205
+ | `wallet_lock` | Lock Claude's wallet |
206
+ | `wallet_list` | List Claude's available wallets |
207
+ | `wallet_switch` | Switch Claude to a different wallet |
208
+ | `wallet_delete` | Delete a wallet |
209
+ | `wallet_export` | Export wallet mnemonic |
210
+ | `wallet_status` | Check if Claude's wallet is ready (includes Stacks and Bitcoin addresses) |
211
+ | `wallet_set_timeout` | Set how long wallet stays unlocked |
212
+
213
+ ### Bitcoin L1
214
+ | Tool | Description |
215
+ |------|-------------|
216
+ | `get_btc_balance` | Get BTC balance (total, confirmed, unconfirmed) |
217
+ | `get_btc_fees` | Get fee estimates (fast, medium, slow) |
218
+ | `get_btc_utxos` | List UTXOs for an address |
219
+ | `transfer_btc` | Send BTC to a recipient |
220
+ | `get_cardinal_utxos` | UTXOs safe to spend (no inscriptions) |
221
+ | `get_ordinal_utxos` | UTXOs containing inscriptions |
222
+
223
+ ### Mempool Watch (Bitcoin)
224
+ | Tool | Description |
225
+ |------|-------------|
226
+ | `get_btc_mempool_info` | Get current Bitcoin mempool statistics (tx count, vsize, fees, fee histogram) |
227
+ | `get_btc_transaction_status` | Get confirmation status and details for a Bitcoin transaction by txid |
228
+ | `get_btc_address_txs` | Get recent transaction history for a Bitcoin address (last 25 transactions) |
229
+
230
+ ### Bitcoin Inscriptions
231
+ | Tool | Description |
232
+ |------|-------------|
233
+ | `get_taproot_address` | Get wallet's Taproot (P2TR) address |
234
+ | `estimate_inscription_fee` | Calculate inscription cost |
235
+ | `inscribe` | Create inscription commit transaction |
236
+ | `inscribe_reveal` | Complete inscription reveal transaction |
237
+ | `get_inscription` | Fetch inscription content from reveal tx |
238
+ | `get_inscriptions_by_address` | List inscriptions owned by address |
239
+
240
+ ### PSBT & Ordinals Trading
241
+ | Tool | Description |
242
+ |------|-------------|
243
+ | `psbt_create_ordinal_buy` | Build a buyer-side PSBT for ordinal purchase |
244
+ | `psbt_sign` | Sign selected PSBT inputs with active wallet keys |
245
+ | `psbt_decode` | Decode PSBT inputs/outputs/signature status |
246
+ | `psbt_broadcast` | Finalize and broadcast a fully-signed PSBT |
247
+
248
+ ### Message Signing
249
+ | Tool | Description |
250
+ |------|-------------|
251
+ | `sip018_sign` | Sign structured Clarity data (SIP-018) |
252
+ | `sip018_verify` | Verify SIP-018 signature |
253
+ | `sip018_hash` | Compute SIP-018 hash without signing |
254
+ | `stacks_sign_message` | Sign plain text (SIWS-compatible) |
255
+ | `stacks_verify_message` | Verify Stacks message signature |
256
+ | `btc_sign_message` | Sign with Bitcoin key (BIP-137) |
257
+ | `btc_verify_message` | Verify BIP-137 signature |
258
+
259
+ ### Wallet & Balance
260
+ | Tool | Description |
261
+ |------|-------------|
262
+ | `get_wallet_info` | Get Claude's wallet addresses (Stacks + Bitcoin) and status |
263
+ | `get_stx_balance` | Get STX balance for any address |
264
+ | `get_stx_fees` | Get STX fee estimates (low, medium, high) |
265
+
266
+ ### STX Transfers
267
+ | Tool | Description |
268
+ |------|-------------|
269
+ | `transfer_stx` | Send STX to a recipient |
270
+ | `broadcast_transaction` | Broadcast a pre-signed transaction |
271
+
272
+ ### sBTC Operations
273
+ | Tool | Description |
274
+ |------|-------------|
275
+ | `sbtc_get_balance` | Get sBTC balance |
276
+ | `sbtc_transfer` | Send sBTC |
277
+ | `sbtc_initiate_withdrawal` | Initiate sBTC peg-out to BTC L1 |
278
+ | `sbtc_withdraw` | Alias for withdrawal initiation |
279
+ | `sbtc_withdrawal_status` | Check withdrawal request status |
280
+ | `sbtc_get_deposit_info` | Get BTC deposit instructions |
281
+ | `sbtc_deposit` | Build, sign, and broadcast BTC→sBTC deposit |
282
+ | `sbtc_deposit_status` | Check deposit status via Emily API |
283
+ | `sbtc_get_peg_info` | Get peg ratio and TVL |
284
+
285
+ ### Token Operations (SIP-010)
286
+ | Tool | Description |
287
+ |------|-------------|
288
+ | `get_token_balance` | Get balance of any SIP-010 token |
289
+ | `transfer_token` | Send any SIP-010 token |
290
+ | `get_token_info` | Get token metadata |
291
+ | `list_user_tokens` | List tokens owned by an address |
292
+ | `get_token_holders` | Get top holders of a token |
293
+
294
+ ### NFT Operations (SIP-009)
295
+ | Tool | Description |
296
+ |------|-------------|
297
+ | `get_nft_holdings` | List NFTs owned by an address |
298
+ | `get_nft_metadata` | Get NFT metadata |
299
+ | `transfer_nft` | Send an NFT |
300
+ | `get_nft_owner` | Get NFT owner |
301
+ | `get_collection_info` | Get NFT collection details |
302
+ | `get_nft_history` | Get NFT transfer history |
303
+
304
+ ### Stacking / PoX
305
+ | Tool | Description |
306
+ |------|-------------|
307
+ | `get_pox_info` | Get current PoX cycle info |
308
+ | `get_stacking_status` | Check stacking status |
309
+ | `stack_stx` | Lock STX for stacking |
310
+ | `extend_stacking` | Extend stacking period |
311
+
312
+ ### BNS Domains (V1 + V2)
313
+ | Tool | Description |
314
+ |------|-------------|
315
+ | `lookup_bns_name` | Resolve .btc domain to address |
316
+ | `reverse_bns_lookup` | Get .btc domain for an address |
317
+ | `get_bns_info` | Get domain details |
318
+ | `check_bns_availability` | Check if domain is available |
319
+ | `get_bns_price` | Get registration price |
320
+ | `list_user_domains` | List domains owned |
321
+ | `preorder_bns_name` | Preorder a .btc domain (step 1 of 2) |
322
+ | `register_bns_name` | Register a .btc domain (step 2 of 2) |
323
+
324
+ ### Smart Contracts
325
+ | Tool | Description |
326
+ |------|-------------|
327
+ | `call_contract` | Call a smart contract function |
328
+ | `deploy_contract` | Deploy a Clarity smart contract |
329
+ | `get_transaction_status` | Check transaction status |
330
+ | `call_read_only_function` | Call read-only function |
331
+
332
+ ### DeFi - ALEX DEX (Mainnet)
333
+
334
+ Uses the official `alex-sdk` for swap operations. Supports simple token symbols like "STX", "ALEX".
335
+
336
+ | Tool | Description |
337
+ |------|-------------|
338
+ | `alex_list_pools` | Discover all available trading pools |
339
+ | `alex_get_swap_quote` | Get expected output for a token swap |
340
+ | `alex_swap` | Execute a token swap (SDK handles routing) |
341
+ | `alex_get_pool_info` | Get liquidity pool reserves |
342
+
343
+ ### DeFi - Zest Protocol (Mainnet)
344
+
345
+ Supports 10 assets: sBTC, aeUSDC, stSTX, wSTX, USDH, sUSDT, USDA, DIKO, ALEX, stSTX-BTC
346
+
347
+ | Tool | Description |
348
+ |------|-------------|
349
+ | `zest_list_assets` | List all supported lending assets |
350
+ | `zest_get_position` | Get user's supply/borrow position |
351
+ | `zest_supply` | Supply assets to earn interest |
352
+ | `zest_withdraw` | Withdraw supplied assets |
353
+ | `zest_borrow` | Borrow against collateral |
354
+ | `zest_repay` | Repay borrowed assets |
355
+
356
+ ### DeFi - Bitflow DEX (Mainnet)
357
+
358
+ DEX aggregator that routes trades across multiple liquidity sources.
359
+
360
+ > **Units:** Bitflow tools default to **human units** (`amountUnit: "human"`). Pass `"2"` to swap 2 STX, not `"2000000"`. Set `amountUnit: "base"` only when working with raw on-chain integers. See [Units & Decimals guide](skill/references/stacks-defi.md#units--decimals-bitflow--defi) for details and common pitfalls.
361
+
362
+ | Tool | Description |
363
+ |------|-------------|
364
+ | `bitflow_get_ticker` | Get market data (no API key needed) |
365
+ | `bitflow_get_quote` | Get swap quote |
366
+ | `bitflow_swap` | Execute token swap |
367
+
368
+ ### Pillar Smart Wallet
369
+
370
+ sBTC smart wallet with Zest Protocol integration and passkey authentication.
371
+
372
+ | Tool | Description |
373
+ |------|-------------|
374
+ | `pillar_connect` | Connect to Pillar wallet |
375
+ | `pillar_send` | Send sBTC to BNS names or addresses |
376
+ | `pillar_boost` | Create leveraged sBTC position |
377
+ | `pillar_position` | View wallet and Zest position |
378
+
379
+ For autonomous agents, use `pillar_direct_*` tools (no browser needed).
380
+
381
+ ### Blockchain Queries
382
+ | Tool | Description |
383
+ |------|-------------|
384
+ | `get_account_info` | Get account nonce, balance |
385
+ | `get_account_transactions` | List transaction history |
386
+ | `get_block_info` | Get block details |
387
+ | `get_mempool_info` | Get pending transactions |
388
+ | `get_contract_info` | Get contract ABI and source |
389
+ | `get_contract_events` | Get contract event history |
390
+ | `get_network_status` | Get network health status |
391
+
392
+ ### Yield Hunter (Autonomous)
393
+ | Tool | Description |
394
+ |------|-------------|
395
+ | `yield_hunter_start` | Start autonomous sBTC→Zest deposits |
396
+ | `yield_hunter_stop` | Stop yield hunting |
397
+ | `yield_hunter_status` | Check yield hunter status |
398
+ | `yield_hunter_configure` | Adjust threshold, reserve, interval |
399
+
400
+ ### x402 API Endpoints
401
+ | Tool | Description |
402
+ |------|-------------|
403
+ | `list_x402_endpoints` | Discover x402 endpoints |
404
+ | `execute_x402_endpoint` | Execute x402 endpoint with auto-payment |
405
+ | `scaffold_x402_endpoint` | Generate x402 Cloudflare Worker project |
406
+ | `scaffold_x402_ai_endpoint` | Generate x402 AI API with OpenRouter |
407
+
408
+ ## Usage Examples
409
+
410
+ **Wallet management:**
411
+ > "What's your wallet address?"
412
+ > "Create a wallet for yourself"
413
+ > "Unlock your wallet"
414
+ > "Keep your wallet unlocked for 1 hour"
415
+
416
+ **Check balances:**
417
+ > "How much STX do you have?"
418
+ > "What's your sBTC balance?"
419
+
420
+ **Transfer tokens:**
421
+ > "Send 2 STX to ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM"
422
+ > "Transfer 0.001 sBTC to muneeb.btc"
423
+
424
+ **NFTs:**
425
+ > "What NFTs do you own?"
426
+ > "Send this NFT to alice.btc"
427
+
428
+ **BNS domains:**
429
+ > "What address is satoshi.btc?"
430
+ > "Is myname.btc available?"
431
+
432
+ **DeFi trading (mainnet):**
433
+ > "What pools are available on ALEX?"
434
+ > "Swap 0.1 STX for ALEX"
435
+ > "Get a quote for 100 STX to ALEX"
436
+ > "What assets can I lend on Zest?"
437
+ > "Supply 100 stSTX to Zest"
438
+ > "Borrow 50 aeUSDC from Zest"
439
+ > "Check my Zest position"
440
+
441
+ **x402 endpoints:**
442
+ > "Get trending liquidity pools"
443
+ > "Tell me a dad joke"
444
+
445
+ ## Supported Tokens
446
+
447
+ Well-known tokens can be referenced by symbol:
448
+ - **sBTC** - Native Bitcoin on Stacks
449
+ - **USDCx** - USD Coin on Stacks
450
+ - **ALEX** - ALEX governance token
451
+ - **wSTX** - Wrapped STX
452
+
453
+ **ALEX DEX tokens:** STX, ALEX, and any token from `alex_list_pools`
454
+
455
+ **Zest Protocol assets:** sBTC, aeUSDC, stSTX, wSTX, USDH, sUSDT, USDA, DIKO, ALEX, stSTX-BTC
456
+
457
+ Or use any SIP-010 token by contract ID: `SP2X...::token-name`
458
+
459
+ ## Configuration
460
+
461
+ | Environment Variable | Description | Default |
462
+ |---------------------|-------------|---------|
463
+ | `NETWORK` | `mainnet` or `testnet` | `mainnet` (installer) / `testnet` (if unset) |
464
+ | `API_URL` | Default x402 API base URL | `https://x402.biwas.xyz` |
465
+ | `CLIENT_MNEMONIC` | (Optional) Pre-configured mnemonic | - |
466
+ | `HIRO_API_KEY` | (Optional) Hiro API key for higher rate limits | - |
467
+
468
+ **Note on `NETWORK`:** The `--install` command writes `NETWORK=mainnet` by default (pass `--testnet` to use testnet). If you omit `NETWORK` from your config entirely, the runtime fallback is `testnet`. Most users should set this explicitly.
469
+
470
+ **Note:** `CLIENT_MNEMONIC` is optional. The recommended approach is to let Claude create its own wallet. `HIRO_API_KEY` is optional but recommended for production use — without it, you may hit Hiro's public rate limits (429 responses). Get a key at [platform.hiro.so](https://platform.hiro.so).
471
+
472
+ ## Architecture
473
+
474
+ ```
475
+ You ←→ Claude ←→ aibtc-mcp-server
476
+
477
+ Claude's Wallet (~/.aibtc/)
478
+
479
+ ┌─────────┴─────────┐
480
+ ↓ ↓
481
+ Hiro Stacks API x402 Endpoints
482
+ ↓ ↓
483
+ Stacks Blockchain Paid API Services
484
+ ```
485
+
486
+ ## Security Notes
487
+
488
+ - Claude's wallet is stored encrypted on YOUR machine
489
+ - Password is never stored - only the encrypted keystore
490
+ - Mnemonics shown only once at creation
491
+ - Auto-lock after 15 minutes (configurable)
492
+ - Transactions signed locally before broadcast
493
+ - For mainnet: Fund with small amounts first
494
+
495
+ ## Advanced: Pre-configured Mnemonic
496
+
497
+ For automated setups where Claude needs immediate wallet access, add the `CLIENT_MNEMONIC` environment variable to your MCP server config (in `~/.claude.json` for Claude Code, or `claude_desktop_config.json` for Claude Desktop):
498
+
499
+ ```json
500
+ {
501
+ "mcpServers": {
502
+ "aibtc": {
503
+ "command": "npx",
504
+ "args": ["@aibtc/mcp-server@latest"],
505
+ "env": {
506
+ "CLIENT_MNEMONIC": "your twenty four word mnemonic phrase",
507
+ "NETWORK": "testnet"
508
+ }
509
+ }
510
+ }
511
+ }
512
+ ```
513
+
514
+ This bypasses the wallet creation flow - Claude has immediate access to transact.
515
+
516
+ ## Agent Skill
517
+
518
+ This package includes an [Agent Skills](https://agentskills.io) compatible skill that teaches any LLM how to use the Bitcoin wallet capabilities effectively.
519
+
520
+ ### What is it?
521
+
522
+ The `aibtc-bitcoin-wallet` skill provides:
523
+ - Structured workflows for Bitcoin L1 operations (balance, send, fees)
524
+ - Reference guides for Pillar smart wallets and Stacks L2 DeFi
525
+ - LLM-agnostic instructions that work with Claude Code, Cursor, Codex, and 20+ other tools
526
+
527
+ ### Using the Skill
528
+
529
+ The skill is automatically included when you install the MCP server. Find it at:
530
+ - **Local**: `node_modules/@aibtc/mcp-server/skill/SKILL.md`
531
+ - **ClawHub**: [clawhub.ai/skills](https://www.clawhub.ai/skills) - search for `aibtc-bitcoin-wallet`
532
+
533
+ ### Skill Structure
534
+
535
+ ```
536
+ skill/
537
+ ├── SKILL.md # Bitcoin L1 core workflows
538
+ └── references/
539
+ ├── genesis-lifecycle.md # Agent registration & check-in
540
+ ├── inscription-workflow.md # Bitcoin inscription guide
541
+ ├── pillar-wallet.md # Pillar smart wallet guide
542
+ ├── stacks-defi.md # Stacks L2 / DeFi operations
543
+ └── troubleshooting.md # Common issues and solutions
544
+ ```
545
+
546
+ ## Development
547
+
548
+ ```bash
549
+ git clone https://github.com/aibtcdev/aibtc-mcp-server.git
550
+ cd aibtc-mcp-server
551
+ npm install
552
+ npm run build
553
+ npm run dev # Run with tsx (development)
554
+ ```
555
+
556
+ ### Releases
557
+
558
+ This repo uses [Release Please](https://github.com/googleapis/release-please) for automated releases:
559
+
560
+ 1. Merge PRs with conventional commits (`feat:`, `fix:`, etc.)
561
+ 2. Release Please creates a Release PR with changelog
562
+ 3. Merge the Release PR to publish
563
+
564
+ ### Repository Secrets (Maintainers)
565
+
566
+ | Secret | Description |
567
+ |--------|-------------|
568
+ | `NPM_TOKEN` | npm publish token for @aibtc scope |
569
+ | `CLAWHUB_API_TOKEN` | ClawHub API token for skill publishing |
570
+
571
+ To obtain a ClawHub API token, visit [clawhub.ai](https://www.clawhub.ai) and create an account.
572
+
573
+ ## License
574
+
575
+ MIT
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Bitcoin transaction size constants (virtual bytes)
3
+ *
4
+ * Based on Bitcoin Core and @scure/btc-signer calculations.
5
+ * Used for fee estimation across P2WPKH and P2TR transactions.
6
+ */
7
+ /**
8
+ * P2WPKH input size: ~68 vB (includes witness data at 1/4 weight)
9
+ */
10
+ export declare const P2WPKH_INPUT_VBYTES = 68;
11
+ /**
12
+ * P2WPKH output size: ~31 vB
13
+ */
14
+ export declare const P2WPKH_OUTPUT_VBYTES = 31;
15
+ /**
16
+ * P2TR (Taproot) output size: ~43 vB
17
+ */
18
+ export declare const P2TR_OUTPUT_VBYTES = 43;
19
+ /**
20
+ * Base transaction overhead: ~10.5 vB (version, locktime, witness marker/flag)
21
+ */
22
+ export declare const TX_OVERHEAD_VBYTES = 10.5;
23
+ /**
24
+ * Minimum output value (dust threshold)
25
+ * Below this value, outputs are non-standard and won't be relayed
26
+ */
27
+ export declare const DUST_THRESHOLD = 546;
28
+ /**
29
+ * Taproot input base size (vbytes) - without witness data
30
+ */
31
+ export declare const P2TR_INPUT_BASE_VBYTES = 57.5;
32
+ /**
33
+ * Inscription witness overhead (vbytes) - control block, script, and protocol framing
34
+ */
35
+ export declare const WITNESS_OVERHEAD_VBYTES = 80;
36
+ /**
37
+ * BIP 125 RBF sequence number.
38
+ * Any sequence < 0xfffffffe signals replaceability, allowing fee bumps via RBF.
39
+ */
40
+ export declare const RBF_SEQUENCE = 4294967293;
41
+ //# sourceMappingURL=bitcoin-constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bitcoin-constants.d.ts","sourceRoot":"","sources":["../../src/config/bitcoin-constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC;;GAEG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,kBAAkB,OAAO,CAAC;AAEvC;;;GAGG;AACH,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC;;GAEG;AACH,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C;;;GAGG;AACH,eAAO,MAAM,YAAY,aAAa,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Bitcoin transaction size constants (virtual bytes)
3
+ *
4
+ * Based on Bitcoin Core and @scure/btc-signer calculations.
5
+ * Used for fee estimation across P2WPKH and P2TR transactions.
6
+ */
7
+ /**
8
+ * P2WPKH input size: ~68 vB (includes witness data at 1/4 weight)
9
+ */
10
+ export const P2WPKH_INPUT_VBYTES = 68;
11
+ /**
12
+ * P2WPKH output size: ~31 vB
13
+ */
14
+ export const P2WPKH_OUTPUT_VBYTES = 31;
15
+ /**
16
+ * P2TR (Taproot) output size: ~43 vB
17
+ */
18
+ export const P2TR_OUTPUT_VBYTES = 43;
19
+ /**
20
+ * Base transaction overhead: ~10.5 vB (version, locktime, witness marker/flag)
21
+ */
22
+ export const TX_OVERHEAD_VBYTES = 10.5;
23
+ /**
24
+ * Minimum output value (dust threshold)
25
+ * Below this value, outputs are non-standard and won't be relayed
26
+ */
27
+ export const DUST_THRESHOLD = 546;
28
+ /**
29
+ * Taproot input base size (vbytes) - without witness data
30
+ */
31
+ export const P2TR_INPUT_BASE_VBYTES = 57.5;
32
+ /**
33
+ * Inscription witness overhead (vbytes) - control block, script, and protocol framing
34
+ */
35
+ export const WITNESS_OVERHEAD_VBYTES = 80;
36
+ /**
37
+ * BIP 125 RBF sequence number.
38
+ * Any sequence < 0xfffffffe signals replaceability, allowing fee bumps via RBF.
39
+ */
40
+ export const RBF_SEQUENCE = 0xfffffffd;
41
+ //# sourceMappingURL=bitcoin-constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bitcoin-constants.js","sourceRoot":"","sources":["../../src/config/bitcoin-constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAEtC;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAErC;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAEvC;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAE1C;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC"}