Tips for child key derivation
What are the last bytes? (0a794dec)


The checksum.


  In the next operation (HMAC-SHA512) I used the chain code obtained, the key and the next depth (80000002), but I'm not sure.


Yep, that's it : I can see you also prepanded the 0x00 (because serialized privkeys are 32 bytes while serialized compressed public keys are 33 bytes).


  I got a 64 bytes result: the 32 bytes on the right become the child's chain code. I "added" the 32 bytes on the left to the parent's key.


You need a proper tool to perform this addition : you need to compute this addition modulo the curve order.

Since you use bx, you might want to give ec-add-secrets a look.


  Would anyone know how to recommend a Bx command or a tool to carry out this step?


You could use ec-multiply-secrets by passing G (the generator point) as the point parameter.

G = 0279BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798

EDIT: As another tool if you know a bit of Python you might want to hack with https://github.com/darosior/python-bip32 . I tried to keep it minimal.