The Waves CA

I have created a new test project — Waves CA.

It allow the creation of a list of certificate owners and, using DataTransactions, store the hashes of certificates with the owner’s public key and current status (true/false).
For users, it give the opportunity to check a certificate via its id or the public key of the user.

This test version allow all users to add certificates, because script of CA smart account is:

let masterPublicKey = base58'2vet7Phh3JLvc5xRknLoT6YbBsnyU98LywPsER6ixStk'
match tx {
  case a:DataTransaction => true
  case b:SetScriptTransaction => sigVerify(tx.bodyBytes, tx.proofs[0], masterPublicKey)
  case _ => false

For real version of project we need to add the CA admins public keys to script:

let masterPublicKey = base58'2vet7Phh3JLvc5xRknLoT6YbBsnyU98LywPsER6ixStk'
let admin1PK = base58'2xR41M4xZhuR5XfavLxPJfQb5eUByJfiE3Ztd3LFbRL7'
let admin2PK = base58'7WTdwDXY1xacevjxuSSAwo8sSZ2beA8fHkyAK6HiZGL8'
match tx {
  case a:DataTransaction =>
      let admin1Proofed = sigVerify(tx.bodyBytes, tx.proofs[0], admin1PK )
      let admin2Proofed = sigVerify(tx.bodyBytes, tx.proofs[0], admin2PK )
      admin1Proofed || admin2Proofed 
  case b:SetScriptTransaction => sigVerify(tx.bodyBytes, tx.proofs[0], masterPublicKey)
  case _ => false

Also in the plans to add a duplication check to the contract script.

Click Update button in admin mode to receive the certificates list. Rows of table is clickable.

Click Send button in admin mode to sign and publish data transaction with specified data.

The data structure is as follows:

data: [
  {type: 'string', key: id, value: owner},
  {type: 'binary', key: id + '.hash', value: hash},
  {type: 'boolean', key: id + '.status', value: status}

You can see data of CA by clicking link at the bottom of the page.
Operations are performed by the client.

Don’t forget to install Waves Keeper.
Feel free to create issues and pull requests.

The project, including all technical details, will be described soon (maybe).

Other projects:


check out new version

The project has been moved to