mppx includes a basic CLI for making HTTP requests with automatic payment handling. Tempo
session channels are retained and reused automatically until you close them.
# create account - stored in keychain, autofunded on testnet
mppx account create
# make request - automatic payment handling, curl-like api
mppx example.com
# pay an x402 offer on a server that advertises both protocols
mppx example.com --protocol x402
# open another session instead of reusing the preferred channel
mppx example.com --session new
# inspect and close retained sessions
mppx sessions list
mppx sessions view <channel-id>
mppx sessions close <channel-id>
mppx sessions close --all --yes# explicitly trust a custom session escrow advertised by the server
mppx example.com -M allowCustomEscrow=true
--session auto is the default. Pass new to open another channel or a channel ID to select one
explicitly.
Tempo session clients accept only the canonical escrow contract by default. A server may advertise
its configured custom escrow in the payment challenge, but the client rejects it unless
-M allowCustomEscrow=true is supplied. This opt-in trusts the server-selected address; clients
that do not support custom escrows should leave it unset. See the
session escrow trust documentation.
--protocol auto is the default: MPP is preferred when available, and x402 is used otherwise.
Pass mpp or x402 to require one protocol. x402 payments use the same EVM account as EVM
charges, so MPPX_PRIVATE_KEY or a stored account works for both.
Payment extensions can enforce policy or prepare funds after challenge selection and confirmation,
immediately before credential creation:
tempo(), tempo.charge(), tempo.session(), and tempo.subscription() offer OUSD first, followed by USDC.e on mainnet or pathUSD on Moderato (testnet: true). Each factory returns a group accepted directly by Mppx.create. Clients choose one offer; ordering does not trigger an automatic swap.
Omit currencies for the network defaults, or use currencies: [ousd] to accept only OUSD on mainnet. Explicit lists replace the defaults. The deprecated currency option also restricts acceptance to one token. Wire requests and handler overrides continue to use singular currency.
Use configured handlers such as mppx.tempo.charge when composing payments. Code that directly inspects a Method can destructure the group: const [charge] = tempo.charge({ currencies: [ousd] }). Existing sessions and subscriptions continue using their originally authorized currency.
FAQs
Unknown package
The npm package mppx receives a total of 148,107 weekly downloads. As such, mppx popularity was classified as popular.
We found that mppx demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 3 open source maintainers collaborating on the project.