Mastercoin reference implementation