Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

residue

Package Overview
Dependencies
2
Maintainers
1
Versions
94
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.0.1

9

CHANGELOG.md
# Change Log
## [2.0.0] - 01-03-2018
- Compatibility for server 2.0.0
## [2.0.1]
- Compatibility with server 2.0.0
## [1.2.3]
## [1.2.5]
- Removed plain request
## [1.2.4]
- `loadConfiguration` now accepts object

@@ -8,0 +11,0 @@

{
"name": "residue",
"version": "2.0.0",
"version": "2.0.1",
"description": "Library to interact with residue server seamlessly.",

@@ -26,3 +26,3 @@ "main": "src/residue.js",

],
"author": "Muflihun Labs <info@muflihun.com> (https://muflihun.com/)",
"author": "Muflihun Labs <info@muflihun.com>",
"license": "Apache-2.0",

@@ -29,0 +29,0 @@ "bugs": {

# Residue Node.js Client
A very simple, secure Node.js library to interact with residue seamlessly.
This module provides interface for connecting and interacting with residue server seamlessly, means, once you are connected this module takes care of expired tokens and clients and keep itself updated with latest tokens and ping server when needed to stay alive.
[![Version](https://img.shields.io/npm/v/residue.svg)](https://www.npmjs.com/package/residue)

@@ -12,2 +9,6 @@ [![GitHub license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/muflihun/residue-node/blob/master/LICENSE)

A very simple, secure Node.js library to interact with residue seamlessly.
This module provides interface for connecting and interacting with residue server seamlessly, means, once you are connected this module takes care of expired tokens and clients and keep itself updated with latest tokens and ping server when needed to stay alive.
## Native API

@@ -80,2 +81,9 @@ This library depends on following native modules, without them library will not work:

// other levels
logger.warn(...);
logger.error(...);
logger.debug(...);
logger.trace(...);
logger.fatal(...);
logger.verbose(verbose-level, ...);
```

@@ -85,1 +93,23 @@

You can check out [sample client apps](https://github.com/muflihun/residue-node/blob/master/samples) for practical use of this package.
## License
```
Copyright 2017-present Muflihun Labs
Copyright 2017-present @abumusamq
https://github.com/muflihun/
https://muflihun.github.io/
https://muflihun.com/
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```

@@ -97,10 +97,7 @@ //

ALLOW_UNKNOWN_LOGGERS: 1,
ALLOW_DEFAULT_ACCESS_CODE: 4,
ALLOW_PLAIN_LOG_REQUEST: 8,
ALLOW_BULK_LOG_REQUEST: 16,
COMPRESSION: 256,
COMPRESSION: 256
};
const PACKET_DELIMITER = '\r\n\r\n';
const DEFAULT_ACCESS_CODE = 'default';
const TOUCH_THRESHOLD = 60; // should always be min(client_age) - max(client_age/2)

@@ -146,9 +143,6 @@

// the server
sendRequest: (request, socket, nolock /* = false */, sendPlain /* = false */, compress /* = false */) => {
sendRequest: (request, socket, nolock /* = false */, compress /* = false */) => {
if (typeof nolock === 'undefined') {
nolock = false;
}
if (typeof sendPlain === 'undefined') {
sendPlain = false;
}
if (typeof compress === 'undefined') {

@@ -160,3 +154,3 @@ compress = false;

Utils.debugLog('Sending request via callback');
Utils.sendRequest(request, socket, false, sendPlain, compress);
Utils.sendRequest(request, socket, false, compress);
});

@@ -169,8 +163,3 @@ return;

}
let encryptedRequest;
if (!sendPlain) {
encryptedRequest = Utils.encrypt(finalRequest);
} else {
encryptedRequest = finalRequest + PACKET_DELIMITER;
}
const encryptedRequest = Utils.encrypt(finalRequest);
Utils.vLog(9, 'Payload (Plain): ' + encryptedRequest);

@@ -497,6 +486,3 @@ Utils.vLog(8, 'Locking ' + socket.address().port);

}
if (Params.options.plain_request) {
request.client_id = Params.connection.client_id;
}
Utils.sendRequest(request, Params.logging_socket, false, Params.options.plain_request && Utils.hasFlag(Flag.ALLOW_PLAIN_LOG_REQUEST), Utils.hasFlag(Flag.COMPRESSION));
Utils.sendRequest(request, Params.logging_socket, false, Utils.hasFlag(Flag.COMPRESSION));
}

@@ -503,0 +489,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc