1

For a research project, I'm trying to implement my own signer, such that I can run tezos-client import secret key ALIAS "http://..." and then I can use tezos-client to transfer and tezos-baker to bake.

What API does my server need to implement in order for this to work? I've seen a few projects that intend to do this like https://github.com/tacoinfra/remote-signer and I'm trying to understand if the API they supply is what I need:

  • POST /keys/<key_hash>
  • GET /keys/<key_hash>
  • GET /authorized_keys

Thanks

  • You can run tezos-client using -l and it'll show you all the http calls it makes to sign an op. – utdrmac Sep 7 at 17:59
  • @utdrmac, thx. it helps but still doesn't show what tezos-client send and what it expects to receive. – Chiptus Sep 22 at 6:47
  • So the problem is to find the hash preimage: the message which you are signing in order to create a valid, signed transaction that can be published to the blockchain? – Thorkil Værge 6 hours ago
0

I've got here the beginning of an answer, after reviewing the code for a few libraries like:

I found that it's pretty simple and to implement the signer we need to create a server with the following routes:

  • GET /authorized_keys

    Retrieve the public keys that can be used to authenticate signing commands. If the empty object is returned, the signer has been set to accept unsigned commands. (most signers I saw just return empty object)

    returns {authorized_keys: [pkh]}

  • GET /keys/:pkh

    Retrieve the public key of a given remote key (=public key hash)

    returns {public_key: pk}

  • POST /keys/:pkh

    Sign a piece of data with a given remote key

    receives: a string of bytes

    returns {signature: Signature.encoding}

This should be checked as it seems that when signer gets a block (for baking) it expects a different signarture

My main problem right now is to sign the data.

| improve this answer | |

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.