services

package
v0.0.0-...-e0155c2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdrestiaRequests

type AdrestiaRequests struct {
	AdrestiaUrl string
}

func (*AdrestiaRequests) DepositInfo

func (a *AdrestiaRequests) DepositInfo(depositParams models.DepositParams) (depositInfo models.DepositInfo, err error)

func (*AdrestiaRequests) GetAddress

func (a *AdrestiaRequests) GetAddress(coin string) (address models.AddressResponse, err error)

func (*AdrestiaRequests) GetPath

func (a *AdrestiaRequests) GetPath(fromCoin string, toCoin string) (path models.PathResponse, err error)

func (*AdrestiaRequests) GetTradeStatus

func (a *AdrestiaRequests) GetTradeStatus(tradeParams hestia.Trade) (tradeInfo hestia.ExchangeOrderInfo, err error)

func (*AdrestiaRequests) GetWithdrawalTxHash

func (a *AdrestiaRequests) GetWithdrawalTxHash(withdrawParams models.WithdrawInfo) (txId string, err error)

func (*AdrestiaRequests) StockBalance

func (a *AdrestiaRequests) StockBalance(asset string) (balance models.BalanceResponse, err error)

func (*AdrestiaRequests) Trade

func (a *AdrestiaRequests) Trade(tradeParams hestia.Trade) (txId string, err error)

func (*AdrestiaRequests) Withdraw

func (a *AdrestiaRequests) Withdraw(withdrawParams models.WithdrawParams) (withdrawal models.WithdrawInfo, err error)

type AdrestiaService

type AdrestiaService interface {
	GetAddress(coin string) (address models.AddressResponse, err error)
	GetPath(fromCoin string, toCoin string) (path models.PathResponse, err error)
	Withdraw(withdrawParams models.WithdrawParams) (withdrawal models.WithdrawInfo, err error)
	Trade(tradeParams hestia.Trade) (txId string, err error)
	GetTradeStatus(tradeParams hestia.Trade) (tradeInfo hestia.ExchangeOrderInfo, err error)
	GetWithdrawalTxHash(withdrawParams models.WithdrawInfo) (txId string, err error)
	// Retrieves information on the status for a given deposit, using a txid or an address (some exchanges).
	DepositInfo(depositParams models.DepositParams) (depositInfo models.DepositInfo, err error)
	// Retrieves the maximum balance of an asset relative to the amount of base stable coins in the output coin's exchange.
	StockBalance(asset string) (balance models.BalanceResponse, err error)
}

type HestiaRequests

type HestiaRequests struct {
	HestiaURL string
}

func (*HestiaRequests) GetCoinsConfig

func (a *HestiaRequests) GetCoinsConfig() ([]hestia.Coin, error)

func (*HestiaRequests) GetShiftStatus

func (a *HestiaRequests) GetShiftStatus() (hestia.Config, error)

func (*HestiaRequests) GetShiftsByTimestampV2

func (a *HestiaRequests) GetShiftsByTimestampV2(uid string, timestamp string) (shifts []hestia.ShiftV2, err error)

func (*HestiaRequests) UpdateShift

func (a *HestiaRequests) UpdateShift(shiftData hestia.Shift) (string, error)

func (*HestiaRequests) UpdateShiftV2

func (a *HestiaRequests) UpdateShiftV2(shiftData hestia.ShiftV2) (string, error)

type HestiaService

type HestiaService interface {
	GetShiftStatus() (hestia.Config, error)
	GetCoinsConfig() ([]hestia.Coin, error)
	UpdateShift(shiftData hestia.Shift) (string, error)
	UpdateShiftV2(shiftData hestia.ShiftV2) (string, error)
	GetShiftsByTimestampV2(uid string, timestamp string) (shifts []hestia.ShiftV2, err error)
}

type PlutusRequests

type PlutusRequests struct {
	PlutusUrl string
}

func (*PlutusRequests) GetNewPaymentAddress

func (p *PlutusRequests) GetNewPaymentAddress(coin string) (addr string, err error)

func (*PlutusRequests) GetWalletBalance

func (p *PlutusRequests) GetWalletBalance(coin string) (plutus.Balance, error)

func (*PlutusRequests) SubmitPayment

func (p *PlutusRequests) SubmitPayment(body plutus.SendAddressBodyReq) (txid string, err error)

func (*PlutusRequests) ValidateRawTx

func (p *PlutusRequests) ValidateRawTx(body plutus.ValidateRawTxReq) (valid bool, err error)

type PlutusService

type PlutusService interface {
	GetWalletBalance(coin string) (plutus.Balance, error)
	GetNewPaymentAddress(coin string) (addr string, err error)
	ValidateRawTx(body plutus.ValidateRawTxReq) (valid bool, err error)
	SubmitPayment(body plutus.SendAddressBodyReq) (txid string, err error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL