bitcraft 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. bitcraft-0.1.0/LICENSE +202 -0
  2. bitcraft-0.1.0/NOTICE +28 -0
  3. bitcraft-0.1.0/PKG-INFO +79 -0
  4. bitcraft-0.1.0/README.md +237 -0
  5. bitcraft-0.1.0/bitcraft/__init__.py +3 -0
  6. bitcraft-0.1.0/bitcraft/api_client.py +146 -0
  7. bitcraft-0.1.0/bitcraft/app.py +217 -0
  8. bitcraft-0.1.0/bitcraft/assets/mascots/angry.png +0 -0
  9. bitcraft-0.1.0/bitcraft/assets/mascots/confused.png +0 -0
  10. bitcraft-0.1.0/bitcraft/assets/mascots/happy.png +0 -0
  11. bitcraft-0.1.0/bitcraft/assets/mascots/neutral.png +0 -0
  12. bitcraft-0.1.0/bitcraft/assets/mascots/panic.png +0 -0
  13. bitcraft-0.1.0/bitcraft/assets/mascots/shocked.png +0 -0
  14. bitcraft-0.1.0/bitcraft/assets/mascots/sleepy.png +0 -0
  15. bitcraft-0.1.0/bitcraft/assets/mascots/thinking.png +0 -0
  16. bitcraft-0.1.0/bitcraft/cli.py +132 -0
  17. bitcraft-0.1.0/bitcraft/helpers/__init__.py +1 -0
  18. bitcraft-0.1.0/bitcraft/helpers/drivers.py +37 -0
  19. bitcraft-0.1.0/bitcraft/helpers/format.py +43 -0
  20. bitcraft-0.1.0/bitcraft/helpers/severity.py +32 -0
  21. bitcraft-0.1.0/bitcraft/helpers/stub_chart.py +133 -0
  22. bitcraft-0.1.0/bitcraft/launcher.py +198 -0
  23. bitcraft-0.1.0/bitcraft/providers/__init__.py +1 -0
  24. bitcraft-0.1.0/bitcraft/providers/api_provider.py +400 -0
  25. bitcraft-0.1.0/bitcraft/providers/demo_provider.py +597 -0
  26. bitcraft-0.1.0/bitcraft/providers/factory.py +92 -0
  27. bitcraft-0.1.0/bitcraft/providers/models.py +298 -0
  28. bitcraft-0.1.0/bitcraft/providers/provider.py +82 -0
  29. bitcraft-0.1.0/bitcraft/screens/__init__.py +1 -0
  30. bitcraft-0.1.0/bitcraft/screens/alert_detail.py +188 -0
  31. bitcraft-0.1.0/bitcraft/screens/boot.py +254 -0
  32. bitcraft-0.1.0/bitcraft/screens/dashboard.py +304 -0
  33. bitcraft-0.1.0/bitcraft/screens/graph_explorer.py +169 -0
  34. bitcraft-0.1.0/bitcraft/screens/splash.py +47 -0
  35. bitcraft-0.1.0/bitcraft/screens/threat_detection.py +415 -0
  36. bitcraft-0.1.0/bitcraft/screens/wallet.py +182 -0
  37. bitcraft-0.1.0/bitcraft/store.py +100 -0
  38. bitcraft-0.1.0/bitcraft/theme.tcss +587 -0
  39. bitcraft-0.1.0/bitcraft/widgets/__init__.py +1 -0
  40. bitcraft-0.1.0/bitcraft/widgets/alert_detail_panel.py +18 -0
  41. bitcraft-0.1.0/bitcraft/widgets/alert_list.py +61 -0
  42. bitcraft-0.1.0/bitcraft/widgets/chart.py +298 -0
  43. bitcraft-0.1.0/bitcraft/widgets/chart_panel.py +349 -0
  44. bitcraft-0.1.0/bitcraft/widgets/community_table.py +34 -0
  45. bitcraft-0.1.0/bitcraft/widgets/filter_panel.py +71 -0
  46. bitcraft-0.1.0/bitcraft/widgets/graph_view.py +308 -0
  47. bitcraft-0.1.0/bitcraft/widgets/header_bar.py +86 -0
  48. bitcraft-0.1.0/bitcraft/widgets/kpi_summary.py +88 -0
  49. bitcraft-0.1.0/bitcraft/widgets/logo.py +115 -0
  50. bitcraft-0.1.0/bitcraft/widgets/mascot.py +264 -0
  51. bitcraft-0.1.0/bitcraft/widgets/panel_state.py +85 -0
  52. bitcraft-0.1.0/bitcraft/widgets/score_bar.py +27 -0
  53. bitcraft-0.1.0/bitcraft/widgets/severity_chip.py +38 -0
  54. bitcraft-0.1.0/bitcraft/widgets/stacked_bar.py +66 -0
  55. bitcraft-0.1.0/bitcraft.egg-info/PKG-INFO +79 -0
  56. bitcraft-0.1.0/bitcraft.egg-info/SOURCES.txt +61 -0
  57. bitcraft-0.1.0/bitcraft.egg-info/dependency_links.txt +1 -0
  58. bitcraft-0.1.0/bitcraft.egg-info/entry_points.txt +2 -0
  59. bitcraft-0.1.0/bitcraft.egg-info/requires.txt +7 -0
  60. bitcraft-0.1.0/bitcraft.egg-info/top_level.txt +1 -0
  61. bitcraft-0.1.0/packages/PYPI_README.md +43 -0
  62. bitcraft-0.1.0/pyproject.toml +62 -0
  63. bitcraft-0.1.0/setup.cfg +4 -0
bitcraft-0.1.0/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
bitcraft-0.1.0/NOTICE ADDED
@@ -0,0 +1,28 @@
1
+ BitCraft
2
+ Copyright 2026 The BitCraft Authors
3
+
4
+ Rohan Pattanayak
5
+ Jagadish Pattnaik
6
+ Shreya Mishra
7
+ Shreya Mohanty
8
+ Ashutosh Badapada
9
+ Rosalin Nayak
10
+
11
+ Licensed under the Apache License, Version 2.0 (the "License");
12
+ you may not use this software except in compliance with the License.
13
+ You may obtain a copy of the License at
14
+
15
+ http://www.apache.org/licenses/LICENSE-2.0
16
+
17
+ Unless required by applicable law or agreed to in writing, software
18
+ distributed under the License is distributed on an "AS IS" BASIS,
19
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
+ See the License for the specific language governing permissions and
21
+ limitations under the License.
22
+
23
+ This product includes data derived from the Elliptic Data Set
24
+ (Elliptic, MIT-IBM Watson AI Lab), distributed separately and not
25
+ covered by this License.
26
+
27
+ IP geolocation by DB-IP (https://db-ip.com), licensed under CC BY 4.0.
28
+ The DB-IP databases are downloaded separately and not included here.
@@ -0,0 +1,79 @@
1
+ Metadata-Version: 2.4
2
+ Name: bitcraft
3
+ Version: 0.1.0
4
+ Summary: Bitcoin transaction intelligence in your terminal: ranked alerts, evidence and link analysis.
5
+ Author: Rohan Pattanayak, Jagadish Pattnaik, Shreya Mishra, Shreya Mohanty, Ashutosh Badapada, Rosalin Nayak
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/RohanOnKeys/bitcraft
8
+ Project-URL: Source, https://github.com/RohanOnKeys/bitcraft
9
+ Project-URL: Documentation, https://github.com/RohanOnKeys/bitcraft/blob/main/docs/user_manual.md
10
+ Project-URL: Issues, https://github.com/RohanOnKeys/bitcraft/issues
11
+ Keywords: bitcoin,aml,fraud-detection,graph,tui,textual
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Operating System :: Microsoft :: Windows
16
+ Classifier: Operating System :: POSIX :: Linux
17
+ Classifier: Operating System :: MacOS
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3 :: Only
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Topic :: Security
25
+ Requires-Python: >=3.10
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ License-File: NOTICE
29
+ Requires-Dist: textual>=5.0
30
+ Requires-Dist: httpx>=0.27
31
+ Requires-Dist: pillow>=10.0
32
+ Provides-Extra: dev
33
+ Requires-Dist: pytest>=8.3; extra == "dev"
34
+ Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
35
+ Dynamic: license-file
36
+
37
+ # BitCraft
38
+
39
+ Bitcoin transaction intelligence in your terminal: ranked alerts,
40
+ provenance-tagged evidence, SHAP reasons, wallet clustering and an animated
41
+ link-analysis view.
42
+
43
+ ![BitCraft dashboard](https://raw.githubusercontent.com/RohanOnKeys/bitcraft/main/docs/images/dashboard.png)
44
+
45
+ ## Install
46
+
47
+ ```text
48
+ pipx install bitcraft # recommended: isolated install of the CLI
49
+ pip install bitcraft # any OS, Python 3.10+
50
+ choco install bitcraft # Windows, via Chocolatey
51
+ ```
52
+
53
+ ## Use
54
+
55
+ ```text
56
+ bitcraft open BitCraft in a new, large terminal window
57
+ bitcraft demo same, with built-in demo data
58
+ bitcraft here run inside the current terminal
59
+ bitcraft status check the API and the last pipeline run
60
+ bitcraft --help everything else
61
+ ```
62
+
63
+ BitCraft connects to a BitCraft API at `http://localhost:8000` (change it
64
+ with `--api-url` or `BITCRAFT_API_URL`) and falls back to demo data when
65
+ none is running. The API and ML pipeline live in the
66
+ [source repository](https://github.com/RohanOnKeys/bitcraft).
67
+
68
+ Best in Windows Terminal, a modern Linux terminal or iTerm2, at 160x46 or
69
+ larger.
70
+
71
+ | Wallets | Alert detail |
72
+ | --- | --- |
73
+ | ![Wallets](https://raw.githubusercontent.com/RohanOnKeys/bitcraft/main/docs/images/wallets.png) | ![Alert detail](https://raw.githubusercontent.com/RohanOnKeys/bitcraft/main/docs/images/detail.png) |
74
+
75
+ ## License
76
+
77
+ Apache License 2.0. Copyright 2026 The BitCraft Authors: Rohan Pattanayak,
78
+ Jagadish Pattnaik, Shreya Mishra, Shreya Mohanty, Ashutosh Badapada and
79
+ Rosalin Nayak.
@@ -0,0 +1,237 @@
1
+ ![BitCraft](docs/images/splash.png)
2
+
3
+ # BitCraft
4
+
5
+ AI Powered Monitoring & Analysis of Bitcoin Transaction Traffic Software
6
+
7
+ BitCraft is an offline Bitcoin intelligence platform that correlates blockchain transactions with network metadata to generate explainable investigative leads. It ingests bulk transaction datasets, builds an entity graph linking wallets, IPs, and transactions, applies AI and graph analysis to detect suspicious behavior, and presents prioritized alerts through a terminal-based investigation dashboard (TUI).
8
+
9
+ The project is designed for Linux and operates entirely offline on synthetic datasets modeled after real Bitcoin transaction and P2P network activity.
10
+
11
+ ---
12
+
13
+ ## Background
14
+
15
+ Bitcoin's pseudonymous peer to peer architecture enables legitimate financial activity, but it also allows ransomware payments, darknet market proceeds, extortion, and money laundering to move across the network with limited traditional financial oversight.
16
+
17
+ BitCraft addresses this challenge by combining blockchain layer data with network layer observations. Instead of analyzing transactions in isolation, it reconstructs relationships between wallets, IP addresses, and transaction timing to uncover suspicious patterns that would otherwise remain hidden.
18
+
19
+ ---
20
+
21
+ ## Features
22
+
23
+ - Bulk ingestion of CSV, JSON, and XML datasets
24
+ - Bitcoin transaction and metadata parsing
25
+ - Entity graph connecting wallets, IPs, ports, and transactions
26
+ - AI powered anomaly detection
27
+ - Wallet and transaction clustering
28
+ - Explainable alerts with confidence scores
29
+ - Terminal-based investigation dashboard (TUI) for link analysis
30
+ - Fully offline Linux compatible workflow
31
+
32
+ ![Dashboard: KPIs, filters, ranked alerts and a live preview of the selected alert](docs/images/dashboard.png)
33
+
34
+ ---
35
+
36
+ ## Dataset
37
+
38
+ BitCraft works with synthetic datasets modeled on real Bitcoin transaction fields.
39
+
40
+ ![Wallets: address clusters with their IPs, ports, GeoIP country and ASN](docs/images/wallets.png)
41
+
42
+ ### Supported Fields
43
+
44
+ - `timestamp`
45
+ - `src_ip`
46
+ - `dst_ip`
47
+ - `src_port`
48
+ - `dst_port`
49
+ - `txid`
50
+ - `input_addresses[]`
51
+ - `output_addresses[]`
52
+ - `input_amounts[]`
53
+ - `output_amounts[]`
54
+ - `fee`
55
+ - `script_type`
56
+ - `geo_country`
57
+ - `asn`
58
+
59
+ GeoIP enrichment uses downloadable open source GeoIP databases.
60
+
61
+ ---
62
+
63
+ ## Objectives
64
+
65
+ - Ingest and parse bulk Bitcoin transaction metadata.
66
+ - Correlate network layer and blockchain layer data.
67
+ - Build relationships between wallets, IP addresses, and transactions.
68
+ - Detect suspicious behavior using AI and machine learning.
69
+ - Generate explainable alerts with confidence scores.
70
+ - Provide investigators with a clear view of suspicious entities through a terminal-based dashboard.
71
+
72
+ ![Threats: posture, top-25 queue with drivers, riskiest communities and coverage gaps](docs/images/threats.png)
73
+
74
+ ---
75
+
76
+ ## AI and Graph Analysis
77
+
78
+ BitCraft combines graph analytics with machine learning rather than relying solely on rule based detection.
79
+
80
+ Planned capabilities include:
81
+
82
+ - Entity clustering
83
+ - Transaction anomaly detection
84
+ - Suspicious transaction chain identification
85
+ - Temporal behavior analysis
86
+ - Wallet relationship discovery
87
+ - Network correlation between blockchain activity and observed IP metadata
88
+
89
+ Every alert includes supporting evidence and a confidence score.
90
+
91
+ ![Graph explorer: live connectivity graph with timestep, severity, driver and community charts](docs/images/graph.png)
92
+
93
+ ---
94
+
95
+ ## Project Structure
96
+
97
+ ```text
98
+ bitcraft/
99
+ ├── datasets/
100
+ ├── docs/
101
+ ├── plans/
102
+ ├── src/
103
+ ├── tests/
104
+ └── README.md
105
+ ```
106
+
107
+ ---
108
+
109
+ ## Getting Started
110
+
111
+ ### Install and run
112
+
113
+ ```text
114
+ pip install bitcraft # any OS, Python 3.10+
115
+ choco install bitcraft # Windows (Chocolatey)
116
+ bitcraft # opens BitCraft in a new, large terminal window
117
+ ```
118
+
119
+ ![Boot: data source, pipeline and alert checks while BitCraft starts](docs/images/boot.png)
120
+
121
+ From a clone, `pip install -e .` gives you the same `bitcraft` command, or
122
+ run `bitcraft.bat` / `./bitcraft.sh` / `./bitcraft.ps1` straight from the repo
123
+ root without installing anything.
124
+
125
+ | Command | What it does |
126
+ | --- | --- |
127
+ | `bitcraft` | New window (Windows Terminal, else Command Prompt; gnome-terminal, konsole, kitty, alacritty or xterm on Linux; Terminal.app on macOS) |
128
+ | `bitcraft demo` | Same, with built-in demo data |
129
+ | `bitcraft here` | Run inside the current terminal |
130
+ | `bitcraft status` | Check the API and the last pipeline run |
131
+ | `bitcraft run --api-url URL --size 200x60` | Pick a backend and window size |
132
+
133
+ Inside a source checkout with a loaded database, `bitcraft` also starts the
134
+ API in the background and stops it when you quit. Release builds:
135
+ `python packages/build_package.py` (wheel, sdist and the Chocolatey
136
+ package).
137
+
138
+ ### Model and backend (live data)
139
+
140
+ The dataset is the private Kaggle dataset
141
+ `rosalinnayak/bitcoin-transaction-traffic`. Put its five CSVs in
142
+ `datasets/` (git-ignored), then:
143
+
144
+ ```text
145
+ pip install -r requirements.txt -r backend/requirements.txt
146
+ python -m ml.geoip download # one-time: DB-IP Lite country + ASN databases
147
+ python -m ml.metadata_generator # challenge-format metadata (CSV, JSON, XML)
148
+ python -m ml.pipeline # ~5 min first run, writes ml/artifacts/
149
+ cd backend && python -m app.loader # loads artifacts into backend/bitcraft.db
150
+ bitcraft # starts the API and opens the TUI
151
+ ```
152
+
153
+ The metadata layer carries the challenge's minimum fields (timestamp,
154
+ src/dst IP and port, txid, input/output addresses and amounts, fee, script
155
+ type). `python -m ml.ingest FILE` validates any CSV, JSON or XML file in
156
+ that shape; GeoIP adds country and ASN offline.
157
+
158
+ With no `DATABASE_URL` the API uses a local SQLite file, and Redis is
159
+ optional. For the full PostgreSQL + Redis stack, use `docker compose up --build`:
160
+ the `ml` service runs the pipeline, then `backend` loads the results and
161
+ serves on port 8000.
162
+
163
+ API: `/alerts`, `/alerts/{tx_id}`, `/graph/{tx_id}?depth=`, `/communities`,
164
+ `/communities/{id}`, `/entities`, `/entities/{id}`, `/entities/{id}/graph`,
165
+ `/addresses/{address}`, `/ips/{ip}`, `/metadata/{tx_id}`, `/stats/summary`,
166
+ `/threats/overview`, `/pipeline/status`, `/pipeline/metrics`. Interactive docs
167
+ at `http://localhost:8000/docs`.
168
+
169
+ Full instructions: [docs/user_manual.md](docs/user_manual.md). Approach,
170
+ model choice and explainability: [docs/technical_writeup.md](docs/technical_writeup.md).
171
+ Model details and held-out metrics: [docs/model_card.md](docs/model_card.md).
172
+
173
+ ### Terminal UI (demo mode)
174
+
175
+ ```text
176
+ pip install -r bitcraft/requirements.txt
177
+ python -m bitcraft.app --demo
178
+ ```
179
+
180
+ Other data sources:
181
+
182
+ ```text
183
+ python -m bitcraft.app --api
184
+ python -m bitcraft.app
185
+ ```
186
+
187
+ `--demo` forces synthetic data. `--api` talks to FastAPI at
188
+ `http://localhost:8000` (override with `--api-url`). Default `auto`
189
+ probes `/health` and falls back to demo.
190
+
191
+ Keys: Enter (boot/detail), d dashboard, t threats, g graph, Esc home, q quit.
192
+
193
+ Demo mode always shows a `DEMO DATA` badge. It is not live pipeline output.
194
+
195
+ Minimum terminal size: 100 columns by 30 rows.
196
+
197
+ ---
198
+
199
+ ## Expected Output
200
+
201
+ BitCraft produces:
202
+
203
+ - Parsed and correlated transaction data
204
+ - Entity relationship graphs
205
+ - Ranked suspicious wallets and transactions
206
+ - Explainable AI generated alerts
207
+ - Terminal-based investigation dashboard (TUI)
208
+
209
+ ![Alert detail: composite score, drivers, network and blockchain metadata, evidence and SHAP reasons](docs/images/detail.png)
210
+
211
+ ---
212
+
213
+ ## Tech Stack
214
+
215
+ Planned technologies include:
216
+
217
+ - Python
218
+ - NetworkX
219
+ - FastAPI
220
+ - PostgreSQL
221
+ - Redis
222
+ - GeoIP databases
223
+ - Machine learning libraries
224
+ - Textual (terminal UI framework)
225
+
226
+ ---
227
+
228
+ ## License
229
+
230
+ BitCraft is open source under the [Apache License 2.0](LICENSE).
231
+
232
+ Copyright 2026 The BitCraft Authors: Rohan Pattanayak, Jagadish Pattnaik,
233
+ Shreya Mishra, Shreya Mohanty, Ashutosh Badapada and Rosalin Nayak.
234
+ See [NOTICE](NOTICE).
235
+
236
+ The Elliptic-derived dataset is distributed separately and is not covered
237
+ by this license.
@@ -0,0 +1,3 @@
1
+ """BitCraft terminal interface package. Built with Textual."""
2
+
3
+ __version__ = "0.1.0"