Update go.mod module line, all require/replace directives, and every
.go import path from forge.lthn.ai/core/go-blockchain to
dappco.re/go/core/blockchain. Add replace directives to bridge
dappco.re paths to existing forge.lthn.ai registry during migration.
Update CLAUDE.md, README, and docs to reflect the new module path.
Co-Authored-By: Virgil <virgil@lethean.io>
Replace all fmt.Errorf and errors.New in production code with
coreerr.E("Caller.Method", "message", err) from go-log. Replace
os.MkdirAll with coreio.Local.EnsureDir from go-io. Sentinel errors
(consensus/errors.go, wire/varint.go) intentionally kept as errors.New
for errors.Is compatibility.
270 error call sites converted across 38 files. Test files untouched.
crypto/ directory (CGO) untouched.
Co-Authored-By: Virgil <virgil@lethean.io>
Prepares for HF1 output target types (TxOutMultisig, TxOutHTLC).
All call sites updated to type-assert TxOutToKey where needed.
Modified files:
- types/transaction.go: TxOutputBare.Target is now TxOutTarget
- wire/transaction.go: encode/decode use type switch on target
- chain/ring.go: type-assert target to TxOutToKey for key extraction
- wallet/scanner.go: type-assert target before key comparison
- tui/explorer_model.go: type-assert target for display
- wire/transaction_test.go: type-assert in assertions
- wallet/builder_test.go: type-assert in assertions
Co-Authored-By: Charon <charon@lethean.io>
Add SyncOptions with VerifySignatures flag and hardfork schedule.
ValidateMinerTx and ValidateTransaction called during block processing.
Co-Authored-By: Charon <charon@lethean.io>
Builder interface with V1Builder that constructs signed v1 transactions.
Handles change outputs, ECDH output key derivation, ring construction
with sorted global indices, and NLSAG signing per input.
Co-Authored-By: Charon <charon@lethean.io>
RingSelector interface with RPCRingSelector that fetches random outputs
from the daemon, excludes the real output and duplicates, and returns
the requested ring size.
Co-Authored-By: Charon <charon@lethean.io>
Scanner interface with V1Scanner implementation for v0/v1 transactions.
Derives ephemeral keys via ECDH, generates key images, and tracks
coinbase status and unlock times.
Co-Authored-By: Charon <charon@lethean.io>
GenerateAccount, RestoreFromSeed, RestoreViewOnly with deterministic
view key derivation (sc_reduce32(Keccak256(spend_secret))), matching
C++ account_base::generate(). Encrypted persistence via Argon2id
(time=3, mem=64MB) + AES-256-GCM in go-store.
Adds cn_sc_reduce32 to the CGo bridge for scalar reduction mod l,
required to convert a hash output into a valid Ed25519 secret key.
Co-Authored-By: Charon <charon@lethean.io>
Parses tags 22 (tx public key), 14 (unlock time), and 11 (derivation
hint) from raw extra bytes. Unknown tags are skipped. Raw bytes preserved
for round-tripping.
Adds PublicKey.IsZero() to types package.
Co-Authored-By: Charon <charon@lethean.io>
24-word Electrum encoding (4 bytes → 3 words × 8 groups) plus CRC32
checksum word. 1626-word dictionary extracted from C++ source.
Co-Authored-By: Charon <charon@lethean.io>