Skip to content

[kotlin-sdk] Split build/broadcast with reservation release for BIP70-style deferred submission #4089

Closed

Description

@bfoss765

Priority: P0 — hard blocker for the BIP70/BIP270 (CTX/DashSpend) send cutover; structurally impossible on sendToAddresses (those protocols sign, POST to a merchant server, and broadcast only on ack). Implementation will be driven by @bfoss765 — this issue tracks design agreement.

Ask: expose the existing internal build/broadcast split with an explicit reservation lifecycle:

data class SignedCoreTransaction(val txidHex: String, val rawTxBytes: ByteArray, val feeDuffs: Long, val reservationToken: Long)
suspend fun ManagedPlatformWallet.buildSignedPayment(recipients, network, coreSignerHandle, accountType, accountIndex, options): SignedCoreTransaction
suspend fun ManagedPlatformWallet.broadcastSigned(token: Long): String
suspend fun ManagedPlatformWallet.releaseReservation(token: Long)  // payment abandoned / server nack

The internal new → setFunding → buildSigned already produces exactly this (UTXOs reserved at buildSigned); the manager remains the sole driver so the CoreTransactionBuilder KDoc's safety argument is preserved.

Context: dashpay/dash-wallet#1507 Phase 5c GAP-4. cc @QuantumExplorer

Activity

  1. bfoss765 commented on Aug 17, 2026

    @bfoss765
    CollaboratorAuthor

    Closing as shipped. The asked-for surface exists on v4.2-dev and is what the Android BIP70 flow runs in production QA builds today:

    Field evidence: the wallet's scanned-invoice flow (PaymentProtocolFragment → l1DeferredBuild → merchant ACK → l1DeferredBroadcast) has been running against this surface on the 11.10.x QA line, including a live nack/reservation-release exercise via the local BIP70 test server.

    Residual design questions about unifying this with build_signed_payment are tracked separately in #4263, so nothing remains for this issue to hold open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions