Skip to main content

Query Transactions by Function

Alpha Software

The IOTA SDK is currently in alpha. APIs, interfaces, and behavior may change without notice between releases. It is not yet recommended for production use.

This how-to demonstrates how to query transactions filtered by a specific Move function call using the IOTA SDK's GraphQL client.

Prerequisites

  • The IOTA SDK installed for your target language

Steps

1. Initialize the GraphQL Client

crates/iota-sdk/examples/transactions_with_function.rs
loading...

2. Query Transactions Filtered by Function

Pass a TransactionsFilter with the fully-qualified Move function identifier to fetch matching transactions.

crates/iota-sdk/examples/transactions_with_function.rs
loading...

3. Print the Transaction Digests

Iterate over the results and print each transaction digest.

crates/iota-sdk/examples/transactions_with_function.rs
loading...

Expected Output

Digest: <base58-transaction-digest>
Digest: <base58-transaction-digest>
...
note

The function identifier format is <package>::<module>::<function>.

Full Example

crates/iota-sdk/examples/transactions_with_function.rs
loading...