Documentation ¶
Index ¶
- type Binder
- func (binder *Binder) AuditAtomicSwap(swapID [32]byte) ([32]byte, []byte, *big.Int, int64, error)
- func (binder *Binder) AuditSecretAtomicSwap(swapID [32]byte) ([32]byte, error)
- func (binder *Binder) AuthorizeAtomBox() error
- func (binder *Binder) CheckForMatch(orderID order.ID, wait bool) (match.Match, error)
- func (binder *Binder) InfoTimeStamp(orderID order.ID) (int64, error)
- func (binder *Binder) InitiateAtomicSwap(swapID swap.ID, to []byte, hash [32]byte, value *big.Int, expiry int64) error
- func (binder *Binder) InitiateTimeStamp(orderID order.ID) (int64, error)
- func (binder *Binder) OrderTraderAddress(orderID [32]byte) ([]byte, error)
- func (binder *Binder) ReceiveOwnerAddress(orderID order.ID, waitTill int64) ([]byte, error)
- func (binder *Binder) ReceiveSwapDetails(orderID order.ID, waitTill int64) ([]byte, error)
- func (binder *Binder) RedeemAtomicSwap(swapID [32]byte, secret [32]byte) error
- func (binder *Binder) RedeemTimeStamp(orderID swap.ID) (int64, error)
- func (binder *Binder) RefundAtomicSwap(swapID [32]byte) error
- func (binder *Binder) SendOwnerAddress(orderID order.ID, address []byte) error
- func (binder *Binder) SendSwapDetails(orderID order.ID, swapDetails []byte) error
- func (binder *Binder) SlashBond(guiltyOrderID order.ID) error
- func (binder *Binder) SubmitBuyOrder(orderID [32]byte) error
- func (binder *Binder) SubmitSellOrder(orderID [32]byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Binder ¶
type Binder struct { *bindings.AtomicInfo *bindings.Orderbook *bindings.RenExSettlement *bindings.AtomicSwap // contains filtered or unexported fields }
Binder implements all methods that will communicate with the smart contracts
func (*Binder) AuditAtomicSwap ¶
AuditAtomicSwap Audits an Atomic swap
func (*Binder) AuditSecretAtomicSwap ¶
AuditSecretAtomicSwap audits the secret of an Atom swap
func (*Binder) AuthorizeAtomBox ¶
AuthorizeAtomBox authorizes the atom box to submit the swap details
func (*Binder) CheckForMatch ¶
CheckForMatch checks if a match is found and returns the match object. If a match is not found and the 'wait' flag is set to true, it loops until a match is found.
func (*Binder) InfoTimeStamp ¶
InfoTimeStamp returns the time at which the address for the atomic swap is submitted.
func (*Binder) InitiateAtomicSwap ¶
func (binder *Binder) InitiateAtomicSwap(swapID swap.ID, to []byte, hash [32]byte, value *big.Int, expiry int64) error
InitiateAtomicSwap initiates a new Ethereum Atomic swap
func (*Binder) InitiateTimeStamp ¶
InitiateTimeStamp returns the time at which the atomic swap is initiated.
func (*Binder) OrderTraderAddress ¶
OrderTraderAddress returns the order's submitting trader's ethereum address.
func (*Binder) ReceiveOwnerAddress ¶
ReceiveOwnerAddress receives the owner address for atomic swap
func (*Binder) ReceiveSwapDetails ¶
ReceiveSwapDetails receives the swap details from the ethereum blockchain
func (*Binder) RedeemAtomicSwap ¶
RedeemAtomicSwap initiates a new Ethereum Atomic swap
func (*Binder) RedeemTimeStamp ¶
RedeemTimeStamp returns the time at which the atomic swap is redeemed.
func (*Binder) RefundAtomicSwap ¶
RefundAtomicSwap refunds an Ethereum Atomic swap
func (*Binder) SendOwnerAddress ¶
SendOwnerAddress set's the owner address for atomic swap
func (*Binder) SendSwapDetails ¶
SendSwapDetails stores the swap details on the ethereum blockchain
func (*Binder) SlashBond ¶
SlashBond receives the guilty trader's atomic swap order id and slashes their bond
func (*Binder) SubmitBuyOrder ¶
SubmitBuyOrder submits a new buy order
func (*Binder) SubmitSellOrder ¶
SubmitSellOrder submits a new sell order