Skip to content

Wallet recovery with passphrase is not working #3168

@ShahanaFarooqui

Description

@ShahanaFarooqui

initwallet REST API is working without passphrase but it fails with passphrase, with 'invalid passphrase' error message.

I opened first issue about this API #3128 (#3128) almost 10 days back also and i am testing these scenarios from almost last 15 days. I found that initwallet REST API is behaving strangly.

If I generate the genseed with passphrase through lncli and use this cipher_seed_mnemonic array to recover the wallet through initwallet REST API, then it works perfectly. But, if i will generate the genseed with passphrase through REST and use that cipher_seed_mnemonic array to recover with initwallet REST then i am getting 'invalid passphrase' error.

Your environment
version of lnd: 0.6.0-beta
which operating system: Windows
version bitcoind: v0.17.1

Steps to reproduce

  1. Call GET /v1/genseed with aezeed_passphrase value.
  2. Call POST /v1/initwallet with wallet_password. it will initialize the wallet successfully.
  3. Delete the wallet manually.
  4. Call POST /v1/initwallet with wallet_password, aezeed_passphrase and cipher_seed_mnemonic array generated from step 1.

Initialize wallet with below details:
Method: POST,
url: https://192.168.1.8:8080/v1/initwallet,
payload: {
"wallet_password":"c3VoZWIxMjM=",
"cipher_seed_mnemonic":["absent","stuff","layer","holiday","slam","pelican","drift","heart","prepare","casual","treat","liar","small","venue","fragile","wise","frown","safe","brief","cherry","pigeon","pole","sound","rocket"],
"aezeed_passphrase":"dGhpc2lzbXlwYXNzcGhyYXNl"
}

Expected behaviour
It should successfully recover the wallet.

Actual behaviour
Failed response with { "error": "invalid passphrase", "code": 2 }

I have tested initwallet with multiple scenarios and all the scenarios are working with GRPC but not with REST.

Metadata

Metadata

Assignees

Labels

P2should be fixed if one has timeRESTapigRPCrecoveryRelated to the backup/restoration of LND data (e.g. wallet seeds)walletThe wallet (lnwallet) which LND uses

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions