Skip to content

Add transaction hash validation utility #101

Description

@therealjhay

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:

  1. Implement: /^[0-9a-f]{64}$/.test(hash)
  2. Add JSDoc
  3. 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.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions