Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMissingRPCHost ... ErrMissingRPCHost = fmt.Errorf("missing RPC host") // ErrMissingRPCPort ... ErrMissingRPCPort = fmt.Errorf("missing RPC port") // ErrMissingRPCUser ... ErrMissingRPCUser = fmt.Errorf("missing RPC user") // ErrMissingRPCPassword ... ErrMissingRPCPassword = fmt.Errorf("missing RPC password") // ErrInvalidRescaTimestamp ... ErrInvalidRescaTimestamp = fmt.Errorf("rescan timestamp must be 'now', 0 or a unix timestamp") // ErrInvalidAddress ... ErrInvalidAddress = fmt.Errorf("invalid address") // ErrBlindKeyNotFound ... ErrBlindKeyNotFound = fmt.Errorf("blindkey not found for address") // ErrInvalidTxJSON ... ErrInvalidTxJSON = fmt.Errorf("invalid tx JSON") )
Functions ¶
func NewService ¶
NewService returns the Elements implementation of the Explorer interface. It establishes an insecure connection with the JSON-RPC interface of the node with no TLS termination.
func NewTxFromHex ¶
func NewTxFromHex(txhex string, confirmed bool) (explorer.Transaction, error)
func NewTxFromJSON ¶
func NewTxFromJSON(txJSON string) (explorer.Transaction, error)
Types ¶
type RPCClient ¶
type RPCClient struct {
// contains filtered or unexported fields
}
A RPCClient represents a JSON RPC client (over HTTP(s)).
type RPCError ¶
type RPCError struct { Code RPCErrorCode `json:"code,omitempty"` Message string `json:"message,omitempty"` }
RPCError represents an error that is used as a part of a JSON-RPC Response object.
type RPCErrorCode ¶
type RPCErrorCode int
RPCErrorCode represents an error code to be used as a part of an RPCError which is in turn used in a JSON-RPC Response object.
A specific type is used to help ensure the wrong errors aren't used.
Click to show internal directories.
Click to hide internal directories.