{"id":16559399,"url":"https://github.com/anders94/transaction-generator","last_synced_at":"2026-04-20T07:02:30.924Z","repository":{"id":149692885,"uuid":"323938779","full_name":"anders94/transaction-generator","owner":"anders94","description":"Generates random valid transactions.","archived":false,"fork":false,"pushed_at":"2020-12-23T16:44:12.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-15T12:12:30.377Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/anders94.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":"2020-12-23T15:35:05.000Z","updated_at":"2020-12-23T16:44:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"722d631a-d00a-4835-b186-5c639623d250","html_url":"https://github.com/anders94/transaction-generator","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/anders94%2Ftransaction-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders94%2Ftransaction-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders94%2Ftransaction-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders94%2Ftransaction-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anders94","download_url":"https://codeload.github.com/anders94/transaction-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241950146,"owners_count":20047591,"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":[],"created_at":"2024-10-11T20:25:52.779Z","updated_at":"2026-04-20T07:02:30.817Z","avatar_url":"https://github.com/anders94.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# transaction-generator\nGenerates random valid looking transactions for use as test data. You can control the:\n\n* Number of inputs (example: from 1 to 3)\n* Number of outputs (example: from 1 to 5)\n* Respend minimum (example: don't respend within 800k transactions)\n\nRequires node.js with `npm` and PostgreSQL.\n\n## Output Format\nThe output format is similar to https://github.com/anders94/dump-bitcoin-transactions\n```\n{\n  \"ins\":[\n    \"\u003cid\u003e\",\n    \"\u003cid\u003e\",\n    ...\n  ],\n  \"outs\":[\n    [\"\u003cid\u003e\",\"\u003cvalue\u003e\"],\n    [\"\u003cid\u003e\",\"\u003cvalue\u003e\"],\n    ...\n  ]\n}\n```\n\n\n## Sample Output\n```\n{\"ins\":[\"0000000000000000000000000000000000000000000000000000000000000000\"],\"outs\":[[\"0eea2459eca88fe67d5d243fc80aff57344a157ac8da42ee3b8d930961ad51d2\",6142000]]}\n{\"ins\":[\"0000000000000000000000000000000000000000000000000000000000000000\"],\"outs\":[[\"448aabdd7a63c85969381aee4be4f60dff78293d4796af351151f8abf4271a95\",8050500]]}\n{\"ins\":[\"ee42c2d2e2169fdf9140f05ee94fce5befdd128d6ece2780238f332ee550ef71\",\"e844f61ee7f1c835f98f5c6fefad2ba0f038a5c7f097ad58f4d0d9e5b536a218\"],\"outs\":[[\"d2eb5df599ab7b12b98b4dc85cf9b1d3dd0ab6bad1c98810cdd9823d3c04cb5f\",1979302],[\"cb6b8119842199c4c72dd8ebd732046d69f4a3745efde8454ee1685f02ce601d\",544972],[\"acdddaf1c683243f0527455f929cdcba035ea3c9787eab89bd5e44ca5051c5e2\",3854926]]}\n{\"ins\":[\"a37bdb046bf3288df426d9286f69cacc72d504c4c33e70aa9bfff5060317f99b\",\"9e53bde859862d7972b4f1f293a233040b560e05f6e31d6d4e8896bcebef3e81\"],\"outs\":[[\"379709b23bc0807e48c4aea5b3bf20cb9c89464b11a3d7db28c3c30cdc01579c\",353100],[\"075cbc25a54d173d8d5a9c7bdf59c665d26680d2fe6d0f3f1651df4d5c11c07a\",475857],[\"92488dde980ea0f86f6ae8ac62ab2e61d83d9798a3cdeab72b0b4138db0cfa8d\",6539443]]}\n```\n\n## Setup\nInstall the dependancies:\n```\nnpm install\n```\n\nInstall `db-migrate` globally so you have it in your path:\n```\nnpm install -g db-migrate\n```\n\nSet environment variables to point to your PostgreSQL instance:\n```\nexport PGHOST=\"127.0.0.1\"\nexport PGDATABASE=\"transaction-generator_dev\"\nexport PGUSERNAME=\"\u003cusername\u003e\"\nexport PGPASSWORD=\"\u003cyour-password-here\u003e\"\n```\n\nRun the database migrations:\n```\ndb-migrate up\n```\n\n## Usage\nAdjust the options near the top of `app.js`.\n\n```\nconst totalAccounts = 1_000_000;\nconst totalTransactions = 100_000_000;\nconst minimumAge = 800_000; // respend delay - at least this many steps after output creation\n\nconst initialAmountMin = 100;\nconst initialAmountMax = 100000;\nconst inputsMax = 2;  // maximum number of inputs to consume per transaction\nconst outputsMax = 4; // maximum number of outputs to create per transaction\n```\n\nRun the app and capture the results from STDOUT.\n```\nnode app \u003e transactions.txt\n```\n\n## License\nCopyright (c) 2020 Anders Brownworth\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanders94%2Ftransaction-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanders94%2Ftransaction-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanders94%2Ftransaction-generator/lists"}