I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

If you are new here, please see some information on how to ask for support. Thank you!

I’m getting ready to replace my hacked up monero adapter with yours

dashed-slug.net Forums TurtleCoin Adapter extension support I’m getting ready to replace my hacked up monero adapter with yours

Viewing 15 posts - 1 through 15 (of 39 total)
  • Author
    Posts
  • #8730
    d3vnu77
    Participant

    I’m sure you aware of the platform I building with 2ACoin and I hacked up you monero adapter to make it work with 2ACoin. Now I’m wanting to replace it with yours… any tips on how I should go about doing that or anything I need to watch out for?

    Also Thanks so much for building it, it will be very helpful in my en-devours in the future.

    #8732
    alexg
    Keymaster

    Hello,

    There are no particular issues that I can think of.

    Check the FAQ under “I want to replace an adapter with another one.”

    Follow the instructions for the TurtleCoin adapter and let me know if you face any problems.

    Good luck!

    with regards

    #8848
    d3vnu77
    Participant

    Ok, going to be getting into this over the weekend.

    I’ve replaced the hacked (2ACoin) monero adapter with the turtlecoin adapter.

    I’ve entered my settings and I am getting the following errors: (Check attached screenshots)

    it should be noted to start the 2ACoind I used the following command:

    ./2ACoind --rpc-bind-ip 10.136.18.61 --rpc-bind-port 16666

    it should also be noted to start the “wallet-api” I used the following command:

    ./2acoin-service -w n2aa.org.wallet -p MySecretPass --rpc-password MySecretPass --bind-address 10.136.18.61 --bind-port 17777 --enable-cors "*"

    If I run the following code from the webserver:

    curl -d '{"jsonrpc":"2.0","id":1,"password":"MySecretPass","method":"getStatus","params":{}}' http://10.136.18.61:17777/json_rpc

    I get the following response:

    {"id":1,"jsonrpc":"2.0","result":{"blockCount":680636,"knownBlockCount":1,"lastBlockHash":"eb1ba42e17c498afd16db17de473db0860eeead76653121bfc3d0123b32f3435","localDaemonBlockCount":0,"peerCount":0}}

    Attachments:
    You must be logged in to view attached files.
    #8851
    alexg
    Keymaster

    Hello,

    Looks like you’re getting close!

    You would only get the error “Cannot open wallet %s until the admin provides the passphrase” if you had not entered a password in the field: “Wallet Settings -> Password”.

    This is the secret that encrypts/decrypts your wallet files. You need to keep this safe.

    When the plugin first creates a wallet file for the site, it uses this password. So, do this:

    1. Set a strong password for the wallet file in the coin adapter settings (Wallet Settings -> Password).

    2. Delete your wallet file (assuming it’s empty). The wallet file has a name beginning with your site’s domain and ends with the .wallet extension. It is probably in the same directory as your binaries.

    The plugin will now create a new wallet and encrypt it with the password you provided.

    #8852
    d3vnu77
    Participant

    The website already had a wallet, which is not empty. I see that it was trying to use a wallet called {domain}.org.wallet, so a I made a copy of the original wallet and renamed it it to your convention.

    I just switch everything back to the local server to make sure I could get it working that way first…

    Seems I’m getting different errors. Now that it accepted my passphrase.

    1. Same error on the connect.
    2. Wants to createthe wallet n2aa.org.wallet but is getting a 404.
    3. The Wallet RPC is saying:

    2020-Jul-16 00:17:00.023740 WARNING Requested url "/status" is not found
    2020-Jul-16 00:17:00.024564 WARNING Requested url "/wallet/create" is not found

    I definitely need to keep the same wallet/balances that I had before.

    #8853
    d3vnu77
    Participant

    Yea, so now I see if wants to create the wallet, I need to keep the old wallet, is that possible?

    #8854
    alexg
    Keymaster

    Not really. The adapter doesn’t allow your wallet file to not be encrypted. And having your wallet file encrypted is a really really good idea. If someone gains access to your wallet file but not your WordPress DB, they can not steal your users’ funds.

    Here’s what you could do:

    1. Enter a password in the plugin’s settings.
    2. Move the existing wallet in another directory and let the plugin create a new wallet file with the new passphrase.
    3. Get the cold storage deposit address for your new wallet, shown in “Wallets” -> “Cold Storage” -> “A2Coin” -> “Deposit”.
    4. Start your old (unencrypted) wallet and transfer all the funds to this address. The funds will now appear in the “hot wallet balance”.
    5. Go to “Wallets” -> “Adapters” -> “A2Coin” -> “Renew deposit addresses”. This will force all user deposit addresses to be refreshed from the new wallet.

    The only downside is that the old deposit addresses that users had will not work in the new wallet. This is why we force the plugin to re-create deposit addresses from the new wallet. If the users had saved these deposit addresses elsewhere and then they try to reuse them, the funds will go to your old wallet. i.e. they won’t be completely lost, but you could then transfer the funds to the new cold storage deposit address.

    Please let me know if you have any questions about this.

    with regards

    #8855
    d3vnu77
    Participant

    The wallet I have is encrypted already. I have the password for the encrypted wallet. Can we bypass the creation of the new wallet?

    #8856
    alexg
    Keymaster

    Yes, of course. I thought that your current wallet did not have a password.

    In that case, do this:

    1. rename your current wallet to n2aa.org.wallet
    2. enter the password in the “Wallet Settings” -> “Password” setting.
    3. click on “Wallets” -> “Adapters” -> “A2Coin” -> “Renew deposit addresses”.

    #8857
    d3vnu77
    Participant

    Yea, I’ve gotten to step 2, but still getting the errors in the screenshots

    Attachments:
    You must be logged in to view attached files.
    #8861
    d3vnu77
    Participant

    Also it seems after the 404 errors & “is not found” errors, the password gets reset… and I get the

    “Not responding: Cannot open wallet n2aa.org.wallet until the admin provides the passphrase” error as seen in the screen shots

    Attachments:
    You must be logged in to view attached files.
    #8865
    alexg
    Keymaster

    Hello,

    Not sure why this happens. Are the logs you show me from wallet-api? According to the documentation, wallet-api does not return error 404 for the /status endpoint. Could it be that you’re connecting to the blockchain daemon rather than the wallet-api?

    Additionally, the secret would get deleted after a while, if you haven’t set “Wallets” -> “Cron job” -> “Withdrawal Locks” -> “Time to retain withdrawal secrets” to 0.

    I’d recommend that you try with a new wallet and follow the installation instructions again. If this works, then we can look into replacing the wallet with your existing one.

    with regards

    #8885
    d3vnu77
    Participant

    I’m back an will be working on this today.

    I am assuming that the wallet-api is a variable for the turtlecoin variant that is being used. As 2acoin is stated using ./2acoin-service?

    Anyways, going to try with a new wallet as you suggested, will get back to you in a bit.

    #8886
    alexg
    Keymaster

    Hello,

    wallet-api is not a variable. It is a program that comes with TurtleCoin: https://turtlecoin.github.io/wallet-api-docs/

    It connects to the turtlecoind service to present, well, a wallet API!

    Does 2acoin not come with a similar program?

    #8887
    d3vnu77
    Participant

    Nope, looks like turtlecoin uses: ./wallet-api to start

    https://turtlecoin.github.io/wallet-api-docs/

    Is that going to affect me being that I start the RPC daemon with ./2acoin-service?

Viewing 15 posts - 1 through 15 (of 39 total)
  • You must be logged in to reply to this topic.