Comments (8)
Thanks for pointing out the issue with MoneroError. That's fixed in 1e29000.
Does this have issues when the Library is called via Workers?
By default, the library will run all WASM wallets in a single web worker off the main thread. I believe running multiple wallets in multiple workers runs into the issue of concurrent daemon requests interfering with each other, but maybe there is a way around that.
from monero-ts.
I did what you said and let the WASMs run on their own and not to a specified Worker. Thanks a ton.
Another quick question: Why does Memory object out of etc whatever will display when you are attempting to open/create two wallets at once
from monero-ts.
RuntimeError: memory access out of bounds
Here's the issue when trying to open two wallets at once
from monero-ts.
Why does Memory object out of etc whatever will display when you are attempting to open/create two wallets at once
I'm not able to reproduce an error by creating or opening multiple wallets at once, with or without await. Can you elaborate how you're creating it?
from monero-ts.
Probably due to my weak computer so not particularly sure regarding that one. But what I basically did was have an array of at least 2 wallets with { mnemonic, heght} then attempt to recover it by looping like
// Sample code
wallets.map( wallet => {
const walletConfig = {
path: pathjs.join(walletsDir, mnemonicHash),
mnemonic: wallet.mnemonic,
restoreHeight: wallet.height
};
monerojs.createWalletWasm( walletConfig)
}):
^ Kind of pseudo coding here but I think you get the idea
Then the memory access out of bounds will display.
from monero-ts.
While we are at it a quick question:
I am currently doing like a way to open a wallet first then save it later to a specified path as I intend to use the hashed mnemonic of that wallet as the filename of the WASMs to be saved.
I was thinking of doing either:
a.) Create wallet, get mnemonic, close without saving then restore (in which I think it's not efficient but willing to be corrected)
b.) Create wallet, get mnemonic, set path, save using the path. (in which I was checking the code is not possible for now?) and this is my first choice but is there a way to set a path after a wallet WASM is created??
c.) Create wallet with path, get mnemonic, hash mnemonic, close and save WASM, rename all files related to that WASM (wasm, wasm.keys, wasm.address.txt)
Which would be the optimal / possible route to take for now? Thanks a ton @woodser
from monero-ts.
I'm still not able to reproduce the memory access out of bounds error. monerojs.createWalletWasm(...)
returns a promise which needs to be awaited/resolved before the wallet is fully initialized. Perhaps that's the problem?
I added support for MoneroWalletWasm.moveTo(path) (committed to master) which can save the wallet after being created in-memory. Hope that resolves your issue?
from monero-ts.
Closing this since the original issue is resolved. Please open another issue if further help is needed.
from monero-ts.
Related Issues (20)
- cannot use it with yarn 2+ due to @babel/runtime dependency HOT 1
- Transaction hash of signed transaction hex HOT 2
- npm package version outdated HOT 2
- Browser wallet fails to connect to remote daemon. HOT 7
- Addressing Moderate Security Vulnerabilities in Dependencies HOT 1
- node: bad option: --experimental-wasm-threads HOT 2
- Path not found for MoneroWebWorker.js HOT 4
- Type-docs page is missing entirely HOT 2
- Can't use openWalletFull together with a ConnectionManager HOT 4
- Errors swallowed in onOutputReceived and addListener HOT 1
- rpc calls create unresolved timeouts/promises until HttpClient.DEFAULT_TIMEOUT as such jest tests warning HOT 4
- unable to run multiple MoneroUtils.getIntegratedAddress in parallel HOT 1
- Broken links in documentation HOT 1
- getBalances doc is not correct HOT 2
- Can't open wallet by keys HOT 3
- Failed to parse URL HOT 17
- Monero-ts in NextJS dev server leads to hangup HOT 9
- MoneroWalletKeys.createSubaddress() not supported HOT 1
- Bounty system test [0.1 XMR] HOT 1
- Remove --no-experimental-fetch flag HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monero-ts.