@vultisig/walletcore-native 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# @vultisig/walletcore-native
|
|
2
|
+
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#272](https://github.com/vultisig/vultisig-sdk/pull/272) [`496fa54`](https://github.com/vultisig/vultisig-sdk/commit/496fa54a7132d14c82933f27b78b428d4c0caf4a) Thanks [@NeOMakinG](https://github.com/NeOMakinG)! - Fix Android Kotlin compilation against TrustWallet JNI bindings
|
|
8
|
+
- Import `wallet.core.java.AnySigner` (lives outside `wallet.core.jni.*`)
|
|
9
|
+
- Fix `anyAddressIsValidSS58` return type (`Nothing` -> `Boolean`) so Kotlin can reify the type parameter
|
|
10
|
+
- Use `AnySigner.nativePlan(byte[], int)` instead of protobuf `plan()` overload that requires 3 params
|
|
11
|
+
- Pass required `bounceable` and `testnet` boolean params to `TONAddressConverter.toUserFriendly`
|
|
@@ -3,6 +3,7 @@ package expo.modules.walletcore
|
|
|
3
3
|
import expo.modules.kotlin.modules.Module
|
|
4
4
|
import expo.modules.kotlin.modules.ModuleDefinition
|
|
5
5
|
import wallet.core.jni.*
|
|
6
|
+
import wallet.core.java.AnySigner
|
|
6
7
|
|
|
7
8
|
class ExpoWalletCoreModule : Module() {
|
|
8
9
|
// NOTE: nextHandle and the key/wallet maps are accessed from the Expo module
|
|
@@ -143,15 +144,8 @@ class ExpoWalletCoreModule : Module() {
|
|
|
143
144
|
AnyAddress.isValidBech32(address, CoinType.createFromValue(coinType), hrp)
|
|
144
145
|
}
|
|
145
146
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
// result, so callers know this code path is not supported yet.
|
|
149
|
-
Function("anyAddressIsValidSS58") { _address: String, _coinType: Int, _ss58Prefix: Int ->
|
|
150
|
-
throw Exception(
|
|
151
|
-
"anyAddressIsValidSS58 is not supported on Android: the JNI binding " +
|
|
152
|
-
"does not expose an SS58-prefix overload. Use anyAddressIsValid as a " +
|
|
153
|
-
"fallback (ignores ss58Prefix) or implement a pure-Kotlin SS58 check."
|
|
154
|
-
)
|
|
147
|
+
Function("anyAddressIsValidSS58") { address: String, coinType: Int, ss58Prefix: Int ->
|
|
148
|
+
AnyAddress.isValidSS58(address, CoinType.createFromValue(coinType), ss58Prefix)
|
|
155
149
|
}
|
|
156
150
|
|
|
157
151
|
Function("anyAddressCreateWithString") { address: String, coinType: Int ->
|
|
@@ -198,7 +192,7 @@ class ExpoWalletCoreModule : Module() {
|
|
|
198
192
|
// AnySigner
|
|
199
193
|
Function("anySignerPlan") { txInputDataBase64: String, coinType: Int ->
|
|
200
194
|
val txData = android.util.Base64.decode(txInputDataBase64, android.util.Base64.NO_WRAP)
|
|
201
|
-
val result = AnySigner.
|
|
195
|
+
val result = AnySigner.nativePlan(txData, coinType)
|
|
202
196
|
android.util.Base64.encodeToString(result, android.util.Base64.NO_WRAP)
|
|
203
197
|
}
|
|
204
198
|
|
|
@@ -338,7 +332,7 @@ class ExpoWalletCoreModule : Module() {
|
|
|
338
332
|
|
|
339
333
|
// TONAddressConverter
|
|
340
334
|
Function("tonAddressToUserFriendly") { address: String ->
|
|
341
|
-
TONAddressConverter.toUserFriendly(address)
|
|
335
|
+
TONAddressConverter.toUserFriendly(address, false, false)
|
|
342
336
|
}
|
|
343
337
|
|
|
344
338
|
// SolanaAddress
|