Documentation ¶
Index ¶
- Variables
- func MakeGetRequest(url string) ([]byte, error)
- func StartNanoWSClient(wsUrl string, callbackChan *chan *WSCallbackMsg)
- func UpdateBananoCoingeckoPrices() error
- func UpdateDolarSiPrice() error
- func UpdateDolarTodayPrice() error
- func UpdateNanoCoingeckoPrices() error
- type ConfirmationResponse
- type HTTPClient
- type RPCClient
- func (client *RPCClient) GetReceivableCount(account string, bananoMode bool) (int, error)
- func (client *RPCClient) MakeAccountInfoRequest(account string) (map[string]interface{}, error)
- func (client *RPCClient) MakeBlockRequest(hash string) (models.BlockResponse, error)
- func (client *RPCClient) MakeRequest(request interface{}) ([]byte, error)
- func (client *RPCClient) WorkGenerate(hash string, difficultyMultiplier int) (string, error)
- type WSCallbackBlock
- type WSCallbackMsg
Constants ¶
This section is empty.
Variables ¶
View Source
var CurrencyList = []string{
"ARS", "AUD", "BRL", "BTC", "CAD", "CHF", "CLP", "CNY", "CZK", "DKK", "EUR", "GBP", "HKD", "HUF", "IDR", "ILS", "INR", "JPY", "KRW", "MXN", "MYR", "NOK", "NZD", "PHP", "PKR", "PLN", "RUB", "SEK", "SGD", "THB", "TRY", "TWD", "USD", "ZAR", "SAR", "AED", "KWD", "UAH",
}
Functions ¶
func StartNanoWSClient ¶
func StartNanoWSClient(wsUrl string, callbackChan *chan *WSCallbackMsg)
func UpdateBananoCoingeckoPrices ¶
func UpdateBananoCoingeckoPrices() error
func UpdateDolarSiPrice ¶
func UpdateDolarSiPrice() error
func UpdateDolarTodayPrice ¶
func UpdateDolarTodayPrice() error
DolarTodayResponse structure based on expected JSON response
func UpdateNanoCoingeckoPrices ¶
func UpdateNanoCoingeckoPrices() error
Types ¶
type ConfirmationResponse ¶
type HTTPClient ¶
var (
Client HTTPClient
)
type RPCClient ¶
type RPCClient struct { Url string BpowClient *gql.BpowClient }
func (*RPCClient) GetReceivableCount ¶
This returns how many pending blocks an account has, up to 51, for anti-spam measures
func (*RPCClient) MakeAccountInfoRequest ¶
func (*RPCClient) MakeBlockRequest ¶
func (client *RPCClient) MakeBlockRequest(hash string) (models.BlockResponse, error)
func (*RPCClient) MakeRequest ¶
Base request
type WSCallbackBlock ¶
type WSCallbackBlock struct { Type string `json:"type"` Account string `json:"account"` Previous string `json:"previous"` Representative string `json:"representative"` Balance string `json:"balance"` Link string `json:"link"` LinkAsAccount string `json:"link_as_account"` Work string `json:"work"` Signature string `json:"signature"` Destination string `json:"destination"` Source string `json:"source"` Subtype string `json:"subtype"` }
type WSCallbackMsg ¶
type WSCallbackMsg struct { IsSend string `json:"is_send"` Block WSCallbackBlock `json:"block"` Account string `json:"account"` Hash string `json:"hash"` Amount string `json:"amount"` }
Click to show internal directories.
Click to hide internal directories.