pub struct RelayClient { /* private fields */ }Expand description
Relay client for TotalReclaw managed service.
Implementations§
Source§impl RelayClient
impl RelayClient
Sourcepub fn new(config: RelayConfig) -> Self
pub fn new(config: RelayConfig) -> Self
Create a new relay client.
Sourcepub async fn register(
&self,
auth_key_hash: &str,
salt_hex: &str,
) -> Result<String>
pub async fn register( &self, auth_key_hash: &str, salt_hex: &str, ) -> Result<String>
Register with the relay server. Idempotent.
Sourcepub async fn resolve_address(&self, auth_key_hex: &str) -> Result<String>
pub async fn resolve_address(&self, auth_key_hex: &str) -> Result<String>
Resolve Smart Account address from the relay.
Sourcepub async fn graphql<T: for<'de> Deserialize<'de>>(
&self,
query: &str,
variables: Value,
) -> Result<T>
pub async fn graphql<T: for<'de> Deserialize<'de>>( &self, query: &str, variables: Value, ) -> Result<T>
Execute a GraphQL query against the subgraph via relay proxy.
Sourcepub async fn submit_fact_native(
&self,
protobuf_payload: &[u8],
private_key: &[u8; 32],
) -> Result<SubmitResult>
pub async fn submit_fact_native( &self, protobuf_payload: &[u8], private_key: &[u8; 32], ) -> Result<SubmitResult>
Submit a single protobuf payload as a native UserOp.
Sourcepub async fn submit_fact_batch_native(
&self,
protobuf_payloads: &[Vec<u8>],
private_key: &[u8; 32],
) -> Result<SubmitResult>
pub async fn submit_fact_batch_native( &self, protobuf_payloads: &[Vec<u8>], private_key: &[u8; 32], ) -> Result<SubmitResult>
Submit multiple protobuf payloads as a single batched UserOp.
Sourcepub async fn submit_protobuf(&self, payload: &[u8]) -> Result<SubmitResult>
pub async fn submit_protobuf(&self, payload: &[u8]) -> Result<SubmitResult>
Submit a protobuf payload via the bundler proxy (legacy, non-native).
Sourcepub async fn health_check(&self) -> Result<bool>
pub async fn health_check(&self) -> Result<bool>
Health check against the relay.
Sourcepub async fn billing_status(&self) -> Result<BillingStatus>
pub async fn billing_status(&self) -> Result<BillingStatus>
Get billing status.
Sourcepub async fn create_checkout(&self) -> Result<String>
pub async fn create_checkout(&self) -> Result<String>
Create a Stripe checkout session for upgrading to Pro.
Sourcepub fn wallet_address(&self) -> &str
pub fn wallet_address(&self) -> &str
Get the wallet address.
Sourcepub fn auth_key_hex(&self) -> &str
pub fn auth_key_hex(&self) -> &str
Get the auth key hex.
Sourcepub fn set_chain_id(&mut self, chain_id: u64)
pub fn set_chain_id(&mut self, chain_id: u64)
Set the chain ID (used for Pro tier auto-detection).
Trait Implementations§
Source§impl Clone for RelayClient
impl Clone for RelayClient
Source§fn clone(&self) -> RelayClient
fn clone(&self) -> RelayClient
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 moreAuto Trait Implementations§
impl Freeze for RelayClient
impl !RefUnwindSafe for RelayClient
impl Send for RelayClient
impl Sync for RelayClient
impl Unpin for RelayClient
impl UnsafeUnpin for RelayClient
impl !UnwindSafe for RelayClient
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