Documentation
¶
Index ¶
- Constants
- type GetTransactionResponse
- type Node
- func (n *Node) AddNode(address string, reply *int) error
- func (n *Node) Close(listeners ...net.Listener) error
- func (n *Node) DisconnectNode(address string, reply *int) error
- func (n *Node) GetAddressUTXOs(address string, reply *[]tx.Output) error
- func (n *Node) GetAddressesUTXOs(addresses []string, reply *map[string][]tx.Output) error
- func (n *Node) GetBestHeight(_ struct{}, reply *int32) error
- func (n *Node) GetBlock(hash []byte, reply *block.Block) error
- func (n *Node) GetLastBlock(_ struct{}, reply *block.Block) error
- func (n *Node) GetPeerInfo(_ struct{}, reply *[]string) error
- func (n *Node) GetRawMempool(_ struct{}, reply *[]string) error
- func (n *Node) GetTransaction(id []byte, reply *GetTransactionResponse) error
- func (n *Node) ListBlocks(_ struct{}, reply *[]block.Block) error
- func (n *Node) Run(accountName string) error
- func (n *Node) RunRPCServer() (net.Listener, error)
- func (n *Node) SendPing(_ struct{}, reply *struct{}) error
- func (n *Node) SendTx(params SendTxParams, reply *[]byte) error
- func (n *Node) Stop(_ struct{}, reply *struct{}) error
- type SendTxParams
Constants ¶
const RPCAddress = "0.0.0.0:8338"
RPCAddress where the node will be listening for rpc calls.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetTransactionResponse ¶
GetTransactionResponse is the structure of the GetTransaction rpc call response.
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node represents a Bitcoin Node.
func (*Node) DisconnectNode ¶
DisconnectNode removes a node from the peer list.
func (*Node) GetAddressUTXOs ¶
GetAddressUTXOs returns the UTXOs corresponding to an address.
func (*Node) GetAddressesUTXOs ¶
GetAddressesUTXOs returns the UTXOs corresponding to a set of addresses.
func (*Node) GetBestHeight ¶
GetBestHeight returns the node's blockchain best height.
func (*Node) GetLastBlock ¶
GetLastBlock returns the last block (tip) of a chain.
func (*Node) GetPeerInfo ¶
GetPeerInfo returns data about each connected node.
func (*Node) GetRawMempool ¶
GetRawMempool returns the node's mempool transaction ids.
func (*Node) GetTransaction ¶
func (n *Node) GetTransaction(id []byte, reply *GetTransactionResponse) error
GetTransaction returns a transaction given an id.
func (*Node) ListBlocks ¶
ListBlocks returns all the blocks from the blockchain.
func (*Node) RunRPCServer ¶
RunRPCServer starts the node's rpc server.
The listener is returned to call Close when done.