{"id":23929645,"url":"https://github.com/aostrun/notary-public-smart-contract","last_synced_at":"2025-06-12T23:36:31.052Z","repository":{"id":114370353,"uuid":"129802303","full_name":"aostrun/Notary-Public-Smart-Contract","owner":"aostrun","description":"Smart Contract serving as Notary Public","archived":false,"fork":false,"pushed_at":"2018-04-16T21:13:25.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-24T01:50:43.555Z","etag":null,"topics":["ethereum-blockchain","ethereum-dapp","file-validation","smart-contracts","solidity"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aostrun.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-16T20:35:20.000Z","updated_at":"2021-05-06T01:51:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"00db3933-2d4a-43ca-bb9c-6b809db8fed2","html_url":"https://github.com/aostrun/Notary-Public-Smart-Contract","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aostrun/Notary-Public-Smart-Contract","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aostrun%2FNotary-Public-Smart-Contract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aostrun%2FNotary-Public-Smart-Contract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aostrun%2FNotary-Public-Smart-Contract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aostrun%2FNotary-Public-Smart-Contract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aostrun","download_url":"https://codeload.github.com/aostrun/Notary-Public-Smart-Contract/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aostrun%2FNotary-Public-Smart-Contract/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259550403,"owners_count":22875275,"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":["ethereum-blockchain","ethereum-dapp","file-validation","smart-contracts","solidity"],"created_at":"2025-01-05T23:19:09.350Z","updated_at":"2025-06-12T23:36:31.037Z","avatar_url":"https://github.com/aostrun.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Notary Public Smart Contract\nSmart Contract serving as Notary Public\n\n----------------------------------------------------------------------------\n    Author: Andrijan Ostrun\n            April, 2018.\n            github.com/aostrun\n----------------------------------------------------------------------------         \n\n\nSmart Contract serving as Notary Public where you can protect an document \nor a file in general by storing it's hash value on the Ethereum blockchain.\n\nEvery record besides file hash has parties associated with the record (can be \nany number of parties) which can come handy if you are using this as a medium \nto store real contracts.\n\nEvery party associated with the record has to **accept** it before the record becomes\n**valid**. This stands as a protection for all parties involved.\n\n## Use Cases:\n* Generally protect file (document) integrity\n* Copyright proof on files (pictures, videos, etc.)\n\n## Record Creation\n**Creation of new record starts with providing:**\n  * Hash value of the file that is being protected (*uint256*)\n    * Hash functions in most cases return hex representation of hash value, **in order to \n        save that hash value on this Smart Contract you need to convert that string hex representation\n        into uint256**, so basically turn 2 characters into one byte.\n    * Recommendation: use at least SHA256 as hashing function\n  * Parties associated with the record (*address[]*)\n  * Unix Timestamp for record expiration (*uint256*) \n    * current timestamp can be found at: https://www.unixtimestamp.com/\n\n  * Creation of the record returns unique record ID that has to be remembered by parties\n        if they want to access that record ever again.\n\nExample of record creation:\n\n\n    `createRecord(2142131241, [\"address#1\", \"address#2\", \"address#3\"], 2523910141)`\n\n\nParties accept record by calling function *acceptRecord* from their address. \nFunction takes record ID as an argument.\n\n## Record Verification\nFile can be verified by calling *verify* function. Function can be called only from\naddress that is party on particulat record. Function takes record ID and hash value that\nwe want to verify as arguments and returns boolean value, true if provided hash value\nmatches one on the record.\n\n## Record Validity\n**Record is valid if:**\n * timestamp *validUntil* is greater than current timestamp (time aspect)\n * all parties **accepted** the record (party aspect)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faostrun%2Fnotary-public-smart-contract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faostrun%2Fnotary-public-smart-contract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faostrun%2Fnotary-public-smart-contract/lists"}