2

The transaction signing process for the blockcypher ethereum API is explained here: https://www.blockcypher.com/dev/ethereum/#creating-transactions

When their "addrs" endpoint is called, their API creates a new ethereum address, and a 64-character private key is provided.

When their "/txs/new" endpoint is called, their API provides a "tosign" string which must be used with the 64-character private key, to produce a signature.

I need to know how to create that signature, which can be used with their "/txs/send" endpoint.

I do not wish to use their signer tool, because it requires that the GO programming language is installed on my server. If I get a new server, I don't want to have to reinstall a bunch of additional libraries.

I looked at the Bitwasp examples, and could not find a method that simply creates a transaction signature.

Please provide specific instructions which describe the simplest method to create a transaction signature for the blockcypher ethereum API.

1
  • And please, no use of Web3
    – Bob Lozano
    Dec 18, 2017 at 15:47

1 Answer 1

0

download their signer at https://github.com/blockcypher/btcutils/tree/master/signer

and use the signer to sign the string you from the txskeleton at "tosign"

}, "tosign": [ "a83f5bea598e0d217a03a2646d6c49edb2e99daf4537b2c09b008df76b77acec" ] }

it will return the signed signature something like this "3045022100bc04ce017622f9830f955dbd8fafb65c5a72306a674711e507200f5f198954c90220581bc05e2658c258a985d914a158f89f44144a2e082837955b218d12a43a6a38"

(the strings are exact copy from their eth api doc... so you can follow along better)

and just use that signature to send the transaction.

the request body is truncated because it's huge, but it's the same as the returned object from above plus the signature curl -sd '{"tx": {...}, "tosign": [ "a83f5bea598e0d217a03a2646d6c49edb2e99daf4537b2c09b008df76b77acec" ], "signatures": [ "3045022100bc04ce017622f9830f955dbd8fafb65c5a72306a674711e507200f5f198954c90220581bc05e2658c258a985d914a158f89f44144a2e082837955b218d12a43a6a38" ]}' https://api.blockcypher.com/v1/eth/main/txs/send?token=YOURTOKEN

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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