Documentation ¶
Index ¶
- Variables
- type Balance
- type BlockNotOnDiskError
- type Client
- func (c *Client) Balance(ctx context.Context, scriptHash []byte) (*Balance, error)
- func (c *Client) Broadcast(ctx context.Context, rtx []byte) ([]byte, error)
- func (c *Client) Close() error
- func (c *Client) Height(ctx context.Context) (uint64, error)
- func (c *Client) RawBlockHeader(ctx context.Context, height uint64) (*bitcoin.BlockHeader, error)
- func (c *Client) RawTransaction(ctx context.Context, txHash []byte) ([]byte, error)
- func (c *Client) Transaction(ctx context.Context, txHash []byte) ([]byte, error)
- func (c *Client) TransactionAtPosition(ctx context.Context, height, index uint64) ([]byte, []string, error)
- func (c *Client) UTXOs(ctx context.Context, scriptHash []byte) ([]*UTXO, error)
- type HeaderNotification
- type JSONRPCError
- type JSONRPCRequest
- type JSONRPCResponse
- type NoTxAtPositionError
- type RPCError
- type UTXO
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBlockNotOnDisk = NewBlockNotOnDiskError(errors.New("block not on disk")) ErrNoTxAtPosition = NewNoTxAtPositionError(errors.New("no tx at position")) )
Functions ¶
This section is empty.
Types ¶
type BlockNotOnDiskError ¶
type BlockNotOnDiskError struct {
// contains filtered or unexported fields
}
func NewBlockNotOnDiskError ¶
func NewBlockNotOnDiskError(err error) BlockNotOnDiskError
func (BlockNotOnDiskError) Error ¶
func (e BlockNotOnDiskError) Error() string
func (BlockNotOnDiskError) Is ¶
func (e BlockNotOnDiskError) Is(target error) bool
func (BlockNotOnDiskError) Unwrap ¶
func (e BlockNotOnDiskError) Unwrap() error
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements an electrumx JSON RPC client.
func (*Client) RawBlockHeader ¶
func (*Client) RawTransaction ¶
func (*Client) Transaction ¶
func (*Client) TransactionAtPosition ¶
type HeaderNotification ¶
type JSONRPCError ¶
func NewJSONRPCError ¶
func NewJSONRPCError(code int, msg string) *JSONRPCError
type JSONRPCRequest ¶
type JSONRPCRequest struct { JSONRPC string `json:"jsonrpc"` Method string `json:"method"` Params json.RawMessage `json:"params,omitempty"` ID uint64 `json:"id"` }
func NewJSONRPCRequest ¶ added in v0.1.1
func NewJSONRPCRequest(id uint64, method string, params any) (*JSONRPCRequest, error)
NewJSONRPCRequest creates a new JSONRPCRequest.
type JSONRPCResponse ¶
type JSONRPCResponse struct { JSONRPC string `json:"jsonrpc"` Error *JSONRPCError `json:"error,omitempty"` Result json.RawMessage `json:"result"` ID uint64 `json:"id"` }
type NoTxAtPositionError ¶
type NoTxAtPositionError struct {
// contains filtered or unexported fields
}
func NewNoTxAtPositionError ¶
func NewNoTxAtPositionError(err error) NoTxAtPositionError
func (NoTxAtPositionError) Error ¶
func (e NoTxAtPositionError) Error() string
func (NoTxAtPositionError) Is ¶
func (e NoTxAtPositionError) Is(target error) bool
func (NoTxAtPositionError) Unwrap ¶
func (e NoTxAtPositionError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.