From 6036b7e6d4c574f483442d2ffcdfe82a1b94ce03 Mon Sep 17 00:00:00 2001 From: Eduardo Chongkan Date: Sat, 13 Apr 2024 17:02:33 -0600 Subject: [PATCH] Update index.html Add clarification for the Identifier Generation method. --- docs/index.html | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/index.html b/docs/index.html index 75fe4b25..dda0ae73 100644 --- a/docs/index.html +++ b/docs/index.html @@ -104,13 +104,14 @@

Identifier Generation Method

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.

+

The "bump seed" ensures the resultant address does not clash with the account address space, which lie on the Curve25519 elliptic curve.

- The program ID is idDa4XeCjVwKcprVAo812coUQbovSZ4kDGJf2sPaBnM on all networks. + The program ID is idDa4XeCjVwKcprVAo812coUQbovSZ4kDGJf2sPaBnM on all networks.

The bump seed is deterministically derivable off-chain as follows: @@ -123,6 +124,19 @@

Identifier Generation Method

Hash the owner address, DID method, seed, and program ID While the resultant point is on the Curve25519 curve +

Note: The Identifier can be automatically generated by the @solana/web3.js Keypair() method.

+

+

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:

+ (example Public-Key) "did:sol:[testnet|devnet|localnet]:" + "PKXUyY274eUeyQhTeuk9njpYthvWpguvS2TK7HxRxxZ"

+ e.g. + "verificationMethod": [ + { + "id": "did:sol:testnet:PKXUyY274eUeyQhTeuk9njpYthvWpguvS2TK7HxRxxZ#default", + "type": "Ed25519VerificationKey2018", + "controller": "did:sol:testnet:PKXUyY274eUeyQhTeuk9njpYthvWpguvS2TK7HxRxxZ", + "publicKeyBase58": "PKXUyY274eUeyQhTeuk9njpYthvWpguvS2TK7HxRxxZ" + } + ],

A convenient regex to match SOL DID identifiers is:

^[1-9A-HJ-NP-Za-km-z]{40,48}$