# Functions
BootnodeConfig is environment for bootnodes, which act across multiple environments.
ChainNameFromEnv returns the expected chainID that we should find on the ethereum endpoint when running int the passed environment.
ConfigDefaultsForEnv returns the configuration defaults for the given environment.
DefaultMoneroPortFromEnv returns the default Monerod RPC port for an environment Reference: https://monerodocs.org/interacting/monerod-reference/.
DevelopmentConfig is the monero and ethereum development environment configuration.
EthereumPrivateKeyToAddress returns the address associated with a private key.
FileExists returns whether the given file exists.
GetFreeTCPPort returns an OS allocated and immediately freed port.
GetTopic returns the Ethereum topic (ie.
MainnetConfig is the mainnet ethereum and monero configuration.
MakeDir creates a directory, including leading directories, if they don't already exist.
NewEnv converts an environment string into the Environment type.
ReceiptInfo creates a string for logging from an ethereum transaction receipt.
Reverse returns a copy of the slice with the bytes in reverse order.
SleepWithContext is the same as time.Sleep(...) but with preemption if the context is complete.
StagenetConfig is the monero stagenet and ethereum Sepolia configuration.
SwapTimeoutFromEnv returns the duration between swap timeouts given the environment.
# Constants
Bootnode should only be used by bootnodes, which provide a chain independent service.
DefaultEthKeyFileName is the default ethereum private key file name in {DATA_DIR}.
Daemon default ports and URLs.
Daemon default ports and URLs.
DefaultLibp2pKeyFileName is the default libp2p private key file name in {DATA_DIR}.
Daemon default ports and URLs.
Daemon default ports and URLs.
Daemon default ports and URLs.
DefaultMoneroWalletName is the default wallet name in {DATA_DIR}/wallet/.
index 1.
index 0.
Daemon default ports and URLs.
Development is for testing with a local monerod in regtest mode and Ganache simulating ethereum.
Ethereum chain IDs.
Ethereum chain IDs.
Mainnet is for real use with mainnet monero and ethereum endpoints.
Ethereum chain IDs.
Optimism.
Ethereum chain IDs.
Stagenet is for testing with stagenet monero and gorerli ethereum endpoints.
Strings for formatting time.Time types.
Strings for formatting time.Time types.
Undefined is a placeholder, do not pass it to functions.
# Structs
Config contains constants that are defaults for various environments.
MoneroNode represents the host and port of monerod's RPC endpoint.
# Interfaces
Message is implemented by all network messages.
SwapState is the interface used by other packages in *xmrtaker.swapState or *xmrmaker.swapState.
SwapStateNet handles incoming protocol messages for an initiated protocol.
SwapStateRPC contains the methods used by the RPC server into the SwapState.
# Type aliases
Environment represents the environment the swap will run in (ie.