Expand description
Foundry policy for the canonical MPP Alloy HTTP transport.
Re-exportsΒ§
use alloy_chains::Chain;πuse alloy_json_rpc::RequestPacket;πuse alloy_json_rpc::ResponsePacket;πuse alloy_json_rpc::RpcError;πuse alloy_transport::TransportError;πuse alloy_transport::TransportFut;πuse alloy_transport_mpp::MppHttpTransport;πuse alloy_transport_mpp::MppWsConnect;πuse mpp::MppError;πuse mpp::PaymentErrorDetails;πuse mpp::client::PaymentContext;πuse mpp::client::PaymentProvider;πuse mpp::client::TempoAccountsProvider;πuse mpp::client::tempo::autoswap::AutoswapConfig;πuse mpp::client::tempo::autoswap::DEFAULT_SLIPPAGE_BPS;πuse mpp::client::tempo::session::store::SqliteChannelStore;πuse mpp::client::tempo::session::store::SqliteChannelStoreOptions;πuse mpp::protocol::core::PaymentChallenge;πuse mpp::protocol::core::PaymentCredential;πuse mpp::protocol::intents::ChargeRequest;πuse mpp::protocol::intents::SessionRequest;πuse std::collections::HashMap;πuse std::env;πuse std::env;πuse std::fmt;πuse std::io;πuse std::io::IsTerminal;πuse std::process::Command;πuse std::process::Stdio;πuse std::sync::Arc;πuse std::sync::Mutex;πuse std::sync::MutexGuard;πuse std::sync::PoisonError;πuse std::task;πuse tempo_alloy::accounts::TempoAccountsError;πuse tempo_alloy::accounts::TempoAccountsStore;πuse tower::Service;πuse url::Url;π
StructsΒ§
- Funding
Context π - Lazy
Accounts Provider - Lazily resolves a chain-bound MPP Charge provider from Tempo Accounts.
- Lazy
MppHttp Transport - The MPP transport used by Foundryβs runtime transport builder.
ConstantsΒ§
- DEFAULT_
MPP_ πSESSION_ DEPOSIT - Open a channel with 0.02 tokens when the server does not suggest a deposit.
- MAX_
CONCURRENT_ πMPP_ HTTP_ REQUESTS - Keep high-fanout fork database reads from overwhelming paid RPC endpoints.
- MAX_
MPP_ πSESSION_ DEPOSIT - Never let a paid RPC reserve more than one six-decimal token automatically.
FunctionsΒ§
- extract_
challenge_ πchain_ and_ currency - Extract
(chainId, currency)from a Tempo Charge or Session challenge. - has_
access_ πkey_ for_ challenge - insufficient_
balance_ πdetails - interactive_
fund_ πallowed - interactive_
login_ πallowed - lazy_
mpp_ πws_ connect - Build the canonical MPP WebSocket connector with Foundryβs lazy Accounts provider.
- lock_
map π - redacted_
url π - run_
interactive_ πtempo_ fund - with_
funding_ πhelp - with_
transport_ πfunding_ help