Documentation ¶
Overview ¶
Package rpc implements Chain Core's RPC client.
Index ¶
Constants ¶
View Source
const ( HeaderBlockchainID = "Blockchain-ID" HeaderCoreID = "Chain-Core-ID" HeaderTimeout = "RPC-Timeout" )
Chain-specific header fields
Variables ¶
View Source
var ErrWrongNetwork = errors.New("connected to a peer on a different network")
ErrWrongNetwork is returned when a peer's blockchain ID differs from the RPC client's blockchain ID.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { BaseURL string AccessToken string Username string BuildTag string BlockchainID string CoreID string }
A Client is a Chain RPC client. It performs RPCs over HTTP using JSON request and responses. A Client must be configured with a secret token to authenticate with other Cores on the network.
Click to show internal directories.
Click to hide internal directories.