Versions in this module Expand all Collapse all v0 v0.4.0 Apr 25, 2019 Changes in this version + type AccountDao interface + AddFavoriteToken func(owner, token common.Address) error + Create func(account *types.Account) (err error) + DeleteFavoriteToken func(owner, token common.Address) error + Drop func() + FindOrCreate func(addr common.Address) (*types.Account, error) + GetAll func() (res []types.Account, err error) + GetByAddress func(owner common.Address) (response *types.Account, err error) + GetByID func(id bson.ObjectId) (*types.Account, error) + GetFavoriteTokens func(owner common.Address) (map[common.Address]bool, error) + GetTokenBalance func(owner common.Address, token common.Address) (*types.TokenBalance, error) + GetTokenBalances func(owner common.Address) (map[common.Address]*types.TokenBalance, error) + Transfer func(token common.Address, fromAddress common.Address, toAddress common.Address, ...) error + UpdateBalance func(owner common.Address, token common.Address, balance *big.Int) (err error) + UpdateTokenBalance func(owner common.Address, token common.Address, tokenBalance *types.TokenBalance) (err error) + type AccountService interface + AddFavoriteToken func(account, token common.Address) error + Create func(account *types.Account) error + DeleteFavoriteToken func(account, token common.Address) error + FindOrCreate func(a common.Address) (*types.Account, error) + GetAll func() ([]types.Account, error) + GetByAddress func(a common.Address) (*types.Account, error) + GetByID func(id bson.ObjectId) (*types.Account, error) + GetFavoriteTokens func(account common.Address) (map[common.Address]bool, error) + GetTokenBalance func(owner common.Address, token common.Address) (*types.TokenBalance, error) + GetTokenBalances func(owner common.Address) (map[common.Address]*types.TokenBalance, error) + Transfer func(token common.Address, fromAddress common.Address, toAddress common.Address, ...) error + type AssociationDao interface + GetAssociationByChainAddress func(chain types.Chain, address common.Address) (*types.AddressAssociationRecord, error) + GetAssociationByChainAssociatedAddress func(chain types.Chain, associatedAddress common.Address) (*types.AddressAssociationRecord, error) + SaveAssociation func(record *types.AddressAssociationRecord) error + SaveAssociationStatus func(chain types.Chain, sourceAccount common.Address, status string) error + SaveDepositTransaction func(chain types.Chain, sourceAccount common.Address, txEnvelope string) error + type ConfigDao interface + Drop func() + GetAddressIndex func(chain types.Chain) (uint64, error) + GetBlockToProcess func(chain types.Chain) (uint64, error) + GetSchemaVersion func() uint64 + IncrementAddressIndex func(chain types.Chain) error + ResetBlockCounters func() error + SaveLastProcessedBlock func(chain types.Chain, block uint64) error + type DepositService interface + EthereumClient func() EthereumClient + GenerateAddress func(chain types.Chain) (common.Address, uint64, error) + GetAssociationByChainAddress func(chain types.Chain, userAddress common.Address) (*types.AddressAssociationRecord, error) + GetAssociationByChainAssociatedAddress func(chain types.Chain, associatedAddress common.Address) (*types.AddressAssociationRecord, error) + GetSchemaVersion func() uint64 + MinimumValueSat func() int64 + MinimumValueWei func() *big.Int + QueueAdd func(queueTx *types.DepositTransaction) error + QueuePool func() (<-chan *types.DepositTransaction, error) + RecoveryTransaction func(chain types.Chain, address common.Address) error + SaveAssociationByChainAddress func(chain types.Chain, address common.Address, index uint64, ...) error + SaveAssociationStatusByChainAddress func(addressAssociation *types.AddressAssociationRecord, status string) error + SaveDepositTransaction func(chain types.Chain, sourceAccount common.Address, txEnvelope string) error + SetDelegate func(handler SwapEngineHandler) + SignerPublicKey func() common.Address + type Engine interface + HandleOrders func(msg *rabbitmq.Message) error + Provider func() EthereumProvider + type EthereumClient interface + BalanceAt func(ctx context.Context, contract common.Address, blockNumber *big.Int) (*big.Int, error) + CallContract func(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) + CodeAt func(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error) + EstimateGas func(ctx context.Context, call ethereum.CallMsg) (gas uint64, err error) + FilterLogs func(ctx context.Context, query ethereum.FilterQuery) ([]eth.Log, error) + PendingCallContract func(ctx context.Context, call ethereum.CallMsg) ([]byte, error) + PendingCodeAt func(ctx context.Context, account common.Address) ([]byte, error) + PendingNonceAt func(ctx context.Context, account common.Address) (uint64, error) + SendTransaction func(ctx context.Context, tx *eth.Transaction) error + SubscribeFilterLogs func(ctx context.Context, query ethereum.FilterQuery, ch chan<- eth.Log) (ethereum.Subscription, error) + SuggestGasPrice func(ctx context.Context) (*big.Int, error) + TransactionReceipt func(ctx context.Context, txHash common.Hash) (*eth.Receipt, error) + type EthereumConfig interface + ExchangeAddress func() common.Address + GetURL func() string + type EthereumProvider interface + BalanceOf func(owner common.Address, token common.Address) (*big.Int, error) + Decimals func(token common.Address) (uint8, error) + GetBalanceAt func(a common.Address) (*big.Int, error) + GetPendingNonceAt func(a common.Address) (uint64, error) + Symbol func(token common.Address) (string, error) + WaitMined func(h common.Hash) (*eth.Receipt, error) + type EthereumService interface + GetBalanceAt func(a common.Address) (*big.Int, error) + GetPendingNonceAt func(a common.Address) (uint64, error) + WaitMined func(hash common.Hash) (*eth.Receipt, error) + type Exchange interface + CallBatchTrades func(m *types.Matches, txOpts *ethereum.CallMsg) (uint64, error) + CallTrade func(m *types.Matches, call *ethereum.CallMsg) (uint64, error) + ExecuteBatchTrades func(m *types.Matches, txOpts *bind.TransactOpts) (*eth.Transaction, error) + FeeAccount func() (common.Address, error) + GetAddress func() common.Address + GetErrorEvents func(logs chan *contractsinterfaces.ExchangeLogError) error + GetTrades func(logs chan *contractsinterfaces.ExchangeLogTrade) error + GetTxCallOptions func() *bind.CallOpts + ListenToBatchTrades func() (chan *contractsinterfaces.ExchangeLogBatchTrades, error) + ListenToErrors func() (chan *contractsinterfaces.ExchangeLogError, error) + ListenToTrades func() (chan *contractsinterfaces.ExchangeLogTrade, error) + Operator func(a common.Address) (bool, error) + PrintErrors func() error + PrintTrades func() error + SetFeeAccount func(a common.Address, txOpts *bind.TransactOpts) (*eth.Transaction, error) + SetOperator func(a common.Address, isOperator bool, txOpts *bind.TransactOpts) (*eth.Transaction, error) + Trade func(m *types.Matches, txOpts *bind.TransactOpts) (*eth.Transaction, error) + type MarketsService interface + Subscribe func(c *ws.Client) + Unsubscribe func(c *ws.Client) + UnsubscribeChannel func(c *ws.Client) + type OHLCVService interface + GetOHLCV func(p []types.PairAddresses, duration int64, unit string, timeInterval ...int64) ([]*types.Tick, error) + Subscribe func(c *ws.Client, p *types.SubscriptionPayload) + Unsubscribe func(c *ws.Client) + UnsubscribeChannel func(c *ws.Client, p *types.SubscriptionPayload) + type OrderBookService interface + GetOrderBook func(bt, qt common.Address) (*types.OrderBook, error) + GetRawOrderBook func(bt, qt common.Address) (*types.RawOrderBook, error) + SubscribeOrderBook func(c *ws.Client, bt, qt common.Address) + SubscribeRawOrderBook func(c *ws.Client, bt, qt common.Address) + UnsubscribeOrderBook func(c *ws.Client) + UnsubscribeOrderBookChannel func(c *ws.Client, bt, qt common.Address) + UnsubscribeRawOrderBook func(c *ws.Client) + UnsubscribeRawOrderBookChannel func(c *ws.Client, bt, qt common.Address) + type OrderDao interface + Aggregate func(q []bson.M) ([]*types.OrderData, error) + Create func(o *types.Order) error + Delete func(orders ...*types.Order) error + DeleteByHashes func(hashes ...common.Hash) error + Drop func() error + FindAndModify func(h common.Hash, o *types.Order) (*types.Order, error) + GetByHash func(h common.Hash) (*types.Order, error) + GetByHashes func(hashes []common.Hash) ([]*types.Order, error) + GetByID func(id bson.ObjectId) (*types.Order, error) + GetByUserAddress func(addr common.Address, limit ...int) ([]*types.Order, error) + GetCurrentByUserAddress func(a common.Address, limit ...int) ([]*types.Order, error) + GetHistoryByUserAddress func(a common.Address, limit ...int) ([]*types.Order, error) + GetMatchingBuyOrders func(o *types.Order) ([]*types.Order, error) + GetMatchingSellOrders func(o *types.Order) ([]*types.Order, error) + GetOrderBook func(*types.Pair) ([]map[string]string, []map[string]string, error) + GetOrderBookPricePoint func(p *types.Pair, pp *big.Int, side string) (*big.Int, error) + GetRawOrderBook func(*types.Pair) ([]*types.Order, error) + GetSideOrderBook func(p *types.Pair, side string, sort int, limit ...int) ([]map[string]string, error) + GetUserLockedBalance func(account common.Address, token common.Address, p *types.Pair) (*big.Int, error) + Update func(id bson.ObjectId, o *types.Order) error + UpdateAllByHash func(h common.Hash, o *types.Order) error + UpdateByHash func(h common.Hash, o *types.Order) error + UpdateOrderFilledAmount func(h common.Hash, value *big.Int) error + UpdateOrderFilledAmounts func(h []common.Hash, values []*big.Int) ([]*types.Order, error) + UpdateOrderStatus func(h common.Hash, status string) error + UpdateOrderStatusesByHashes func(status string, hashes ...common.Hash) ([]*types.Order, error) + Upsert func(id bson.ObjectId, o *types.Order) error + UpsertByHash func(h common.Hash, o *types.Order) error + type OrderService interface + CancelOrder func(oc *types.OrderCancel) error + GetByHash func(h common.Hash) (*types.Order, error) + GetByHashes func(hashes []common.Hash) ([]*types.Order, error) + GetByID func(id bson.ObjectId) (*types.Order, error) + GetByUserAddress func(a common.Address, limit ...int) ([]*types.Order, error) + GetCurrentByUserAddress func(a common.Address, limit ...int) ([]*types.Order, error) + GetHistoryByUserAddress func(a common.Address, limit ...int) ([]*types.Order, error) + HandleEngineResponse func(res *types.EngineResponse) error + NewOrder func(o *types.Order) error + type PairDao interface + Create func(o *types.Pair) error + GetActivePairs func() ([]*types.Pair, error) + GetAll func() ([]types.Pair, error) + GetByID func(id bson.ObjectId) (*types.Pair, error) + GetByName func(name string) (*types.Pair, error) + GetByTokenAddress func(baseToken, quoteToken common.Address) (*types.Pair, error) + GetByTokenSymbols func(baseTokenSymbol, quoteTokenSymbol string) (*types.Pair, error) + GetListedPairs func() ([]types.Pair, error) + GetUnlistedPairs func() ([]types.Pair, error) + type PairService interface + Create func(pair *types.Pair) error + CreatePairs func(token common.Address) ([]*types.Pair, error) + GetAll func() ([]types.Pair, error) + GetAllTokenPairData func() ([]*types.PairData, error) + GetByID func(id bson.ObjectId) (*types.Pair, error) + GetByTokenAddress func(bt, qt common.Address) (*types.Pair, error) + GetListedPairs func() ([]types.Pair, error) + GetTokenPairData func(bt, qt common.Address) ([]*types.Tick, error) + GetUnlistedPairs func() ([]types.Pair, error) + type PriceBoardDao interface + GetLatestQuotes func() (map[string]float64, error) + type PriceBoardService interface + Subscribe func(c *ws.Client, bt, qt common.Address) + Unsubscribe func(c *ws.Client) + UnsubscribeChannel func(c *ws.Client, bt, qt common.Address) + type SwapEngineHandler interface + LoadAccountHandler func(chain types.Chain, publicKey string) (*types.AddressAssociation, error) + OnExchanged func(chain types.Chain, destination string) + OnExchangedTimelocked func(chain types.Chain, destination string, ...) + OnNewBitcoinTransaction func(transaction swapBitcoin.Transaction) error + OnNewEthereumTransaction func(transaction swapEthereum.Transaction) error + OnSubmitTransaction func(chain types.Chain, destination string, ...) error + OnTomochainAccountCreated func(chain types.Chain, destination string) + type TokenDao interface + Create func(token *types.Token) error + Drop func() error + GetAll func() ([]types.Token, error) + GetBaseTokens func() ([]types.Token, error) + GetByAddress func(addr common.Address) (*types.Token, error) + GetByID func(id bson.ObjectId) (*types.Token, error) + GetQuoteTokens func() ([]types.Token, error) + UpdateFiatPriceBySymbol func(symbol string, price float64) error + type TokenService interface + Create func(token *types.Token) error + GetAll func() ([]types.Token, error) + GetBaseTokens func() ([]types.Token, error) + GetByAddress func(a common.Address) (*types.Token, error) + GetByID func(id bson.ObjectId) (*types.Token, error) + GetQuoteTokens func() ([]types.Token, error) + type TradeDao interface + Aggregate func(q []bson.M) ([]*types.Tick, error) + Create func(o ...*types.Trade) error + Drop func() + FindAndModify func(h common.Hash, t *types.Trade) (*types.Trade, error) + GetAll func() ([]types.Trade, error) + GetAllTradesByPairAddress func(bt, qt common.Address) ([]*types.Trade, error) + GetByHash func(h common.Hash) (*types.Trade, error) + GetByMakerOrderHash func(h common.Hash) ([]*types.Trade, error) + GetByOrderHashes func(hashes []common.Hash) ([]*types.Trade, error) + GetByPairName func(name string) ([]*types.Trade, error) + GetByTakerOrderHash func(h common.Hash) ([]*types.Trade, error) + GetByUserAddress func(a common.Address) ([]*types.Trade, error) + GetLatestTrade func(bt, qt common.Address) (*types.Trade, error) + GetNTradesByPairAddress func(bt, qt common.Address, n int) ([]*types.Trade, error) + GetSortedTrades func(bt, qt common.Address, n int) ([]*types.Trade, error) + GetSortedTradesByUserAddress func(a common.Address, limit ...int) ([]*types.Trade, error) + GetTradesByPairAddress func(bt, qt common.Address, n int) ([]*types.Trade, error) + Update func(t *types.Trade) error + UpdateByHash func(h common.Hash, t *types.Trade) error + UpdateTradeStatus func(h common.Hash, status string) error + UpdateTradeStatuses func(status string, hashes ...common.Hash) ([]*types.Trade, error) + UpdateTradeStatusesByOrderHashes func(status string, hashes ...common.Hash) ([]*types.Trade, error) + type TradeService interface + GetAllTradesByPairAddress func(bt, qt common.Address) ([]*types.Trade, error) + GetByHash func(h common.Hash) (*types.Trade, error) + GetByMakerOrderHash func(h common.Hash) ([]*types.Trade, error) + GetByOrderHashes func(h []common.Hash) ([]*types.Trade, error) + GetByPairName func(p string) ([]*types.Trade, error) + GetByTakerOrderHash func(h common.Hash) ([]*types.Trade, error) + GetByUserAddress func(a common.Address) ([]*types.Trade, error) + GetSortedTrades func(bt, qt common.Address, n int) ([]*types.Trade, error) + GetSortedTradesByUserAddress func(a common.Address, limit ...int) ([]*types.Trade, error) + Subscribe func(c *ws.Client, bt, qt common.Address) + Unsubscribe func(c *ws.Client) + UnsubscribeChannel func(c *ws.Client, bt, qt common.Address) + UpdatePendingTrade func(t *types.Trade, txh common.Hash) (*types.Trade, error) + UpdateSuccessfulTrade func(t *types.Trade) (*types.Trade, error) + UpdateTradeTxHash func(tr *types.Trade, txh common.Hash) error + type TxService interface + GetCustomTxSendOptions func(w *types.Wallet) *bind.TransactOpts + GetTxCallOptions func() *bind.CallOpts + GetTxDefaultSendOptions func() (*bind.TransactOpts, error) + GetTxSendOptions func() (*bind.TransactOpts, error) + SetTxSender func(w *types.Wallet) + type ValidatorService interface + ValidateAvailableBalance func(o *types.Order) error + ValidateBalance func(o *types.Order) error + type WalletDao interface + Create func(wallet *types.Wallet) error + GetAll func() ([]types.Wallet, error) + GetByAddress func(addr common.Address) (*types.Wallet, error) + GetByID func(id bson.ObjectId) (*types.Wallet, error) + GetDefaultAdminWallet func() (*types.Wallet, error) + GetOperatorWallets func() ([]*types.Wallet, error) + type WalletService interface + CreateAdminWallet func(a common.Address) (*types.Wallet, error) + GetAll func() ([]types.Wallet, error) + GetByAddress func(addr common.Address) (*types.Wallet, error) + GetDefaultAdminWallet func() (*types.Wallet, error) + GetOperatorAddresses func() ([]common.Address, error) + GetOperatorWallets func() ([]*types.Wallet, error)