Git Product home page Git Product logo

Comments (7)

james-mou avatar james-mou commented on July 30, 2024 1

export NODE_OPTIONS=--openssl-legacy-provider worked, you can close this issue now, thanks.

from monero-ts.

woodser avatar woodser commented on July 30, 2024

If you want to derive arbitrary subaddresses instead of the wallet auto-tracking "new" subaddresses (based on wallet2), you should use the keys-only wallet. For example:

let wallet = await moneroTs.createWalletKeys({...}); // fully in-memory
let mySubaddress = await wallet.getAddress(myAccountIdx, mySubaddressIdx);

I get Error [TypeError]: Failed to parse URL, and adding "--no-experimental-fetch" on the node command does NOT fix it

Please provide more details about your environment or better, open a new issue to track this.

is createWalletFull creating or loading a wallet

createWalletFull creates a new wallet, which is fully compatible to load with the library, monero-wallet-rpc, or the CLI.

Alternatively, openWalletFull opens a wallet, which was previously created from the library, monero-wallet-rpc, or CLI.

moneroTs.connectToWalletRpc merely connects to a monero-wallet-rpc server which must have created or loaded a wallet, again fully compatible.

Hope this helps.

from monero-ts.

james-mou avatar james-mou commented on July 30, 2024

Thanks for the prompt reply, createWalletKeys sounds promising, I will try it out and report back ASAP.

from monero-ts.

james-mou avatar james-mou commented on July 30, 2024

createWalletKeys gives the same error:

[0] Error [TypeError]: Failed to parse URL from /code/src/monero-test/node_modules/monero-ts/dist/dist/monero_wallet_keys.wasm
[0] at LibraryUtils.deserializeError (/code/src/monero-test/node_modules/monero-ts/dist/src/main/ts/common/LibraryUtils.js:253:106)
[0] at LibraryUtils.invokeWorker (/code/src/monero-test/node_modules/monero-ts/dist/src/main/ts/common/LibraryUtils.js:242:26)
[0] at async MoneroWalletKeysProxy.createWallet (/code/src/monero-test/node_modules/monero-ts/dist/src/main/ts/wallet/MoneroWalletKeys.js:381:5)
[0] at async MoneroWalletKeys.createWallet (/code/src/monero-test/node_modules/monero-ts/dist/src/main/ts/wallet/MoneroWalletKeys.js:63:25)
[0] at async MoneroPaymentEngine.connectRPC (file:///code/src/monero-test/dist/order/moneroService.js:47:35)
[0] Worker error: TypeError: Failed to parse URL from /code/src/monero-test/node_modules/monero-ts/dist/dist/monero_wallet_keys.wasm

my environment:

❯ node --version
v20.11.1

OS: linux, kernel 6.1.53

this is the code, which URL is it talking about? the rpc server?

  this.readonlyWallet = await MoneroTs.createWalletKeys({
    path: DEFAULT_WALLET_NAME,
    networkType: MoneroTs.MoneroNetworkType.MAINNET,
    primaryAddress: connectionInfo.mainAddress,
    privateViewKey: connectionInfo.privateViewKey,

    server: {
      uri: `http://127.0.0.1:${RPC_PORT}`,
      username: RPC_USERNAME,
      password: RPC_PASSWORD,
    },
  });

from monero-ts.

james-mou avatar james-mou commented on July 30, 2024

one more question, I kind of feel monero-wallet-rpc is probably the least solid part of the whole monero project, and monerod does have a low level rpc interface, if all I want to do is to generate sub addresses and monitor incoming transfers, is it possible to completely cut out monero-wallet-rpc and go monero-ts ==> monerod?

from monero-ts.

woodser avatar woodser commented on July 30, 2024

which URL is it talking about? the rpc server?

The URL refers to loading the .wasm files, so you can run a wallet locally which connects directly to monerod, instead of using the monero-wallet-rpc server at all.

is it possible to completely cut out monero-wallet-rpc and go monero-ts ==> monerod?

Yes, we just need to load those .wasm files for local wallet functionality.

from monero-ts.

woodser avatar woodser commented on July 30, 2024

I'm not able to recreate the "Failed to parse URL" error on Linux, node v20, while passing the --no-experimental-fetch. Are you sure you're passing that flag to node correctly?

Shot in the dark, but you could also try this:
export NODE_OPTIONS=--openssl-legacy-provider

If neither of those work, I recommend opening a new issue for this error, describing your setup in detail, ideally with some code we can run to recreate.

from monero-ts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.