5

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.

Helmar
  • 1,293
  • 1
  • 15
  • 28
Zauz
  • 4,454
  • 15
  • 42

1 Answers1

4

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.

mihi
  • 7,324
  • 2
  • 15
  • 34