0

When I run the monerojs library method for wallet synchronization on my local testnet node, it takes too long to synchronize. Every time I run the code it's like it's re-syncing all over again. Reading on other Stack questions for other users who used monero-wallet-cli, one needs to use an exit method to not lose sync data.

From the monerojs documentation I can't find such a method (https://moneroecosystem.org/monero-javascript/MoneroWalletFull.html). I don't know if I'm just configuring the wallet wrong.

This is my code:

  let wallet = await monerojs.createWalletFull({
    networkType: MoneroNetworkType.TESTNET,
    password: "<passw>",
    mnemonic: "<Mnemonic>",
    serverUri: "http://127.0.0.1:28081",
    });
    

  const syncResult = await wallet.sync();
  console.log('Sync progress:', syncResult);

1 Answer 1

0

From the monerojs documentation I can't find such a method...

It's documented, see: https://moneroecosystem.org/monero-javascript/MoneroWallet.html#close

Ref:

(async) close(save)

Optionally save then close the wallet.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.