Commit graph

18 commits

Author SHA1 Message Date
Claude
7c38e6a207
feat(daemon): add REST API endpoints for web frontends
Some checks are pending
Security Scan / security (push) Waiting to run
Test / Test (push) Waiting to run
/api/info    — chain status (no JSON-RPC wrapper)
/api/block   — block by height
/api/aliases — all aliases
/api/alias   — single alias by name
/api/search  — universal search
/health      — node health check

REST endpoints serve raw JSON — simpler for web apps than JSON-RPC.
40 RPC + 16 wallet + 11 HTTP = 67 total endpoints.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 02:43:15 +01:00
Claude
d2655921d1
feat(daemon): service discovery, gateway list, hardfork status, difficulty history
Some checks are pending
Security Scan / security (push) Waiting to run
Test / Test (push) Waiting to run
get_aliases_by_type: filter aliases by gateway/service/root
get_gateways: gateway list with parsed capabilities
get_hardfork_status: all HFs with activation heights + countdown
get_node_info: Go node self-description + capability list
get_difficulty_history: last N blocks difficulty for charts

Go-exclusive endpoints — data only available from the Go node's
alias index and chain statistics. C++ daemon can't serve these.

40 chain RPC + 16 wallet proxy + 5 HTTP = 61 total endpoints.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 02:42:29 +01:00
Claude
d1a0b18150
feat(daemon): universal search — block/tx/alias/address by any query
Some checks failed
Security Scan / security (push) Successful in 13s
Test / Test (push) Has been cancelled
search: accepts height, hash, alias name, or iTHN address.
Returns typed result: {type: "block"|"transaction"|"alias"|"address"}

The explorer's search bar calls one method for everything.

35 chain RPC + 16 wallet proxy + 5 HTTP = 56 total endpoints.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 02:40:42 +01:00
Claude
94b68a6bd4
feat(daemon): chain stats, recent blocks, block hash lookup
Some checks failed
Security Scan / security (push) Successful in 13s
Test / Test (push) Failing after 40s
get_chain_stats: height, difficulty, avg block time, gateway/service count
get_recent_blocks: last N blocks with tx counts
get_block_hash_by_height: height → hash

34 chain RPC + 16 wallet proxy + 5 HTTP = 55 total endpoints.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 02:35:31 +01:00
Claude
1e4255f39d
feat(daemon): native address validation + integrated address encode/decode
Some checks are pending
Security Scan / security (push) Waiting to run
Test / Test (push) Waiting to run
make_integrated_address: encode standard → integrated (iTHN → iTHn)
split_integrated_address: decode integrated → standard
validate_address: check address validity, detect type (standard/integrated/auditable)

All native Go — uses types.DecodeAddress/Encode with Lethean prefixes.
31 chain RPC + 16 wallet proxy + 5 HTTP = 52 total endpoints.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 02:34:33 +01:00
Claude
63135def89
feat(daemon): native crypto RPC — key gen, hash, key image, key check
Some checks are pending
Test / Test (push) Waiting to run
Security Scan / security (push) Successful in 10s
4 new methods using CGo crypto directly:
  generate_keys — Ed25519 keypair generation
  generate_key_image — key image from keypair (double-spend detection)
  fast_hash — Keccak-256 hash
  check_key — validate Ed25519 public key

28 chain RPC + 16 wallet proxy + 5 HTTP = 49 total endpoints.
7 methods are now native Go+CGo (no C++ daemon needed):
  validate_signature, check_keyimages, generate_keys,
  generate_key_image, fast_hash, check_key, get_asset_info

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 02:31:04 +01:00
Claude
53f8f94226
feat(daemon): native validate_signature via CGo crypto
Some checks failed
Security Scan / security (push) Successful in 12s
Test / Test (push) Failing after 35s
Schnorr signature validation without C++ daemon — uses
crypto.FastHash + crypto.CheckSignature directly.
Resolves alias public key for signature verification by name.

24 chain RPC + 16 wallet proxy + 5 HTTP = 45 total endpoints.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 02:21:21 +01:00
Claude
8510a80004
feat(daemon): add marketplace, key image check, tx relay stubs
Some checks failed
Security Scan / security (push) Successful in 13s
Test / Test (push) Failing after 36s
marketplace_global_get_offers_ex, get_current_core_tx_expiration_median,
check_keyimages (native — queries spent key index), sendrawtransaction (stub).

