Skip to main content

Crate polyoxide_relay

Crate polyoxide_relay 

Source
Expand description

§polyoxide-relay

Gasless transaction relay client for Polymarket’s Safe and Proxy wallet infrastructure.

This crate enables submitting on-chain transactions through Polymarket’s relayer service, which pays gas fees on behalf of users. It supports two wallet types:

  • Safe wallets — Gnosis Safe multisig contracts (must be deployed before first use)
  • Proxy wallets — lightweight proxy contracts that auto-deploy on first transaction

§Authentication

Relay operations require a private key for EIP-712 transaction signing and optional builder API credentials (BUILDER_API_KEY, BUILDER_SECRET, BUILDER_PASS_PHRASE) for authenticated relay submission.

§Example

use polyoxide_relay::{RelayClient, BuilderAccount, BuilderConfig};

let config = BuilderConfig::new("key".into(), "secret".into(), None);
let account = BuilderAccount::new("0xprivatekey...", Some(config))?;
let client = RelayClient::from_account(account)?;

let latency = client.ping().await?;
println!("Relay API latency: {}ms", latency.as_millis());

Structs§

BuilderAccount
Account credentials for authenticated relay operations.
BuilderConfig
API credentials for authenticating relay requests.
ContractConfig
On-chain contract addresses and RPC configuration for a specific chain.
RelayClient
Client for submitting gasless transactions through Polymarket’s relayer service.
SafeTransaction
SafeTx
TransactionRequest
Serializable transaction submission payload sent to the relayer.

Enums§

RelayError
Error types for relay operations.
WalletType
Wallet type for the relayer API