Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultTimeout = 15 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBalance ¶
AccountBalance account and its balance in pair
type BigInt ¶
BigInt is a wrapper over big.Int to implement only unmarshalText for json decoding.
func (*BigInt) MarshalText ¶
MarshalText implements the encoding.TextMarshaler
func (*BigInt) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AccountBalance ¶
AccountBalance gets ether balance for a single address
type Config ¶
type Config struct { // Timeout for API call Timeout time.Duration // API key applied from Etherscan Key string // Base URL like `https://api.etherscan.io/api?` BaseURL string // HTTP Client to be used. Specifying this value will ignore the Timeout value set // Set your own timeout. Client *http.Client }
type Log ¶
type Log struct { Address string `json:"address"` Topics []string `json:"topics"` Data string `json:"data"` BlockNumber BigInt `json:"blockNumber"` TransactionHash string `json:"transactionHash"` BlockHash string `json:"blockHash"` LogIndex BigInt `json:"logIndex"` Timestamp Time `json:"timestamp"` Removed bool `json:"removed"` }
type Response ¶
type Response struct { // 1 for good, 0 for error Status int `json:"status,string"` // OK for good, other words when Status equals 0 Message string `json:"message"` // where response lies Payload json.RawMessage `json:"result"` }
Response is the carrier of nearly every response
type Time ¶
Time is a wrapper over big.Int to implement only unmarshalText for json decoding.
func (Time) MarshalText ¶
MarshalText implements the encoding.TextMarshaler
func (*Time) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface.
Click to show internal directories.
Click to hide internal directories.