Mastercoin ref Go implementation