Skip to content

fix: validate bytes32 Stellar address input - #31

Open
fy-god wants to merge 1 commit into
ASCTP:mainfrom
fy-god:codex/bytes32-validation
Open

fy-god wants to merge 1 commit into
ASCTP:mainfrom
fy-god:codex/bytes32-validation

Conversation

@fy-god

@fy-god fy-god commented Oct 15, 2026

Copy link
Copy Markdown

Closes #26

What changed

  • Validate bytes32ToStellarAddress input as an exact 0x-prefixed 32-byte hexadecimal value before decoding.
  • Reject non-hex, odd-length, wrong-length, and missing-prefix input instead of allowing Buffer.from to silently truncate it.
  • Document that raw bytes32 values do not carry enough type information to reconstruct a C... contract strkey; callers must retain the original contract address.
  • Add mocked unit coverage for every invalid-input class while preserving G-address round trips.

Verification

  • pnpm test — 9 files, 116 tests passed
  • pnpm run typecheck
  • pnpm run build

@vercel

vercel Bot commented Oct 15, 2026

Copy link
Copy Markdown

@fy-god is attempting to deploy a commit to the Collins' projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant