Documentation ¶
Index ¶
- Constants
- Variables
- type Adapter
- type CryptoHub
- func (ch *CryptoHub) EstimateMultiSendFee(ctx context.Context, baseCoin string, w Wallet, coin string, ...) (float64, float64, error)
- func (ch *CryptoHub) EstimateSendFee(ctx context.Context, baseCoin string, w Wallet, coin string, amount float64, ...) (float64, float64, error)
- func (ch *CryptoHub) FindWallet(ctx context.Context, baseCoin string, privateKey string) (Wallet, error)
- func (ch *CryptoHub) GetBalance(ctx context.Context, baseCoin string, address string) (map[string]float64, error)
- func (ch *CryptoHub) IsTransactionComplete(ctx context.Context, baseCoin string, hash string) bool
- func (ch *CryptoHub) IsValidAddress(ctx context.Context, baseCoin string, address string) bool
- func (ch *CryptoHub) MultiSend(ctx context.Context, baseCoin string, w Wallet, coin string, ...) (string, error)
- func (ch *CryptoHub) MustEstimateMultiSendFee(ctx context.Context, baseCoin string, w Wallet, coin string, ...) (float64, float64)
- func (ch *CryptoHub) MustEstimateSendFee(ctx context.Context, baseCoin string, w Wallet, coin string, amount float64, ...) (float64, float64)
- func (ch *CryptoHub) MustFindWallet(ctx context.Context, baseCoin string, privateKey string) Wallet
- func (ch *CryptoHub) MustGetBalance(ctx context.Context, baseCoin string, address string) map[string]float64
- func (ch *CryptoHub) MustMultiSend(ctx context.Context, baseCoin string, w Wallet, coin string, ...) string
- func (ch *CryptoHub) MustNewWallet(ctx context.Context, baseCoin string) Wallet
- func (ch *CryptoHub) MustSend(ctx context.Context, baseCoin string, w Wallet, coin string, amount float64, ...) string
- func (ch *CryptoHub) NewWallet(ctx context.Context, baseCoin string) (Wallet, error)
- func (ch *CryptoHub) Send(ctx context.Context, baseCoin string, w Wallet, coin string, amount float64, ...) (string, error)
- func (ch *CryptoHub) Subscribe(ctx context.Context, baseCoin string, consumer listener.EventConsumer) error
- func (ch *CryptoHub) SubscribeAll(ctx context.Context, consumer listener.EventConsumer) error
- func (ch *CryptoHub) Unsubscribe(_ context.Context, baseCoin string) error
- func (ch *CryptoHub) UnsubscribeAll()
- type EthereumAdapter
- func (ea *EthereumAdapter) ApproveTokenMultisend(ctx context.Context, w Wallet, coin string) (string, error)
- func (ea *EthereumAdapter) ConfigureTransactionContract(ctx context.Context, w Wallet, feePerc uint8, internalFeePerc uint8, ...) ([]string, error)
- func (ea *EthereumAdapter) DeployMultiSendContract(ctx context.Context, w Wallet) (string, string, error)
- func (ea *EthereumAdapter) EstimateApproveTokenMultisend(ctx context.Context, w Wallet, coin string) (float64, float64, error)
- func (ea *EthereumAdapter) EstimateMultiSendFee(ctx context.Context, w Wallet, coin string, addresses []string, ...) (float64, float64, error)
- func (ea *EthereumAdapter) EstimateSendFee(ctx context.Context, w Wallet, coin string, amount float64, address string) (float64, float64, error)
- func (ea *EthereumAdapter) FindWallet(_ context.Context, privateKey string) (Wallet, error)
- func (ea *EthereumAdapter) GetBalance(ctx context.Context, address string) (map[string]float64, error)
- func (ea *EthereumAdapter) IsTransactionComplete(ctx context.Context, hash string) bool
- func (ea *EthereumAdapter) IsValidAddress(_ context.Context, address string) bool
- func (ea *EthereumAdapter) MultiSend(ctx context.Context, w Wallet, coin string, addresses []string, ...) (string, error)
- func (ea *EthereumAdapter) NewWallet(_ context.Context) (Wallet, error)
- func (ea *EthereumAdapter) Send(ctx context.Context, w Wallet, coin string, amount float64, address string) (string, error)
- func (ea *EthereumAdapter) Subscribe(ctx context.Context, consumer listener.EventConsumer) error
- func (ea *EthereumAdapter) Unsubscribe()
- type MinterAdapter
- func (ma *MinterAdapter) AddBlockListener(listener func(lastBlockHeight uint64, transactionsCount int))
- func (ma *MinterAdapter) Buy(c context.Context, w Wallet, coin string, amount float64) (string, error)
- func (ma *MinterAdapter) BuySwapPool(c context.Context, w Wallet, coin string, amount float64) (string, error)
- func (ma *MinterAdapter) CoinID(coin string) uint64
- func (ma *MinterAdapter) EstimateBuy(c context.Context, coin string, amount float64) (float64, float64, error)
- func (ma *MinterAdapter) EstimateMultiSendFee(c context.Context, w Wallet, coin string, addresses []string, ...) (float64, float64, error)
- func (ma *MinterAdapter) EstimateSendFee(c context.Context, w Wallet, coin string, amount float64, address string) (float64, float64, error)
- func (ma *MinterAdapter) FindWallet(_ context.Context, privateKey string) (Wallet, error)
- func (ma *MinterAdapter) GetBalance(c context.Context, address string) (map[string]float64, error)
- func (ma *MinterAdapter) GetLastBlockHeight() uint64
- func (ma *MinterAdapter) IsTransactionComplete(c context.Context, hash string) bool
- func (ma *MinterAdapter) IsValidAddress(_ context.Context, address string) bool
- func (ma *MinterAdapter) MultiSend(c context.Context, w Wallet, coin string, addresses []string, ...) (string, error)
- func (ma *MinterAdapter) NewWallet(_ context.Context) (Wallet, error)
- func (ma *MinterAdapter) Nonce(c context.Context, mntWallet *wallet.Wallet) (uint64, error)
- func (ma *MinterAdapter) SellAll(c context.Context, w Wallet, coin string) (string, error)
- func (ma *MinterAdapter) SellAllSwapPool(c context.Context, w Wallet, coin string) (string, error)
- func (ma *MinterAdapter) Send(c context.Context, w Wallet, coin string, amount float64, address string) (string, error)
- func (ma *MinterAdapter) SetLastBlockHeight(lastBlockHeight uint64)
- func (ma *MinterAdapter) Subscribe(_ context.Context, consumer listener.EventConsumer) error
- func (ma *MinterAdapter) Unsubscribe()
- type Wallet
Constants ¶
View Source
const ( ValuableDecimals = 6 BIPDecimal = 18.0 )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter interface { IsValidAddress(ctx context.Context, address string) bool NewWallet(ctx context.Context) (Wallet, error) FindWallet(ctx context.Context, privateKey string) (Wallet, error) GetBalance(ctx context.Context, address string) (map[string]float64, error) EstimateSendFee(ctx context.Context, w Wallet, coin string, amount float64, address string) (float64, float64, error) Send(ctx context.Context, w Wallet, coin string, amount float64, address string) (string, error) EstimateMultiSendFee(ctx context.Context, w Wallet, coin string, addresses []string, amounts []float64) (float64, float64, error) MultiSend(ctx context.Context, w Wallet, coin string, addresses []string, amounts []float64) (string, error) Subscribe(ctx context.Context, consumer listener.EventConsumer) error IsTransactionComplete(ctx context.Context, hash string) bool Unsubscribe() }
type CryptoHub ¶
func NewCryptoHub ¶
func (*CryptoHub) EstimateMultiSendFee ¶ added in v0.0.3
func (*CryptoHub) EstimateSendFee ¶ added in v0.0.3
func (*CryptoHub) FindWallet ¶ added in v0.0.7
func (*CryptoHub) GetBalance ¶
func (*CryptoHub) IsTransactionComplete ¶ added in v0.0.21
func (*CryptoHub) IsValidAddress ¶ added in v0.0.13
func (*CryptoHub) MustEstimateMultiSendFee ¶ added in v0.0.4
func (*CryptoHub) MustEstimateSendFee ¶ added in v0.0.4
func (*CryptoHub) MustFindWallet ¶ added in v0.0.7
func (*CryptoHub) MustGetBalance ¶ added in v0.0.4
func (*CryptoHub) MustMultiSend ¶ added in v0.0.4
func (*CryptoHub) MustNewWallet ¶ added in v0.0.4
func (*CryptoHub) SubscribeAll ¶ added in v0.0.15
func (*CryptoHub) Unsubscribe ¶ added in v0.0.15
func (*CryptoHub) UnsubscribeAll ¶ added in v0.0.15
func (ch *CryptoHub) UnsubscribeAll()
type EthereumAdapter ¶ added in v0.0.3
type EthereumAdapter struct {
// contains filtered or unexported fields
}
func NewEthereumAdapter ¶ added in v0.0.3
func NewEthereumAdapter(ethereumClient *ethclient.Client, gasPriceGwei float64, accelerationPercent float64) *EthereumAdapter
func (*EthereumAdapter) ApproveTokenMultisend ¶ added in v0.0.5
func (*EthereumAdapter) ConfigureTransactionContract ¶ added in v0.0.4
func (*EthereumAdapter) DeployMultiSendContract ¶ added in v0.0.4
func (*EthereumAdapter) EstimateApproveTokenMultisend ¶ added in v0.1.6
func (*EthereumAdapter) EstimateMultiSendFee ¶ added in v0.0.3
func (*EthereumAdapter) EstimateSendFee ¶ added in v0.0.3
func (*EthereumAdapter) FindWallet ¶ added in v0.0.7
func (*EthereumAdapter) GetBalance ¶ added in v0.0.3
func (*EthereumAdapter) IsTransactionComplete ¶ added in v0.0.21
func (ea *EthereumAdapter) IsTransactionComplete(ctx context.Context, hash string) bool
func (*EthereumAdapter) IsValidAddress ¶ added in v0.0.13
func (ea *EthereumAdapter) IsValidAddress(_ context.Context, address string) bool
func (*EthereumAdapter) NewWallet ¶ added in v0.0.3
func (ea *EthereumAdapter) NewWallet(_ context.Context) (Wallet, error)
func (*EthereumAdapter) Subscribe ¶ added in v0.0.14
func (ea *EthereumAdapter) Subscribe(ctx context.Context, consumer listener.EventConsumer) error
func (*EthereumAdapter) Unsubscribe ¶ added in v0.0.14
func (ea *EthereumAdapter) Unsubscribe()
type MinterAdapter ¶
type MinterAdapter struct {
// contains filtered or unexported fields
}
func NewMinterAdapter ¶
func NewMinterAdapter(minterClient *http_client.Client, minterPollingClient *http_client.Client, pollingDuration time.Duration) *MinterAdapter
func (*MinterAdapter) AddBlockListener ¶ added in v0.0.17
func (ma *MinterAdapter) AddBlockListener(listener func(lastBlockHeight uint64, transactionsCount int))
func (*MinterAdapter) BuySwapPool ¶ added in v0.2.10
func (*MinterAdapter) CoinID ¶ added in v0.2.0
func (ma *MinterAdapter) CoinID(coin string) uint64
func (*MinterAdapter) EstimateBuy ¶ added in v0.0.29
func (*MinterAdapter) EstimateMultiSendFee ¶ added in v0.0.3
func (*MinterAdapter) EstimateSendFee ¶ added in v0.0.3
func (*MinterAdapter) FindWallet ¶ added in v0.0.7
func (*MinterAdapter) GetBalance ¶
func (*MinterAdapter) GetLastBlockHeight ¶ added in v0.0.16
func (ma *MinterAdapter) GetLastBlockHeight() uint64
func (*MinterAdapter) IsTransactionComplete ¶ added in v0.0.21
func (ma *MinterAdapter) IsTransactionComplete(c context.Context, hash string) bool
func (*MinterAdapter) IsValidAddress ¶ added in v0.0.13
func (ma *MinterAdapter) IsValidAddress(_ context.Context, address string) bool
func (*MinterAdapter) NewWallet ¶
func (ma *MinterAdapter) NewWallet(_ context.Context) (Wallet, error)
func (*MinterAdapter) SellAllSwapPool ¶ added in v0.2.9
func (*MinterAdapter) SetLastBlockHeight ¶ added in v0.0.16
func (ma *MinterAdapter) SetLastBlockHeight(lastBlockHeight uint64)
func (*MinterAdapter) Subscribe ¶ added in v0.0.14
func (ma *MinterAdapter) Subscribe(_ context.Context, consumer listener.EventConsumer) error
func (*MinterAdapter) Unsubscribe ¶ added in v0.0.14
func (ma *MinterAdapter) Unsubscribe()
Click to show internal directories.
Click to hide internal directories.