{"id":21659028,"url":"https://github.com/OriginProtocol/origin-playground","last_synced_at":"2025-07-17T21:32:06.533Z","repository":{"id":41297241,"uuid":"128123058","full_name":"OriginProtocol/origin-playground","owner":"OriginProtocol","description":"Playground for us to try out new ideas, specifically around Identity (ERC 725) \u0026 the Origin Marketplace","archived":false,"fork":false,"pushed_at":"2021-11-30T02:04:39.000Z","size":5458,"stargazers_count":159,"open_issues_count":17,"forks_count":71,"subscribers_count":61,"default_branch":"master","last_synced_at":"2024-04-16T15:42:52.882Z","etag":null,"topics":["erc725","identity","origin","origin-protocol"],"latest_commit_sha":null,"homepage":"https://playground.originprotocol.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OriginProtocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-04T21:16:18.000Z","updated_at":"2024-04-16T15:42:52.883Z","dependencies_parsed_at":"2022-08-26T02:21:13.966Z","dependency_job_id":null,"html_url":"https://github.com/OriginProtocol/origin-playground","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OriginProtocol%2Forigin-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OriginProtocol%2Forigin-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OriginProtocol%2Forigin-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OriginProtocol%2Forigin-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OriginProtocol","download_url":"https://codeload.github.com/OriginProtocol/origin-playground/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226305127,"owners_count":17603744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["erc725","identity","origin","origin-protocol"],"created_at":"2024-11-25T09:30:18.583Z","updated_at":"2024-11-25T09:30:35.553Z","avatar_url":"https://github.com/OriginProtocol.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"![Origin Protocol](data/origin-header.png)\n\nHead to https://www.originprotocol.com/developers to learn more about what we're building and how to get involved.\n\n# Origin Identity Playground\n\n----\n\n**Warning!** This repo contains only our protoyping work around ERC 725. It is now out of date and **should not be used**. Our current identity contracts are [here](https://github.com/OriginProtocol/origin/tree/master/origin-contracts/contracts/identity).\n\n----\n\nThis app is a working implementation of the [ERC 725](https://github.com/ethereum/EIPs/issues/725) and [ERC 735](https://github.com/ethereum/EIPs/issues/735) proposals for managing a unique identity on the blockchain.\n\nUsing ERC 725, a smart contract can protect function calls from being executed unless the sender has a verified claim\nfrom a trusted issuer.\n\n## Live Demo\n\nYou can try a deployed version of this app at http://erc725.originprotocol.com/#/\n\nIt has several Certifiers pre-populated that are not present when running the demo locally. \n\nThe [screenshot walkthrough](#walkthrough) below shows an example of verifying a claims of a person's identity.\n\n## Explanation\n\nImagine we want to deploy a Listing contract to sell a concert ticket, but only allow interactions from\nusers with a verified email address. How can we accomplish this with ERC 725?\n\nFirst, lets define the entities that will be interacting:\n\n* The _Consumer_ is an identity who wants to buy the ticket.\n* The _Issuer_ is an identity which issues claims of type 'EMAIL_VERIFIED'.\n* The _Listing_ will only allow _Consumers_ with an _EMAIL_VERIFIED_ claim from an _Issuer_ they trust.\n\nThis leaves us with a few questions...\n\n1.  How does the trusted Issuer verify an email address?\n2.  How does the Consumer get an EMAIL_VERIFIED claim onto their Identity?\n3.  How can the Listing verify that the Consumer has an EMAIL_VERIFIED claim from a trusted Issuer?\n\nTo answer these questions, lets go through the process of setting up all the required contracts and services, starting\nwith the Issuer.\n\nThe job of the Issuer is to act as a trusted third party. In the future, trusted organizations may deploy their own\nIssuer identity contracts onto the blockchain, which third parties can then trust. Origin plan to offer their own basic\nIssuer contracts for verifying email addresses, phone numbers, Facebook accounts, Twitter accounts, etc. Third parties\nwill then be able to trust that these Origin Issuer contracts only issue claims if they are, in fact, true.\n\nHow will an email verifier work? A typical verification service may involve an application, for example\nhttp://example.com/verify-email. This application will have a standard interface for verifying an email\naddress, whereby a user is sent an email with a special code which they then submit back to the application. Now that\nthe email address has been verified, it can be signed with a private key known only to the email verifier app. The\ncorresponding public key is on the issuer's identity. This is how a claim is verified.\n\nMore explanation to follow...\n\n## Walkthrough\n\n1. Screen upon loading\n\n![image](https://user-images.githubusercontent.com/673455/38565794-1096067c-3c97-11e8-9f37-fce66f5f4fc4.png)\n\n2. Confirm that the first wallet ID is active. (`0x313AaD` in our screenshot) We are playing the role of a person who desires a blockchain identity.\n\n2. Click \"Add an Identity\" and deploy an identity contract with name \"Alice\".\n\n![image](https://user-images.githubusercontent.com/673455/38565831-2adbb70c-3c97-11e8-937b-532b53513709.png)\n\nYou can see the address of the contract, as well as the wallet ID of the owner. \n\n3. Switch the active wallet to the second. (`0x56BEaa` in our screenshot) We are now playing the role of a service that can verify a GitHub account.\n\n4. Click \"Add a Certifier\" and deploy a certifier contract called \"Github\". For now we'll use an example URL for our service. \n\n![image](https://user-images.githubusercontent.com/673455/38567509-3fcf75dc-3c9b-11e8-836d-f419ec3297a0.png)\n\nAgain, you should see the address of this contract, and the walled ID of the owner of this contract. \n\n5. Switch the active wallet to the third. (`0xCd5e74` in our screenshot) We are now playing the role of an eBay-like application that wants to restrict access to only people with verified Github accounts. (A marketplace for developers, perhaps!)\n\n6. Click \"Add a Protected Contract\" and deploy a contract called \"Listing\" with certifier of \"Github\". This is the contract which will be limited to interacting to people with verified Github accounts. \n\n![image](https://user-images.githubusercontent.com/673455/38567736-c6f6c1aa-3c9b-11e8-9f12-99382fcbb022.png)\n\n7. The screen should now look like this. \n\n![image](https://user-images.githubusercontent.com/673455/38567778-e0a15764-3c9b-11e8-9b15-471d0e0b866a.png)\n\n8. Switch to the first wallet, belonging to \"Alice\". \n9. Click on the \"Listing\" contract. \n10. Click on \"Run Protected Method\", and switch the desired Claim Type to \"Has GitHub\",\n\n![image](https://user-images.githubusercontent.com/673455/38567913-2c2d0fa2-3c9c-11e8-8337-38f6cbf0e3fb.png)\n\n11. After clicking on \"Check Claim\", you should see that the claim is returned as **ClaimInvalid**. At this point, Alice has no proof that she has a GitHub account. \n\n![image](https://user-images.githubusercontent.com/673455/38567999-61cdea46-3c9c-11e8-9674-d53173357d51.png)\n\n12. Switch to the second wallet, and click on \"GitHub\" under \"Certifiers\".\n\n13. On right column, click on the \"+\" next to \"Claims\" to add a claim. \n\n14. Switch the \"Claim Type\" to \"Has Github\" and click \"Add Claim\". \n\n![image](https://user-images.githubusercontent.com/673455/38568558-cbe42048-3c9d-11e8-80e4-00ff66e595eb.png)\n\n15. Switch to the first wallet, and click on the \"Alice\" identity. \n\n16. In right column, you should see the claim by our \"Github\" Certifier (from pervious step) that she has a GitHub account. Click \"Approve\" to accept this claim to Alice's identity. \n\n![image](https://user-images.githubusercontent.com/673455/38568275-22da173c-3c9d-11e8-9f98-97f576775346.png)\n\n17. Alice now has on-chain proof of her GitHub!\n\n![image](https://user-images.githubusercontent.com/673455/38568345-44acf5f0-3c9d-11e8-88b9-0b46e75b3926.png)\n\n18. Now click the \"Listing\" under \"Protected Contracts\", and then click on \"Run Protected Method\". Change the \"Claim Type\" to \"Has Github\" \n\n19. You should see that this claim is returned as **ClaimValid***. \n\n![image](https://user-images.githubusercontent.com/673455/38568456-8f40e86a-3c9d-11e8-9e19-50dc9606ef5d.png)\n\nAlice is ready to start shopping!\n\n\n## Installation\n\n    npm install\n    npm start\n\n## Tests\n\n    npm run test\n\n## Related\n\n* https://github.com/mirceapasoi/erc725-735\n\n## Credits\n\n* [JosefJ](https://github.com/JosefJ) for the original contract [implementation](https://github.com/JosefJ/IdentityContract)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOriginProtocol%2Forigin-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOriginProtocol%2Forigin-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOriginProtocol%2Forigin-playground/lists"}