poly-whales 0.0.1

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.
package/README.md ADDED
@@ -0,0 +1,77 @@
1
+ # Polymarket Whale Tracker TUI
2
+
3
+ A terminal UI that shows large BUY trades on Polymarket in real time.
4
+
5
+ ![poly-whale-tracker TUI](./assets/tui.png)
6
+
7
+ ## What It Does
8
+
9
+ - Streams Polymarket `OrderFilled` events from HyperSync
10
+ - Shows only BUY trades above your threshold
11
+ - Optionally filters by buyer/wallet addresses
12
+ - Lets you open a selected trade for detailed view
13
+
14
+ ## Requirements
15
+
16
+ - Bun
17
+ - `ENVIO_API_TOKEN` in your environment
18
+
19
+ ## Install
20
+
21
+ ```bash
22
+ cd TUI
23
+ bun install
24
+ ```
25
+
26
+ ## Run
27
+
28
+ On first run, the TUI will prompt you for your HyperSync API key. Enter it and it will be saved to `~/.hypersync/.env` for future runs.
29
+
30
+ ```bash
31
+ # First run (interactive - asks for API key)
32
+ bun index.ts
33
+
34
+ # Subsequent runs (uses saved API key)
35
+ bun index.ts
36
+
37
+ # Custom threshold (still prompted for API key)
38
+ bun index.ts -t 500
39
+
40
+ # Threshold + address filter
41
+ bun index.ts -t 500 -a "0xabc...,0xdef...,0x123..."
42
+ ```
43
+
44
+ You can also pre-set the API key in environment or the config file:
45
+
46
+ ```bash
47
+ # Via environment variable
48
+ ENVIO_API_TOKEN=your_key_here bun index.ts
49
+
50
+ # Via config file (manually create ~/.hypersync/.env)
51
+ echo "ENVIO_API_TOKEN=your_key_here" > ~/.hypersync/.env
52
+ bun index.ts
53
+ ```
54
+
55
+ ## CLI Flags
56
+
57
+ - `-t <number>`: USD threshold for BUY trades (default: `100`)
58
+ - `-a <addr1,addr2,...>`: Optional comma-separated addresses to filter trades
59
+
60
+ ## Keyboard Controls
61
+
62
+ - `↑` / `↓` (or `k` / `j`): Move selection
63
+ - `Enter`: Open selected trade details
64
+ - `T`: Open threshold popup and apply a new USD threshold
65
+ - `A` / `a`: Open address popup and apply a new address filter
66
+ - `Esc` / `Backspace`: Return from details view
67
+ - `C`: Clear current trade list
68
+ - `Q` or `Ctrl+C`: Quit
69
+
70
+ ## Notes
71
+
72
+ - If `-a` is not provided, all BUY trades above threshold are shown.
73
+ - Address filter matches buyer/maker/taker fields from decoded trade events.
74
+
75
+ ## Publishing Package
76
+
77
+ First use the command `bun run build` then `npm publish` command to convert `.ts` file to `.js`.
Binary file
package/assets/tui.png ADDED
Binary file
package/bun.lock ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "lockfileVersion": 1,
3
+ "configVersion": 1,
4
+ "workspaces": {
5
+ "": {
6
+ "name": "whale-tracker-tui",
7
+ "dependencies": {
8
+ "@envio-dev/hypersync-client": "^1.1.0",
9
+ "blessed": "^0.1.81",
10
+ },
11
+ "devDependencies": {
12
+ "@types/blessed": "^0.1.25",
13
+ "@types/bun": "latest",
14
+ },
15
+ "peerDependencies": {
16
+ "typescript": "^5",
17
+ },
18
+ },
19
+ },
20
+ "packages": {
21
+ "@envio-dev/hypersync-client": ["@envio-dev/hypersync-client@1.1.0", "", { "optionalDependencies": { "@envio-dev/hypersync-client-darwin-arm64": "1.1.0", "@envio-dev/hypersync-client-darwin-x64": "1.1.0", "@envio-dev/hypersync-client-linux-arm64-gnu": "1.1.0", "@envio-dev/hypersync-client-linux-x64-gnu": "1.1.0", "@envio-dev/hypersync-client-linux-x64-musl": "1.1.0" } }, "sha512-tTCW/fvYPFYIcL6SLcWd5Fe6uPCcXQbLgZaYL3NSvkhvrpw5VSx3M2QbHdpIrhmzoDkZdpIYyFD+pdZhC6Y75g=="],
22
+
23
+ "@envio-dev/hypersync-client-darwin-arm64": ["@envio-dev/hypersync-client-darwin-arm64@1.1.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-WO/yxYiN9nz7pHw7xLs/4hnEHQM5OVcTwvtxZTZHox7It3n7aeBzsJfrGYYqYW1bPxDwSYwb6x9l0/fQc59xeA=="],
24
+
25
+ "@envio-dev/hypersync-client-darwin-x64": ["@envio-dev/hypersync-client-darwin-x64@1.1.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-BOD4gaZ6NAyLDDVgfIhpD25ikjEQpTXNBqbIYuTjWS1D0NiQD5mmyZCFcSMmaJJ0j4iobBQV1LMiNX8nDLahPA=="],
26
+
27
+ "@envio-dev/hypersync-client-linux-arm64-gnu": ["@envio-dev/hypersync-client-linux-arm64-gnu@1.1.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-TDRpAGbfuI4u83Swy50IkGZSMaWXZw/SNC8BiMqLBmYVt1GqFDB1VGrkecf4AhQBPlQk8iDTOxxIKNuOCsY//A=="],
28
+
29
+ "@envio-dev/hypersync-client-linux-x64-gnu": ["@envio-dev/hypersync-client-linux-x64-gnu@1.1.0", "", { "os": "linux", "cpu": "x64" }, "sha512-ooOdLfrhq8W3J76pcJDWuXIpu9cTBjZR86XkkHaheDNkYQlBZ7h5oG3IhNTLnooFkih+6+9dfcfOdG4NMmylGA=="],
30
+
31
+ "@envio-dev/hypersync-client-linux-x64-musl": ["@envio-dev/hypersync-client-linux-x64-musl@1.1.0", "", { "os": "linux", "cpu": "x64" }, "sha512-WS717WyRyTZPRMfYmscRslRIhxWNKzdQR3SLugqQs0z1W7wo58WMufhr5EpzID5/GR10zexz+Y3a4HWMAGiu+Q=="],
32
+
33
+ "@types/blessed": ["@types/blessed@0.1.27", "", { "dependencies": { "@types/node": "*" } }, "sha512-ZOQGjLvWDclAXp0rW5iuUBXeD6Gr1PkitN7tj7/G8FCoSzTsij6OhXusOzMKhwrZ9YlL2Pmu0d6xJ9zVvk+Hsg=="],
34
+
35
+ "@types/bun": ["@types/bun@1.3.10", "", { "dependencies": { "bun-types": "1.3.10" } }, "sha512-0+rlrUrOrTSskibryHbvQkDOWRJwJZqZlxrUs1u4oOoTln8+WIXBPmAuCF35SWB2z4Zl3E84Nl/D0P7803nigQ=="],
36
+
37
+ "@types/node": ["@types/node@25.4.0", "", { "dependencies": { "undici-types": "~7.18.0" } }, "sha512-9wLpoeWuBlcbBpOY3XmzSTG3oscB6xjBEEtn+pYXTfhyXhIxC5FsBer2KTopBlvKEiW9l13po9fq+SJY/5lkhw=="],
38
+
39
+ "blessed": ["blessed@0.1.81", "", { "bin": { "blessed": "./bin/tput.js" } }, "sha512-LoF5gae+hlmfORcG1M5+5XZi4LBmvlXTzwJWzUlPryN/SJdSflZvROM2TwkT0GMpq7oqT48NRd4GS7BiVBc5OQ=="],
40
+
41
+ "bun-types": ["bun-types@1.3.10", "", { "dependencies": { "@types/node": "*" } }, "sha512-tcpfCCl6XWo6nCVnpcVrxQ+9AYN1iqMIzgrSKYMB/fjLtV2eyAVEg7AxQJuCq/26R6HpKWykQXuSOq/21RYcbg=="],
42
+
43
+ "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
44
+
45
+ "undici-types": ["undici-types@7.18.2", "", {}, "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w=="],
46
+ }
47
+ }