edge-currency-monero 2.0.1 → 2.2.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 +8 -0
- package/lib/MoneroEngine.js +19 -8
- package/lib/moneroInfo.js +2 -1
- package/lib/moneroTypes.js +3 -1
- package/lib/react-native/edge-currency-monero.ts +449 -346
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 2.2.0 (2026-01-27)
|
|
6
|
+
|
|
7
|
+
- added: Add `networkPrivacy` user setting to enable privacy-enhanced fetch requests via NYM Mixfetch.
|
|
8
|
+
|
|
9
|
+
## 2.1.0 (2026-01-15)
|
|
10
|
+
|
|
11
|
+
- changed: Reduce "high" fee level mapping from priority 4 to 3.
|
|
12
|
+
|
|
5
13
|
## 2.0.1 (2025-11-17)
|
|
6
14
|
|
|
7
15
|
- fixed: Handle REST responses from monero-lws.
|
package/lib/MoneroEngine.js
CHANGED
|
@@ -26,6 +26,7 @@ var _biggystring = require('biggystring');
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
+
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
var _types = require('edge-core-js/types');
|
|
@@ -85,6 +86,7 @@ const PRIMARY_CURRENCY_TOKEN_ID = null
|
|
|
85
86
|
|
|
86
87
|
|
|
87
88
|
|
|
89
|
+
|
|
88
90
|
__init() {this.loginPromise = null}
|
|
89
91
|
|
|
90
92
|
constructor(
|
|
@@ -109,13 +111,6 @@ const PRIMARY_CURRENCY_TOKEN_ID = null
|
|
|
109
111
|
this.walletId = walletInfo.id
|
|
110
112
|
this.currencyInfo = _moneroInfo.currencyInfo
|
|
111
113
|
this.currencyTools = tools
|
|
112
|
-
this.myMoneroApi = new (0, _MyMoneroApi.MyMoneroApi)(tools.cppBridge, {
|
|
113
|
-
apiKey: initOptions.edgeApiKey,
|
|
114
|
-
apiServer: networkInfo.defaultServer,
|
|
115
|
-
fetch: env.io.fetch,
|
|
116
|
-
nettype: networkInfo.nettype
|
|
117
|
-
})
|
|
118
|
-
this.seenTxCheckpoint = _moneroTypes.asSeenTxCheckpoint.call(void 0, opts.seenTxCheckpoint)
|
|
119
114
|
|
|
120
115
|
// this.customTokens = []
|
|
121
116
|
this.timers = {}
|
|
@@ -124,6 +119,22 @@ const PRIMARY_CURRENCY_TOKEN_ID = null
|
|
|
124
119
|
..._moneroInfo.currencyInfo.defaultSettings,
|
|
125
120
|
..._moneroTypes.asMoneroUserSettings.call(void 0, userSettings)
|
|
126
121
|
}
|
|
122
|
+
|
|
123
|
+
this.engineFetch = async (uri, init) => {
|
|
124
|
+
const { networkPrivacy } = this.currentSettings
|
|
125
|
+
return await this.io.fetch(uri, {
|
|
126
|
+
...(networkPrivacy === 'nym' ? { privacy: 'nym' } : {}),
|
|
127
|
+
...init
|
|
128
|
+
})
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
this.myMoneroApi = new (0, _MyMoneroApi.MyMoneroApi)(tools.cppBridge, {
|
|
132
|
+
apiKey: initOptions.edgeApiKey,
|
|
133
|
+
apiServer: networkInfo.defaultServer,
|
|
134
|
+
fetch: this.engineFetch,
|
|
135
|
+
nettype: networkInfo.nettype
|
|
136
|
+
})
|
|
137
|
+
this.seenTxCheckpoint = _moneroTypes.asSeenTxCheckpoint.call(void 0, opts.seenTxCheckpoint)
|
|
127
138
|
if (
|
|
128
139
|
this.currentSettings.enableCustomServers &&
|
|
129
140
|
this.currentSettings.moneroLightwalletServer != null
|
|
@@ -802,7 +813,7 @@ const PRIMARY_CURRENCY_TOKEN_ID = null
|
|
|
802
813
|
|
|
803
814
|
function translateFee(fee) {
|
|
804
815
|
if (fee === 'low') return 1
|
|
805
|
-
if (fee === 'high') return
|
|
816
|
+
if (fee === 'high') return 3
|
|
806
817
|
return 2
|
|
807
818
|
}
|
|
808
819
|
|
package/lib/moneroInfo.js
CHANGED
package/lib/moneroTypes.js
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
|
|
14
15
|
var _cleaners = require('cleaners');
|
|
15
16
|
|
|
16
17
|
|
|
@@ -26,7 +27,8 @@ var _cleaners = require('cleaners');
|
|
|
26
27
|
|
|
27
28
|
const asMoneroUserSettings = _cleaners.asObject.call(void 0, {
|
|
28
29
|
enableCustomServers: _cleaners.asMaybe.call(void 0, _cleaners.asBoolean, false),
|
|
29
|
-
moneroLightwalletServer: _cleaners.asMaybe.call(void 0, _cleaners.asString)
|
|
30
|
+
moneroLightwalletServer: _cleaners.asMaybe.call(void 0, _cleaners.asString),
|
|
31
|
+
networkPrivacy: _cleaners.asOptional.call(void 0, _cleaners.asValue.call(void 0, 'none', 'nym'), 'none')
|
|
30
32
|
}); exports.asMoneroUserSettings = asMoneroUserSettings
|
|
31
33
|
|
|
32
34
|
|