Module domain

Source
Expand description

§Domain Module

Core domain logic for the relayer service, implementing:

  • Transaction processing
  • Relayer management
  • Network-specific implementations

Modules§

evm
jupiter_swap
JupiterSwapDex
jupiter_ultra
JupiterUltraDex
solana
stellar
xdr_utils
XDR utility functions for Stellar transaction processing.

Structs§

BalanceResponse
EvmRelayer
EvmRelayerTransaction
EvmTransactionValidator
NoopDex
RelayerFactory
RelayerTransactionFactory
A factory for creating relayer transactions.
SignDataRequest
SignDataResponseEvm
SignDataResponseSolana
SignTransactionExternalResponseStellar
SignTransactionRequestStellar
SignTransactionResponseEvm
SignTransactionResponseStellar
SignTypedDataRequest
SignXdrTransactionResponseStellar
SolanaRelayer
SolanaRelayerTransaction
SolanaRpcHandler
SolanaRpcMethodsImpl
SolanaTokenProgram
Implementation of the Solana token program functionality.
SolanaTransactionValidator
StellarRelayer
StellarRelayerDependencies
Dependencies container for StellarRelayer construction.
StellarRelayerTransaction
SwapParams
Parameters for a swap operation
SwapResult
Result of a swap operation
TokenAccount
Represents a Solana token account with its key properties.

Enums§

EvmTransactionValidationError
NetworkDex
NetworkRelayer
NetworkTransaction
An enum representing a transaction for different network types.
SignDataResponse
SignTransactionExternalResponse
SignTransactionRequest
SignTransactionResponse
SolanaRpcError
SolanaTransactionValidationError
TokenError
Error types that can occur during token operations.
TokenInstruction
Represents different types of token instructions.

Traits§

DexStrategy
Trait defining DEX swap functionality
Relayer
The Relayer trait 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.
RelayerFactoryTrait
RelayerTransactionFactoryTrait
A trait for creating network transactions.
SolanaRelayerDexTrait
Solana Relayer Dex Trait Subset of methods for Solana relayer
SolanaRelayerTrait
Solana Relayer Trait Subset of methods for Solana relayer
SolanaRpcMethods
Transaction
A trait that defines the operations for handling transactions across different networks.

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.
get_relayer_transaction
Creates a relayer network transaction instance based on the relayer ID.
get_relayer_transaction_by_model
Creates a relayer network transaction using a relayer model.
get_transaction_by_id
Retrieves a transaction by its ID.
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.
solana_not_supported_transaction
Returns an error indicating that Solana relayers are not supported.
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

Type Aliases§

DefaultEvmRelayer
DefaultEvmTransaction
DefaultJobProducer
DefaultJupiterService
DefaultNetworkDex
DefaultProvider
DefaultSigner
DefaultSolanaRelayer
DefaultSolanaRpcMethodsImpl
DefaultSolanaTransaction
DefaultStellarRelayer
DefaultStellarTransaction
DefaultTransactionRepository
SolanaRpcHandlerType