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§
- Builder
Account - Account credentials for authenticated relay operations.
- Builder
Config - API credentials for authenticating relay requests.
- Contract
Config - On-chain contract addresses and RPC configuration for a specific chain.
- Relay
Client - Client for submitting gasless transactions through Polymarket’s relayer service.
- Safe
Transaction - SafeTx
- Transaction
Request - Serializable transaction submission payload sent to the relayer.
Enums§
- Relay
Error - Error types for relay operations.
- Wallet
Type - Wallet type for the relayer API