summaryrefslogtreecommitdiff
path: root/daemon/algod/api/client/restClient.go
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/algod/api/client/restClient.go')
-rw-r--r--daemon/algod/api/client/restClient.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/daemon/algod/api/client/restClient.go b/daemon/algod/api/client/restClient.go
index beab935e7..626bec0b7 100644
--- a/daemon/algod/api/client/restClient.go
+++ b/daemon/algod/api/client/restClient.go
@@ -328,6 +328,10 @@ func (client RestClient) LedgerSupply() (response v1.Supply, err error) {
return
}
+type pendingTransactionsByAddrParams struct {
+ Max uint64 `url:"max"`
+}
+
type transactionsByAddrParams struct {
FirstRound uint64 `url:"firstRound"`
LastRound uint64 `url:"lastRound"`
@@ -359,6 +363,12 @@ func (client RestClient) TransactionsByAddr(addr string, first, last, max uint64
return
}
+// PendingTransactionsByAddr returns all the pending transactions for a PK [addr].
+func (client RestClient) PendingTransactionsByAddr(addr string, max uint64) (response v1.PendingTransactions, err error) {
+ err = client.get(&response, fmt.Sprintf("/v1/account/%s/transactions/pending", addr), pendingTransactionsByAddrParams{max})
+ return
+}
+
// AssetInformation gets the AssetInformationResponse associated with the passed asset index
func (client RestClient) AssetInformation(index uint64) (response v1.AssetParams, err error) {
err = client.get(&response, fmt.Sprintf("/v1/asset/%d", index), nil)