Open ig-shaun opened 3 years ago
For entities of type assets
(generally NFTs), to enable chain execution of the token's properties and services, we would place the token class and related token information in-line within the entity document linkedResource
property, as per the following example:
{
"linkedResource":[
{
"tokens":{
"@context":"https://w3.org/tokens/specification/v1",
"token":[
{
"type":"class",
"id":"did:ixo:tokens#rec2020",
"name":"Renewable Energy Certificates 2020",
"mutable":"false"
},
{
"type":"collection",
"id":"did:ixo:tokens#rec2020/did:ixo:tokens#JanuaryREC2020",
"name":"RECs created in January 2020",
"mutable":"false"
},
{
"type":"denom",
"id":"did:ixo:tokens#REC2020",
"name":"REC2020",
"mutable":"false"
},
{
"type":"supply",
"id":"",
"supply":{
"supplyMin":0,
"supplyMax":1000
},
"decimals":0,
"mutable":"false"
},
{
"type":"behaviours",
"behaviour":[
{
"type":"mintable",
"id":"...#",
"controlMessageName":"msgMintNFT",
"endpoint":"#",
"mutable":"false",
"caveats":""
}
]
}
The linkedResource
settings document has the structure:
{
"@context":"https://w3.org/ixo/entity/settings/v1"
"type:"entitySettings",
"id":"",
"@type": "Project",
"name": "Some Title",
"description": "Some Short Description",
"image": {
"id":"sbujb0xg0dgkeljwtnc",
"name":"",
"imageDescription": "Some Image Description"
},
"logo": {
"id":"123",
"name":""},
"brand": "Brand Identity Name",
"location": "AR",
"sdgs": ["5", "7"],
"terms": [
{
"type": "OnceOffFee",
"id":"",
"paymentTemplateId": "did:ixo:CYCc2xaJKrp8Yt947Nc6jd4"
},
"privacy":
{
"pageView": "Private",
"entityView": "Visible",
"parentCapability": "",
"creator": {
"id": "did:ixo:CYCc2xaJKrp8Yt947Nc6jd1",
"displayName": "Creator Display Name",
"location": "AD",
"email": "name@email.com",
"website": "https://website.com",
"mission": "Some mission",
"credentialId": "did:ixo:CYCc2xaJKrp8Yt947Nc6jd2",
"logo":
{
"id":"123",
"name":""},
"owner": {
"displayName": "Owner Display Name",
"location": "AQ",
"email": "name@email.com",
"website": "https://website.com",
"mission": "Tagline description",
"logo": {
"id":"123",
"name":""
},
"ddoTags": [
{
"category": "Project Type",
"tags": ["Index", "Accreditation", "Accountability", "Insurance Bond"]
}
],
"displayCredentials": {
"@context": "https://www.w3.org/2018/credentials/v1",
"items": [
{ "type":"",
"id":"",
"credential": "somecredential1",
"badge": "https://badge.com" },
]
},
"entityClaims": {
"@context": "https://schema.ixo.world/entity_claims:3r08webu2eou",
"items": [
{
"type":"outcome"
"id": "did:ixo:DrweDe4r34ddowkkmd",
"visibility": "Private",
"title": "Claim Title",
"description": "Claim Description 1",
"targetMin": 23,
"targetMax": 45,
"goal": "Goal description",
"startDate": "2020-09-25T00:00:00.000Z",
"endDate": "2020-10-22T00:00:00.000Z",
"agents": [
{ "role": "PO",
"parentCapability": "",
"autoApprove": true }
],
"claimEvaluation": [
{
"@context": "https://schema.indicators.org",
"id": "URIlinktoResource",
"methodology": "methodology description",
"attributes": ["attr1", "attr2"]
}
],
"claimApproval": [
{
"@context": "https://schema.serviceprovider.org/approval_criteria",
"id": "URIlinktoResource",
"criteria": [
{ "condition": "condition1", "attribute": "criteria1" },
{ "condition": "condition2", "attribute": "criteria2" }
]
}
],
"claimEnrichment": [
{
"type":"",
"id": "ttps://schema.valueadd.com/",
"resources": [
{
"type":"",
"id":"",
"resource": "resource description" }
]
}
]
},
"linkedEntities": [
{ "type": "investment", "id": "did:ixo:CYCc2xaJKrp8Yt947Nc6jdqq" },
{ "type": "oracle", "id": "did:ixo:CYCc2xaJKrp8Yt947Nc6jdtt" }
],
"fees": {
"@context": "https://schema.ixo.world/fees/ipfs3r08webu2eou",
"type:"fees",
"id":"",
"items": [{ "type": "RentalFee", "id": "did:sov:CYCc2xaJKrp8Yt947Nc6jdff" }]
},
"stake": {
"@context": "https://schema.ixo.world/staking/ipfs3r08webu2eou",
"type":"stake",
"items": [
{
"type": "PerformanceGuarantee",
"id": "did:ixo:CYCc2xaJKrp8Yt947Nc6jdvv",
"denom": "IXO",
"stakeAddress": "abcccsdfsdfdsfdsfsdf",
"minStake": 12,
"slashCondition": "FailedDispute",
"slashFactor": 45,
"slashAmount": 66,
"unbondPeriod": 23
}
]
},
"funding": {
"@context": "https://schema.ixo.world/funding/ipfs3r08webu2eou",
"type":"funding",
"id":"",
"items": [
{ "type": "Alphabond", "id": "did:ixo:CYCc2xaJKrp8Yt947Nc6jdzzzz" }
]
},
"data": [{
"type": "PersonalDataPod",
"id": "did:ixo:CYCc2xaJKrp8Yt947Nc6jdbgfd",
"serviceEndpoint": "https://hub.me.com",
"properties": "regex or other string"
}
]
Following the work we have been leading on the Interchain Identifier Specification, we are ready to update the ixo Entity Document data model so this complies with the IID and DID-Core standards. This is particularly important as users start creating entities on the Impact Hub public network, to comply with data protection and privacy regulations.
Customisations in ixo
In the ixo
projects
module, we refer to the IID document as anEntity Document
.This includes additional header metadata and blockchain transaction hash (as a type of Proof). These can be thought of as a wrapper for the IID Document.
Entity Document metadata Properties include: