edge-core-js 2.43.6 → 2.44.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.
|
@@ -147,6 +147,23 @@ export const makeMemoryWalletInner = async (
|
|
|
147
147
|
syncNetworkTask.start({ wait: false })
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
+
const otherMethods = {}
|
|
151
|
+
if (engine.otherMethods != null) {
|
|
152
|
+
for (const name of Object.keys(engine.otherMethods)) {
|
|
153
|
+
const method = engine.otherMethods[name]
|
|
154
|
+
if (typeof method !== 'function') continue
|
|
155
|
+
otherMethods[name] = method
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
if (engine.otherMethodsWithKeys != null) {
|
|
159
|
+
for (const name of Object.keys(engine.otherMethodsWithKeys)) {
|
|
160
|
+
const method = engine.otherMethodsWithKeys[name]
|
|
161
|
+
if (typeof method !== 'function') continue
|
|
162
|
+
otherMethods[name] = (...args) => method(walletInfo.keys, ...args)
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
bridgifyObject(otherMethods)
|
|
166
|
+
|
|
150
167
|
const out = bridgifyObject({
|
|
151
168
|
watch: watchMethod,
|
|
152
169
|
get balanceMap() {
|
|
@@ -196,6 +213,8 @@ export const makeMemoryWalletInner = async (
|
|
|
196
213
|
},
|
|
197
214
|
async saveTx() {},
|
|
198
215
|
|
|
216
|
+
otherMethods,
|
|
217
|
+
|
|
199
218
|
async close() {
|
|
200
219
|
log.warn('killing memory wallet')
|
|
201
220
|
_optionalChain([syncNetworkTask, 'optionalAccess', _3 => _3.stop, 'call', _4 => _4()])
|
package/lib/flow/types.js
CHANGED
|
@@ -1481,6 +1481,7 @@ export type EdgeMemoryWallet = {
|
|
|
1481
1481
|
+signTx: (tx: EdgeTransaction) => Promise<EdgeTransaction>;
|
|
1482
1482
|
+broadcastTx: (tx: EdgeTransaction) => Promise<EdgeTransaction>;
|
|
1483
1483
|
+saveTx: (tx: EdgeTransaction) => Promise<void>;
|
|
1484
|
+
+otherMethods: EdgeOtherMethods;
|
|
1484
1485
|
+close: () => Promise<void>;
|
|
1485
1486
|
|
|
1486
1487
|
/** @deprecated Use syncStatus */
|
package/lib/node/index.js
CHANGED
|
@@ -9731,6 +9731,22 @@ const makeMemoryWalletInner = async (ai, config, walletType, opts = {}) => {
|
|
|
9731
9731
|
wait: false
|
|
9732
9732
|
});
|
|
9733
9733
|
}
|
|
9734
|
+
const otherMethods = {};
|
|
9735
|
+
if (engine.otherMethods != null) {
|
|
9736
|
+
for (const name of Object.keys(engine.otherMethods)) {
|
|
9737
|
+
const method = engine.otherMethods[name];
|
|
9738
|
+
if (typeof method !== 'function') continue;
|
|
9739
|
+
otherMethods[name] = method;
|
|
9740
|
+
}
|
|
9741
|
+
}
|
|
9742
|
+
if (engine.otherMethodsWithKeys != null) {
|
|
9743
|
+
for (const name of Object.keys(engine.otherMethodsWithKeys)) {
|
|
9744
|
+
const method = engine.otherMethodsWithKeys[name];
|
|
9745
|
+
if (typeof method !== 'function') continue;
|
|
9746
|
+
otherMethods[name] = (...args) => method(walletInfo.keys, ...args);
|
|
9747
|
+
}
|
|
9748
|
+
}
|
|
9749
|
+
yaob.bridgifyObject(otherMethods);
|
|
9734
9750
|
const out = yaob.bridgifyObject({
|
|
9735
9751
|
watch: yaob.watchMethod,
|
|
9736
9752
|
get balanceMap() {
|
|
@@ -9769,6 +9785,7 @@ const makeMemoryWalletInner = async (ai, config, walletType, opts = {}) => {
|
|
|
9769
9785
|
return await engine.broadcastTx(tx, unsafeBroadcastTx ? privateKeys : undefined);
|
|
9770
9786
|
},
|
|
9771
9787
|
async saveTx() {},
|
|
9788
|
+
otherMethods,
|
|
9772
9789
|
async close() {
|
|
9773
9790
|
log.warn('killing memory wallet');
|
|
9774
9791
|
syncNetworkTask?.stop();
|
package/lib/types/types.js
CHANGED
package/package.json
CHANGED
package/src/types/types.ts
CHANGED
|
@@ -1473,6 +1473,7 @@ export interface EdgeMemoryWallet {
|
|
|
1473
1473
|
readonly signTx: (tx: EdgeTransaction) => Promise<EdgeTransaction>
|
|
1474
1474
|
readonly broadcastTx: (tx: EdgeTransaction) => Promise<EdgeTransaction>
|
|
1475
1475
|
readonly saveTx: (tx: EdgeTransaction) => Promise<void>
|
|
1476
|
+
readonly otherMethods: EdgeOtherMethods
|
|
1476
1477
|
readonly close: () => Promise<void>
|
|
1477
1478
|
|
|
1478
1479
|
/** @deprecated Use syncStatus */
|