Versions in this module Expand all Collapse all v0 v0.1.0 Jan 28, 2021 Changes in this version + type OBGraph interface + AddOffer func(offer xdr.OfferEntry) + Apply func(ledger uint32) error + Clear func() + Discard func() + Offers func() []xdr.OfferEntry + OffersMap func() map[xdr.Int64]xdr.OfferEntry + Pending func() ([]xdr.OfferEntry, []xdr.Int64) + RemoveOffer func(xdr.Int64) OBGraph + type OrderBookGraph struct + func NewOrderBookGraph() *OrderBookGraph + func (graph *OrderBookGraph) AddOffer(offer xdr.OfferEntry) + func (graph *OrderBookGraph) Apply(ledger uint32) error + func (graph *OrderBookGraph) Clear() + func (graph *OrderBookGraph) Discard() + func (graph *OrderBookGraph) FindAsksAndBids(selling, buying xdr.Asset, maxPriceLevels int) ([]xdr.OfferEntry, []xdr.OfferEntry, uint32) + func (graph *OrderBookGraph) FindFixedPaths(maxPathLength int, sourceAsset xdr.Asset, amountToSpend xdr.Int64, ...) ([]Path, uint32, error) + func (graph *OrderBookGraph) FindPaths(maxPathLength int, destinationAsset xdr.Asset, destinationAmount xdr.Int64, ...) ([]Path, uint32, error) + func (graph *OrderBookGraph) IsEmpty() bool + func (graph *OrderBookGraph) Offers() []xdr.OfferEntry + func (graph *OrderBookGraph) OffersMap() map[xdr.Int64]xdr.OfferEntry + func (graph *OrderBookGraph) Pending() ([]xdr.OfferEntry, []xdr.Int64) + func (graph *OrderBookGraph) RemoveOffer(offerID xdr.Int64) OBGraph + type Path struct + DestinationAmount xdr.Int64 + DestinationAsset xdr.Asset + InteriorNodes []xdr.Asset + SourceAmount xdr.Int64 + SourceAsset xdr.Asset + func (p *Path) DestinationAssetString() string + func (p *Path) SourceAssetString() string