evernode-js-client 0.5.17-beta-v3.6 → 0.5.17-beta-v3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +14 -2
- package/package.json +2 -2
- package/postinstall.js/index.js +1 -1
package/index.js
CHANGED
@@ -15305,9 +15305,21 @@ class StateHelpers {
|
|
15305
15305
|
}
|
15306
15306
|
else if (Buffer.from(HookStateKeys.PREFIX_CANDIDATE_ID, 'hex').compare(stateKey, 0, 4) === 0) {
|
15307
15307
|
// Generate the owner state key.
|
15308
|
-
|
15308
|
+
const candidateData = {
|
15309
15309
|
type: this.StateTypes.CANDIDATE_ID,
|
15310
|
-
key: hexKey
|
15310
|
+
key: hexKey
|
15311
|
+
};
|
15312
|
+
|
15313
|
+
const uniqueIdBuf = Buffer.alloc(32, 0);
|
15314
|
+
stateKey.copy(uniqueIdBuf, 4, 4, 32);
|
15315
|
+
candidateData.uniqueId = uniqueIdBuf.toString('hex').toUpperCase();
|
15316
|
+
|
15317
|
+
const candidateType = stateKey.readUInt8(4);
|
15318
|
+
if (EvernodeConstants.CandidateTypes.DudHost === candidateType)
|
15319
|
+
candidateData.dudHostAddress = codec.encodeAccountID(stateKey.slice(12, 32));
|
15320
|
+
|
15321
|
+
return {
|
15322
|
+
...candidateData,
|
15311
15323
|
...this.decodeCandidateIdState(stateData)
|
15312
15324
|
}
|
15313
15325
|
}
|
package/package.json
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
],
|
7
7
|
"homepage": "https://github.com/HotPocketDev/evernode-js-client",
|
8
8
|
"license": "MIT",
|
9
|
-
"version": "0.5.17-beta-v3.
|
9
|
+
"version": "0.5.17-beta-v3.8",
|
10
10
|
"dependencies": {
|
11
11
|
"elliptic": "6.5.4",
|
12
12
|
"libsodium-wrappers": "0.7.10",
|
@@ -16,6 +16,6 @@
|
|
16
16
|
"xrpl-binary-codec": "1.4.2"
|
17
17
|
},
|
18
18
|
"scripts": {
|
19
|
-
"postinstall": "
|
19
|
+
"postinstall": "node postinstall.js external"
|
20
20
|
}
|
21
21
|
}
|