bsv-mcp 0.0.21 → 0.0.23

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.
@@ -12,24 +12,28 @@ export function registerUtilsTools(server: McpServer): void {
12
12
  server.tool(
13
13
  "utils_convertData",
14
14
  "Converts data between different encodings (utf8, hex, base64, binary). Useful for transforming data formats when working with blockchain data, encryption, or file processing.\n\n" +
15
- "Parameters:\n" +
16
- "- data (required): The string to convert\n" +
17
- "- from (required): Source encoding format (utf8, hex, base64, or binary)\n" +
18
- "- to (required): Target encoding format (utf8, hex, base64, or binary)\n\n" +
19
- "Example usage:\n" +
20
- "- UTF-8 to hex: {\"data\": \"hello world\", \"from\": \"utf8\", \"to\": \"hex\"} → 68656c6c6f20776f726c64\n" +
21
- "- UTF-8 to base64: {\"data\": \"Hello World\", \"from\": \"utf8\", \"to\": \"base64\"} → SGVsbG8gV29ybGQ=\n" +
22
- "- base64 to UTF-8: {\"data\": \"SGVsbG8gV29ybGQ=\", \"from\": \"base64\", \"to\": \"utf8\"} → Hello World\n" +
23
- "- hex to base64: {\"data\": \"68656c6c6f20776f726c64\", \"from\": \"hex\", \"to\": \"base64\"} → aGVsbG8gd29ybGQ=\n\n" +
24
- "Notes:\n" +
25
- "- All parameters are required\n" +
26
- "- The tool returns the converted data as a string\n" +
27
- "- For binary conversion, data is represented as an array of byte values",
15
+ "Parameters:\n" +
16
+ "- data (required): The string to convert\n" +
17
+ "- from (required): Source encoding format (utf8, hex, base64, or binary)\n" +
18
+ "- to (required): Target encoding format (utf8, hex, base64, or binary)\n\n" +
19
+ "Example usage:\n" +
20
+ '- UTF-8 to hex: {"data": "hello world", "from": "utf8", "to": "hex"} → 68656c6c6f20776f726c64\n' +
21
+ '- UTF-8 to base64: {"data": "Hello World", "from": "utf8", "to": "base64"} → SGVsbG8gV29ybGQ=\n' +
22
+ '- base64 to UTF-8: {"data": "SGVsbG8gV29ybGQ=", "from": "base64", "to": "utf8"} → Hello World\n' +
23
+ '- hex to base64: {"data": "68656c6c6f20776f726c64", "from": "hex", "to": "base64"} → aGVsbG8gd29ybGQ=\n\n' +
24
+ "Notes:\n" +
25
+ "- All parameters are required\n" +
26
+ "- The tool returns the converted data as a string\n" +
27
+ "- For binary conversion, data is represented as an array of byte values",
28
28
  {
29
29
  args: z.object({
30
30
  data: z.string().describe("The data string to be converted"),
31
- from: encodingSchema.describe("Source encoding format (utf8, hex, base64, or binary)"),
32
- to: encodingSchema.describe("Target encoding format to convert to (utf8, hex, base64, or binary)"),
31
+ from: encodingSchema.describe(
32
+ "Source encoding format (utf8, hex, base64, or binary)",
33
+ ),
34
+ to: encodingSchema.describe(
35
+ "Target encoding format to convert to (utf8, hex, base64, or binary)",
36
+ ),
33
37
  }),
34
38
  },
35
39
  async ({ args }) => {
@@ -2,13 +2,13 @@ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
  import type { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js";
3
3
  import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
4
4
  import { createOrdinals } from "js-1sat-ord";
5
- import type {
6
- ChangeResult,
7
- Destination,
8
- Inscription,
9
- PreMAP,
5
+ import type {
6
+ ChangeResult,
7
+ CreateOrdinalsCollectionItemMetadata,
10
8
  CreateOrdinalsCollectionMetadata,
11
- CreateOrdinalsCollectionItemMetadata
9
+ Destination,
10
+ Inscription,
11
+ PreMAP,
12
12
  } from "js-1sat-ord";
13
13
  import { z } from "zod";
14
14
  import type { Wallet } from "./wallet";
@@ -24,9 +24,15 @@ export const createOrdinalsArgsSchema = z.object({
24
24
  // Content type (e.g., "image/jpeg", "text/plain", etc.)
25
25
  contentType: z.string().describe("MIME type of the content"),
26
26
  // Optional destination address (if not provided, uses the wallet's address)
27
- destinationAddress: z.string().optional().describe("Optional destination address for the ordinal"),
27
+ destinationAddress: z
28
+ .string()
29
+ .optional()
30
+ .describe("Optional destination address for the ordinal"),
28
31
  // Optional metadata for the inscription
29
- metadata: z.any().optional().describe("Optional MAP metadata for the inscription")
32
+ metadata: z
33
+ .any()
34
+ .optional()
35
+ .describe("Optional MAP metadata for the inscription"),
30
36
  });
31
37
 
32
38
  export type CreateOrdinalsArgs = z.infer<typeof createOrdinalsArgsSchema>;
@@ -53,7 +59,9 @@ export function registerCreateOrdinalsTool(server: McpServer, wallet: Wallet) {
53
59
  // 2. Get payment UTXOs from wallet
54
60
  const { paymentUtxos } = await wallet.getUtxos();
55
61
  if (!paymentUtxos || paymentUtxos.length === 0) {
56
- throw new Error("No payment UTXOs available to fund this inscription");
62
+ throw new Error(
63
+ "No payment UTXOs available to fund this inscription",
64
+ );
57
65
  }
58
66
 
59
67
  // 3. Get the wallet address for change/destination if not provided
@@ -79,19 +87,25 @@ export function registerCreateOrdinalsTool(server: McpServer, wallet: Wallet) {
79
87
  destinations,
80
88
  paymentPk,
81
89
  changeAddress: walletAddress,
82
- metaData: args.metadata as PreMAP | CreateOrdinalsCollectionMetadata | CreateOrdinalsCollectionItemMetadata,
90
+ metaData: args.metadata as
91
+ | PreMAP
92
+ | CreateOrdinalsCollectionMetadata
93
+ | CreateOrdinalsCollectionItemMetadata,
83
94
  });
84
95
 
85
96
  const changeResult = result as ChangeResult;
86
-
97
+
87
98
  // 7. Broadcast the transaction
88
99
  await changeResult.tx.broadcast();
89
-
100
+
90
101
  // 8. Refresh the wallet's UTXOs after spending
91
102
  try {
92
103
  await wallet.refreshUtxos();
93
104
  } catch (refreshError) {
94
- console.warn("Failed to refresh UTXOs after transaction:", refreshError);
105
+ console.warn(
106
+ "Failed to refresh UTXOs after transaction:",
107
+ refreshError,
108
+ );
95
109
  }
96
110
 
97
111
  // 9. Return transaction details
@@ -11,7 +11,12 @@ export function registerGetAddressTool(server: McpServer): void {
11
11
  "wallet_getAddress",
12
12
  "Retrieves the current wallet's Bitcoin SV address. This address can be used to receive BSV, ordinals, or tokens, and is derived from the wallet's private key.",
13
13
  {
14
- args: z.object({}).optional().describe("No parameters required - simply returns the current wallet address"),
14
+ args: z
15
+ .object({})
16
+ .optional()
17
+ .describe(
18
+ "No parameters required - simply returns the current wallet address",
19
+ ),
15
20
  },
16
21
  async () => {
17
22
  try {
@@ -7,9 +7,9 @@ import {
7
7
  type ExistingListing,
8
8
  type Payment,
9
9
  type Royalty,
10
+ TokenType,
10
11
  type TokenUtxo,
11
12
  type Utxo,
12
- TokenType,
13
13
  oneSatBroadcaster,
14
14
  purchaseOrdListing,
15
15
  purchaseOrdTokenListing,
@@ -160,31 +160,30 @@ Please fund this wallet address with enough BSV to cover the purchase price
160
160
 
161
161
  // Create the purchase transaction based on listing type
162
162
  let transaction: ChangeResult;
163
-
163
+
164
164
  if (args.listingType === "token") {
165
165
  if (!args.tokenProtocol) {
166
166
  throw new Error("tokenProtocol is required for token listings");
167
167
  }
168
-
168
+
169
169
  if (!args.tokenID) {
170
170
  throw new Error("tokenID is required for token listings");
171
171
  }
172
-
172
+
173
173
  // Validate token data from the listing
174
174
  if (!listingData.data.bsv20) {
175
175
  throw new Error("This is not a valid BSV-20 token listing");
176
176
  }
177
-
177
+
178
178
  // For BSV-20, the amount should be included in the listing data
179
179
  if (!listingData.data.bsv20.amt) {
180
180
  throw new Error("Token listing doesn't have an amount specified");
181
181
  }
182
-
182
+
183
183
  // Convert the token protocol to the enum type expected by js-1sat-ord
184
- const protocol = args.tokenProtocol === "bsv-20"
185
- ? TokenType.BSV20
186
- : TokenType.BSV21;
187
-
184
+ const protocol =
185
+ args.tokenProtocol === "bsv-20" ? TokenType.BSV20 : TokenType.BSV21;
186
+
188
187
  // Create a TokenUtxo with the required fields
189
188
  const listingUtxo: TokenUtxo = {
190
189
  txid,
@@ -195,7 +194,7 @@ Please fund this wallet address with enough BSV to cover the purchase price
195
194
  id: args.tokenID,
196
195
  payout: listingData.data.list.payout,
197
196
  };
198
-
197
+
199
198
  transaction = await purchaseOrdTokenListing({
200
199
  protocol,
201
200
  tokenID: args.tokenID,
@@ -214,13 +213,13 @@ Please fund this wallet address with enough BSV to cover the purchase price
214
213
  script: listingData.script,
215
214
  satoshis: listingData.satoshis,
216
215
  };
217
-
216
+
218
217
  // Create the ExistingListing object for NFT listings
219
218
  const listing: ExistingListing = {
220
219
  payout: listingData.data.list.payout,
221
220
  listingUtxo,
222
221
  };
223
-
222
+
224
223
  // Check for royalties in the NFT origin data
225
224
  // Royalties are only supported for NFTs, not for tokens
226
225
  // The royalties are defined by the original creator as a JSON string
@@ -233,7 +232,7 @@ Please fund this wallet address with enough BSV to cover the purchase price
233
232
  // Remove console.warn
234
233
  }
235
234
  }
236
-
235
+
237
236
  transaction = await purchaseOrdListing({
238
237
  utxos: paymentUtxos,
239
238
  paymentPk,
@@ -285,8 +284,11 @@ Please fund this wallet address with enough BSV to cover the purchase price
285
284
  price: listingData.data.list.price,
286
285
  marketFee,
287
286
  marketFeeAddress: MARKET_WALLET_ADDRESS,
288
- royaltiesPaid: args.listingType === "nft" && listingData.origin?.data?.map?.royalties ?
289
- JSON.parse(listingData.origin.data.map.royalties) : undefined,
287
+ royaltiesPaid:
288
+ args.listingType === "nft" &&
289
+ listingData.origin?.data?.map?.royalties
290
+ ? JSON.parse(listingData.origin.data.map.royalties)
291
+ : undefined,
290
292
  }),
291
293
  },
292
294
  ],
@@ -73,14 +73,26 @@ export const walletDecryptArgsSchema = z.object({
73
73
  });
74
74
 
75
75
  // Combined wallet encryption/decryption args
76
- export const walletEncryptionArgsSchema = z.object({
77
- mode: z.enum(["encrypt", "decrypt"]).describe("Operation mode: 'encrypt' to encrypt plaintext or 'decrypt' to decrypt data"),
78
- data: z.union([
79
- z.string().describe("Text data to encrypt or decrypt"),
80
- z.array(z.number()).describe("Binary data to encrypt or decrypt")
81
- ]).describe("Data to process: text/data for encryption or decryption"),
82
- encoding: z.enum(["utf8", "hex", "base64"]).optional().default("utf8").describe("Encoding of text data (default: utf8)"),
83
- }).describe("Schema for encryption and decryption operations");
76
+ export const walletEncryptionArgsSchema = z
77
+ .object({
78
+ mode: z
79
+ .enum(["encrypt", "decrypt"])
80
+ .describe(
81
+ "Operation mode: 'encrypt' to encrypt plaintext or 'decrypt' to decrypt data",
82
+ ),
83
+ data: z
84
+ .union([
85
+ z.string().describe("Text data to encrypt or decrypt"),
86
+ z.array(z.number()).describe("Binary data to encrypt or decrypt"),
87
+ ])
88
+ .describe("Data to process: text/data for encryption or decryption"),
89
+ encoding: z
90
+ .enum(["utf8", "hex", "base64"])
91
+ .optional()
92
+ .default("utf8")
93
+ .describe("Encoding of text data (default: utf8)"),
94
+ })
95
+ .describe("Schema for encryption and decryption operations");
84
96
 
85
97
  // Create HMAC arguments
86
98
  export const createHmacArgsSchema = z.object({
@@ -278,30 +290,41 @@ export const sendToAddressArgsSchema = z.object({
278
290
  /**
279
291
  * Schema for purchase listing arguments
280
292
  */
281
- export const purchaseListingArgsSchema = z.object({
282
- listingOutpoint: z
283
- .string()
284
- .describe("The outpoint of the listing to purchase (txid_vout format)"),
285
- ordAddress: z
286
- .string()
287
- .describe("The ordinal address to receive the purchased item"),
288
- listingType: z
289
- .enum(["nft", "token"])
290
- .default("nft")
291
- .describe("Type of listing: 'nft' for ordinal NFTs, 'token' for BSV-20 tokens"),
292
- tokenProtocol: z
293
- .enum(["bsv-20", "bsv-21"])
294
- .optional().default("bsv-21")
295
- .describe("Token protocol for token listings (required when listingType is 'token')"),
296
- tokenID: z
297
- .string()
298
- .optional()
299
- .describe("Token ID for BSV-21 tokens or ticker for BSV-20 tokens (required when listingType is 'token')"),
300
- description: z
301
- .string()
302
- .optional()
303
- .describe("Optional description for the transaction"),
304
- }).describe("Schema for the wallet_purchaseListing tool arguments (purchase NFTs or tokens), with detailed field descriptions.");
293
+ export const purchaseListingArgsSchema = z
294
+ .object({
295
+ listingOutpoint: z
296
+ .string()
297
+ .describe("The outpoint of the listing to purchase (txid_vout format)"),
298
+ ordAddress: z
299
+ .string()
300
+ .describe("The ordinal address to receive the purchased item"),
301
+ listingType: z
302
+ .enum(["nft", "token"])
303
+ .default("nft")
304
+ .describe(
305
+ "Type of listing: 'nft' for ordinal NFTs, 'token' for BSV-20 tokens",
306
+ ),
307
+ tokenProtocol: z
308
+ .enum(["bsv-20", "bsv-21"])
309
+ .optional()
310
+ .default("bsv-21")
311
+ .describe(
312
+ "Token protocol for token listings (required when listingType is 'token')",
313
+ ),
314
+ tokenID: z
315
+ .string()
316
+ .optional()
317
+ .describe(
318
+ "Token ID for BSV-21 tokens or ticker for BSV-20 tokens (required when listingType is 'token')",
319
+ ),
320
+ description: z
321
+ .string()
322
+ .optional()
323
+ .describe("Optional description for the transaction"),
324
+ })
325
+ .describe(
326
+ "Schema for the wallet_purchaseListing tool arguments (purchase NFTs or tokens), with detailed field descriptions.",
327
+ );
305
328
 
306
329
  // Export types
307
330
  export type SendToAddressArgs = z.infer<typeof sendToAddressArgsSchema>;
@@ -10,12 +10,19 @@ import type { Wallet } from "./wallet";
10
10
  * Schema for the sendOrdinals tool arguments
11
11
  */
12
12
  export const sendOrdinalsArgsSchema = z.object({
13
- // Outpoint of the inscription to send (txid_vout format)
14
- inscriptionOutpoint: z.string().describe("Inscription outpoint in format txid_vout"),
15
- // Destination address to send the inscription to
16
- destinationAddress: z.string().describe("Destination address for the inscription"),
17
- // Optional metadata for the ordinal transfer
18
- metadata: z.any().optional().describe("Optional MAP metadata for the transfer"),
13
+ // Outpoint of the inscription to send (txid_vout format)
14
+ inscriptionOutpoint: z
15
+ .string()
16
+ .describe("Inscription outpoint in format txid_vout"),
17
+ // Destination address to send the inscription to
18
+ destinationAddress: z
19
+ .string()
20
+ .describe("Destination address for the inscription"),
21
+ // Optional metadata for the ordinal transfer
22
+ metadata: z
23
+ .any()
24
+ .optional()
25
+ .describe("Optional MAP metadata for the transfer"),
19
26
  });
20
27
 
21
28
  export type SendOrdinalsArgs = z.infer<typeof sendOrdinalsArgsSchema>;
@@ -24,97 +31,104 @@ export type SendOrdinalsArgs = z.infer<typeof sendOrdinalsArgsSchema>;
24
31
  * Registers the wallet_sendOrdinals tool for transferring ordinals
25
32
  */
26
33
  export function registerSendOrdinalsTool(server: McpServer, wallet: Wallet) {
27
- server.tool(
28
- "wallet_sendOrdinals",
29
- "Transfers ordinals (NFTs) from your wallet to another address on the Bitcoin SV blockchain. This tool enables sending inscriptions you own to any valid BSV address. The transaction is created, signed, and broadcast automatically, with appropriate fee calculation and change handling.",
30
- { args: sendOrdinalsArgsSchema },
31
- async (
32
- { args }: { args: SendOrdinalsArgs },
33
- extra: RequestHandlerExtra,
34
- ): Promise<CallToolResult> => {
35
- try {
36
- // 1. Get private key from wallet
37
- const paymentPk = wallet.getPrivateKey();
38
- if (!paymentPk) {
39
- throw new Error("No private key available in wallet");
40
- }
34
+ server.tool(
35
+ "wallet_sendOrdinals",
36
+ "Transfers ordinals (NFTs) from your wallet to another address on the Bitcoin SV blockchain. This tool enables sending inscriptions you own to any valid BSV address. The transaction is created, signed, and broadcast automatically, with appropriate fee calculation and change handling.",
37
+ { args: sendOrdinalsArgsSchema },
38
+ async (
39
+ { args }: { args: SendOrdinalsArgs },
40
+ extra: RequestHandlerExtra,
41
+ ): Promise<CallToolResult> => {
42
+ try {
43
+ // 1. Get private key from wallet
44
+ const paymentPk = wallet.getPrivateKey();
45
+ if (!paymentPk) {
46
+ throw new Error("No private key available in wallet");
47
+ }
41
48
 
42
- // 2. Get payment UTXOs from wallet
43
- const { paymentUtxos, nftUtxos } = await wallet.getUtxos();
44
- if (!paymentUtxos || paymentUtxos.length === 0) {
45
- throw new Error("No payment UTXOs available to fund this transaction");
46
- }
49
+ // 2. Get payment UTXOs from wallet
50
+ const { paymentUtxos, nftUtxos } = await wallet.getUtxos();
51
+ if (!paymentUtxos || paymentUtxos.length === 0) {
52
+ throw new Error(
53
+ "No payment UTXOs available to fund this transaction",
54
+ );
55
+ }
47
56
 
48
- // 3. Get the wallet address for change
49
- const walletAddress = paymentPk.toAddress().toString();
57
+ // 3. Get the wallet address for change
58
+ const walletAddress = paymentPk.toAddress().toString();
50
59
 
51
- // 4. Parse the inscription outpoint
52
- const [txid, voutStr] = args.inscriptionOutpoint.split('_');
53
- if (!txid || !voutStr) {
54
- throw new Error("Invalid inscription outpoint format. Expected txid_vout");
55
- }
56
- const vout = Number.parseInt(voutStr, 10);
57
-
58
- // 5. Find the inscription in nftUtxos
59
- const inscription = nftUtxos.find(
60
- (utxo) => utxo.txid === txid && utxo.vout === vout
61
- );
62
-
63
- if (!inscription) {
64
- throw new Error(
65
- `Inscription ${args.inscriptionOutpoint} not found in your wallet`
66
- );
67
- }
60
+ // 4. Parse the inscription outpoint
61
+ const [txid, voutStr] = args.inscriptionOutpoint.split("_");
62
+ if (!txid || !voutStr) {
63
+ throw new Error(
64
+ "Invalid inscription outpoint format. Expected txid_vout",
65
+ );
66
+ }
67
+ const vout = Number.parseInt(voutStr, 10);
68
68
 
69
- // 6. Create config and transfer the inscription
70
- const sendOrdinalsConfig: SendOrdinalsConfig = {
71
- paymentPk,
72
- paymentUtxos,
73
- ordinals: [inscription],
74
- destinations: [{ address: args.destinationAddress }],
75
- changeAddress: walletAddress,
76
- };
69
+ // 5. Find the inscription in nftUtxos
70
+ const inscription = nftUtxos.find(
71
+ (utxo) => utxo.txid === txid && utxo.vout === vout,
72
+ );
77
73
 
78
- // Add metadata if provided
79
- if (args.metadata) {
80
- sendOrdinalsConfig.metaData = args.metadata;
81
- }
74
+ if (!inscription) {
75
+ throw new Error(
76
+ `Inscription ${args.inscriptionOutpoint} not found in your wallet`,
77
+ );
78
+ }
82
79
 
83
- // Using the wallet's key for both payment and ordinals
84
- sendOrdinalsConfig.ordPk = paymentPk;
80
+ // 6. Create config and transfer the inscription
81
+ const sendOrdinalsConfig: SendOrdinalsConfig = {
82
+ paymentPk,
83
+ paymentUtxos,
84
+ ordinals: [inscription],
85
+ destinations: [{ address: args.destinationAddress }],
86
+ changeAddress: walletAddress,
87
+ };
85
88
 
86
- const result = await sendOrdinals(sendOrdinalsConfig);
87
- const changeResult = result as ChangeResult;
88
-
89
- // 7. Broadcast the transaction
90
- await changeResult.tx.broadcast();
91
-
92
- // 8. Refresh the wallet's UTXOs after spending
93
- try {
94
- await wallet.refreshUtxos();
95
- } catch (refreshError) {
96
- console.warn("Failed to refresh UTXOs after transaction:", refreshError);
97
- }
89
+ // Add metadata if provided
90
+ if (args.metadata) {
91
+ sendOrdinalsConfig.metaData = args.metadata;
92
+ }
98
93
 
99
- // 9. Return transaction details
100
- return {
101
- content: [
102
- {
103
- type: "text",
104
- text: JSON.stringify({
105
- txid: changeResult.tx.id("hex"),
106
- spentOutpoints: changeResult.spentOutpoints,
107
- payChange: changeResult.payChange,
108
- inscriptionOutpoint: args.inscriptionOutpoint,
109
- destinationAddress: args.destinationAddress,
110
- }),
111
- },
112
- ],
113
- };
114
- } catch (err: unknown) {
115
- const msg = err instanceof Error ? err.message : String(err);
116
- return { content: [{ type: "text", text: msg }], isError: true };
117
- }
118
- },
119
- );
120
- }
94
+ // Using the wallet's key for both payment and ordinals
95
+ sendOrdinalsConfig.ordPk = paymentPk;
96
+
97
+ const result = await sendOrdinals(sendOrdinalsConfig);
98
+ const changeResult = result as ChangeResult;
99
+
100
+ // 7. Broadcast the transaction
101
+ await changeResult.tx.broadcast();
102
+
103
+ // 8. Refresh the wallet's UTXOs after spending
104
+ try {
105
+ await wallet.refreshUtxos();
106
+ } catch (refreshError) {
107
+ console.warn(
108
+ "Failed to refresh UTXOs after transaction:",
109
+ refreshError,
110
+ );
111
+ }
112
+
113
+ // 9. Return transaction details
114
+ return {
115
+ content: [
116
+ {
117
+ type: "text",
118
+ text: JSON.stringify({
119
+ txid: changeResult.tx.id("hex"),
120
+ spentOutpoints: changeResult.spentOutpoints,
121
+ payChange: changeResult.payChange,
122
+ inscriptionOutpoint: args.inscriptionOutpoint,
123
+ destinationAddress: args.destinationAddress,
124
+ }),
125
+ },
126
+ ],
127
+ };
128
+ } catch (err: unknown) {
129
+ const msg = err instanceof Error ? err.message : String(err);
130
+ return { content: [{ type: "text", text: msg }], isError: true };
131
+ }
132
+ },
133
+ );
134
+ }
@@ -3,9 +3,9 @@ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
3
  import type { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js";
4
4
  import { toSatoshi } from "satoshi-token";
5
5
  import type { z } from "zod";
6
+ import { getBsvPriceWithCache } from "../bsv/getPrice";
6
7
  import { sendToAddressArgsSchema } from "./schemas";
7
8
  import type { Wallet } from "./wallet";
8
- import { getBsvPriceWithCache } from "../bsv/getPrice";
9
9
 
10
10
  // Use the schema imported from schemas.ts
11
11
  export type SendToAddressArgs = z.infer<typeof sendToAddressArgsSchema>;
@@ -11,7 +11,7 @@ type WalletToolName =
11
11
  | "wallet_getPublicKey"
12
12
  | "wallet_createSignature"
13
13
  | "wallet_verifySignature"
14
- | "wallet_encryption";
14
+ | "wallet_encryption";
15
15
 
16
16
  const toolNames: WalletToolName[] = [
17
17
  "wallet_getPublicKey",
@@ -34,9 +34,9 @@ function getDummyArgs(tool: WalletToolName): Record<string, unknown> {
34
34
  signature: "sig",
35
35
  publicKey: "pubkey",
36
36
  };
37
- // TODO we merged encrypt and decrypt into encryption we need to update the test file
37
+ // TODO we merged encrypt and decrypt into encryption we need to update the test file
38
38
  // case "wallet_encryption":
39
- // if
39
+ // if
40
40
  // return { data: "test", publicKey: "pubkey" };
41
41
  // case "wallet_decryption":
42
42
  // return { encryptedData: "data" };