agentwallet-mcp 1.13.14 → 1.13.15
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/index.js +1 -1
- package/build/local-solana.js +17 -2
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -827,7 +827,7 @@ function resolveChainId(network) {
|
|
|
827
827
|
const AddressSchema = z.string().regex(/^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$/, 'Must be a 0x-prefixed 40-hex EVM address or a base58 Solana address');
|
|
828
828
|
const server = new McpServer({
|
|
829
829
|
name: 'agentwallet',
|
|
830
|
-
version: '1.13.
|
|
830
|
+
version: '1.13.15',
|
|
831
831
|
}, {
|
|
832
832
|
instructions: `AgentWallet gives AI agents their own blockchain wallets. ${anyLocalMode()
|
|
833
833
|
? 'This server runs in LOCAL (self-custody) mode: the operator supplied the key, signing happens in this process, and the only spend guards are the environment caps (AGENTWALLET_MAX_TX_NATIVE / _TOKEN / _SOL per transaction, AGENTWALLET_MAX_AUTOPAY and AGENTWALLET_AUTOPAY_ASSETS for x402, AGENTWALLET_X402_MAX_TIMEOUT for authorization windows). There is no server-side pause, daily limit or approval email; pause_wallet, unpause_wallet and delete_wallet are refused.'
|
package/build/local-solana.js
CHANGED
|
@@ -99,13 +99,28 @@ const DEFAULT_SOLANA_RPC = {
|
|
|
99
99
|
901: 'https://api.devnet.solana.com',
|
|
100
100
|
902: 'https://api.testnet.solana.com',
|
|
101
101
|
};
|
|
102
|
+
/** A Solana RPC over plain http to anything but loopback exposes every query and lets an on-path host answer; refused like an EVM one (round 7). */
|
|
103
|
+
function assertSolanaScheme(url, name) {
|
|
104
|
+
let u;
|
|
105
|
+
try {
|
|
106
|
+
u = new URL(url);
|
|
107
|
+
}
|
|
108
|
+
catch {
|
|
109
|
+
throw new Error(`${name} is not a URL: "${url}".`);
|
|
110
|
+
}
|
|
111
|
+
const loopback = u.hostname === 'localhost' || u.hostname === '127.0.0.1' || u.hostname === '[::1]';
|
|
112
|
+
if (u.protocol !== 'https:' && !(u.protocol === 'http:' && loopback)) {
|
|
113
|
+
throw new Error(`${name} must be https (got ${u.protocol}//${u.host}); plain http is allowed only for localhost.`);
|
|
114
|
+
}
|
|
115
|
+
return url;
|
|
116
|
+
}
|
|
102
117
|
export function resolveSolanaRpc(chainId = 900) {
|
|
103
118
|
const perChain = (process.env[`AGENTWALLET_SOLANA_RPC_${chainId}`] || '').trim();
|
|
104
119
|
if (perChain)
|
|
105
|
-
return perChain;
|
|
120
|
+
return assertSolanaScheme(perChain, `AGENTWALLET_SOLANA_RPC_${chainId}`);
|
|
106
121
|
const explicit = (process.env.AGENTWALLET_SOLANA_RPC || '').trim();
|
|
107
122
|
if (explicit)
|
|
108
|
-
return explicit;
|
|
123
|
+
return assertSolanaScheme(explicit, 'AGENTWALLET_SOLANA_RPC');
|
|
109
124
|
if (Object.keys(process.env).some(k => /^AGENTWALLET_SOLANA_RPC_\d+$/.test(k) && (process.env[k] || '').trim())) {
|
|
110
125
|
throw new Error(`No Solana RPC for chain ${chainId}: AGENTWALLET_SOLANA_RPC_<chainId> is set for another cluster, so the public default is not used. Set AGENTWALLET_SOLANA_RPC_${chainId} or AGENTWALLET_SOLANA_RPC.`);
|
|
111
126
|
}
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/hifriendbot/agentwallet-mcp.git"
|
|
7
7
|
},
|
|
8
|
-
"version": "1.13.
|
|
8
|
+
"version": "1.13.15",
|
|
9
9
|
"description": "MCP server for AgentWallet: self-custody local signing on EVM and Solana, or hosted wallets. Sign, broadcast, pay x402 invoices, and accept x402 payments.",
|
|
10
10
|
"type": "module",
|
|
11
11
|
"main": "build/index.js",
|