Server-side session credential action handlers.
Dispatches on credential.payload.action to open, voucher, top_up,
and close. Each handler updates per-channel deposit / voucher /
spend balances through MPP.Session.Store.
Summary
Functions
Parse a session payload and apply the matching channel-state handler.
Apply a parsed session payload to the channel store.
Dispatch a session credential payload using fields on the session intent.
Types
@type opts() :: keyword()
Functions
@spec dispatch(map(), opts()) :: {:ok, MPP.Receipt.t()} | {:error, MPP.Errors.t()}
Parse a session payload and apply the matching channel-state handler.
@spec handle(MPP.Session.Payload.t(), opts()) :: {:ok, MPP.Receipt.t()} | {:error, MPP.Errors.t()}
Apply a parsed session payload to the channel store.
@spec verify(map(), MPP.Intents.Session.t()) :: {:ok, MPP.Receipt.t()} | {:error, MPP.Errors.t()}
Dispatch a session credential payload using fields on the session intent.