Skip to content
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

entries: Add capability for updation of registry-entries #247

Merged
merged 7 commits into from
Oct 15, 2024

Conversation

vatsa287
Copy link
Member

@vatsa287 vatsa287 commented Oct 15, 2024

This PR,

  • Adds capability to update the registry-entry.

  • Updates to have support for elementURI which is a combination of registry-entry ID digest & entry input digest at identifier level. At full will be seen as entry:cord:<IdDigest>:<InputEntryDigest>.

  • Demo script updates to demonstrate above.

  • Added yarn demo-registry & yarn demo-registry-entries for easy run of the dedi scripts, also moved the registry-tx.ts & registry-entries-tx.ts under demo/dedi for easy access as the pile of demo-scripts are growing under root.

Signed-off-by: Shreevatsa N [email protected]

@vatsa287 vatsa287 marked this pull request as draft October 15, 2024 12:28
@vatsa287 vatsa287 changed the title Update registry entry 1 entries: Add capability for updation of registry-entries Oct 15, 2024
@vatsa287 vatsa287 marked this pull request as ready for review October 15, 2024 12:44
@vatsa287
Copy link
Member Author

Demo Script Output

vatsa@Shreevatsas-MacBook-Pro cord.js % yarn demo-registry-entries

❄️  New Network Member
🏦  Member (ed25519): 3vqsw3RD4HKGuAXby9H3WBeLkDV1F3NTS4rxcuiYigQu93Cq

❄️  Registry Create Details  {
  uri: 'registry:cord:bdnf2FMv6miaz6g8aG7AR6ZKW2JygSgRPMJQbWak8NqFMS15F',
  creatorUri: 'did:cord:33vqsw3RD4HKGuAXby9H3WBeLkDV1F3NTS4rxcuiYigQu93Cq',
  digest: '0x33f4a4f723d38319627e85d9283f59f45f0da3313e3b6611e8b8cadcd0a6fa12',
  blob: 'eQKUeyJuYW1lIjoiQ29tcGFuaWVzIFJlZ2lzdHJ5IiwiZGVzY3JpcHRpb24iOiJBIGNlbnRyYWxpemVkIHJlZ2lzdHJ5IHRoYXQgdHJhY2tzIHRoZSByZWdpc3RyYXRpb24sIGluY29ycG9yYXRpb24gc3RhdHVzLCBhbmQga2V5IGJ1c2luZXNzIGRldGFpbHMgb2YgY29tcGFuaWVzIGFjcm9zcyB2YXJpb3VzIGluZHVzdHJpZXMuIiwibWV0YWRhdGEiOnsiY2F0ZWdvcnkiOiJidXNpbmVzcyIsInRvdGFsQ29tcGFuaWVzUmVnaXN0ZXJlZCI6MTUwMDAsImluZHVzdHJpZXNDb3ZlcmVkIjpbIlRlY2hub2xvZ3kiLCJIZWFsdGhjYXJlIiwiUmVuZXdhYmxlIEVuZXJneSIsIkZpbmFuY2UiLCJNYW51ZmFjdHVyaW5nIl0sImxhc3RVcGRhdGVkIjoiMDEtMTAtMjAyNCIsInJlZ3VsYXRvcnlBdXRob3JpdHkiOiJOYXRpb25hbCBCdXNpbmVzcyBCdXJlYXUiLCJyZWdpc3RyYXRpb25SZXF1aXJlbWVudHMiOnsiZG9jdW1lbnRzTmVlZGVkIjpbIkluY29ycG9yYXRpb24gQ2VydGlmaWNhdGUiLCJUYXggSWRlbnRpZmljYXRpb24gTnVtYmVyIiwiUHJvb2Ygb2YgQWRkcmVzcyIsIkJvYXJkIFJlc29sdXRpb24iXSwiZmVlU3RydWN0dXJlIjp7InNtYWxsQnVzaW5lc3MiOiJJTlI1MDAiLCJtZWRpdW1CdXNpbmVzcyI6IklOUjEwMDAiLCJsYXJnZUJ1c2luZXNzIjoiSU5SNTAwMCJ9fX19',
  schemaId: null,
  authorizationUri: 'registryauth:cord:X8GxzCoRe46wCTTPhenC2tbmoSTAEDdxR5VybhNaoaNCBZLUa'
}

✅ Registry created!

❄️  Registry Entry Create Details  {
  uri: 'entry:cord:u33DotKwGYHucSTprcwGSkfLVo8ozgLJoYFZVkux1e9au68jv:dbda0e6366fdb72711226001e7808ce63444298fe95caa174df973e2efd1b971',
  creatorUri: 'did:cord:33vqsw3RD4HKGuAXby9H3WBeLkDV1F3NTS4rxcuiYigQu93Cq',
  digest: '0xdbda0e6366fdb72711226001e7808ce63444298fe95caa174df973e2efd1b971',
  blob: 'eQHgeyJuYW1lIjoiVGVjaCBTb2x1dGlvbnMgTHRkLiIsImRlc2NyaXB0aW9uIjoiQSB0ZWNobm9sb2d5IGNvbXBhbnkgcHJvdmlkaW5nIHNvZnR3YXJlIGRldmVsb3BtZW50IGFuZCBJVCBjb25zdWx0aW5nIHNlcnZpY2VzLiIsIm1ldGFkYXRhIjp7ImNhdGVnb3J5IjoiVGVjaG5vbG9neSIsInJlZ2lzdHJhdGlvbkRhdGUiOiIxNS0wNi0yMDIyIiwic3RhdHVzIjoiQWN0aXZlIiwicmVnaXN0cmF0aW9uTnVtYmVyIjoiVFNMMTIzNDUiLCJpbmR1c3RyeSI6IlRlY2hub2xvZ3kiLCJyZWd1bGF0b3J5QXV0aG9yaXR5IjoiTmF0aW9uYWwgQnVzaW5lc3MgQnVyZWF1IiwiZG9jdW1lbnRzUHJvdmlkZWQiOlsiSW5jb3Jwb3JhdGlvbiBDZXJ0aWZpY2F0ZSIsIlRheCBJZGVudGlmaWNhdGlvbiBOdW1iZXIiLCJQcm9vZiBvZiBBZGRyZXNzIiwiQm9hcmQgUmVzb2x1dGlvbiJdLCJmZWVQYWlkIjoiSU5SNTAwIiwibGFzdFVwZGF0ZWQiOiIwMS0xMC0yMDI0In19',
  registryUri: 'registry:cord:bdnf2FMv6miaz6g8aG7AR6ZKW2JygSgRPMJQbWak8NqFMS15F',
  authorizationUri: 'registryauth:cord:X8GxzCoRe46wCTTPhenC2tbmoSTAEDdxR5VybhNaoaNCBZLUa'
}

✅ Registry Entry created! entry:cord:u33DotKwGYHucSTprcwGSkfLVo8ozgLJoYFZVkux1e9au68jv:dbda0e6366fdb72711226001e7808ce63444298fe95caa174df973e2efd1b971

