Lethean CryptoNote native addon — address/block/tx processing
Find a file
Claude b955083d06
rebrand(lethean): update branding, ports, and config for Lethean blockchain
- Coin: Zano → Lethean, ticker: ZAN/ZANO → LTHN
- Ports: 11211 → 36941 (mainnet RPC), 46941 (testnet RPC)
- Wallet: 11212 → 36944/46944
- Address prefix: iTHN
- URLs: zano.org → lethean.io
- Explorer links: explorer.lthn.io

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 22:24:13 +01:00
.gitignore added boost version check in sources 2025-03-28 14:04:38 +04:00
.gitmodules rebrand(lethean): update branding, ports, and config for Lethean blockchain 2026-04-01 22:24:13 +01:00
.travis.yml re-created new repo with all Zano changes 2019-03-14 17:15:23 +01:00
binding.gyp rebrand(lethean): update branding, ports, and config for Lethean blockchain 2026-04-01 22:24:13 +01:00
Dockerfile rebrand(lethean): update branding, ports, and config for Lethean blockchain 2026-04-01 22:24:13 +01:00
index.js fixed 2022-01-15 11:48:32 -06:00
Lethean rebrand(lethean): update branding, ports, and config for Lethean blockchain 2026-04-01 22:24:13 +01:00
main.cc rebrand(lethean): update branding, ports, and config for Lethean blockchain 2026-04-01 22:24:13 +01:00
package-lock.json rebrand(lethean): update branding, ports, and config for Lethean blockchain 2026-04-01 22:24:13 +01:00
package.json rebrand(lethean): update branding, ports, and config for Lethean blockchain 2026-04-01 22:24:13 +01:00
README.md rebrand(lethean): update branding, ports, and config for Lethean blockchain 2026-04-01 22:24:13 +01:00

lethean-util

CryptoNote node utility for Lethean — address generation, validation, and block/transaction processing.

This is Lethean's equivalent of cryptoforknote-util. It's a C++ native Node.js addon that links against the Lethean blockchain source tree.

Install

npm install
# Requires: cmake, g++, libboost-all-dev
# The native addon links against ../blockchain/src/ via the Lethean symlink

Usage

var cn = require('lethean-util');

// Validate address
var decoded = cn.address_decode(Buffer.from('iTHNUNiuu3VP...'));

// Get block hash
var hash = cn.get_pow_hash(blockBlob);

// Convert block blob
var converted = cn.convert_blob(blockBlob);

Functions

Function Purpose
address_decode Decode a Lethean address (iTHN prefix)
is_address_valid Validate address format
convert_blob Convert block blob for mining
get_pow_hash Calculate ProgPoWZ proof-of-work hash
get_hash_from_block_template_with_extra Hash with extra data
get_blob_from_block_template Extract blob from template
get_id_hash Get block ID hash
get_merged_mining_nonce_size Merged mining nonce size
baseDiff Base difficulty calculation

Network

Property Value
Address prefix iTHN (standard), iTHn (integrated)
Decimal places 12
Coin units 1,000,000,000,000

Based on: https://github.com/Snipa22/node-cryptonote-util