Assume I have a [Custom Asset] that either or both of it's [Issuer/Distributor] Account(s) [Authorization required] Flag set to True. How can I fetch a list of [Pending Trustlines] for my [Asset] in each corresponding Account in order to verify at any desired time? BTW, I noticed an answer mentioned "trustlines filtering" "https://stellar.stackexchange.com/questions/2844/viewing-trustlines-for-authorization-required-assets-from-an-asset-issuer-perspe" but didn't resolve my issue! Stay Safe V
1 Answer
You should be able to use the Horizon /accounts
endpoint to return all the accounts with trustlines to an asset:
https://www.stellar.org/developers/horizon/reference/endpoints/accounts.html
You can then iterate over that list to find accounts that haven't yet been authorized. (see https://github.com/stellar/go/issues/1938)
-
For those who may visit this thread later, I use "github.com/StellarCN/py-stellar-base", so the appropriate method for this purpose is, stellar-sdk-zh-cn.readthedocs.io/en/latest/… and notice the "pagination" aspect of the outcome in order to not miss a result.– IPENCommented Jul 11, 2020 at 5:57