Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Make POST /mapi/tx idempotent (and return the SPV proof if tx is already known/confirmed) #12

Description

App developers have problems with re-broadcasting and have to attach extra logic to handle the case of a new transaction versus the same (but already confirmed) transaction.

A way to fix this problem is to provide a unified idempotent endpoint that does the following in 1 api call:

  1. If it's a new transaction (unconfirmed), then accept and return the same data as now; and
  2. If it's a transaction that was settled (confirmed) from before, then still return a returnResult: success and instead also include the SPV proof and transaction details.

This is basically combining the POST /mapi/tx and GET /mapi/tx/:txid endpoints into one. This will lead to a more reliable experience for developers and reduce integration difficulty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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