Documentation ¶
Index ¶
- type BTCTools
- func (self *BTCTools) GetBlock(hash string) (*btcjson.BlockDetails, error)
- func (self *BTCTools) GetBlockHash(height uint32) (string, error)
- func (self *BTCTools) GetBlockHeader(hash string) (*wire.BlockHeader, error)
- func (self *BTCTools) GetBlockHeaderByHeight(height uint32) (*wire.BlockHeader, error)
- func (self *BTCTools) GetCurrentHeight() (uint32, error)
- func (self *BTCTools) GetTx(hash string) (*btcjson.TxRawResult, error)
- func (self *BTCTools) GetTxOut(hash string, vout uint32) (*btcjson.GetTxOutResult, error)
- func (self *BTCTools) PaserRawTx(rawTx []byte) (*wire.MsgTx, string, error)
- type BlockHeader
- type Request
- type Response
- type RestClient
- func (self *RestClient) SendRestRequest(data []byte) ([]byte, error)
- func (self *RestClient) SendRestRequestWithAuth(data []byte) ([]byte, error)
- func (self *RestClient) SetAddr(addr string) *RestClient
- func (self *RestClient) SetAuth(user string, passwd string) *RestClient
- func (self *RestClient) SetRestClient(restClient *http.Client) *RestClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BTCTools ¶
type BTCTools struct {
// contains filtered or unexported fields
}
func NewBtcTools ¶
func (*BTCTools) GetBlock ¶
func (self *BTCTools) GetBlock(hash string) (*btcjson.BlockDetails, error)
func (*BTCTools) GetBlockHeader ¶
func (self *BTCTools) GetBlockHeader(hash string) (*wire.BlockHeader, error)
func (*BTCTools) GetBlockHeaderByHeight ¶
func (self *BTCTools) GetBlockHeaderByHeight(height uint32) (*wire.BlockHeader, error)
func (*BTCTools) GetCurrentHeight ¶
type BlockHeader ¶
type Response ¶
type Response struct { Result json.RawMessage `json:"result"` Error *btcjson.RPCError `json:"error"` //maybe wrong Id int `json:"id"` }
type RestClient ¶
type RestClient struct {
// contains filtered or unexported fields
}
func NewRestClient ¶
func NewRestClient() *RestClient
func (*RestClient) SendRestRequest ¶
func (self *RestClient) SendRestRequest(data []byte) ([]byte, error)
func (*RestClient) SendRestRequestWithAuth ¶
func (self *RestClient) SendRestRequestWithAuth(data []byte) ([]byte, error)
func (*RestClient) SetAddr ¶
func (self *RestClient) SetAddr(addr string) *RestClient
func (*RestClient) SetAuth ¶
func (self *RestClient) SetAuth(user string, passwd string) *RestClient
func (*RestClient) SetRestClient ¶
func (self *RestClient) SetRestClient(restClient *http.Client) *RestClient
Click to show internal directories.
Click to hide internal directories.