Skip to content

[SDK · Network & Horizon] Implement HorizonClient wrapper — submit endpoint #151

@amina69

Description

@amina69

Epic: Network & Horizon
Labels: network, tx, sdk
Size: S (~1 day)

Description

Wrap the Horizon transaction submit endpoint with error normalisation.

Tasks

  • submitTransaction(tx: Transaction): submit, return raw result
  • Parse Horizon error body for result_codes on 400
  • Return {hash, ledger, successful} on success
  • On 400: throw HorizonSubmitError with parsed result_codes
  • On 504: throw TransactionTimeoutError with retryable:true
  • Log submission at info level with txHash (no envelope)
  • Unit test: success, 400 with result codes, 504

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions