1

Default Parity Signer

How can I implement a custom transaction signer (which will unlock accounts on the fly) and tell parity client to use it?

I don't want to unlock all accounts at startup (and always keep them unlocked. Instead, I want to set some logic for account unlocking on each transaction, say:

if (isDay && accountAddress in [addr1, addr2, addr3])
    unlockAccount and signTransaction
else
    rejectTransaction

I'm looking into JSONRPC signer module as a possible option, but not able to connect to the Parity Signer UI using websockets

Connect Error: Error: Server responded with a non-101 status: 403
Response Headers Follow:
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
server: Parity/SignerUI
content-length: 524
content-type: text/html
connection: close
2

Parity takes a command line option to keep certain accounts unlocked:

Example:

   --unlock 0x001fc7d7e506866aeab82c11da515e9dd6d32c25 --password password.txt
  • I don't want to unlock all accounts at startup. – Edward Ruchevits Apr 24 '17 at 10:57
  • @EdwardRuchevits then please clarify what you are looking for. – soc1c Apr 24 '17 at 11:12
  • --unlock unlocks only listed accounts – Mikko Ohtamaa Apr 24 '17 at 11:13
  • @5chdn updated my question. – Edward Ruchevits Apr 24 '17 at 11:19
  • 1
    @MikkoOhtamaa And keeps them unlocked all the time. I don't want it. Please see my updated question. – Edward Ruchevits Apr 24 '17 at 11:20
1

You can unlock an account via RPC.

curl --data '{"method":"personal_unlockAccount","params":["0x8f0227d45853a50eefd48dd4fec25d5b3fd2295e","hunter2",null],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545

For details, see https://wiki.parity.io/JSONRPC-personal-module#personal_unlockaccount

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.