❄️  Registry Entry Update Details  {
  uri: 'entry:cord:u33DotKwGYHucSTprcwGSkfLVo8ozgLJoYFZVkux1e9au68jv:7b56f85a27224b1a15f216069f6f451e446f94868f1ed7e4742a3a7c3482a80e',
  creatorUri: 'did:cord:33vqsw3RD4HKGuAXby9H3WBeLkDV1F3NTS4rxcuiYigQu93Cq',
  digest: '0x7b56f85a27224b1a15f216069f6f451e446f94868f1ed7e4742a3a7c3482a80e',
  blob: 'eQHkeyJuYW1lIjoiTmV3IFRlY2ggU29sdXRpb25zIEx0ZC4iLCJkZXNjcmlwdGlvbiI6IkEgdGVjaG5vbG9neSBjb21wYW55IHByb3ZpZGluZyBzb2Z0d2FyZSBkZXZlbG9wbWVudCBhbmQgSVQgY29uc3VsdGluZyBzZXJ2aWNlcy4iLCJtZXRhZGF0YSI6eyJjYXRlZ29yeSI6IlRlY2hub2xvZ3kiLCJyZWdpc3RyYXRpb25EYXRlIjoiMTUtMDYtMjAyMiIsInN0YXR1cyI6IkFjdGl2ZSIsInJlZ2lzdHJhdGlvbk51bWJlciI6IlRTTDEyMzQ1IiwiaW5kdXN0cnkiOiJUZWNobm9sb2d5IiwicmVndWxhdG9yeUF1dGhvcml0eSI6Ik5hdGlvbmFsIEJ1c2luZXNzIEJ1cmVhdSIsImRvY3VtZW50c1Byb3ZpZGVkIjpbIkluY29ycG9yYXRpb24gQ2VydGlmaWNhdGUiLCJUYXggSWRlbnRpZmljYXRpb24gTnVtYmVyIiwiUHJvb2Ygb2YgQWRkcmVzcyIsIkJvYXJkIFJlc29sdXRpb24iXSwiZmVlUGFpZCI6IklOUjUwMCIsImxhc3RVcGRhdGVkIjoiMDEtMTAtMjAyNCJ9fQ==',
  registryUri: 'registry:cord:bdnf2FMv6miaz6g8aG7AR6ZKW2JygSgRPMJQbWak8NqFMS15F',
vatsa@Shreevatsas-MacBook-Pro cord.js % yarn demo-registry-entries

❄️  New Network Member
🏦  Member (ed25519): 3x17brb3jfzUK9seVGhkEMyeDNJRY1mLVGV5Z4pcJdPzuH8D

❄️  Registry Create Details  {
  uri: 'registry:cord:bdmwphQkZ3YNfaBFbytAPo3dA8xtSNJcd1gE7Z1VWUkAKQt8D',
  creatorUri: 'did:cord:33x17brb3jfzUK9seVGhkEMyeDNJRY1mLVGV5Z4pcJdPzuH8D',
  digest: '0x33f4a4f723d38319627e85d9283f59f45f0da3313e3b6611e8b8cadcd0a6fa12',
  blob: 'eQKUeyJuYW1lIjoiQ29tcGFuaWVzIFJlZ2lzdHJ5IiwiZGVzY3JpcHRpb24iOiJBIGNlbnRyYWxpemVkIHJlZ2lzdHJ5IHRoYXQgdHJhY2tzIHRoZSByZWdpc3RyYXRpb24sIGluY29ycG9yYXRpb24gc3RhdHVzLCBhbmQga2V5IGJ1c2luZXNzIGRldGFpbHMgb2YgY29tcGFuaWVzIGFjcm9zcyB2YXJpb3VzIGluZHVzdHJpZXMuIiwibWV0YWRhdGEiOnsiY2F0ZWdvcnkiOiJidXNpbmVzcyIsInRvdGFsQ29tcGFuaWVzUmVnaXN0ZXJlZCI6MTUwMDAsImluZHVzdHJpZXNDb3ZlcmVkIjpbIlRlY2hub2xvZ3kiLCJIZWFsdGhjYXJlIiwiUmVuZXdhYmxlIEVuZXJneSIsIkZpbmFuY2UiLCJNYW51ZmFjdHVyaW5nIl0sImxhc3RVcGRhdGVkIjoiMDEtMTAtMjAyNCIsInJlZ3VsYXRvcnlBdXRob3JpdHkiOiJOYXRpb25hbCBCdXNpbmVzcyBCdXJlYXUiLCJyZWdpc3RyYXRpb25SZXF1aXJlbWVudHMiOnsiZG9jdW1lbnRzTmVlZGVkIjpbIkluY29ycG9yYXRpb24gQ2VydGlmaWNhdGUiLCJUYXggSWRlbnRpZmljYXRpb24gTnVtYmVyIiwiUHJvb2Ygb2YgQWRkcmVzcyIsIkJvYXJkIFJlc29sdXRpb24iXSwiZmVlU3RydWN0dXJlIjp7InNtYWxsQnVzaW5lc3MiOiJJTlI1MDAiLCJtZWRpdW1CdXNpbmVzcyI6IklOUjEwMDAiLCJsYXJnZUJ1c2luZXNzIjoiSU5SNTAwMCJ9fX19',
  schemaId: null,
  authorizationUri: 'registryauth:cord:X8Ku8XWHMcomGkK3YfpqVfGVpDLdzpha6qDVJHbZwJJbFzgtG'
}

✅ Registry created!

❄️  Registry Entry Create Details  {
  uri: 'entry:cord:u2wn4caC54AcXMs7adiXddb3RwZd2A4zvqY3uV1H7i2MkkGuo:dbda0e6366fdb72711226001e7808ce63444298fe95caa174df973e2efd1b971',
  creatorUri: 'did:cord:33x17brb3jfzUK9seVGhkEMyeDNJRY1mLVGV5Z4pcJdPzuH8D',
  digest: '0xdbda0e6366fdb72711226001e7808ce63444298fe95caa174df973e2efd1b971',
  blob: 'eQHgeyJuYW1lIjoiVGVjaCBTb2x1dGlvbnMgTHRkLiIsImRlc2NyaXB0aW9uIjoiQSB0ZWNobm9sb2d5IGNvbXBhbnkgcHJvdmlkaW5nIHNvZnR3YXJlIGRldmVsb3BtZW50IGFuZCBJVCBjb25zdWx0aW5nIHNlcnZpY2VzLiIsIm1ldGFkYXRhIjp7ImNhdGVnb3J5IjoiVGVjaG5vbG9neSIsInJlZ2lzdHJhdGlvbkRhdGUiOiIxNS0wNi0yMDIyIiwic3RhdHVzIjoiQWN0aXZlIiwicmVnaXN0cmF0aW9uTnVtYmVyIjoiVFNMMTIzNDUiLCJpbmR1c3RyeSI6IlRlY2hub2xvZ3kiLCJyZWd1bGF0b3J5QXV0aG9yaXR5IjoiTmF0aW9uYWwgQnVzaW5lc3MgQnVyZWF1IiwiZG9jdW1lbnRzUHJvdmlkZWQiOlsiSW5jb3Jwb3JhdGlvbiBDZXJ0aWZpY2F0ZSIsIlRheCBJZGVudGlmaWNhdGlvbiBOdW1iZXIiLCJQcm9vZiBvZiBBZGRyZXNzIiwiQm9hcmQgUmVzb2x1dGlvbiJdLCJmZWVQYWlkIjoiSU5SNTAwIiwibGFzdFVwZGF0ZWQiOiIwMS0xMC0yMDI0In19',
  registryUri: 'registry:cord:bdmwphQkZ3YNfaBFbytAPo3dA8xtSNJcd1gE7Z1VWUkAKQt8D',
  authorizationUri: 'registryauth:cord:X8Ku8XWHMcomGkK3YfpqVfGVpDLdzpha6qDVJHbZwJJbFzgtG'
}

✅ Registry Entry created! entry:cord:u2wn4caC54AcXMs7adiXddb3RwZd2A4zvqY3uV1H7i2MkkGuo:dbda0e6366fdb72711226001e7808ce63444298fe95caa174df973e2efd1b971

❄️  Registry Entry Update Details  {
  uri: 'entry:cord:u2wn4caC54AcXMs7adiXddb3RwZd2A4zvqY3uV1H7i2MkkGuo:7b56f85a27224b1a15f216069f6f451e446f94868f1ed7e4742a3a7c3482a80e',
  creatorUri: 'did:cord:33x17brb3jfzUK9seVGhkEMyeDNJRY1mLVGV5Z4pcJdPzuH8D',
  digest: '0x7b56f85a27224b1a15f216069f6f451e446f94868f1ed7e4742a3a7c3482a80e',
  blob: 'eQHkeyJuYW1lIjoiTmV3IFRlY2ggU29sdXRpb25zIEx0ZC4iLCJkZXNjcmlwdGlvbiI6IkEgdGVjaG5vbG9neSBjb21wYW55IHByb3ZpZGluZyBzb2Z0d2FyZSBkZXZlbG9wbWVudCBhbmQgSVQgY29uc3VsdGluZyBzZXJ2aWNlcy4iLCJtZXRhZGF0YSI6eyJjYXRlZ29yeSI6IlRlY2hub2xvZ3kiLCJyZWdpc3RyYXRpb25EYXRlIjoiMTUtMDYtMjAyMiIsInN0YXR1cyI6IkFjdGl2ZSIsInJlZ2lzdHJhdGlvbk51bWJlciI6IlRTTDEyMzQ1IiwiaW5kdXN0cnkiOiJUZWNobm9sb2d5IiwicmVndWxhdG9yeUF1dGhvcml0eSI6Ik5hdGlvbmFsIEJ1c2luZXNzIEJ1cmVhdSIsImRvY3VtZW50c1Byb3ZpZGVkIjpbIkluY29ycG9yYXRpb24gQ2VydGlmaWNhdGUiLCJUYXggSWRlbnRpZmljYXRpb24gTnVtYmVyIiwiUHJvb2Ygb2YgQWRkcmVzcyIsIkJvYXJkIFJlc29sdXRpb24iXSwiZmVlUGFpZCI6IklOUjUwMCIsImxhc3RVcGRhdGVkIjoiMDEtMTAtMjAyNCJ9fQ==',
  registryUri: 'registry:cord:bdmwphQkZ3YNfaBFbytAPo3dA8xtSNJcd1gE7Z1VWUkAKQt8D',
  authorizationUri: 'registryauth:cord:X8Ku8XWHMcomGkK3YfpqVfGVpDLdzpha6qDVJHbZwJJbFzgtG'
}

✅ Registry Entry updated! entry:cord:u2wn4caC54AcXMs7adiXddb3RwZd2A4zvqY3uV1H7i2MkkGuo:7b56f85a27224b1a15f216069f6f451e446f94868f1ed7e4742a3a7c3482a80e

Bye! 👋 👋 👋

@amarts amarts merged commit a73cc20 into dhiway:develop Oct 15, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants