-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
asset: Updates to have a VC of Asset #196
Conversation
Signed-off-by: Shreevatsa N <[email protected]>
Can you paste the output here ? For the reviewers, this is not an ideal way to implement this. Also due to this, found an issue with the |
Signed-off-by: Shreevatsa N <[email protected]>
O/P
But addProof fails with,
|
Signed-off-by: Shreevatsa N <[email protected]>
@amarts, Full script o/p.
|
Signed-off-by: Shreevatsa N <[email protected]>
@smohan-dw @amarts, Updated to have VCs for asset issuance & transfer as well with ownership changes seen on VCs. On-Chain Assets & Transactions
❄️ Identities
🏦 Member (ed25519): 3xAfdQ227FNhKe6f7p61C24yFLPrFqt6zbjRnvHKD2enKy7D
🏛 Issuer (sr25519): did:cord:3ucaChkzSxTbNvNykXq7LbGR8AgcujrjqgBvcGQPC4KiF8TQ
🏛 Holder (sr25519): did:cord:3vHZUZzWZUGWw2AM2gmaNnJqr3B9fx3q1BFRtiLsHnQZvh6R
🏛 Holder2 (sr25519): did:cord:3uw8zWdw9TFRjGi4wB3DuEabngmzKJvPuXrYGzbJZWUDgEAQ
🏦 API Provider (ed25519): 3yGXAs6wrwgoxk8Lk1zeNA9FpFi7aip1iEQE3iBRzSpaaBZp
✅ Identities created!
❄️ Chain Space Creation
{
uri: 'space:cord:c34LBVhcv9ha38Jn7uBTKVrrrtvu2fadT2fuAgPosPRqpv5Qq',
desc: 'ChainSpace v1.d4e11e7c-db00-484f-a7cd-5b87178130be',
digest: '0x6cf9e6655f6f92cedeeef7a92797d448a4487201498b95a2df185a447299f22b',
creatorUri: 'did:cord:3ucaChkzSxTbNvNykXq7LbGR8AgcujrjqgBvcGQPC4KiF8TQ',
authorizationUri: 'auth:cord:a3eDhaaYfYeCug6dws72aTxSL9u7ztNLWdLAqgQ3t4kmdBV7K'
}
❄️ Chain Space Properties
{
uri: 'space:cord:c34LBVhcv9ha38Jn7uBTKVrrrtvu2fadT2fuAgPosPRqpv5Qq',
authorization: 'auth:cord:a3eDhaaYfYeCug6dws72aTxSL9u7ztNLWdLAqgQ3t4kmdBV7K'
}
✅ Chain Space created!
❄️ Chain Space Approval
✅ Chain Space Approved
✅ Schema - schema:cord:s32HgEzyFRBvoGNVTuvpM2rBXNps4rNf4XfZkFtNtpqCpPu33 - added!
❄️ Asset Properties - Created by Issuer
{
assetType: 'ART',
assetDesc: 'Asset - 1dc018f7-ecd4-4ac5-89fb-0a6a353d09c9',
assetQty: 10000,
assetValue: 100,
assetTag: 'Tag - c8ff5997-7ec3-4a1f-acb6-a784eeaf859e',
assetMeta: 'Meta - c18be8b9-c8df-471e-93cd-529f0be3b3d3'
}
❄️ VC Asset Creation
❄️ Asset(create) Verifiable Credential Document created
{
'@context': [
'https://www.w3.org/2018/credentials/v1',
'https://cord.network/2023/cred/v1'
],
type: [ 'VerifiableCredential' ],
issuer: 'did:cord:3ucaChkzSxTbNvNykXq7LbGR8AgcujrjqgBvcGQPC4KiF8TQ',
issuanceDate: '2024-03-27T10:11:39.069Z',
credentialSubject: {
assetType: 'ART',
assetDesc: 'Asset - 1dc018f7-ecd4-4ac5-89fb-0a6a353d09c9',
assetQty: 10000,
assetValue: 100,
assetTag: 'Tag - c8ff5997-7ec3-4a1f-acb6-a784eeaf859e',
assetMeta: 'Meta - c18be8b9-c8df-471e-93cd-529f0be3b3d3',
id: 'did:cord:3ucaChkzSxTbNvNykXq7LbGR8AgcujrjqgBvcGQPC4KiF8TQ'
},
validFrom: '2024-03-27T10:11:39.069Z',
validUntil: '2025-03-27T10:11:39.071Z',
metadata: { evidence: undefined, template: undefined, label: undefined },
credentialSchema: {
'$id': 'schema:cord:s32HgEzyFRBvoGNVTuvpM2rBXNps4rNf4XfZkFtNtpqCpPu33',
'$schema': 'http://cord.network/draft-01/schema#',
'$metadata': { version: '1.0.0', slug: 'asset-demo-schema', discoverable: true },
title: 'Asset Demo Schema v3:43d31782-0833-44e9-8307-623244e89ab5',
description: 'Asset Demo Schema',
properties: {
assetType: [Object],
assetDesc: [Object],
assetQty: [Object],
assetValue: [Object],
assetTag: [Object],
assetMeta: [Object]
},
type: 'object',
additionalProperties: false
},
credentialHash: '0x0d603eb265c2aac39cae0e96b06305241b69334dc01743cf28cd537b0f48d11b',
id: 'asset:cord:a3k48aFveArLdWxg39efVDaYPfqkFhjSor8NuJv5Sx1gvF5oy'
}
✅ VC Asset created on-chain!
❄️ Issue Asset to Holder - Issuer Action
{
entry: {
assetId: 'a3k48aFveArLdWxg39efVDaYPfqkFhjSor8NuJv5Sx1gvF5oy',
assetOwner: '3vHZUZzWZUGWw2AM2gmaNnJqr3B9fx3q1BFRtiLsHnQZvh6R',
assetIssuanceQty: 1
},
issuer: 'did:cord:3ucaChkzSxTbNvNykXq7LbGR8AgcujrjqgBvcGQPC4KiF8TQ',
space: 'space:cord:c34LBVhcv9ha38Jn7uBTKVrrrtvu2fadT2fuAgPosPRqpv5Qq',
digest: '0x0355d3f77447133983f36603128db2e6a7e606f70fa1b860df7f3ea8d57a5f3f',
uri: 'asset:cord:a3k48aFveArLdWxg39efVDaYPfqkFhjSor8NuJv5Sx1gvF5oy:i33VxEgTs4Mce6dUFK2icUqy7UK2PMBX9wsrEQbuC2rbtUV7G'
}
❄️ Asset(issue) Verifiable Credential Document created
{
'@context': [
'https://www.w3.org/2018/credentials/v1',
'https://cord.network/2023/cred/v1'
],
type: [ 'VerifiableCredential' ],
issuer: 'did:cord:3ucaChkzSxTbNvNykXq7LbGR8AgcujrjqgBvcGQPC4KiF8TQ',
issuanceDate: '2024-03-27T10:11:42.053Z',
credentialSubject: {
assetType: 'ART',
assetDesc: 'Asset - 1dc018f7-ecd4-4ac5-89fb-0a6a353d09c9',
assetQty: 1,
assetValue: 100,
assetTag: 'Tag - c8ff5997-7ec3-4a1f-acb6-a784eeaf859e',
assetMeta: 'Meta - c18be8b9-c8df-471e-93cd-529f0be3b3d3',
id: 'did:cord:3vHZUZzWZUGWw2AM2gmaNnJqr3B9fx3q1BFRtiLsHnQZvh6R'
},
validFrom: '2024-03-27T10:11:42.053Z',
validUntil: '2025-03-27T10:11:42.053Z',
metadata: { evidence: undefined, template: undefined, label: undefined },
credentialSchema: {
'$id': 'schema:cord:s32HgEzyFRBvoGNVTuvpM2rBXNps4rNf4XfZkFtNtpqCpPu33',
'$schema': 'http://cord.network/draft-01/schema#',
'$metadata': { version: '1.0.0', slug: 'asset-demo-schema', discoverable: true },
title: 'Asset Demo Schema v3:43d31782-0833-44e9-8307-623244e89ab5',
description: 'Asset Demo Schema',
properties: {
assetType: [Object],
assetDesc: [Object],
assetQty: [Object],
assetValue: [Object],
assetTag: [Object],
assetMeta: [Object]
},
type: 'object',
additionalProperties: false
},
credentialHash: '0x4f2a4588e2858245791db8ed3c9679d76871e51b8986dc46975cb53639a0bb20',
id: 'asset:cord:a3k48aFveArLdWxg39efVDaYPfqkFhjSor8NuJv5Sx1gvF5oy:i33VxEgTs4Mce6dUFK2icUqy7UK2PMBX9wsrEQbuC2rbtUV7G'
}
❄️ Transfer Asset to New Owner (Holder2) - Holder Action
❄️ Asset(transfer) Verifiable Credential Document created
{
'@context': [
'https://www.w3.org/2018/credentials/v1',
'https://cord.network/2023/cred/v1'
],
type: [ 'VerifiableCredential' ],
issuer: 'did:cord:3vHZUZzWZUGWw2AM2gmaNnJqr3B9fx3q1BFRtiLsHnQZvh6R',
issuanceDate: '2024-03-27T10:11:45.041Z',
credentialSubject: {
assetType: 'ART',
assetDesc: 'Asset - 1dc018f7-ecd4-4ac5-89fb-0a6a353d09c9',
assetQty: 1,
assetValue: 100,
assetTag: 'Tag - c8ff5997-7ec3-4a1f-acb6-a784eeaf859e',
assetMeta: 'Meta - c18be8b9-c8df-471e-93cd-529f0be3b3d3',
id: 'did:cord:3uw8zWdw9TFRjGi4wB3DuEabngmzKJvPuXrYGzbJZWUDgEAQ'
},
validFrom: '2024-03-27T10:11:45.041Z',
validUntil: '2025-03-27T10:11:45.041Z',
metadata: { evidence: undefined, template: undefined, label: undefined },
credentialSchema: {
'$id': 'schema:cord:s32HgEzyFRBvoGNVTuvpM2rBXNps4rNf4XfZkFtNtpqCpPu33',
'$schema': 'http://cord.network/draft-01/schema#',
'$metadata': { version: '1.0.0', slug: 'asset-demo-schema', discoverable: true },
title: 'Asset Demo Schema v3:43d31782-0833-44e9-8307-623244e89ab5',
description: 'Asset Demo Schema',
properties: {
assetType: [Object],
assetDesc: [Object],
assetQty: [Object],
assetValue: [Object],
assetTag: [Object],
assetMeta: [Object]
},
type: 'object',
additionalProperties: false
},
credentialHash: '0xac31ce663092a5e4066733b7d2414a4e7b69cde5a3f885849f2b726098df30d4',
id: 'asset:cord:a3k48aFveArLdWxg39efVDaYPfqkFhjSor8NuJv5Sx1gvF5oy:i33VxEgTs4Mce6dUFK2icUqy7UK2PMBX9wsrEQbuC2rbtUV7G'
}
{
entry: {
assetId: 'a3k48aFveArLdWxg39efVDaYPfqkFhjSor8NuJv5Sx1gvF5oy',
assetInstanceId: 'i33VxEgTs4Mce6dUFK2icUqy7UK2PMBX9wsrEQbuC2rbtUV7G',
assetOwner: '3vHZUZzWZUGWw2AM2gmaNnJqr3B9fx3q1BFRtiLsHnQZvh6R',
newAssetOwner: '3uw8zWdw9TFRjGi4wB3DuEabngmzKJvPuXrYGzbJZWUDgEAQ'
},
owner: 'did:cord:3vHZUZzWZUGWw2AM2gmaNnJqr3B9fx3q1BFRtiLsHnQZvh6R',
digest: '0x71fa6b5546640a814281232948dfcb9a78e3f9d49bf6b77cfd81e328e95873ee'
}
✅ Asset transferred!
Bye! 👋 👋 👋 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove package.json and yarn.lock and only keep the demo files.
Signed-off-by: Shreevatsa N <[email protected]>
Signed-off-by: Shreevatsa N <[email protected]>
temp-cord-vc
to be able to issue VC of assets.