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

Fix of service encoding in numalgo2 #36

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions core.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,23 +150,23 @@ <h3>Method 2: multiple inception key without doc</h3>
keypurpose =
transform = "z"
encnumbasis = 46*BASE58BTC
service = "S" 1*B64URL
service = 1*B64URL
</pre>

<ul>
<li>Start with the did prefix <pre>did:peer:2</pre></li>
<li>Construct a multibase encoded, multicodec-encoded form of each public key to be included.</li>
<li>Prefix each encoded key with a period character (.) and single character from the purpose codes table below.</li>
<li>Append the encoded key to the DID.</li>
<li>Encode and append a service type if desired as described below.</li>
<li>Encode and append a service type to the end of the peer DID if desired as described below.</li>
</ul>
<p>Service encoding</p>
<ul>
<li>Start with the JSON structure for your service.</li>
<li>Replace common strings in key names and type value with abbreviations from the abbreviations table below.</li>
<li>Convert to string, and remove unnecessary whitespace, such as spaces and newlines.</li>
<li>Base64URL Encode String (no padding)</li>
<li>Add the period (.) and S (for the service) </li>
<li>Prefix encoded service with a period character (.) and S</li>
</ul>

<p>Service decoding</p>
Expand Down