Stellar charge verification for SEP-41 token transfers.
Implements draft-stellar-charge-00. Pull credentials carry
type: "transaction" with a base64 TransactionEnvelope XDR; push credentials
carry type: "hash" with a 64-character hex transaction hash. Pull covers
both unsponsored (client-signed, submitted as-is) and sponsored (feePayer)
flows. SEP-41 transfer events are checked via Soroban RPC simulateTransaction
(pull) and getTransaction (push).
Configure rpc_url (HTTPS Soroban RPC), network (stellar:pubnet or
stellar:testnet), and optionally fee_payer with fee_payer_secret. Replay
protection uses MPP.Tempo.Store and is on by default.
API Functions
| Function | Arity | Description | Param Kinds |
|---|---|---|---|
verify | 2 | Verify a Stellar SEP-41 charge credential in pull or push mode. | - |
challenge_method_details | 1 | Expose network, feePayer and credential types. | - |
validate_config! | 1 | Validate RPC, network and optional fee-payer configuration. | - |
credential_types | 0 | Return the draft's two charge credential types. | - |
method_name | 0 | Return the Stellar payment method identifier. | - |
Summary
Functions
Expose network, feePayer and credential types.
Return the draft's two charge credential types.
Return the Stellar payment method identifier.
Validate RPC, network and optional fee-payer configuration.
Verify a Stellar SEP-41 charge credential in pull or push mode.
Functions
@spec challenge_method_details(MPP.Method.intent()) :: map() | nil
@spec challenge_method_details(MPP.Intents.Charge.t()) :: map()
Expose network, feePayer and credential types.
# descripex:contract
%{}
Return the draft's two charge credential types.
# descripex:contract
%{}
@spec method_name() :: String.t()
Return the Stellar payment method identifier.
# descripex:contract
%{}
Validate RPC, network and optional fee-payer configuration.
# descripex:contract
%{}
@spec verify(map(), MPP.Intents.Charge.t()) :: {:ok, MPP.Receipt.t()} | {:error, MPP.Errors.t()}
Verify a Stellar SEP-41 charge credential in pull or push mode.
# descripex:contract
%{}