how to make a user enter the passphrase before signing any transaction?

+1 vote
Is it possible to ask user to enter the passphrase before signing a transaction on the network ?
asked Dec 10, 2018 by adarshajha
other than providing his private key?
yes other than private key a passphrase maybe BIP39
Yes bitcore-mnemonic will help you in this, as many passphrase could be same but the mnemonics generated for a particular wallet will always be unique. So, if you have mnemonic for an address then you can use it with passphrase to regenerate the wallet using bitcore library.
Thanks @gimmick for your expert response but in my case every address is a multi-sig wallet and as per my knowledge multisig addresses do not  have mnemonics.
i request @multichain team to provide some solution on this.
Yes multisig addresses don't have mnemonics but you can check for the mnemonics of the addresses that are used in creation of the multisig address. Hope that can help your case.

3 Answers

+1 vote
 
Best answer
Yes you can use bitcore library for that but your chain must be bitcoin compatible before doing so, or you have to tweak some functions in base58 library to compensate for the some of the changed parameters in multichain blockchain.
answered Dec 10, 2018 by gimmick
selected Dec 13, 2018 by adarshajha
0 votes

You may want to take a look at the encryptwallet and walletpassphrase commands, which allow the node's wallet to be encrypted. However please note that the password would also need to be entered when connecting to the network as well, and that node cannot act as a miner (building blocks).

answered Dec 11, 2018 by MultiChain
encryptwallet is to encrypt the whole wallet ? means every single address will have same passphrase ?
Yes, that's right.
i want every address to have their own unique passphrase that is required to sign any transaction.
i am using bitcore to generate address and using BIP39 that uses passphrase as a parameter. I don't want to store passphrase but i want to validate passphrase before a user signs any transaction. is there anyway i can do it without making any db ?
This is not currently possible with MultiChain, although it's something we're looking into for the enterprise version.
that's essential and it must be there please try to provide something.
+1 vote

Then you might need to consider an API layer on top of MC itself or in your the application logic (something wallets offer generally, like a mnemonic).

Another option (may not be feasible) is to introduce mini nodes with send, receive and connect permissions only that can be used by a single user. Thus using something like encryptwallet might be applicable

answered Dec 12, 2018 by SDVII
encyptwallet will be useful for a single node chain only and it will not help you when you have multiple nodes.
...