Skip to content
Open
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
16 changes: 15 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,14 @@ <h3>Identifier Generation Method</h3>
Given a DID owner with a public key on the x25519 ECC Curve, the DID owner key, the DID method ("sol"), a
"bump seed", and the Solana program ID are hashed together.
</p>

<p>
The "bump seed" ensures the resultant address
does not clash with the account address space, which lie on the Curve25519
elliptic curve.
</p>
<p>
The program ID is <code>idDa4XeCjVwKcprVAo812coUQbovSZ4kDGJf2sPaBnM</code> on all networks.
The program ID is <b><code>idDa4XeCjVwKcprVAo812coUQbovSZ4kDGJf2sPaBnM</code></b> on all networks.
</p>
<p>
The bump seed is deterministically derivable off-chain as follows:
Expand All @@ -123,6 +124,19 @@ <h3>Identifier Generation Method</h3>
Hash the owner address, DID method, seed, and program ID
While the resultant point is on the Curve25519 curve
</pre>
<p><b>Note: The Identifier can be automatically generated by the <code>@solana/web3.js</code> Keypair() method.</b></p>
</p>
<p>If there is a pre-existing Solana Public-Key (a.k.a. wallet address), the DID identifier can be easily assembled by concatenating the strings as follows: <br><br>
(example Public-Key) <code>"did:sol:[testnet|devnet|localnet]:" + "PKXUyY274eUeyQhTeuk9njpYthvWpguvS2TK7HxRxxZ"</code> <br> <br>
e.g.
<code>"verificationMethod": [
{
"id": "did:sol:testnet:PKXUyY274eUeyQhTeuk9njpYthvWpguvS2TK7HxRxxZ#default",
"type": "Ed25519VerificationKey2018",
"controller": "did:sol:testnet:PKXUyY274eUeyQhTeuk9njpYthvWpguvS2TK7HxRxxZ",
"publicKeyBase58": "PKXUyY274eUeyQhTeuk9njpYthvWpguvS2TK7HxRxxZ"
}
],</code>
</p>
<p>A convenient regex to match <code>SOL</code> DID identifiers is: <br><br>
<code>^[1-9A-HJ-NP-Za-km-z]{40,48}$</code><br><br>
Expand Down