Compare commits

...

234 Commits

Author SHA1 Message Date
nym21 c0144b99bf release: v0.0.12 2025-04-02 16:45:19 +02:00
nym21 a0c32fc146 server: api doc 2025-04-02 16:43:31 +02:00
nym21 a07b641adb global: snapshot 2025-04-02 16:20:17 +02:00
nym21 0bb869fb33 kibo: changed font from satoshi to geist 2025-04-01 23:46:25 +02:00
nym21 72389e0129 readmes: update 2025-04-01 00:24:27 +02:00
nym21 f49529fa70 release: v0.0.11 2025-03-31 18:52:39 +02:00
nym21 afcc34b5cc readmes: add shields 2025-03-31 18:52:16 +02:00
nym21 655b99cac8 server: add not_modified check when no 'to' param 2025-03-31 17:19:33 +02:00
nym21 cc5091e28c kibo: part 5 2025-03-31 17:17:34 +02:00
nym21 1c72362c6b kibo: part 4 2025-03-31 10:02:59 +02:00
nym21 50ad5f681b kibo: part 3 (broken) 2025-03-29 13:01:46 +01:00
nym21 50bf670931 kibo: part 2 (broken) 2025-03-25 20:55:47 +01:00
nym21 7a8896864f kibo: part 1.1 2025-03-21 17:17:04 +01:00
nym21 51fbf148d9 kibo: part 1 2025-03-21 16:59:39 +01:00
nym21 a9929438cd computer: part 3 2025-03-21 11:45:23 +01:00
nym21 5a94b6b56c cargo: update crates 2025-03-20 21:40:57 +01:00
nym21 52cfbf60d4 computer: part 2 2025-03-20 21:40:06 +01:00
nym21 29c10f8854 computer: part 1 2025-03-19 12:01:54 +01:00
nym21 ad761e388d READMEs: updated 2025-03-17 09:55:06 +01:00
nym21 07493ab0a6 README: add badges 2025-03-15 17:51:54 +01:00
nym21 7441011ae7 pr: merge #17 from aki-mizu/main
Merge pull request #17 from aki-mizu/main
fix old biter link in README
2025-03-15 15:18:32 +00:00
Darrell d0818f456d fix biter link 2025-03-16 00:10:25 +09:00
nym21 06ea07a021 release: v0.0.9 2025-03-14 20:55:21 +01:00
nym21 36d97ad5ca compression: added everywhere 2025-03-14 18:10:03 +01:00
nym21 a995eb2929 vec: compression part 2 and done 2025-03-14 16:00:47 +01:00
nym21 c459a3033d vec: compression part 1 2025-03-13 17:11:04 +01:00
nym21 b4fbcf6bee global: snapshot 2025-03-11 17:55:14 +01:00
nym21 b9e679a514 vec: moved compute functions to computer 2025-03-11 16:27:45 +01:00
nym21 64d73b93e4 global: snapshot 2025-03-11 15:36:40 +01:00
nym21 db70b05088 global: snapshot 2025-03-10 23:08:07 +01:00
nym21 9428beeae5 global: snapshot 2025-03-10 11:42:15 +01:00
nym21 f9f7172702 brk: use brk_cli::main as bin 2025-03-07 00:00:27 +01:00
nym21 f1851b304c server: server struct 2025-03-06 14:52:26 +01:00
nym21 d2ca6f1d46 server: use query for search 2025-03-05 16:55:37 +01:00
nym21 b27297cdc6 server: multiple frontends + auto download from github when needed 2025-03-05 12:22:11 +01:00
nym21 0d0edd7917 global: snapshot + core: impl Display for bytes structs 2025-03-04 12:29:19 +01:00
nym21 fc6f12fb22 general: fixed builds 2025-03-03 19:36:17 +01:00
nym21 d24096374f cli: add config for run command 2025-03-03 19:11:47 +01:00
nym21 4f1d04009a readme: update 2025-03-03 12:50:49 +01:00
nym21 79e9fde937 readme: updatre 2025-03-03 12:34:27 +01:00
nym21 0ebaf6a171 readme: update 2025-03-03 10:52:07 +01:00
nym21 be2012f28d cli + query: improvements 2025-03-02 20:15:01 +01:00
nym21 ceefc8ffc6 global: snapshot 2025-03-02 12:45:33 +01:00
nym21 0453b6903a vec: readme: removed example 2025-03-02 11:19:01 +01:00
nym21 691952249b readme: update 2025-03-02 11:08:53 +01:00
nym21 0ceae2852e query: init 2025-03-02 11:08:35 +01:00
nym21 6d7ff38cf2 global: snapshot 2025-03-01 15:22:34 +01:00
nym21 1b93ccf608 global: snapshot 2025-02-28 11:52:25 +01:00
nym21 5b1ca3711a kibo.money: cleaned packages 2025-02-27 12:34:45 +01:00
nym21 877f9299e1 global: snapshot 2025-02-27 12:32:54 +01:00
nym21 677aca7a03 indexer: rollback fixed via fjall v2.6.6 (conv on discord) 2025-02-27 00:50:35 +01:00
nym21 66b31a62d0 readme: add disclaimer 2025-02-26 12:59:35 +01:00
nym21 34923638c5 global: cargo update 2025-02-26 10:45:00 +01:00
nym21 bb61b3dc22 global: init readmes 2025-02-26 10:07:05 +01:00
nym21 01ecae8979 indexer: fixed Fjalls rollback 2025-02-24 18:15:13 +01:00
nym21 53175c9ed7 core: init 2025-02-24 14:08:51 +01:00
nym21 bc7a76755b git: removed old files 2025-02-24 00:53:57 +01:00
nym21 92758f3e4e Merge pull request #16 from bitcoinresearchkit/bkr-v0.0
Bkr v0.0
2025-02-23 23:47:39 +00:00
nym21 b09767c526 cargo: update descriptions 2025-02-24 00:43:50 +01:00
nym21 2f93fd7c36 global: crates cleanup 2025-02-24 00:25:58 +01:00
nym21 8acbcc548c parser: fixed hanging + global: snapshot 2025-02-23 21:53:39 +01:00
nym21 19cf34f9d4 brk: first commit 2025-02-23 01:25:15 +01:00
nym21 8c3f519016 iterator: add xor support 2025-02-22 14:06:43 +01:00
nym21 e63b42278c iterator: simplified 2025-02-21 20:12:57 +01:00
nym21 66ecd2fcf8 iterator: small changes 2025-02-20 13:11:23 +01:00
nym21 f0d86f2392 indexer: moved height to iterator 2025-02-20 11:40:26 +01:00
nym21 5e39510f21 general: snapshot 2025-02-19 21:43:18 +01:00
nym21 2cb4d65f3d indexer: update readme 2025-02-19 10:56:07 +01:00
nym21 15f2e05192 indexer: improved rollback; global: snapshot 2025-02-18 22:43:12 +01:00
nym21 a122333aaa indexer: rm canopy+sanakirja + init rollback; svec: added truncate 2025-02-15 12:04:20 +01:00
nym21 06b2186bf9 cargo: updated deps 2025-02-14 19:04:14 +01:00
nym21 ed10dccfe2 pricer: snapshot 2025-02-14 19:02:46 +01:00
nym21 a1006dddb5 global: snapshot 2025-02-13 19:00:52 +01:00
nym21 443a32dc81 server: cleanup 2025-02-13 11:10:34 +01:00
nym21 b034b4fe2f python: add read bytes from vec example 2025-02-12 17:22:36 +01:00
nym21 27b270148b server: add tsv support 2025-02-12 16:00:31 +01:00
nym21 269c64e4ed server: smart generic vec routes build 2025-02-12 14:11:04 +01:00
nym21 eaf76e27f5 struct_iterable: removed, seems not needed anymore 2025-02-12 00:06:46 +01:00
nym21 385b881068 server: added csv support to api 2025-02-11 23:38:01 +01:00
nym21 cf26696d12 global: snapshot 2025-02-11 19:01:30 +01:00
nym21 cb7ea40e7c server: started 2025-02-11 18:52:08 +01:00
nym21 5aaa55197e workspace: use folder name for packages 2025-02-05 23:42:48 +01:00
nym21 d86d614520 global: from custom unsafe_slice to zerocopy 2025-02-05 16:42:53 +01:00
nym21 138ca80c10 global: snapshot 2025-02-05 00:23:58 +01:00
nym21 d11a1622f8 storable_vec: add modes 2025-02-04 20:56:48 +01:00
nym21 42c996e16e global: snapshot 2025-02-02 23:55:05 +01:00
nym21 1e37d75e49 global: snapshot 2025-02-02 23:28:03 +01:00
nym21 ad34d9d402 bomputer: init 2025-01-31 11:43:14 +01:00
nym21 8c610f8a83 workspace: reorg 2025-01-28 17:45:36 +01:00
nym21 f7f3e3cc03 bindex: no copy fjall get + small fixes 2025-01-28 11:30:10 +01:00
nym21 d68c6f9f2e bindex: contained fjall code 2025-01-27 23:25:28 +01:00
nym21 90a5c4fbf8 bindex: retrying fjall 2025-01-27 12:49:19 +01:00
nym21 042be6e229 bindex: removed addressindex to in/out puts as they're computable later 2025-01-27 09:55:28 +01:00
nym21 4923c2e204 bindex: converted txindex_to_txoutindex_in to storable vecs 2025-01-26 17:42:47 +01:00
nym21 b94d94e116 bindex: snapshot 2025-01-25 22:46:11 +01:00
nym21 d629ae8fbb bindex: snapshot 2025-01-23 11:11:39 +01:00
nym21 1296a2e9ec general: massive update 2025-01-22 11:38:50 +01:00
nym21 009d02fa68 storable_vec: general update 2025-01-16 13:25:35 +01:00
nym21 4cc57e9c91 bindex: back to sanakirja 2025-01-14 23:35:42 +01:00
nym21 d373c6398e bitbase: renamed to bindex 2025-01-14 12:38:06 +01:00
nym21 82746a0669 bitbase: vecdisk 2025-01-14 12:32:27 +01:00
nym21 1212c3627b cargo: update fjall to v2.5 2025-01-09 20:53:04 +01:00
nym21 813f16ccee bitbase: small optimization 2025-01-09 00:13:52 +01:00
nym21 1c3cb91ecd bitbase: rayon done 2025-01-08 18:01:28 +01:00
nym21 5b1735db2b bitbase: pre-rayon snapshot 2025-01-07 12:15:58 +01:00
nym21 bf31ee5fd6 bitbase: move to transactional 2025-01-06 10:45:04 +01:00
nym21 1380b42c1d bitbase: snapshot 2025-01-03 21:34:10 +01:00
nym21 dea853d840 init: separate parser crate 2025-01-01 10:32:39 +01:00
nym21 d72bf0739a changelog: update 2024-12-27 12:33:09 +01:00
nym21 481f5c0a97 server: add support for dataset by timestamp 2024-12-27 12:28:27 +01:00
nym21 2b017ac6b5 website: lc: update to v4.2.2 2024-12-22 10:22:55 +01:00
nym21 8a733ee337 changelog: update 2024-12-22 09:39:27 +01:00
nym21 9dd87a48a6 server: rework api side 2024-12-22 00:42:11 +01:00
nym21 8fabbde13b global: small fixes 2024-12-17 10:39:28 +01:00
nym21 e0a378cb81 biter: fix ? 2024-12-14 17:39:42 +01:00
nym21 0b3329ca35 git: fix ignore file 2024-12-14 14:56:55 +01:00
nym21 50c77b51db snkrj: move database struct to its own crate 2024-12-14 14:55:44 +01:00
nym21 c883ed19d6 biter: readme: update 2024-12-13 19:57:08 +01:00
nym21 795791219e global: snapshot 2024-12-13 19:55:32 +01:00
nym21 f6f4660cd2 website: fix the previous fix 2024-12-13 16:08:59 +01:00
nym21 9576f6e91e website: fix window resize brave bug 2024-12-13 12:30:56 +01:00
nym21 f5e5bbefb2 changelog: update 2024-12-04 11:22:28 +01:00
nym21 d4323fb5e0 website: dca sim: improve reactivity 2024-12-04 11:15:18 +01:00
nym21 8af1ddd10d website: moved more code to lc wrapper 2024-12-04 10:28:30 +01:00
nym21 62f6d9a413 website: lc: moved markers to container 2024-12-03 19:04:21 +01:00
nym21 783aed5826 website: start containing lc code in wrapper 2024-12-03 17:31:56 +01:00
k 141cd819a1 website: reorg 2024-12-02 10:03:41 +01:00
k 44fa96eb49 website: sim: wording 2024-11-28 21:52:40 +01:00
k 778b514b65 website: simulation: fix sats added 2024-11-28 18:36:22 +01:00
k afd58d69e4 website: simulation: fix 'days ago' 2024-11-28 18:34:01 +01:00
k 4af9849b2b website: simulation: small changes 2024-11-28 18:31:15 +01:00
k 4dac44e720 website: simulation: small fixes 2024-11-28 15:58:11 +01:00
k 71871901ef website: update 2024-11-27 18:36:43 +01:00
k d39e7584c0 website: update 2024-11-27 12:56:04 +01:00
k 4e9c5612ca website: small fixes 2024-11-25 11:28:28 +01:00
k c8510dd45b changelog: update 2024-11-23 16:18:57 +01:00
k c234c17352 general: snapshot 2024-11-23 16:17:06 +01:00
k cfae483d9d parser: fix gnericmap multi_insert_simple_average 2024-11-20 11:42:06 +01:00
k d01ea13de4 global: snapshot 2024-11-20 10:50:14 +01:00
k 9a73ee6952 readme: fix link 2024-11-15 13:44:14 +01:00
k 28eb9e8c17 readme: update 2024-11-15 13:41:16 +01:00
k 749c91f662 readme: removed the fluff 2024-11-15 13:15:30 +01:00
k 97ac17a12a website: delete useless logs 2024-11-11 15:23:07 +01:00
k 32fd4fa8ed website: big update 2024-11-11 15:20:31 +01:00
k 12fe4c6ba5 parser: fix metadata bug 2024-11-08 22:53:39 +01:00
k b1e9fd95ca readme: typos 2024-11-05 09:36:49 +01:00
k d83043d8f2 server: readd content disposition attachement if ext present 2024-11-04 12:44:15 +01:00
k 2abeca6220 readme: update 2024-11-04 12:35:48 +01:00
k 781810ed9c parser: databases: small changes 2024-11-04 11:09:54 +01:00
k 2142847de3 website: moved packages + added ratio charts to compare folders 2024-11-02 12:42:40 +01:00
k ca42c266ef website: update cohorts colors 2024-11-02 00:59:57 +01:00
k f258ef1011 website: readd ratio to individual cohort folders 2024-11-01 20:52:43 +01:00
k 38cb763fd3 website: add compare to liquidity 2024-11-01 20:47:23 +01:00
k 3fa78241ef parser: exit inside global defrag 2024-11-01 20:23:06 +01:00
k 3c7bc13be9 Merge branch 'main' of github.com:kibo-money/kibo 2024-11-01 20:20:54 +01:00
k 2441ca35b3 website: up signals + added compare folder to all groups 2024-11-01 20:19:43 +01:00
k 216a3977be parser: reactivate 'first_defragment' option 2024-10-31 11:39:36 +01:00
k 647a51af15 parser: fix defrag 2024-10-31 09:57:06 +01:00
k 530d4ce717 general: temp rollback 2024-10-30 19:22:42 +01:00
k e5d81b4d5c parser: added databases defragmentation 2024-10-30 19:13:41 +01:00
k 6eaeca1f3d parser: db: improve iter function 2024-10-29 19:38:52 +01:00
k 4220034eab parser: crates upgrade && remove ram from config 2024-10-29 15:22:44 +01:00
k 76a8ddd354 server: tried oxc vs swc, kept swc 2024-10-29 14:40:12 +01:00
k 0bad38a815 iterable: added custom version 2024-10-28 16:51:20 +01:00
k 48a8aad20e parser: AnyDataset DX improvements 2024-10-28 16:48:27 +01:00
k 36ad0b3014 parser: revert save logic 2024-10-27 12:10:22 +01:00
k 95fc103eaf parser: fix metadata versioning 2024-10-27 10:52:42 +01:00
k f5754780a8 global: snapshot 2024-10-26 16:41:38 +02:00
k 7114c3bdf9 general: fixes 2024-10-21 14:36:02 +02:00
k 5b9d599e83 global: snapshot 2024-10-20 18:31:43 +02:00
k ffa4871035 readme: update instances 2024-10-19 11:49:01 +02:00
k 01832ac139 server: add .json option to last value routes 2024-10-19 11:04:32 +02:00
k cb7ff2bb37 changelog: update 2024-10-19 10:46:00 +02:00
k 35dd194b28 general: snapshot 2024-10-19 10:34:12 +02:00
k 7dac857135 docker: snapshot 2024-10-17 19:53:00 +02:00
k 608ccafc70 server: add support for .json .csv and ?all=true 2024-10-16 18:38:43 +02:00
k 4cdc9ef9b3 changelog: update 2024-10-09 00:39:25 +02:00
k db60d4e453 parser: compress empty_address_data 2024-10-09 00:33:14 +02:00
k f5d427a04f parser: cargo cleanup 2024-10-08 22:37:36 +02:00
k e4893e446c cargo: update 2024-10-08 21:53:38 +02:00
k 79ffbf3d1d global: snapshot 2024-10-08 21:47:46 +02:00
k 068bb07d6e global: snapshot 2024-10-04 19:09:09 +02:00
k 1c9d118ba2 changelog: update 2024-10-03 18:37:00 +02:00
k 5308796bac parser: removed liquidity split for everything but all addresses 2024-10-03 17:38:43 +02:00
k 669205aa4d general: snapshot 2024-10-02 10:48:05 +02:00
k 9d2c2f7945 global: snapshot 2024-09-29 20:39:51 +02:00
k e3b44b0adb website: refactor 2024-09-24 17:13:29 +02:00
k 1a303a9c38 docker: init 2024-09-23 18:44:55 +02:00
k 2befa58fce global: add sell side risk ratio 2024-09-21 14:22:27 +02:00
k c8ded4ddb3 general: add /api/last route 2024-09-20 16:56:36 +02:00
k 7d211f74d1 website: fixes 2024-09-19 21:48:54 +02:00
k 0f95d41785 website: rm history log 2024-09-19 21:11:37 +02:00
k 6389b530d9 changelog: hide broken image links 2024-09-19 21:10:11 +02:00
k 412769ff03 general: fixes 2024-09-19 21:03:50 +02:00
k d2349741f7 changelog: update 2024-09-19 11:24:13 +02:00
k 821bf8d63a readme: update 2024-09-19 11:01:08 +02:00
k 7b296e4863 parser: price fetch fixes 2024-09-19 10:49:26 +02:00
k 1acfcf088c readme: update 2024-09-18 20:15:32 +02:00
k e9680afdff readme: update 2024-09-18 19:31:33 +02:00
k 9695f12322 server: create in dir if missing 2024-09-18 18:43:36 +02:00
k 4060b7457b index: update geyser url 2024-09-18 18:35:19 +02:00
k a68344959d website: fix pathname on first load 2024-09-18 18:25:27 +02:00
k 41638d10bf server: add date-modified to datasets 2024-09-18 17:58:33 +02:00
k 9b4e166608 website: fixes 2024-09-18 16:56:55 +02:00
k 52a65fcad1 general: update 2024-09-18 00:14:53 +02:00
k da7c114d41 general: snapshot 2024-09-17 10:57:21 +02:00
k 62edee0860 readme 2024-09-17 00:22:51 +02:00
k 22ba5e7c94 assets: update 2024-09-16 23:45:24 +02:00
k 48e9a9c7dd website: add sw 2024-09-16 19:17:19 +02:00
k 9dbffb0c93 global: snapshot 2024-09-16 13:17:18 +02:00
k f95eb0f1c9 script: snapshot 2024-09-14 13:40:58 +02:00
k f3197c1af7 general: fixes 2024-09-14 11:47:02 +02:00
k 59f04c96c5 readme: update 2024-09-13 23:47:25 +02:00
k bf2034b80c global: snapshot 2024-09-13 22:59:20 +02:00
k deffaef2b5 rename: GUIDELINES to CONTRIBUTING 2024-09-11 22:52:53 +02:00
k 157ec003b7 remove: app 2024-09-11 22:47:26 +02:00
k ba4021ad73 global: snapshot 2024-09-10 23:15:13 +02:00
k 5edb8111a2 app: html version almost done 2024-09-10 09:39:06 +02:00
k e206b40468 general: snapshot 2024-08-26 01:23:48 +02:00
k 6ebd9320db app: folder reorg + tradingview notice 2024-08-08 17:11:58 +02:00
k 597a750fff app: unignore paths.d.ts to allow to run app without needing the server first 2024-08-08 09:48:36 +02:00
k 1273da6e71 changelog: update 2024-08-08 09:25:00 +02:00
k eb9b57eef4 parser: split txid_to_txdata db 2024-08-08 09:21:59 +02:00
k 5aaa05d579 parser: rm heed module 2024-08-06 19:52:59 +02:00
k 07abb0840b global: rm heed 2024-08-06 19:51:40 +02:00
k b8064510e3 parser: address_to_address_index: fix bad copy pasta 2024-08-05 12:07:20 +02:00
k a88d84e6e6 changelog: update 2024-08-05 11:58:17 +02:00
k c3c8f16793 parser: fix rpc call 2024-08-05 11:55:08 +02:00
k ce1fed8c16 parser: rm multisig db 2024-08-05 11:47:52 +02:00
k 9a8f5edd58 parser: fix binance time 2024-08-05 11:23:41 +02:00
k 992d45c8af server: update run.sh 2024-08-05 10:42:28 +02:00
k c646d6dc60 global: datasets compression via zstd 2024-08-05 00:44:46 +02:00
k 9067c28d24 parser: switch to biter 2024-08-03 15:17:57 +02:00
k afacea3fbb parser: reactivate bkp url for price fetching 2024-07-26 17:07:19 +02:00
649 changed files with 43644 additions and 43200 deletions
+2
View File
@@ -0,0 +1,2 @@
[build]
rustflags = ["-C", "target-cpu=native"]
+35 -9
View File
@@ -1,13 +1,39 @@
# Mac OS
.DS_Store
/app-next
/app-html
/datasets
/datasets2
/datasets_*
# Builds
target
TODO.md
# Copies
*\ copy*
.stfolder
/charts
/price
# Ignored
/_*
# Editors
.vscode
.zed
# Flamegraph
flamegraph/
flamegraph.svg
# Benchmarks
benches
# Snapshots
snapshots*/
# Docker
docker/kibo
# Types
paths.d.ts
vecid-to-indexes.d.ts
# Outputs
_outputs
# Logs
.log
+160 -20
View File
@@ -1,10 +1,150 @@
# Changelog
<!--
# v0.X.Y | WIP
![Image of the kibo Web App version 0.X.Y](https://github.com/kibo-money/kibo/blob/main/_assets/v0.X.Y.jpg)
-->
## v. 0.3.0 | [853930](https://mempool.space/block/00000000000000000002eb5e9a7950ca2d5d98bd1ed28fc9098aa630d417985d) - 2024/07/26
# v0.6.0 | WIP | A new beginning
![Image of the Satonomics Web App version 0.3.0](./assets/v0.3.0.jpg)
## Global
### Parser
- Completely redesign the back-end
- Merged parser and server crates into a single project (and thus executable), so now both will run at the same time with a single `cargo run -r` [#7392982](https://github.com/kibo-money/kibo/commit/7392982824c2db94bcd57251fd41986117c29a23)
- Added `--no-server` and `--no-parser` to disable each if needed
- Improved executable parameters
- Started using `log` and `env_logger` crates instead of custom code [#7392982](https://github.com/kibo-money/kibo/commit/7392982824c2db94bcd57251fd41986117c29a23)
- Improved logs
- Fixed input being unfocused right after being focused in Brave browser [#9a9ae61](https://github.com/kibo-money/kibo/commit/9a9ae614d07b54c08b7e9c0e2aefe3b52fdb93c5)
- Reworked server's API code [#6ab0f46]( https://github.com/kibo-money/kibo/commit/6ab0f463119a902a1b7ca9691b54f61543bb8f2f)
- New route format: `/api/date-to-realized-price` is now `/api/realized-price?kind=date`
- Added status and timing to logs
- Updated website packages
- Added API support for datasets by timestamp (by merging any dataset by height with the height to timestamp dataset and so it still uses heights as chunk ids) [#ca00f3f](https://github.com/kibo-money/kibo/commit/ca00f3f71526f0c5c16021024fec7e5c6e47221c)
- `/api/realized-price?kind=t`
- `/api/realized-price?kind=timestamp&chunk=860000`
- Created separate crate for indexing called `bindex`
- Created a crate a storage engine specialized in storing datasets that have indexes as keys and thus can be represented by an array/vec called `storable-vec`
- Removed the need for the `-txindex=1` parameter when starting your Bitcoin Core node as kibo has its own indexes now
## Git
Added git tags for each version though Markdown won't display formatted on Github so left the default text
## Deprecated
Moved Sanakirja database wrapper to its own crate (`snkrj`) and added a robust auto defragmentation to improve disk usage without the need for user's intervention.
Since it's not used anymore it will moved out of the repository relatively soon.
# [v0.5.0](https://github.com/kibo-money/kibo/tree/eea56d394bf92c62c81da8b78b8c47ea730683f5) | [873199](https://mempool.space/block/0000000000000000000270925aa6a565be92e13164565a3f7994ca1966e48050) - 2024/12/04
![Image of the kibo Web App version 0.5.0](https://github.com/kibo-money/kibo/blob/main/_assets/v0.5.0.jpg)
## Datasets
- Added `Sell Side Risk Ratio` to all entities
- Added `Open`, `High` and `Low` datasets
- Added `Satoshis Per Dollar`
- Added `All Time High`
- Added `All Time High Date`
- Added `Days Since All Time High`
- Added `Max Days Between All Time Highs`
- Added `Max Years Between All Time Highs`
- Added `Drawdown`
- Added `Adjusted Value Created`, `Adjusted Value Destroyed` and `Adjusted Spent Output Profit Ratio` to all entities
- Added `Realized Profit To Loss Ratio` to all entities
- Added `Hash Price Min`
- Added `Hash Price Rebound`
- Removed all year datasets (25) in favor for epoch datasets (5), the former was too granular to be really useful
- Removed datasets split by liquidity for all datasets **already split by any address kind**, while fun to have, they took time to compute, ram, and space to store and no one was actually checking them
- Fixed a lot of values in split by liquidity datasets
## Website
- Updated the design yet again which made the website for something more minimal and easier on the eyes
- Added a *Save In Bitcoin* (DCA) simulation page
- ~Added a dashboard~ Added the latest values to the tree next to each option instead, while less values are visible at a time, it's much more readable and organised
- Added a library of PDFs
- Fixed service worker not passing 304 (not modified) response and instead serving cached responses
- Fixed history not being properly registered
- Fixed window being moveable on iOS when in standalone mode when it shouldn't be
- Added `Compare` section to all groups, to compare all datasets within a group
- Updated `Solid Signals` library, which had an important breaking change on the `createEffect` function which might bring some bugs
- Fixed some datasets paths
- A lot of code reorg and file splits
- Adopted a framework like approach to load pages while still being pure JS without a build step
- Probably more that was forgotten
## Parser
- Added a `/datasets/last` json file with all the latest values
- Added `--rpcconnect` parameter to the config
- Added handling of SIGINT and SIGTERM terminal signals which menas you can now safely CTRL+C or kill the parser while it's exporting
- Added config print at the start of the program
- Compressed `empty_address_data` struct to save space (should shave of between up to 50% of the `address_index_to_empty_address_data` database)
- Doubled the number of `txid_to_tx_data` databases from 4096 to 8192
- ~Added `--recompute_computed true` argument, to allow recomputation of computed datasets in case of a bug~ Buggy for now
- Fixed not saved arguments, not being processed properly
- Fixed bug in `generic_map.multi_insert_simple_average`
- Added defragmentation option `--first-defragment true` of databases to save space (which can save up to 50%)
- Fixed bug in the computation of averages in `GenericMap`
- Added support and paramer for cookie files with `--rpccookiefile`, and auto find if the path is `--datadir/.cookie`
- Increased number of retries and time between them when fetching price from exchanges APIs
## Server
- Fixed links in several places missing the `/api` part and thus not working
- Fixed broken last values routes
- Added support for the `/datasets/last` file via the `/api/last` route
- Added support for `.json` (won't change anything) and `.csv` (will download a csv file) extension at the end of datasets routes
- Added `all=true` query parameter to dataset routes to get to full history
## Biter
- Moved back to this repo
# [v0.4.0](https://github.com/kibo-money/kibo/tree/a64c544815d9ef785e2fc1323582f774f16b9200) | [861950](https://mempool.space/block/00000000000000000000530d0e30ccf7deeace122dcc99f2668a06c6dad83629) - 2024/09/19
![Image of the kibo Web App version 0.4.0](https://github.com/kibo-money/kibo/blob/main/_assets/v0.4.0.jpg)
## Brand
- **Satonomics** is now **kibo** 🎉
## Website
- Complete redesign of the website
- Rewrote the whole application and removed `node`/`npm`/`pnpm` dependencies in favor for pure `HTML`/`CSS`/`Javascript`
- Website is now served by the server
- Added Trading View attribution link to the settings frame and file in the lightweight charts folder
- Many other changes
## Parser
- Changed the block iterator from a custom version of [bitcoin-explorer](https://crates.io/crates/bitcoin-explorer) to the homemade [biter](https://crates.io/crates/biter) which allows the parser to run alongside `bitcoind`
- Added datasets compression thanks to [zstd](https://crates.io/crates/zstd) to reduce disk usage
- Use the Bitcoin RPC server for various calls instead of running cli commands and then parsing the JSON from the output
- **Important database changes that will need a full rescan**:
- Changed databases page size from 1MB to 4KB for improved disk usage
- Split txid_to_tx_data database in 4096 chunks (from 256) for improved disk usage
- Split address_index_to_X databases to chunks of 25_000 instead of 50_000
- Removed local Multisig database
- Updated the config, run with `-h` to see possible args
- Moved outputs from `/target/outputs` to `/out` to allow to run commands like `cargo clean` without side effects
- Various first run fixes
- Added to `-h` which arguments are saved, which is all of them at the time of writing
## Server
- Updated the code to support compressed binaries
- Added serving of the website
- Improved `Cache-Control` behavior
# [v0.3.0](https://github.com/kibo-money/kibo/tree/b68b016091c45b071218fba01bac5b76e8eaf18c) | [853930](https://mempool.space/block/00000000000000000002eb5e9a7950ca2d5d98bd1ed28fc9098aa630d417985d) - 2024/07/26
![Image of the Satonomics Web App version 0.3.0](https://github.com/kibo-money/kibo/blob/main/_assets/v0.3.0.jpg)
## Parser
- Global
- Improved self-hosting by:
@@ -47,7 +187,7 @@
- Price
- Improved error message when price cannot be found
### App
## App
- General
- Added chart scroll button for nice animations à la Wicked
@@ -73,17 +213,17 @@
- Settings
- Removed the horizontal scroll bar which was unintended
### Server
## Server
- Run file
- Only run with a watcher if `cargo watch` is available
- Removed id_to_path file in favor for only `paths.d.ts` in `app/src/types`
## v. 0.2.0 | [851286](https://mempool.space/block/0000000000000000000281ca7f1bf8c50702bfca168c7af1bdc67c977c1ac8ed) - 2024/07/08
# [v0.2.0](https://github.com/kibo-money/kibo/tree/248187889283597c5dbb806292297453c25e97b8) | [851286](https://mempool.space/block/0000000000000000000281ca7f1bf8c50702bfca168c7af1bdc67c977c1ac8ed) - 2024/07/08
![Image of the Satonomics Web App version 0.2.0](./assets/v0.2.0.jpg)
![Image of the Satonomics Web App version 0.2.0](https://github.com/kibo-money/kibo/blob/main/_assets/v0.2.0.jpg)
### App
## App
- General
- Added the height version of all datasets and many optimizations to make them usable but only available on desktop and tablets for now
@@ -111,24 +251,24 @@
- Hopefully made scrollbars a little more subtle on WIndows and Linux, can't test
- Generale style updates
### Parser
## Parser
- Fixed ulimit only being run in Mac OS instead of whenever the program is detected
## v. 0.1.1 | [849240](https://mempool.space/block/000000000000000000002b8653988655071c07bb5f7181c038f9326bc86db741) - 2024/06/24
# [v0.1.1](https://github.com/kibo-money/kibo/tree/e55b5195a9de9aea306903c94ed63cb1720fda5f) | [849240](https://mempool.space/block/000000000000000000002b8653988655071c07bb5f7181c038f9326bc86db741) - 2024/06/24
![Image of the Satonomics Web App version 0.1.1](./assets/v0.1.1.jpg)
![Image of the Satonomics Web App version 0.1.1](https://github.com/kibo-money/kibo/blob/main/_assets/v0.1.1.jpg)
### Parser
## Parser
- Fixed overflow in `Price` struct which caused many Realized Caps and Realized Prices to have completely bogus data
- Fixed Realized Cap computation which was using rounded prices instead normal ones
### Server
## Server
- Added the chunk, date and time of the request to the terminal logs
### App
## App
- Chart
- Added double click option on a legend to toggle the visibility of all other series
@@ -161,14 +301,14 @@
- Misc
- Removed tracker even though it was a very privacy friendly as it appeared to not be working properly
### Price
## Price
- Deleted old price datasets and their backups
## v. 0.1.0 | [848642](https://mempool.space/block/000000000000000000020be5761d70751252219a9557f55e91ecdfb86c4e026a) - 2024/06/19
# [v0.1.0](https://github.com/kibo-money/kibo/tree/a1a576d088c8f83ed32d48753a7611f70a964574) | [848642](https://mempool.space/block/000000000000000000020be5761d70751252219a9557f55e91ecdfb86c4e026a) - 2024/06/19
![Image of the Satonomics Web App version 0.1.0](./assets/v0.1.0.jpg)
![Image of the Satonomics Web App version 0.1.0](https://github.com/kibo-money/kibo/blob/main/_assets/v0.1.0.jpg)
## v. 0.0.X | [835444](https://mempool.space/block/000000000000000000009f93907a0dd83c080d5585cc7ec82c076d45f6d7c872) - 2024/03/20
# v0.0.1 | [835444](https://mempool.space/block/000000000000000000009f93907a0dd83c080d5585cc7ec82c076d45f6d7c872) - 2024/03/20
![Image of the Satonomics Web App version 0.0.X](./assets/v0.0.X.jpg)
![Image of the Satonomics Web App version 0.0.X](https://github.com/kibo-money/kibo/blob/main/_assets/v0.0.X.jpg)
Generated
+3479
View File
File diff suppressed because it is too large Load Diff
+41
View File
@@ -0,0 +1,41 @@
[workspace]
resolver = "3"
members = ["crates/*"]
package.description = "The Bitcoin Research Kit is a suite of tools designed to extract, compute and display data stored on a Bitcoin Core node"
package.license = "MIT"
package.edition = "2024"
package.version = "0.0.12"
package.repository = "https://github.com/bitcoinresearchkit/brk"
[profile.release]
lto = "fat"
codegen-units = 1
panic = "abort"
[workspace.dependencies]
bitcoin = { version = "0.32.5", features = ["serde"] }
bitcoincore-rpc = "0.19.0"
brk_cli = { version = "0", path = "crates/brk_cli" }
brk_computer = { version = "0", path = "crates/brk_computer" }
brk_core = { version = "0", path = "crates/brk_core" }
brk_exit = { version = "0", path = "crates/brk_exit" }
brk_fetcher = { version = "0", path = "crates/brk_fetcher" }
brk_indexer = { version = "0", path = "crates/brk_indexer" }
brk_logger = { version = "0", path = "crates/brk_logger" }
brk_parser = { version = "0", path = "crates/brk_parser" }
brk_query = { version = "0", path = "crates/brk_query" }
brk_server = { version = "0", path = "crates/brk_server" }
brk_vec = { version = "0", path = "crates/brk_vec" }
byteview = "0.6.1"
clap = { version = "4.5.35", features = ["derive", "string"] }
color-eyre = "0.6.3"
derive_deref = "1.1.1"
fjall = "2.8.0"
jiff = "0.2.5"
log = { version = "0.4.27" }
minreq = { version = "2.13.3", features = ["https", "serde_json"] }
rayon = "1.10.0"
serde = { version = "1.0.219", features = ["derive"] }
serde_json = { version = "1.0.140", features = ["float_roundtrip"] }
tabled = "0.18.0"
zerocopy = { version = "0.8.24", features = ["derive"] }
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2024 Satonomics
Copyright (c) 2025 bitcoinresearchkit, kibo.money
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+78 -82
View File
@@ -1,103 +1,99 @@
# SATONOMICS
# Bitcoin Research Kit
![Image of the Satonomics Web App](./assets/latest.jpg)
<p align="left">
<a href="https://github.com/bitcoinresearchkit/brk">
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/bitcoinresearchkit/brk?style=social">
</a>
<a href="https://kibo.money">
<img alt="kibo.money" src="https://img.shields.io/badge/showcase-kib%C5%8D.money-orange">
</a>
<a href="https://github.com/bitcoinresearchkit/brk/blob/main/LICENSE.md">
<img src="https://img.shields.io/crates/l/brk" alt="License" />
</a>
<a href="https://crates.io/crates/brk">
<img src="https://img.shields.io/crates/v/brk" alt="Version" />
</a>
<a href="https://docs.rs/brk">
<img src="https://img.shields.io/docsrs/brk" alt="Documentation" />
</a>
<img src="https://img.shields.io/crates/size/brk" alt="Size" />
<a href="https://deps.rs/crate/brk">
<img src="https://deps.rs/crate/brk/latest/status.svg" alt="Dependency status">
</a>
<a href="https://discord.gg/Cvrwpv3zEG">
<img src="https://img.shields.io/discord/1350431684562124850?label=discord" alt="Discord" />
</a>
<a href="https://primal.net/p/nprofile1qqsfw5dacngjlahye34krvgz7u0yghhjgk7gxzl5ptm9v6n2y3sn03sqxu2e6">
<img src="https://img.shields.io/badge/nostr-purple?link=https%3A%2F%2Fprimal.net%2Fp%2Fnprofile1qqsfw5dacngjlahye34krvgz7u0yghhjgk7gxzl5ptm9v6n2y3sn03sqxu2e6" alt="Nostr" />
</a>
<a href="https://bsky.app/profile/bitcoinresearchkit.org">
<img src="https://img.shields.io/badge/bluesky-blue?link=https%3A%2F%2Fbsky.app%2Fprofile%2Fbitcoinresearchkit.org" alt="Bluesky" />
</a>
<a href="https://x.com/0xbrk">
<img src="https://img.shields.io/badge/x.com-black" alt="X" />
</a>
</p>
## Description
The Bitcoin Research Kit is a high-performance toolchain designed to parse, index, compute, serve and visualize data from a Bitcoin Core node, enabling users to gain deeper insights into the Bitcoin network.
Satonomics is a better, FOSS, Bitcoin-only, self-hostable Glassnode.
In other words it's an alternative to [Glassnode](https://glassnode.com), [mempool.space](https://mempool.space/) and [electrs](https://github.com/romanz/electrs) all in one package with a particular focus on simplicity and the self-hosting experience.
While [mempool.space](https://mempool.space) gives a very micro view of the network where you can follow the journey of any address, this tool is the exact opposite and very complimentary by giving you a much more global/macro view of the flow and various dynamics of the network via thousands of charts.
The toolkit can be used in various ways to accommodate as many needs as possible:
To promote even more transparency and trust in the network, this project is committed to making on-chain data accessible and verifiable by all, no matter your intentions or financial situation. That is why, the whole project is completely free, from code to services, including a real-time API with thousands and thousands of routes which can be used at will.
- **[Website](https://kibo.money)** \
Everyone is welcome to visit [kibo.money](https://kibo.money) which is the official showcase of the suite's capabilities and served by default when running BRK. \
Researchers and developers are free to use the API which endpoints documentation can be found [here](https://github.com/bitcoinresearchkit/brk/tree/main/crates/brk_server#endpoints). \
As a token of gratitude to the community and to stimulate curiosity, both the website and the API are entirely free, allowing anyone to use them.
- **[CLI](https://crates.io/crates/brk_cli)** \
Node runners are strongly encouraged to try out and self-host their own instance. \
A lot of effort has gone into making this as easy as possible. \
For more information visit: [`brk_cli`](https://crates.io/crates/brk_cli)
- **[Crates](https://crates.io/crates/brk)** \
Rust developers have access to a wide range crates, each built upon one another with its own specific purpose, enabling independent use and offering great flexibility.
**Having anyone be able to easily do a health-check of the network is incredibly important and should be wanted by every single bitcoiner.**
The primary goal of this project is to be fully-featured and accessible for everyone, regardless of their background or financial situation - whether that person is an enthusiast, researcher, miner, analyst, or simply curious.
## Warning
In contrast, existing alternatives tend to be either [very costly](https://studio.glassnode.com/pricing) or missing essential features, with the vast majority being closed-source and unverifiable, which fundamentally undermines the principles of Bitcoin.
This project is in a very early stage. The web app will have bugs, the API might break and the data can definitely to be false or slightly false.
## Crates
## Instances
- [`brk`](https://crates.io/crates/brk): Wrapper around all other `brk-*` crates
- [`brk_cli`](https://crates.io/crates/brk_cli): A standalone command line interface to interact with the Bitcoin Research Kit
- [`brk_computer`](https://crates.io/crates/brk_computer): A Bitcoin dataset computer, built on top of brk_indexer
- [`brk_core`](https://crates.io/crates/brk_core): The Core (Structs and Errors) of the Bitcoin Research Kit
- [`brk_exit`](https://crates.io/crates/brk_exit): An exit blocker built on top of ctrlc
- [`brk_fetcher`](https://crates.io/crates/brk_fetcher): A Bitcoin price fetcher
- [`brk_indexer`](https://crates.io/crates/brk_indexer): A Bitcoin Core indexer built on top of brk_parser
- [`brk_logger`](https://crates.io/crates/brk_logger): A clean logger used in the Bitcoin Research Kit.
- [`brk_parser`](https://crates.io/crates/brk_parser): A very fast Bitcoin Core block parser and iterator built on top of bitcoin-rust
- [`brk_query`](https://crates.io/crates/brk_query): A library that finds requested datasets.
- [`brk_server`](https://crates.io/crates/brk_server): A server that serves Bitcoin data and swappable front-ends, built on top of `brk_indexer`, `brk_fetcher` and `brk_computer`
- [`brk_vec`](https://crates.io/crates/brk_vec): A very small, fast, efficient and simple storable Vec.
Web App:
## Acknowledgments
- [app.satonomics.xyz](https://app.satonomics.xyz)
Deepest gratitude to the [Open Sats](https://opensats.org/) public charity. Their grant — from December 2024 to the present — has been critical in sustaining this project.
API:
Heartfelt thanks go out to every donor on [Nostr](https://primal.net/p/npub1jagmm3x39lmwfnrtvxcs9ac7g300y3dusv9lgzhk2e4x5frpxlrqa73v44) and [Geyser.fund](https://geyser.fund/project/brk) whose support has ensured the availability of the [kibo.money](https://kibo.money) public instance.
- [api.satonomics.xyz](https://api.satonomics.xyz)
- [api-bkp.satonomics.xyz](https://api-bkp.satonomics.xyz)
## Hosting as a service
## Structure
*Soon™*
- `parser`: The backbone of the project, it does most of the work by parsing and then computing datasets from the timechain.
- `server`: A small server which automatically creates routes to access through an API all created datasets.
- `app`: A web app which displays the generated datasets in various charts and dashboards.
If you'd like to have your own instance hosted for you please contact [hosting@bitcoinresearchkit.org](mailto:hosting@bitcoinresearchkit.org).
## Goals / Philosophy
- 2 separate servers (1 GB/s each) with different ISPs and Cloudflare integration for enhanced performance and optimal availability
- Direct communication for feature requests and support
- Updates delivered at your convenience
- Optional subdomains: `*.bitcoinresearchkit.org`, `*.kibo.money` and `*.satonomics.xyz`
- Logo featured in the Readme if desired
Adjectives that describe what this project is or strives to be, in no particular order:
Pricing: `0.01 BTC / month` *or* `0.1 BTC / year`
- **Best**: Replace Glassnode as the go to
- **Diverse**: Have as many charts/datasets as possible and something for everyone
- **Free**: Is and always will be completely free
- **Open**: With a very permissive license
- **Trustless**: You can verify and see exactly how each dataset is computed
- **Independent**: Only one, easily swappable, dependency (Price API)
- **Educational**: By providing many datasets that can be used to describe how Bitcoin works and why
- **Timeless**: Be relevant and usable 10 years from now by being independent and not do address tagging
- **Sovereign**: Be self-hostable on accessible hardware
- **Versatile**: You can view the data in charts, you can download the data, you can fetch the data via an API
- **Accessible**: Free Website and API with all the datasets for everyone
## Donate
## Milestones
[`bc1q09 8zsm89 m7kgyz e338vf ejhpdt 92ua9p 3peuve`](bitcoin:bc1q098zsm89m7kgyze338vfejhpdt92ua9p3peuve)
Big features that are planned, in no particular order:
[`lnurl1dp68gurn8ghj7ampd3kx2ar0veekzar0wd5xjtnrdakj7tnhv4kxctttdehhwm30d3h82unvwqhkxmmww3jkuar8d35kgetj8yuq363hv4`](lightning:lnurl1dp68gurn8ghj7ampd3kx2ar0veekzar0wd5xjtnrdakj7tnhv4kxctttdehhwm30d3h82unvwqhkxmmww3jkuar8d35kgetj8yuq363hv4)
- **Homepage**: A landing page to explains the project and what it does
- **More Datasets/Charts**: If a dataset can be computed, it should exist and have its related charts
- **Dashboards**: For a quick and real-time view of the latest data of all the datasets
- **NOSTR integration**: First to save preferences, later to add some social functionnality
- **Datasets by block timestamp**: In addition to having datasets by block date and block height
- **Descriptions**: Add text to describe all charts and what they mean
- **Start9 Add-on**: By making the whole suite much easier to self-host, it's quite rough right now
- **API Documentation**: Highly needed to explain what's what
_Maybe_:
- A Desktop app
- A mobile app
## Brand
- **Name**: Willing to change if someone thinks of something better !
- **Logo**: Most likely a placeholder
## Collaboration
- Repositories:
- [Github](https://github.com/satonomics-org/satonomics)
- [Codeberg](https://codeberg.org/satonomics/satonomics)
- Issues:
- [Github](https://github.com/satonomics-org/satonomics/issues)
- [NOSTR](https://gitworkshop.dev/r/naddr1qq99xct5dahx7mtfvdesz9thwden5te0wp6hyurvv4ex2mrp0yhxxmmdqgsfw5dacngjlahye34krvgz7u0yghhjgk7gxzl5ptm9v6n2y3sn03srqsqqqaueek2h03/issues)
- Proposals:
- [Github](https://github.com/satonomics-org/satonomics/pulls)
- [NOSTR](https://gitworkshop.dev/r/naddr1qq99xct5dahx7mtfvdesz9thwden5te0wp6hyurvv4ex2mrp0yhxxmmdqgsfw5dacngjlahye34krvgz7u0yghhjgk7gxzl5ptm9v6n2y3sn03srqsqqqaueek2h03/proposals)
## Proof of Work
Aka: Previous iterations
The initial idea was totally different yet morphed over time into what it is today: a fully FOSS self-hostable on-chain data generator
- https://github.com/drgarlic/satonomics
- https://github.com/drgarlic/satonomics-parser
- https://github.com/drgarlic/satonomics-explorer
- https://github.com/drgarlic/satonomics-server
- https://github.com/drgarlic/satonomics-app
- https://github.com/drgarlic/bitalisys
- https://github.com/drgarlic/bitesque-app
- https://github.com/drgarlic/bitesque-back
- https://github.com/drgarlic/bitesque-front
- https://github.com/drgarlic/bitesque-assets
- https://github.com/drgarlic/syf
[Geyser Fund](https://geyser.fund/project/brk)
-10
View File
@@ -1,10 +0,0 @@
node_modules
charts
dist
dev-dist
.DS_Store
visualizer
# Local Netlify folder
.netlify
.wrangler
paths.d.ts
-17
View File
@@ -1,17 +0,0 @@
# Satonomics - App
## Description
A web app to view the generated datasets in various charts.
## Requirements
- Install `node`
- Install `pnpm`
- If using `cloudflare`, add cache rule to bypass the cache for `/sw.js`
## Deployment
```bash
pnpm deploy-prod
```
-1
View File
@@ -1 +0,0 @@
/* /index.html
-375
View File
@@ -1,375 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Satonomics</title>
<meta
name="description"
content="A better, FOSS, Bitcoin-only, self-hostable Glassnode"
/>
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<link rel="manifest" href="/manifest.webmanifest" />
<meta name="theme-color" content="#0c0a09" />
<link
rel="icon"
type="image/png"
sizes="196x196"
href="/assets/favicon-196.png"
/>
<link rel="apple-touch-icon" href="/assets/apple-icon-180.png" />
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-2048-2732.jpg"
media="(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-2732-2048.jpg"
media="(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-1668-2388.jpg"
media="(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-2388-1668.jpg"
media="(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-1536-2048.jpg"
media="(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-2048-1536.jpg"
media="(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-1488-2266.jpg"
media="(device-width: 744px) and (device-height: 1133px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-2266-1488.jpg"
media="(device-width: 744px) and (device-height: 1133px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-1640-2360.jpg"
media="(device-width: 820px) and (device-height: 1180px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-2360-1640.jpg"
media="(device-width: 820px) and (device-height: 1180px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-1668-2224.jpg"
media="(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-2224-1668.jpg"
media="(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-1620-2160.jpg"
media="(device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-2160-1620.jpg"
media="(device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-1290-2796.jpg"
media="(device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-2796-1290.jpg"
media="(device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-1179-2556.jpg"
media="(device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-2556-1179.jpg"
media="(device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-1284-2778.jpg"
media="(device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-2778-1284.jpg"
media="(device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-1170-2532.jpg"
media="(device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-2532-1170.jpg"
media="(device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-1125-2436.jpg"
media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-2436-1125.jpg"
media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-1242-2688.jpg"
media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-2688-1242.jpg"
media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-828-1792.jpg"
media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-1792-828.jpg"
media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-1242-2208.jpg"
media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-2208-1242.jpg"
media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-750-1334.jpg"
media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-1334-750.jpg"
media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-640-1136.jpg"
media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-1136-640.jpg"
media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
/>
<meta name="apple-mobile-web-app-capable" content="yes" />
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-2048-2732.jpg"
media="(prefers-color-scheme: dark) and (device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-2732-2048.jpg"
media="(prefers-color-scheme: dark) and (device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-1668-2388.jpg"
media="(prefers-color-scheme: dark) and (device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-2388-1668.jpg"
media="(prefers-color-scheme: dark) and (device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-1536-2048.jpg"
media="(prefers-color-scheme: dark) and (device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-2048-1536.jpg"
media="(prefers-color-scheme: dark) and (device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-1488-2266.jpg"
media="(prefers-color-scheme: dark) and (device-width: 744px) and (device-height: 1133px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-2266-1488.jpg"
media="(prefers-color-scheme: dark) and (device-width: 744px) and (device-height: 1133px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-1640-2360.jpg"
media="(prefers-color-scheme: dark) and (device-width: 820px) and (device-height: 1180px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-2360-1640.jpg"
media="(prefers-color-scheme: dark) and (device-width: 820px) and (device-height: 1180px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-1668-2224.jpg"
media="(prefers-color-scheme: dark) and (device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-2224-1668.jpg"
media="(prefers-color-scheme: dark) and (device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-1620-2160.jpg"
media="(prefers-color-scheme: dark) and (device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-2160-1620.jpg"
media="(prefers-color-scheme: dark) and (device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-1290-2796.jpg"
media="(prefers-color-scheme: dark) and (device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-2796-1290.jpg"
media="(prefers-color-scheme: dark) and (device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-1179-2556.jpg"
media="(prefers-color-scheme: dark) and (device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-2556-1179.jpg"
media="(prefers-color-scheme: dark) and (device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-1284-2778.jpg"
media="(prefers-color-scheme: dark) and (device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-2778-1284.jpg"
media="(prefers-color-scheme: dark) and (device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-1170-2532.jpg"
media="(prefers-color-scheme: dark) and (device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-2532-1170.jpg"
media="(prefers-color-scheme: dark) and (device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-1125-2436.jpg"
media="(prefers-color-scheme: dark) and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-2436-1125.jpg"
media="(prefers-color-scheme: dark) and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-1242-2688.jpg"
media="(prefers-color-scheme: dark) and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-2688-1242.jpg"
media="(prefers-color-scheme: dark) and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-828-1792.jpg"
media="(prefers-color-scheme: dark) and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-1792-828.jpg"
media="(prefers-color-scheme: dark) and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-1242-2208.jpg"
media="(prefers-color-scheme: dark) and (device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-2208-1242.jpg"
media="(prefers-color-scheme: dark) and (device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-750-1334.jpg"
media="(prefers-color-scheme: dark) and (device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-1334-750.jpg"
media="(prefers-color-scheme: dark) and (device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-640-1136.jpg"
media="(prefers-color-scheme: dark) and (device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
/>
<link
rel="apple-touch-startup-image"
href="/assets/apple-splash-dark-1136-640.jpg"
media="(prefers-color-scheme: dark) and (device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
/>
</head>
<body
class="text-high-contrast overflow-hidden bg-white dark:bg-black"
style="font-size: 15px; line-height: 22px"
>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script src="/src/index.tsx" type="module"></script>
</body>
</html>
-47
View File
@@ -1,47 +0,0 @@
{
"name": "satonomics",
"description": "A better, FOSS, Bitcoin-only, self-hostable Glassnode",
"version": "0.3.0",
"license": "MIT",
"type": "module",
"scripts": {
"dev": "($npm_execpath outdated || read -p \"Press enter to ignore...\") && vite --host",
"build": "vite build",
"check": "tsc --noEmit --skipLibCheck --pretty",
"check-watch": "$npm_execpath check --watch",
"format": "prettier --write './src'",
"prod": "$npm_execpath run build && vite preview --host",
"pages-prod": "pnpm build && pnpm wrangler pages deploy ./dist",
"pages-dev": "pnpm build && pnpm wrangler pages deploy --branch dev ./dist",
"assets": "pnpm pwa-asset-generator ./public/logo/white.svg ./public/assets --index ./index.html --manifest ./public/manifest.webmanifest --icon-only --favicon --background \"linear-gradient(to right bottom, rgb(249, 115, 22), rgb(154, 52, 18))\" --padding \"min(15vh, 15vw)\" --path-override \"/assets\" && pnpm pwa-asset-generator ./public/logo/white.svg ./public/assets --index ./index.html --splash-only --background \"linear-gradient(to right bottom, rgb(249, 115, 22), rgb(154, 52, 18))\" --padding \"min(33vh, 33vw)\" --path-override \"/assets\" && pnpm pwa-asset-generator ./public/logo/white.svg ./public/assets --index ./index.html --splash-only --dark-mode --background \"#0c0a09\" --padding \"min(33vh, 33vw)\" --path-override \"/assets\""
},
"dependencies": {
"@leeoniya/ufuzzy": "^1.0.14",
"@solid-primitives/event-listener": "^2.3.3",
"@solid-primitives/intersection-observer": "^2.1.6",
"@solid-primitives/resize-observer": "^2.0.26",
"lean-qr": "^2.3.4",
"lightweight-charts": "^4.1.7",
"solid-js": "^1.8.19"
},
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "^4.3.1",
"@iconify-json/tabler": "^1.1.118",
"@tailwindcss/container-queries": "^0.1.1",
"autoprefixer": "^10.4.19",
"postcss": "^8.4.40",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.5",
"pwa-asset-generator": "^6.3.1",
"rollup-plugin-visualizer": "^5.12.0",
"tailwindcss": "^3.4.6",
"typescript": "^5.5.4",
"unplugin-auto-import": "^0.18.2",
"unplugin-icons": "^0.19.0",
"vite": "^5.3.5",
"vite-plugin-pwa": "^0.20.1",
"vite-plugin-solid": "^2.10.2",
"workbox-window": "^7.1.0",
"wrangler": "^3.66.0"
}
}
-6338
View File
File diff suppressed because it is too large Load Diff
-11
View File
@@ -1,11 +0,0 @@
/** @type {import("prettier").Options} */
export default {
plugins: [
'@ianvs/prettier-plugin-sort-imports',
'prettier-plugin-tailwindcss', // MUST come last
],
tailwindFunctions: ['classList'],
importOrder: ['<THIRD_PARTY_MODULES>', '', '^/?(~|src)/', '', '^[./]'],
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.
-17
View File
@@ -1,17 +0,0 @@
<svg width="100%" height="100%" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;" fill="black">
<g transform="matrix(1.14102,0,0,2.63158,-0.849652,5.12904)">
<rect x="4.25" y="3.751" width="14.023" height="1.52"/>
</g>
<g transform="matrix(1.14102,0,0,2.63158,-0.849652,0.129039)">
<rect x="4.25" y="3.751" width="14.023" height="1.52"/>
</g>
<g transform="matrix(1.14102,0,0,2.63158,-0.849652,-4.87096)">
<rect x="4.25" y="3.751" width="14.023" height="1.52"/>
</g>
<g transform="matrix(0.285256,0,0,2.63158,8.78759,-9.87096)">
<rect x="4.25" y="3.751" width="14.023" height="1.52"/>
</g>
<g transform="matrix(0.285256,0,0,2.63158,8.78759,10.129)">
<rect x="4.25" y="3.751" width="14.023" height="1.52"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1004 B

-17
View File
@@ -1,17 +0,0 @@
<svg width="100%" height="100%" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;" fill="white">
<g transform="matrix(1.14102,0,0,2.63158,-0.849652,5.12904)">
<rect x="4.25" y="3.751" width="14.023" height="1.52"/>
</g>
<g transform="matrix(1.14102,0,0,2.63158,-0.849652,0.129039)">
<rect x="4.25" y="3.751" width="14.023" height="1.52"/>
</g>
<g transform="matrix(1.14102,0,0,2.63158,-0.849652,-4.87096)">
<rect x="4.25" y="3.751" width="14.023" height="1.52"/>
</g>
<g transform="matrix(0.285256,0,0,2.63158,8.78759,-9.87096)">
<rect x="4.25" y="3.751" width="14.023" height="1.52"/>
</g>
<g transform="matrix(0.285256,0,0,2.63158,8.78759,10.129)">
<rect x="4.25" y="3.751" width="14.023" height="1.52"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1004 B

-194
View File
@@ -1,194 +0,0 @@
import { createRWS } from "/src/solid/rws";
const texts = [
"satonomics",
"satonomics",
"satonomics",
"satonomics",
"satonomics",
"stay humble, stack sats",
"21 million",
"cold storage",
"utxo",
"satoshi nakamoto",
"hodl",
`don't trust, verify`,
"zap",
"₿itcoin",
"lightning",
"nostr",
"freedom tech",
"2008/10/31",
"2009/01/03",
"2010/05/22",
"hodl!",
"Hal Finney",
"Vote for better money",
"gradually then suddenly",
"timechain",
"self custody",
"be your own bank",
"resistance money",
"foss",
"permissionless",
"great reset",
"orange pill",
"borderless",
"anonymous",
"nyknyc",
"low time preference",
"absolute scarcity",
"time is scarce",
"ride or die",
"cyberpunk",
];
export function Background({
mode,
opacity,
focused,
}: {
mode: SL<"Scroll" | "Static">;
opacity: SL<{ text: string; value: number }>;
focused: Accessor<boolean>;
}) {
return (
<>
<div
class="absolute h-full w-full overflow-hidden will-change-auto"
style={{
opacity: opacity.selected().value,
}}
>
<div class="-m-[2rem] -space-y-1 overflow-hidden md:-m-[1rem]">
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
<Line mode={mode} focused={focused} />
</div>
</div>
<div class="absolute h-full w-full opacity-10 mix-blend-multiply">
<Noise />
</div>
<div class="absolute h-full w-full opacity-10 mix-blend-hard-light">
<Noise />
</div>
</>
);
}
function Line({
mode,
focused,
}: {
mode: SL<"Scroll" | "Static">;
focused: Accessor<boolean>;
}) {
const shuffled = shuffle(texts).slice(0, 10);
const joined = shuffled.join(". ");
return (
<div class="select-none whitespace-nowrap">
<TextWrapper mode={mode} focused={focused} joined={joined} />
</div>
);
}
function TextWrapper({
joined,
mode,
focused,
}: {
mode: SL<"Scroll" | "Static">;
focused: Accessor<boolean>;
joined: string;
}) {
const p = createRWS(undefined as HTMLParagraphElement | undefined);
const seconds = createRWS(joined.length * 2);
const wasOnceOn = createRWS(false);
createEffect(() => {
if (!wasOnceOn() && mode.selected() === "Scroll") {
wasOnceOn.set(true);
}
});
onMount(() => {
seconds.set(Math.round(p()!.clientWidth / 20));
});
return (
<p
ref={p.set}
class="inline-block px-2 text-[5dvh] font-black uppercase leading-none"
style={{
...(wasOnceOn()
? {
animation: `marquee ${seconds()}s linear infinite`,
"animation-play-state":
focused() && mode.selected() === "Scroll"
? "running"
: "paused",
}
: {}),
}}
>
{joined} {wasOnceOn() ? joined : undefined}
</p>
);
}
function shuffle<T>([...arr]: T[]): T[] {
let m = arr.length;
while (m) {
const i = Math.floor(Math.random() * m--);
[arr[m], arr[i]] = [arr[i], arr[m]];
}
return arr;
}
function Noise() {
return (
<svg
class="size-full"
viewBox="0 0 200 200"
preserveAspectRatio="none"
xmlns="http://www.w3.org/2000/svg"
>
<filter id="noiseFilter">
<feTurbulence
type="fractalNoise"
baseFrequency="3"
numOctaves="3"
stitchTiles="stitch"
/>
</filter>
<rect width="100%" height="100%" filter="url(#noiseFilter)" />
</svg>
);
}
-54
View File
@@ -1,54 +0,0 @@
import { classPropToString } from "/src/solid/classes";
export function Box({
flex = true,
absolute,
padded = true,
spaced = true,
children,
dark,
classes,
}: {
flex?: boolean;
absolute?: "top" | "bottom";
padded?: boolean;
spaced?: boolean;
dark?: boolean;
classes?: string;
} & ParentProps) {
return (
<div
class={classPropToString([
"p-2",
absolute
? [
"absolute inset-x-0",
absolute === "top"
? "top-0"
: "pointer-events-none bottom-0 bg-gradient-to-b from-transparent to-orange-100 dark:to-black",
]
: "relative",
classes,
])}
>
<div
class={classPropToString([
"border-lighter pointer-events-auto relative overflow-hidden rounded-xl border shadow-md",
dark
? "bg-white/40 backdrop-blur-sm dark:bg-orange-100/5"
: "bg-white/60 backdrop-blur-md dark:bg-orange-200/10",
])}
>
<div
class={classPropToString([
flex && "flex w-full",
spaced && "space-x-2",
padded && "p-1.5",
])}
>
{children}
</div>
</div>
</div>
);
}
-31
View File
@@ -1,31 +0,0 @@
import { random } from "/src/scripts/utils/math/random";
export function Button({
onClick,
children,
}: { onClick: VoidFunction } & ParentProps) {
return (
<button
class="group flex w-full flex-1 items-center justify-center rounded-lg px-2 py-1.5 hover:bg-orange-200/20 active:scale-95"
onClick={onClick}
>
{children}
</button>
);
}
export function ButtonRandomChart({ presets }: { presets: Presets }) {
return (
<button
class="inline-flex rounded-md bg-orange-700 bg-opacity-80 px-1.5 py-0.5 font-medium hover:bg-opacity-100 active:scale-95"
onClick={() => {
const randomPreset = random(presets.list);
if (randomPreset) {
presets.select(randomPreset);
}
}}
>
Open a random chart
</button>
);
}
@@ -1,53 +0,0 @@
import { Button } from "./button";
export function Actions({
presets,
fullscreen,
qrcode,
}: {
presets: Presets;
qrcode: RWS<string>;
fullscreen?: RWS<boolean>;
}) {
const ButtonShare = lazy(() =>
import("./buttonShare").then((d) => ({ default: d.ButtonShare })),
);
return (
<div class="flex space-x-1 p-1.5">
<Show when={fullscreen}>
{(fullscreen) => (
<Button
title="Toggle fullscreen"
icon={() =>
fullscreen()()
? IconTablerLayoutSidebarLeftExpand
: IconTablerLayoutSidebarRightExpand
}
onClick={() => {
fullscreen().set((b) => !b);
}}
classes="hidden md:block"
/>
)}
</Show>
<ButtonShare qrcode={qrcode} />
<Button
title="Favorite"
colors={() =>
presets.selected().isFavorite()
? "text-amber-500 bg-amber-500/15 hover:bg-amber-500/30"
: ""
}
icon={() =>
presets.selected().isFavorite()
? IconTablerStarFilled
: IconTablerStar
}
onClick={() => presets.selected().isFavorite.set((b) => !b)}
/>
</div>
);
}
@@ -1,36 +0,0 @@
import { classPropToString } from "/src/solid/classes";
export function Button({
title,
icon,
colors,
onClick,
disabled,
classes,
}: {
title: string;
icon: () => ValidComponent;
colors?: () => string;
onClick: VoidFunction;
disabled?: () => boolean;
classes?: string;
}) {
return (
<button
title={title}
disabled={disabled?.()}
class={classPropToString([
colors?.() || (disabled?.() ? "" : "hover:bg-orange-200/15"),
!disabled?.() && "group",
classes,
"flex-none rounded-lg p-2 disabled:opacity-50",
])}
onClick={onClick}
>
<Dynamic
component={icon()}
class="size-[1.125rem] group-active:scale-90"
/>
</button>
);
}
@@ -1,22 +0,0 @@
import { Button } from "./button";
export function ButtonShare({ qrcode }: { qrcode: RWS<string> }) {
return (
<Button
title="Share"
icon={() => IconTablerShare}
onClick={() =>
import("lean-qr").then(({ generate }) =>
qrcode.set(() =>
generate(document.location.href).toDataURL({
on: [0xff, 0xff, 0xff, 0xff],
off: [0x00, 0x00, 0x00, 0x00],
padX: 0,
padY: 0,
}),
),
)
}
/>
);
}
@@ -1,364 +0,0 @@
import { requestIdleCallbackPossible } from "/src/env";
import { chunkIdToIndex } from "/src/scripts/datasets/resource";
import { createChart } from "/src/scripts/lightweightCharts/create";
import { createSeriesGroup } from "/src/scripts/lightweightCharts/group";
import { setMinMaxMarkers } from "/src/scripts/lightweightCharts/markers";
import {
debouncedUpdateVisiblePriceSeriesType,
updateVisiblePriceSeriesType,
} from "/src/scripts/lightweightCharts/price";
import {
initTimeScale,
setInitialTimeRange,
} from "/src/scripts/lightweightCharts/time";
import { setWhitespace } from "/src/scripts/lightweightCharts/whitespace";
import { SeriesType } from "/src/scripts/presets/enums";
import { colors } from "/src/scripts/utils/colors";
import { debounce } from "/src/scripts/utils/debounce";
import { createSL } from "/src/scripts/utils/selectableList/static";
import { webSockets } from "/src/scripts/ws";
import { classPropToString } from "/src/solid/classes";
import { createRWS } from "/src/solid/rws";
import { RadioGroup } from "../../settings";
export function Chart({
activeDatasets,
activeIds,
charts,
chartsDrawn,
dark,
datasets,
exactRange,
firstChartSetter,
index,
lastActiveIndex,
lastChartIndex,
legendSetter,
preset: presetAccessor,
priceSeriesType,
seriesConfigs,
seriesCount,
}: {
activeDatasets: ReadWriteSignal<ResourceDataset<any, any>[]>;
activeIds: RWS<number[]>;
charts: ReadWriteSignal<
{
chart: RWS<IChartApi | undefined>;
whitespace: RWS<ISeriesApiAny | undefined>;
}[]
>;
chartsDrawn: Accessor<ReadWriteSignal<boolean>[]>;
dark: Accessor<boolean>;
datasets: Datasets;
exactRange: ReadWriteSignal<TimeRange>;
firstChartSetter: Setter<IChartApi | undefined>;
index: Accessor<number>;
lastActiveIndex: Accessor<number | undefined>;
lastChartIndex: Accessor<number>;
legendSetter: Setter<SeriesLegend[]>;
preset: Accessor<Preset>;
priceSeriesType: ReadWriteSignal<PriceSeriesType>;
seriesConfigs: SeriesConfig[];
seriesCount: Accessor<number>;
}) {
const div = createRWS<HTMLDivElement | undefined>(undefined);
const chartIndex = index();
const isDrawn = chartsDrawn()[chartIndex];
const isLastDrawn = createMemo(
() => chartsDrawn().findLastIndex((drawn) => drawn()) === chartIndex,
);
const chartPriceModeKey = `chart-price-mode-${chartIndex}` as const;
const chartPriceMode = createSL(["Linear", "Log"] as const, {
saveable: {
key: chartPriceModeKey,
mode: "localStorage",
},
defaultValue: chartIndex === 0 ? "Log" : "Linear",
});
createEffect(
on([div, () => charts()[chartIndex]], ([div, chartConfig]) => {
if (!div || !chartConfig) return;
const preset = presetAccessor();
const scale = preset.scale;
const chart = createChart({
scale,
element: div,
dark,
});
if (!chart) {
console.log("chart: undefined");
return;
}
const whitespace = setWhitespace(chart, scale);
batch(() => {
chartConfig.chart.set(chart);
chartConfig.whitespace.set(whitespace);
if (chartIndex === 0) {
firstChartSetter(chart);
}
});
const range = exactRange();
setInitialTimeRange({ chart, range });
if (chartIndex === 0) {
initTimeScale({
scale,
chart,
activeIds,
exactRange,
});
if (range) {
updateVisiblePriceSeriesType({
scale,
chart,
priceSeriesType,
timeRange: range,
});
}
}
const chartLegend: SeriesLegend[] = [];
onCleanup(() => {
chartLegend.length = 0;
});
const markerCallback = () =>
setMinMaxMarkers({
scale,
visibleRange: exactRange(),
legendList: chartLegend,
dark,
activeIds: activeIds,
});
const debouncedSetMinMaxMarkers = requestIdleCallbackPossible
? () => requestIdleCallback(markerCallback)
: debounce(
markerCallback,
seriesCount() * 10 + scale === "date" ? 50 : 100,
);
createEffect(on([exactRange, dark], debouncedSetMinMaxMarkers));
if (chartIndex === 0) {
const datasetPath: AnyDatasetPath = `/${scale}-to-price`;
const dataset = datasets.getOrImport(scale, datasetPath);
// Don't trigger reactivity by design
activeDatasets().push(dataset);
const title = "Price";
function createPriceSeries(seriesType: PriceSeriesType) {
let seriesConfig: SeriesConfig;
if (seriesType === "Candlestick") {
seriesConfig = {
datasetPath,
title,
seriesType: SeriesType.Candlestick,
};
} else {
seriesConfig = {
datasetPath,
title,
color: colors.white,
};
}
const priceSeries = createSeriesGroup({
scale,
datasets,
index: -1,
activeIds,
seriesConfig,
chart,
chartLegend,
lastActiveIndex,
preset,
disabled: () => priceSeriesType() !== seriesType,
debouncedSetMinMaxMarkers,
dark,
});
createEffect(() => {
const latest = webSockets.liveKrakenCandle.latest();
if (!latest) return;
const index = chunkIdToIndex(scale, latest.year);
const series = priceSeries.seriesList.at(index)?.();
series?.update(latest);
});
return priceSeries;
}
const priceCandlestickLegend = createPriceSeries("Candlestick");
const priceLineLegend = createPriceSeries("Line");
createEffect(() => {
priceCandlestickLegend.visible.set(priceLineLegend.visible());
});
createEffect(() => {
priceLineLegend.visible.set(priceCandlestickLegend.visible());
});
}
[...seriesConfigs].reverse().forEach((seriesConfig, index) => {
const dataset = datasets.getOrImport(scale, seriesConfig.datasetPath);
// Don't trigger reactivity by design
activeDatasets().push(dataset);
createSeriesGroup({
scale,
datasets,
activeIds,
index,
seriesConfig,
chartLegend,
chart,
preset,
lastActiveIndex,
debouncedSetMinMaxMarkers,
dark,
});
});
chartLegend.forEach((legend) => {
createEffect(on(legend.visible, debouncedSetMinMaxMarkers));
});
legendSetter((l) => {
for (let i = 0; i < chartLegend.length; i++) {
l.splice(0, 0, chartLegend[i]);
}
return l;
});
createEffect(() =>
isDrawn.set(() => chartLegend.some((legend) => legend.drawn())),
);
createEffect(() =>
chart.timeScale().applyOptions({
visible: isLastDrawn(),
}),
);
createEffect(() =>
chart.priceScale("right").applyOptions({
mode: chartPriceMode.selected() === "Linear" ? 0 : 1,
}),
);
chart.timeScale().subscribeVisibleLogicalRangeChange((logicalRange) => {
if (!logicalRange) return;
// Must be the chart with the visible timeScale
if (chartIndex === lastChartIndex()) {
debouncedUpdateVisiblePriceSeriesType({
scale,
chart,
logicalRange,
priceSeriesType,
});
}
for (
let otherChartIndex = 0;
otherChartIndex <= lastChartIndex();
otherChartIndex++
) {
if (chartIndex !== otherChartIndex) {
const chart = charts()[otherChartIndex].chart();
chart?.timeScale().setVisibleLogicalRange(logicalRange);
}
}
});
chart.subscribeCrosshairMove(({ time, sourceEvent }) => {
// Don't override crosshair position from scroll event
if (time && !sourceEvent) return;
for (
let otherChartIndex = 0;
otherChartIndex <= lastChartIndex();
otherChartIndex++
) {
const { whitespace: _whitespace, chart: _otherChart } =
charts()[otherChartIndex];
const otherChart = _otherChart();
const whitespace = _whitespace();
if (otherChart && whitespace && chartIndex !== otherChartIndex) {
if (time) {
otherChart.setCrosshairPosition(NaN, time, whitespace);
} else {
// No time when mouse goes outside the chart
otherChart.clearCrosshairPosition();
}
}
}
});
// Trigger reactivity now
activeDatasets.set((l) => l);
}),
);
return (
<div
style={{
height: isLastDrawn() ? "100%" : "calc(100% - 62px)",
"margin-bottom": isLastDrawn() ? "" : "-2px",
}}
class={classPropToString([
isDrawn()
? ["max-h-full", !isLastDrawn() ? "border-b" : "mb-[-2px]"]
: "max-h-0",
"border-lighter relative h-full min-h-0 w-full cursor-crosshair",
])}
>
<div ref={div.set} class="size-full" />
<Show when={isDrawn()}>
<div class="text-low-contrast absolute left-0 top-0 px-2 py-1.5 text-xs">
{chartIndex === 0
? ("US Dollars" satisfies Unit)
: presetAccessor().unit}
</div>
<div
style={{
bottom: `${isLastDrawn() ? 32 : 0}px`,
right: `77px`,
}}
class="text-low-contrast absolute z-10 px-3 py-0.5"
>
<RadioGroup size="xs" title={chartPriceModeKey} sl={chartPriceMode} />
</div>
</Show>
</div>
);
}
@@ -1,137 +0,0 @@
import { chunkIdToIndex } from "/src/scripts/datasets/resource";
import {
getInitialTimeRange,
setActiveIds,
} from "/src/scripts/lightweightCharts/time";
import { createRWS } from "/src/solid/rws";
import { Chart } from "./chart";
export function Charts({
firstChartSetter,
preset,
datasets,
legendSetter,
dark,
activeIds,
}: {
firstChartSetter: Setter<IChartApi | undefined>;
preset: Accessor<Preset>;
datasets: Datasets;
legendSetter: Setter<SeriesLegend[]>;
dark: Accessor<boolean>;
activeIds: RWS<number[]>;
}) {
const scale = createMemo(() => preset().scale);
const exactRange = createRWS(getInitialTimeRange(scale()));
const priceSeriesType = createRWS<PriceSeriesType>("Candlestick");
const activeDatasets = createRWS([] as ResourceDataset<any, any>[], {
equals: false,
});
const chartSeriesConfigs = createRWS([] as SeriesConfig[][], {
equals: false,
});
const charts = createRWS(
[] as {
chart: RWS<IChartApi | undefined>;
whitespace: RWS<ISeriesApiAny | undefined>;
}[],
{
equals: false,
},
);
const lastChartIndex = createMemo(() => chartSeriesConfigs().length - 1);
const seriesCount = createMemo(() =>
chartSeriesConfigs().reduce(
(acc, l) => (acc += l.length),
1, // Because of price series
),
);
const lastActiveIndex = createMemo(() => {
const last = activeIds().at(-1);
return last !== undefined
? chunkIdToIndex(preset().scale, last)
: undefined;
});
const chartsDrawn = createMemo(() =>
chartSeriesConfigs().map((_) => createRWS(true)),
);
createEffect(
on([activeIds, activeDatasets], ([ids, activeDatasets]) => {
for (let i = 0; i < ids.length; i++) {
const id = ids[i];
for (let j = 0; j < activeDatasets.length; j++) {
activeDatasets[j].fetch(id);
}
}
}),
);
createEffect(
on(preset, (preset) => {
const scale = preset.scale;
exactRange.set(getInitialTimeRange(scale));
chartSeriesConfigs.set(
[preset.top || [], preset.bottom].flatMap((list) =>
list ? [list] : [],
),
);
charts.set(() =>
new Array(chartSeriesConfigs().length).fill(undefined).map(() => ({
chart: createRWS(undefined as IChartApi | undefined),
whitespace: createRWS(undefined as ISeriesApiAny | undefined),
})),
);
setActiveIds({
exactRange: exactRange(),
activeIds,
});
legendSetter(() => []);
}),
);
onCleanup(() => {
firstChartSetter(undefined);
charts().map(({ chart, whitespace }) => {
chart()?.remove();
chart.set(undefined);
whitespace.set(undefined);
});
});
return (
<For
each={chartSeriesConfigs().filter(
(configs, index) => index === 0 || configs.length !== 0,
)}
>
{(seriesConfigs, index) => (
<Chart
activeDatasets={activeDatasets}
activeIds={activeIds}
charts={charts}
chartsDrawn={chartsDrawn}
dark={dark}
datasets={datasets}
exactRange={exactRange}
firstChartSetter={firstChartSetter}
index={index}
lastActiveIndex={lastActiveIndex}
lastChartIndex={lastChartIndex}
legendSetter={legendSetter}
preset={preset}
priceSeriesType={priceSeriesType}
seriesConfigs={seriesConfigs}
seriesCount={seriesCount}
/>
)}
</For>
);
}
@@ -1,178 +0,0 @@
import { chunkIdToIndex } from "/src/scripts/datasets/resource";
import { createRWS } from "/src/solid/rws";
import { Scrollable } from "../../scrollable";
const transparency = "44";
export function Legend({
scale,
legend: legendList,
dark,
activeIds,
}: {
scale: Accessor<ResourceScale>;
legend: Accessor<SeriesLegend[]>;
dark: Accessor<boolean>;
activeIds: Accessor<number[]>;
}) {
const hovered = createRWS<SeriesLegend | undefined>(undefined);
let toggle = false;
return (
<Scrollable classes="items-center gap-1 p-1.5">
<For each={legendList()}>
{(legend) => {
createEffect(() => {
const range = activeIds();
for (let i = 0; i < range.length; i++) {
const id = range[i];
const initialColors = {} as any;
const darkenColors = {} as any;
const chunkIndex = chunkIdToIndex(scale(), id);
const series = legend.seriesList.at(chunkIndex)?.();
if (!series) return;
const seriesOptions = series.options();
if (!seriesOptions) continue;
Object.entries(seriesOptions).forEach(([k, v]) => {
if (k.toLowerCase().includes("color") && v) {
if (typeof v === "string" && !v.startsWith("#")) {
return;
}
v = (v as string).substring(0, 7);
initialColors[k] = v;
darkenColors[k] = `${v}${transparency}`;
} else if (k === "lastValueVisible" && v) {
initialColors[k] = true;
darkenColors[k] = false;
}
});
createEffect((wasHovering: boolean) => {
const hoveredLegend = hovered();
const hovering = !!hovered();
if (wasHovering === hovering) {
return hovering;
}
if (hoveredLegend) {
if (hoveredLegend.title !== legend.title) {
series.applyOptions(darkenColors);
}
} else {
series.applyOptions(initialColors);
}
return hovering;
}, false);
}
});
let previousClickTime: number = 0;
return (
<Show when={!legend.disabled()}>
<button
onMouseEnter={() => legend.visible() && hovered.set(legend)}
onMouseLeave={() => hovered.set(undefined)}
onTouchStart={() => legend.visible() && hovered.set(legend)}
onTouchEnd={() => hovered.set(undefined)}
onClick={() => {
const currentClickTime = new Date().getTime();
if (currentClickTime - previousClickTime > 300) {
legend.visible.set((visible) => !visible);
} else {
legendList().forEach((_legend) => {
if (_legend.title != legend.title) {
_legend.visible.set(toggle);
}
});
legend.visible.set(true);
toggle = !toggle;
}
previousClickTime = currentClickTime;
if (legend.visible()) {
hovered.set(legend);
} else {
hovered.set(undefined);
}
}}
class="flex flex-none items-center space-x-1.5 rounded-full py-1.5 pl-2 pr-2.5 hover:bg-orange-800/20 active:scale-[0.975] dark:hover:bg-orange-200/20"
>
<span
class="flex size-4 flex-col overflow-hidden rounded-full"
style={{
opacity: legend.visible() ? 1 : 0.5,
}}
>
<For
each={
Array.isArray(legend.color)
? legend.color.map((c) => c(dark))
: [legend.color(dark)]
}
>
{(color) => (
<span
class="w-full flex-1"
style={{
"background-color": color,
}}
/>
)}
</For>
</span>
<span
class="text-high-contrast decoration-high-contrast decoration-wavy decoration-[1.5px]"
style={{
"text-decoration-line": !legend.visible()
? "line-through"
: undefined,
"--tw-text-opacity": legend.visible() ? 1 : 0.5,
}}
>
{legend.title}
</span>
<Show when={legend.dataset.url}>
{(url) => (
<a
title="Dataset"
class="border-superlight -my-0.5 !-mr-1 inline-flex size-6 flex-col overflow-hidden rounded-full border bg-white bg-opacity-5 p-1 pl-0.5 hover:bg-opacity-50 dark:bg-orange-200 dark:bg-opacity-5 dark:hover:bg-opacity-25"
onClick={(event) => {
event.stopPropagation();
}}
href={url()}
target={
url()?.startsWith("/") || url()?.startsWith("http")
? "_blank"
: undefined
}
>
<IconTablerDownload />
</a>
)}
</Show>
</button>
</Show>
);
}}
</For>
</Scrollable>
);
}
@@ -1,328 +0,0 @@
import { ONE_DAY_IN_MS } from "/src/scripts/utils/time";
import { classPropToString } from "/src/solid/classes";
import { createRWS } from "/src/solid/rws";
import { GENESIS_DAY } from "../../../../../scripts/lightweightCharts/whitespace";
import { Box } from "../../box";
import { Scrollable } from "../../scrollable";
const DELAY = 1;
const MULTIPLIER = DELAY / 1000;
const LEFT = -1;
const RIGHT = 1;
export function TimeScale({
scale,
firstChart,
}: {
scale: Accessor<ResourceScale>;
firstChart: RWS<IChartApi | undefined>;
}) {
const today = new Date();
const disabled = createMemo(() => !firstChart());
const scrollDirection = createRWS(0);
const timeScale = createMemo(() => {
const chart = firstChart();
if (!chart) return undefined;
return chart.timeScale();
});
let interval: number | undefined;
function createScrollLoop() {
clearInterval(interval);
const direction = scrollDirection();
if (!direction) return;
// @ts-ignore
interval = setInterval(() => {
const time = timeScale();
if (!time) return;
const range = time.getVisibleLogicalRange();
if (!range) return;
const speed = (range.to - range.from) * MULTIPLIER * direction;
// @ts-ignore
range.from += speed;
// @ts-ignore
range.to += speed;
time.setVisibleLogicalRange(range);
}, DELAY);
}
onCleanup(() => clearInterval(interval));
return (
<Box dark padded={false} spaced={false} classes="short:hidden">
<div class="flex items-center p-1.5">
<Button
square
disabled={disabled}
onClick={() => {
scrollDirection.set((v) => (v === LEFT ? 0 : LEFT));
createScrollLoop();
}}
>
<Show
when={scrollDirection() === LEFT}
fallback={<IconTablerPlayerTrackPrevFilled />}
>
<IconTablerPlayerPauseFilled />
</Show>
</Button>
</div>
<div class="border-lighter border-l" />
<Scrollable classes="p-1.5 space-x-2">
<Switch>
<Match when={scale() === "date"}>
<Button
minWidth
disabled={disabled}
onClick={() => setTimeScale({ scale: scale(), timeScale })}
>
All Time
</Button>
<Button
minWidth
disabled={disabled}
onClick={() =>
setTimeScale({ scale: scale(), timeScale, days: 7 })
}
>
1 Week
</Button>
<Button
minWidth
disabled={disabled}
onClick={() =>
setTimeScale({ scale: scale(), timeScale, days: 30 })
}
>
1 Month
</Button>
<Button
minWidth
disabled={disabled}
onClick={() =>
setTimeScale({ scale: scale(), timeScale, days: 3 * 30 })
}
>
3 Months
</Button>
<Button
minWidth
disabled={disabled}
onClick={() =>
setTimeScale({ scale: scale(), timeScale, days: 6 * 30 })
}
>
6 Months
</Button>
<Button
minWidth
disabled={disabled}
onClick={() =>
setTimeScale({
scale: scale(),
timeScale,
days: Math.ceil(
(today.getTime() -
new Date(`${today.getUTCFullYear()}-01-01`).getTime()) /
ONE_DAY_IN_MS,
),
})
}
>
Year To Date
</Button>
<Button
minWidth
disabled={disabled}
onClick={() =>
setTimeScale({ scale: scale(), timeScale, days: 365 })
}
>
1 Year
</Button>
<Button
minWidth
disabled={disabled}
onClick={() =>
setTimeScale({ scale: scale(), timeScale, days: 2 * 365 })
}
>
2 Years
</Button>
<Button
minWidth
disabled={disabled}
onClick={() =>
setTimeScale({ scale: scale(), timeScale, days: 4 * 365 })
}
>
4 Years
</Button>
<Button
minWidth
disabled={disabled}
onClick={() =>
setTimeScale({ scale: scale(), timeScale, days: 8 * 365 })
}
>
8 Years
</Button>
<For
each={new Array(
new Date().getFullYear() - new Date("2009-01-01").getFullYear(),
)
.fill(0)
.map((_, index) => index + 2009)
.reverse()}
>
{(year) => (
<Button
minWidth
disabled={disabled}
onClick={() =>
setTimeScale({ scale: scale(), timeScale, year })
}
>
{year}
</Button>
)}
</For>
</Match>
<Match when={scale() === "height"}>
<Button minWidth disabled={() => true} onClick={() => {}}>
24h
</Button>
<Button minWidth disabled={() => true} onClick={() => {}}>
48h
</Button>
<For
each={new Array(9)
.fill(0)
.flatMap((_, i) => [i, i + 0.5])
.reverse()}
>
{(i) => (
<Button
minWidth
disabled={disabled}
onClick={() =>
setTimeScale({
scale: scale(),
timeScale,
range: {
from: i * 100_000,
to: (i + 0.5) * 100_000,
},
})
}
>
{`${100 * (i + 0.5)}k`}
</Button>
)}
</For>
</Match>
</Switch>
</Scrollable>
<div class="border-lighter border-l" />
<div class="flex items-center p-1.5">
<Button
square
disabled={disabled}
onClick={() => {
scrollDirection.set((v) => (v === RIGHT ? 0 : RIGHT));
createScrollLoop();
}}
>
<Show
when={scrollDirection() === RIGHT}
fallback={<IconTablerPlayerTrackNextFilled />}
>
<IconTablerPlayerPauseFilled />
</Show>
</Button>
</div>
</Box>
);
}
function Button({
onClick,
disabled,
children,
minWidth,
square,
}: ParentProps & {
onClick: VoidFunction;
disabled?: Accessor<boolean>;
minWidth?: boolean;
square?: boolean;
}) {
return (
<button
class={classPropToString([
minWidth && "min-w-20",
square ? "p-2" : "px-2 py-1.5",
disabled?.()
? "text-low-contrast"
: "hover:bg-orange-50/20 active:scale-95",
"flex-shrink-0 flex-grow whitespace-nowrap rounded-lg",
])}
onClick={onClick}
disabled={disabled?.()}
>
{children}
</button>
);
}
function setTimeScale({
timeScale,
scale,
days,
year,
range,
}: {
timeScale: Accessor<ITimeScaleApi<Time> | undefined>;
scale: ResourceScale;
days?: number;
year?: number;
range?: { from: number; to: number };
}) {
if (scale === "date") {
let from = new Date();
let to = new Date();
if (year) {
from = new Date(`${year}-01-01`);
to = new Date(`${year}-12-31`);
} else if (days) {
from.setDate(from.getUTCDate() - days);
} else {
from = new Date(GENESIS_DAY);
}
timeScale()?.setVisibleRange({
from: (from.getTime() / 1000) as Time,
to: (to.getTime() / 1000) as Time,
});
} else if (scale === "height") {
if (range) {
timeScale()?.setVisibleRange({
from: range.from as Time,
to: range.to as Time,
});
}
}
}
@@ -1,15 +0,0 @@
export function Title({ presets }: { presets: Presets }) {
return (
<div
class="flex flex-1 items-center overflow-y-auto p-1.5"
style={{
"scrollbar-width": "thin",
}}
>
<div class="flex-1 -space-y-1 whitespace-nowrap px-1 md:mt-0.5 md:-space-y-1.5">
<h3 class="text-xs opacity-50">{`/ ${[...presets.selected().path.map(({ name }) => name), presets.selected().name].join(" / ")}`}</h3>
<h1 class="text-lg font-bold md:text-xl">{presets.selected().title}</h1>
</div>
</div>
);
}

Some files were not shown because too many files have changed in this diff Show More