evernode-js-client 0.6.8 → 0.6.9
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +6 -3
- package/package.json +1 -1
package/index.js
CHANGED
@@ -13102,7 +13102,8 @@ const HOST_UPDATE_TOT_INS_COUNT_PARAM_OFFSET = 46;
|
|
13102
13102
|
const HOST_UPDATE_ACT_INS_COUNT_PARAM_OFFSET = 50;
|
13103
13103
|
const HOST_UPDATE_DESCRIPTION_PARAM_OFFSET = 54;
|
13104
13104
|
const HOST_UPDATE_VERSION_PARAM_OFFSET = 80;
|
13105
|
-
const
|
13105
|
+
const HOST_UPDATE_EMAIL_ADDRESS_PARAM_OFFSET = 83;
|
13106
|
+
const HOST_UPDATE_PARAM_SIZE = 123;
|
13106
13107
|
|
13107
13108
|
const VOTE_VALIDATION_ERR = "VOTE_VALIDATION_ERR";
|
13108
13109
|
|
@@ -13368,8 +13369,8 @@ class HostClient extends BaseEvernodeClient {
|
|
13368
13369
|
return await this.isRegistered();
|
13369
13370
|
}
|
13370
13371
|
|
13371
|
-
async updateRegInfo(activeInstanceCount = null, version = null, totalInstanceCount = null, tokenID = null, countryCode = null, cpuMicroSec = null, ramMb = null, diskMb = null, description = null, options = {}) {
|
13372
|
-
// <token_id(32)><country_code(2)><cpu_microsec(4)><ram_mb(4)><disk_mb(4)><total_instance_count(4)><active_instances(4)><description(26)><version(3)>
|
13372
|
+
async updateRegInfo(activeInstanceCount = null, version = null, totalInstanceCount = null, tokenID = null, countryCode = null, cpuMicroSec = null, ramMb = null, diskMb = null, description = null, emailAddress = null, options = {}) {
|
13373
|
+
// <token_id(32)><country_code(2)><cpu_microsec(4)><ram_mb(4)><disk_mb(4)><total_instance_count(4)><active_instances(4)><description(26)><version(3)><email(40)>
|
13373
13374
|
const paramBuf = Buffer.alloc(HOST_UPDATE_PARAM_SIZE, 0);
|
13374
13375
|
if (tokenID)
|
13375
13376
|
Buffer.from(tokenID.substr(0, 32), "hex").copy(paramBuf, HOST_UPDATE_TOKEN_ID_PARAM_OFFSET);
|
@@ -13387,6 +13388,8 @@ class HostClient extends BaseEvernodeClient {
|
|
13387
13388
|
paramBuf.writeUInt32LE(activeInstanceCount, HOST_UPDATE_ACT_INS_COUNT_PARAM_OFFSET);
|
13388
13389
|
if (description)
|
13389
13390
|
Buffer.from(description.substr(0, 26), "utf-8").copy(paramBuf, HOST_UPDATE_DESCRIPTION_PARAM_OFFSET);
|
13391
|
+
if (emailAddress)
|
13392
|
+
Buffer.from(emailAddress.substr(0, 40), "utf-8").copy(paramBuf, HOST_UPDATE_EMAIL_ADDRESS_PARAM_OFFSET);
|
13390
13393
|
if (version) {
|
13391
13394
|
const components = version.split('.').map(v => parseInt(v));
|
13392
13395
|
if (components.length != 3)
|