Skip to content

v0.8.0 · Pay through Permit2, and in $MERX

Choose a tag to compare

@Merxagent Merxagent released this 30 Nov 12:35

SDK 0.8.0 adds x402 payments through Permit2, for tokens without EIP-3009 such as $MERX.

  • createPermit2Payload, verifyPermit2Payment: the canonical x402ExactPermit2Proxy as spender, so a payment can only reach the address that quoted it
  • One quote can offer several ways to pay (PaidSkill.alternatives)
  • merx.call(skill, input, { payWith: { token, maxAmount } }), with maxAmount capping each call before anything is signed
  • Merx's own skills can be paid in $MERX at 10% off

Note: payWith matched no quote in this version; fixed in v0.8.1.