Versions in this module Expand all Collapse all v1 v1.0.0 Jun 18, 2021 Changes in this version + var CmdBalances = "balances" + var CmdCreateTransaction = "create_transaction" + var CmdCreateTransfer = "create_transfer" + var CmdGetBasicInfo = "get_basic_info" + var CmdGetCallbackAddress = "get_callback_address" + var CmdGetConversionLimits = "convert_limits" + var CmdGetDepositAddress = "get_deposit_address" + var CmdGetTxInfo = "get_tx_info" + var CmdGetTxInfoMulti = "get_tx_info_multi" + var CmdGetTxList = "get_tx_ids" + var CmdRates = "rates" + var ErrCommandDoesntExist = errors.New("command is not supported by api client") + func SupportedCommands() []string + type BalancesRequest struct + All string + type BalancesResponse struct + Result map[string]BalancesResult + type BalancesResult struct + Balance int + Balancef string + type BasicInfoResponse struct + Result *BasicInfoResult + func (resp *BasicInfoResponse) GetError() string + type BasicInfoResult struct + Email string + MerchantID string + PublicName string + Username string + type CallbackAddressRequest struct + Currency string + IPNURL string + type CallbackAddressResponse struct + Result *CallbackAddressResult + type CallbackAddressResult struct + Address string + DestTag string + PubKey string + type Client struct + BTCForwardingAddress string + ETHForwardingAddress string + IPNSecret string + IPNURL string + func NewClient(cfg *Config, httpClient HTTPClient) (*Client, error) + func (c *Client) Call(cmd string, data url.Values, responseStruct interface{}) error + func (c *Client) CallBalances(req *BalancesRequest) (map[string]BalancesResult, error) + func (c *Client) CallCreateTransaction(req *TransactionRequest) (*TransactionResult, error) + func (c *Client) CallCreateTransfer(req *WithdrawalRequest) (*WithdrawalResult, error) + func (c *Client) CallGetBasicInfo() (*BasicInfoResult, error) + func (c *Client) CallGetCallbackAddress(req *CallbackAddressRequest) (*CallbackAddressResponse, error) + func (c *Client) CallGetConversionLimits(req *ConvertLimitRequest) (*ConvertLimitResponse, error) + func (c *Client) CallGetDepositAddress(req *DepositAddressRequest) (*CallbackAddressResponse, error) + func (c *Client) CallGetTxInfo(req *TxInfoRequest) (*TxInfoResponse, error) + func (c *Client) CallGetTxList(req *TxListRequest) (*TxListResponse, error) + func (c *Client) CallRates(req *RatesRequest) (map[string]RatesResult, error) + func (c *Client) HandleIPNAPI(reader io.Reader) (*IPNAPIResponse, error) + func (c *Client) HandleIPNDeposit(reader io.Reader) (*IPNDepositResponse, error) + type Config struct + BTCForwardingAddress string + ETHForwardingAddress string + IPNSecret string + IPNURL string + PrivateKey string + PublicKey string + type ConvertLimitRequest struct + From string + To string + type ConvertLimitResponse struct + Error string + Result struct{ ... } + type DepositAddressRequest struct + Currency string + type ErrorResponse struct + Error string + type HTTPClient interface + Do func(*http.Request) (*http.Response, error) + type IPNAPIResponse struct + Amount1 string + Amount2 string + BuyerName string + Currency1 string + Currency2 string + Custom string + Email string + Fee string + Invoice string + ItemName string + ItemNumber string + ReceivedAmount string + ReceivedConfirms string + SendTX string + Status string + StatusText string + TxnID string + type IPNDepositResponse struct + Address string + Amount string + AmountI string + Confirms string + Currency string + DestTag string + Fee string + FeeI string + Status string + StatusText string + TxnID string + type RatesRequest struct + Accepted string + Short string + type RatesResponse struct + Result map[string]RatesResult + type RatesResult struct + IsFiat int8 + LastUpdate string + RateBTC string + type Reader struct + Data []byte + func (r *Reader) Read(p []byte) (n int, err error) + type TransactionRequest struct + Address string + Amount string + BuyerEmail string + BuyerName string + CancelURL string + Currency1 string + Currency2 string + Custom string + IPNURL string + Invoice string + ItemName string + ItemNumber string + SuccessURL string + type TransactionResponse struct + Result *TransactionResult + type TransactionResult struct + Address string + Amount string + CheckoutURL string + ConfirmsNeeded string + QRCodeURL string + StatusURL string + Timeout uint32 + TxnID string + type TxInfoRequest struct + Full string + TxID string + type TxInfoResponse struct + Result map[string]interface{} + type TxListRequest struct + All string + Limit string + Newer string + Start string + type TxListResponse struct + Result []string + type WithdrawalRequest struct + Amount string + AutoConfirm int + Currency string + MerchantID string + PBNTag string + type WithdrawalResponse struct + Result *WithdrawalResult + type WithdrawalResult struct + Amount string + ID string + Status int