XRPL session verification over native payment channels.
Implements draft-xrpl-session-00 at mpp-specs commit 213b098. Open
submits a signed PaymentChannelCreate, then treats amount + signature
as the first claim. Voucher and close are off-ledger claims over the
cumulative drop total. The highest accepted claim (cumulative, signature,
ledger PublicKey) is retained on MPP.Session.Channel.proof.
Close submits PaymentChannelClaim with tfClose unless
defer_redemption is true, in which case redeem/2 submits later.
The Destination (server) pays the claim transaction Fee from its own
XRP; set destination_secret to that account's family seed.
Configure rpc_url (HTTPS) and network (mainnet / testnet / devnet).
min_settle_delay defaults to 3600 seconds; closing_margin defaults to
3600 seconds of ledger close-time. The session store is namespaced by
network so the same PayChannel ID on two ledgers cannot share a mark.
API Functions
| Function | Arity | Description | Param Kinds |
|---|---|---|---|
redeem | 2 | Submit the stored highest PaymentChannelClaim for a channel. | - |
verify | 2 | Verify an XRPL session credential and update the channel store. | - |
challenge_method_details | 1 | Expose the draft's public session method details. | - |
validate_config! | 1 | Validate RPC, network and settle-delay configuration. | - |
credential_types | 0 | Session credentials are discriminated by action, not payload.type. | - |
method_name | 0 | Return the XRPL payment method identifier. | - |
Summary
Functions
Expose the draft's public session method details.
Session credentials are discriminated by action, not payload.type.
Return the XRPL payment method identifier.
Submit the highest retained claim as PaymentChannelClaim.
Validate RPC, network and settle-delay configuration.
Verify an XRPL session credential and update the channel store.
Functions
@spec challenge_method_details(MPP.Method.intent()) :: map() | nil
@spec challenge_method_details(MPP.Intents.Session.t()) :: map()
Expose the draft's public session method details.
# descripex:contract
%{}
Session credentials are discriminated by action, not payload.type.
# descripex:contract
%{}
@spec method_name() :: String.t()
Return the XRPL payment method identifier.
# descripex:contract
%{}
@spec redeem(String.t(), map()) :: {:ok, String.t()} | {:error, MPP.Errors.t()}
Submit the highest retained claim as PaymentChannelClaim.
Used automatically on close unless defer_redemption is true. The
Destination pays the transaction Fee from its XRP balance.
Validate RPC, network and settle-delay configuration.
# descripex:contract
%{}
@spec verify(map(), MPP.Intents.Session.t()) :: {:ok, MPP.Receipt.t()} | {:error, MPP.Errors.t()}
Verify an XRPL session credential and update the channel store.
# descripex:contract
%{}