23 chain RPC + 16 wallet proxy + 5 HTTP = 44 total endpoints.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 02:14:29 +01:00
Claude
de1c091294
feat(daemon): add get_pool_info, get_assets_list, getblockchaininfo, get_version
Some checks failed
Security Scan / security (push) Successful in 12s
Test / Test (push) Failing after 37s
21 chain RPC + 16 wallet proxy + 5 HTTP = 42 total endpoints.
The Go daemon now serves every method the explorer, trade, LNS,
and status bot need.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 02:13:31 +01:00
Claude
522d780a6f
test(daemon): add Go-vs-C++ integration tests
Some checks failed
Security Scan / security (push) Successful in 12s
Test / Test (push) Failing after 36s
3 tests verify Go daemon matches C++ daemon output:
  - getinfo: alias count matches, height within 10 blocks
  - get_all_alias_details: same alias names
  - getblockheaderbyheight: block 11000 hash identical

Run: go test -tags integration ./daemon/

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 02:11:12 +01:00
Claude
3c8f7ef4a7
feat(daemon): add wallet RPC proxy — unified endpoint
Some checks failed
Security Scan / security (push) Successful in 12s
Test / Test (push) Failing after 36s
The Go daemon now proxies 16 wallet methods to the C++ wallet-rpc:
getbalance, getaddress, transfer, deploy_asset, register_alias, etc.

One endpoint serves both chain queries (native Go) and wallet ops
(C++ backend). Apps don't need to know which port handles what.

Total API surface: 17 chain RPC + 16 wallet proxy + 4 HTTP = 37 endpoints

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 02:01:20 +01:00
Claude
2df81e7266
feat(daemon): add /gettransactions HTTP endpoint
Some checks failed
Security Scan / security (push) Successful in 12s
Test / Test (push) Failing after 37s
Returns serialized transaction hex blobs by hash list.
Used by zone-cache for block reconstruction during sync.
21 total API endpoints (17 JSON-RPC + 4 HTTP).

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 01:43:38 +01:00
Claude
ff00a29e08
feat(daemon): add 6 more RPC methods — 17 total
Some checks failed
Security Scan / security (push) Successful in 13s
Test / Test (push) Failing after 34s
New methods: getblockheaderbyhash, on_getblockhash, get_tx_details,
get_blocks_details, get_alias_reward, get_est_height_from_date

Total: 17 JSON-RPC methods + 3 HTTP endpoints = 20 API endpoints.
Covers all read operations the explorer, LNS, and status bot need.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 01:34:06 +01:00
Claude
2f8d7357bd
feat(daemon): add legacy mining + getheight HTTP endpoints
Some checks failed
Security Scan / security (push) Successful in 12s
Test / Test (push) Failing after 29s
Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 01:02:57 +01:00
Claude
00d6de64eb
feat(daemon): add get_alias_by_address, get_asset_info RPC methods
Some checks are pending
Security Scan / security (push) Waiting to run
Test / Test (push) Waiting to run
11 total RPC methods now served by the Go daemon:
getinfo, getheight, getblockcount, getblockheaderbyheight,
getlastblockheader, get_all_alias_details, get_alias_details,
get_alias_by_address, get_asset_info

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 01:02:22 +01:00
Claude
944291934e
feat(asset): add RPC client + CLI for confidential assets (HF5)
Some checks failed
Security Scan / security (push) Successful in 12s
Test / Test (push) Failing after 40s
rpc/assets.go: DeployAsset, EmitAsset, BurnAsset, GetAssetInfo
daemon/server.go: get_asset_info RPC method (native LTHN + custom assets)
cmd_deploy_itns.go: CLI command to deploy ITNS trust token
cmd/core-chain: register asset command group

Ready for HF5 activation — `core-chain asset deploy-itns` deploys
the ITNS token via the wallet RPC.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 00:59:18 +01:00
Claude
9f20e7a2e8
feat(daemon): add getblockcount RPC, fix method routing
All checks were successful
Security Scan / security (push) Successful in 23s
Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 00:33:12 +01:00
Claude
caf13a1937
feat(blockchain): full testnet sync, RPC daemon, wallet CLI, alias extraction
- wire: add readExtraAliasEntry (tag 33) + readExtraAliasEntryOld (tag 20)
  Unblocks HF4+ Zarcanum transaction deserialization
- chain: alias extraction from transaction extra fields (14/14 on testnet)
- chain: alias storage and retrieval via go-store
- daemon: JSON-RPC server (getinfo, getheight, getblockheaderbyheight,
  getlastblockheader, get_all_alias_details, get_alias_details)
- cmd: `chain serve` — sync from seed + serve RPC simultaneously
- cmd: `wallet create` — generate keys, iTHN address, 24-word seed
- cmd: `wallet address` — show base58-encoded iTHN address
- cmd: `wallet seed` — show mnemonic seed phrase
- cmd: `wallet scan` — scan chain for owned outputs via ECDH derivation

Tested: 11,263 blocks synced in 3m11s from live testnet. All HF0-HF4
validated. 14 aliases extracted. RPC serves correct heights, difficulties,
block headers, and alias data. Wallet generates valid iTHN addresses.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 00:33:12 +01:00