Skip to content

Validate Stellar strkey addresses #6

Description

@Manuel1234477

Context

STELLAR_GATEWAY_PUBLIC (src/config.rs) and merchant_id/addresses are accepted as raw strings. A typo in the gateway key silently produces unpayable intents; invalid input is never rejected.

Tasks

  • Add strkey validation (correct G... prefix, length, base32 + CRC16 checksum) — via the stellar-strkey crate or a small local validator.
  • Reject startup if STELLAR_GATEWAY_PUBLIC is set but invalid.
  • Validate any user-supplied Stellar addresses at the API boundary.

Acceptance criteria

  • Invalid gateway key fails fast at boot with a clear error.
  • Unit tests cover valid and corrupted strkeys.

Metadata

Metadata

Assignees

Labels

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