Documentation
¶
Index ¶
- func AddressToScriptHash(address string) (string, error)
- type Balance
- type ElectrumClient
- func (s *ElectrumClient) GetBalance(address string) (int64, int64, error)
- func (s *ElectrumClient) GetTx(txid string, verbose bool) (*Tx, error)
- func (s *ElectrumClient) GetTxHistory(address string) ([]TxHistory, string, error)
- func (s *ElectrumClient) ListenForNotification()
- func (s *ElectrumClient) SendPing() error
- func (s *ElectrumClient) Subscribe(address string) (string, string, error)
- type ElectrumError
- type ElectrumRequest
- type ElectrumResponse
- type ScriptPubKey
- type ScriptSig
- type Tx
- type TxHistory
- type Vin
- type Vout
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddressToScriptHash ¶ added in v0.2.0
Types ¶
type ElectrumClient ¶ added in v0.2.0
func NewElectrumClient ¶ added in v0.2.0
func NewElectrumClient(address, network string) (*ElectrumClient, error)
func (*ElectrumClient) GetBalance ¶ added in v0.2.0
func (s *ElectrumClient) GetBalance(address string) (int64, int64, error)
func (*ElectrumClient) GetTx ¶ added in v0.2.0
func (s *ElectrumClient) GetTx(txid string, verbose bool) (*Tx, error)
func (*ElectrumClient) GetTxHistory ¶ added in v0.2.0
func (s *ElectrumClient) GetTxHistory(address string) ([]TxHistory, string, error)
func (*ElectrumClient) ListenForNotification ¶ added in v0.2.0
func (s *ElectrumClient) ListenForNotification()
func (*ElectrumClient) SendPing ¶ added in v0.2.0
func (s *ElectrumClient) SendPing() error
type ElectrumError ¶
ElectrumError represents the structure of an error returned by the Electrum server.
type ElectrumRequest ¶
type ElectrumRequest struct {
ID int `json:"id"`
Method string `json:"method"`
Params []interface{} `json:"params"`
Jsonrpc string `json:"jsonrpc"`
}
ElectrumRequest represents the structure of an Electrum request.
type ElectrumResponse ¶
type ElectrumResponse struct {
ID int `json:"id"`
Result json.RawMessage `json:"result"`
Error *ElectrumError `json:"error,omitempty"`
}
ElectrumResponse represents the structure of an Electrum response.
type ScriptPubKey ¶ added in v0.1.3
type Tx ¶ added in v0.1.3
type Tx struct {
BlockHash string `json:"blockhash,omitempty"`
BlockTime int `json:"blocktime,omitempty"`
Confirmations int `json:"confirmations,omitempty"`
Hash string `json:"hash"`
Hex string `json:"hex,omitempty"`
Locktime int `json:"locktime"`
Size int `json:"size"`
Time int `json:"time,omitempty"`
Txid string `json:"txid"`
Version int `json:"version"`
Vin []Vin `json:"vin"`
Vout []Vout `json:"vout"`
Vsize int `json:"vsize,omitempty"`
Weight int `json:"weight,omitempty"`
}
type Vout ¶ added in v0.1.3
type Vout struct {
Value float64 `json:"value"`
N int `json:"n"`
ScriptPubKey ScriptPubKey `json:"scriptPubKey"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.