Documentation ¶
Index ¶
- Constants
- Variables
- type AtomicSwapNode
- func (n *AtomicSwapNode) CloseOrder(orderID string) error
- func (n *AtomicSwapNode) MsgChan() chan interface{}
- func (n *AtomicSwapNode) OrderBook() *ob.OrderBook
- func (n *AtomicSwapNode) PublishLimitOrder(quantity, price uint64, buyBTC bool) error
- func (n *AtomicSwapNode) SetWireService(ws *service.WireService)
- func (n *AtomicSwapNode) StartOnlineServices()
Constants ¶
View Source
const ( ReSubscribeInterval = time.Hour ReconnectInterval = time.Minute MinConnectedSubscribers = 2 )
Variables ¶
View Source
var (
Topic *cid.Cid
)
Functions ¶
This section is empty.
Types ¶
type AtomicSwapNode ¶
type AtomicSwapNode struct {
// contains filtered or unexported fields
}
This struct contains the relevant components of our node that we'll need to run our atomic swap protocol.
func NewAtomicSwapNode ¶
func NewAtomicSwapNode(repo *r.Repo, peerHost host.Host, routing *dht.IpfsDHT, floodsub *fs.PubSub) *AtomicSwapNode
func (*AtomicSwapNode) CloseOrder ¶
func (n *AtomicSwapNode) CloseOrder(orderID string) error
func (*AtomicSwapNode) MsgChan ¶
func (n *AtomicSwapNode) MsgChan() chan interface{}
func (*AtomicSwapNode) OrderBook ¶
func (n *AtomicSwapNode) OrderBook() *ob.OrderBook
func (*AtomicSwapNode) PublishLimitOrder ¶
func (n *AtomicSwapNode) PublishLimitOrder(quantity, price uint64, buyBTC bool) error
func (*AtomicSwapNode) SetWireService ¶
func (n *AtomicSwapNode) SetWireService(ws *service.WireService)
func (*AtomicSwapNode) StartOnlineServices ¶
func (n *AtomicSwapNode) StartOnlineServices()
Here we are going to set self as a subscriber in the dht and query the dht for other subscribers and open connections to a few of them.
Click to show internal directories.
Click to hide internal directories.