client

package
v4.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2024 License: MIT Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEntryFromRPCData

func NewEntryFromRPCData(id types.Hash, buf []byte, json *daemon.TransactionJSON) *mempool.Entry

NewEntryFromRPCData TODO

func SetDefaultClientSettings

func SetDefaultClientSettings(addr string)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client

func GetDefaultClient

func GetDefaultClient() *Client

func NewClient

func NewClient(address string) (*Client, error)

func (*Client) GetBlock

func (c *Client) GetBlock(hash types.Hash, ctx context.Context) (*daemon.GetBlockResult, error)

func (*Client) GetBlockByHeight

func (c *Client) GetBlockByHeight(height uint64, ctx context.Context) (*daemon.GetBlockResult, error)

func (*Client) GetBlockHeaderByHash

func (c *Client) GetBlockHeaderByHash(hash types.Hash, ctx context.Context) (*daemon.BlockHeader, error)

func (*Client) GetBlockHeaderByHeight

func (c *Client) GetBlockHeaderByHeight(height uint64, ctx context.Context) (*daemon.GetBlockHeaderByHeightResult, error)

func (*Client) GetBlockHeadersRangeResult

func (c *Client) GetBlockHeadersRangeResult(start, end uint64, ctx context.Context) (*daemon.GetBlockHeadersRangeResult, error)

func (*Client) GetBlockTemplate

func (c *Client) GetBlockTemplate(address string) (*daemon.GetBlockTemplateResult, error)

func (*Client) GetCoinbaseTransaction

func (c *Client) GetCoinbaseTransaction(txId types.Hash) (*transaction.CoinbaseTransaction, error)

func (*Client) GetInfo

func (c *Client) GetInfo() (*daemon.GetInfoResult, error)

func (*Client) GetLastBlockHeader

func (c *Client) GetLastBlockHeader() (*daemon.GetLastBlockHeaderResult, error)

func (*Client) GetMinerData

func (c *Client) GetMinerData() (*daemon.GetMinerDataResult, error)

func (*Client) GetOutputIndexes

func (c *Client) GetOutputIndexes(id types.Hash) (indexes []uint64, err error)

GetOutputIndexes Get global output indexes for a given transaction

func (*Client) GetOuts

func (c *Client) GetOuts(inputs ...uint64) ([]Output, error)

func (*Client) GetPeerList

func (c *Client) GetPeerList() (*daemon.GetPeerListResult, error)

func (*Client) GetTransactionInputs

func (c *Client) GetTransactionInputs(ctx context.Context, hashes ...types.Hash) ([]TransactionInputResult, error)

GetTransactionInputs get transaction input information for several transactions, including key images and global key offsets

func (*Client) GetTransactions

func (c *Client) GetTransactions(txIds ...types.Hash) (data [][]byte, jsonTx []*daemon.TransactionJSON, err error)

func (*Client) GetVersion

func (c *Client) GetVersion() (*daemon.GetVersionResult, error)

func (*Client) SetThrottle

func (c *Client) SetThrottle(timesPerSecond uint64)

func (*Client) SubmitBlock

func (c *Client) SubmitBlock(blob []byte) (*daemon.SubmitBlockResult, error)

type Output

type Output struct {
	GlobalOutputIndex uint64     `json:"global_output_index"`
	Height            uint64     `json:"height"`
	Timestamp         uint64     `json:"timestamp"`
	Key               types.Hash `json:"key"`
	Mask              types.Hash `json:"mask"`
	TransactionId     types.Hash `json:"tx_id"`
	Unlocked          bool       `json:"unlocked"`
}

type TransactionInput

type TransactionInput struct {
	Amount     uint64     `json:"amount"`
	KeyOffsets []uint64   `json:"key_offsets"`
	KeyImage   types.Hash `json:"key_image"`
}

type TransactionInputResult

type TransactionInputResult struct {
	Id         types.Hash         `json:"id"`
	UnlockTime uint64             `json:"unlock_time"`
	Inputs     []TransactionInput `json:"inputs"`
}

Directories

Path Synopsis
rpc
Package rpc provides a client that's able to communicate with a `monerod` daemon via its RPC interfaces.
Package rpc provides a client that's able to communicate with a `monerod` daemon via its RPC interfaces.
daemon
Package daemon provides a client that encapsulates RPC methods and endpoints that can be hit in a daemon.
Package daemon provides a client that encapsulates RPC methods and endpoints that can be hit in a daemon.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL