{"id":16153696,"url":"https://github.com/moneroexamples/transactions-export","last_synced_at":"2025-10-19T07:25:51.856Z","repository":{"id":43644389,"uuid":"45770521","full_name":"moneroexamples/transactions-export","owner":"moneroexamples","description":"Searches blockchain for your outputs and ring members using given address and view key. ","archived":false,"fork":false,"pushed_at":"2023-03-01T10:57:12.000Z","size":1039,"stargazers_count":26,"open_issues_count":0,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-16T23:21:48.021Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moneroexamples.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":"2015-11-08T07:01:22.000Z","updated_at":"2023-12-21T20:15:05.000Z","dependencies_parsed_at":"2024-10-27T19:25:56.103Z","dependency_job_id":null,"html_url":"https://github.com/moneroexamples/transactions-export","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/moneroexamples%2Ftransactions-export","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moneroexamples%2Ftransactions-export/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moneroexamples%2Ftransactions-export/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moneroexamples%2Ftransactions-export/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moneroexamples","download_url":"https://codeload.github.com/moneroexamples/transactions-export/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244289112,"owners_count":20429135,"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-10T01:14:13.928Z","updated_at":"2025-10-19T07:25:51.741Z","avatar_url":"https://github.com/moneroexamples.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Exporting our transactions from blockchain and searching for ring members into csv files\n\nIn this example, it is shown how to export our transactions from the blockchain\ninto a csv file. This can be very useful\nfor making summaries or reports of our incoming and outgoing (when spend key is given)\n transactions.\n\nAlso it shows how we can search in which transactions used our outputs as\nits ring members.\n\n\n\n## Compilation on Ubuntu 22.04\n\n##### Compile latest Monero \n\nDownload and compile recent Monero into your home folder as shown in the following link:\n\nhttps://github.com/moneroexamples/monero-compilation#example-compilation-of-master-branch-ie-development-version-of-monero-on-ubuntu-2004\n\n##### Compile the transactions-export\n\nOnce the Monero is compiles, the transactions-export can be downloaded and compiled\nas follows:\n\n```bash\n# go to home folder if still in ~/monero\ncd ~\n\n# download the source code\ngit clone https://github.com/moneroexamples/transactions-export.git\n\n# enter the downloaded sourced code folder\ncd transactions-export\n\n# make a build folder and enter it\nmkdir build \u0026\u0026 cd build\n\n# create the makefile\ncmake ..\n\n# altearnatively can use: cmake -DMONERO_DIR=/path/to/monero_folder ..\n# if monero is not in ~/monero\n\n# compile\nmake\n```\n\n\n## Program options\n```bash\n[mwo@arch cmake-build-debug]$ ./xmr2csv -h\nxmr2csv, export all your transactions into csv file:\n  -h [ --help ] [=arg(=1)] (=0)         produce help message\n  -a [ --address ] arg                  monero address string\n  -v [ --viewkey ] arg                  private view key string\n  -s [ --spendkey ] arg                 private spend key string\n  -t [ --start-height ] arg             start from given height\n  -n [ --no-of-blocks ] arg (=0)        number of blocks to search starting \n                                        from start-height\n  -d [ --start-date ] arg               start roughly from given date: \n                                        yyyy-mm-dd\n  -c [ --out-csv-file ] arg (=xmr_report.csv)\n                                        name of outputs csv file\n  -r [ --out-csv-file2 ] arg (=xmr_report_ring_members.csv)\n                                        name of outputs csv file for file \n                                        containing  out outputs as ring members\n  -r [ --out-csv-file3 ] arg (=xmr_report_ring_members_freq.csv)\n                                        name of outputs csv file for file \n                                        containing frequencies of outputs as \n                                        ring members\n  -r [ --out-csv-file4 ] arg (=xmr_report_key_images_outputs.csv)\n                                        name of outputs csv file for file \n                                        containing all key images scanned with \n                                        the referenced output public keys\n  -b [ --bc-path ] arg                  path to lmdb blockchain\n  --testnet [=arg(=1)] (=0)             is the address from testnet network\n  -m [ --ring-members ] [=arg(=1)] (=0) search where our outputs are as ring \n                                        members\n  --all-outputs [=arg(=1)] (=0)         save all outputs, whether they are ours\n                                        or not\n  --all-key-images [=arg(=1)] (=0)      save all key_images, whether they are \n                                        ours or not, with referenced output \n                                        public keys\n```\n\n## Getting our outputs using address and viewkey\n\nFor testing of the viewer, one can use [official address and viewkey](https://github.com/monero-project/bitmonero#supporting-the-project)\nof the Monero, i.e.,\n\n- Address: 44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A\n- Viewkey: f359631075708155cc3d92a32b75a7d02a5dcf27756707b47a2b31b21c389501\n\n```bash\n./xmr2csv -a 44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A -v f359631075708155cc3d92a32b75a7d02a5dcf27756707b47a2b31b21c389501 -c ./current.csv \n```\n\nMonero [forum donation](https://www.reddit.com/r/Monero/comments/5j2rm7/in_last_four_weekes_there_were_about_850_xmr/dbdmzt7/?context=3),\n\n- Address: 45ttEikQEZWN1m7VxaVN9rjQkpSdmpGZ82GwUps66neQ1PqbQMno4wMY8F5jiDt2GoHzCtMwa7PDPJUJYb1GYrMP4CwAwNp\n- Viewkey: c9347bc1e101eab46d3a6532c5b6066e925f499b47d285d5720e6a6f4cc4350c\n\n```bash\n./xmr2csv -a 45ttEikQEZWN1m7VxaVN9rjQkpSdmpGZ82GwUps66neQ1PqbQMno4wMY8F5jiDt2GoHzCtMwa7PDPJUJYb1GYrMP4CwAwNp -v c9347bc1e101eab46d3a6532c5b6066e925f499b47d285d5720e6a6f4cc4350c -c ./forum.csv\n```\n\n[Old Monero donation](https://github.com/monero-project/monero/pull/714/files) address:\n\n- Address: 46BeWrHpwXmHDpDEUmZBWZfoQpdc6HaERCNmx1pEYL2rAcuwufPN9rXHHtyUA4QVy66qeFQkn6sfK8aHYjA3jk3o1Bv16em \n- Viewkey: e422831985c9205238ef84daf6805526c14d96fd7b059fe68c7ab98e495e5703\n\n```bash\n./xmr2csv -a 46BeWrHpwXmHDpDEUmZBWZfoQpdc6HaERCNmx1pEYL2rAcuwufPN9rXHHtyUA4QVy66qeFQkn6sfK8aHYjA3jk3o1Bv16em -v e422831985c9205238ef84daf6805526c14d96fd7b059fe68c7ab98e495e5703 -c ./old.csv\n```\n\n\n\n## Searching txs which use our outputs as ring members and their frequency\n\nJust add `-m` flag. This will produce `xmr_report_ring_members.csv` and `xmr_report_ring_members_frew.csv` files\n (default names) which\ncontain the list of txs which use our outputs, and frequency of outputs use, respectively. To speed up the search\nwe can use `-t` flag to specify starting block.\n\n#### Example 1 (Monero project donation address)\n\n```bash\n./xmr2csv -t 00580000 -m -a 45ttEikQEZWN1m7VxaVN9rjQkpSdmpGZ82GwUps66neQ1PqbQMno4wMY8F5jiDt2GoHzCtMwa7PDPJUJYb1GYrMP4CwAwNp -v c9347bc1e101eab46d3a6532c5b6066e925f499b47d285d5720e6a6f4cc4350c\n```\n\nExample frequency list output:\n\n```\nMost frequent outputs used as ring members are:\n - \u003c6c04b7393d223b4c3b35493219c6a4d9bb37b6739c9a22193394d5e81964b5a3\u003e: 12 times with ring sizes of 3_3_4_23_3_3_3_3_5_11_5_21\n - \u003cda3cbc0bb751e938d058c556f3c1a3ce215231c04d834f99e6a603c67d17648a\u003e: 11 times with ring sizes of 3_3_3_5_4_3_4_3_5_5_5\n - \u003cd442396157c8bbf8175964c4de41f9a5f1b0afda9feca952e9837d82e8a0b8fd\u003e: 11 times with ring sizes of 3_3_3_5_3_3_5_3_41_5_5\n - \u003c51897c55c3b25daae30bf04cc8cebacddf559fb0cb6f4194f1e292931b57c29a\u003e: 10 times with ring sizes of 4_3_3_3_3_5_10_3_3_5\n - \u003c3ae472a405ffb000fa14cb380a5408cdebe25610ab16ced17cc9cf601dcf3860\u003e: 10 times with ring sizes of 26_11_4_9_13_11_4_3_5_11\n - \u003c04782e24ca5c944f0d4bb764fd3b95c6b6f59144ee2a3c7530a2269e4a19a650\u003e: 10 times with ring sizes of 1_27_21_26_11_3_5_3_3_3\n - \u003c435d2667c93dd7f5960d02cb920ee8db8fda693dd699e1c659703bf1fc359a86\u003e: 10 times with ring sizes of 3_3_5_5_3_5_5_21_5_5\n - \u003c0c6eec50b66c9a453ba6ad7b5228d3d224d187cd53ef215076d55d2347018969\u003e: 10 times with ring sizes of 3_5_5_3_5_3_3_5_5_5\n - \u003c253641711e995282ecd9182a862d474a782b2d642369dd4759e4c81dd8c117e7\u003e: 10 times with ring sizes of 26_5_5_5_3_3_3_3_3_5\n```\n\n#### Example 2 (Monerujo project donation address)\n\n\n```bash\n./xmr2csv -t 01381000 -m -a 4AdkPJoxn7JCvAby9szgnt93MSEwdnxdhaASxbTBm6x5dCwmsDep2UYN4FhStDn5i11nsJbpU7oj59ahg8gXb1Mg3viqCuk -v b1aff2a12191723da0afbe75516f94dd8b068215f6e847d8da57aca5f1f98e0c\n```\n\nExample frequency list output:\n\n```\nMost frequent outputs used as ring members are:\n - \u003c024a777f20a02a3c145c27e8dd53d05c708b78e1c9832f6b843acfd29c6ac469\u003e: 10 times with ring sizes of 5_5_6_5_5_5_5_5_5_41\n - \u003c64d6394f2f11142ef04dc67bb7bd2ae5e0ff0f11d0a211e4fe28d58dfdd6d6e3\u003e: 7 times with ring sizes of 5_5_6_5_5_5_5\n - \u003ca05963e393f65f225beccea21c0aab29db261ead252444da9063445c60fdc2c3\u003e: 7 times with ring sizes of 5_5_26_5_5_5_5\n - \u003cb50f169d04c4e74c35437efc9da832091737c61a8e990182951758a2702d6080\u003e: 7 times with ring sizes of 5_3_3_5_5_5_21\n - \u003ccc75ba4c950d62e6fe27235021e1c492d9a92bfe66fb90cc28225e7fd169a5dc\u003e: 7 times with ring sizes of 6_5_5_5_5_5_5\n - \u003c77328c5ea44e92c487205b24e10860bf73167907924b178923261dcb2d4b41d3\u003e: 7 times with ring sizes of 5_5_5_5_5_5_5\n - \u003cff00dc60cbc599e520d33d5bbc999daf1f4e30479e558b425ef8d092809af5d5\u003e: 6 times with ring sizes of 5_5_6_3_5_5\n - \u003cd836c0eddcee6e2f0b0b6f4d541194a70502dbcbd9c2b6858b6d7f035f163627\u003e: 6 times with ring sizes of 5_5_5_9_5_5\n - \u003c1b92b3e6c650c248a4865a95a15e1d264037b4068c7053119d5288aa70e60c8f\u003e: 6 times with ring sizes of 5_5_5_5_5_21\n```\n\n## How can you help?\n\nConstructive criticism, code and website edits are always good. They can be made through github.\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoneroexamples%2Ftransactions-export","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoneroexamples%2Ftransactions-export","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoneroexamples%2Ftransactions-export/lists"}