Skip to content

Merge identity/pubkey "conversion" trait into one

Currently we have two traits to perform accountid ←→ identityindex "conversion".

IdtyIdOf: Convert<Self::AccountId, Option<Self::IdtyIndex>>;
OwnerKeyOf: Convert<Self::IdtyIndex, Option<Self::AccountId>>;

This is not really a conversion and I see no case where we should be able to go in one way but not in the other.

We could merge this in a single trait like

IdtyAttr: Idty<Self::IdtyIndex, Self::AccountId>

trait Idty {
  fn owner_key(index: IdtyIndex) -> Option<AccountId>
  fn idty_index(owner_key: AccountId) -> Option<IdtyIndex>
}
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information