Description: The codebase has no utility for validating Stellar transaction hashes. This is needed for looking up transactions by hash.
Requirements:
- Create
validateTransactionHash(hash: string): boolean
- Validate 64-character lowercase hex string
- Export alongside other utilities
- Add unit tests
Suggested execution steps:
- Implement:
/^[0-9a-f]{64}$/.test(hash)
- Add JSDoc
- Add tests for valid hash, invalid length, uppercase, non-hex chars
Example commit message:
feat(stellar-utils): add transaction hash validation utility
validateTransactionHash ensures a 64-character lowercase hex string
format for Stellar transaction hashes.
Description: The codebase has no utility for validating Stellar transaction hashes. This is needed for looking up transactions by hash.
Requirements:
validateTransactionHash(hash: string): booleanSuggested execution steps:
/^[0-9a-f]{64}$/.test(hash)Example commit message: