Skip to content

SelfKeyFoundation/selfkey-claim-registry

Repository files navigation

selfkey-claim-registry

Public claim registry for Selfkey DIDs

  • developcodecov
  • mastercodecov

Overview

The SelfKeyClaimRegistry smart contract is a ERC780-based implementation for storing public claims on-chain, with the following differences:

  • Subject of a claim is a bytes32 value, allowing arbitrary "things" to be the subject of a claim (e.g. a hash of something, or a DID under the SelfKey DID method)
  • Claim issuer is required to have a DID registered on the DID Ledger contract
  • Transaction sender address for claim issuance and removal must be equal to the DID controller specified

Development Notes:

  • No expiration data is associated with claims, this could be implemented by having value be a struct that wraps the bytes32 value and other needed data such as expiration date.
  • No permissioning schemes are implemented on this claims registry contract. Claim issuance is public.
  • It's recommended to implement any additional customizations (e.g. permissioning, etc.) as smart contracts inheriting from the basic registry.

Development

All smart contracts are being implemented in Solidity 0.5.4.

Prerequisites

  • NodeJS, version 9.5+
  • truffle, which is a comprehensive framework for Ethereum development. npm install -g truffle — this should install the latest version.

Initialization

npm install

Testing

Truffle testing requires a ganache-cli instance running. In a different terminal window, execute:

ganache-cli

Standalone

npm test

or with code coverage (doesn't require ganache-cli)

npm run test:cov

From within Truffle

Run the truffle development environment

truffle develop

then from the prompt you can run

compile
migrate
test

as well as other Truffle commands. See truffleframework.com for more.

Linting

We provide the following linting options

  • npm run lint:sol — to lint the Solidity files, and
  • npm run lint:js — to lint the Javascript.

Contributing

Please see the contributing notes.

About

Public claim registry for Selfkey DIDs

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published