Skip to main content

Revoke Accreditation to Attest

Revoke Accreditation to Attest

This guide demonstrates how to revoke a accreditation to attest to given Property

Prerequisites

  • An existing federation with issued accreditations
  • Root authority or appropriate accreditations to revoke accreditations
  • A funded client with write access

Overview

Revoking accreditations to attest removes the ability for a receiver to create attestations for specific Properties. This is essential for managing permissions within a hierarchy.

1. Set Up Client and Federation

Initialize a client and create a federation with Properties:

hierarchies-rs/examples/05_revoke_accreditation_to_attest.rs
loading...

2. Create Accreditation to Attest

Issue an accreditation to a receiver that will later be revoked:

hierarchies-rs/examples/05_revoke_accreditation_to_attest.rs
loading...

3. Verify Accreditation Exists

Confirm the accreditation was successfully created:

hierarchies-rs/examples/05_revoke_accreditation_to_attest.rs
loading...

4. Revoke the Accreditation

Revoke the accreditation using its ID:

hierarchies-rs/examples/05_revoke_accreditation_to_attest.rs
loading...

5. Verify Revocation

Confirm the accreditation has been successfully revoked:

hierarchies-rs/examples/05_revoke_accreditation_to_attest.rs
loading...

Key Points

  • Permission ID Required: You need the specific accreditation ID to revoke it
  • Immediate Effect: Revocation takes effect immediately on-chain
  • Irreversible: Once revoked, the same accreditation cannot be restored (a new one must be created)
  • Authority Required: Only those with appropriate permissions can revoke accreditations

Full Example Code

hierarchies-rs/examples/05_revoke_accreditation_to_attest.rs
loading...