Skip to main content

Add Properties

Add Properties

This guide demonstrates how to add properties to a federation.

Prerequisites

  • An existing federation on the IOTA network
  • Root authority permissions on the federation
  • A funded client with write access

Overview

Properties define the types of claims that can be made within a federation. They specify the allowed values and conditions for attestations and accreditations.

1. Set Up Client

Initialize a funded client to interact with the hierarchy:

hierarchies-rs/examples/03_add_properties.rs
loading...

2. Create Federation

Create a new Federation (or use an existing one):

hierarchies-rs/examples/03_add_properties.rs
loading...

3. Define Property

Create a property name and define allowed values:

hierarchies-rs/examples/03_add_properties.rs
loading...

4. Add Property to Federation

Add the Property with its allowed values to the Federation:

hierarchies-rs/examples/03_add_properties.rs
loading...

5. Verify Property Addition

Retrieve the updated federation and verify the property was added:

hierarchies-rs/examples/03_add_properties.rs
loading...

Key Points

  • Property Names: Can be simple strings or multi-level hierarchical names
  • Allowed Values: Define the valid values that can be used in attestations
  • Multiple Values: Properties can have multiple allowed values
  • Immutable: Once added, properties cannot be removed, only new values can be added

Full Example Code

hierarchies-rs/examples/03_add_properties.rs
loading...