Documentation ¶
Index ¶
- type Block
- type Client
- func (c *Client) Commit(ctx context.Context, data []byte) (string, error)
- func (c *Client) GetBalance(ctx context.Context, address string) (string, error)
- func (c *Client) GetBlockByHeight(ctx context.Context, height int64) (*Block, error)
- func (c *Client) GetBlockByID(ctx context.Context, blockID string) (*Block, error)
- func (c *Client) GetCurrentBlock(ctx context.Context) (*Block, error)
- func (c *Client) GetData(ctx context.Context, txID string) (string, error)
- func (c *Client) GetInfo(ctx context.Context) (*NetworkInfo, error)
- func (c *Client) GetPeers(ctx context.Context) ([]string, error)
- func (c *Client) GetPendingTransactions(ctx context.Context) ([]string, error)
- func (c *Client) GetReward(ctx context.Context, data []byte) (string, error)
- func (c *Client) GetRewardV2(ctx context.Context, data []byte, target string) (string, error)
- func (c *Client) GetTransaction(ctx context.Context, txID string) (*tx.Transaction, error)
- func (c *Client) GetTransactionAnchor(ctx context.Context) (string, error)
- func (c *Client) GetTransactionField(ctx context.Context, txID string, field string) (string, error)
- func (c *Client) LastTransaction(ctx context.Context, address string) (string, error)
- type NetworkInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { HashList []string `json:"hash_list"` Nonce string `json:"nonce"` PreviousBlock string `json:"previous_block"` Timestamp int `json:"timestamp"` LastRetarget int `json:"last_retarget"` Diff interface{} `json:"diff"` Height int `json:"height"` Hash string `json:"hash"` IndepHash string `json:"indep_hash"` Txs []interface{} `json:"txs"` WalletList interface{} `json:"wallet_list"` RewardAddr string `json:"reward_addr"` Tags []interface{} `json:"tags"` RewardPool interface{} `json:"reward_pool"` WeaveSize interface{} `json:"weave_size"` BlockSize interface{} `json:"block_size"` }
Block struct
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client struct
func (*Client) GetBalance ¶
GetBalance requests the current balance of an address
func (*Client) GetBlockByHeight ¶
GetBlockByHeight requests a block by its height
func (*Client) GetBlockByID ¶
GetBlockByID requests a block by its id
func (*Client) GetCurrentBlock ¶
GetCurrentBlock requests the latest block of the weave
func (*Client) GetInfo ¶
func (c *Client) GetInfo(ctx context.Context) (*NetworkInfo, error)
GetInfo requests the information of a node
func (*Client) GetPendingTransactions ¶
GetTransaction requests the information of a transaction
func (*Client) GetRewardV2 ¶
func (*Client) GetTransaction ¶
GetTransaction requests the information of a transaction
func (*Client) GetTransactionAnchor ¶
type NetworkInfo ¶
type NetworkInfo struct { Network string `json:"network"` Version int `json:"version"` Release int `json:"release"` Height int `json:"height"` Current string `json:"current"` Blocks int `json:"blocks"` Peers int `json:"peers"` QueueLength int `json:"queue_length"` NodeStateLatency int `json:"node_state_latency"` }
NetworkInfo struct
Click to show internal directories.
Click to hide internal directories.