{"id":22790712,"url":"https://github.com/zachalam/tamperproof","last_synced_at":"2025-09-23T17:19:45.164Z","repository":{"id":78266695,"uuid":"182650714","full_name":"zachalam/TamperProof","owner":"zachalam","description":"Hash MongoDB Documents on EOS.IO blockchains.","archived":false,"fork":false,"pushed_at":"2019-04-29T14:32:10.000Z","size":62902,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-14T10:26:22.849Z","etag":null,"topics":["blockchain","eos","eosio","mongodb","npm","smart-contracts"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zachalam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2019-04-22T07:57:13.000Z","updated_at":"2022-01-09T13:04:43.000Z","dependencies_parsed_at":"2023-03-05T10:45:29.529Z","dependency_job_id":null,"html_url":"https://github.com/zachalam/TamperProof","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/zachalam/TamperProof","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachalam%2FTamperProof","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachalam%2FTamperProof/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachalam%2FTamperProof/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachalam%2FTamperProof/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zachalam","download_url":"https://codeload.github.com/zachalam/TamperProof/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachalam%2FTamperProof/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276614032,"owners_count":25673594,"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","status":"online","status_checked_at":"2025-09-23T02:00:09.130Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["blockchain","eos","eosio","mongodb","npm","smart-contracts"],"created_at":"2024-12-12T02:28:45.625Z","updated_at":"2025-09-23T17:19:45.119Z","avatar_url":"https://github.com/zachalam.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![TamperProof Logo](https://github.com/zachalam/TamperProof/blob/master/images/logo.png?raw=true)\n\nA utility that conveniently links MongoDB to EOS blockchains.\n\n## Motive\nBlockchains provide security and transparency. Unfortunately it's very difficult for existing applications to take advantage of the benefits they offer. We're migrating towards a world where the public will not trust unverifiable data sources. With **TamperProof**, anyone can prove the state of their MongoDB database by fingerprinting it on a EOS powered blockchain.\n\n![TamperProof Process](https://github.com/zachalam/TamperProof/blob/master/images/process.png?raw=true)\n\n## Installation\n```\nnpm i -g tamperproof\n```\n\n## Usage\nHash a 'single' document.\n```\ntamperproof \\\n-d database_name \\\n-c collection_name \\\n-x mongodb+srv://mongodb_connection_string \\\n-i 5cbba8a857a66431e9bb2164 \\\n-a accountuser1 \\\n-k 5J7J5tD9WrKWAkAVyXLNonh2WcVqWBXxajmMthDPTuJbBksDhyz\n```\n\nHash a 'whole' collection.\n```\ntamperproof \\\n-d database_name \\\n-c collection_name \\\n-x mongodb+srv://mongodb_connection_string \\\n-a accountuser1 \\\n-k 5J7J5tD9WrKWAkAVyXLNonh2WcVqWBXxajmMthDPTuJbBksDhyz\n```\n\n## Sample Result\n```\nIdentifier: [\"my_mongo_db\",\"predictions\"]\n=\u003e 0adb7441e30f6970596a759a80114f748ea53da2ac5dcb5f99925762243dd890 (identifier)\n-------------------------------------\nTalking to MongoDB...\nNumber of documents in Hash: 2\n[{\"_id\":\"5cc5e16c57a66431e9bb217c\",\"home_team\":\"Eagles\",\"away_team\":\"Bobcats\",\"prediction\":\"10-0\",\"winning_team\":\"Eagles\",\"gametime\":\"10-03-2020 @ 10:00PM\"},{\"_id\":\"5cc5e2104cb78c31e97ebee2\",\"home_team\":\"Tigers\",\"away_team\":\"Bears\",\"prediction\":\"20-15\",\"winning_team\":\"Tigers\",\"gametime\":\"10-05-2020 @ 10:00PM\"}]\n=\u003e 66407328a8492ad22f3a526476059810512e9f65ab012bf7410a31579ec12e7e (data)\n-------------------------------------\nWriting to Blockchain...\nSuccessfully wrote to chain with TX id.\n=\u003e 70c99fc7aa16f33f1f49a6f68bded1ec08a4ccc5f5b4c1dabc27bd3021276f46\nhttps://bloks.io/transaction/70c99fc7aa16f33f1f49a6f68bded1ec08a4ccc5f5b4c1dabc27bd3021276f46\n```\n\n## Interpreting Results\nBoth the \"identifier\" and the \"data\" properties are hashed with SHA256.\n* The identifier is a hash of an array converted to a string. The array is one of the following formats: [\"database\",\"collection\"] or [\"database\",\"collection\",\"_id\"]\n* The data is a hash of a string of the Result returned from the database. This string is created by passing the DB result to JSON.stringify().\n\n\n## Parameters\n| Parameter | Example                                                | Purpose                                | Required |\n|-----------|--------------------------------------------------------|----------------------------------------|----------|\n| -x        | mongodb+srv://\u003cuser\u003e:\u003cpass\u003e@cluster0-bwwwb.mongodb.net | MongoDB connection string.             | YES      |\n| -d        | my_database_name                                       | MongoDB database name.                 | No       |\n| -c        | my_collection_name                                     | MongoDB collection name.               | No       |\n| -i        | 5cbba8a857a66431e9bb2164                               | _id for document lookup.               | No       |\n| -k        | 5J7J5tD9WrKWAkAVyXLNonh2WcVqWBXxajmMthDPTuJbBksDhyz    | EOSIO private key (active permission). | YES      |\n| -a        | useraccount1                                           | EOSIO account name.                    | YES      |\n| -e        | https://publicapi-mainnet.eosauthority.com             | EOSIO http endpoint.                   | No       |\n\n* Note: Sensitive parameters should be stored as session data and not passed via command line.\n\n## Use Programatically\n```\nlet tamperproof = require(\"tamperproof\")\n\n;(async () =\u003e {\n  let result = await tamperproof({\n    d: \"my_database_name\",\n    c: \"my_collection_name\",\n    i: \"5cbba8a857a66431e9bb2164\",\n    x: \"mongodb+srv://\u003cuser\u003e:\u003cpass\u003e@cluster0-bwwwb.mongodb.net\",\n    a: \"useraccount1\",\n    k: \"5J7J5tD9WrKWAkAVyXLNonh2WcVqWBXxajmMthDPTuJbBksDhyz\",\n    e: \"https://publicapi-mainnet.eosauthority.com\" // endpoint required.\n  })\n})()\n```\n\n## Acquire Blockchain Account\nAccounts are free on private EOS blockchains. If you wish to use the public EOS blockchain (default setting) there is a small one-time fee (typically ~$1). This will provide you with both a private key and account name of your choice (-k and -a params). \n\n[https://www.eosnameservice.io](https://www.eosnameservice.io/?ref=zachzachzach)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzachalam%2Ftamperproof","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzachalam%2Ftamperproof","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzachalam%2Ftamperproof/lists"}