react-native-neural-wallet-lib 0.1.34 → 0.1.36

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.
@@ -100,6 +100,8 @@ typedef struct UniffiForeignFutureStructVoid {
100
100
  } UniffiForeignFutureStructVoid;
101
101
  typedef void (*UniffiForeignFutureCompleteVoid)(
102
102
  uint64_t callback_data, UniffiForeignFutureStructVoid result);
103
+ RustBuffer uniffi_wallet_fn_func_evm_private_key_to_keypair(
104
+ RustBuffer private_key_hex, RustCallStatus *uniffi_out_err);
103
105
  RustBuffer uniffi_wallet_fn_func_generate_bitcoin_keypair(
104
106
  RustBuffer mnemonic, RustBuffer path, RustBuffer addr_type,
105
107
  RustBuffer network, RustCallStatus *uniffi_out_err);
@@ -117,6 +119,8 @@ RustBuffer
117
119
  uniffi_wallet_fn_func_generate_solana_keypair(RustBuffer mnemonic_str,
118
120
  RustBuffer path_str,
119
121
  RustCallStatus *uniffi_out_err);
122
+ RustBuffer uniffi_wallet_fn_func_solana_private_key_to_keypair(
123
+ RustBuffer private_key_base58, RustCallStatus *uniffi_out_err);
120
124
  RustBuffer
121
125
  uniffi_wallet_fn_func_string_to_base64(RustBuffer input,
122
126
  RustCallStatus *uniffi_out_err);
@@ -244,11 +248,13 @@ void ffi_wallet_rust_future_free_void(
244
248
  /*handle*/ uint64_t handle);
245
249
  void ffi_wallet_rust_future_complete_void(
246
250
  /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
251
+ uint16_t uniffi_wallet_checksum_func_evm_private_key_to_keypair();
247
252
  uint16_t uniffi_wallet_checksum_func_generate_bitcoin_keypair();
248
253
  uint16_t uniffi_wallet_checksum_func_generate_complex_password();
249
254
  uint16_t uniffi_wallet_checksum_func_generate_eth_keypair();
250
255
  uint16_t uniffi_wallet_checksum_func_generate_mnemonic();
251
256
  uint16_t uniffi_wallet_checksum_func_generate_solana_keypair();
257
+ uint16_t uniffi_wallet_checksum_func_solana_private_key_to_keypair();
252
258
  uint16_t uniffi_wallet_checksum_func_string_to_base64();
253
259
  uint32_t ffi_wallet_uniffi_contract_version();
254
260
  }
@@ -1659,6 +1665,17 @@ NativeWallet::NativeWallet(
1659
1665
  return this->cpp_uniffi_internal_fn_func_ffi__arraybuffer_to_string(
1660
1666
  rt, thisVal, args, count);
1661
1667
  });
1668
+ props["ubrn_uniffi_wallet_fn_func_evm_private_key_to_keypair"] =
1669
+ jsi::Function::createFromHostFunction(
1670
+ rt,
1671
+ jsi::PropNameID::forAscii(
1672
+ rt, "ubrn_uniffi_wallet_fn_func_evm_private_key_to_keypair"),
1673
+ 1,
1674
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1675
+ const jsi::Value *args, size_t count) -> jsi::Value {
1676
+ return this->cpp_uniffi_wallet_fn_func_evm_private_key_to_keypair(
1677
+ rt, thisVal, args, count);
1678
+ });
1662
1679
  props["ubrn_uniffi_wallet_fn_func_generate_bitcoin_keypair"] =
1663
1680
  jsi::Function::createFromHostFunction(
1664
1681
  rt,
@@ -1714,6 +1731,18 @@ NativeWallet::NativeWallet(
1714
1731
  return this->cpp_uniffi_wallet_fn_func_generate_solana_keypair(
1715
1732
  rt, thisVal, args, count);
1716
1733
  });
1734
+ props["ubrn_uniffi_wallet_fn_func_solana_private_key_to_keypair"] =
1735
+ jsi::Function::createFromHostFunction(
1736
+ rt,
1737
+ jsi::PropNameID::forAscii(
1738
+ rt, "ubrn_uniffi_wallet_fn_func_solana_private_key_to_keypair"),
1739
+ 1,
1740
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1741
+ const jsi::Value *args, size_t count) -> jsi::Value {
1742
+ return this
1743
+ ->cpp_uniffi_wallet_fn_func_solana_private_key_to_keypair(
1744
+ rt, thisVal, args, count);
1745
+ });
1717
1746
  props["ubrn_uniffi_wallet_fn_func_string_to_base64"] =
