Bitcoin serialization