Documentation ¶
Overview ¶
Package method contains an implemenetation of the RPC methods made available by the Bitcoin server
Package method contains an implemenetation of the RPC methods made available by the Bitcoin server ¶
Package method contains an implemenetation of the RPC methods made available by the Bitcoin server ¶
Package method contains an implemenetation of the RPC methods made available by the Bitcoin server ¶
Package method contains an implemenetation of the RPC methods made available by the Bitcoin server ¶
Package method contains an implemenetation of the RPC methods made available by the Bitcoin server ¶
Package method contains an implemenetation of the RPC methods made available by the Bitcoin server ¶
Package method contains an implemenetation of the RPC methods made available by the Bitcoin server
Index ¶
- func AddNode(client *rpc.RPCClient, node string) error
- func RemoveNode(client *rpc.RPCClient, node string) error
- func Uptime(client *rpc.RPCClient) (time.Duration, error)
- type AddNodeArgs
- type AddedNodeAddress
- type AddedNodeInfo
- type Banned
- type HumanizedMempoolInfo
- type MempoolInfo
- type NetTotals
- type Network
- type NetworkInfo
- type PeerInfo
- type PeerInfoArgs
- type PeerInfoBytesReceived
- type PeerInfoBytesSent
- type UploadTarget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddNodeArgs ¶
type AddedNodeAddress ¶
type AddedNodeInfo ¶
type AddedNodeInfo struct { // AddedNode is the node ip address or name (as provided to addnode) AddedNode string `json:"addednode"` // Connected is a boolean that specifies if we are currently connected to the node Connected bool `json:"connected"` // Addresses is a list of addresses of the added node. Only present if connected == true Addresses []AddedNodeAddress `json:"addresses"` }
func GetAddedNodeInfo ¶
func GetAddedNodeInfo(client *rpc.RPCClient) ([]AddedNodeInfo, error)
GetAddedNodeInfo Returns information about the given added node, or all added nodes.
type Banned ¶
type HumanizedMempoolInfo ¶
type MempoolInfo ¶
type MempoolInfo struct { // Size is the current transaction count. Size uint `json:"size"` // Bytes is the sum of all virtual transaction sizes as defined in BIP 141. Differs from actual serialized size // because witness data is discounted Bytes uint64 `json:"bytes"` // Usage is the total memory usage for the mempool. Usage uint64 `json:"usage"` // MaxMempool is the maximum memory usage for the mempool. MaxMempool uint64 `json:"maxmempool"` // MempoolMinFee is the minimum fee for transaction to be accepted into the mempool. MempoolMinFee float64 `json:"mempoolminfee"` // Humanize humanizes the units (bytes, timestamps) that belong to this structure. Humanize HumanizedMempoolInfo }
func GetMempoolInfo ¶
func GetMempoolInfo(client *rpc.RPCClient) (MempoolInfo, error)
GetMempoolInfo returns details on the active state of the TX memory pool.
type NetTotals ¶
type NetTotals struct { TotalBytesRecv uint64 `json:"totalbytesrecv"` TotalBytesSent uint64 `json:"totalbytessent"` TimeMillis timestamp.Unix `json:"timemillis"` UploadTarget UploadTarget `json:"uploadtarget"` }
NetTotals is the struct that contains information about the amount of data transfered by our node as well as possible restrictions/limitations on the amount of transferred data.
type Network ¶
type Network struct { Name string `json:"name"` Limited bool `json:"limited"` Reachable bool `json:"reachable"` Proxy string `json:"proxy"` ProxyRandomizeCredentials bool `json:"proxy_randomize_credentials"` }
Network is the list of networks that the node is able to connected from (IPv4, IPv6, Onion)
type NetworkInfo ¶
type NetworkInfo struct { Version uint `json:"version"` Subversion string `json:"subversion"` ProtocolVersion uint `json:"protocolversion"` Services string `json:"localservices"` LocalRelay bool `json:"localrelay"` TimeOffset int `json:"timeoffset"` NetworkActive bool `json:"networkactive"` Connections uint `json:"connections"` Warnings string `json:"warnings"` RelayFee float64 `json:"relayfee"` IncrementalFee float64 `json:"incrementalfee"` LocalAddresses []string `json:"localaddresses"` Networks []Network `json:"networks"` }
NetworkInfo is the structure returned by the Bitcoin Daemon with information about the node's network.
func GetNetworkInfo ¶
func GetNetworkInfo(client *rpc.RPCClient) (NetworkInfo, error)
GetNetworkInfo obtains information about the network conditions of the local node.
type PeerInfo ¶
type PeerInfo struct { // Id is the Peer index Id int `json:"id"` // Addr is the ip address and port of the peer Addr string `json:"addr"` // AddrLocal is the local address AddrLocal string `json:"addrlocal"` // Services is an hexadecimal value that describes services offered by the peer Services string `json:"services"` // RelayTxes indicates whether peer has asked us to relay transactions to it RelayTxes bool `json:"relaytxes"` // LastSend is the time in seconds since epoch (Jan 1 1970 GMT) of the last send LastSend timestamp.Unix `json:"lastsend"` // LastRecv is the time in seconds since epoch (Jan 1 1970 GMT) of the last receive LastRecv timestamp.Unix `json:"lastrecv"` // BytesSent is the total bytes sent to this peer BytesSent uint64 `json:"bytessent"` // BytesRecv is the total bytes received from this peer BytesRecv uint64 `json:"bytesrecv"` // ConnTime is the connection time in seconds since epoch (Jan 1 1970 GMT) ConnTime timestamp.Unix `json:"conntime"` // TimeOffset is the time offset in seconds TimeOffset int `json:"timeoffset"` // PingTime is the ping to this peer (if available) PingTime float64 `json:"pingtime"` // MinPing is the minimum observed ping time (if any at all) MinPing float64 `json:"minping"` // Version is the peer version, such as 7001 Version uint `json:"version"` // Subver is the string version of this peer Subver string `json:"subver"` // Inbound indicates if the connection is Inbound (true) or Outbound (false) Inbound bool `json:"inbound"` // AddNode indicates whether connection was due to addnode and is using an addnode slot AddNode bool `json:"addnode"` // StartHEight The starting height (block) of the peer StartHeight int `json:"startingheight"` // BanScore indicates the ban score for this peer BanScore uint `json:"banscore"` // SynchedHeaders is the last header we have in common with this peer SynchedHeaders int `json:"synced_headers"` // SynchedBlocks is the last block we have in common with this peer SynchedBlocks int `json:"synced_blocks"` // Whitelisted indicates whether the peer is whitelisted Whitelisted bool `json:"whitelisted"` // BytesSentPerMsg is the total bytes sent aggregated by message type BytesSentPerMsg PeerInfoBytesSent `json:"bytessent_per_msg"` // BytesReceivedPerMsg is the total bytes received aggregated by message type BytesReceivedPerMsg PeerInfoBytesSent `json:"bytesrecv_per_msg"` }
type PeerInfoArgs ¶
type PeerInfoArgs struct { }
type PeerInfoBytesReceived ¶
type PeerInfoBytesSent ¶
type UploadTarget ¶
type UploadTarget struct { Timeframe time.Duration `json:"timeframe"` Target uint `json:"target"` TargetReached bool `json:"target_reached"` ServeHistoricalBlocks bool `json:"serve_historical_blocks"` BytesLeftInCycle uint64 `json:"bytes_left_in_cycle"` TimeLeftInCycle uint64 `json:"time_left_in_cycle"` }