1718
1747
  jsi::Function::createFromHostFunction(
1719
1748
  rt,
@@ -1725,6 +1754,19 @@ NativeWallet::NativeWallet(
1725
1754
  return this->cpp_uniffi_wallet_fn_func_string_to_base64(
1726
1755
  rt, thisVal, args, count);
1727
1756
  });
1757
+ props["ubrn_uniffi_wallet_checksum_func_evm_private_key_to_keypair"] =
1758
+ jsi::Function::createFromHostFunction(
1759
+ rt,
1760
+ jsi::PropNameID::forAscii(
1761
+ rt,
1762
+ "ubrn_uniffi_wallet_checksum_func_evm_private_key_to_keypair"),
1763
+ 0,
1764
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1765
+ const jsi::Value *args, size_t count) -> jsi::Value {
1766
+ return this
1767
+ ->cpp_uniffi_wallet_checksum_func_evm_private_key_to_keypair(
1768
+ rt, thisVal, args, count);
1769
+ });
1728
1770
  props["ubrn_uniffi_wallet_checksum_func_generate_bitcoin_keypair"] =
1729
1771
  jsi::Function::createFromHostFunction(
1730
1772
  rt,
@@ -1783,6 +1825,19 @@ NativeWallet::NativeWallet(
1783
1825
  ->cpp_uniffi_wallet_checksum_func_generate_solana_keypair(
1784
1826
  rt, thisVal, args, count);
1785
1827
  });
1828
+ props["ubrn_uniffi_wallet_checksum_func_solana_private_key_to_keypair"] =
1829
+ jsi::Function::createFromHostFunction(
1830
+ rt,
1831
+ jsi::PropNameID::forAscii(
1832
+ rt,
1833
+ "ubrn_uniffi_wallet_checksum_func_solana_private_key_to_keypair"),
1834
+ 0,
1835
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1836
+ const jsi::Value *args, size_t count) -> jsi::Value {
1837
+ return this
1838
+ ->cpp_uniffi_wallet_checksum_func_solana_private_key_to_keypair(
1839
+ rt, thisVal, args, count);
1840
+ });
1786
1841
  props["ubrn_uniffi_wallet_checksum_func_string_to_base64"] =
