1

From an asset holder perspective seeing which trustlines are approved or unapproved for authorization required assets is straightforward - we can see this with the is_authorized boolean on the account balances which is very useful.

My question is: Can we do this from an asset issuer perspective? Ideally I would like to get a list of accounts that are authorized to hold your asset and also a list of accounts that have "applied" for a trustline to hold your asset via Horizon.

We can of course stream the incoming trustlines but I am looking for a way to handle any missed trustlines that doesn't require human intervention.

2

Good timing! In the upcoming Horizon release (0.23) we added trustlines filtering. From the doc:

This endpoint allows filtering accounts who have a given signer or have a trustline to an asset. The result is a list of accounts.

To find all accounts who are trustees to an asset, pass the query parameter asset using the canonical representation for an issued assets which is Code:IssuerAccountID. Read more about canonical representation of assets in SEP-0011.

Note: This endpoint is still experimental and available only if Horizon is running the new ingestion system.

| improve this answer | |
  • That's great news. I haven't tried out the new ingestion system yet so I'll give it a whirl on our test network. Will this endpoint also return accounts that have not yet had the allow trust operation submitted to the network? The doc is missing the "is_authorized" field from the balances but I presume I would get a list of trustees and could then iterate over the list checking that bool? – Owen Nov 15 '19 at 2:02
  • I think we could potentially support both. Feature request raised here: github.com/stellar/go/issues/1938 – ire_and_curses Nov 15 '19 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.