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
{{ message }}
Repository navigation
Commit 07cdfda
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(sdk): run the KeyWallet helpers on platform-wallet-ffi
`TransactionDecoder.decode`, `Mnemonic.generate`, `Mnemonic.validate`, `KeyDerivation.getIdentityAuthenticationPath` and `Address.validate` keep their Swift signatures and now call `platform-wallet-ffi`. The Kotlin JNI `decodeTransaction` and `generateMnemonic` bridges do the same and map failures through `take_pwffi_error`, so `rs-unified-sdk-jni` no longer depends on `key-wallet-ffi`.
New Swift API lets apps stop rebuilding a `KeyWallet` wallet from the phrase: `Mnemonic.walletId(for:network:)`, `Mnemonic.firstReceiveAddress(for:network:)` and `ManagedPlatformWallet.coreAddressPath(address:)`. Every helper that passes a string to C rejects an embedded NUL. Parity tests pin the wallet id and the first receive address against the `KeyWallet` code they replace, for English and French phrases.
`Mnemonic.generate`, `TransactionDecoder.decode` and `getIdentityAuthenticationPath` now throw `PlatformWalletError`. The other `KeyWallet` classes and `rs-unified-sdk-ffi`'s `key-wallet-ffi` dependency are unchanged.
Copy file name to clipboardExpand all lines: packages/kotlin-sdk/sdk/src/main/kotlin/org/dashfoundation/dashsdk/persistence/PlatformWalletPersistenceHandler.kt
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -134,8 +134,8 @@ class PlatformWalletPersistenceHandler(
134
134
/**
135
135
* Where the sweep pass gets a stored loser's input outpoints (the
136
136
* outpoint-keyed hold, see `applySweptTransactions`). The production
137
-
* default decodes the stored consensus bytes through key-wallet-ffi's
138
-
* `transaction_decode`; tests inject a fake keyed by txid, since the
137
+
* default decodes the stored consensus bytes through platform-wallet-ffi's
138
+
* `platform_wallet_transaction_decode`; tests inject a fake keyed by txid, since the
139
139
* native library is not loadable under Robolectric.
Copy file name to clipboardExpand all lines: packages/kotlin-sdk/sdk/src/test/kotlin/org/dashfoundation/dashsdk/persistence/PlatformWalletPersistenceHandlerTest.kt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ class PlatformWalletPersistenceHandlerTest {
64
64
/**
65
65
* What the sweep pass "decodes" from a stored record's bytes, keyed by
66
66
* txid. Every fixture records transactions with dummy bytes
67
-
* (`ByteArray(10) { 5 }`) that key-wallet-ffi could never decode, and
67
+
* (`ByteArray(10) { 5 }`) that the native decoder could never decode, and
68
68
* the native decoder is not loadable under Robolectric anyway, so
69
69
* [recordTransaction] registers each record's `inputOutpoints` here and
70
70
* [storedInputs] hands them back. A txid never registered throws, as
0 commit comments