# Functions
HexToHash decodes a hex-encoded string into a hash.
IsHashZero returns true if the hash is all zeros, otherwise false.
NewOffer creates and returns an Offer with an initialised ID and Version fields.
NewOfferExtra creates an OfferExtra instance.
NewPair creates and returns a Pair.
NewStatus returns a Status from the given string.
UnmarshalOffer deserializes a JSON offer, checking the version for compatibility before attempting to deserialize the whole blob.
# Constants
CompletedAbort represents the case where the swap aborts before any funds are locked.
CompletedRefund represents a swap that was refunded.
CompletedSuccess represents a successful swap.
ContractReady is the taker's state after verifying the locked XMR and setting the contract to ready.
ETHLocked is the taker status after locking her ETH up until confirming that the maker locked his XMR.
ExpectingKeys is the status of the taker between taking an offer and receiving a response with swap keys from the maker.
KeysExchanged is the status of the maker after a taker accepts his offer.
SweepingXMR is the taker's state after claiming the XMR and sweeping it back into their primary wallet.
UnknownStatus is a placeholder for unmatched status strings and uninitialized variables.
XMRLocked is the maker's state after locking the XMR up until he confirms that the the taker has set the contract to ready.
# Variables
CurOfferVersion is the latest supported version of a serialised Offer struct.
EmptyHash is an empty Hash.
EthAssetETH describes regular ETH (rather than an ERC-20 token).
# Structs
Offer represents a swap offer.
OfferExtra represents extra data that is passed when an offer is made.
Pair represents a pair (Such as ETH / XMR).