Module: X402
- Defined in:
- lib/x402/bsv/proof_gateway.rb,
lib/x402.rb,
lib/x402/errors.rb,
lib/x402/wallet.rb,
lib/x402/railtie.rb,
lib/x402/version.rb,
lib/x402/middleware.rb,
lib/x402/bsv/gateway.rb,
lib/x402/configuration.rb,
lib/x402/remote_wallet.rb,
lib/x402/bsv/txid_store.rb,
lib/x402/protocol/proof.rb,
lib/x402/bsv/pay_gateway.rb,
lib/x402/status_endpoint.rb,
lib/x402/bsv/prefix_store.rb,
lib/x402/payment_observer.rb,
lib/x402/settlement_result.rb,
lib/x402/settlement_worker.rb,
lib/x402/bsv/brc105_gateway.rb,
lib/x402/bsv/brc121_gateway.rb,
lib/x402/protocol/base64url.rb,
lib/x402/protocol/challenge.rb,
lib/x402/tasks/wallet_setup.rb,
lib/x402/bsv/challenge_store.rb,
lib/x402/protocol/request_binding.rb,
lib/x402/verification/protocol_checks.rb
Overview
NO PAY -> NO CONTENT: this gateway serves content if and only if the
vendor has successfully broadcast the payment transaction to ARC. The
invariant is enforced by +#broadcast!+ (below), which is called
between output verification and +internalize_action+ so wallet state
is never mutated for a transaction ARC refused. ARC's idempotency
guarantees duplicate broadcasts of an already-seen tx are safe —
clients may also broadcast (e.g. self-funded flows) without breaking
settlement. See README "What x402-rack guarantees".
Defined Under Namespace
Modules: BSV, Base64Url, RequestBinding, Tasks, Verification, Wallet
Classes: Challenge, Configuration, ConfigurationError, Error, Middleware, PaymentObserver, Proof, Railtie, RemoteWallet, SettlementResult, SettlementWorker, StatusEndpoint, VerificationError
Constant Summary
collapse
- VERSION =
"0.11.0"
Class Method Summary
collapse
Class Method Details
.configuration ⇒ Object
20
21
22
|
# File 'lib/x402.rb', line 20
def configuration
@configuration ||= Configuration.new
end
|
15
16
17
18
|
# File 'lib/x402.rb', line 15
def configure
yield(configuration)
configuration.validate!
end
|
.reset_configuration! ⇒ Object
24
25
26
|
# File 'lib/x402.rb', line 24
def reset_configuration!
@configuration = Configuration.new
end
|