Documentation ¶
Index ¶
- type Client
- func (c *Client) Block(revision string) (blocks *blocks.JSONCollapsedBlock, err error)
- func (c *Client) ChainTag() (byte, error)
- func (c *Client) ExpandedBlock(revision string) (blocks *blocks.JSONExpandedBlock, err error)
- func (c *Client) FilterEvents(req *events.EventFilter) ([]events.FilteredEvent, error)
- func (c *Client) FilterTransfers(req *transfers.TransferFilter) ([]*transfers.FilteredTransfer, error)
- func (c *Client) RawHTTPClient() *httpclient.Client
- func (c *Client) RawTransaction(id *thor.Bytes32, opts ...Option) (*transactions.RawTransaction, error)
- func (c *Client) SendRawTransaction(rlpTx []byte) (*transactions.SendTxResult, error)
- func (c *Client) SendTransaction(tx *tx.Transaction) (*transactions.SendTxResult, error)
- func (c *Client) Transaction(id *thor.Bytes32, opts ...Option) (*transactions.Transaction, error)
- func (c *Client) TransactionReceipt(id *thor.Bytes32, opts ...Option) (*transactions.Receipt, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents the VeChainThor client, allowing communication over HTTP and WebSocket.
func (*Client) Block ¶
func (c *Client) Block(revision string) (blocks *blocks.JSONCollapsedBlock, err error)
Block retrieves a block by its revision.
func (*Client) ExpandedBlock ¶
func (c *Client) ExpandedBlock(revision string) (blocks *blocks.JSONExpandedBlock, err error)
ExpandedBlock retrieves an expanded block by its revision.
func (*Client) FilterEvents ¶
func (c *Client) FilterEvents(req *events.EventFilter) ([]events.FilteredEvent, error)
FilterEvents filters events based on the provided filter request.
func (*Client) FilterTransfers ¶
func (c *Client) FilterTransfers(req *transfers.TransferFilter) ([]*transfers.FilteredTransfer, error)
FilterTransfers filters transfers based on the provided filter request.
func (*Client) RawHTTPClient ¶
func (c *Client) RawHTTPClient() *httpclient.Client
RawHTTPClient returns the underlying HTTP client.
func (*Client) RawTransaction ¶
func (c *Client) RawTransaction(id *thor.Bytes32, opts ...Option) (*transactions.RawTransaction, error)
RawTransaction retrieves the raw transaction data by its ID.
func (*Client) SendRawTransaction ¶
func (c *Client) SendRawTransaction(rlpTx []byte) (*transactions.SendTxResult, error)
SendRawTransaction sends a raw RLP-encoded transaction to the blockchain.
func (*Client) SendTransaction ¶
func (c *Client) SendTransaction(tx *tx.Transaction) (*transactions.SendTxResult, error)
SendTransaction sends a signed transaction to the blockchain.
func (*Client) Transaction ¶
func (c *Client) Transaction(id *thor.Bytes32, opts ...Option) (*transactions.Transaction, error)
Transaction retrieves a transaction by its ID.
func (*Client) TransactionReceipt ¶
func (c *Client) TransactionReceipt(id *thor.Bytes32, opts ...Option) (*transactions.Receipt, error)
TransactionReceipt retrieves the receipt for a transaction by its ID.
Directories ¶
Path | Synopsis |
---|---|
Package httpclient provides an HTTP client to interact with the VeChainThor blockchain.
|
Package httpclient provides an HTTP client to interact with the VeChainThor blockchain. |