@letmethink: That seems like a great place to start! Are you creating a full-blown extension, or just messing with blocks/code for now?
Also, I just looked through that code, and found this several times:
Do NOT store your private key as a string literal in your game!
Have you created a workaround for this, or are you currently using it as a string?