Pure Go implementation of the Lethean blockchain protocol. Provides chain configuration, core cryptographic data types, CryptoNote wire serialisation, and LWMA difficulty adjustment for the Lethean CryptoNote/Zano-fork chain. Follows ADR-001: protocol logic in Go, cryptographic primitives deferred to a C++ bridge in later phases. Lineage: CryptoNote to IntenseCoin (2017) to Lethean to Zano rebase.
Module: dappco.re/go/core/blockchainLicence: EUPL-1.2
Language: Go 1.25
Quick Start
import("dappco.re/go/core/blockchain/config""dappco.re/go/core/blockchain/types""dappco.re/go/core/blockchain/wire""dappco.re/go/core/blockchain/difficulty")// Query the active hardfork version at a given block heightversion:=config.VersionAtHeight(config.MainnetForks,10081)// returns HF2// Check if a specific hardfork is activeactive:=config.IsHardForkActive(config.MainnetForks,config.HF4Zarcanum,50000)// false// Encode and decode a Lethean addressaddr:=&types.Address{SpendPublicKey:spendKey,ViewPublicKey:viewKey}encoded:=addr.Encode(config.AddressPrefix)decoded,prefix,err:=types.DecodeAddress(encoded)// Varint encoding for the wire protocolbuf:=wire.EncodeVarint(0x1eaf7)val,n,err:=wire.DecodeVarint(buf)// Calculate next block difficultynextDiff:=difficulty.NextDifficulty(timestamps,cumulativeDiffs,120)