evernode-js-client 0.6.21-definition-1.9 → 0.6.21-definition-1.11
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
CHANGED
@@ -9149,7 +9149,7 @@ module.exports = { mask, unmask };
|
|
9149
9149
|
|
9150
9150
|
|
9151
9151
|
try {
|
9152
|
-
module.exports = require(__nccwpck_require__.ab + "prebuilds/linux-x64/node.
|
9152
|
+
module.exports = require(__nccwpck_require__.ab + "prebuilds/linux-x64/node.napi.node");
|
9153
9153
|
} catch (e) {
|
9154
9154
|
module.exports = __nccwpck_require__(2567);
|
9155
9155
|
}
|
@@ -33340,7 +33340,7 @@ module.exports = isValidUTF8;
|
|
33340
33340
|
|
33341
33341
|
|
33342
33342
|
try {
|
33343
|
-
module.exports = require(__nccwpck_require__.ab + "prebuilds/linux-x64/node.
|
33343
|
+
module.exports = require(__nccwpck_require__.ab + "prebuilds/linux-x64/node.napi1.node");
|
33344
33344
|
} catch (e) {
|
33345
33345
|
module.exports = __nccwpck_require__(9372);
|
33346
33346
|
}
|
@@ -54407,7 +54407,9 @@ module.exports = {
|
|
54407
54407
|
/***/ 8262:
|
54408
54408
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
54409
54409
|
|
54410
|
-
const
|
54410
|
+
const https = __nccwpck_require__(5687);
|
54411
|
+
|
54412
|
+
const DefinitionsUrl = 'https://raw.githubusercontent.com/EvernodeXRPL/evernode-resources/main/definitions/definitions.json';
|
54411
54413
|
|
54412
54414
|
const DefaultValues = {
|
54413
54415
|
xrplApi: null,
|
@@ -54425,12 +54427,32 @@ const HookTypes = {
|
|
54425
54427
|
heartbeat: 'HEARTBEAT'
|
54426
54428
|
}
|
54427
54429
|
|
54430
|
+
const getDefinitions = async () => {
|
54431
|
+
return new Promise((resolve, reject) => {
|
54432
|
+
https.get(DefinitionsUrl, res => {
|
54433
|
+
let data = [];
|
54434
|
+
if (res.statusCode != 200)
|
54435
|
+
reject(`Error: ${res.statusMessage}`);
|
54436
|
+
res.on('data', chunk => {
|
54437
|
+
data.push(chunk);
|
54438
|
+
});
|
54439
|
+
res.on('end', () => {
|
54440
|
+
resolve(JSON.parse(data));
|
54441
|
+
});
|
54442
|
+
}).on('error', err => {
|
54443
|
+
reject(`Error: ${err.message}`);
|
54444
|
+
});
|
54445
|
+
});
|
54446
|
+
}
|
54447
|
+
|
54428
54448
|
class Defaults {
|
54429
54449
|
/**
|
54430
54450
|
* Load defaults from the public definitions json.
|
54431
54451
|
* @param {string} network Network to choose the info.
|
54432
54452
|
*/
|
54433
|
-
static useNetwork(network) {
|
54453
|
+
static async useNetwork(network) {
|
54454
|
+
const definitions = await getDefinitions();
|
54455
|
+
|
54434
54456
|
if (!definitions[network])
|
54435
54457
|
throw `Invalid network: ${network}`;
|
54436
54458
|
|
@@ -57998,14 +58020,6 @@ module.exports = {
|
|
57998
58020
|
XrplHelpers
|
57999
58021
|
}
|
58000
58022
|
|
58001
|
-
/***/ }),
|
58002
|
-
|
58003
|
-
/***/ 4626:
|
58004
|
-
/***/ ((module) => {
|
58005
|
-
|
58006
|
-
module.exports = eval("require")("./resources/definitions.json");
|
58007
|
-
|
58008
|
-
|
58009
58023
|
/***/ }),
|
58010
58024
|
|
58011
58025
|
/***/ 9491:
|
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.6.21-definition-1.
|
9
|
+
"version": "0.6.21-definition-1.11",
|
10
10
|
"dependencies": {
|
11
11
|
"elliptic": "6.5.4",
|
12
12
|
"libsodium-wrappers": "0.7.10",
|
@@ -15,8 +15,5 @@
|
|
15
15
|
"xrpl": "2.2.1",
|
16
16
|
"xrpl-binary-codec": "1.4.2",
|
17
17
|
"xrpl-accountlib": "2.2.0"
|
18
|
-
},
|
19
|
-
"scripts": {
|
20
|
-
"postinstall": "node postinstall.js"
|
21
18
|
}
|
22
19
|
}
|
Binary file
|
Binary file
|
package/postinstall.js/index.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
(()=>{var e={147:e=>{"use strict";e.exports=require("fs")},687:e=>{"use strict";e.exports=require("https")},17:e=>{"use strict";e.exports=require("path")}};var r={};function __nccwpck_require__(s){var t=r[s];if(t!==undefined){return t.exports}var o=r[s]={exports:{}};var n=true;try{e[s](o,o.exports,__nccwpck_require__);n=false}finally{if(n)delete r[s]}return o.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var s={};(()=>{const e=__nccwpck_require__(147);const r=__nccwpck_require__(17);const s=__nccwpck_require__(687);const t="https://raw.githubusercontent.com/EvernodeXRPL/evernode-resources/main/definitions/definitions.json";const o="./resources/definitions.json";async function main(){s.get(t,(s=>{let t=[];console.log("Server info response:");const n=s.headers&&s.headers.date?s.headers.date:"no response date";console.log(" Status Code:",s.statusCode);console.log(" Date in header:",n);if(s.statusCode!=200)throw`Error: ${s.statusMessage}`;s.on("data",(e=>{t.push(e)}));s.on("end",(()=>{console.log(" Response ended: ");const s=r.dirname(o);if(!e.existsSync(s))e.mkdirSync(s,{recursive:true});e.writeFileSync(o,Buffer.concat(t).toString())}))})).on("error",(e=>{throw`Error: ${e.message}`}))}main()})();module.exports=s})();
|