Documentation ¶
Index ¶
- type Client
- func (client Client) AccountInformation(address string) (response models.Account, err error)
- func (client Client) Block(round uint64) (response models.Block, err error)
- func (client Client) GetGoRoutines(ctx context.Context) (goRoutines string, err error)
- func (client Client) GetPendingTransactions(maxTxns uint64) (response models.PendingTransactions, err error)
- func (client Client) HealthCheck() error
- func (client Client) LedgerSupply() (response models.Supply, err error)
- func (client Client) PendingTransactionInformation(transactionID string) (response models.Transaction, err error)
- func (client Client) SendRawTransaction(stx []byte) (response models.TransactionID, err error)
- func (client Client) Status() (response models.NodeStatus, err error)
- func (client Client) StatusAfterBlock(blockNum uint64) (response models.NodeStatus, err error)
- func (client Client) SuggestedFee() (response models.TransactionFee, err error)
- func (client Client) SuggestedParams() (response models.TransactionParams, err error)
- func (client Client) TransactionByID(transactionID string) (response models.Transaction, err error)
- func (client Client) TransactionInformation(accountAddress, transactionID string) (response models.Transaction, err error)
- func (client Client) TransactionsByAddr(addr string, first, last uint64) (response models.TransactionList, err error)
- func (client Client) TransactionsByAddrForDate(addr string, first, last string) (response models.TransactionList, err error)
- func (client Client) TransactionsByAddrLimit(addr string, limit uint64) (response models.TransactionList, err error)
- func (client Client) TransactionsByAddrToDate(addr string, toDate string, limit uint64) (response models.TransactionList, err error)
- func (client Client) Versions() (response models.Version, err error)
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 manages the REST interface for a calling user.
func MakeClient ¶
MakeClient is the factory for constructing a Client for a given endpoint
func (Client) AccountInformation ¶
AccountInformation also gets the AccountInformationResponse associated with the passed address
func (Client) GetGoRoutines ¶
GetGoRoutines gets a dump of the goroutines from pprof Not supported
func (Client) GetPendingTransactions ¶
func (client Client) GetPendingTransactions(maxTxns uint64) (response models.PendingTransactions, err error)
GetPendingTransactions asks algod for a snapshot of current pending txns on the node, bounded by maxTxns. If maxTxns = 0, fetches as many transactions as possible.
func (Client) HealthCheck ¶
HealthCheck does a health check on the the potentially running node, returning an error if the API is down
func (Client) LedgerSupply ¶
LedgerSupply gets the supply details for the specified node's Ledger
func (Client) PendingTransactionInformation ¶
func (client Client) PendingTransactionInformation(transactionID string) (response models.Transaction, err error)
PendingTransactionInformation gets information about a recently issued transaction. There are several cases when this might succeed:
- transaction committed (CommittedRound > 0) - transaction still in the pool (CommittedRound = 0, PoolError = "") - transaction removed from pool due to error (CommittedRound = 0, PoolError != "")
Or the transaction may have happened sufficiently long ago that the node no longer remembers it, and this will return an error.
func (Client) SendRawTransaction ¶
func (client Client) SendRawTransaction(stx []byte) (response models.TransactionID, err error)
SendRawTransaction gets the bytes of a SignedTxn and broadcasts it to the network
func (Client) Status ¶
func (client Client) Status() (response models.NodeStatus, err error)
Status retrieves the StatusResponse from the running node the StatusResponse includes data like the consensus version and current round
func (Client) StatusAfterBlock ¶
func (client Client) StatusAfterBlock(blockNum uint64) (response models.NodeStatus, err error)
StatusAfterBlock waits for a block to occur then returns the StatusResponse after that block blocks on the node end
func (Client) SuggestedFee ¶
func (client Client) SuggestedFee() (response models.TransactionFee, err error)
SuggestedFee gets the recommended transaction fee from the node
func (Client) SuggestedParams ¶
func (client Client) SuggestedParams() (response models.TransactionParams, err error)
SuggestedParams gets the suggested transaction parameters
func (Client) TransactionByID ¶
func (client Client) TransactionByID(transactionID string) (response models.Transaction, err error)
TransactionByID gets a transaction by its ID. Works only if the indexer is enabled on the node being queried.
func (Client) TransactionInformation ¶
func (client Client) TransactionInformation(accountAddress, transactionID string) (response models.Transaction, err error)
TransactionInformation gets information about a specific transaction involving a specific account it will only return information about transactions submitted to the node queried
func (Client) TransactionsByAddr ¶
func (client Client) TransactionsByAddr(addr string, first, last uint64) (response models.TransactionList, err error)
TransactionsByAddr returns all transactions for a PK [addr] in the [first, last] rounds range.
func (Client) TransactionsByAddrForDate ¶
func (client Client) TransactionsByAddrForDate(addr string, first, last string) (response models.TransactionList, err error)
TransactionsByAddr returns all transactions for a PK [addr] in the [first, last] date range. Dates are of the form "2006-01-02".
func (Client) TransactionsByAddrLimit ¶
func (client Client) TransactionsByAddrLimit(addr string, limit uint64) (response models.TransactionList, err error)
TransactionsByAddrLimit returns all transactions for a PK [addr] after the given [first] round, with a limit.
func (Client) TransactionsByAddrToDate ¶
func (client Client) TransactionsByAddrToDate(addr string, toDate string, limit uint64) (response models.TransactionList, err error)
TransactionsByAddr returns all transactions for a PK [addr] to the given date, with the given limit. Dates are of the form "2006-01-02".
Directories ¶
Path | Synopsis |
---|---|
Package models defines models used by an algod rest client// IF YOU MODIFY THIS FILE: IMPORTANT In practice, this is straight up copied from /v1/models/model.go.
|
Package models defines models used by an algod rest client// IF YOU MODIFY THIS FILE: IMPORTANT In practice, this is straight up copied from /v1/models/model.go. |