Axo

Axo MPPX

Use @axobot/mppx for Lightning-native MPP charge and session flows with provider adapters.

@axobot/mppx is Axo's Lightning-native implementation layer for MPP. It is protocol-compatible, Axo-maintained, and provider-agnostic at the interface layer, with a first-party provider adapter.

Install

npm install @axobot/mppx

What It Provides

  • Payment-auth header encoding and parsing for MPP
  • Lightning charge helpers
  • Lightning session helpers
  • invoice + preimage oriented session lifecycle
  • optional returnLightningAddress Axo extension in addition to spec-native returnInvoice
  • provider adapter boundary
  • first-party provider adapter

Package Shape

import {
  parsePaymentAuthenticateHeader,
  encodePaymentRequest,
  encodePaymentCredential,
  openLightningSession,
  bearerLightningSession,
  topUpLightningSession,
  closeLightningSession,
  createZbdLightningAdapter,
} from "@axobot/mppx";

Session Model

The first Axo implementation follows the public Lightning MPP drafts:

  • depositInvoice for opening a session
  • preimage as the bearer secret
  • topUp with a fresh invoice and preimage
  • close with refund to either:
    • returnInvoice
    • returnLightningAddress as an Axo extension

How It Fits The Stack

  • @axobot/fetch uses it for MPP client flows
  • @axobot/pay uses it for charge and session middleware
  • axo uses it for axo session ...
  • axo.bot stores managed session lifecycle per agent

Info

Axo does not treat MPP as a Spark-only product surface. @axobot/mppx is the Axo-owned Lightning-native implementation layer.

On this page