agentic-x402 0.2.2 → 0.2.3
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/package.json
CHANGED
|
@@ -56,7 +56,7 @@ Options:
|
|
|
56
56
|
-h, --help Show this help
|
|
57
57
|
|
|
58
58
|
Environment:
|
|
59
|
-
X402_LINKS_API_URL Base URL of x402-links-server (
|
|
59
|
+
X402_LINKS_API_URL Base URL of x402-links-server (default: https://21.cash)
|
|
60
60
|
|
|
61
61
|
Examples:
|
|
62
62
|
x402 create-link --name "Premium Guide" --price 5.00 --url https://mysite.com/guide.pdf
|
|
@@ -68,12 +68,6 @@ Examples:
|
|
|
68
68
|
|
|
69
69
|
const config = getConfig();
|
|
70
70
|
|
|
71
|
-
if (!config.x402LinksApiUrl) {
|
|
72
|
-
console.error('Error: X402_LINKS_API_URL environment variable is required');
|
|
73
|
-
console.error('Set it to the base URL of your x402-links-server instance');
|
|
74
|
-
process.exit(1);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
71
|
const name = flags.name as string;
|
|
78
72
|
const price = flags.price as string;
|
|
79
73
|
const gatedUrl = flags.url as string | undefined;
|
package/scripts/core/config.ts
CHANGED
|
@@ -71,7 +71,7 @@ export function getConfig(): X402Config {
|
|
|
71
71
|
network,
|
|
72
72
|
chainId,
|
|
73
73
|
facilitatorUrl: getOptionalEnv('X402_FACILITATOR_URL', defaultFacilitator),
|
|
74
|
-
x402LinksApiUrl: process.env.X402_LINKS_API_URL,
|
|
74
|
+
x402LinksApiUrl: process.env.X402_LINKS_API_URL || 'https://21.cash',
|
|
75
75
|
maxPaymentUsd: parseFloat(getOptionalEnv('X402_MAX_PAYMENT_USD', '10')),
|
|
76
76
|
slippageBps: parseInt(getOptionalEnv('X402_SLIPPAGE_BPS', '50'), 10),
|
|
77
77
|
verbose: getOptionalEnv('X402_VERBOSE', '0') === '1',
|