Profiles
What are profiles?
Profiles represent a symbolic collection of data that a user and decided to group for a similar intent. When working with Vivid as an integrator, your primary access point for user data is through a profile which can consist of a number of components which contain both verified and unverified data.
{
"jsonrpc": "2.0",
"result": {
"profile": {
"profile_id": "PB6W7-k2mB-Hwn9",
"remark": "my profile",
"sections": [
{
"label": "",
"components": [
{
"attr_type": "email",
"attr_id": "KjQsH8068xiPloXd",
"payload": {
"is_primary": 1,
"created_date": 1589688868,
"edited_date": 1589688868,
"email": "[email protected]"
},
"claims": [
{
"claim_id": "4zmRk6XPLRnsvohx",
"claim_state": "verified"
}
]
},
{
"attr_type": "social_link",
"attr_id": "U5LlfBPWoKq8IJCK",
"payload": {
"is_primary": 0,
"created_date": 1589747528,
"handle": "lllwvlvwlll",
"associated_url": "https://github.com/lllwvlvwlll",
"association": "github"
},
"claims": [
{
"claim_id": "ToO0Z2QO5K82Ufpx",
"claim_state": "verified"
}
]
},
{
"attr_type": "social_link",
"attr_id": "nv3limDaQ3ahyrtU",
"payload": {
"is_primary": 0,
"created_date": 1589747583,
"handle": "12160715",
"associated_url": "https://stackoverflow.com/users/12160715",
"association": "stackoverflow"
},
"claims": [
{
"claim_id": "ZAqNIyi36rEpky97",
"claim_state": "verified"
}
]
}
]
}
],
"seed": "83f8dfc4b6c145bb0d7f634455cf9262cbc11fb0702c17c67742289666bbc20b8a7552951de376c22e6191985a0c9831609256b450b48829a9a8480a18533ca6",
"profile_type": "personal_profile"
}
},
"id": "DGjYW8QTNtf3k2T"
}
Attributes
Attributes represent one of the three atomic components within the Vivid ecosystem. They hold content-rich information about an entity which can be used to enhance the experience of your application. Attributes are stored off-chain and should be considered unverified unless there is a claim attached. In the example below, this email attribute has an attached claim which is in the “verified” state indicating that its complete.
{
"attr_type": "email",
"attr_id": "KjQsH8068xiPloXd",
"payload": {
"is_primary": 1,
"created_date": 1589688868,
"edited_date": 1589688868,
"email": "[email protected]"
},
"claims": [
{
"claim_id": "4zmRk6XPLRnsvohx",
"claim_state": "verified"
}
]
}
Claims
A claim represents content which has been verified within the Vivid ecosystem by a verification provider (like Vivid). It consists of cryptographically verifiable header and payload which makes a statement about a subject. The claim payload
consists of a series of attestations, which are statements that are contextually relevent to eachother.
Claim content is stored on the blockchain in a self-sovereign nature,
guaranteeing security and control over the sensitive information. Claims and Attributes have a many-many relationship.
For example, a single claim consisting of passport information may act as the verified
entity for many different attributes (name, birthday, country of residence etc..).
Conversely, a user may have multiple claims which provide verification of the same attribute (like name verification with a passport and driver’s license).
Claim Topics
Depending on the claim type and needs of the verifier and end-user, each attestation can be secured independently using a broad array of secure measures ranging from raw text to off-chain pointers. The security profile is selected by the claim issuer for each.
Each profile provides a BIP39 seed for the profile identity which can be used to access the claims it contains. In the case of the claim and profile presented above, we can access and verify the claim as follows:
import { vivid } from '@Moonlight-io/asteroid-sdk-js'
const seed = "83f8dfc4b6c145bb0d7f634455cf9262cbc11fb0702c17c67742289666bbc20b8a7552951de376c22e6191985a0c9831609256b450b48829a9a8480a18533ca6"
const claimId = "4zmRk6XPLRnsvohx"
const claim = await vivid.getDecryptedClaim(claimId, seed)
//to be defined