Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 1.33 KB

04.md

File metadata and controls

33 lines (26 loc) · 1.33 KB

VIP-04: Role

This event is used to create and update the roles of an entity.

Role can be any personnel or sub-entity that belongs to the main entity. A role is represented by a rootkey. For now we only support rootkey in the form of a zkID DID or an ETH address (automatically prefixed with did:zk:). The rootkey format (prefix and length) will be checked when a relay receives the role event. If the format check fails, the event will be discarded by the server and it will NOT be stored in Arweave.

Kind: 2: set_role

Tags:

  • n for the role_name.
  • r for the role_rootkey.

Content: comments for this role setup.

Example:

{
  "kind": 2,
  "rootkey": <32-bytes hex-encoded rootkey of the event creator>,
  "tags": [
    ["n", "event-attester"],
    ["r", "did:zk:0x2F460e375d0C657CfAeF5f486bA72A989ee41234"],
  ],
  "content": "This role is used for community event attestation.",
  ...other fields
}

Notes:

  • When a relay receives a new set_role event for the same role of the same rootkey, it will update the rootkey of that role.
  • Max length of role_name is 200 bytes. The length of key_content is 49 bytes.
  • role_name only supports ASCII lower case letters, numbers - and _.

IMPORTANT: the key_name and role_name share the same naming space. A key_name CANNOT be the same as a role_name.