Constants
This commit is contained in:
parent
632aa2245c
commit
f356a070cc
|
@ -26,15 +26,15 @@ API documentation is available [here](https://bitchan.github.io/bitmessage/docs/
|
||||||
- [ ] AES-256-CBC
|
- [ ] AES-256-CBC
|
||||||
- [ ] HMAC-SHA-256
|
- [ ] HMAC-SHA-256
|
||||||
- [ ] Common structures
|
- [ ] Common structures
|
||||||
- [ ] message
|
- [x] message
|
||||||
- [x] var_int
|
- [x] var_int
|
||||||
- [x] var_str
|
- [x] var_str
|
||||||
- [x] var_int_list
|
- [x] var_int_list
|
||||||
- [ ] net_addr
|
- [ ] net_addr
|
||||||
- [ ] inv_vect
|
|
||||||
- [ ] encrypted
|
- [ ] encrypted
|
||||||
- [ ] encoding
|
- [x] message encodings
|
||||||
- [ ] bitfield
|
- [ ] service features
|
||||||
|
- [ ] pubkey features
|
||||||
- [ ] Message types
|
- [ ] Message types
|
||||||
- [ ] version
|
- [ ] version
|
||||||
- [ ] verack
|
- [ ] verack
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
require("object.assign").shim();
|
||||||
var assert = require("assert");
|
var assert = require("assert");
|
||||||
var bufferEqual = require("buffer-equal");
|
var bufferEqual = require("buffer-equal");
|
||||||
var bmcrypto = require("./crypto");
|
var bmcrypto = require("./crypto");
|
||||||
|
@ -249,3 +250,19 @@ exports.var_int_list = {
|
||||||
return Buffer.concat([var_int.encode(list.length), listBuf]);
|
return Buffer.concat([var_int.encode(list.length), listBuf]);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.messageEncodings = Object.create(var_int);
|
||||||
|
Object.assign(exports.messageEncodings, {
|
||||||
|
IGNORE: 0,
|
||||||
|
TRIVIAL: 1,
|
||||||
|
SIMPLE: 2,
|
||||||
|
});
|
||||||
|
|
||||||
|
exports.serviceFeatures = {
|
||||||
|
NODE_NETWORK: 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.pubkeyFeatures = {
|
||||||
|
INCLUDE_DESTINATION: 30,
|
||||||
|
DOES_ACK: 31,
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user