diff --git a/README.md b/README.md index d3d8b73..ca41bdd 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,6 @@ API documentation is available [here](https://bitchan.github.io/bitmessage/docs/ - [x] net_addr - [x] inv_vect - [x] encrypted - - [x] message encodings - [x] service features - [x] pubkey features - [x] Message types diff --git a/lib/structs.js b/lib/structs.js index 302b45b..0c0b17b 100644 --- a/lib/structs.js +++ b/lib/structs.js @@ -496,29 +496,6 @@ exports.encrypted = { }, }; -/** - * Message encodings. Extends {@link var_int} by adding known encoding type - * constants. - * @see {@link https://bitmessage.org/wiki/Protocol_specification#Message_Encodings} - * @namespace - */ -exports.messageEncodings = objectAssign(Object.create(var_int), { - /** - * Any data with this number may be ignored. The sending node might - * simply be sharing its public key with you. - */ - IGNORE: 0, - /** - * UTF-8. No 'Subject' or 'Body' sections. Useful for simple strings - * of data, like URIs or magnet links. - */ - TRIVIAL: 1, - /** - * UTF-8. Uses 'Subject' and 'Body' sections. No MIME is used. - */ - SIMPLE: 2, -}); - // Creates bitfield class of the specified size. var bitfield = function(size) { var bytesize = size / 8; diff --git a/test.js b/test.js index 8fad570..c3ecf9b 100644 --- a/test.js +++ b/test.js @@ -14,7 +14,6 @@ var var_int_list = structs.var_int_list; var net_addr = structs.net_addr; var inv_vect = structs.inv_vect; var encrypted = structs.encrypted; -var messageEncodings = structs.messageEncodings; var serviceFeatures = structs.serviceFeatures; var pubkeyFeatures = structs.pubkeyFeatures; var messages = bitmessage.messages; @@ -263,16 +262,6 @@ describe("Common structures", function() { }); }); - describe("message encodings", function() { - it("should decode", function() { - expect(messageEncodings.decode(Buffer([2])).value).to.equal(messageEncodings.SIMPLE); - }); - - it("should encode", function() { - expect(messageEncodings.encode(messageEncodings.SIMPLE).toString("hex")).to.equal("02"); - }); - }); - describe("service features", function() { it("should decode", function() { expect(serviceFeatures.decode(Buffer("0000000000000001", "hex"))).to.have.members([serviceFeatures.NODE_NETWORK]);