Documentation
¶
Index ¶
- Constants
- func GetHtmlTitle(r io.Reader) (string, bool)
- type Address
- type Block
- type BlockHeight
- type Chart
- type Client
- func (c *Client) CheckAddress(address string) (string, error)
- func (c *Client) GetAddress(address string) (*Address, error)
- func (c *Client) GetAddresses(addresses []string) (*MultiAddr, error)
- func (c *Client) GetBlock(block string) (*Block, error)
- func (c *Client) GetBlockHeight(blockHeight string) (*BlockHeight, error)
- func (c *Client) GetChart(chartType string) (*Chart, error)
- func (c *Client) GetETHAddress(address string) (*ETHResponse, error)
- func (c *Client) GetETHAddressSummary(address string, getSummary bool) (*ETHAddress, error)
- func (c *Client) GetLatestBlock() (*Block, error)
- func (c *Client) GetTransaction(transaction string) (*Transaction, error)
- func (c *Client) GetUnconfirmedTransactions() (*Transactions, error)
- type ETHAddress
- type ETHResponse
- type Inputs
- type MultiAddr
- type Out
- type PrevOut
- type Transaction
- type Transactions
- type Tx
- type Value
Constants ¶
View Source
const ( API_ROOT = "https://blockchain.info" ETH_ROOT = "https://api.blockchain.info" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Block ¶
type Block struct { Hash string `json:"hash"` Ver int `json:"ver"` PrevBlock string `json:"prev_block"` MrklRoot string `json:"mrkl_root"` Time int `json:"time"` Bits int `json:"bits"` Nonce int `json:"nonce"` NTx int `json:"n_tx"` Size int `json:"size"` BlockIndex int `json:"block_index"` MainChain bool `json:"main_chain"` Height int `json:"height"` ReceivedTime int `json:"received_time"` RelayedBy string `json:"relayed_by"` Tx []*Tx `json:"tx"` TxIndexes []int `json:"txIndexes"` }
type BlockHeight ¶
type BlockHeight struct {
Blocks []*Block `json:"blocks"`
}
type Client ¶
func (*Client) GetBlockHeight ¶
func (c *Client) GetBlockHeight(blockHeight string) (*BlockHeight, error)
func (*Client) GetETHAddress ¶
func (c *Client) GetETHAddress(address string) (*ETHResponse, error)
func (*Client) GetETHAddressSummary ¶
func (c *Client) GetETHAddressSummary(address string, getSummary bool) (*ETHAddress, error)
func (*Client) GetLatestBlock ¶
func (*Client) GetTransaction ¶
func (c *Client) GetTransaction(transaction string) (*Transaction, error)
func (*Client) GetUnconfirmedTransactions ¶
func (c *Client) GetUnconfirmedTransactions() (*Transactions, error)
type ETHAddress ¶
type ETHAddress struct { Hash string `json:"hash"` Nonce string `json:"nonce"` Balance string `json:"balance"` TransactionCount string `json:"transactionCount"` InternalTransactionCount string `json:"internalTransactionCount"` TotalSent string `json:"totalSent"` TotalReceived string `json:"totalReceived"` TotalFees string `json:"totalFees"` LastUpdatedAtNumber string `json:"lastUpdatedAtNumber"` TokenTransferCount string `json:"tokenTransferCount"` }
type ETHResponse ¶
type ETHResponse struct { Transactions []struct { Hash string `json:"hash"` BlockHash string `json:"blockHash"` BlockNumber string `json:"blockNumber"` To string `json:"to"` From string `json:"from"` Value string `json:"value"` Nonce string `json:"nonce"` GasPrice string `json:"gasPrice"` GasLimit string `json:"gasLimit"` GasUsed string `json:"gasUsed"` TransactionIndex string `json:"transactionIndex"` Success bool `json:"success"` State string `json:"state"` Timestamp string `json:"timestamp"` InternalTransactions []interface{} `json:"internalTransactions"` Data string `json:"data,omitempty"` } `json:"transactions"` Page string `json:"page"` Size int `json:"size"` }
type Transaction ¶
type Transaction struct { Hash string `json:"hash"` Ver int `json:"ver"` VinSz int `json:"vin_sz"` VoutSz int `json:"vout_sz"` LockTime int `json:"lock_time"` Size int `json:"size"` RelayedBy string `json:"relayed_by"` BlockHeight int `json:"block_height"` TxIndex int `json:"tx_index"` Inputs []*Inputs `json:"inputs"` Out []*Out `json:"out"` }
type Transactions ¶
type Transactions struct {
Transactions []*Transaction `json:"txs"`
}
type Tx ¶
type Tx struct { Result int `json:"result"` Ver int `json:"ver"` Size int `json:"size"` Inputs []*Inputs `json:"inputs"` Time int `json:"time"` BlockHeight int `json:"block_height"` TxIndex int `json:"tx_index"` VinSz int `json:"vin_sz"` Hash string `json:"hash"` VoutSz int `json:"vout_sz"` RelayedBy string `json:"relayed_by"` Out []*Out `json:"out"` }
Click to show internal directories.
Click to hide internal directories.