Author Topic: PYBITSHARES - Unlock Wallet - issue  (Read 2275 times)

0 Members and 1 Guest are viewing this topic.

Offline ccreg

  • Newbie
  • *
  • Posts: 2
    • View Profile
Ok sorry I got it !  :D
Crazy day,  I wondered so many concept! it's more clear ! Probably a little schema in the documentation could help noob (as I'm in bitshares/python).

I deleted the folder in my homedir and created a new wallet in python-bitshare!
Unlock work perfectly!
Happy to continue !

Many Thanks!

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
The password asked for when unlocking the wallet is independent of the account password. It is used to locally encrypt a wallet that contains all your keys and you chose it when you first created your wallet in!! python-bitshares!!

If you forgot the passphrase, have a backup of all your keys and want to start over, then delete the .local/shares/bitshares folder in your homedirectory

Offline ccreg

  • Newbie
  • *
  • Posts: 2
    • View Profile
Hi,

I would like to implement a trading bot...
I start to analyze different kind of solution (stakemachine, bitshare api cli_wallet,...) I have finally decided to study PYBITSHARES approach.

I succeeded to run some simple snippet based on Account class (on linux installation):
Code: [Select]
from bitshares import BitShares
import os
from bitshares.account import Account
account = Account("crypto-r")
print(account)
print(account.balances)

But I'm getting an issue when I run the following code to unlock mywallet:
Code: [Select]
from bitshares import BitShares

bitshares = BitShares(
            "wss://node.testnet.bitshares.eu",
                nobroadcast=False   # <<--- set this to False when you want to fire!
                )
#bitshares.wallet.create("myAccount")
bitshares.wallet.unlock("PASSPHRASE")
bitshares.wallet.addPrivateKey("5K.....U")

The code return the following error message:
Code: [Select]
    bitshares.wallet.unlock("PASSPHRASE")
  File "/root/.local/lib/python3.6/site-packages/bitshares-0.1.10-py3.6.egg/bitshares/wallet.py", line 115, in unlock
  File "/root/.local/lib/python3.6/site-packages/bitshares-0.1.10-py3.6.egg/bitshares/storage.py", line 395, in __init__
  File "/root/.local/lib/python3.6/site-packages/bitshares-0.1.10-py3.6.egg/bitshares/storage.py", line 407, in decryptEncryptedMaster
bitshares.exceptions.WrongMasterPasswordException

I'm sure I'm missing something "simple" but I m blocking on it for few hours... I coded it differently a lot of time on testnet and/or production node...

here is my question:


Does someone can help me to unlock my Wallet using PYBITSHARES?
My problem is to identify exactly which password or private key or WIF or ... I have to used as parameter to unlock function.
I'm using ubuntu 17.10.


Thanks,

« Last Edit: February 04, 2018, 07:25:37 pm by ccreg »