Expand description
Resource server, paymentFlow, and authorization SettlementMode scheduler.
Structs§
- Background
Settlement Tracker - Shared in-flight counter for background settlement tasks.
- Cancellation
Guard - Ensures
on_verified_payment_canceledruns at most once for a payment. - Completed
Settlement - Successful settle captured for a later phase (echo / cancel).
- Hook
Policy Error - Hook violated an enrichment mutation policy.
- Incompatible
Settlement Mode - Concurrent or Background used with a flow that settles before the handler.
- Payment
Flow Config - Supported payment flows for one
assetTransferMethod. - Payment
Flow Phases - Verify/settle phase flags for a
PaymentFlowName. - Payment
Flow Scheme - Scheme fields required to resolve ATM + payment flow.
- Payment
Hook Context - Shared context for resource-server payment hooks.
- Payment
Required Build Context - Inputs for
ResourceServer::create_payment_required_response. - Resolved
Payment Flow - Result of
resolve_payment_flow. - Resource
Server - Server-side payment orchestrator.
- Scheme
Payment Required Context - Context for scheme 402 enrichment.
- Settle
Context - Context for before-settle / settle-failure hooks.
- Settle
Response Core Snapshot - Facilitator-settled fields that extensions must not rewrite.
- Settle
Result Context - Context for after-settle hooks.
- Settlement
Schedule - Result of
schedule. - Skip
Handler Directive - In-process directive when an after-verify hook skips the resource handler.
- Verified
Payment Canceled Context - Context for verified-payment cancellation.
- Verify
Payment Outcome - Successful verify path outcome (after hooks).
- Verify
Result Context - Context for after-verify hooks (includes facilitator result).
Enums§
- After
Handler - After-handler action selected by
schedule. - After
Verify Decision - Decision from an after-verify hook.
- Before
OpDecision - Decision from a “before verify/settle” hook.
- Cancel
Reason - Why a verified payment was canceled before settlement.
- Facilitator
Support Error - Facilitator
/supportedkind is missing or its extra is unusable. - Payment
Flow Error - Failures from payment-flow resolution or wire-name parsing.
- Payment
Flow Name - Closed set of payment-flow names (when on-chain value moves relative to the handler).
- Scheduled
Settlement - Outcome of
run(Concurrent / Background). - Sequential
Finish - Outcome of
finish(Sequential). - Settle
Phase - Which settle invocation is running.
- Settlement
Mode - After-handler settle scheduler for
PaymentFlowName::Authorization.
Constants§
- PAYMENT_
FLOWS - Closed
PAYMENT_FLOWStable (authorization, upfront, escrow). - RESERVED_
PAYMENT_ FLOW_ EXTRA_ KEYS - Protocol-reserved
extrakeys. Enrichment must not add or change them. - SDK_
DEFAULT_ ASSET_ TRANSFER_ METHOD - SDK-only ATM key for schemes with no on-wire
assetTransferMethod.
Traits§
- DynResource
Server Hooks - Object-safe erasure of
ResourceServerHooks. - DynScheme
Network Server - Object-safe erasure of
SchemeNetworkServer. - Resource
Server Hooks - Lifecycle hooks for the resource server (transport-agnostic).
- Scheme
Network Server - Scheme/network adapter registered on
crate::ResourceServer.
Functions§
- apply_
payment_ flow_ wire_ extra - Applies resolved payment-flow rules to 402
extra: - assert_
accepts_ additive_ extra_ after_ scheme_ enrich - Scheme 402 enrich may only add
extrakeys on matching accepts. - assert_
accepts_ allowlisted_ after_ extension_ enrich - Extension 402 enrich: vacant
payTo/amount/assetmay be filled. - assert_
additive_ payload_ enrichment - Ensures scheme settlement-payload enrichment only adds new keys.
- assert_
additive_ settlement_ extra - Ensures scheme response enrichment only adds new
extrafields, including nested objects. - assert_
settle_ response_ core_ unchanged - Ensures
enrichSettlementResponsedid not rewrite facilitator outcome fields. - build_
failure_ path_ settlement_ response - Settlement receipt attached when the resource handler fails after verify.
- extra_
payment_ flow extra.paymentFlowwhenextrais a JSON object.- finish
- Sequential after-handler settle. Does not take a handler.
- is_
authorization_ payment_ flow - Whether the accept is authorization (omit, JSON null, or
"authorization"). - is_
recognized_ payment_ flow - Whether
extra.paymentFlowis absent/null or a closed payment-flow name. - is_
vacant_ string_ field - True when a string field is treated as unset and may be filled by enrichment.
- merge_
additive_ settlement_ extra - Merges server-owned settlement response fields after additive policy validation.
- resolve_
payment_ flow - Resolves
assetTransferMethodandpaymentFlowfrom a scheme table and requirements. - resolve_
payment_ flow_ phases - Resolves the phase table for a payment flow name.
- run
- Concurrent / Background after-handler settle. Does not inspect transport status.
- schedule
- Selects the after-handler settle action for one resolved flow × mode pair.
- snapshot_
payment_ requirements_ list - Deep snapshot of
acceptsentries before enrichment. - snapshot_
settle_ response_ core - Captures facilitator-settled fields for later comparison.
- validate_
accepts_ against_ supported - Checks each accept against facilitator
/supportedkinds.
Type Aliases§
- Wire
Payment Payload - Wire payment payload with typed requirements and opaque scheme body.