Documentation ¶
Index ¶
- Constants
- Variables
- type GetClaimsInTxResp
- type Node
- func (n *Node) Connect(addrs []string, config *tls.Config) error
- func (n *Node) GetClaimInTx(txid string, nout int) (*types.Claim, error)
- func (n *Node) GetClaimsInTx(txid string) (*GetClaimsInTxResp, error)
- func (n *Node) GetTx(txid string) (string, error)
- func (n *Node) Raw(method string, params []string, v interface{}) error
- func (n *Node) Resolve(url string) (*types.Output, error)
- func (n *Node) ServerVersion() (string, error)
- func (n *Node) Shutdown()
- type TCPTransport
Constants ¶
View Source
const ( ClientVersion = "0.0.1" ProtocolVersion = "1.0" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type GetClaimsInTxResp ¶
type GetClaimsInTxResp struct { Jsonrpc string `json:"jsonrpc"` ID int `json:"id"` Result []struct { Name string `json:"name"` ClaimID string `json:"claim_id"` Txid string `json:"txid"` Nout int `json:"nout"` Amount int `json:"amount"` Depth int `json:"depth"` Height int `json:"height"` Value string `json:"value"` ClaimSequence int `json:"claim_sequence"` Address string `json:"address"` Supports []interface{} `json:"supports"` // TODO: finish me EffectiveAmount int `json:"effective_amount"` ValidAtHeight int `json:"valid_at_height"` } `json:"result"` }
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) GetClaimInTx ¶ added in v1.1.4
func (*Node) GetClaimsInTx ¶
func (n *Node) GetClaimsInTx(txid string) (*GetClaimsInTxResp, error)
func (*Node) ServerVersion ¶
ServerVersion returns the server's version. https://electrumx.readthedocs.io/en/latest/protocol-methods.html#server-version
type TCPTransport ¶
type TCPTransport struct {
// contains filtered or unexported fields
}
func NewTransport ¶
func NewTransport(addr string, config *tls.Config) (*TCPTransport, error)
func (*TCPTransport) Errors ¶
func (t *TCPTransport) Errors() <-chan error
func (*TCPTransport) Responses ¶
func (t *TCPTransport) Responses() <-chan []byte
func (*TCPTransport) Send ¶
func (t *TCPTransport) Send(body []byte) error
func (*TCPTransport) Shutdown ¶
func (t *TCPTransport) Shutdown()
Click to show internal directories.
Click to hide internal directories.