Documentation ¶
Index ¶
- type Client
- func (n *Client) Close()
- func (n *Client) PostTransaction(tx *ledgerstate.Transaction)
- func (n *Client) RequestBacklog(addr ledgerstate.Address)
- func (n *Client) RequestConfirmedOutput(addr ledgerstate.Address, outputID ledgerstate.OutputID)
- func (n *Client) RequestConfirmedTransaction(addr ledgerstate.Address, txid ledgerstate.TransactionID)
- func (n *Client) RequestTxInclusionState(addr ledgerstate.Address, txid ledgerstate.TransactionID)
- func (n *Client) RequestUnspentAliasOutput(addr *ledgerstate.AliasAddress)
- func (n *Client) Subscribe(addr ledgerstate.Address)
- func (n *Client) Unsubscribe(addr ledgerstate.Address)
- type DialFunc
- type Events
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Events Events // contains filtered or unexported fields }
Client represents the client-side connection to a txstream server
func (*Client) PostTransaction ¶
func (n *Client) PostTransaction(tx *ledgerstate.Transaction)
PostTransaction posts a transaction to the ledger
func (*Client) RequestBacklog ¶
func (n *Client) RequestBacklog(addr ledgerstate.Address)
RequestBacklog requests the backlog for a given address
func (*Client) RequestConfirmedOutput ¶
func (n *Client) RequestConfirmedOutput(addr ledgerstate.Address, outputID ledgerstate.OutputID)
RequestConfirmedOutput requests a specific confirmed output
func (*Client) RequestConfirmedTransaction ¶
func (n *Client) RequestConfirmedTransaction(addr ledgerstate.Address, txid ledgerstate.TransactionID)
RequestConfirmedTransaction requests a specific confirmed transaction
func (*Client) RequestTxInclusionState ¶
func (n *Client) RequestTxInclusionState(addr ledgerstate.Address, txid ledgerstate.TransactionID)
RequestTxInclusionState requests the inclusion state of a transaction
func (*Client) RequestUnspentAliasOutput ¶
func (n *Client) RequestUnspentAliasOutput(addr *ledgerstate.AliasAddress)
RequestUnspentAliasOutput requests the unique unspent alias output for the given AliasAddress
func (*Client) Subscribe ¶
func (n *Client) Subscribe(addr ledgerstate.Address)
Subscribe subscribes to real-time updates for the given address
func (*Client) Unsubscribe ¶
func (n *Client) Unsubscribe(addr ledgerstate.Address)
Unsubscribe unsubscribes the address
type Events ¶
type Events struct { // TransactionReceived is triggered when a transaction message is received from the server TransactionReceived *events.Event // InclusionStateReceived is triggered when an inclusion state message is received from the server InclusionStateReceived *events.Event // OutputReceived is triggered whenever individual output is received OutputReceived *events.Event // UnspentAliasOutputReceived is triggered whenever an unspent AliasOutput is received UnspentAliasOutputReceived *events.Event // Connected is triggered when the client connects successfully to the server Connected *events.Event }
Events contains all events emitted by the Client
Click to show internal directories.
Click to hide internal directories.