Expand description
§Relayer Domain Module
This module contains the core domain logic for the relayer service. It handles transaction submission, validation, and monitoring across different blockchain networks.
§Architecture
The relayer domain is organized into network-specific implementations that share common interfaces for transaction handling and monitoring.
Re-exports§
pub use crate::domain::transaction::solana::SolanaTransactionValidationError;pub use crate::domain::transaction::solana::SolanaTransactionValidator;
Modules§
- jupiter_
swap - JupiterSwapDex
- jupiter_
ultra - JupiterUltraDex
- xdr_
utils - XDR utility functions for Stellar transaction processing.
Structs§
- Balance
Response - EvmRelayer
- EvmTransaction
Validator - NoopDex
- Relayer
Factory - Sign
Data Request - Sign
Data Response Evm - Sign
Data Response Solana - Sign
Transaction External Response Stellar - Sign
Transaction Request Solana - Sign
Transaction Request Stellar - Sign
Transaction Response Evm - Sign
Transaction Response Solana - Sign
Transaction Response Stellar - Sign
Typed Data Request - Sign
XdrTransaction Response Stellar - Solana
Relayer - Solana
RpcHandler - Solana
RpcMethods Impl - Solana
Token Program - Implementation of the Solana token program functionality.
- Stellar
Relayer - Stellar
Relayer Dependencies - Dependencies container for
StellarRelayerconstruction. - Swap
Params - Parameters for a swap operation
- Swap
Result - Result of a swap operation
- Token
Account - Represents a Solana token account with its key properties.
Enums§
- EvmTransaction
Validation Error - Network
Dex - Network
Relayer - Sign
Data Response - Sign
Transaction External Response - Sign
Transaction Request - Sign
Transaction Response - Solana
RpcError - Token
Error - Error types that can occur during token operations.
- Token
Instruction - Represents different types of token instructions.
Traits§
- DexStrategy
- Trait defining DEX swap functionality
- Relayer
- The
Relayertrait defines the core functionality required for a relayer in the system. Implementors of this trait are responsible for handling transaction requests, managing balances, and interacting with the network. - Relayer
Factory Trait - Solana
Relayer DexTrait - Solana Relayer Dex Trait Subset of methods for Solana relayer
- Solana
RpcMethods
Functions§
- attach_
signatures_ to_ envelope - Attach signatures to a transaction envelope This function handles all envelope types (V0, V1, and FeeBump)
- build_
fee_ bump_ envelope - Build a fee-bump transaction envelope
- calculate_
transaction_ hash - Calculate the hash of a transaction envelope
- create_
error_ response - Creates an error response following the JSON-RPC 2.0 specification.
- create_
network_ dex_ generic - create_
solana_ relayer - Function to create a Solana relayer instance
- create_
success_ response - Creates a success response following the JSON-RPC 2.0 specification.
- extract_
inner_ transaction_ hash - Extract the inner transaction hash from a fee-bump envelope
- extract_
operations - Extract operations from a transaction envelope
- extract_
source_ account - Extract the source account from a transaction envelope
- get_
network_ relayer - Retrieves a network relayer by its ID, constructing it using the relayer and signer models.
- get_
network_ relayer_ by_ model - Constructs a network relayer using a given relayer model.
- get_
relayer_ by_ id - Retrieves a relayer by its ID from the repository.
- is_
fee_ bump - Check if a transaction envelope is a fee-bump transaction
- is_
signed - Check if a transaction envelope is signed
- map_
provider_ error - Maps provider errors to appropriate JSON-RPC error codes and messages.
- muxed_
account_ to_ string - Convert a MuxedAccount to a string representation
- parse_
transaction_ xdr - Parse a transaction XDR string into a TransactionEnvelope
- solana_
not_ supported_ relayer - Returns an error indicating that the endpoint is not supported for Solana relayers.
- string_
to_ muxed_ account - Convert a string address to a MuxedAccount
- update_
xdr_ fee - Update the fee in an XDR envelope
- update_
xdr_ sequence - Update the sequence number in an XDR envelope
- validate_
source_ account - Validate that the source account of a transaction matches the expected account
- xdr_
needs_ simulation - Check if a transaction envelope contains operations that require simulation