-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cardano-wallet: create/restore a new wallet error #2890
Comments
I just had the same issue and couldn't find any (readable) docs on this. Using this package and based on the snippet in the readme, I could generate a post. import json
from mnemonic import Mnemonic
passphrase = "superSecurePassphrase"
mnemo = Mnemonic("english")
words = mnemo.generate(strength=256)
seed = mnemo.to_seed(words, passphrase=passphrase)
entropy = mnemo.to_entropy(words)
d = {
"name": "waalges-wallet",
"mnemonic_sentence": words.split(),
"passphrase": passphrase,
"address_pool_gap": 20,
}
print(json.dumps(d, indent=True)) |
@waalge interesting. And your payload is pretty much the same, there is no additional parameter on that. I'll try to do it without using insomnia or postman and see what happens. I've just tried using curl directly but in this case it gets frozen and nothing happens. curl -d
'{
"name": "Tiago's Wallet",
"mnemonic_sentence": [
"squirrel",
"aerobic",
"baby",
"twice",
"direct",
"slush",
"pistol",
"razor",
"acid",
"junk",
"kingdom",
"flee",
"squirrel",
"dizzy",
"cram"
],
"passphrase": "Secure Passphrase hashed password",
"address_pool_gap": 20
}'
-H 'Content-type: application/json' -H 'Accept: application/json' -X POST 'http://localhost:8090/v2/wallets' |
Hanging? Not sure about that. Maybe the address is not localhost? Regarding the original error: there's some magic in BIP39 that means that not all sequences of words are valid. They must satisfy some criteria which this python lib is written to do. Why this isn't in the API, or more verbosely and explicitly stated, I'm not sure. |
Yeah, i don't know why. And the payload is the same. When i try using isonmnia i get the error saying that there is something about the last word used. I've changed it a lot and nothing happens differently. Oh, and i always use some of these words |
The last word has to solve some very specific condition - I'm not sure if there is a unique or very few options based on the first 23 (or n - 1) words. |
HI, I believe the recovery phrase you are trying to use is invalid (perhaps it is incomplete?), you can verify it for instance here -> https://iancoleman.io/bip39/. As far as I see from your code snippet: from mnemonic import Mnemonic
...
mnemo = Mnemonic("english")
words = mnemo.generate(strength=256) and your generated mnemonic sentence has 15 words ( >>> len(mnemo.generate(strength=256).split())
24 Note that I'm able to create wallet with mnemonic sentence generated by https://github.com/trezor/python-mnemonic.
Note that you can also generate mnemonic sentence using cardano-wallet CLI:
|
@piotr-iohk : The script is from me, and yeah it works. Thanks for poiinting out this is part of the wallet cli. i was only looking at the api. @tperrelli After reading This and bagging my head against the keyboard it looks like you can substitute the invalid word |
Ok, closing. As stated before the recovery phrase mentioned here is invalid, so wallet returning error ( |
@piotr-iohk, regarding of recovery phrase i'm not sure about that, cuz the error i get is related to the mnemonic words. On the other hand this site (https://iancoleman.io/bip39/) really tells me that the mnemonic words that i'm passing are invalid. Once i had this in mind, i've generated some mnemonic words from this website and they worked for me! So can we assume that the words provided from the docs are wrong? I mean, @waalge |
But not all choices of 15 words are valid. |
No, this is the full list of allowed words in the generated mnemonic sentence. It doesn't mean that you can just randomly pick any of the words and have a valid wallet recovery phrase out of them. See BIP39 - a standard for generating mnemonic sentences. It also lists several implementation libraries you can potentially use for generating. As mentioned before cardano-wallet cli also has this feature -> |
Just checking...
cardano-wallet
bug.cardano-wallet
release.cardano-node
version for that release ofcardano-wallet
.Version
2021-09-09
Platform
5.11.0-27-generic #29~20.04.1-Ubuntu SMP Wed Aug 11 15:58:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Installation method
cardano-wallet docker method exactly as described below.
wget https://raw.githubusercontent.com/input-output-hk/cardano-wallet/master/docker-compose.yml
NETWORK=testnet docker-compose up
Network configuration
testnet
Context
Hi all, i'm using a xubuntu but it's based on Ubuntu distro.
Description
Steps to Reproduce
...
Expected behavior
According to the documentation i was suppose to create a new wallet
Actual behavior
I'm getting this error message:
""Error in $['mnemonic_sentence']: Invalid entropy checksum: please double-check the last word of your mnemonic sentence."
The text was updated successfully, but these errors were encountered: