Public claim registry for Selfkey DIDs
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
bytes32value, 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
structthat 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.
All smart contracts are being implemented in Solidity 0.5.4.
- NodeJS, version 9.5+
- truffle, which is a comprehensive framework for Ethereum development.
npm install -g truffle— this should install the latest version.
npm install
Truffle testing requires a ganache-cli instance running. In a different terminal window, execute:
ganache-cli
npm test
or with code coverage (doesn't require ganache-cli)
npm run test:cov
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.
We provide the following linting options
npm run lint:sol— to lint the Solidity files, andnpm run lint:js— to lint the Javascript.
Please see the contributing notes.