Skip to content

support BIP21 op_return and callback URI parameters #607

@sag333ar

Description

@sag333ar

Parses two new BIP21 URI parameters and routes them through the
existing payment-protocol path:

  • op_return=<hex>: hex-encoded payload (up to 80 bytes) attached
    to the transaction as a 0-value OP_RETURN output. Used for
    cross-chain memos (THORChain/Maya), order IDs, and similar
    payee-side correlation data.

  • callback=<https-url>: https URL surfaced to the wallet UI after
    a successful send so the merchant can complete its checkout flow.
    Only https is accepted at parse time to prevent the URI from
    invoking arbitrary app handlers.

The OP_RETURN output is appended to DSPaymentProtocolDetails when
the request is built, then carried through DSTransactionManager so
the auxiliary output is preserved when requestedAmount != 0 (the
prior implementation only forwarded outputScripts.firstObject).

Two dust-check loops in DSAccount are taught to skip OP_RETURN
outputs so that spec-mandated 0-value null-data outputs do not flag
the transaction as forever-pending.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    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