Register DID documents on the Solana blockchain using the SOL DID method
Solana mainnet address: ide3Y2TubNMLLhiG1kDL6to4a8SjxD18YWCYC5BZqNV
See the Solana documentation for developing Rust programs.
cargo build-bpf
solana program deploy <REPO_HOME>/sol-did/program/target/deploy/sol_did.so
The program is deployed on Mainnet at address:
ide3Y2TubNMLLhiG1kDL6to4a8SjxD18YWCYC5BZqNV
Given an arbitrary account acc
, owned by a DID,
Check if a signer is a valid owner of A using:
```rust use soldid::validateowner;
fn checkauthority(authorityinfo: &AccountInfo, did: &AccountInfo, acc: &MyAccount) -> ProgramResult { if !(acc.owner.eq(did.key)) { msg!("Incorrect authority provided"); Err(MyError::IncorrectAuthority.into()) }
validateowner(did, &[&authorityinfo]) } ```