{"id":19883676,"url":"https://github.com/muchdogesec/crypto2stix","last_synced_at":"2025-10-14T04:36:34.305Z","repository":{"id":246183573,"uuid":"819812243","full_name":"muchdogesec/crypto2stix","owner":"muchdogesec","description":"A command line tool that takes a crypto transactions or wallets and turns them into STIX objects. Currently only supports Bitcoin.","archived":false,"fork":false,"pushed_at":"2025-06-26T08:12:59.000Z","size":328,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-10T00:19:08.957Z","etag":null,"topics":["bitcoin","cryptocurrency","stix2","stix2-extensions"],"latest_commit_sha":null,"homepage":"https://www.dogesec.com/","language":"Python","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/muchdogesec.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-25T08:47:23.000Z","updated_at":"2025-06-26T08:13:01.000Z","dependencies_parsed_at":"2024-06-26T11:01:28.380Z","dependency_job_id":"8199ba1c-3dd3-4c8c-a2d1-99826f830690","html_url":"https://github.com/muchdogesec/crypto2stix","commit_stats":null,"previous_names":["muchdogesec/crypto2stix"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/muchdogesec/crypto2stix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muchdogesec%2Fcrypto2stix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muchdogesec%2Fcrypto2stix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muchdogesec%2Fcrypto2stix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muchdogesec%2Fcrypto2stix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muchdogesec","download_url":"https://codeload.github.com/muchdogesec/crypto2stix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muchdogesec%2Fcrypto2stix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017931,"owners_count":26086213,"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-10-14T02:00:06.444Z","response_time":60,"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":["bitcoin","cryptocurrency","stix2","stix2-extensions"],"created_at":"2024-11-12T17:21:59.445Z","updated_at":"2025-10-14T04:36:34.273Z","avatar_url":"https://github.com/muchdogesec.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# crypto2stix\n\n## Overview\n\n![](docs/crypto2stix.png)\n\nA command line tool that takes crypto transactions and wallets, and turns them into STIX objects. Currently only supports Bitcoin.\n\n## tl;dr\n\n[![crypto2stix](https://img.youtube.com/vi/ott1aIOKbGQ/0.jpg)](https://www.youtube.com/watch?v=ott1aIOKbGQ)\n\n[Watch the demo](https://www.youtube.com/watch?v=ott1aIOKbGQ).\n\n## Overview\n\nOne of our tools, [txt2stix](https://github.com/muchdogesec/txt2stix/), extracts bitcoin wallets from text.\n\nBehind each wallet (and transaction) is wide variety of data.\n\nGiven the main use-cases of txt2stix is for threat intelligence research, this data can be incredibly useful (e.g. what transactions has a wallet had inflows?).\n\ncrypto2stix is designed to take a crypto transaction or wallet hash, enrich them with more data, and convert everything into STIX objects.\n\n## Installing the script\n\nTo install crypto2stix;\n\n```shell\n# clone the latest code\ngit clone https://github.com/muchdogesec/crypto2stix\n# create a venv\ncd crypto2stix\npython3 -m venv crypto2stix-venv\nsource crypto2stix-venv/bin/activate\n# install requirements\npip3 install -r requirements.txt\n```\n\n## Running the script\n\nStarting with a transaction hash;\n\n```shell\npython3 crypto2stix.py --transaction HASH\n```\n\nStarting with a wallet hash;\n\n```shell\npython3 crypto2stix.py --wallet HASH --transactions_only\n```\n\nPassing the `--transactions_only` flag will generate the wallet for the wallet HASH passed in the CLI, and all transactions related to it.\n\nOmitting the `--transactions_only` will also generate wallet objects for every single wallet mentioned in the transactions the wallet HASH passed in the CLI is linked to.\n\n```shell\npython3 crypto2stix.py --wallet HASH --wallet_only\n```\n\nPassing the `--wallet_only` flag will only generate the wallet object for the wallet HASH passed in the CLI.\n\n### Example runs using Wannacry data\n\n```shell\npython3 crypto2stix.py --transaction 3a5395bc3e8584786ad0598db33adda0b991814fd035089d69d7e2bda3272893\n```\n\nSee: `outputs/transaction_example.json`\n\n```shell\npython3 crypto2stix.py --wallet 115p7UMMngoj1pMvkpHijcRdfJNXj6LrLn --transactions_only\n```\n\nSee: `outputs/wallet_transactions_only_example.json`\n\n```shell\npython3 crypto2stix.py --wallet 115p7UMMngoj1pMvkpHijcRdfJNXj6LrLn --wallet_only\n```\n\nSee: `outputs/wallet_only_example.json`\n\n```shell\npython3 crypto2stix.py --wallet 115p7UMMngoj1pMvkpHijcRdfJNXj6LrLn\n```\n\nSee: `outputs/wallet_example.json`\n\n## Blockchain data\n\nThe [blockchain.com API] is a good resource for looking up Bitcoin transactions and wallets.\n\n### Starting with a transaction\n\n```shell\nGET https://blockchain.info/rawtx/$tx_hash\n```\n\n```shell\nGET https://blockchain.info/rawtx/d63a3757a2a7b4c58e49f5a2e4236b1d4cbc2e4ffc9aa04c636707cb0bbbee7b\n```\n\n```json\n{\n  \"hash\": \"d63a3757a2a7b4c58e49f5a2e4236b1d4cbc2e4ffc9aa04c636707cb0bbbee7b\",\n  \"ver\": 1,\n  \"vin_sz\": 2,\n  \"vout_sz\": 2,\n  \"size\": 373,\n  \"weight\": 1492,\n  \"fee\": 50000,\n  \"relayed_by\": \"0.0.0.0\",\n  \"lock_time\": 0,\n  \"tx_index\": 4360488657445100,\n  \"double_spend\": false,\n  \"time\": 1495108523,\n  \"block_index\": 466967,\n  \"block_height\": 466967,\n  \"inputs\": [\n    {\n      \"sequence\": 4294967295,\n      \"witness\": \"\",\n      \"script\": \"483045022100b107ae12209e86cee676940436f6778bc29d54a0e4047f1b367c10959f61a0fb022045ce67f745f67f6d4033216eb0e5d78549db675abbb0bdf4e257700ea68394ad012102b0eb710c74a391c8e964d72b3361871d25191c87f1c9a8e42f7ee79bbf2bda49\",\n      \"index\": 0,\n      \"prev_out\": {\n        \"type\": 0,\n        \"spent\": true,\n        \"value\": 11845608,\n        \"spending_outpoints\": [\n          {\n            \"tx_index\": 4360488657445100,\n            \"n\": 0\n          }\n        ],\n        \"n\": 1,\n        \"tx_index\": 4021013296723384,\n        \"script\": \"76a914b514578153fa240bfc568d6d042335914c50ab4d88ac\",\n        \"addr\": \"1HWTg6YPnbb4DoPqmY8bwFr6s8BoHyAVBf\"\n      }\n    },\n    {\n      \"sequence\": 4294967295,\n      \"witness\": \"\",\n      \"script\": \"4730440220440d8f90d0feb3a795122a38f24904103abe47620b0c83eca96de616015a93e002205afc3099b5e7cd4b93add77496be979c3263842dd15a669b5deacbfbfe48b249012102c9161829e8e774355f09b5fe0b7a0227076d7d843bcace78cf4dd275aceaf368\",\n      \"index\": 1,\n      \"prev_out\": {\n        \"type\": 0,\n        \"spent\": true,\n        \"value\": 5464724,\n        \"spending_outpoints\": [\n          {\n            \"tx_index\": 4360488657445100,\n            \"n\": 1\n          }\n        ],\n        \"n\": 1,\n        \"tx_index\": 5454612254876663,\n        \"script\": \"76a914d4a013f66ea64c5a7535626ed7d740834bfcb1a488ac\",\n        \"addr\": \"1LPG25hYrc91YgoBqrZwkqg7xapLX5GQGe\"\n      }\n    }\n  ],\n  \"out\": [\n    {\n      \"type\": 0,\n      \"spent\": true,\n      \"value\": 17171661,\n      \"spending_outpoints\": [\n        {\n          \"tx_index\": 1682140634081877,\n          \"n\": 62\n        }\n      ],\n      \"n\": 0,\n      \"tx_index\": 4360488657445100,\n      \"script\": \"76a91400e8fd98ca34f195b020af4a8b1c7238663d421288ac\",\n      \"addr\": \"115p7UMMngoj1pMvkpHijcRdfJNXj6LrLn\"\n    },\n    {\n      \"type\": 0,\n      \"spent\": false,\n      \"value\": 88671,\n      \"spending_outpoints\": [],\n      \"n\": 1,\n      \"tx_index\": 4360488657445100,\n      \"script\": \"76a9149872ea5a955b2148b2092d4b5934cdb91c70efb188ac\",\n      \"addr\": \"1Eu5Nd9mx3qXn52gKy7zTQRvgXcHeQCfwa\"\n    }\n  ]\n}\n```\n\nThe transaction `time` is `1495108523` (epoch time) = `2017-05-18T11:53:23.000Z`.\n\nThe `fee` was `50000` = `0.0005` BTC.\n\nThe block ID was `466967`\n\nThe transaction has two `inputs.prev_out` entries (the wallets the Bitcoin came from) with `addr` and `value` properties:\n\n* `1HWTg6YPnbb4DoPqmY8bwFr6s8BoHyAVBf` who sent `11845608` = (11845608 / 100000000) `0.11845608` BTC)\n* `1LPG25hYrc91YgoBqrZwkqg7xapLX5GQGe` who sent `5464724` = `0.05464724` BTC\n\nThey send money to the `out` entries;\n\n* `115p7UMMngoj1pMvkpHijcRdfJNXj6LrLn` who received `17171661` = `0.17171661` BTC\n* `1Eu5Nd9mx3qXn52gKy7zTQRvgXcHeQCfwa` who received `88671` = `0.00088671` BTC\n\nUsing our custom STIX objects:\n\n* cryptocurrency-transaction\n    * extension-definition\n* cryptocurrency-wallet\n    * extension-definition\n\nIt is possible to model this transaction.\n\nThe wallets;\n\n```json\n{\n    \"type\": \"cryptocurrency-wallet\",\n    \"spec_version\": \"2.1\",\n    \"id\": \"cryptocurrency-wallet--02095d7d-fc71-5aee-8037-a0baeefc8356\",\n    \"address\": \"1HWTg6YPnbb4DoPqmY8bwFr6s8BoHyAVBf\",\n    \"extensions\": {\n        \"extension-definition--be78509e-6958-51b1-8b26-d17ee0eba2d7\": {\n            \"extension_type\": \"new-sco\"\n        }\n    }\n},\n{\n    \"type\": \"cryptocurrency-wallet\",\n    \"spec_version\": \"2.1\",\n    \"id\": \"cryptocurrency-wallet--f6b10c0c-745f-580b-89e0-616971d2b75d\",\n    \"address\": \"1LPG25hYrc91YgoBqrZwkqg7xapLX5GQGe\",\n    \"extensions\": {\n        \"extension-definition--be78509e-6958-51b1-8b26-d17ee0eba2d7\": {\n            \"extension_type\": \"new-sco\"\n        }\n    }\n},\n{\n    \"type\": \"cryptocurrency-wallet\",\n    \"spec_version\": \"2.1\",\n    \"id\": \"cryptocurrency-wallet--445cd431-5735-5436-9713-8798a63c1952\",\n    \"address\": \"115p7UMMngoj1pMvkpHijcRdfJNXj6LrLn\",\n    \"extensions\": {\n        \"extension-definition--be78509e-6958-51b1-8b26-d17ee0eba2d7\": {\n            \"extension_type\": \"new-sco\"\n        }\n    }\n},\n{\n    \"type\": \"cryptocurrency-wallet\",\n    \"spec_version\": \"2.1\",\n    \"id\": \"cryptocurrency-wallet--76e4d830-ede6-5b40-817e-e42f06698970\",\n    \"address\": \"1Eu5Nd9mx3qXn52gKy7zTQRvgXcHeQCfwa\",\n    \"extensions\": {\n        \"extension-definition--be78509e-6958-51b1-8b26-d17ee0eba2d7\": {\n            \"extension_type\": \"new-sco\"\n        }\n    }\n}\n```\n\nThe UUIDs are generated using the namespace `00abedb4-aa42-466c-9c01-fed23315a9b7` and the `address` value.\n\nNow we can model the actual transaction using these objects.\n\n```json\n{\n    \"type\": \"cryptocurrency-transaction\",\n    \"spec_version\": \"2.1\",\n    \"id\": \"cryptocurrency-transaction--1e832ccc-78e2-5be5-b004-18ed031b6efe\",\n    \"symbol\": \"BTC\",\n    \"hash\": \"d63a3757a2a7b4c58e49f5a2e4236b1d4cbc2e4ffc9aa04c636707cb0bbbee7b\",\n    \"block_id\": \"466967\",\n    \"fee\": \"0.0005\",\n    \"execution_time\": \"2017-05-18T11:53:23.000Z\",\n    \"input\": [\n        {\n            \"address_ref\": \"cryptocurrency-wallet--02095d7d-fc71-5aee-8037-a0baeefc8356\",\n            \"amount\": 0.11845608\n        },\n        {\n            \"address_ref\": \"cryptocurrency-wallet--f6b10c0c-745f-580b-89e0-616971d2b75d\",\n            \"amount\": 0.05464724\n        }\n    ],\n    \"output\": [\n        {\n            \"address_ref\": \"cryptocurrency-wallet--445cd431-5735-5436-9713-8798a63c1952\",\n            \"amount\": 0.17171661\n        },\n        {\n            \"address_ref\": \"cryptocurrency-wallet--76e4d830-ede6-5b40-817e-e42f06698970\",\n            \"amount\": 0.00088671\n        }\n    ],\n    \"extensions\": {\n        \"extension-definition--151d042d-4dcf-5e44-843f-1024440318e5\": {\n            \"extension_type\": \"new-sco\"\n        }\n    }\n}\n```\n\n### Starting with a wallet\n\n```shell\nGET https://blockchain.info/rawaddr/$bitcoin_address\n```\n\n```shell\nGET https://blockchain.info/rawaddr/115p7UMMngoj1pMvkpHijcRdfJNXj6LrLn\n```\n\n```json\n{\n  \"hash160\": \"00e8fd98ca34f195b020af4a8b1c7238663d4212\",\n  \"address\": \"115p7UMMngoj1pMvkpHijcRdfJNXj6LrLn\",\n  \"n_tx\": 124,\n  \"n_unredeemed\": 10,\n  \"total_received\": 1487769994,\n  \"total_sent\": 1441067602,\n  \"final_balance\": 46702392,\n  \"txs\": [\n    {\n      \"hash\": \"14449446275da0bf11825d14733fcc28f7264f8a2c3a506752f92fddb8e1aa16\",\n      \"ver\": 1,\n      \"vin_sz\": 1,\n      \"vout_sz\": 22,\n      \"size\": 880,\n      \"weight\": 3520,\n      \"fee\": 113880,\n      \"relayed_by\": \"0.0.0.0\",\n      \"lock_time\": 0,\n      \"tx_index\": 797541991687679,\n      \"double_spend\": false,\n      \"time\": 1605337703,\n      \"block_index\": 656858,\n      \"block_height\": 656858,\n      \"inputs\": [\n        {\n          \"sequence\": 4294967295,\n          \"witness\": \"\",\n          \"script\": \"483045022100d2493ce331c957bc0b60cff36cebdc201cca7c70feaca5622a034a6377f63b5f02202976125322d2126737f4a3e8e2cf21efa2dd4e97a468c0b4292f3bd87fa10784012102ee5dc5bd7d0b31b6ff5012fc2f89d3795bec0eac2913ef3cdb72b3b6cfd332b7\",\n          \"index\": 0,\n          \"prev_out\": {\n            \"type\": 0,\n            \"spent\": true,\n            \"value\": 28527876087,\n            \"spending_outpoints\": [\n              {\n                \"tx_index\": 797541991687679,\n                \"n\": 0\n              }\n            ],\n            \"n\": 5,\n            \"tx_index\": 8651191654556922,\n            \"script\": \"76a914dba6d09a4cc20d8eb1c482c2e56b8d600fb9f58b88ac\",\n            \"addr\": \"1M2QpWb7xspmtYHgVmGgrewWPBF7SjPCJb\"\n          }\n        }\n      ],\n      \"out\": [\n        {\n          \"type\": 0,\n          \"spent\": true,\n          \"value\": 372891955,\n          \"spending_outpoints\": [\n            {\n              \"tx_index\": 7076151901137692,\n              \"n\": 1\n            }\n          ],\n          \"n\": 0,\n          \"tx_index\": 797541991687679,\n          \"script\": \"a91465fdc09b1cf60a82cbc9e059839fcc04ebf7f18487\",\n          \"addr\": \"3AzJ9wbhhDsfCvWGU74uWFSQ2E8hWaTq5C\"\n        },\n        {\n          \"type\": 0,\n          \"spent\": true,\n          \"value\": 2767591,\n          \"spending_outpoints\": [\n            {\n              \"tx_index\": 8005882464485736,\n              \"n\": 17\n            }\n          ],\n          \"n\": 1,\n          \"tx_index\": 797541991687679,\n          \"script\": \"76a9144964d8fc9049f1953a125e1e387987b26fa7c99a88ac\",\n          \"addr\": \"17h5923U88esSwtmJa4v1EgVW9vi1dJX1q\"\n        },\n        {\n          \"type\": 0,\n          \"spent\": true,\n          \"value\": 8432592,\n          \"spending_outpoints\": [\n            {\n              \"tx_index\": 1624767403743273,\n              \"n\": 20\n            }\n          ],\n          \"n\": 2,\n          \"tx_index\": 797541991687679,\n          \"script\": \"76a9142a512d273bb2d7ed97d86958a694b4838dff2f3888ac\",\n          \"addr\": \"14rkdHrh1E3L34v9vTevoJ5hGfLmM2eLTX\"\n        },\n        {\n          \"type\": 0,\n          \"spent\": true,\n          \"value\": 9409489,\n          \"spending_outpoints\": [\n            {\n              \"tx_index\": 1369064840368594,\n              \"n\": 8\n            }\n          ],\n          \"n\": 3,\n          \"tx_index\": 797541991687679,\n          \"script\": \"76a9142a512d273bb2d7ed97d86958a694b4838dff2f3888ac\",\n          \"addr\": \"14rkdHrh1E3L34v9vTevoJ5hGfLmM2eLTX\"\n        },\n        {\n          \"type\": 0,\n          \"spent\": true,\n          \"value\": 3660000,\n          \"spending_outpoints\": [\n            {\n              \"tx_index\": 2573651081540839,\n              \"n\": 18\n            }\n          ],\n          \"n\": 4,\n          \"tx_index\": 797541991687679,\n          \"script\": \"a91461b2c86be4d3a90e703f39e49e8027f796388e7587\",\n          \"addr\": \"3AbbeCpuxNk1Ceq16tM1Np6fUXJjAqdFMk\"\n        },\n        {\n          \"type\": 0,\n          \"spent\": true,\n          \"value\": 11925214,\n          \"spending_outpoints\": [\n            {\n              \"tx_index\": 504512970446827,\n              \"n\": 5\n            }\n          ],\n          \"n\": 5,\n          \"tx_index\": 797541991687679,\n          \"script\": \"a9144ad58e8e463e57758d03f0e1254e7e235015ef4d87\",\n          \"addr\": \"38WhkvtJUeMtoqAb7SJKtjWYGf8YvT4hLC\"\n        },\n        {\n          \"type\": 0,\n          \"spent\": true,\n          \"value\": 17301260,\n          \"spending_outpoints\": [\n            {\n              \"tx_index\": 2821858673363502,\n              \"n\": 46\n            }\n          ],\n          \"n\": 6,\n          \"tx_index\": 797541991687679,\n          \"script\": \"a9145657264a8e100788dbcb0946c0d2a0256024cab087\",\n          \"addr\": \"39ZYSJLoCAKCDyavynjzXG7VSTeqmh3AXW\"\n        },\n        {\n          \"type\": 0,\n          \"spent\": true,\n          \"value\": 240937162,\n          \"spending_outpoints\": [\n            {\n              \"tx_index\": 778137703303881,\n              \"n\": 2\n            }\n          ],\n          \"n\": 7,\n          \"tx_index\": 797541991687679,\n          \"script\": \"a914c3597834267dc19cc477e023730eae6771a8e34f87\",\n          \"addr\": \"3KVvsQNKaTvTE7gGuWpVZfVEPYt5Kn5QvK\"\n        },\n        {\n          \"type\": 0,\n          \"spent\": true,\n          \"value\": 154285425,\n          \"spending_outpoints\": [\n            {\n              \"tx_index\": 959021266784189,\n              \"n\": 19\n            }\n          ],\n          \"n\": 8,\n          \"tx_index\": 797541991687679,\n          \"script\": \"a91408e8f6a46f317646861d87f846e957ffcd7710ac87\",\n          \"addr\": \"32W8QfNgcK32hBRTm6QAgQP7A7j9817JZY\"\n        },\n        {\n          \"type\": 0,\n          \"spent\": true,\n          \"value\": 259666,\n          \"spending_outpoints\": [\n            {\n              \"tx_index\": 8849451891187253,\n              \"n\": 2\n            }\n          ],\n          \"n\": 9,\n          \"tx_index\": 797541991687679,\n          \"script\": \"a91463a7dddfde93cfcba03a26e3a601a623bbcb5ad887\",\n          \"addr\": \"3Amwv7mjzuUyRarogoB6epED9NNobbj3VT\"\n        },\n        {\n          \"type\": 0,\n          \"spent\": false,\n          \"value\": 3720000,\n          \"spending_outpoints\": [],\n          \"n\": 10,\n          \"tx_index\": 797541991687679,\n          \"script\": \"76a91400e8fd98ca34f195b020af4a8b1c7238663d421288ac\",\n          \"addr\": \"115p7UMMngoj1pMvkpHijcRdfJNXj6LrLn\"\n        },\n        {\n          \"type\": 0,\n          \"spent\": true,\n          \"value\": 1842500,\n          \"spending_outpoints\": [\n            {\n              \"tx_index\": 8892224564038889,\n              \"n\": 8\n            }\n          ],\n          \"n\": 11,\n          \"tx_index\": 797541991687679,\n          \"script\": \"a9147a1fceff4f6d5a6a5b761668b1a7f7d2fb3569e087\",\n          \"addr\": \"3CpkU3dabLuXeoof1o4ZhiJ4bzCTSu631s\"\n        },\n        {\n          \"type\": 0,\n          \"spent\": true,\n          \"value\": 89827000,\n          \"spending_outpoints\": [\n            {\n              \"tx_index\": 7283568728571289,\n              \"n\": 0\n            }\n          ],\n          \"n\": 12,\n          \"tx_index\": 797541991687679,\n          \"script\": \"76a914ca85e0b001b949837563b49d4a153286ef08b31888ac\",\n          \"addr\": \"1KTqsjbarRhcYgmPMrVLPeKBvqk4vXSY9U\"\n        },\n        {\n          \"type\": 0,\n          \"spent\": false,\n          \"value\": 24950000,\n          \"spending_outpoints\": [],\n          \"n\": 13,\n          \"tx_index\": 797541991687679,\n          \"script\": \"76a914e7856d810f7fe2b0f2c0d7ea806786a1cbda6bff88ac\",\n          \"addr\": \"1N7Aw34J8ih6LSTMWHHSpEdKyFwYgSQZRF\"\n        },\n        {\n          \"type\": 0,\n          \"spent\": true,\n          \"value\": 850000,\n          \"spending_outpoints\": [\n            {\n              \"tx_index\": 61226390326379,\n              \"n\": 0\n            }\n          ],\n          \"n\": 14,\n          \"tx_index\": 797541991687679,\n          \"script\": \"a914c513776ea505b4b90670469315ecc97da63ed4fd87\",\n          \"addr\": \"3Kf4MtjKCna38MzDousEEo83KeMLfkjjDE\"\n        },\n        {\n          \"type\": 0,\n          \"spent\": true,\n          \"value\": 4000000,\n          \"spending_outpoints\": [\n            {\n              \"tx_index\": 8575415627799691,\n              \"n\": 0\n            }\n          ],\n          \"n\": 15,\n          \"tx_index\": 797541991687679,\n          \"script\": \"a9142eff3785c47ea7595261bfe0cccb4da1e75f1dc987\",\n          \"addr\": \"35yWk9Y6WSE8jXyFuFYiFW6idndxDnid32\"\n        },\n        {\n          \"type\": 0,\n          \"spent\": true,\n          \"value\": 320300,\n          \"spending_outpoints\": [\n            {\n              \"tx_index\": 948844641953240,\n              \"n\": 307\n            }\n          ],\n          \"n\": 16,\n          \"tx_index\": 797541991687679,\n          \"script\": \"76a914897d50274eb9f41bc600541ab87223d96013c7c588ac\",\n          \"addr\": \"1DXyhBt2g7gBx6xvmqkBTyuxwg8BpJgF9e\"\n        },\n        {\n          \"type\": 0,\n          \"spent\": true,\n          \"value\": 3660000,\n          \"spending_outpoints\": [\n            {\n              \"tx_index\": 5787612263125314,\n              \"n\": 45\n            }\n          ],\n          \"n\": 17,\n          \"tx_index\": 797541991687679,\n          \"script\": \"a9140125222e5f86b1928a02443c855059a071838c3387\",\n          \"addr\": \"31o55pPJnveAzEesUeGzZorfoiXnVkqVPo\"\n        },\n        {\n          \"type\": 0,\n          \"spent\": true,\n          \"value\": 7726400,\n          \"spending_outpoints\": [\n            {\n              \"tx_index\": 6118670735117055,\n              \"n\": 0\n            }\n          ],\n          \"n\": 18,\n          \"tx_index\": 797541991687679,\n          \"script\": \"76a914d897d4101b9aca38b6e9503a89c6464689a5316c88ac\",\n          \"addr\": \"1LkEqf29URRxRRZ6xFveASFZFqVn1BtHMc\"\n        },\n        {\n          \"type\": 0,\n          \"spent\": true,\n          \"value\": 4650000,\n          \"spending_outpoints\": [\n            {\n              \"tx_index\": 5345936843175744,\n              \"n\": 12\n            }\n          ],\n          \"n\": 19,\n          \"tx_index\": 797541991687679,\n          \"script\": \"a9143c550f8cd26ee14c3a0f46b6024f8d498be9467687\",\n          \"addr\": \"37C2NBFdq4XfQE3745fvy1NW23SPxQuFdQ\"\n        },\n        {\n          \"type\": 0,\n          \"spent\": true,\n          \"value\": 3660000,\n          \"spending_outpoints\": [\n            {\n              \"tx_index\": 6062110509517792,\n              \"n\": 3\n            }\n          ],\n          \"n\": 20,\n          \"tx_index\": 797541991687679,\n          \"script\": \"a9149cf1174ef27fa52111b6300d3311b423851db17587\",\n          \"addr\": \"3Fzr9mZD1SM6wSt7jAFSjurNnMDFv8JuQF\"\n        },\n        {\n          \"type\": 0,\n          \"spent\": true,\n          \"value\": 27560685653,\n          \"spending_outpoints\": [\n            {\n              \"tx_index\": 8135202909713236,\n              \"n\": 0\n            }\n          ],\n          \"n\": 21,\n          \"tx_index\": 797541991687679,\n          \"script\": \"76a91473d45406e77a4a90edd3b103597bcfbafe211ef388ac\",\n          \"addr\": \"1BZT4tJif1mdEBzoDALqJxguy2e3Mr8xzn\"\n        }\n      ],\n      \"result\": 3720000,\n      \"balance\": 46702392\n    },\n```\n\n_(response cut for brevity)._\n\nThis time the conversion is done in the same way as when starting with a transaction hash, the script simply uses the data inside the `txs` object.\n\nThe important logical difference here is that the same wallet ID could appear multiple times (as same wallet seen across multiple transactions).\n\n## STIX2 Conversion\n\nThis script creates the STIX objects using the [stix2 Python Lib](https://stix2.readthedocs.io/en/latest/).\n\nIt utilises the filesystem store, which saves the output objects into a directory called `stix2_objects`. On each script run this directory is deleted and then recreated with new objects.\n\nThe STIX objects are linked together as follows;\n\nhttps://miro.com/app/board/uXjVKn66-Us=/?share_link_id=806720045192\n\nAll the generated objects are placed into a STIX bundle in the `stix2_objects` directory.\n\n```json\n{\n    \"type\": \"bundle\",\n    \"id\": \"bundle--\u003cUUIDV5\u003e\",\n    \"objects\": [\n        \"ALL STIX OBJECTS CREATED\"\n    ]\n}\n```\n\nThe UUID is generated using the namespace `63340903-e6fa-46e4-a5e7-25c1523ca345` and the md5 hash of all objects sorted in the bundle.\n\nThe bundle file is also names in the format `bundle--\u003cUUIDV5\u003e.json`.\n\n## Useful supporting tools\n\n* To generate STIX 2.1 Objects: [stix2 Python Lib](https://stix2.readthedocs.io/en/latest/)\n* The STIX 2.1 specification: [STIX 2.1 docs](https://docs.oasis-open.org/cti/stix/v2.1/stix-v2.1.html)\n* [Blockchain API](https://www.blockchain.com/explorer/api/blockchain_api)\n\n## Support\n\n[Minimal support provided via the DOGESEC community](https://community.dogesec.com/).\n\n## License\n\n[Apache 2.0](/LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuchdogesec%2Fcrypto2stix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuchdogesec%2Fcrypto2stix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuchdogesec%2Fcrypto2stix/lists"}