Skip to content

Stale methods and incorrect information in mpp section #60

Description

@jeesunikim

I tested sending a payment via x402 and mpp using this skill.

Claude marked following as stale and I confirmed them:

1. mppx.middleware() does not exist - SKILL.md:430, 516

The skill mounts payments with:

app.use(mppx.middleware());   // ❌ no such method

Reality: use the Express adapter mppx/express. Mppx.create(...) returns per-intent Express RequestHandlers, and the price is set per-route in the handler options (the skill never sets an amount anywhere):

import { Mppx } from "mppx/express";
const mppx = Mppx.create({ secretKey, methods: [ stellar.charge({ ... }) ] });
app.get("/data", mppx.charge({ amount: "0.001", description: "…" }), (req, res) => {
  res.json({ /* paid content */ });
});

2. Mppx / Store are not exported by mppx - SKILL.md:404, 443, 499, 529, 589

import { Mppx, Store } from "mppx";   // ❌ mppx exports neither Mppx nor a usable top-level Mppx

Reality: See mppx repo

Symbol Correct import
server Mppx (Express) import { Mppx } from "mppx/express"
server Mppx (raw) import { Mppx } from "mppx/server"
client Mppx import { Mppx } from "@stellar/mpp/charge/client" (re-exports mppx/client)
Store import { Store } from "mppx/server"

The package-map table at line 589 (`mppx` | `import { Mppx, Store } from "mppx"`) is the incorrect source.

3. Charge server charge() requires a store - SKILL.md:414

The Part 2 charge-server example passes no store (store is only shown for channel mode, line 508). Without it the server throws at startup:

Error: [stellar:charge] A store is required for charge mode. Provide a Store instance…

Fix: add store: Store.memory() to the charge-server's stellar.charge({ … }).

4. Client progress event names are wrong - SKILL.md:455–456

// event.type: "challenge" | "signed" | "settled"        // ❌
if (event.type === "settled") console.log(event.txHash); // ❌ no "settled", no .txHash

Reality (from charge/client types): events are
challenge | signing | signed | paying | confirming | paid, and the hash field is event.hash (final event is paid, not settled). See stellar-mpp-sdk#progress-events

5. Peer-dependency versions conflict with the samples - SKILL.md:395, 74/403/498

@stellar/mpp@0.7.1 pins:

  • @stellar/stellar-sdk@^15.1.0 (skill's x402 setup uses whatever; MPP install with SDK 13 fails ERESOLVE)
  • mppx@^0.6.29, and mppx@0.6.31 wants express@>=5 (peerOptional) — the skill's import express samples assume Express 4.

Working install for the MPP demo:

{ "@stellar/mpp": "0.7.1", "mppx": "^0.6.29",
  "@stellar/stellar-sdk": "^15.1.0", "express": "^5.0.0" }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions