@xona-labs/xpay 0.2.24 → 0.2.26
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/CHANGELOG.md +101 -78
- package/README.md +71 -69
- package/SKILL.md +22 -22
- package/dist/agenc/api.d.ts +8 -8
- package/dist/agenc/api.js +11 -11
- package/dist/agenc/hire.d.ts +4 -4
- package/dist/agenc/hire.js +17 -17
- package/dist/agenc/price.d.ts +1 -1
- package/dist/agenc/price.js +1 -1
- package/dist/biometric/index.d.ts +3 -3
- package/dist/biometric/index.js +6 -6
- package/dist/cli/accounts.d.ts +1 -1
- package/dist/cli/accounts.js +1 -1
- package/dist/cli/agenc.d.ts +2 -2
- package/dist/cli/agenc.js +4 -4
- package/dist/cli/balance.d.ts +1 -1
- package/dist/cli/balance.js +4 -4
- package/dist/cli/bento.d.ts +3 -3
- package/dist/cli/bento.js +8 -8
- package/dist/cli/bento.js.map +1 -1
- package/dist/cli/biometric.d.ts +1 -1
- package/dist/cli/biometric.js +8 -8
- package/dist/cli/common.js +6 -6
- package/dist/cli/common.js.map +1 -1
- package/dist/cli/discover.d.ts +2 -2
- package/dist/cli/discover.js +4 -4
- package/dist/cli/guardrail.d.ts +1 -1
- package/dist/cli/guardrail.js +3 -3
- package/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.js +12 -12
- package/dist/cli/init.d.ts +1 -1
- package/dist/cli/init.js +2 -2
- package/dist/cli/magicblock.d.ts +1 -1
- package/dist/cli/magicblock.js +4 -4
- package/dist/cli/mcp-server.d.ts +2 -2
- package/dist/cli/mcp-server.d.ts.map +1 -1
- package/dist/cli/mcp-server.js +25 -22
- package/dist/cli/mcp-server.js.map +1 -1
- package/dist/cli/pay.d.ts +1 -1
- package/dist/cli/pay.js +1 -1
- package/dist/cli/report.d.ts +2 -2
- package/dist/cli/report.js +4 -4
- package/dist/cli/report.js.map +1 -1
- package/dist/cli/sana.d.ts +1 -1
- package/dist/cli/sana.js +3 -3
- package/dist/cli/shop.d.ts +1 -1
- package/dist/cli/shop.js +1 -1
- package/dist/cli/swap.d.ts +1 -1
- package/dist/cli/swap.js +3 -3
- package/dist/cli/token.d.ts +2 -2
- package/dist/cli/token.js +2 -2
- package/dist/cli/trade.d.ts +2 -2
- package/dist/cli/trade.js +8 -8
- package/dist/cli/trade.js.map +1 -1
- package/dist/cli/transfer.d.ts +1 -1
- package/dist/cli/transfer.js +1 -1
- package/dist/cli/x.d.ts +1 -1
- package/dist/cli/x.js +1 -1
- package/dist/cli/zauth.d.ts +1 -1
- package/dist/cli/zauth.js +5 -5
- package/dist/discover/cache.js +1 -1
- package/dist/discover/index.d.ts +2 -2
- package/dist/discover/index.js +6 -6
- package/dist/discover/orbitx402.d.ts +2 -2
- package/dist/discover/orbitx402.js +1 -1
- package/dist/discover/payai.js +1 -1
- package/dist/do/index.d.ts +2 -2
- package/dist/do/index.js +1 -1
- package/dist/guardrail/index.d.ts +4 -4
- package/dist/guardrail/index.js +14 -14
- package/dist/guardrail/index.js.map +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.js +2 -2
- package/dist/magicblock/client.d.ts +2 -2
- package/dist/magicblock/client.js +4 -4
- package/dist/profile/index.d.ts +3 -3
- package/dist/profile/index.js +3 -3
- package/dist/profile/storage.d.ts +1 -1
- package/dist/profile/storage.js +4 -4
- package/dist/profile/types.d.ts +6 -6
- package/dist/profile/types.js +1 -1
- package/dist/report/index.d.ts +1 -1
- package/dist/report/index.js +2 -2
- package/dist/sana/tools.js +8 -8
- package/dist/signers/raw-evm.d.ts +1 -1
- package/dist/signers/raw-evm.js +5 -5
- package/dist/signers/raw-solana.d.ts +1 -1
- package/dist/signers/raw-solana.js +4 -4
- package/dist/swap/index.d.ts +6 -6
- package/dist/swap/index.js +12 -12
- package/dist/token/index.d.ts +8 -8
- package/dist/token/index.js +14 -14
- package/dist/token/rwa.d.ts +3 -3
- package/dist/token/rwa.js +3 -3
- package/dist/tools/index.d.ts +15 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +71 -31
- package/dist/tools/index.js.map +1 -1
- package/dist/trading/discovery.d.ts +6 -6
- package/dist/trading/discovery.js +7 -7
- package/dist/trading/index.d.ts +6 -6
- package/dist/trading/index.js +13 -13
- package/dist/transfer/index.d.ts +4 -4
- package/dist/transfer/index.js +8 -8
- package/dist/types.d.ts +7 -7
- package/dist/use/index.d.ts +5 -5
- package/dist/use/index.js +20 -20
- package/dist/wallet/index.d.ts +2 -2
- package/dist/wallet/index.js +3 -3
- package/dist/x402/evm-payment.d.ts +4 -4
- package/dist/x402/evm-payment.js +6 -6
- package/dist/x402/extract.d.ts +1 -1
- package/dist/x402/extract.js +1 -1
- package/dist/x402/svm-payment.d.ts +2 -2
- package/dist/x402/svm-payment.js +2 -2
- package/dist/zauth/index.d.ts +4 -4
- package/dist/zauth/index.js +5 -5
- package/package.json +4 -3
package/dist/cli/common.js
CHANGED
|
@@ -36,9 +36,9 @@ export async function unlockActive(opts = {}) {
|
|
|
36
36
|
}
|
|
37
37
|
catch (err) {
|
|
38
38
|
// The keychain copy can go stale if the wallet was re-encrypted with a
|
|
39
|
-
// new passphrase
|
|
39
|
+
// new passphrase - give the user one interactive retry instead of dying.
|
|
40
40
|
if (viaBiometric && process.stdin.isTTY) {
|
|
41
|
-
console.error(chalk.yellow(`⚠ The passphrase stored for Touch ID no longer unlocks "${name}"
|
|
41
|
+
console.error(chalk.yellow(`⚠ The passphrase stored for Touch ID no longer unlocks "${name}" - run \`xpay biometric enable\` to refresh it.`));
|
|
42
42
|
try {
|
|
43
43
|
return await loadProfile({ name, passphrase: await promptPassphrase(name) });
|
|
44
44
|
}
|
|
@@ -65,7 +65,7 @@ async function tryBiometricUnlock(name) {
|
|
|
65
65
|
try {
|
|
66
66
|
const passphrase = await readBiometricPassphrase(name, `unlock the xPay profile "${name}"`);
|
|
67
67
|
if (!passphrase && process.stdin.isTTY) {
|
|
68
|
-
console.log(chalk.dim(" (biometric unlock cancelled
|
|
68
|
+
console.log(chalk.dim(" (biometric unlock cancelled - enter the passphrase instead)"));
|
|
69
69
|
}
|
|
70
70
|
return passphrase ?? undefined;
|
|
71
71
|
}
|
|
@@ -93,7 +93,7 @@ export function guardrailWithApproval(profile, opts = {}) {
|
|
|
93
93
|
catch (err) {
|
|
94
94
|
if (!(err instanceof BiometricUnavailableError))
|
|
95
95
|
throw err;
|
|
96
|
-
// Biometry unavailable right now (e.g. lid closed)
|
|
96
|
+
// Biometry unavailable right now (e.g. lid closed) - fall through.
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
if (interactive && process.stdin.isTTY) {
|
|
@@ -107,7 +107,7 @@ export function guardrailWithApproval(profile, opts = {}) {
|
|
|
107
107
|
]);
|
|
108
108
|
return ok;
|
|
109
109
|
}
|
|
110
|
-
console.error(chalk.yellow(`⚠ $${usd.toFixed(2)} call needs approval but no biometric or interactive terminal is available
|
|
110
|
+
console.error(chalk.yellow(`⚠ $${usd.toFixed(2)} call needs approval but no biometric or interactive terminal is available - denying.`));
|
|
111
111
|
return false;
|
|
112
112
|
},
|
|
113
113
|
};
|
|
@@ -125,7 +125,7 @@ export function formatUsd(amount) {
|
|
|
125
125
|
/** "2m ago" / "3h ago" / "5d ago". */
|
|
126
126
|
export function timeAgo(ts) {
|
|
127
127
|
if (!ts)
|
|
128
|
-
return chalk.dim("
|
|
128
|
+
return chalk.dim(" - ");
|
|
129
129
|
const s = (Date.now() - ts) / 1000;
|
|
130
130
|
if (s < 60)
|
|
131
131
|
return `${Math.floor(s)}s ago`;
|
package/dist/cli/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/cli/common.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,a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,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC;IACnC,IAAI,CAAC,GAAG,EAAE;QAAE,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC;IAC3C,IAAI,CAAC,GAAG,IAAI;QAAE,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC;IAClD,IAAI,CAAC,GAAG,KAAK;QAAE,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;IACrD,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;AACzC,CAAC"}
|
package/dist/cli/discover.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `xpay discover <query>`
|
|
2
|
+
* `xpay discover <query>` - search the agentic-commerce catalog.
|
|
3
3
|
*
|
|
4
|
-
* Read-only
|
|
4
|
+
* Read-only - does not load a profile or touch keys.
|
|
5
5
|
*/
|
|
6
6
|
export interface DiscoverCmdOptions {
|
|
7
7
|
limit?: string;
|
package/dist/cli/discover.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `xpay discover <query>`
|
|
2
|
+
* `xpay discover <query>` - search the agentic-commerce catalog.
|
|
3
3
|
*
|
|
4
|
-
* Read-only
|
|
4
|
+
* Read-only - does not load a profile or touch keys.
|
|
5
5
|
*/
|
|
6
6
|
import chalk from "chalk";
|
|
7
7
|
import { discover, lastDiscoverWarnings } from "../discover/index.js";
|
|
@@ -40,14 +40,14 @@ export async function runDiscover(query, opts) {
|
|
|
40
40
|
function printResource(r, index) {
|
|
41
41
|
const opt = r.accepts[0];
|
|
42
42
|
if (opt?.scheme === AGENC_SCHEME) {
|
|
43
|
-
// AgenC listing
|
|
43
|
+
// AgenC listing - priced in native SOL (9 decimals), executed as an
|
|
44
44
|
// on-chain escrow hire rather than an HTTP call.
|
|
45
45
|
const sol = opt.amount ? `◎${(Number(opt.amount) / 1e9).toFixed(4)} SOL` : chalk.dim("?");
|
|
46
46
|
const name = typeof r.metadata?.name === "string" && r.metadata.name ? r.metadata.name : safeHost(r.resource);
|
|
47
47
|
const rep = r.metadata?.reputation;
|
|
48
48
|
console.log(` ${chalk.bold(String(index).padStart(2) + ".")} ${sol} ${chalk.cyan("solana".padEnd(9))} ${chalk.magenta("agenc escrow")} ${chalk.white(name)}`);
|
|
49
49
|
console.log(` ${chalk.dim(r.resource)}`);
|
|
50
|
-
console.log(` ${chalk.dim(`↳ hires ${rep?.totalHires ?? "0"}, ratings ${rep?.ratingCount ?? 0}
|
|
50
|
+
console.log(` ${chalk.dim(`↳ hires ${rep?.totalHires ?? "0"}, ratings ${rep?.ratingCount ?? 0} - xpay agenc hire ${r.metadata?.listingPda}`)}`);
|
|
51
51
|
console.log("");
|
|
52
52
|
return;
|
|
53
53
|
}
|
package/dist/cli/guardrail.d.ts
CHANGED
package/dist/cli/guardrail.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `xpay guardrail show|set|clear`
|
|
2
|
+
* `xpay guardrail show|set|clear` - view and edit the active profile's
|
|
3
3
|
* spending guardrail. Persisted to config.json; loaded by every command that
|
|
4
4
|
* builds a runtime client.
|
|
5
5
|
*/
|
|
@@ -13,7 +13,7 @@ export function runGuardrailShow(profileName) {
|
|
|
13
13
|
console.log("");
|
|
14
14
|
console.log(chalk.bold(`Guardrail for "${name}"`));
|
|
15
15
|
if (!g || Object.keys(g).length === 0) {
|
|
16
|
-
console.log(chalk.yellow(" (no guardrail configured
|
|
16
|
+
console.log(chalk.yellow(" (no guardrail configured - calls are uncapped)"));
|
|
17
17
|
console.log(chalk.dim(" Set one with: xpay guardrail set --max-per-tx 1 --max-per-day 10"));
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
@@ -58,7 +58,7 @@ export function runGuardrailSet(opts) {
|
|
|
58
58
|
export function runGuardrailClear(profileName) {
|
|
59
59
|
const name = profileName ?? getActiveProfile();
|
|
60
60
|
clearProfileGuardrail(name);
|
|
61
|
-
console.log(chalk.yellow(`⚠ Guardrail cleared for "${name}"
|
|
61
|
+
console.log(chalk.yellow(`⚠ Guardrail cleared for "${name}" - calls are now uncapped.`));
|
|
62
62
|
}
|
|
63
63
|
function parseDollarsOrExit(raw, flag) {
|
|
64
64
|
const n = Number(raw);
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* xpay CLI
|
|
3
|
+
* xpay CLI - agentic-commerce wallet.
|
|
4
4
|
*
|
|
5
5
|
* Top-level commands:
|
|
6
6
|
* xpay init [--import] [--no-encrypt] [--workspace]
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* More to come: discover, pay, transfer, history, bridge, guardrail, link.
|
|
12
12
|
*
|
|
13
13
|
* Designed to also run as the MCP server entry point (the `bin` field points
|
|
14
|
-
* here)
|
|
14
|
+
* here) - invoking `xpay-mcp` directly defaults to the `mcp` subcommand.
|
|
15
15
|
*/
|
|
16
16
|
import "dotenv/config";
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/cli/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* xpay CLI
|
|
3
|
+
* xpay CLI - agentic-commerce wallet.
|
|
4
4
|
*
|
|
5
5
|
* Top-level commands:
|
|
6
6
|
* xpay init [--import] [--no-encrypt] [--workspace]
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* More to come: discover, pay, transfer, history, bridge, guardrail, link.
|
|
12
12
|
*
|
|
13
13
|
* Designed to also run as the MCP server entry point (the `bin` field points
|
|
14
|
-
* here)
|
|
14
|
+
* here) - invoking `xpay-mcp` directly defaults to the `mcp` subcommand.
|
|
15
15
|
*/
|
|
16
16
|
import "dotenv/config";
|
|
17
17
|
import { basename } from "node:path";
|
|
@@ -43,7 +43,7 @@ import { startMcpServer } from "./mcp-server.js";
|
|
|
43
43
|
const program = new Command();
|
|
44
44
|
program
|
|
45
45
|
.name("xpay")
|
|
46
|
-
.description("xPay
|
|
46
|
+
.description("xPay - discovery, payments, and wallet for agentic commerce.")
|
|
47
47
|
.version(pkgVersion);
|
|
48
48
|
// ---------------------------------------------------------------- init
|
|
49
49
|
program
|
|
@@ -91,7 +91,7 @@ program
|
|
|
91
91
|
.description("Pay an x402 endpoint (catalog URL or any URL that returns 402).")
|
|
92
92
|
.option("--profile <name>", "Profile to pay from (defaults to active)")
|
|
93
93
|
.option("--passphrase <value>", "Non-interactive passphrase")
|
|
94
|
-
.option("--method <m>", "HTTP method (default GET
|
|
94
|
+
.option("--method <m>", "HTTP method (default GET - use POST for most x402 services)")
|
|
95
95
|
.option("--max-usd <n>", "Override per-tx guardrail cap for this call")
|
|
96
96
|
.option("--body <json>", "Request body for POST endpoints (JSON)")
|
|
97
97
|
.option("-y, --yes", "Skip the confirmation prompt")
|
|
@@ -135,7 +135,7 @@ token
|
|
|
135
135
|
// ---------------------------------------------------------------- x (Twitter)
|
|
136
136
|
const xcmd = program
|
|
137
137
|
.command("x")
|
|
138
|
-
.description("Realtime X (Twitter) account data
|
|
138
|
+
.description("Realtime X (Twitter) account data - paid via x402 at cost (no X account needed).");
|
|
139
139
|
xcmd
|
|
140
140
|
.command("user <handle>")
|
|
141
141
|
.description("Profile lookup: followers, bio, verification (~$0.01 USDC).")
|
|
@@ -160,7 +160,7 @@ xcmd
|
|
|
160
160
|
// ---------------------------------------------------------------- zauth
|
|
161
161
|
const zauth = program
|
|
162
162
|
.command("zauth")
|
|
163
|
-
.description("zauth partner
|
|
163
|
+
.description("zauth partner - repository security scans, paid via x402.");
|
|
164
164
|
zauth
|
|
165
165
|
.command("reposcan <repoUrl>")
|
|
166
166
|
.description("Scan a repository via zauth (~$0.05 USDC, paid via x402).")
|
|
@@ -306,7 +306,7 @@ const sana = program
|
|
|
306
306
|
.description("Manage the Sana agent wallet card integration (optional).");
|
|
307
307
|
sana
|
|
308
308
|
.command("link <apiKey>")
|
|
309
|
-
.description("Link a Sana API key
|
|
309
|
+
.description("Link a Sana API key - enables sana_* tools in the MCP server.")
|
|
310
310
|
.option("--profile <name>", "Profile to link to (defaults to active)")
|
|
311
311
|
.action((apiKey, opts) => runSanaLink(apiKey, opts));
|
|
312
312
|
sana
|
|
@@ -321,7 +321,7 @@ sana
|
|
|
321
321
|
.action((opts) => runSanaStatus(opts));
|
|
322
322
|
sana
|
|
323
323
|
.command("card")
|
|
324
|
-
.description("Card metadata
|
|
324
|
+
.description("Card metadata - status, type, last 4, expiry.")
|
|
325
325
|
.option("--profile <name>")
|
|
326
326
|
.action((opts) => runSanaCard(opts));
|
|
327
327
|
sana
|
|
@@ -363,7 +363,7 @@ sana
|
|
|
363
363
|
// ---------------------------------------------------------------- bento
|
|
364
364
|
const bento = program
|
|
365
365
|
.command("bento")
|
|
366
|
-
.description("Bento Guard intent firewall
|
|
366
|
+
.description("Bento Guard intent firewall - screen payments for malicious intent (optional).");
|
|
367
367
|
bento
|
|
368
368
|
.command("status", { isDefault: true })
|
|
369
369
|
.description("Show whether the Bento intent firewall is enabled.")
|
|
@@ -376,13 +376,13 @@ bento
|
|
|
376
376
|
.action((opts) => runBentoEnable(opts));
|
|
377
377
|
bento
|
|
378
378
|
.command("disable")
|
|
379
|
-
.description("Disable Bento intent screening
|
|
379
|
+
.description("Disable Bento intent screening - payments rely on local caps only.")
|
|
380
380
|
.option("--profile <name>", "Profile to disable (defaults to active)")
|
|
381
381
|
.action((opts) => runBentoDisable(opts));
|
|
382
382
|
// ---------------------------------------------------------------- magicblock
|
|
383
383
|
const magicblock = program
|
|
384
384
|
.command("magicblock")
|
|
385
|
-
.description("MagicBlock Private Ephemeral Rollup
|
|
385
|
+
.description("MagicBlock Private Ephemeral Rollup - platform-level privacy setup (operator commands).");
|
|
386
386
|
magicblock
|
|
387
387
|
.command("status", { isDefault: true })
|
|
388
388
|
.description("Show MagicBlock PER integration status and mint initialization state.")
|
|
@@ -407,7 +407,7 @@ magicblock
|
|
|
407
407
|
// ---------------------------------------------------------------- agenc
|
|
408
408
|
const agenc = program
|
|
409
409
|
.command("agenc")
|
|
410
|
-
.description("AgenC marketplace (agenc.ag)
|
|
410
|
+
.description("AgenC marketplace (agenc.ag) - hire on-chain agent services with SOL escrow.");
|
|
411
411
|
agenc
|
|
412
412
|
.command("hire <listingPda>")
|
|
413
413
|
.description("Hire a listing: escrow its SOL price on-chain; the provider works asynchronously.")
|
package/dist/cli/init.d.ts
CHANGED
package/dist/cli/init.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `xpay init`
|
|
2
|
+
* `xpay init` - create a new profile (or import one).
|
|
3
3
|
*
|
|
4
4
|
* Flow:
|
|
5
5
|
* 1. Confirm profile name (default: "default") + workspace flag.
|
|
@@ -77,7 +77,7 @@ export async function runInit(opts) {
|
|
|
77
77
|
console.log(` EVM ${chalk.cyan(result.addresses.evm)}`);
|
|
78
78
|
console.log("");
|
|
79
79
|
if (!opts.import) {
|
|
80
|
-
console.log(chalk.yellow.bold("⚠ RECOVERY PHRASE
|
|
80
|
+
console.log(chalk.yellow.bold("⚠ RECOVERY PHRASE - write this down NOW. We cannot recover it for you."));
|
|
81
81
|
console.log("");
|
|
82
82
|
printMnemonicGrid(result.mnemonic);
|
|
83
83
|
console.log("");
|
package/dist/cli/magicblock.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `xpay magicblock`
|
|
2
|
+
* `xpay magicblock` - platform-level MagicBlock PER integration commands.
|
|
3
3
|
*
|
|
4
4
|
* xpay acts as the privacy platform: end users never need a MagicBlock account.
|
|
5
5
|
* These commands are for the xpay operator (platform team) to run once.
|
package/dist/cli/magicblock.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `xpay magicblock`
|
|
2
|
+
* `xpay magicblock` - platform-level MagicBlock PER integration commands.
|
|
3
3
|
*
|
|
4
4
|
* xpay acts as the privacy platform: end users never need a MagicBlock account.
|
|
5
5
|
* These commands are for the xpay operator (platform team) to run once.
|
|
@@ -35,14 +35,14 @@ export async function runMagicBlockStatus(opts) {
|
|
|
35
35
|
const initialized = await magicBlockIsMintInitialized(USDC_SOLANA, mb).catch(() => false);
|
|
36
36
|
process.stdout.write("\r");
|
|
37
37
|
if (initialized) {
|
|
38
|
-
console.log(` ${chalk.green("●")} USDC mint is initialized
|
|
38
|
+
console.log(` ${chalk.green("●")} USDC mint is initialized - private transfers are ready.`);
|
|
39
39
|
}
|
|
40
40
|
else {
|
|
41
41
|
console.log(` ${chalk.yellow("●")} USDC mint is not yet initialized.`);
|
|
42
42
|
console.log(chalk.dim(" Run: xpay magicblock init-mint"));
|
|
43
43
|
}
|
|
44
44
|
console.log("");
|
|
45
|
-
console.log(chalk.dim(" End users pass private:true to xpay_transfer
|
|
45
|
+
console.log(chalk.dim(" End users pass private:true to xpay_transfer - no MagicBlock account needed."));
|
|
46
46
|
console.log("");
|
|
47
47
|
}
|
|
48
48
|
// ─── Init mint (one-time platform setup) ─────────────────────────────────────
|
|
@@ -90,7 +90,7 @@ export function runMagicBlockConfigure(opts) {
|
|
|
90
90
|
const name = opts.profile ?? getActiveProfile();
|
|
91
91
|
if (opts.clear) {
|
|
92
92
|
clearMagicBlockConfig(name);
|
|
93
|
-
console.log(chalk.yellow(`⚠ MagicBlock config cleared from profile "${name}"
|
|
93
|
+
console.log(chalk.yellow(`⚠ MagicBlock config cleared from profile "${name}" - using defaults.`));
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
96
|
if (!opts.apiUrl && !opts.ephemeralRpc) {
|
package/dist/cli/mcp-server.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* xPay MCP server.
|
|
3
3
|
*
|
|
4
|
-
* Exposes every CLI capability as an MCP tool over stdio. Zero-config
|
|
4
|
+
* Exposes every CLI capability as an MCP tool over stdio. Zero-config - drop
|
|
5
5
|
* this into any Claude Desktop / Cursor / Codex / agent-framework config and
|
|
6
6
|
* on first boot the agent is given its own persistent wallet:
|
|
7
7
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* }
|
|
15
15
|
* }
|
|
16
16
|
*
|
|
17
|
-
* The generated wallet's address is printed to stderr on first run
|
|
17
|
+
* The generated wallet's address is printed to stderr on first run - fund the
|
|
18
18
|
* Solana address with USDC to let the agent pay. It persists under ~/.xpay and
|
|
19
19
|
* is reused on every later boot.
|
|
20
20
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../../src/cli/mcp-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAmBH,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../../src/cli/mcp-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAmBH,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CA+JpD"}
|
package/dist/cli/mcp-server.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* xPay MCP server.
|
|
3
3
|
*
|
|
4
|
-
* Exposes every CLI capability as an MCP tool over stdio. Zero-config
|
|
4
|
+
* Exposes every CLI capability as an MCP tool over stdio. Zero-config - drop
|
|
5
5
|
* this into any Claude Desktop / Cursor / Codex / agent-framework config and
|
|
6
6
|
* on first boot the agent is given its own persistent wallet:
|
|
7
7
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* }
|
|
15
15
|
* }
|
|
16
16
|
*
|
|
17
|
-
* The generated wallet's address is printed to stderr on first run
|
|
17
|
+
* The generated wallet's address is printed to stderr on first run - fund the
|
|
18
18
|
* Solana address with USDC to let the agent pay. It persists under ~/.xpay and
|
|
19
19
|
* is reused on every later boot.
|
|
20
20
|
*
|
|
@@ -35,14 +35,14 @@ import { profileExists } from "../profile/storage.js";
|
|
|
35
35
|
import { readProfileConfig, setProfileBento } from "../profile/index.js";
|
|
36
36
|
import { rawSolanaSigner } from "../signers/raw-solana.js";
|
|
37
37
|
import { rawEvmSigner } from "../signers/raw-evm.js";
|
|
38
|
-
import { forClaude } from "../tools/index.js";
|
|
38
|
+
import { forClaude, TOOL_ANNOTATIONS } from "../tools/index.js";
|
|
39
39
|
import { getActiveProfile } from "./accounts.js";
|
|
40
40
|
import { guardrailWithApproval } from "./common.js";
|
|
41
41
|
export async function startMcpServer() {
|
|
42
42
|
// Boot must not throw: a crash here kills the stdio transport and the host
|
|
43
43
|
// only shows "Connection closed" with no way to recover. When the wallet
|
|
44
44
|
// can't be unlocked (encrypted profile, no/wrong passphrase) we start in a
|
|
45
|
-
// locked state instead
|
|
45
|
+
// locked state instead - tools are listed, and every call returns the
|
|
46
46
|
// unlock instructions for the agent to relay to the user.
|
|
47
47
|
let xpay;
|
|
48
48
|
let profileName = null;
|
|
@@ -52,7 +52,7 @@ export async function startMcpServer() {
|
|
|
52
52
|
}
|
|
53
53
|
catch (err) {
|
|
54
54
|
lockedReason = lockedBootMessage(err);
|
|
55
|
-
process.stderr.write(`[xpay-mcp] wallet locked
|
|
55
|
+
process.stderr.write(`[xpay-mcp] wallet locked - starting in locked mode.\n[xpay-mcp] ${lockedReason}\n`);
|
|
56
56
|
// Placeholder client: tool construction never touches it (all access is
|
|
57
57
|
// inside handler closures) and calls short-circuit on lockedReason below.
|
|
58
58
|
xpay = new Proxy({}, {
|
|
@@ -63,12 +63,12 @@ export async function startMcpServer() {
|
|
|
63
63
|
}
|
|
64
64
|
const sanaApiKey = await resolveSanaApiKey();
|
|
65
65
|
const { tools, handlers } = forClaude(xpay, { sanaApiKey });
|
|
66
|
-
// Note: xpay_transfer executes directly (via the forClaude handler)
|
|
66
|
+
// Note: xpay_transfer executes directly (via the forClaude handler) - the same
|
|
67
67
|
// path as the CLI. We deliberately do NOT stage transfers behind a second
|
|
68
68
|
// "confirm" tool call: that relied on the agent faithfully making a follow-up
|
|
69
69
|
// call, which weaker models skip while hallucinating a success + fake tx hash.
|
|
70
70
|
// The real spending gate is the guardrail (caps + requireApprovalAbove), which
|
|
71
|
-
// surfaces as a Touch ID prompt on MCP when biometric unlock is enabled
|
|
71
|
+
// surfaces as a Touch ID prompt on MCP when biometric unlock is enabled - a
|
|
72
72
|
// gate the model can't fake or skip.
|
|
73
73
|
const mcpTools = [
|
|
74
74
|
...tools,
|
|
@@ -82,7 +82,7 @@ export async function startMcpServer() {
|
|
|
82
82
|
name: "xpay_bento_enable",
|
|
83
83
|
description: "Turn ON the Bento intent firewall for this agent's wallet. Returns the agent wallet " +
|
|
84
84
|
"address, which must be registered once at app.bentoguard.xyz (logging in with the " +
|
|
85
|
-
"owner wallet) before protection takes effect
|
|
85
|
+
"owner wallet) before protection takes effect - until then payments are rejected.",
|
|
86
86
|
inputSchema: { type: "object", properties: {} },
|
|
87
87
|
},
|
|
88
88
|
{
|
|
@@ -130,7 +130,7 @@ export async function startMcpServer() {
|
|
|
130
130
|
enabled: true,
|
|
131
131
|
agentWallet: agentSolanaAddress(),
|
|
132
132
|
action_required: `Register this agent wallet at ${BENTO_DASHBOARD} (log in with your owner wallet). ` +
|
|
133
|
-
`Until it's registered, payments are rejected with "Agent not found"
|
|
133
|
+
`Until it's registered, payments are rejected with "Agent not found" - call ` +
|
|
134
134
|
`xpay_bento_disable to fall back to local caps if you don't want to register.`,
|
|
135
135
|
};
|
|
136
136
|
};
|
|
@@ -151,6 +151,9 @@ export async function startMcpServer() {
|
|
|
151
151
|
name: t.name,
|
|
152
152
|
description: t.description,
|
|
153
153
|
inputSchema: "input_schema" in t ? t.input_schema : t.inputSchema,
|
|
154
|
+
// ChatGPT Apps review requires explicit readOnly/openWorld/destructive
|
|
155
|
+
// hints on every tool; sana_* tools (key-gated) fall back to undefined.
|
|
156
|
+
annotations: TOOL_ANNOTATIONS[t.name],
|
|
154
157
|
})),
|
|
155
158
|
}));
|
|
156
159
|
server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
@@ -197,7 +200,7 @@ async function buildXPay() {
|
|
|
197
200
|
// Expose the agent's own key so a runtime `xpay_bento_enable` can activate
|
|
198
201
|
// protect() without a restart. In-process only; it's the wallet's own key.
|
|
199
202
|
process.env.AGENT_WALLET_PRIVATE_KEY ??= deriveKeysFromMnemonic(profile.mnemonic).solana.secretKeyBase58;
|
|
200
|
-
// No TTY here
|
|
203
|
+
// No TTY here - approvals above the guardrail threshold surface as a
|
|
201
204
|
// system Touch ID dialog when the profile has biometric unlock enabled.
|
|
202
205
|
const xpay = createXPay({ profile, guardrail: guardrailWithApproval(profile, { interactive: false }) });
|
|
203
206
|
return { xpay, profileName };
|
|
@@ -213,7 +216,7 @@ async function buildXPay() {
|
|
|
213
216
|
signers[evmNet] = rawEvmSigner({ privateKey: process.env.XPAY_EVM_KEY, network: evmNet });
|
|
214
217
|
}
|
|
215
218
|
if (Object.keys(signers).length === 0) {
|
|
216
|
-
// Nothing configured
|
|
219
|
+
// Nothing configured - give the agent its own wallet (zero-config
|
|
217
220
|
// onboarding). Opt out with XPAY_NO_AUTO_WALLET for the strict behaviour.
|
|
218
221
|
if (!process.env.XPAY_NO_AUTO_WALLET) {
|
|
219
222
|
return autoProvisionXPay(profileName);
|
|
@@ -223,7 +226,7 @@ async function buildXPay() {
|
|
|
223
226
|
`XPAY_NO_AUTO_WALLET to auto-generate a wallet.`);
|
|
224
227
|
}
|
|
225
228
|
// Raw-key mode: no profile on disk, so bento's profile-gated flag can't be
|
|
226
|
-
// toggled
|
|
229
|
+
// toggled - profileName is null and the bento tools report that.
|
|
227
230
|
const xpay = createXPay({
|
|
228
231
|
networks,
|
|
229
232
|
signers,
|
|
@@ -239,23 +242,23 @@ async function buildXPay() {
|
|
|
239
242
|
* Zero-config onboarding: no profile and no key configured, so generate a
|
|
240
243
|
* fresh wallet for the agent, persist it under ~/.xpay (or XPAY_HOME), and
|
|
241
244
|
* surface the address. Encrypted when XPAY_PASSPHRASE is set, otherwise
|
|
242
|
-
* plaintext (file-permission protected)
|
|
245
|
+
* plaintext (file-permission protected) - fine for a low-balance agent wallet.
|
|
243
246
|
*
|
|
244
247
|
* Runs once: the next boot finds the profile and loads it via the normal path,
|
|
245
248
|
* so the agent keeps the same address across restarts. All notices go to
|
|
246
|
-
* stderr
|
|
249
|
+
* stderr - stdout is the MCP JSON-RPC channel and must stay clean.
|
|
247
250
|
*/
|
|
248
251
|
async function autoProvisionXPay(profileName) {
|
|
249
252
|
const passphrase = process.env.XPAY_PASSPHRASE || undefined;
|
|
250
253
|
const created = await initProfile({ name: profileName, passphrase });
|
|
251
|
-
process.stderr.write(`\n[xpay-mcp] No wallet found
|
|
254
|
+
process.stderr.write(`\n[xpay-mcp] No wallet found - generated one for this agent.\n` +
|
|
252
255
|
`[xpay-mcp] profile: ${profileName}\n` +
|
|
253
256
|
`[xpay-mcp] Solana: ${created.addresses.solana}\n` +
|
|
254
257
|
`[xpay-mcp] Base/EVM: ${created.addresses.evm}\n` +
|
|
255
258
|
`[xpay-mcp] stored: ${created.path}` +
|
|
256
|
-
(passphrase ? " (encrypted)\n" : " (UNENCRYPTED
|
|
259
|
+
(passphrase ? " (encrypted)\n" : " (UNENCRYPTED - set XPAY_PASSPHRASE to encrypt at rest)\n") +
|
|
257
260
|
`[xpay-mcp] Fund the Solana address with USDC so the agent can pay.\n` +
|
|
258
|
-
`[xpay-mcp] The recovery phrase lives in ${created.path}
|
|
261
|
+
`[xpay-mcp] The recovery phrase lives in ${created.path} - back it up.\n\n`);
|
|
259
262
|
const profile = await loadProfile({ name: profileName, passphrase });
|
|
260
263
|
process.env.AGENT_WALLET_PRIVATE_KEY ??= deriveKeysFromMnemonic(profile.mnemonic).solana.secretKeyBase58;
|
|
261
264
|
const xpay = createXPay({ profile, guardrail: guardrailWithApproval(profile, { interactive: false }) });
|
|
@@ -269,20 +272,20 @@ async function autoProvisionXPay(profileName) {
|
|
|
269
272
|
async function resolveSanaApiKey() {
|
|
270
273
|
try {
|
|
271
274
|
const profileName = process.env.XPAY_PROFILE ?? getActiveProfile();
|
|
272
|
-
// config.json is plaintext
|
|
275
|
+
// config.json is plaintext - no need to unlock the wallet to read it.
|
|
273
276
|
const { readProfileConfig } = await import("../profile/index.js");
|
|
274
277
|
const key = readProfileConfig(profileName).sana?.apiKey;
|
|
275
278
|
if (key)
|
|
276
279
|
return key;
|
|
277
280
|
}
|
|
278
281
|
catch {
|
|
279
|
-
// profile not found
|
|
282
|
+
// profile not found - fall through to env
|
|
280
283
|
}
|
|
281
284
|
return process.env.SANABOT_API_KEY || undefined;
|
|
282
285
|
}
|
|
283
286
|
/**
|
|
284
287
|
* Turn a boot failure into the message locked-mode tools return. The agent
|
|
285
|
-
* relays this to the user, so it has to carry the full remediation
|
|
288
|
+
* relays this to the user, so it has to carry the full remediation - the
|
|
286
289
|
* user never sees stderr in an MCP host.
|
|
287
290
|
*/
|
|
288
291
|
function lockedBootMessage(err) {
|
|
@@ -296,7 +299,7 @@ function lockedBootMessage(err) {
|
|
|
296
299
|
if (err.message.includes("passphrase required")) {
|
|
297
300
|
return (`The xpay wallet profile "${profileName}" is encrypted and no passphrase was provided, ` +
|
|
298
301
|
`so wallet tools are locked. ${unlockHint}\n` +
|
|
299
|
-
`If the passphrase is lost, the wallet cannot be decrypted
|
|
302
|
+
`If the passphrase is lost, the wallet cannot be decrypted - restore from the recovery ` +
|
|
300
303
|
`phrase with \`npx @xona-labs/xpay init --overwrite\`, or delete the profile directory ` +
|
|
301
304
|
`to start fresh (funds at the old address are only recoverable with the phrase).`);
|
|
302
305
|
}
|
|
@@ -308,7 +311,7 @@ function lockedBootMessage(err) {
|
|
|
308
311
|
`${err.message}`);
|
|
309
312
|
}
|
|
310
313
|
/**
|
|
311
|
-
* Touch ID unlock at MCP startup
|
|
314
|
+
* Touch ID unlock at MCP startup - lets hosts omit XPAY_PASSPHRASE from
|
|
312
315
|
* their config when the profile has `xpay biometric enable` set. Shows one
|
|
313
316
|
* system dialog as the server boots; resolves undefined on any failure so
|
|
314
317
|
* loadProfile produces its normal "passphrase required" error.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../../src/cli/mcp-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../../src/cli/mcp-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;A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SAAS,CAAC;QACzE,MAAM,EAAE,uBAAuB,EAAE,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAC;QAC1E,OAAO,CACL,CAAC,MAAM,uBAAuB,CAAC,WAAW,EAAE,4BAA4B,WAAW,GAAG,CAAC,CAAC;YACxF,SAAS,CACV,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,SAAS,UAAU,CAAC,IAAY;IAC9B,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC5B,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,EAAE;QAAE,OAAO,SAAS,CAAC;IAClD,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IACpB,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC5C,CAAC"}
|
package/dist/cli/pay.d.ts
CHANGED
package/dist/cli/pay.js
CHANGED
package/dist/cli/report.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `xpay report`
|
|
2
|
+
* `xpay report` - comprehensive USDC activity report via OrbitX402.
|
|
3
3
|
*
|
|
4
4
|
* Fetches daily / weekly / monthly aggregated data from the OrbitX402 API
|
|
5
|
-
* (on-chain data is resolved server-side
|
|
5
|
+
* (on-chain data is resolved server-side - no RPC calls from the CLI).
|
|
6
6
|
*/
|
|
7
7
|
export interface ReportCmdOptions {
|
|
8
8
|
profile?: string;
|