Documentation ¶
Index ¶
- func NewEthereumAtom(adapter Adapter, client ethclient.Conn, key keystore.Key, orderID [32]byte) (swap.Atom, error)
- type Adapter
- type EthereumAtom
- func (atom *EthereumAtom) Audit() ([32]byte, []byte, *big.Int, int64, error)
- func (atom *EthereumAtom) AuditSecret() ([32]byte, error)
- func (atom *EthereumAtom) Deserialize(data []byte) error
- func (atom *EthereumAtom) GetFromAddress() ([]byte, error)
- func (atom *EthereumAtom) Initiate(to []byte, hash [32]byte, value *big.Int, expiry int64) error
- func (atom *EthereumAtom) PriorityCode() uint32
- func (atom *EthereumAtom) Redeem(secret [32]byte) error
- func (atom *EthereumAtom) RedeemedAt() (int64, error)
- func (atom *EthereumAtom) Refund() error
- func (atom *EthereumAtom) Serialize() ([]byte, error)
- func (atom *EthereumAtom) WaitForCounterRedemption() error
- type EthereumData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EthereumAtom ¶
type EthereumAtom struct {
// contains filtered or unexported fields
}
func (*EthereumAtom) AuditSecret ¶
func (atom *EthereumAtom) AuditSecret() ([32]byte, error)
AuditSecret audits the secret of an Atom swap by calling a function on ethereum
func (*EthereumAtom) Deserialize ¶
func (atom *EthereumAtom) Deserialize(data []byte) error
Deserialize deserializes the atom details
func (*EthereumAtom) GetFromAddress ¶
func (atom *EthereumAtom) GetFromAddress() ([]byte, error)
GetFromAddress returns the address of the sender
func (*EthereumAtom) PriorityCode ¶
func (atom *EthereumAtom) PriorityCode() uint32
PriorityCode returns the priority code of the currency.
func (*EthereumAtom) Redeem ¶
func (atom *EthereumAtom) Redeem(secret [32]byte) error
Redeem an Atom swap by calling a function on ethereum
func (*EthereumAtom) RedeemedAt ¶
func (atom *EthereumAtom) RedeemedAt() (int64, error)
RedeemedAt returns the timestamp at which the atom is redeemed
func (*EthereumAtom) Refund ¶
func (atom *EthereumAtom) Refund() error
Refund an Atom swap by calling a function on ethereum
func (*EthereumAtom) Serialize ¶
func (atom *EthereumAtom) Serialize() ([]byte, error)
Serialize serializes the atom details
func (*EthereumAtom) WaitForCounterRedemption ¶
func (atom *EthereumAtom) WaitForCounterRedemption() error
WaitForCounterRedemption waits for the counter-party to initiate.
type EthereumData ¶
EthereumData
Click to show internal directories.
Click to hide internal directories.