Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Used when an iterator has exhausted its supply. IterDone = errors.New("iterator done") )
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct {
Hash160 string
Address string
TransactionCount int64 `json:"n_tx"`
TotalReceived int64 `json:"total_received"`
TotalSent int64 `json:"total_sent"`
FinalBalance int64 `json:"final_balance"`
Transactions []Transaction `json:"txs"`
TxSortDescending bool
// contains filtered or unexported fields
}
func (*Address) NextTransaction ¶
func (a *Address) NextTransaction() (Transaction, error)
type AddressList ¶
type Block ¶
type Block struct {
// Request params.
Hash string
Index int64 `json:"block_index"`
Version int64 `json:"ver"`
PreviousBlock string `json:"prev_block"`
MerkelRoot string `json:"mrkl_root"`
Time int64
Bits int64
Fee int64
Nonce int64
TransactionCount int64 `json:"n_tx"`
Size int64
MainChain bool `json:"main_chain"`
Height int64
ReceivedTime int64 `json:"received_time"`
RelayedBy string `json:"relayed_by"`
Transactions []Transaction `json:"tx"`
}
type BlockChain ¶
type BlockChain struct {
GUID string
Password string
SecondPassword string
APICode string
// contains filtered or unexported fields
}
func New ¶
func New(c *http.Client) *BlockChain
func (*BlockChain) Request ¶
func (bc *BlockChain) Request(item Item) error
type BlockHeight ¶
type LatestBlock ¶
type NewAddress ¶
type NewAddress struct {
// Optional request parameter
Label string
// Response
Address string
// Error Response
Error string
}
NewAddress allows you to create a new address in your blockchain.info wallet. The Label parameter is optional and if set will label the new address. The struct is passed to Request and Address and/or Error parameters are populated when Request returns.
type SendPayment ¶
type SendPayment struct {
// Required request parameters.
ToAddress string
Amount int64
// Optional request parameters.
FromAddress string
Fee int64
Note string
// Response
Message string
TransactionHash string `json:"tx_hash"`
Notice string
// Error response
Error string
}
SendPayment struct allows you to send a payment from a blockchain.info wallet. ToAddress and Amount are required parameters. FromAddress, Shared Fee and Note are optional parameters. Check parameter Error for error respnoses from the blockchain.info wallet.
type Transaction ¶
type Transaction struct {
// Required request parameters.
// Either Hash or TransactionIndex are required.
Hash string
Index int64 `json:"tx_index"`
Inputs []Input
InputCount int64 `json:"vin_sz"`
Outputs []Output `json:"out"`
OutputCount int64 `json:"vout_sz"`
RelayedBy string `json:"relayed_by"`
Result int64
Size int64
Time int64
BlockHeight int64 `json:"block_height"`
Version int64 `json:"ver"`
}
func (*Transaction) Fee ¶
func (t *Transaction) Fee() int64
func (*Transaction) IsCoinbase ¶
func (t *Transaction) IsCoinbase() bool
type UnconfirmedTransactions ¶
type UnconfirmedTransactions struct {
Transactions []Transaction `json:"txs"`
// contains filtered or unexported fields
}
func (*UnconfirmedTransactions) NextTransaction ¶
func (uc *UnconfirmedTransactions) NextTransaction() (Transaction, error)
Click to show internal directories.
Click to hide internal directories.