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

Registry-Entries: Add SDK module with Entry creation capability #246

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

vatsa287
Copy link
Member

@vatsa287 vatsa287 commented Oct 8, 2024

This PR,

  • makes changes in the creation of digest function to not convert the raw bytes to U8a rather just pass the serialised blob to hashing algorithm: Blake2b.

  • Changes made in identifier and other dependencies to handle registry-entry identifiers.

  • Added support for creation of registry-entry properties and dispatching of the registry-entry properties to the chain.

  • A demo script named registry-entry-tx.ts to demonstrate above.

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

@vatsa287 vatsa287 marked this pull request as draft October 8, 2024 10:25
@vatsa287
Copy link
Member Author

vatsa287 commented Oct 8, 2024

O/P from the registry-entry-tx.ts demo script.


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

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

✅ Registry created!

❄️  Registry Entry Create Details  {
  uri: 'entry:cord:u31dpppEkPQGqgt3gF7VW7yzJHQ4wmvykiddnJaxXHoAetEXq',
  creatorUri: 'did:cord:33wxqgkPxqnxcYbA8t3AvySYczus9ZUj6eth8HPhoSPooksqr',
  digest: '0xdbda0e6366fdb72711226001e7808ce63444298fe95caa174df973e2efd1b971',
  blob: 'eQHgeyJuYW1lIjoiVGVjaCBTb2x1dGlvbnMgTHRkLiIsImRlc2NyaXB0aW9uIjoiQSB0ZWNobm9sb2d5IGNvbXBhbnkgcHJvdmlkaW5nIHNvZnR3YXJlIGRldmVsb3BtZW50IGFuZCBJVCBjb25zdWx0aW5nIHNlcnZpY2VzLiIsIm1ldGFkYXRhIjp7ImNhdGVnb3J5IjoiVGVjaG5vbG9neSIsInJlZ2lzdHJhdGlvbkRhdGUiOiIxNS0wNi0yMDIyIiwic3RhdHVzIjoiQWN0aXZlIiwicmVnaXN0cmF0aW9uTnVtYmVyIjoiVFNMMTIzNDUiLCJpbmR1c3RyeSI6IlRlY2hub2xvZ3kiLCJyZWd1bGF0b3J5QXV0aG9yaXR5IjoiTmF0aW9uYWwgQnVzaW5lc3MgQnVyZWF1IiwiZG9jdW1lbnRzUHJvdmlkZWQiOlsiSW5jb3Jwb3JhdGlvbiBDZXJ0aWZpY2F0ZSIsIlRheCBJZGVudGlmaWNhdGlvbiBOdW1iZXIiLCJQcm9vZiBvZiBBZGRyZXNzIiwiQm9hcmQgUmVzb2x1dGlvbiJdLCJmZWVQYWlkIjoiSU5SNTAwIiwibGFzdFVwZGF0ZWQiOiIwMS0xMC0yMDI0In19',
  authorizationUri: 'registryauth:cord:X8Ld9TsXe9QXvxKYp1fcaKmLzRMhXPBTge82YPNQw7vXUtbCg'
}

✅ Registry Entry created!

Bye! 👋 👋 👋 

@vatsa287 vatsa287 marked this pull request as ready for review October 8, 2024 10:32
@vatsa287 vatsa287 requested a review from amarts October 8, 2024 10:32
@amarts amarts merged commit 47f3bde into dhiway:develop Oct 8, 2024
1 check passed
Copy link
Contributor

@adi-a11y adi-a11y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

3 participants