Skip to content

Bug: SDK address validation rejects contract (C...) addresses the on-chain contracts accept #512

Description

@Jaydbrown
  • isValidAddress (src/utils.ts:184-189) → StrKey.isValidEd25519PublicKey(address) only.
  • StreamBuilder._validateAddress (src/builder.ts:291-312) requires sender / recipient to be G-addresses.

DripFactory::create_stream and DripStream take Address for sender, recipient, and token — a contract address is valid (a DAO treasury contract as sender, a splitter contract as recipient, etc.). create_stream only rejects the zero account and sender == recipient.

Impact

The SDK cannot construct a stream whose sender or recipient is a contract, even though the protocol supports it. isValidAddress, advertised as the pre-submission check, gives a false negative for every contract recipient.

Suggested fix

Accept StrKey.isValidContract(address) as well wherever an Address (not specifically an account) is expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programbugSomething isn't workingpriority: mediumMissing feature or UX issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions