Documentation ¶
Index ¶
- type Block_Header
- type Destinations
- type GetBalanceReply
- type GetBlockHashReply
- type GetBlockTemplateReply
- type GetInfoReply
- type JSONRpcResp
- type RPCClient
- func (r *RPCClient) Check(reserveSize int, address string) (bool, error)
- func (r *RPCClient) GetBalance(url string) (*GetBalanceReply, error)
- func (r *RPCClient) GetBlockByHash(hash string) (*GetBlockHashReply, error)
- func (r *RPCClient) GetBlockTemplate(reserveSize int, address string) (*GetBlockTemplateReply, error)
- func (r *RPCClient) GetInfo() (*GetInfoReply, error)
- func (r *RPCClient) GetLastBlockHeader() (*GetBlockHashReply, error)
- func (r *RPCClient) Info() *GetInfoReply
- func (r *RPCClient) SendTransaction(url string, transferParams Transfer_Params) (*TransferSplit_Result, error)
- func (r *RPCClient) Sick() bool
- func (r *RPCClient) SubmitBlock(blocktemplate_blob string, blockhashing_blob string) (*JSONRpcResp, error)
- func (r *RPCClient) UpdateInfo() (*GetInfoReply, error)
- type SubmitBlock_Result
- type TransferSplit_Params
- type TransferSplit_Result
- type Transfer_Params
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block_Header ¶
type Block_Header struct { Depth int64 `json:"depth"` Difficulty string `json:"difficulty"` Hash string `json:"hash"` Height int64 `json:"height"` Topoheight int64 `json:"topoheight"` MajorVersion uint64 `json:"major_version"` MinorVersion uint64 `json:"minor_version"` Nonce uint64 `json:"nonce"` OrphanStatus bool `json:"orphan_status"` Syncblock bool `json:"syncblock"` Txcount int64 `json:"txcount"` Reward uint64 `json:"reward"` Tips []string `json:"tips"` Timestamp uint64 `json:"timestamp"` }
type Destinations ¶
type GetBalanceReply ¶
type GetBlockHashReply ¶
type GetBlockHashReply struct { BlockHeader Block_Header `json:"block_header"` Status string `json:"status"` }
type GetBlockTemplateReply ¶
type GetBlockTemplateReply struct { Blocktemplate_blob string `json:"blocktemplate_blob"` Blockhashing_blob string `json:"blockhashing_blob"` Expected_reward uint64 `json:"expected_reward"` Difficulty uint64 `json:"difficulty"` Height uint64 `json:"height"` Prev_Hash string `json:"prev_hash"` Reserved_Offset uint64 `json:"reserved_offset"` Epoch uint64 `json:"epoch"` // used to expire pool jobs Status string `json:"status"` }
type GetInfoReply ¶
type GetInfoReply struct { Difficulty int64 `json:"difficulty"` Stableheight int64 `json:"stableheight"` Topoheight int64 `json:"topoheight"` Averageblocktime50 float32 `json:"averageblocktime50"` Target int64 `json:"target"` Testnet bool `json:"testnet"` TopBlockHash string `json:"top_block_hash"` DynamicFeePerKB int64 `json:"dynamic_fee_per_kb"` TotalSupply int64 `json:"total_supply"` MedianBlockSize int64 `json:"median_block_Size"` Version string `json:"version"` Height int64 `json:"height"` TxPoolSize int64 `json:"tx_pool_size"` Status string `json:"status"` }
type JSONRpcResp ¶
type JSONRpcResp struct { Id *json.RawMessage `json:"id"` Result *json.RawMessage `json:"result"` Error map[string]interface{} `json:"error"` }
type RPCClient ¶
type RPCClient struct { sync.RWMutex Accepts int64 Rejects int64 LastSubmissionAt int64 FailsCount int64 Url *url.URL Name string // contains filtered or unexported fields }
func (*RPCClient) GetBalance ¶
func (r *RPCClient) GetBalance(url string) (*GetBalanceReply, error)
func (*RPCClient) GetBlockByHash ¶
func (r *RPCClient) GetBlockByHash(hash string) (*GetBlockHashReply, error)
func (*RPCClient) GetBlockTemplate ¶
func (r *RPCClient) GetBlockTemplate(reserveSize int, address string) (*GetBlockTemplateReply, error)
func (*RPCClient) GetInfo ¶
func (r *RPCClient) GetInfo() (*GetInfoReply, error)
func (*RPCClient) GetLastBlockHeader ¶
func (r *RPCClient) GetLastBlockHeader() (*GetBlockHashReply, error)
func (*RPCClient) Info ¶
func (r *RPCClient) Info() *GetInfoReply
func (*RPCClient) SendTransaction ¶
func (r *RPCClient) SendTransaction(url string, transferParams Transfer_Params) (*TransferSplit_Result, error)
func (*RPCClient) SubmitBlock ¶
func (r *RPCClient) SubmitBlock(blocktemplate_blob string, blockhashing_blob string) (*JSONRpcResp, error)
func (*RPCClient) UpdateInfo ¶
func (r *RPCClient) UpdateInfo() (*GetInfoReply, error)
type SubmitBlock_Result ¶
type TransferSplit_Result ¶
type TransferSplit_Result struct { Fee_list []uint64 `json:"fee_list"` Amount_list []uint64 `json:"amount_list"` Tx_key_list []string `json:"tx_key_list"` Tx_hash_list []string `json:"tx_hash_list"` Tx_blob_list []string `json:"tx_blob_list"` }
transfer split
type Transfer_Params ¶
type Transfer_Params struct { Destinations []Destinations `json:"destinations"` //Fee uint64 `json:"fee"` Mixin uint64 `json:"mixin"` Unlock_time uint64 `json:"unlock_time"` Payment_ID string `json:"payment_id"` Get_tx_key bool `json:"get_tx_key"` Priority uint64 `json:"priority"` Do_not_relay bool `json:"do_not_relay"` Get_tx_hex bool `json:"get_tx_hex"` }
Click to show internal directories.
Click to hide internal directories.