Skip to content

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

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

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