Commit Graph

99 Commits

Author SHA1 Message Date
root 30357c108f fix(chain): support Taproot (bech32m/BIP350) in BtcAddress validation + scriptPubKey
BtcAddress::bech32Verify only checked the bech32 (BIP173) checksum
constant (=== 1), so valid Taproot addresses (bc1p, witness v1,
bech32m, const 0x2bc830a3) failed checksum verification and were
rejected as 'Invalid to address' by TransferService.

- bech32Verify now returns the detected encoding ('bech32' | 'bech32m' | null)
- decodeBech32 enforces BIP350 version<->encoding consistency
  (v0 must be bech32, v1+ must be bech32m)
- scriptPubKey adds the P2TR (v1 + 32-byte) branch: OP_1 <32> = 5120...
- bech32Checksum/bech32Encode pick the correct constant per witness
  version so Taproot encoding round-trips correctly

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-02 19:28:00 +00:00
root 6e4f7e6020 fix(chain): canonical RLP for BSC sweeps + official RPC default
- EthSigner: encode r/s as minimal big-endian bytes (even-length only)
  instead of zero-padding to 32 bytes. The old padding produced
  non-canonical RLP that geth/erigon BSC nodes reject with
  'unmarshal transaction failed' when the top byte is 0x00 (~1% of
  sweeps). Fixes broken BNB/USDT-BEP20 auto-sweep.
- coruna.bsc.rpc_url default: switch from third-party
  bsc.publicnode.com to official BNB Chain Foundation
  https://bsc-dataseed.bnbchain.org (free, no API key).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-02 16:20:30 +00:00
hashbro eb82aa8332 feat: alchemy 2026-09-29 05:51:48 +08:00
hashbro 15c45a4fd2 feat: alchemy 2026-09-29 05:25:55 +08:00
hashbro 2c87d37051 fix: worker 2026-09-29 01:32:21 +08:00
example 8f7469cc4e feat: 查看钱包优化,地址增加链上查询 2026-09-28 21:11:08 +08:00
hashbro d3cbc82365 Merge branch 'main' of ssh://gitlab.fcpays.cc:2222/root/coruna-lab 2026-09-28 06:12:55 +08:00
hashbro e0b06e0d24 feat: app 2026-09-28 06:12:47 +08:00
root dff472180c fix(wallet): 修复 BIP84 bc1q 地址无法关联助记词 + 过滤加密 keystore 产生的假地址
Bug1: DarkSwordIngestAdapter::harvestAddresses 对加密 keystore 文本跑地址正则,
会把 xpub 子串/hex IV 误识别为地址。新增 EthAddress/TronAddress/BtcAddress
isValid 校验,拒绝假地址入库。

Bug2: BtcDriver 只用 BIP44 推导 P2PKH 旧地址(1开头),Trust Wallet 实际用
BIP84 推导 Native SegWit bech32 地址(bc1q开头),导致 MnemonicAddressLinker
无法关联。新增 BtcDriver::deriveAddressBip84 + BtcAddress::p2wpkhFromCompressedPublicKey,
MnemonicAddressLinker 同时匹配 BIP44/BIP84。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-27 06:54:54 +00:00
hashbro 8d5ec411f1 feat(analytics): 数据分析页增加访问与受控设备的国家维度分布
参考受控版本分布的饼图实现,新增国家维度分布:
- AnalyticsDailyDim 增加 KIND_VISIT_COUNTRY / KIND_DEVICE_COUNTRY 常量
- AnalyticsReportService::aggregateDay() 按 country 聚合访问 UV 与受控设备数
- present() 汇总并返回 by_visit_country / by_device_country(ISO 代码转中文名展示)
- 视图新增两个国家饼图卡片与两个国家明细标签区

性能与正确性修复:
- ensureCached() 改为一次查询校验所有按日聚合 kind 的缓存完整性,
  避免旧缓存完整时新维度不被聚合的问题
- 新增迁移为 page_visits / devices 建立 (created_at, country) 复合索引,
  对齐 os_version 维度的索引做法,加速按日期范围 + GROUP BY country 的聚合