1787
1842
  jsi::Function::createFromHostFunction(
1788
1843
  rt,
@@ -1868,6 +1923,19 @@ jsi::Value NativeWallet::cpp_uniffi_internal_fn_func_ffi__arraybuffer_to_string(
1868
1923
  }
1869
1924
 
1870
1925
  // Methods calling directly into the uniffi generated C API of the Rust crate.
1926
+ jsi::Value NativeWallet::cpp_uniffi_wallet_fn_func_evm_private_key_to_keypair(
1927
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
1928
+ size_t count) {
1929
+ RustCallStatus status =
1930
+ uniffi::wallet::Bridging<RustCallStatus>::rustSuccess(rt);
1931
+ auto value = uniffi_wallet_fn_func_evm_private_key_to_keypair(
1932
+ uniffi::wallet::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]),
1933
+ &status);
1934
+ uniffi::wallet::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status,
1935
+ args[count - 1]);
1936
+
1937
+ return uniffi::wallet::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
1938
+ }
1871
1939
  jsi::Value NativeWallet::cpp_uniffi_wallet_fn_func_generate_bitcoin_keypair(
1872
1940
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
1873
1941
  size_t count) {
@@ -1936,6 +2004,20 @@ jsi::Value NativeWallet::cpp_uniffi_wallet_fn_func_generate_solana_keypair(
1936
2004
 
1937
2005
  return uniffi::wallet::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
1938
2006
  }
2007
+ jsi::Value
2008
+ NativeWallet::cpp_uniffi_wallet_fn_func_solana_private_key_to_keypair(
2009
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2010
+ size_t count) {
2011
+ RustCallStatus status =
2012
+ uniffi::wallet::Bridging<RustCallStatus>::rustSuccess(rt);
2013
+ auto value = uniffi_wallet_fn_func_solana_private_key_to_keypair(
2014
+ uniffi::wallet::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]),
2015
+ &status);
2016
+ uniffi::wallet::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status,
2017
+ args[count - 1]);
2018
+
2019
+ return uniffi::wallet::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
2020
+ }
1939
2021
  jsi::Value NativeWallet::cpp_uniffi_wallet_fn_func_string_to_base64(
1940
2022
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
1941
2023
  size_t count) {
@@ -1950,6 +2032,14 @@ jsi::Value NativeWallet::cpp_uniffi_wallet_fn_func_string_to_base64(
1950
2032
  return uniffi::wallet::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
1951
2033
  }
1952
2034
  jsi::Value
2035
+ NativeWallet::cpp_uniffi_wallet_checksum_func_evm_private_key_to_keypair(
2036
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2037
+ size_t count) {
2038
+ auto value = uniffi_wallet_checksum_func_evm_private_key_to_keypair();
2039
+
2040
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
2041
+ }
2042
+ jsi::Value
1953
2043
  NativeWallet::cpp_uniffi_wallet_checksum_func_generate_bitcoin_keypair(
1954
2044
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
1955
2045
  size_t count) {
@@ -1987,6 +2077,14 @@ NativeWallet::cpp_uniffi_wallet_checksum_func_generate_solana_keypair(
1987
2077
 
1988
2078
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
1989
2079
  }
2080
+ jsi::Value
2081
+ NativeWallet::cpp_uniffi_wallet_checksum_func_solana_private_key_to_keypair(
2082
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2083
+ size_t count) {
2084
+ auto value = uniffi_wallet_checksum_func_solana_private_key_to_keypair();
2085
+
2086
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
2087
+ }
1990
2088
  jsi::Value NativeWallet::cpp_uniffi_wallet_checksum_func_string_to_base64(
1991
2089
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
1992
2090
  size_t count) {
@@ -28,6 +28,9 @@ protected:
28
28
  jsi::Value cpp_uniffi_internal_fn_func_ffi__arraybuffer_to_string(
29
29
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
30
30
  size_t count);
31
+ jsi::Value cpp_uniffi_wallet_fn_func_evm_private_key_to_keypair(
32
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
33
+ size_t count);
31
34
  jsi::Value cpp_uniffi_wallet_fn_func_generate_bitcoin_keypair(
32
35
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
33
36
  size_t count);
@@ -43,9 +46,15 @@ protected:
43
46
  jsi::Value cpp_uniffi_wallet_fn_func_generate_solana_keypair(
44
47
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
45
48
  size_t count);
49
+ jsi::Value cpp_uniffi_wallet_fn_func_solana_private_key_to_keypair(
50
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
51
+ size_t count);
46
52
  jsi::Value cpp_uniffi_wallet_fn_func_string_to_base64(
47
53
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
48
54
  size_t count);
55
+ jsi::Value cpp_uniffi_wallet_checksum_func_evm_private_key_to_keypair(
56
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
57
+ size_t count);
49
58
  jsi::Value cpp_uniffi_wallet_checksum_func_generate_bitcoin_keypair(
50
59
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
51
60
  size_t count);
@@ -61,6 +70,9 @@ protected:
61
70
  jsi::Value cpp_uniffi_wallet_checksum_func_generate_solana_keypair(
62
71
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
63
72
  size_t count);
73
+ jsi::Value cpp_uniffi_wallet_checksum_func_solana_private_key_to_keypair(
74
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
75
+ size_t count);
64
76
  jsi::Value cpp_uniffi_wallet_checksum_func_string_to_base64(
65
77
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
66
78
  size_t count);
Binary file
@@ -1 +1 @@
1
- {"version":3,"names":["getter","globalThis","NativeWallet","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/wallet-ffi.ts"],"mappings":";;AAAA;AACA;;AA8DA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,YAAY;AAClC,eAAeF,MAAM;;AAErB;;AAmHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,8CAGL,GAAG,IAAI;AACR,MAAMC,mCAGL,GAAG,IAAI","ignoreList":[]}
1
+ {"version":3,"names":["getter","globalThis","NativeWallet","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/wallet-ffi.ts"],"mappings":";;AAAA;AACA;;AAwEA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,YAAY;AAClC,eAAeF,MAAM;;AAErB;;AAmHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,8CAGL,GAAG,IAAI;AACR,MAAMC,mCAGL,GAAG,IAAI","ignoreList":[]}