Documentation ¶
Index ¶
- type Client
- func (client Client) AccountInformation(address string, headers ...*Header) (response models.Account, err error)
- func (client Client) AccountList(headers ...*Header) (response models.AccountList, err error)
- func (client Client) AssetInformation(creator string, index uint64, headers ...*Header) (response models.AssetParams, err error)
- func (client Client) Block(round uint64, headers ...*Header) (response models.Block, err error)
- func (client Client) GetPendingTransactions(maxTxns uint64, headers ...*Header) (response models.PendingTransactions, err error)
- func (client Client) HealthCheck(headers ...*Header) error
- func (client Client) LedgerSupply(headers ...*Header) (response models.Supply, err error)
- func (client Client) PendingTransactionInformation(transactionID string, headers ...*Header) (response models.Transaction, err error)
- func (client Client) SendRawTransaction(stx []byte, headers ...*Header) (response models.TransactionID, err error)
- func (client Client) Status(headers ...*Header) (response models.NodeStatus, err error)
- func (client Client) StatusAfterBlock(blockNum uint64, headers ...*Header) (response models.NodeStatus, err error)
- func (client Client) SuggestedFee(headers ...*Header) (response models.TransactionFee, err error)
- func (client Client) SuggestedParams(headers ...*Header) (response models.TransactionParams, err error)
- func (client Client) TransactionByID(transactionID string, headers ...*Header) (response models.Transaction, err error)
- func (client Client) TransactionInformation(accountAddress, transactionID string, headers ...*Header) (response models.Transaction, err error)
- func (client Client) TransactionsByAddr(addr string, first, last uint64, headers ...*Header) (response models.TransactionList, err error)
- func (client Client) TransactionsByAddrForDate(addr string, first, last string, headers ...*Header) (response models.TransactionList, err error)
- func (client Client) TransactionsByAddrLimit(addr string, limit uint64, headers ...*Header) (response models.TransactionList, err error)
- func (client Client) Versions(headers ...*Header) (response models.Version, err error)
- type Header
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 MakeClientWithHeaders ¶
func MakeClientWithHeaders(address string, apiToken string, headers []*Header) (c Client, err error)
MakeClientWithHeaders is the factory for constructing a Client for a given endpoint with additional user defined headers.
func (Client) AccountInformation ¶
func (client Client) AccountInformation(address string, headers ...*Header) (response models.Account, err error)
AccountInformation also gets the AccountInformationResponse associated with the passed address
func (Client) AccountList ¶
func (client Client) AccountList(headers ...*Header) (response models.AccountList, err error)
Accounts gets the AccountList response
func (Client) AssetInformation ¶
func (client Client) AssetInformation(creator string, index uint64, headers ...*Header) (response models.AssetParams, err error)
AssetInformation also gets the AssetInformationResponse associated with the passed asset creator and index
func (Client) GetPendingTransactions ¶
func (client Client) GetPendingTransactions(maxTxns uint64, headers ...*Header) (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, headers ...*Header) (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, headers ...*Header) (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(headers ...*Header) (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, headers ...*Header) (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(headers ...*Header) (response models.TransactionFee, err error)
SuggestedFee gets the recommended transaction fee from the node
func (Client) SuggestedParams ¶
func (client Client) SuggestedParams(headers ...*Header) (response models.TransactionParams, err error)
SuggestedParams gets the suggested transaction parameters
func (Client) TransactionByID ¶
func (client Client) TransactionByID(transactionID string, headers ...*Header) (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, headers ...*Header) (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, headers ...*Header) (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, headers ...*Header) (response models.TransactionList, err error)
TransactionsByAddrForDate 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, headers ...*Header) (response models.TransactionList, err error)
TransactionsByAddrLimit returns the last [limit] number of transaction for a PK [addr].
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. |