Skip to main content

Get Properties

Get Properties

This guide demonstrates how to retrieve properties from a federation using the offchain API.

Prerequisites

  • An existing hierarchy on the IOTA network
  • A funded client with write access
  • A federation with statements already added

Overview

The get statements API allows you to retrieve all federation properties.

1. Set Up Client

Initialize a funded client to interact with the Hierarchies:

hierarchies-rs/examples/validation/03_get_properties.rs
loading...

2. Create Federation

Create a new Federation to add properties to:

hierarchies-rs/examples/validation/03_get_properties.rs
loading...

3. Add First Property

Add the first Property to the Federation:

hierarchies-rs/examples/validation/03_get_properties.rs
loading...

4. Add Multiple Properties (Optional)

You can add multiple Properties s to a Federation. Here's an example of adding a second statement with a multi-level name:

hierarchies-rs/examples/validation/03_get_properties.rs
loading...

5. Retrieve Properties

Get all Properties from the Federation:

hierarchies-rs/examples/validation/03_get_properties.rs
loading...

Key Points

  • Federation Properties: The retrieved data includes all federation properties
  • Multiple Properties: Federations can contain multiple properties with different names and values
  • Multi-level Names: Property name can have multiple levels (e.g., ["Example LTD 2", "Example LTD 3"])
  • Read-Only Access: Retrieving properties only requires read access to the hierarchy

Full Example Code

hierarchies-rs/examples/validation/03_get_properties.rs
loading...