react-native-monero 0.4.2 → 0.5.0

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 CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.5.0 (2026-08-14)
6
+
7
+ - changed: (Breaking) `broadcastTransaction` returns a `BroadcastResult` with the transaction secret key (`txKey`) instead of the string `"success"`. The key is the sender's only proof of payment and the broadcast is the send path's only chance to hand it to the caller, since it cannot be derived from the seed. A key the wallet cannot report never fails an already-broadcast payment: the result simply carries no `txKey`.
8
+
5
9
  ## 0.4.2 (2026-07-17)
6
10
 
7
11
  - changed: Bump vtnerd/lwsf to da8e2617958312f10fe4406808c2a951c5cf0a09
@@ -8,32 +8,32 @@
8
8
  <key>BinaryPath</key>
9
9
  <string>libmonero-module.a</string>
10
10
  <key>LibraryIdentifier</key>
11
- <string>ios-arm64_x86_64-simulator</string>
11
+ <string>ios-arm64</string>
12
12
  <key>LibraryPath</key>
13
13
  <string>libmonero-module.a</string>
14
14
  <key>SupportedArchitectures</key>
15
15
  <array>
16
16
  <string>arm64</string>
17
- <string>x86_64</string>
18
17
  </array>
19
18
  <key>SupportedPlatform</key>
20
19
  <string>ios</string>
21
- <key>SupportedPlatformVariant</key>
22
- <string>simulator</string>
23
20
  </dict>
24
21
  <dict>
25
22
  <key>BinaryPath</key>
26
23
  <string>libmonero-module.a</string>
27
24
  <key>LibraryIdentifier</key>
28
- <string>ios-arm64</string>
25
+ <string>ios-arm64_x86_64-simulator</string>
29
26
  <key>LibraryPath</key>
30
27
  <string>libmonero-module.a</string>
31
28
  <key>SupportedArchitectures</key>
32
29
  <array>
33
30
  <string>arm64</string>
31
+ <string>x86_64</string>
34
32
  </array>
35
33
  <key>SupportedPlatform</key>
36
34
  <string>ios</string>
35
+ <key>SupportedPlatformVariant</key>
36
+ <string>simulator</string>
37
37
  </dict>
38
38
  </array>
39
39
  <key>CFBundlePackageType</key>
@@ -1,4 +1,4 @@
1
- import type { DerivedKeys, EncodeUriParams, GeneratedWallet, NetworkType, ParsedUri, Recipient, SignedTransaction, TransactionPriority, TransactionsPage, WalletBackend, WalletStatus } from './types';
1
+ import type { BroadcastResult, DerivedKeys, EncodeUriParams, GeneratedWallet, NetworkType, ParsedUri, Recipient, SignedTransaction, TransactionPriority, TransactionsPage, WalletBackend, WalletStatus } from './types';
2
2
  /**
3
3
  * The shape of the native C++ module exposed to React Native.
4
4
  *
@@ -114,11 +114,14 @@ export declare class CppBridge {
114
114
  * natively retained transaction to broadcast.
115
115
  * @param walletId - Unique identifier for the wallet
116
116
  * @param signedTx - The signedTxHex returned by createTransaction
117
- * @returns "success"
117
+ * @returns BroadcastResult with the transaction secret key, when the wallet
118
+ * can report it. This is the only chance to read the key on the send path:
119
+ * it is not derivable from the seed, so a caller that drops it here can
120
+ * only recover it from this wallet's local cache later.
118
121
  * @throws Error if the transaction is no longer retained (evicted, or the
119
122
  * wallet was closed since creation) or the broadcast fails
120
123
  */
121
- broadcastTransaction(walletId: string, signedTx: string): Promise<string>;
124
+ broadcastTransaction(walletId: string, signedTx: string): Promise<BroadcastResult>;
122
125
  /**
123
126
  * Parse a monero: URI into its components.
124
127
  * @param uri - The monero: URI to parse
@@ -179,7 +179,10 @@ class CppBridge {
179
179
  * natively retained transaction to broadcast.
180
180
  * @param walletId - Unique identifier for the wallet
181
181
  * @param signedTx - The signedTxHex returned by createTransaction
182
- * @returns "success"
182
+ * @returns BroadcastResult with the transaction secret key, when the wallet
183
+ * can report it. This is the only chance to read the key on the send path:
184
+ * it is not derivable from the seed, so a caller that drops it here can
185
+ * only recover it from this wallet's local cache later.
183
186
  * @throws Error if the transaction is no longer retained (evicted, or the
184
187
  * wallet was closed since creation) or the broadcast fails
185
188
  */
@@ -189,7 +192,7 @@ class CppBridge {
189
192
  signedTx,
190
193
  this.module.documentDirectory
191
194
  ]);
192
- return response;
195
+ return JSON.parse(response);
193
196
  }
194
197
  /**
195
198
  * Parse a monero: URI into its components.
@@ -70,6 +70,15 @@ export interface SignedTransaction {
70
70
  signedTxHex: string;
71
71
  fee: string;
72
72
  }
73
+ /** Return type for broadcastTransaction. */
74
+ export interface BroadcastResult {
75
+ /**
76
+ * The transaction secret key, when the wallet can report it. The sender's
77
+ * only proof of payment: chosen at random while building the transaction,
78
+ * held only by the wallet that built it, and never recoverable later.
79
+ */
80
+ txKey?: string;
81
+ }
73
82
  /** Parsed Monero URI (parseUri result). */
74
83
  export interface ParsedUri {
75
84
  address: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-monero",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "React Native bindings for the monero-lwsf library",
5
5
  "homepage": "https://github.com/EdgeApp/react-native-monero",
6
6
  "repository": {