wolverine-ai 5.3.3 → 5.3.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wolverine-ai",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.5",
|
|
4
4
|
"description": "Self-healing Node.js server framework powered by AI. Catches crashes, diagnoses errors, generates fixes, verifies, and restarts — automatically.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -159,15 +159,20 @@ async function x402Plugin(fastify, opts) {
|
|
|
159
159
|
|
|
160
160
|
// Verify via facilitator
|
|
161
161
|
try {
|
|
162
|
+
console.log(` 💰 x402 verify: from=${decodedPayment.payload?.authorization?.from} value=${decodedPayment.payload?.authorization?.value} network=${decodedPayment.network}`);
|
|
163
|
+
console.log(` 💰 x402 payload: ${JSON.stringify(decodedPayment).slice(0, 300)}`);
|
|
164
|
+
console.log(` 💰 x402 requirements: ${JSON.stringify(actualRequirements).slice(0, 300)}`);
|
|
162
165
|
const verifyResult = await _facilitatorClient.verify(decodedPayment, actualRequirements);
|
|
163
166
|
if (!verifyResult.isValid) {
|
|
164
|
-
console.log(` ⚠️ x402 verify failed: ${verifyResult.invalidReason}`);
|
|
165
|
-
reply.code(402).send({ error: verifyResult.invalidReason || "Payment verification failed", accepts: [paymentRequirements], payer: verifyResult.payer });
|
|
167
|
+
console.log(` ⚠️ x402 verify failed: ${verifyResult.invalidReason} ${verifyResult.invalidMessage || ""}`);
|
|
168
|
+
reply.code(402).send({ error: verifyResult.invalidReason || "Payment verification failed", message: verifyResult.invalidMessage, accepts: [paymentRequirements], payer: verifyResult.payer });
|
|
166
169
|
return;
|
|
167
170
|
}
|
|
168
171
|
} catch (err) {
|
|
169
|
-
|
|
170
|
-
|
|
172
|
+
// Extract detailed error from the x402 SDK
|
|
173
|
+
const detail = err.invalidReason || err.invalidMessage || err.cause?.message || "";
|
|
174
|
+
console.log(` ⚠️ x402 verify error: ${err.message} | ${detail}`);
|
|
175
|
+
reply.code(402).send({ error: err.invalidReason || err.message, message: err.invalidMessage || detail, accepts: [paymentRequirements] });
|
|
171
176
|
return;
|
|
172
177
|
}
|
|
173
178
|
|