What is the best way to get all children of a certain transaction using any of the IOTA libraries/the IOTA API?
By children of a transaction, I mean all transactions that directly reference it.
1 Answer
Call findTransactions
and pass the hash of the "certain" transaction in the approvees
parameter:
curl http://localhost:14265 \
-X POST \
-H 'Content-Type: application/json' \
-H 'X-IOTA-API-Version: 1' \
-d '{"command": "findTransactions", "approvees": ["YOUR9HASH9HERE9..."]}'
All IOTA libraries (Java, JS, Go, etc.) provide a convenience method with the same name and parameters.