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.
Submits for one Destination are serialized on this BEAM node.
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.
Submits for one Destination account are serialized on this BEAM node
so concurrent closes cannot share a Sequence. An already-settled
channel returns the recorded txHash without submitting again. A
tefPAST_SEQ submit is retried once with a fresh Sequence.
Only closed channels may redeem. Lease acquisition defaults to 30 seconds
(redeem_lock_timeout_ms). Successful submits validate outside the account
lease; queued submits retain it through validation. A channel lease covers
validation and persistence for same-channel idempotency.
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
%{}