DIP-267 Provide a User Data mechanism for links to profiles#277
DIP-267 Provide a User Data mechanism for links to profiles#277
Conversation
92ebb67 to
d46a05f
Compare
wilwade
left a comment
There was a problem hiding this comment.
One clarification needed about CID serialization, but otherwise looks like a good improvement to me!
| | Scheme | `dsnp://` | | ||
| | User Id | `78187493520` | | ||
| | Content Hash | `0x1234567890abcdef0123456789abcdef0123456789abcdef0123456789abcdef` | | ||
| | Content Hash | `QmQNHNfHnbgJJ6nK4UPx2VtTUCafAKCbqZJ6ZRYUGjoeFj` | |
There was a problem hiding this comment.
I believe this change should also propagate to pages/ActivityContent/Associated/Hash.md Or would that require #273 to be implemented first?
There was a problem hiding this comment.
This PR is just changing it to a multihash multibase string, as we don't serialize hashes as hex anywhere as far as I know. (The DSNP URI should match the hash from the announcement, which is now a multihash.)
Technically unrelated to the purpose of this PR, just a vestigial issue I happened to run into. I can make it a separate PR if you think it's warranted.
fafb58f to
7f39e0f
Compare
wilwade
left a comment
There was a problem hiding this comment.
Nice improvement. Matches expected DIP-267
Problem
#267 discusses the advantages of DSNP profile documents being discoverable based on a user's identifier, rather than being temporal data that must be externally tracked and indexed to be useful.
Solution
This proposal adds a new User Data type,
profileResources, which is currently defined for the Activity Content profile document type, but is extensible to other document types that may need to be user-centric in the future.A profile resource is simply a link type (as an integer) and a CID as a string plus byte length.
We define link type 1 for AC profiles.
This change assumes we are versioning for 1.3, but does not include versioning updates, which are in other open PRs at this time.
Change summary:
Updated Spec VersionsprofileResource