react-native-monero 0.2.0 → 0.4.0-beta.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 +9 -0
- package/android/src/main/jniLibs/arm64-v8a/librnmonero.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/librnmonero.so +0 -0
- package/ios/MoneroModule.xcframework/Info.plist +5 -5
- package/ios/MoneroModule.xcframework/ios-arm64/libmonero-module.a +0 -0
- package/ios/MoneroModule.xcframework/ios-arm64_x86_64-simulator/libmonero-module.a +0 -0
- package/lib/src/CppBridge.d.ts +25 -5
- package/lib/src/CppBridge.js +32 -5
- package/lib/src/types.d.ts +8 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- added: `getWalletStatus` reports a `refreshed` flag, true once the wallet has completed its first server refresh (and so knows its real balance and spendable outputs). LWS wallets report seed heights that look synced before then, so treat a wallet as synced only when `refreshed` is true.
|
|
6
|
+
- fixed: LWS wallets can spend and receive over the Nym mixnet. The lwsf RPC timeout of 5 seconds was too short for a mixnet round-trip, so single-shot spend and receive calls failed; the Nym path now uses a 120-second budget.
|
|
7
|
+
|
|
8
|
+
## 0.3.0 (2026-07-03)
|
|
9
|
+
|
|
10
|
+
- added: `getPendingTransactions`, a paged view of the not-yet-mined transactions. `getAllTransactions` sorts pending entries behind all confirmed ones, so a cursor-based scan of confirmed history never reaches them; this exposes the pending set directly.
|
|
11
|
+
- fixed: LWS wallets sync again. The 0.2.0 https change passed `use_ssl=true` to `wallet->init` for https daemons; wallet2 (monerod) ignores that flag, but lwsf honors it and switches from tolerant `ssl_support_autodetect` to `ssl_support_enabled`, whose certificate verification always fails on iOS/Android (no OpenSSL system CA store in the app sandbox). Every LWS connection was silently dropped at the TLS handshake, so LWS wallets polled forever at height 0 with no transactions or balance. Revert to `use_ssl=false` (TLS still autodetected from the `https://` scheme); the Nym scheme fix is unaffected since it derives https from the port inside NymHttpClient.
|
|
12
|
+
- fixed: Monero Full Node (monerod) sends no longer fail with "Failed to load transaction from file". `createTransaction` now retains the signed transaction natively and `broadcastTransaction` commits it directly, instead of saving it to a file and reloading it: on the full-node (wallet2) backend `save_tx` writes an unsigned tx set while `submitTransaction`'s `load_tx` requires a signed one, so the file round-trip always failed. Retained transactions are capped at 50 per wallet (oldest disposed first) and cleared when the wallet closes. Method signatures are unchanged, but the semantics narrow: `signedTxHex` is now an opaque token (the txid) identifying the retained transaction rather than serialized bytes, a signed transaction can no longer be broadcast after its wallet closes or the app restarts (`broadcastTransaction` reports that it must be recreated), and payments the wallet would split into multiple on-chain transactions are rejected at creation so a broadcast is atomic.
|
|
13
|
+
|
|
5
14
|
## 0.2.0 (2026-06-29)
|
|
6
15
|
|
|
7
16
|
- changed: Switch the package manager from yarn to npm (package-lock.json + `.npmrc` legacy-peer-deps), matching the other Edge currency repos.
|
|
Binary file
|
|
Binary file
|
|
@@ -8,32 +8,32 @@
|
|
|
8
8
|
<key>BinaryPath</key>
|
|
9
9
|
<string>libmonero-module.a</string>
|
|
10
10
|
<key>LibraryIdentifier</key>
|
|
11
|
-
<string>ios-
|
|
11
|
+
<string>ios-arm64_x86_64-simulator</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>
|
|
17
18
|
</array>
|
|
18
19
|
<key>SupportedPlatform</key>
|
|
19
20
|
<string>ios</string>
|
|
21
|
+
<key>SupportedPlatformVariant</key>
|
|
22
|
+
<string>simulator</string>
|
|
20
23
|
</dict>
|
|
21
24
|
<dict>
|
|
22
25
|
<key>BinaryPath</key>
|
|
23
26
|
<string>libmonero-module.a</string>
|
|
24
27
|
<key>LibraryIdentifier</key>
|
|
25
|
-
<string>ios-
|
|
28
|
+
<string>ios-arm64</string>
|
|
26
29
|
<key>LibraryPath</key>
|
|
27
30
|
<string>libmonero-module.a</string>
|
|
28
31
|
<key>SupportedArchitectures</key>
|
|
29
32
|
<array>
|
|
30
33
|
<string>arm64</string>
|
|
31
|
-
<string>x86_64</string>
|
|
32
34
|
</array>
|
|
33
35
|
<key>SupportedPlatform</key>
|
|
34
36
|
<string>ios</string>
|
|
35
|
-
<key>SupportedPlatformVariant</key>
|
|
36
|
-
<string>simulator</string>
|
|
37
37
|
</dict>
|
|
38
38
|
</array>
|
|
39
39
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
Binary file
|
package/lib/src/CppBridge.d.ts
CHANGED
|
@@ -82,9 +82,27 @@ export declare class CppBridge {
|
|
|
82
82
|
* @returns Paginated transactions with metadata
|
|
83
83
|
*/
|
|
84
84
|
getAllTransactions(walletId: string, page: number, pageSize: number, sort?: 'asc' | 'desc'): Promise<TransactionsPage>;
|
|
85
|
+
/**
|
|
86
|
+
* Get not-yet-mined transactions with pagination. Same shape as
|
|
87
|
+
* getAllTransactions, filtered to pending entries. Pending transactions sort
|
|
88
|
+
* behind all confirmed ones in getAllTransactions, so a cursor-based scan of
|
|
89
|
+
* confirmed history never reaches them; use this to read the pending set
|
|
90
|
+
* directly. The set can include entries the backend reports as permanently
|
|
91
|
+
* failed (isFailed: true); callers decide how to label those.
|
|
92
|
+
* @param walletId - Unique identifier for the wallet
|
|
93
|
+
* @param page - Page number (0-indexed)
|
|
94
|
+
* @param pageSize - Number of transactions per page
|
|
95
|
+
* @returns Paginated pending transactions with metadata
|
|
96
|
+
*/
|
|
97
|
+
getPendingTransactions(walletId: string, page: number, pageSize: number): Promise<TransactionsPage>;
|
|
85
98
|
/**
|
|
86
99
|
* Create a transaction (supports multiple recipients).
|
|
87
|
-
* The transaction is created and signed but not broadcast yet
|
|
100
|
+
* The transaction is created and signed but not broadcast yet: it is retained
|
|
101
|
+
* natively for a later broadcastTransaction call. At most 50 transactions are
|
|
102
|
+
* retained per wallet (oldest disposed first; broadcasting an evicted one
|
|
103
|
+
* reports that it must be recreated), and all are released when the wallet
|
|
104
|
+
* closes. Payments the wallet would split into multiple on-chain
|
|
105
|
+
* transactions are rejected, so a later broadcast is atomic.
|
|
88
106
|
* @param walletId - Unique identifier for the wallet
|
|
89
107
|
* @param recipients - Array of recipients with addresses and amounts (atomic units)
|
|
90
108
|
* @param priority - Transaction priority (0=Default, 1=Low, 2=Medium, 3=High)
|
|
@@ -92,11 +110,13 @@ export declare class CppBridge {
|
|
|
92
110
|
*/
|
|
93
111
|
createTransaction(walletId: string, recipients: Recipient[], priority: TransactionPriority): Promise<SignedTransaction>;
|
|
94
112
|
/**
|
|
95
|
-
* Broadcast a previously created transaction.
|
|
113
|
+
* Broadcast a previously created transaction. `signedTx` identifies the
|
|
114
|
+
* natively retained transaction to broadcast.
|
|
96
115
|
* @param walletId - Unique identifier for the wallet
|
|
97
|
-
* @param signedTx - The
|
|
98
|
-
* @returns
|
|
99
|
-
* @throws Error if
|
|
116
|
+
* @param signedTx - The signedTxHex returned by createTransaction
|
|
117
|
+
* @returns "success"
|
|
118
|
+
* @throws Error if the transaction is no longer retained (evicted, or the
|
|
119
|
+
* wallet was closed since creation) or the broadcast fails
|
|
100
120
|
*/
|
|
101
121
|
broadcastTransaction(walletId: string, signedTx: string): Promise<string>;
|
|
102
122
|
/**
|
package/lib/src/CppBridge.js
CHANGED
|
@@ -129,9 +129,34 @@ class CppBridge {
|
|
|
129
129
|
]);
|
|
130
130
|
return JSON.parse(response);
|
|
131
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Get not-yet-mined transactions with pagination. Same shape as
|
|
134
|
+
* getAllTransactions, filtered to pending entries. Pending transactions sort
|
|
135
|
+
* behind all confirmed ones in getAllTransactions, so a cursor-based scan of
|
|
136
|
+
* confirmed history never reaches them; use this to read the pending set
|
|
137
|
+
* directly. The set can include entries the backend reports as permanently
|
|
138
|
+
* failed (isFailed: true); callers decide how to label those.
|
|
139
|
+
* @param walletId - Unique identifier for the wallet
|
|
140
|
+
* @param page - Page number (0-indexed)
|
|
141
|
+
* @param pageSize - Number of transactions per page
|
|
142
|
+
* @returns Paginated pending transactions with metadata
|
|
143
|
+
*/
|
|
144
|
+
async getPendingTransactions(walletId, page, pageSize) {
|
|
145
|
+
const response = await this.module.callMonero('getPendingTransactions', [
|
|
146
|
+
walletId,
|
|
147
|
+
page.toString(),
|
|
148
|
+
pageSize.toString()
|
|
149
|
+
]);
|
|
150
|
+
return JSON.parse(response);
|
|
151
|
+
}
|
|
132
152
|
/**
|
|
133
153
|
* Create a transaction (supports multiple recipients).
|
|
134
|
-
* The transaction is created and signed but not broadcast yet
|
|
154
|
+
* The transaction is created and signed but not broadcast yet: it is retained
|
|
155
|
+
* natively for a later broadcastTransaction call. At most 50 transactions are
|
|
156
|
+
* retained per wallet (oldest disposed first; broadcasting an evicted one
|
|
157
|
+
* reports that it must be recreated), and all are released when the wallet
|
|
158
|
+
* closes. Payments the wallet would split into multiple on-chain
|
|
159
|
+
* transactions are rejected, so a later broadcast is atomic.
|
|
135
160
|
* @param walletId - Unique identifier for the wallet
|
|
136
161
|
* @param recipients - Array of recipients with addresses and amounts (atomic units)
|
|
137
162
|
* @param priority - Transaction priority (0=Default, 1=Low, 2=Medium, 3=High)
|
|
@@ -150,11 +175,13 @@ class CppBridge {
|
|
|
150
175
|
return JSON.parse(response);
|
|
151
176
|
}
|
|
152
177
|
/**
|
|
153
|
-
* Broadcast a previously created transaction.
|
|
178
|
+
* Broadcast a previously created transaction. `signedTx` identifies the
|
|
179
|
+
* natively retained transaction to broadcast.
|
|
154
180
|
* @param walletId - Unique identifier for the wallet
|
|
155
|
-
* @param signedTx - The
|
|
156
|
-
* @returns
|
|
157
|
-
* @throws Error if
|
|
181
|
+
* @param signedTx - The signedTxHex returned by createTransaction
|
|
182
|
+
* @returns "success"
|
|
183
|
+
* @throws Error if the transaction is no longer retained (evicted, or the
|
|
184
|
+
* wallet was closed since creation) or the broadcast fails
|
|
158
185
|
*/
|
|
159
186
|
async broadcastTransaction(walletId, signedTx) {
|
|
160
187
|
const response = await this.module.callMonero('broadcastTransaction', [
|
package/lib/src/types.d.ts
CHANGED
|
@@ -20,6 +20,14 @@ export interface WalletStatus {
|
|
|
20
20
|
networkHeight: number;
|
|
21
21
|
balance: string;
|
|
22
22
|
unlockedBalance: string;
|
|
23
|
+
/**
|
|
24
|
+
* True once at least one server refresh has completed for this wallet. LWS
|
|
25
|
+
* wallets seed syncedHeight == networkHeight from the stored scan height
|
|
26
|
+
* until their first refresh, so heights alone cannot tell "caught up" from
|
|
27
|
+
* "has not looked yet"; treat the wallet as synced/spendable only when this
|
|
28
|
+
* is true.
|
|
29
|
+
*/
|
|
30
|
+
refreshed: boolean;
|
|
23
31
|
}
|
|
24
32
|
/** Transaction direction. */
|
|
25
33
|
export type TransactionDirection = 0 | 1;
|