Skip to content

Contract identity-registry: add profile completeness score and verification summary accessor #499

@CMI-James

Description

@CMI-James

Background

Account and reputation surfaces need a single contract read that explains how complete a player identity profile is and what verification steps remain.

Feature Focus

Add profile completeness and verification summary accessors to the identity registry contract.

Where to Implement (Exact Targets)

  • contracts/identity-registry/src/lib.rs
  • contracts/identity-registry/src/storage.rs
  • contracts/identity-registry/src/types.rs
  • contracts/identity-registry/src/test.rs

What to Implement

  • Add a completeness accessor that returns a score or structured completion breakdown for the stored identity record.
  • Add a verification summary accessor that reports completed verification dimensions and any pending requirements.
  • Keep data exposure limited to already intended public fields and aggregate indicators.
  • Ensure unknown identities resolve to explicit empty-state responses.

Interface / Endpoint / Method Details

  • Return named fields rather than positional tuples for maintainability.
  • Document how completeness is calculated and how absent fields are represented.
  • Avoid introducing writes or hidden state derivation inside accessors.

Acceptance Criteria

  • Clients can render profile completion UI from a single read path.
  • Unknown identities are handled consistently.
  • Existing registration and verification flows remain unchanged.

Required Tests

  • Unit tests for fully complete, partially complete, and unknown identity cases.
  • Verification summary assertions for mixed completed and pending states.

Definition of Done

  • Accessors are implemented, documented, and tested.
  • Generated docs reflect the updated identity registry interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ContractSmart contract workMediumMedium prioritySorobanSoroban-specific workStellar WaveStellar Wave initiativeenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions