Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
1e86a32
feat(kotlin-sdk): split build/broadcast with reservation release for …
bfoss765 Jul 10, 2026
8697d48
fix(kotlin-sdk): bound deferred-payment token lifetime; harden regist…
bfoss765 Jul 11, 2026
c1221a5
fix(kotlin-sdk): resolve rebase semantic conflicts onto feat/kotlin-s…
bfoss765 Jul 16, 2026
1265ff2
fix(kotlin-sdk): assert native code 26 for the stale-reservation-toke…
bfoss765 Jul 17, 2026
b55b77e
fix(kotlin-sdk): bound the deferred-payment token on the reservation'…
bfoss765 Jul 17, 2026
4670e43
fix(kotlin-sdk): sweep deferred-payment tokens only when the final wa…
bfoss765 Jul 17, 2026
ed3b82c
fix(kotlin-sdk): route deferred builds through the atomic finalize-an…
bfoss765 Jul 17, 2026
b2b8d84
fix(kotlin-sdk): delete the dead split register→broadcast chain
bfoss765 Jul 21, 2026
22f2ead
fix(kotlin-sdk): baseline the deferred token age on the pre-signing r…
bfoss765 Jul 21, 2026
417e6f2
fix(kotlin-sdk): give the V2 handle and token paths one wallet-genera…
bfoss765 Jul 21, 2026
43b1c17
fix(kotlin-sdk): validate the deferred token under the lock, consume …
bfoss765 Jul 21, 2026
4badfaf
fix(kotlin-sdk): release deferred reservations at final-alias destroy…
bfoss765 Jul 21, 2026
0c28384
fix(kotlin-sdk): split the conflated deferred-token error code into t…
bfoss765 Jul 21, 2026
4c2fb2a
docs(kotlin-sdk): correct buildSignedPayment KDoc to the finalize-and…
bfoss765 Jul 21, 2026
aceb107
fix(kotlin-sdk): make the deferred payment token an owning AutoClosea…
bfoss765 Jul 21, 2026
e853459
style(kotlin-sdk): rustfmt wallet_manager.rs after the dead-chain del…
bfoss765 Jul 21, 2026
953ae79
fix(kotlin-sdk): object-owning broadcast/release overloads for Signed…
bfoss765 Jul 21, 2026
966ed5c
fix(kotlin-sdk): retain a releasable account handle for CoinJoin-fund…
bfoss765 Jul 22, 2026
cefc353
fix(kotlin-sdk): bind deferred-payment reservation cleanup to its own…
bfoss765 Jul 22, 2026
0098f97
fix(swift-sdk): surface deferred-token codes 26/27/28 as typed errors
bfoss765 Jul 22, 2026
621b48c
chore(rust-dashcore): pin to canonical dashpay dev rev with owner-tag…
bfoss765 Jul 22, 2026
c351e2a
fix: renumber deferred-reservation error codes to 27/28/29
bfoss765 Jul 23, 2026
712233c
fix(platform-wallet): owner-guard the broadcast-reject reservation re…
bfoss765 Jul 23, 2026
4edede8
fix(platform-wallet): enforce unique reservation ownership, stop wrap…
bfoss765 Jul 24, 2026
a89eec7
fix(platform-wallet): bind registration to correct wallet generation …
bfoss765 Jul 25, 2026
7904727
fix(platform-wallet): linearize wallet removal with deferred broadcas…
bfoss765 Aug 1, 2026
46b4ab0
fix(platform-wallet-ffi)!: move ErrorReservationWalletMismatch 29 -> …
bfoss765 Aug 1, 2026
7c3e82c
refactor(platform-wallet-ffi): drop stale HandleStorage::any left by …
bfoss765 Aug 1, 2026
6b11a20
fix(platform-wallet): scope the lifecycle gate to the wallet generati…
bfoss765 Aug 2, 2026
b4f38ea
fix(platform-wallet): remove the wallet generation by identity, not b…
bfoss765 Aug 2, 2026
4791b5c
fix(platform-wallet): move the deferred-token trio off the codes #426…
bfoss765 Aug 3, 2026
aca936f
fix(kotlin-sdk): stop the stray 98 arm from shadowing PlatformWallet.…
bfoss765 Aug 4, 2026
7d0c16e
feat(platform-wallet): union-funding build_signed_payment core primitive
bfoss765 Jul 13, 2026
860abd5
feat(sdk): plumb build_signed_payment through FFI, JNI, and Kotlin
bfoss765 Jul 13, 2026
07046fe
fix(platform-wallet): re-scope build_signed_payment to single-account…
bfoss765 Jul 30, 2026
35a4b82
feat(platform-wallet): expose account-level derivationPath in account…
bfoss765 Jul 31, 2026
a8d4c1d
fix(platform-wallet): dust + size bounds, typed build errors, and tes…
bfoss765 Jul 31, 2026
875f610
fix(platform-wallet): fail closed when no wallet-level account matche…
bfoss765 Jul 31, 2026
b19caac
feat(kotlin-sdk): expose release_payment_reservation for abandoned bu…
bfoss765 Aug 1, 2026
fce1be6
docs(ffi): drop the redundant "later ... afterwards" in the send modu…
bfoss765 Aug 3, 2026
3790b78
fix(platform-wallet): adopt #4185's WalletGeneration in the send-path…
bfoss765 Aug 3, 2026
1dee048
fix(swift-sdk): mirror ErrorTransactionBuild (32) into the Swift resu…
bfoss765 Aug 3, 2026
b7dd135
style(platform-wallet): rustfmt the restacked send-path test fixtures
bfoss765 Aug 3, 2026
378734d
fix(platform-wallet): owner-guard the raw-payment reservation release
bfoss765 Aug 4, 2026
7bfa60f
fix(kotlin-sdk): release a cancelled buildSignedPayment's reservation
bfoss765 Aug 4, 2026
98c8502
fix(kotlin-sdk): release reservation on JNI pack failure; harden defe…
bfoss765 Aug 4, 2026
5d7a897
fix(kotlin-sdk): release the minted token on the finalize null-txid path
bfoss765 Aug 4, 2026
962bf17
feat(platform-wallet): token-minting finalize from a funding path (sp…
bfoss765 Jul 31, 2026
35ffade
test(platform-wallet): DashPay-funded split wallet fixture for the re…
bfoss765 Jul 31, 2026
8c37aa0
fix(platform-wallet): register the funding-path payment under #4185's…
bfoss765 Aug 3, 2026
c40153e
fix(platform-wallet): make FinalizedCorePayment a linear obligation
bfoss765 Aug 3, 2026
bddd030
fix(platform-wallet): give signing failures their own error and FFI c…
bfoss765 Aug 1, 2026
b489f3d
fix(swift-sdk): mirror ErrorTransactionSigning (33) into the Swift re…
bfoss765 Aug 3, 2026
57b960f
style(platform-wallet): rustfmt the funding-path registry and its fix…
bfoss765 Aug 3, 2026
3c3e59a
fix(platform-wallet): consume the finalized payment on registration a…
bfoss765 Aug 4, 2026
cf71b8b
fix(kotlin-sdk): release the minted token when cancellation discards …
bfoss765 Aug 4, 2026
25ef36e
refactor(platform-wallet): unify the key-wallet ReservationToken alia…
bfoss765 Aug 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,53 @@ sealed class DashSdkError(
class CoreInsufficientFunds(message: String, cause: Throwable? = null) :
PlatformWallet(message, cause)

/**
* `ErrorTransactionBuild` (native code 32). A Core transaction could
* not be assembled from the request. The REQUEST is at fault, so a
* verbatim retry fails identically — the caller must change it.
*
* It is what every `buildSignedPayment` rejection that is neither a
* shortfall nor a signing failure ([TransactionSigning]) surfaces as:
* a `fundingPath` matching no spendable funds account or
* naming a watch-only one (the two failure modes the single-account
* send design rests on, dashpay/platform#4184), a request breaching a
* monetary bound (MAX_MONEY total, max fee rate, a below-dust
* recipient, an over-100 kB recipient list), or a malformed recipients
* blob. Before this code existed they all arrived as [Generic] with
* native code 99 and could only be told apart by string-matching the
* message. The specific cause is still in [message].
*/
class TransactionBuild(message: String, cause: Throwable? = null) :
PlatformWallet(message, cause)

/**
* `ErrorTransactionSigning` (native code 33). The request was valid and
* the transaction was fully assembled — only the input signatures could
* not be produced, typically because the Keystore/Keychain mnemonic is
* locked or missing.
*
* Unlike [TransactionBuild], the REQUEST is fine: the native layer
* released this build's input reservation before returning, so once the
* signer is usable again the caller may resubmit the identical
* recipients, amount, fee and funding path. Surface this as "unlock to
* continue", never as "this payment is invalid"
* (dashpay/platform#4256).
*
* Retryable in the same sense as [ShieldedNoRecordedAnchor]: nothing
* was committed and the reservation was released, so the retry
* succeeds once its precondition is met. Gate it on the unlock — do
* not spin on it.
*
* Distinct from the sibling stack's `SigningKeyUnavailable` (native
* code 31, dashpay/platform#4183), which is a Platform
* state-transition signer failure reporting a specific identity key
* that must be re-derived.
*/
class TransactionSigning(message: String, cause: Throwable? = null) :
PlatformWallet(message, cause) {
override val isRetryable: Boolean get() = true
}

class AssetLockNotTracked(message: String, cause: Throwable? = null) :
PlatformWallet(message, cause)

Expand Down Expand Up @@ -239,6 +286,67 @@ sealed class DashSdkError(
class NotFound(message: String, cause: Throwable? = null) :
PlatformWallet(message, cause)

/**
* `ErrorTransactionBroadcastRejected` (native code 26). Core
* DEFINITIVELY rejected the core transaction: it is not on the network
* and will not get there. The build's UTXO reservation was released and,
* on the deferred (BIP70/BIP270) path, the token was consumed at the
* same time — so the inputs are spendable again and the token is gone.
*
* The definitive counterpart to [TransactionBroadcastUnconfirmed] (20),
* whose outcome is AMBIGUOUS and which therefore keeps its inputs
* reserved. Because the reservation and token are already gone, this is
* NOT retryable in place: address the rejection reason carried in the
* message, then rebuild with
* [buildSignedPayment][org.dashfoundation.dashsdk.wallet.ManagedPlatformWallet.buildSignedPayment]
* (deferred) or re-issue the send.
*/
class TransactionBroadcastRejected(message: String, cause: Throwable? = null) :
PlatformWallet(message, cause)

/**
* `ErrorStaleReservationToken` (native code 34). A deferred
* (BIP70/BIP270) [broadcastSigned][org.dashfoundation.dashsdk.wallet.ManagedPlatformWallet.broadcastSigned]
* token has outlived its funding reservation's lifetime: key-wallet's
* TTL may already have swept and re-selected the inputs, so acting on it
* could touch a newer, unrelated reservation. The call did NOT touch the
* network. NOT retryable in place — rebuild the payment with
* [buildSignedPayment][org.dashfoundation.dashsdk.wallet.ManagedPlatformWallet.buildSignedPayment].
*
* Sibling of the other two deferred-token failures this code used to
* conflate: [ReservationTokenConsumed] (unknown / already broadcast /
* already released) and [ReservationWalletMismatch] (minted against a
* different wallet generation).
*/
class StaleReservationToken(message: String, cause: Throwable? = null) :
PlatformWallet(message, cause)

/**
* `ErrorReservationTokenConsumed` (native code 35). A deferred
* (BIP70/BIP270) [broadcastSigned][org.dashfoundation.dashsdk.wallet.ManagedPlatformWallet.broadcastSigned]
* token is unknown, already broadcast, or already released — the guard
* that turns a double-broadcast (or a broadcast after release) into a
* typed error instead of a second send. The call did NOT touch the
* network. NOT retryable: rebuild the payment with
* [buildSignedPayment][org.dashfoundation.dashsdk.wallet.ManagedPlatformWallet.buildSignedPayment].
* (Release is idempotent and never raises this.)
*/
class ReservationTokenConsumed(message: String, cause: Throwable? = null) :
PlatformWallet(message, cause)

/**
* `ErrorReservationWalletMismatch` (native code 36). A deferred
* (BIP70/BIP270) [broadcastSigned][org.dashfoundation.dashsdk.wallet.ManagedPlatformWallet.broadcastSigned]
* token was minted against a different wallet *generation* than the one
* broadcasting it (e.g. a wallet re-created under the same id); its
* reservation lives in that other generation's reservation set. The call
* did NOT touch the network and did NOT consume the rightful owner's
* token. NOT retryable through this handle: rebuild the payment with
* [buildSignedPayment][org.dashfoundation.dashsdk.wallet.ManagedPlatformWallet.buildSignedPayment].
*/
class ReservationWalletMismatch(message: String, cause: Throwable? = null) :
PlatformWallet(message, cause)

/**
* Any other `PlatformWalletFFIResultCode` without a dedicated type.
* Carries the platform-wallet [nativeCode] (already de-offset) and
Expand Down Expand Up @@ -335,6 +443,20 @@ sealed class DashSdkError(
// RAW code via translateManagedIdentityNotFoundToZero (#4051)
// before this mapping ever runs. BREAKING for Kotlin hosts that
// caught DashSdkError.NotFound from platform-wallet operations.
//
// 98 is also what the wallet-was-REMOVED case returns on BOTH
// deferred-send paths:
// * deferred (BIP70/BIP270) TOKEN path — a signed-payment broadcast
// whose wallet is no longer registered in the manager, or a
// signed-payment finalize whose wallet was removed while it was
// being signed;
// * finalized-transaction HANDLE (V2) path — a tx-builder finalize
// whose wallet was removed or re-created during signing (no handle
// is published), or a V2 broadcast whose generation is gone.
// Every one reconciles the build's UTXO reservation before returning.
// Nothing was broadcast, and unlike ReservationWalletMismatch (36)
// no other live generation holds the payment either — so it is not
// retryable. See dashpay/platform#4185.
PLATFORM_WALLET_NOT_FOUND_CODE ->
PlatformWallet.NotFound(message, cause)
16 -> PlatformWallet.ShieldedBroadcastFailed(message, cause) // ErrorShieldedBroadcastFailed
Expand All @@ -345,6 +467,18 @@ sealed class DashSdkError(
23 -> PlatformWallet.AssetLockNotTracked(message, cause) // ErrorAssetLockNotTracked
24 -> PlatformWallet.AssetLockAlreadyConsumed(message, cause) // ErrorAssetLockAlreadyConsumed
25 -> PlatformWallet.AssetLockFundingMismatch(message, cause) // ErrorAssetLockFundingMismatch
26 -> PlatformWallet.TransactionBroadcastRejected(message, cause) // ErrorTransactionBroadcastRejected
32 -> PlatformWallet.TransactionBuild(message, cause) // ErrorTransactionBuild
33 -> PlatformWallet.TransactionSigning(message, cause) // ErrorTransactionSigning
// The deferred-token trio sits at the contiguous block 34-36 because
// 27-33 are claimed elsewhere: 27 ErrorShutdownIncomplete
// (dashpay/platform#4268, merged), 29 ErrorAssetLockInsufficientFunds
// (#4184), 31 ErrorSigningKeyUnavailable (#4183/#4259), 32
// ErrorTransactionBuild (#4247/#4256), 33 ErrorTransactionSigning
// (#4256). See packages/rs-platform-wallet-ffi/ERROR_CODE_REGISTRY.md.
34 -> PlatformWallet.StaleReservationToken(message, cause) // ErrorStaleReservationToken
35 -> PlatformWallet.ReservationTokenConsumed(message, cause) // ErrorReservationTokenConsumed
36 -> PlatformWallet.ReservationWalletMismatch(message, cause) // ErrorReservationWalletMismatch
// ErrorSigningKeyUnavailable — the STRUCTURED signer
// discriminator (dashpay/platform#4060 finding 7): the typed
// completion code rides the whole Rust round-trip, no message
Expand Down
Loading
Loading