@aifinpay/mcp 2.0.0-rc.4 → 2.0.0-rc.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/bin/aifinpay-mcp.js +24 -0
- package/package.json +1 -1
package/bin/aifinpay-mcp.js
CHANGED
|
@@ -119,6 +119,7 @@ if (arg === "init") {
|
|
|
119
119
|
const { Agent, AiFinPayAgent } = await import("@aifinpay/agent");
|
|
120
120
|
|
|
121
121
|
let store = readKeystore();
|
|
122
|
+
const freshlyCreated = !store;
|
|
122
123
|
if (store) {
|
|
123
124
|
// Never silently overwrite. The file is the only copy of a key that may
|
|
124
125
|
// already hold funds; a second `init` that regenerated it would destroy a
|
|
@@ -138,6 +139,29 @@ if (arg === "init") {
|
|
|
138
139
|
);
|
|
139
140
|
}
|
|
140
141
|
|
|
142
|
+
// The one-time recovery output.
|
|
143
|
+
//
|
|
144
|
+
// Shown ONLY on creation, ONLY in the terminal, and ONLY when the keystore is
|
|
145
|
+
// plaintext. This is NOT the leak the audit (AIFINP-220 §3) forbids — that is
|
|
146
|
+
// a key written to CHAT or LOGS, where an LLM provider or a log shipper keeps
|
|
147
|
+
// it forever. This is the deliberate one-time backup prompt every wallet CLI
|
|
148
|
+
// shows, on a channel the user controls. Opposite things: the owner reading
|
|
149
|
+
// their own recovery phrase once, vs a secret leaking into a transcript.
|
|
150
|
+
//
|
|
151
|
+
// Encrypted keystores print nothing here: recovery there IS the keystore file
|
|
152
|
+
// plus the passphrase, and re-printing the plaintext secret would defeat the
|
|
153
|
+
// encryption the user just asked for.
|
|
154
|
+
if (freshlyCreated && !PASSPHRASE) {
|
|
155
|
+
process.stdout.write(
|
|
156
|
+
`\n RECOVERY KEY (shown once, never again):\n\n` +
|
|
157
|
+
` ${store.secretB58}\n\n` +
|
|
158
|
+
` Save this off this machine NOW. Anyone with it controls the wallet and\n` +
|
|
159
|
+
` its funds. Do NOT paste it into a chat, an issue, or a config file — the\n` +
|
|
160
|
+
` keystore at ${KEYSTORE} already holds it (encrypt it with\n` +
|
|
161
|
+
` AIFINPAY_WALLET_PASSPHRASE). This line is your OFF-machine backup.\n\n`,
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
|
|
141
165
|
const agent = await AiFinPayAgent.fromSolanaSecret(store.secretB58);
|
|
142
166
|
|
|
143
167
|
process.stdout.write(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aifinpay/mcp",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.5",
|
|
4
4
|
"description": "AiFinPay MCP production-RC control surface for Agent Passport resolution and runtime-verified AIFP-1/AIFP-2 settlement invoices. Signing tools remain gated until @aifinpay/agent v2 release.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|