| Crates.io | rrelayer |
| lib.rs | rrelayer |
| version | 0.7.0 |
| created_at | 2025-09-29 23:16:56.840632+00 |
| updated_at | 2025-10-21 21:43:33.599182+00 |
| description | The official Rust SDK for interacting with rrelayer services - a powerful blockchain transaction relay service |
| homepage | https://rrelayer.xyz |
| repository | https://github.com/joshstevens19/rrelayer |
| max_upload_size | |
| id | 1860376 |
| size | 242,806 |
The official SDK for interacting with rrelayer services.
rrelayer is an opensource powerful, high-performance blockchain transaction relay service built in Rust, designed for seamless integration with any EVM-compatible network. This tool transforms complex blockchain interactions into simple REST API calls, eliminating the need for applications to manage wallets, transaction queuing, or nonce management. For rrelayer supports advanced wallet infrastructure supporting multiple signing providers including AWS KMS hardware security modules, Turnkey self-custody solutions, Fireblocks enterprise MPC custody, Privy managed wallets, AWS Secrets Manager, GCP Secret Manager, PKCS#11 hardware security modules, and raw mnemonic development setups. It's highly scalable and production-ready, enabling you to build robust Web3 applications with reliability and focus exclusively on your business logic. rrelayer has some super cool out-of-the-box features, like automatic top-ups (with safe support), permissions config including allowlists, API keys with restricted access, webhooks, rate limiting, and the ability to configure the gas bump blocks.
rrelayer has two ways to create clients based on the authentication direction, which is basic auth and API keys; we will explore both below.
Using the basic authentication which uses the username and password in your api config
use std::str::FromStr;
use rrelayer::{CreateClientAuth, CreateClientConfig, RelayerId, TransactionSpeed, create_client, AdminRelayerClient};
use dotenvy::dotenv;
use std::env;
// Client also exposes some admin methods in which API keys cannot do
let client = create_client(CreateClientConfig {
server_url: "http://localhost:8000".to_string(),
auth: CreateClientAuth {
username: env::var("RRELAYER_AUTH_USERNAME")
.expect("RRELAYER_AUTH_USERNAME must be set"),
password: env::var("RRELAYER_AUTH_PASSWORD")
.expect("RRELAYER_AUTH_PASSWORD must be set"),
},
});
let relayer: AdminRelayerClient = client.get_relayer_client(
&RelayerId::from_str("94afb207-bb47-4392-9229-ba87e4d783cb")?,
Some(TransactionSpeed::FAST),
).await?;
Using API keys that have restricted permissions to only use the relayer - docs here
use std::str::FromStr;
use rrelayer::{
CreateRelayerClientConfig, RelayerClient, RelayerId, TransactionSpeed,
create_relayer_client,
};
let relayer: RelayerClient = create_relayer_client(CreateRelayerClientConfig {
server_url: "http://localhost:8000".to_string(),
relayer_id: RelayerId::from_str("94afb207-bb47-4392-9229-ba87e4d783cb")?,
api_key: "YOUR_API_KEY".to_string(),
speed: Some(TransactionSpeed::FAST),
});
Full documentation can be found here