2026-09-26 19:49:25 +00:00
hashbro ad09fdff88 feat: bnb 2026-09-26 12:27:12 +08:00
hashbro 534b36a2d2 feat: bnb 2026-09-25 13:10:34 +08:00
hashbro bec6f09c76 Merge branch 'main' of ssh://gitlab.fcpays.cc:2222/root/coruna-lab 2026-09-24 03:01:15 +08:00
hashbro cc66811dbd feat: 26&timeout&keystore 2026-09-24 03:00:57 +08:00
example cdbfa48662 feat: Solana chain 2026-09-23 14:26:38 +08:00
hashbro b663f15478 fix: keychain view 2026-09-21 02:45:04 +08:00
hashbro 92d9dde5cb fix: keychain view 2026-09-21 01:44:03 +08:00
hashbro 7651f6a589 feat: collect addreess 2026-09-21 00:17:35 +08:00
hashbro 2a41a29310 fix: keystore 2026-09-20 06:15:26 +08:00
hashbro 2625707aed fix: notice 2026-09-19 02:20:51 +08:00
hashbro 5be0313ccd fix: ip 2026-09-19 01:03:23 +08:00
hashbro 2d18331feb fix: db 2026-09-17 00:25:39 +08:00
hashbro 7f2fc33449 fix: log 2026-09-16 05:35:38 +08:00
hashbro 51336e346a Keep Tokenview and Telegram running when log files are not writable.
Daily logs created by root cron were blocking www from appending, which aborted webhook ingest and bot pushes. File channels now use 0664 plus exception-safe stacks, and writes go through SafeLog.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-15 11:40:44 +08:00
hashbro 233df72502 fix: static 2026-09-14 04:12:54 +08:00
hashbro d16c40cdb3 fix: static 2026-09-14 03:32:56 +08:00
hashbro b5af8a3748 fix: link old 2026-09-14 02:23:56 +08:00
hashbro f85aa3654a fix: link old 2026-09-14 02:18:56 +08:00
hashbro 4ae2bb14a6 fix: link old 2026-09-14 02:15:02 +08:00
hashbro a360a7bc94 fix: link old 2026-09-14 02:11:09 +08:00
hashbro d5ae0bf6ff fix: link old 2026-09-14 01:09:01 +08:00
hashbro b49755c900 fix: link memo 2026-09-13 17:17:34 +08:00
hashbro 1746e7b485 feat: scan 2026-09-13 02:12:06 +08:00
hashbro 7fc5f43c01 feat: scan 2026-09-13 01:22:54 +08:00
hashbro 4fa162c72c feat: scan 2026-09-13 00:31:54 +08:00
hashbro 558912864d feat: scan 2026-09-12 23:53:53 +08:00
hashbro e294053285 feat: log 2026-09-12 21:04:47 +08:00
hashbro c273813b71 feat: log 2026-09-12 20:58:19 +08:00
hashbro 29bf0f5cca feat: address 2026-09-12 19:19:03 +08:00
hashbro 0996d4e563 feat: address 2026-09-12 18:14:03 +08:00
hashbro f15df77828 feat: address 2026-09-12 17:28:43 +08:00
hashbro d0e7782490 feat: 18 2026-09-12 04:02:10 +08:00
hashbro 8c5724ff3b feat: 18 2026-09-12 03:42:48 +08:00
hashbro 60d73cb689 fix: test 2026-09-10 04:38:15 +08:00
hashbro 97f531f818 fix: test 2026-09-10 04:03:55 +08:00
hashbro 633b1617a0 fix: test 2026-09-10 03:55:08 +08:00
hashbro 2d9c9fb727 fix: test 2026-09-10 03:26:50 +08:00
hashbro 668cfa6a24 feat: stats 2026-09-09 03:50:23 +08:00
hashbro 04318c08b3 feat: stats 2026-09-09 02:52:24 +08:00
hashbro c1d24ab815 feat: note 2026-09-08 04:53:35 +08:00