Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
12 changes: 6 additions & 6 deletions docs/sdk/sdk-parity-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"wallet_restore"
],
"shared_symbols": {
"core_wallet_abandon_signed_transaction_v2": "packages/rs-platform-wallet-ffi/src/core_wallet/broadcast.rs",
"core_wallet_broadcast_signed_transaction_v2": "packages/rs-platform-wallet-ffi/src/core_wallet/broadcast.rs",
"core_wallet_abandon_signed_transaction": "packages/rs-platform-wallet-ffi/src/core_wallet/broadcast.rs",
"core_wallet_broadcast_signed_transaction": "packages/rs-platform-wallet-ffi/src/core_wallet/broadcast.rs",
"core_wallet_get_balance": "packages/rs-platform-wallet-ffi/src/core_wallet/wallet.rs",
"core_wallet_signed_payment_broadcast": "packages/rs-platform-wallet-ffi/src/core_wallet/signed_payment.rs",
"core_wallet_signed_payment_finalize": "packages/rs-platform-wallet-ffi/src/core_wallet/transaction_builder.rs",
"core_wallet_signed_payment_release": "packages/rs-platform-wallet-ffi/src/core_wallet/signed_payment.rs",
"core_wallet_signed_transaction_v2_bytes": "packages/rs-platform-wallet-ffi/src/core_wallet/broadcast.rs",
"core_wallet_signed_transaction_bytes": "packages/rs-platform-wallet-ffi/src/core_wallet/broadcast.rs",
"core_wallet_tx_builder_add_op_return": "packages/rs-platform-wallet-ffi/src/core_wallet/transaction_builder.rs",
"core_wallet_tx_builder_change_to_first_input": "packages/rs-platform-wallet-ffi/src/core_wallet/transaction_builder.rs",
"core_wallet_tx_builder_finalize": "packages/rs-platform-wallet-ffi/src/core_wallet/transaction_builder.rs",
Expand Down Expand Up @@ -101,8 +101,8 @@
"area": "correctness",
"shared_apis": [
"core_wallet_tx_builder_finalize",
"core_wallet_broadcast_signed_transaction_v2",
"core_wallet_abandon_signed_transaction_v2"
"core_wallet_broadcast_signed_transaction",
"core_wallet_abandon_signed_transaction"
],
"required_persistence_capabilities": [],
"hosts": {
Expand Down Expand Up @@ -267,7 +267,7 @@
"core_wallet_tx_builder_add_op_return",
"core_wallet_tx_builder_preserve_output_order",
"core_wallet_tx_builder_change_to_first_input",
"core_wallet_signed_transaction_v2_bytes"
"core_wallet_signed_transaction_bytes"
],
"required_persistence_capabilities": [],
"hosts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/kotlin-sdk/KotlinExampleApp/TEST_PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ Most Platform actions have hard preconditions. Establish these fixtures before s
| CORE-02 | Restore wallet (existing mnemonic) | Core | Essential | ✅ | | `CreateWalletScreen` (Import Existing toggle). After sync, derived addresses + balance populate. |
| CORE-03 | Backup / view recovery phrase | Core | Essential | ✅ | | `SeedBackupScreen`. Phrase matches creation; biometric-gated reveal on Android. |
| CORE-04 | Receive (derive address + QR) | Core | Essential | ✅ | | `ReceiveAddressSheet` → `core_wallet_next_receive_address`. Fresh external address + scannable QR. |
| CORE-05 | Send Core L1 transaction | Core | Essential | ✅ | | Send flow (`SendTransactionScreen`, mode Core→Core) → `ManagedPlatformWallet.sendToAddresses` → `CoreTransactionBuilder.finalizeAtomic` → `core_wallet_broadcast_signed_transaction_v2`. Funding and reservation are atomic; tx broadcasts, balance drops, and it appears in history. |
| CORE-05 | Send Core L1 transaction | Core | Essential | ✅ | | Send flow (`SendTransactionScreen`, mode Core→Core) → `ManagedPlatformWallet.sendToAddresses` → `CoreTransactionBuilder.finalizeAtomic` → `core_wallet_broadcast_signed_transaction`. Funding and reservation are atomic; tx broadcasts, balance drops, and it appears in history. |
| CORE-06 | View balance / tx history / UTXOs | Core | Essential | ✅ | | `WalletDetailScreen`, `TransactionListScreen`, `AccountDetailScreen` (Room). |
| CORE-07 | SPV sync (start / stop / progress) | Core | Essential | ✅ | | Global sync indicator (`GlobalSyncIndicator`) → `platform_wallet_manager_spv_*`. Headers/filters/masternodes advance to tip. |
| CORE-08 | QR scan recipient | Core | Manual | ✅ | | `QrScannerScreen` (CameraX), reachable in the Send flow. Emulators can use a virtual camera scene but reliability varies — treat as `Tier=Manual`. |
| CORE-09 | Multiple HD accounts (within one wallet) | Core | Common | ✅ | | Account selection / `AccountDetailScreen`; balances per `account_index`. |
| CORE-10 | Multi-recipient Core send | Core | Common | ✅ | | Send flow (`SendTransactionScreen`, Core→Core) → "Add recipient" appends extra address/amount rows → `CoreTransactionBuilder` (one `addOutput` per recipient) → `finalizeAtomic` + `core_wallet_broadcast_signed_transaction_v2`. One tx with N outputs. |
| CORE-10 | Multi-recipient Core send | Core | Common | ✅ | | Send flow (`SendTransactionScreen`, Core→Core) → "Add recipient" appends extra address/amount rows → `CoreTransactionBuilder` (one `addOutput` per recipient) → `finalizeAtomic` + `core_wallet_broadcast_signed_transaction`. One tx with N outputs. |

#### Multiple wallets on one device

Expand Down
2 changes: 1 addition & 1 deletion packages/kotlin-sdk/PARITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ verbatim. Documented deviations from iOS are listed after the table.
| QRScannerView.swift | ui/scanner/QrScannerScreen.kt · `QrScanner` | ported |
| ReceiveAddressView.swift | ui/wallet/ReceiveAddressSheet.kt | ported |
| SeedBackupView.swift | ui/wallet/SeedBackupScreen.kt · `SeedBackup` | ported |
| SendTransactionView.swift | ui/wallet/SendTransactionScreen.kt · `SendTransaction` | ported — `ManagedPlatformWallet.sendToAddresses` drives the atomic V2 path (`CoreTransactionBuilder.finalizeAtomic` → `core_wallet_tx_builder_finalize` → `core_wallet_broadcast_signed_transaction_v2`); shared Rust owns selection, reservation, signing, and broadcast classification |
| SendTransactionView.swift | ui/wallet/SendTransactionScreen.kt · `SendTransaction` | ported — `ManagedPlatformWallet.sendToAddresses` drives the atomic V2 path (`CoreTransactionBuilder.finalizeAtomic` → `core_wallet_tx_builder_finalize` → `core_wallet_broadcast_signed_transaction`); shared Rust owns selection, reservation, signing, and broadcast classification |
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
| ShieldedActivityView.swift | ui/shielded/ShieldedActivityScreen.kt · `ShieldedActivity` | ported |
| TransactionDetailView.swift | ui/wallet/TransactionDetailScreen.kt · `WalletTransactionDetail` | ported |
| TransactionListView.swift | ui/wallet/TransactionListScreen.kt · `WalletTransactions` | ported |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.junit.runner.RunWith
/**
* Binding-level coverage for the MAYACHAIN-deposit builder controls
* (`add_op_return`, `preserve_output_order`, `change_to_first_input`,
* `signed_transaction_v2_bytes`) — the Android counterpart of the gated
* `signed_transaction_bytes`) — the Android counterpart of the gated
* Swift `MayaDepositVerificationIntegrationTests`, minus everything that
* needs a funded wallet. Proves the four new JNI symbols resolve, happy-path
* calls succeed against a live builder, and the FFI's error paths surface as
Expand Down Expand Up @@ -83,7 +83,7 @@ class CoreTxBuilderOpReturnBindingTest {
// Handle 0 can never be a finalized transaction; the call must throw
// (not crash), which also proves the JNI symbol resolves.
assertThrows(DashSDKException::class.java) {
WalletManagerNative.coreSignedTransactionV2Bytes(0L)
WalletManagerNative.coreSignedTransactionBytes(0L)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,9 @@ sealed class DashSdkError(
// 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
// * finalized-transaction HANDLE 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.
// is published), or a finalized-handle 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ internal object WalletManagerNative {
*/
external fun coreTxBuilderSetCurrentHeight(builder: Long, height: Int)

/** Atomic V2 finalizer; consumes [builder] and returns an opaque signed-transaction V2 handle. */
/** Atomic finalizer; consumes [builder] and returns an opaque signed-transaction handle. */
external fun coreTxBuilderFinalize(
builder: Long,
walletHandle: Long,
Expand All @@ -218,7 +218,7 @@ internal object WalletManagerNative {
/**
* `platform_wallet_get_core` — resolve the transient core-wallet handle
* from a `PlatformWallet` handle, for
* [coreWalletBroadcastSignedTransactionV2]. Free with [coreWalletDestroy].
* [coreWalletBroadcastSignedTransaction]. Free with [coreWalletDestroy].
* Returns 0 after throwing.
*/
external fun platformWalletGetCore(walletHandle: Long): Long
Expand Down Expand Up @@ -261,25 +261,25 @@ internal object WalletManagerNative {
*/
external fun coreWalletNextChangeAddress(coreHandle: Long, accountIndex: Int): String

/** Consume and broadcast an atomically finalized V2 transaction. */
external fun coreWalletBroadcastSignedTransactionV2(coreHandle: Long, transaction: Long): String
/** Consume and broadcast an atomically finalized transaction. */
external fun coreWalletBroadcastSignedTransaction(coreHandle: Long, transaction: Long): String

/** Consume without sending and immediately release the reservation. */
external fun coreWalletAbandonSignedTransactionV2(coreHandle: Long, transaction: Long)
external fun coreWalletAbandonSignedTransaction(coreHandle: Long, transaction: Long)

/** Idempotent cleaner fallback; abandons and releases the reservation. */
external fun coreSignedTransactionV2Free(transaction: Long)
external fun coreSignedTransactionFree(transaction: Long)

/** Read the finalized transaction's fee before consumption. */
external fun coreSignedTransactionV2Fee(transaction: Long): Long
external fun coreSignedTransactionFee(transaction: Long): Long

/**
* `core_wallet_signed_transaction_v2_bytes` — the consensus-serialized
* `core_wallet_signed_transaction_bytes` — the consensus-serialized
* signed transaction bytes, read WITHOUT consuming the ownership token.
* Lets the caller assert the deposit shape (e.g. MAYACHAIN's
* vault/OP_RETURN/change ordering) before deciding to broadcast.
*/
external fun coreSignedTransactionV2Bytes(transaction: Long): ByteArray
external fun coreSignedTransactionBytes(transaction: Long): ByteArray

/** `core_wallet_destroy` — release a core handle from [platformWalletGetCore]. Safe on 0. */
external fun coreWalletDestroy(coreHandle: Long)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ class CoreTransactionBuilder internal constructor(network: Network) : AutoClosea
coreSignerHandle,
)
val fee = try {
WalletManagerNative.coreSignedTransactionV2Fee(transaction)
WalletManagerNative.coreSignedTransactionFee(transaction)
} catch (error: Throwable) {
WalletManagerNative.coreSignedTransactionV2Free(transaction)
WalletManagerNative.coreSignedTransactionFree(transaction)
throw error
}
return FinalizedCoreTransaction(transaction, fee)
Expand Down Expand Up @@ -235,15 +235,15 @@ class FinalizedCoreTransaction internal constructor(handle: Long, val fee: Long)
fun serializedData(): ByteArray {
val handle = handleRef.get()
check(handle != 0L) { "FinalizedCoreTransaction has already been consumed" }
return WalletManagerNative.coreSignedTransactionV2Bytes(handle)
return WalletManagerNative.coreSignedTransactionBytes(handle)
}

override fun close() = cleanable.clean()

private class Cleanup(private val handleRef: AtomicLong) : Runnable {
override fun run() {
val handle = handleRef.getAndSet(0)
if (handle != 0L) WalletManagerNative.coreSignedTransactionV2Free(handle)
if (handle != 0L) WalletManagerNative.coreSignedTransactionFree(handle)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ class ManagedCoreWallet internal constructor(handle: Long) : AutoCloseable {
check(it != 0L) { "ManagedCoreWallet has been closed" }
}

/** Consume and broadcast a V2 finalized transaction. */
/** Consume and broadcast a finalized transaction. */
fun broadcastTransaction(tx: FinalizedCoreTransaction): String =
WalletManagerNative.coreWalletBroadcastSignedTransactionV2(
WalletManagerNative.coreWalletBroadcastSignedTransaction(
handle,
tx.takeForBroadcast(),
)

/** Consume without sending and release the selected inputs immediately. */
fun abandonTransaction(tx: FinalizedCoreTransaction) {
WalletManagerNative.coreWalletAbandonSignedTransactionV2(
WalletManagerNative.coreWalletAbandonSignedTransaction(
handle,
tx.takeForAbandon(),
)
Expand Down
Loading