Skip to content

Instantly share code, notes, and snippets.

@abuiles
Created February 5, 2020 21:20
Show Gist options
  • Save abuiles/e1f77b5aedbee96f2f6e5e0922e32379 to your computer and use it in GitHub Desktop.
Save abuiles/e1f77b5aedbee96f2f6e5e0922e32379 to your computer and use it in GitHub Desktop.
// AccountRequest contains data for making requests to the accounts
// endpoint of a horizon server.
//
// To fetch information for a single account:
// - Set `AccountID` to retrieve `AccountDetail`.
// - Set `AccountID` and `DataKey` to retrieve `AccountData`.
//
// To fetch information for multiple accounts:
// - Set `ForSigner` to retrieve all the `AccountDetail` who have the
// given account as a signer.
// - Set `ForAsset` to retrieve all the `AccountDetail` who have a
// trustline to the given asset.
//
// When fetching multiple accounts, a filter must be specified and it is
// not possible to specify both `ForSigner` and `ForAsset` at the same
// time.
type AccountRequest struct {
AccountID string
DataKey string
ForSigner string
ForAsset string
Order Order
Cursor string
Limit uint
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment