keripy icon indicating copy to clipboard operation
keripy copied to clipboard

Config Traits

Open SmithSamuelM opened this issue 1 year ago • 0 comments

TriatCodex

Need to be consistent. Backers go away in Registrars. But vdr/eventing is using the TraitCodex but it means something else entirely in a TEL Registry versus a KEL. Obviously in a KEL backers may be witnesses, so it can't mean NoBackers. IN a TEL it means no registrar backers. Which go away in verson 2.0 of the ACDC protocol

In general All the ACDC stuff needs to go in its own library not in keripy this should be acdcpy

The new config trait should be

@dataclass(frozen=True) class TraitCodex: """ TraitCodex is codex of inception configuration trait code strings Only provide defined codes. Undefined are left out so that inclusion(exclusion) via 'in' operator works.

"""
EstOnly: str = 'EO'  # Only allow establishment events
DoNotDelegate: str = 'DND'  # Dot not allow delegated identifiers
NoRegistrarBackers: str = 'NRB'  #  Do not allow any registrar backers
RegistrarBackers: str = 'RB' # Registrar backer provided in Registrar seal

def __iter__(self):
    return iter(astuple(self))

TraitDex = TraitCodex() # Make instance

SmithSamuelM avatar Feb 08 '24 21:02 SmithSamuelM