From 6036b7e6d4c574f483442d2ffcdfe82a1b94ce03 Mon Sep 17 00:00:00 2001
From: Eduardo Chongkan 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 @@
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}$