The Clover.Protocols
  • The Clover.Protocols
    • Introduction to the Clover.Protocols
    • Governance for Social Organizations
    • Associating Assets with Social Interactions
    • Digital Social Assets
    • Organizational Transparency and Trust
  • Key Concepts
    • Social Organization
    • Social Infrastructure Layer
    • Sovereign DAO
    • Social Scenario
    • Social Element
    • SEI: Social Element Identifier
    • Digital Social Asset
    • Universal Tags
    • Social Index Service
    • Validation of Agent and Platform Certificates and Signatures
    • Audit Standards for Social Smart Contracts
Powered by GitBook
On this page
  • Social Element Identifier
  • SEI & DID
  • SEI & Decentralized Name Service
  • How an SEI Obtains the Corresponding Social Element Information
  1. Key Concepts

SEI: Social Element Identifier

PreviousSocial ElementNextDigital Social Asset

Last updated 6 months ago

Social Element Identifier

The Social Element Identifier (SEI) is a protocol specifically designed for identifying social elements. The existing Decentralized Identifier (DID) protocol assigns an immutable ID to each element. While the data associated with a DID can be stored off-chain, the DID itself must be recorded on the blockchain, which incurs certain costs. Given the significant costs associated with storing information on the blockchain, it is not economically feasible to store all content generated by a social organization in this manner.

Instead, we connect off-chain social elements to tokenized assets, enabling these elements to initiate asset transactions within a social context. Many social elements are currently stored off-chain; therefore, our protocols introduce SEIs to facilitate the identification of off-chain elements when interacting with on-chain contracts. This ensures that interactions involving on-chain elements are both SEI and DID compatible.

To establish this effective link, each social element is assigned an SEI, a string that uniquely identifies a specific social element. The specific composition of an SEI is demonstrated below:

Component
Description

Prefix

All Clover SEIs start with the prefix SEI

Domain

A platform name with unique identifier, or a DID

Element Type Identifier

UserProfile: user

Post: post

Chat: chat

Group: group

Community: community

Message: message

Livestreaming: live

Activity: activity

Comment: comment

Element ID

The unique ID of the element

sei:<Domain>:<Element Type Identifier>:<Element ID> constitutes a complete SEI. Some examples are below:

  • User Profile: sei:clover.space:user:12345887737123

  • Post: sei:clover.space:post:1231783164781283

  • Message: sei:clover.space:message:47293749762361

Using a unique SEI allows us to easily bind social elements to smart contract interactions.

SEI & DID

According to the , a user can be represented by their Decentralized Identifier (DID). As SEI is DID-compatible, if a user is represented by their DID, we may express that user using the following template:

  • sei:<did>

  • Where <did> is a complete DID string containing the did URI scheme identifier, as shown in the following format:

Acquisition of a DID is handled by the DID provider. For more details, please refer to DID specifications and associated provider agreements.

SEI & Decentralized Name Service

Decentralized Name Services, such as the Ethereum Name Service (ENS) and BNB Name Service, aim to enhance the reading of and the use of addresses by offering services akin to the traditional DNS. SEI plans to support these decentralized Name Service protocols, ensuring compatibility with existing solutions.

Our protocol's SEI supports the ENS format, utilizing the syntax <SEI>:<ENS>. When it is identified that an SEI domain is in the ENS format, our protocol automatically recognizes this and queries the relevant services in an effort to retrieve the data mapped by ENS.

  • Format: <SEI>:<ENS>

  • Example: sei:subdomian.nick.eth

How an SEI Obtains the Corresponding Social Element Information

To allow any application to display social elements, apps supporting our protocols can return social element data corresponding to an SEI using a data access API.

  • Agreed API

    • https://domain/sei?sei=urlencode(<sei>)

  • Data Returned:

Field
Type
Description

status

int8

Status:

1: Success

101: Associated social element not found

102: Information not public

103: Other error

sei

string

Requested SEI

element

object

Specific social element data, returned when status=1

chainInfo

object

Blockchain related information:{ "chainId": Chain ID, "contractAddress": Contract Address}

This is the blockchain data associated with the returned social element. If there is none, it is not returned. It is used primarily for contracts, posts, and messages. When social elements are returned, then any contract information can also be returned.

nonce

int64

Random integer (related to signature)

signature

string

The signature with subject "<sei>|nonce" is a string containing the entire SEI.

The data is signed by the organization specified in the domain section, who guarantees trust and authenticity.

  • When an element returns information, it returns its basic fields in accordance with the following:

Field
Type
Required
Description

id

string

Yes

Social element ID

type

string

Yes

UserProfile: user

Post: post

Chat: chat

Group: group

Community: community

Message: message

Live streaming: live

Activity:activity

Comment: comment

image

string

No

Image address, if type=user, then this is a required field

name

string

No

Name, if type=user, chat, group, community, live, or activity then this is a required field

content

string

No

The content of the post, message, etc.

The following is an SEI request that returns user data:

// user example
{
    "status": 1,
    "sei": "sei:clover.space:user:1236465788746889931",
    "element": {
        "id": "1236465788746889931",
        "type": "user",
        "image": "https://clover.space/p/296429520384023842165927850.webp",
        "name": "Utaiu",
    },
    "nonce": 1710756874,
    "signature": "MGUCMC57rvo92gCigOSl1OvP1ROFv1zS0l6wSsIvzWzxT3h027VwzGBCSR/AsLgWhEXQUQIxAM5bI61tA0LvCWn3GM8p48E5OxsYRKE869ekejXfzt6vt42i51OsyTgksAT6vL48oA=="// sei:clover.space:user:1236465788746889931|1710756874
}

is a decentralized, open, and scalable naming protocol built on the Ethereum blockchain. It assigns human-friendly names like 'alice.eth' to machine-readable identifiers, including Ethereum addresses, addresses of other cryptocurrencies, content hashes, metadata, and more. Additionally, ENS enables 'reverse resolution,' allowing for the association of metadata, such as canonical names or interface descriptions, with Ethereum addresses, thereby enriching the blockchain's usability and interactivity.

For more information, please see .

W3C DID standard
ENS (Ethereum Name Service)
Validation of Agent and Platform Certificates and Signatures