Coder Social home page Coder Social logo

ethereumclaimsregistry's Introduction

ERC: Ethereum Claims Registry #780

Abstract:

This text describes a proposal for an Ethereum Claims Registry (ECR) which allows persons, smart contracts, and machines to issue claims about each other, as well as self issued claims. The registry provides a flexible approach for claims that makes no distinction between different types of Ethereum accounts. The goal of the registry is to provide a central point of reference for on-chain claims on Ethereum.

Specification:

The ECR is a contract that is deployed once and can then be commonly used by everyone. Therefore it's important that the code of the registry has been reviewed by lots of people with different use cases in mind. The ECR provides an interface for adding, getting, and removing claims. Claims are issued from an issuer to a subject with a key, which is of type bytes32. The claims data is stored as type bytes32.

Claim Types:

The key parameter is used to indicate the type of claim that is being made. There are three ways that are encuraged for use in the ECR:

    - Standardised claim types use syntax borrowed from HTTP and do not start with X-. The key is the hash of the claim type (eg, keccak256('Owner-Address'))
    - Private types not intended for interchange use the same syntax, but with X- prefix. The key is the hash of the claim type (eg, keccak256('X-My-Thing'))
    - Ad-hoc types use 32 random bytes for the key, enabling allocation of new globally used keys without the need for standardisation first.

Registry specification:

The ECR provides the following functions:
  • setClaim

    • Used by an issuer to set the claim value with the key about the subject.
    function setClaim(address subject, bytes32 key, bytes32 value) public;
  • setSelfClaim

    • Convenience function for an issuer to set a claim about themself.
      function setSelfClaim(bytes32 key, bytes32 value) public;
  • getClaim

    • Used by anyone to get a specific claim.
    function getClaim(address issuer, address subject, bytes32 key) public constant returns(bytes32);
  • removeClaim

    • Used by an issuer to remove a claim it has made.
      function removeClaim(address issuer, address subject, bytes32 key) public;

ERC specification Reference:

ethereumclaimsregistry's People

Contributors

kanthblockchain avatar

Watchers

Dominic Morris avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.