4

Is it possible to sign transaction on ARM Microcontroller and then somehow broadcast it?

I have read about ethereumjs-tx, but how to implement it without any OS on board?

UDPADE: I have found how to create a signed transaction in Go

https://ethereum.stackexchange.com/a/3401/7620

transaction := types.NewTransaction(nonce, recipient, value, gasLimit, gasPrice, input)
signature, _ := crypto.Sign(transaction.SigHash().Bytes(), key)
signed, _ := tx.WithSignature(signature)

Where can I find same code in C/C++ with lib?

Richard Horrocks
  • 37,835
  • 13
  • 87
  • 144
aleebek
  • 127
  • 8

2 Answers2

1

See cppethereum project.

https://github.com/ethereum/cpp-ethereum/blob/5d8f676cc06cfb4983f6ddf33568432216cb32f4/libethcore/Transaction.cpp#L133

I suggest you contact cppethereum developers in Gitter and they can guide you to more comprehensive answer.

Mikko Ohtamaa
  • 22,269
  • 6
  • 62
  • 127
1

A very quick answer covering this part:

Where can I find same code in C/C++ with lib?

...without delving too much into what you're trying to do, and without knowing what you already have.

The code that handles this for cpp-ethereum can be found in Transaction.cpp, itself in the libethcore library. You may have to pull in further libraries for the signing, etc. - for example, the SHA3 code is in libdevcore.

Richard Horrocks
  • 37,835
  • 13
  • 87
  • 144