You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem.IdentityCredits.topUpFromCore / topUpIdentityFromCore is exact-amount only, so a wallet cannot offer "Max" (empty-wallet) identity top-ups through the SDK. The Rust builder work already exists — rust-dashcore #915 (9c87ccb3) added drain mode to the asset-lock builders — but it is unreachable from the SDK:
The platform workspace pins rust-dashcore rev 70d4bf8e (root Cargo.toml:55-62), which is 5 commits older than 9c87ccb3 and predates the feature entirely (git merge-base --is-ancestor verified).
Even at rust-dashcore tip, the single key-wallet FFI entry point serving registration AND top-up — wallet_build_and_sign_asset_lock_transaction (key-wallet-ffi/src/transaction.rs:770) — deliberately pins the old behavior: it passes AssetLockFundingAccount::Bip44 { account_index } and drain = false (transaction.rs:841-849; the feat(rs-drive-abci)!: commit and vote extensions signature verification #915 commit message says so explicitly).
Ask.
Bump the platform rust-dashcore pin past 9c87ccb3.
Extend the key-wallet FFI (new entry point or versioned signature) with drain: bool and the funding-account family selector, honoring feat(rs-drive-abci)!: commit and vote extensions signature verification #915's invariants (drain requires exactly one credit output; fee deducted from the locked amount; CoinJoin funding is drain-only).
Plumb through rs-platform-wallet-ffi → topUpIdentityFromCore → Kotlin IdentityCredits.topUpFromCore (and the Swift equivalent) as e.g. sendAll: Boolean (drain ⇒ amountDuffs ignored/0).
While touching this FFI: return the L1 funding txid.topUpIdentityFromCore returns only the post-transition credit balance. The host wallet needs the asset-lock txid to show the transaction (result screen, tx list) — today it must diff the asset_locks persistence table around the call, which is heuristic under concurrency. A (balance, outpoint) return (or out-param) removes that. Same applies to the registration/invite variants for consistency.
Wallet impact. dash-wallet gates Max top-ups off on the SDK route until this lands (SdkTopUpService KDoc references this issue); exact-amount top-ups are unaffected.
Context: dashpay/dash-wallet#1520 (SDK cutover Phase 1B, asset-lock sends) / MO-998. Findings verified against integration/kotlin-sdk-stack + rust-dashcore dev @ 9c87ccb3.
Problem.
IdentityCredits.topUpFromCore/topUpIdentityFromCoreis exact-amount only, so a wallet cannot offer "Max" (empty-wallet) identity top-ups through the SDK. The Rust builder work already exists — rust-dashcore #915 (9c87ccb3) added drain mode to the asset-lock builders — but it is unreachable from the SDK:rust-dashcorerev70d4bf8e(rootCargo.toml:55-62), which is 5 commits older than9c87ccb3and predates the feature entirely (git merge-base --is-ancestorverified).wallet_build_and_sign_asset_lock_transaction(key-wallet-ffi/src/transaction.rs:770) — deliberately pins the old behavior: it passesAssetLockFundingAccount::Bip44 { account_index }anddrain = false(transaction.rs:841-849; the feat(rs-drive-abci)!: commit and vote extensions signature verification #915 commit message says so explicitly).Ask.
9c87ccb3.drain: booland the funding-account family selector, honoring feat(rs-drive-abci)!: commit and vote extensions signature verification #915's invariants (drain requires exactly one credit output; fee deducted from the locked amount; CoinJoin funding is drain-only).rs-platform-wallet-ffi→topUpIdentityFromCore→ KotlinIdentityCredits.topUpFromCore(and the Swift equivalent) as e.g.sendAll: Boolean(drain ⇒amountDuffsignored/0).While touching this FFI: return the L1 funding txid.
topUpIdentityFromCorereturns only the post-transition credit balance. The host wallet needs the asset-lock txid to show the transaction (result screen, tx list) — today it must diff theasset_lockspersistence table around the call, which is heuristic under concurrency. A(balance, outpoint)return (or out-param) removes that. Same applies to the registration/invite variants for consistency.Wallet impact. dash-wallet gates Max top-ups off on the SDK route until this lands (
SdkTopUpServiceKDoc references this issue); exact-amount top-ups are unaffected.Context: dashpay/dash-wallet#1520 (SDK cutover Phase 1B, asset-lock sends) / MO-998. Findings verified against
integration/kotlin-sdk-stack+ rust-dashcoredev@ 9c87ccb3.