[agent/claude:opus] DX audit and fix. 1) Review CLAUDE.md — update any outdate... #3

Closed
Virgil wants to merge 1 commit from agent/dx-audit-and-fix--1--review-claude-md into main

1 commit

Author SHA1 Message Date
Snider
f27825cfc9 fix(dx): audit and fix error handling, file I/O, wire compilation
Some checks failed
Security Scan / security (pull_request) Successful in 9s
Test / Test (pull_request) Failing after 23s
- CLAUDE.md: update error handling guidance from fmt.Errorf to coreerr.E()
  and document go-io convention for file I/O
- wire/transaction.go: fix TxOutTarget interface compilation — add
  encodeTarget/decodeTarget helpers with support for TxOutToKey,
  TxOutMultisig, and TxOutHTLC target types
- wire/transaction.go: add HTLC and multisig input encode/decode
  (TxInputHTLC, TxInputMultisig) with string encoding helpers
- wire/transaction.go: add asset operation tag constants (40, 49-51)
  and reader functions for HF5 confidential asset operations
- consensus/block.go: replace fmt.Errorf with coreerr.E() for
  checkBlockVersion and ValidateTransactionInBlock
- chain/ring.go: replace fmt.Errorf with coreerr.E() in GetRingOutputs
- consensus/v2sig_test.go: replace os.ReadFile with coreio.Read
- crypto/*.go: replace all fmt.Errorf and errors.New with coreerr.E()
  across keygen, pow, keyimage, signature, and clsag packages
- types/types_test.go: add tests for HashFromHex, PublicKeyFromHex,
  IsZero, and String methods (types coverage 74.5% -> 89.1%)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-17 08:34:04 +00:00