pub struct ProxyConfig {
pub target_url: String,
pub amount: f64,
pub pay_to: String,
pub description: Option<String>,
pub mime_type: Option<String>,
pub max_timeout_seconds: u32,
pub facilitator_url: String,
pub testnet: bool,
pub headers: HashMap<String, String>,
pub cdp_api_key_id: Option<String>,
pub cdp_api_key_secret: Option<String>,
}Expand description
Configuration for the proxy server
Fields§
§target_url: StringTarget URL to proxy requests to
amount: f64Payment amount in decimal units (e.g., 0.01 for 1 cent)
pay_to: StringRecipient wallet address
description: Option<String>Payment description
mime_type: Option<String>MIME type of the expected response
max_timeout_seconds: u32Maximum timeout in seconds
facilitator_url: StringFacilitator URL
testnet: boolWhether to use testnet
headers: HashMap<String, String>Additional headers to forward to target
cdp_api_key_id: Option<String>CDP API credentials (optional)
cdp_api_key_secret: Option<String>Implementations§
Source§impl ProxyConfig
impl ProxyConfig
Sourcepub fn to_payment_config(&self) -> Result<PaymentMiddlewareConfig>
pub fn to_payment_config(&self) -> Result<PaymentMiddlewareConfig>
Convert to payment middleware config
Trait Implementations§
Source§impl Clone for ProxyConfig
impl Clone for ProxyConfig
Source§fn clone(&self) -> ProxyConfig
fn clone(&self) -> ProxyConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProxyConfig
impl Debug for ProxyConfig
Source§impl Default for ProxyConfig
impl Default for ProxyConfig
Source§impl<'de> Deserialize<'de> for ProxyConfig
impl<'de> Deserialize<'de> for ProxyConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProxyConfig
impl RefUnwindSafe for ProxyConfig
impl Send for ProxyConfig
impl Sync for ProxyConfig
impl Unpin for ProxyConfig
impl UnwindSafe for ProxyConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more