@mcp-dockmaster/mcp-cryptowallet-evm 1.0.3 → 1.0.5
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/build/handlers/utils.d.ts +4 -4
- package/build/handlers/utils.js +20 -10
- package/build/handlers/utils.js.map +1 -1
- package/build/handlers/wallet.d.ts +1 -0
- package/build/handlers/wallet.js +73 -73
- package/build/handlers/wallet.js.map +1 -1
- package/build/tools.d.ts +61 -109
- package/build/tools.js +36 -50
- package/build/tools.js.map +1 -1
- package/package.json +1 -1
- package/src/handlers/utils.ts +21 -12
- package/src/handlers/wallet.ts +77 -91
- package/src/tools.ts +37 -50
package/src/tools.ts
CHANGED
@@ -32,10 +32,22 @@ import {
|
|
32
32
|
getNetworkHandler,
|
33
33
|
getBlockNumberHandler,
|
34
34
|
getFeeDataHandler,
|
35
|
-
createMnemonicPhraseHandler
|
35
|
+
createMnemonicPhraseHandler,
|
36
|
+
setProviderHandler
|
36
37
|
} from "./handlers/wallet.js";
|
37
38
|
|
38
39
|
export const tools = [
|
40
|
+
{
|
41
|
+
name: "wallet_provider_set",
|
42
|
+
description: "Set the provider URL. By default, the provider URL is set to the ETH mainnet or the URL set in the PROVIDER_URL environment variable.",
|
43
|
+
inputSchema: {
|
44
|
+
type: "object",
|
45
|
+
properties: {
|
46
|
+
providerURL: { type: "string", description: "The provider RPC URL" }
|
47
|
+
},
|
48
|
+
required: ["providerURL"]
|
49
|
+
}
|
50
|
+
},
|
39
51
|
// Wallet Creation and Management
|
40
52
|
{
|
41
53
|
name: "wallet_create_random",
|
@@ -56,8 +68,7 @@ export const tools = [
|
|
56
68
|
inputSchema: {
|
57
69
|
type: "object",
|
58
70
|
properties: {
|
59
|
-
privateKey: { type: "string", description: "The private key" }
|
60
|
-
provider: { type: "string", description: "Optional JSON RPC provider URL" }
|
71
|
+
privateKey: { type: "string", description: "The private key" }
|
61
72
|
},
|
62
73
|
required: ["privateKey"]
|
63
74
|
}
|
@@ -82,8 +93,7 @@ export const tools = [
|
|
82
93
|
properties: {
|
83
94
|
mnemonic: { type: "string", description: "The mnemonic phrase" },
|
84
95
|
path: { type: "string", description: "Optional HD path" },
|
85
|
-
locale: { type: "string", description: "Optional locale for the wordlist" }
|
86
|
-
provider: { type: "string", description: "Optional JSON RPC provider URL" }
|
96
|
+
locale: { type: "string", description: "Optional locale for the wordlist" }
|
87
97
|
},
|
88
98
|
required: ["mnemonic"]
|
89
99
|
}
|
@@ -95,8 +105,7 @@ export const tools = [
|
|
95
105
|
type: "object",
|
96
106
|
properties: {
|
97
107
|
json: { type: "string", description: "The encrypted JSON wallet" },
|
98
|
-
password: { type: "string", description: "The password to decrypt the wallet" }
|
99
|
-
provider: { type: "string", description: "Optional JSON RPC provider URL" }
|
108
|
+
password: { type: "string", description: "The password to decrypt the wallet" }
|
100
109
|
},
|
101
110
|
required: ["json", "password"]
|
102
111
|
}
|
@@ -171,10 +180,9 @@ export const tools = [
|
|
171
180
|
type: "object",
|
172
181
|
properties: {
|
173
182
|
wallet: { type: "string", description: "The wallet (private key, mnemonic, or JSON). If not provided, uses PRIVATE_KEY environment variable if set." },
|
174
|
-
provider: { type: "string", description: "Optional JSON RPC provider URL" },
|
175
183
|
blockTag: { type: "string", description: "Optional block tag (latest, pending, etc.)" }
|
176
184
|
},
|
177
|
-
required: [
|
185
|
+
required: []
|
178
186
|
}
|
179
187
|
},
|
180
188
|
{
|
@@ -183,8 +191,7 @@ export const tools = [
|
|
183
191
|
inputSchema: {
|
184
192
|
type: "object",
|
185
193
|
properties: {
|
186
|
-
wallet: { type: "string", description: "The wallet (private key, mnemonic, or JSON). If not provided, uses PRIVATE_KEY environment variable if set." }
|
187
|
-
provider: { type: "string", description: "Optional JSON RPC provider URL" }
|
194
|
+
wallet: { type: "string", description: "The wallet (private key, mnemonic, or JSON). If not provided, uses PRIVATE_KEY environment variable if set." }
|
188
195
|
},
|
189
196
|
required: []
|
190
197
|
}
|
@@ -195,8 +202,7 @@ export const tools = [
|
|
195
202
|
inputSchema: {
|
196
203
|
type: "object",
|
197
204
|
properties: {
|
198
|
-
wallet: { type: "string", description: "The wallet (private key, mnemonic, or JSON). If not provided, uses PRIVATE_KEY environment variable if set." }
|
199
|
-
provider: { type: "string", description: "Optional JSON RPC provider URL" }
|
205
|
+
wallet: { type: "string", description: "The wallet (private key, mnemonic, or JSON). If not provided, uses PRIVATE_KEY environment variable if set." }
|
200
206
|
},
|
201
207
|
required: []
|
202
208
|
}
|
@@ -208,7 +214,6 @@ export const tools = [
|
|
208
214
|
type: "object",
|
209
215
|
properties: {
|
210
216
|
wallet: { type: "string", description: "The wallet (private key, mnemonic, or JSON). If not provided, uses PRIVATE_KEY environment variable if set." },
|
211
|
-
provider: { type: "string", description: "Optional JSON RPC provider URL" },
|
212
217
|
blockTag: { type: "string", description: "Optional block tag (latest, pending, etc.)" }
|
213
218
|
},
|
214
219
|
required: []
|
@@ -221,7 +226,6 @@ export const tools = [
|
|
221
226
|
type: "object",
|
222
227
|
properties: {
|
223
228
|
wallet: { type: "string", description: "The wallet (private key, mnemonic, or JSON). If not provided, uses PRIVATE_KEY environment variable if set." },
|
224
|
-
provider: { type: "string", description: "Optional JSON RPC provider URL" },
|
225
229
|
transaction: {
|
226
230
|
type: "object",
|
227
231
|
description: "The transaction to call",
|
@@ -249,7 +253,6 @@ export const tools = [
|
|
249
253
|
type: "object",
|
250
254
|
properties: {
|
251
255
|
wallet: { type: "string", description: "The wallet (private key, mnemonic, or JSON). If not provided, uses PRIVATE_KEY environment variable if set." },
|
252
|
-
provider: { type: "string", description: "Optional JSON RPC provider URL" },
|
253
256
|
transaction: {
|
254
257
|
type: "object",
|
255
258
|
description: "The transaction to send",
|
@@ -278,7 +281,6 @@ export const tools = [
|
|
278
281
|
type: "object",
|
279
282
|
properties: {
|
280
283
|
wallet: { type: "string", description: "The wallet (private key, mnemonic, or JSON). If not provided, uses PRIVATE_KEY environment variable if set." },
|
281
|
-
provider: { type: "string", description: "Optional JSON RPC provider URL" },
|
282
284
|
transaction: {
|
283
285
|
type: "object",
|
284
286
|
description: "The transaction to sign",
|
@@ -307,7 +309,6 @@ export const tools = [
|
|
307
309
|
type: "object",
|
308
310
|
properties: {
|
309
311
|
wallet: { type: "string", description: "The wallet (private key, mnemonic, or JSON). If not provided, uses PRIVATE_KEY environment variable if set." },
|
310
|
-
provider: { type: "string", description: "Optional JSON RPC provider URL" },
|
311
312
|
transaction: {
|
312
313
|
type: "object",
|
313
314
|
description: "The transaction to populate",
|
@@ -393,11 +394,10 @@ export const tools = [
|
|
393
394
|
inputSchema: {
|
394
395
|
type: "object",
|
395
396
|
properties: {
|
396
|
-
provider: { type: "string", description: "JSON RPC provider URL" },
|
397
397
|
blockHashOrBlockTag: { type: "string", description: "Block hash or block tag (latest, pending, etc.)" },
|
398
398
|
includeTransactions: { type: "boolean", description: "Whether to include full transactions or just hashes" }
|
399
399
|
},
|
400
|
-
required: ["
|
400
|
+
required: ["blockHashOrBlockTag"]
|
401
401
|
}
|
402
402
|
},
|
403
403
|
{
|
@@ -406,10 +406,9 @@ export const tools = [
|
|
406
406
|
inputSchema: {
|
407
407
|
type: "object",
|
408
408
|
properties: {
|
409
|
-
provider: { type: "string", description: "JSON RPC provider URL" },
|
410
409
|
transactionHash: { type: "string", description: "The transaction hash" }
|
411
410
|
},
|
412
|
-
required: ["
|
411
|
+
required: ["transactionHash"]
|
413
412
|
}
|
414
413
|
},
|
415
414
|
{
|
@@ -418,10 +417,9 @@ export const tools = [
|
|
418
417
|
inputSchema: {
|
419
418
|
type: "object",
|
420
419
|
properties: {
|
421
|
-
provider: { type: "string", description: "JSON RPC provider URL" },
|
422
420
|
transactionHash: { type: "string", description: "The transaction hash" }
|
423
421
|
},
|
424
|
-
required: ["
|
422
|
+
required: ["transactionHash"]
|
425
423
|
}
|
426
424
|
},
|
427
425
|
{
|
@@ -430,11 +428,10 @@ export const tools = [
|
|
430
428
|
inputSchema: {
|
431
429
|
type: "object",
|
432
430
|
properties: {
|
433
|
-
provider: { type: "string", description: "JSON RPC provider URL" },
|
434
431
|
address: { type: "string", description: "The address to get code from" },
|
435
432
|
blockTag: { type: "string", description: "Optional block tag (latest, pending, etc.)" }
|
436
433
|
},
|
437
|
-
required: ["
|
434
|
+
required: ["address"]
|
438
435
|
}
|
439
436
|
},
|
440
437
|
{
|
@@ -443,12 +440,11 @@ export const tools = [
|
|
443
440
|
inputSchema: {
|
444
441
|
type: "object",
|
445
442
|
properties: {
|
446
|
-
provider: { type: "string", description: "JSON RPC provider URL" },
|
447
443
|
address: { type: "string", description: "The address to get storage from" },
|
448
444
|
position: { type: "string", description: "The storage position" },
|
449
445
|
blockTag: { type: "string", description: "Optional block tag (latest, pending, etc.)" }
|
450
446
|
},
|
451
|
-
required: ["
|
447
|
+
required: ["address", "position"]
|
452
448
|
}
|
453
449
|
},
|
454
450
|
{
|
@@ -457,7 +453,6 @@ export const tools = [
|
|
457
453
|
inputSchema: {
|
458
454
|
type: "object",
|
459
455
|
properties: {
|
460
|
-
provider: { type: "string", description: "JSON RPC provider URL" },
|
461
456
|
transaction: {
|
462
457
|
type: "object",
|
463
458
|
description: "The transaction to estimate gas for",
|
@@ -469,7 +464,7 @@ export const tools = [
|
|
469
464
|
}
|
470
465
|
}
|
471
466
|
},
|
472
|
-
required: ["
|
467
|
+
required: ["transaction"]
|
473
468
|
}
|
474
469
|
},
|
475
470
|
{
|
@@ -478,7 +473,6 @@ export const tools = [
|
|
478
473
|
inputSchema: {
|
479
474
|
type: "object",
|
480
475
|
properties: {
|
481
|
-
provider: { type: "string", description: "JSON RPC provider URL" },
|
482
476
|
filter: {
|
483
477
|
type: "object",
|
484
478
|
description: "The filter to apply",
|
@@ -490,7 +484,7 @@ export const tools = [
|
|
490
484
|
}
|
491
485
|
}
|
492
486
|
},
|
493
|
-
required: ["
|
487
|
+
required: ["filter"]
|
494
488
|
}
|
495
489
|
},
|
496
490
|
{
|
@@ -499,10 +493,9 @@ export const tools = [
|
|
499
493
|
inputSchema: {
|
500
494
|
type: "object",
|
501
495
|
properties: {
|
502
|
-
provider: { type: "string", description: "JSON RPC provider URL" },
|
503
496
|
name: { type: "string", description: "The ENS name" }
|
504
497
|
},
|
505
|
-
required: ["
|
498
|
+
required: ["name"]
|
506
499
|
}
|
507
500
|
},
|
508
501
|
{
|
@@ -511,10 +504,9 @@ export const tools = [
|
|
511
504
|
inputSchema: {
|
512
505
|
type: "object",
|
513
506
|
properties: {
|
514
|
-
provider: { type: "string", description: "JSON RPC provider URL" },
|
515
507
|
address: { type: "string", description: "The address to lookup" }
|
516
508
|
},
|
517
|
-
required: ["
|
509
|
+
required: ["address"]
|
518
510
|
}
|
519
511
|
},
|
520
512
|
{
|
@@ -523,10 +515,9 @@ export const tools = [
|
|
523
515
|
inputSchema: {
|
524
516
|
type: "object",
|
525
517
|
properties: {
|
526
|
-
provider: { type: "string", description: "JSON RPC provider URL" },
|
527
518
|
name: { type: "string", description: "The ENS name to resolve" }
|
528
519
|
},
|
529
|
-
required: ["
|
520
|
+
required: ["name"]
|
530
521
|
}
|
531
522
|
},
|
532
523
|
|
@@ -536,10 +527,8 @@ export const tools = [
|
|
536
527
|
description: "Get the current network information",
|
537
528
|
inputSchema: {
|
538
529
|
type: "object",
|
539
|
-
properties: {
|
540
|
-
|
541
|
-
},
|
542
|
-
required: ["provider"]
|
530
|
+
properties: {},
|
531
|
+
required: []
|
543
532
|
}
|
544
533
|
},
|
545
534
|
{
|
@@ -547,10 +536,8 @@ export const tools = [
|
|
547
536
|
description: "Get the current block number",
|
548
537
|
inputSchema: {
|
549
538
|
type: "object",
|
550
|
-
properties: {
|
551
|
-
|
552
|
-
},
|
553
|
-
required: ["provider"]
|
539
|
+
properties: {},
|
540
|
+
required: []
|
554
541
|
}
|
555
542
|
},
|
556
543
|
{
|
@@ -558,10 +545,8 @@ export const tools = [
|
|
558
545
|
description: "Get the current fee data (base fee, max priority fee, etc.)",
|
559
546
|
inputSchema: {
|
560
547
|
type: "object",
|
561
|
-
properties: {
|
562
|
-
|
563
|
-
},
|
564
|
-
required: ["provider"]
|
548
|
+
properties: {},
|
549
|
+
required: []
|
565
550
|
}
|
566
551
|
}
|
567
552
|
];
|
@@ -569,6 +554,8 @@ export const tools = [
|
|
569
554
|
type HandlerDictionary = Record<string, (input: any) => any>;
|
570
555
|
|
571
556
|
export const handlers: HandlerDictionary = {
|
557
|
+
// Provider Methods
|
558
|
+
"wallet_provider_set": setProviderHandler,
|
572
559
|
// Wallet Creation and Management
|
573
560
|
"wallet_create_random": createWalletHandler,
|
574
561
|
"wallet_from_private_key": fromPrivateKeyHandler,
|