Wallet Get Balance

Discussion in 'Connectivity' started by Johnshpon3, Feb 21, 2016.

  1. 2017/12/15 - Decred v1.1.2 released! → Release Notes  → Downloads
  1. Johnshpon3

    Johnshpon3 Member

    Dec 25, 2015
    210
    86
    Male
    Telecommunications
    Slovenia
    I think I stuck (again). After I couldn't open my wallet because can not find matching passwords, I deleted and created new one from same seed and with public passphrase.
    Now it's up and working but when I run command --wallet getbalance I get back 401 Unauthorized, if I include command --walletpass 'xxxxxx' I got back: unknown flag 'walletpass'
    I follow tutorials and it's worked with testnet.
    I think I was doing before same commands and it works.
     
  2. sw1

    sw1 Jr. Member

    Dec 31, 2015
    90
    39
    Male
    Sydney, Australia
    #2 sw1, Feb 21, 2016
    Last edited: Feb 21, 2016


    try this command to start wallet:-
    dcrwallet --username [walletuser] --password [wallet private key] --dcrdusername=[rpcuser] --dcrdpassword=[rpcpass]

    If you have a public key it will look like this:-

    dcrwallet --username [walletuser] --password [wallet private key] --walletpass [wallet public key] --dcrdusername=[rpcuser] --dcrdpassword=[rpcpass]

    the rpcuser/rpcpass are what you set to launch the daemon.

    That should auuthenticate you with the daemon and rpc certs.

    Also check user/passwords etc do not have typo's when running dcrctl queries
     
  3. Johnshpon3

    Johnshpon3 Member

    Dec 25, 2015
    210
    86
    Male
    Telecommunications
    Slovenia
    yes, It was done like this.
    Than I opened new CMD eindow and run:
    dcrctl -u 'WalletUserName' -P 'WalletPassword' --walletpass 'WalletPublicPassphrase' --wallet getbalance
    And answer is: unknown flag 'walletpas'
    Must be something wrong with my command, but I could not figure it what.
     
  4. sw1

    sw1 Jr. Member

    Dec 31, 2015
    90
    39
    Male
    Sydney, Australia

    you dont need the walletpass flag to check balance

    dcrctl -u xxx -P xxx --wallet getbalance

    Thats all you need.
     
  5. Johnshpon3

    Johnshpon3 Member

    Dec 25, 2015
    210
    86
    Male
    Telecommunications
    Slovenia
    Yup, in that case I got: 401 Unauthorized
     
  6. sw1

    sw1 Jr. Member

    Dec 31, 2015
    90
    39
    Male
    Sydney, Australia
    The command is fine.

    You have a user/password mismatch or typo when launching wallet.

    Only other thing to check is when you start the wallet... Make sure it has no TLS or RPC errors in daemon when launching.

    If you have any errors post them and I'll try figure it out for you.

    The commands to launch wallet and getbalance I posted above work fine for me.
     
  7. sw1

    sw1 Jr. Member

    Dec 31, 2015
    90
    39
    Male
    Sydney, Australia
    Bed time for me now mate.

    Best thing would be to close down deamon/wallet etc and start again step by step.

    run daemon with dcrd -u "rpcuser" -P "rpcpass" -open new terminal

    start wallet as above : dcrwallet --username [walletuser] --password [wallet private key] --walletpass [wallet public key] --dcrdusername=[rpcuser] --dcrdpassword=[rpcpass] = open new terminal

    Let wallet sync.

    Run getbalance command dcrctl -u "walletuser" -P "walletprivatekey" --wallet getbalance
     
  8. Johnshpon3

    Johnshpon3 Member

    Dec 25, 2015
    210
    86
    Male
    Telecommunications
    Slovenia
    No TLS or RPC errors in daemon when launching wallet. This is not working for me since day1. With testnet I have no problems. It really looks like windows does not like command line.
    I think it's time for me to quit DCR, I'm just not good enough with this. :confused:
    Thanks anyway for helping me.
     
  9. sw1

    sw1 Jr. Member

    Dec 31, 2015
    90
    39
    Male
    Sydney, Australia
    make sure you are removing --testnet from any mainnet commands.

    Im happy to help you out more tomorrow, but got work in 5 hours so need to sleep now.

    Dont give up! We will get it working for you :)
     
  10. Johnshpon3

    Johnshpon3 Member

    Dec 25, 2015
    210
    86
    Male
    Telecommunications
    Slovenia
    Ok, thanks a lot. Somehow I manage to start daemon and make my wallet working. I picked-up somwhere that daemon should be started with --rpcuser and --rpcpass. Now I made .bat files for starting daemon and wallet hoping that from now will work :).
    Tomorrow I will open my Airdrop wallet and begin cofiguring it for PoS on laptop.
    Thanks again, mate. When I will visit beautiful land DownUnder again I will invite you to have few beers in local pub :p.
     
  11. sw1

    sw1 Jr. Member

    Dec 31, 2015
    90
    39
    Male
    Sydney, Australia
    Glad you got it going! Let me know if you need any more help.
    I'll look forward to the beers :)
     
    Johnshpon3 likes this.
  12. Johnshpon3

    Johnshpon3 Member

    Dec 25, 2015
    210
    86
    Male
    Telecommunications
    Slovenia
    Today I downloaded v0.0.5 software and after my pool was down I try to start solo minig. I was up and mining in about 5 min. Everything was fast and smooth, before I can not start solo mining, it was full of errors everywhere.
    So, software is going ahead with huge steps. Thanks to devs and other people who helping with develepement.
    And, of course, my respect to sw1 for help and encouragement.
    (Beer it is ;))
     
    sambiohazard and sw1 like this.

Share This Page