@pioneer-platform/pioneer-network 8.3.38 → 8.3.40
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/lib/index.js +34 -23
- package/package.json +2 -1
package/lib/index.js
CHANGED
|
@@ -46,7 +46,7 @@ var TAG = " | pioneer network | ";
|
|
|
46
46
|
var utxo = require('@pioneer-platform/utxo-network');
|
|
47
47
|
var ethereum = require('@pioneer-platform/eth-network');
|
|
48
48
|
// let eos = require('@pioneer-platform/eos-network')
|
|
49
|
-
|
|
49
|
+
var ripple = require('@pioneer-platform/ripple-network'); // RE-ENABLED WITH NOWNODES
|
|
50
50
|
var cosmos = require('@pioneer-platform/cosmos-network');
|
|
51
51
|
var binance = require('@pioneer-platform/binance-network');
|
|
52
52
|
var thorchain = require('@pioneer-platform/thor-network');
|
|
@@ -60,7 +60,7 @@ var Network = /** @class */ (function () {
|
|
|
60
60
|
utxo: utxo,
|
|
61
61
|
ethereum: ethereum,
|
|
62
62
|
// eos,
|
|
63
|
-
|
|
63
|
+
ripple: ripple, // RE-ENABLED WITH NOWNODES
|
|
64
64
|
cosmos: cosmos,
|
|
65
65
|
binance: binance,
|
|
66
66
|
thorchain: thorchain,
|
|
@@ -70,14 +70,14 @@ var Network = /** @class */ (function () {
|
|
|
70
70
|
};
|
|
71
71
|
this.init = function () {
|
|
72
72
|
return __awaiter(this, void 0, void 0, function () {
|
|
73
|
-
var tag, e_1;
|
|
73
|
+
var tag, rippleError_1, e_1;
|
|
74
74
|
return __generator(this, function (_a) {
|
|
75
75
|
switch (_a.label) {
|
|
76
76
|
case 0:
|
|
77
77
|
tag = TAG + " | init_network | ";
|
|
78
78
|
_a.label = 1;
|
|
79
79
|
case 1:
|
|
80
|
-
_a.trys.push([1,
|
|
80
|
+
_a.trys.push([1, 13, , 14]);
|
|
81
81
|
//TODO custom node config
|
|
82
82
|
//TODO audit all nodes
|
|
83
83
|
return [4 /*yield*/, utxo.init()];
|
|
@@ -85,40 +85,51 @@ var Network = /** @class */ (function () {
|
|
|
85
85
|
//TODO custom node config
|
|
86
86
|
//TODO audit all nodes
|
|
87
87
|
_a.sent();
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
// await ripple.init() // DISABLED TO PREVENT CRASHES
|
|
91
|
-
];
|
|
88
|
+
console.log(tag, "UTXO network initialized");
|
|
89
|
+
return [4 /*yield*/, ethereum.init()];
|
|
92
90
|
case 3:
|
|
93
91
|
_a.sent();
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
return [4 /*yield*/, cosmos.init()];
|
|
92
|
+
console.log(tag, "Ethereum network initialized");
|
|
93
|
+
_a.label = 4;
|
|
97
94
|
case 4:
|
|
98
|
-
|
|
99
|
-
|
|
95
|
+
_a.trys.push([4, 6, , 7]);
|
|
96
|
+
return [4 /*yield*/, ripple.init()]; // RE-ENABLED WITH NOWNODES
|
|
97
|
+
case 5:
|
|
98
|
+
_a.sent(); // RE-ENABLED WITH NOWNODES
|
|
99
|
+
console.log(tag, "Ripple network initialized successfully");
|
|
100
|
+
return [3 /*break*/, 7];
|
|
101
|
+
case 6:
|
|
102
|
+
rippleError_1 = _a.sent();
|
|
103
|
+
console.error(tag, "Failed to initialize ripple network:", rippleError_1);
|
|
104
|
+
return [3 /*break*/, 7];
|
|
105
|
+
case 7: return [4 /*yield*/, cosmos.init()];
|
|
106
|
+
case 8:
|
|
100
107
|
_a.sent();
|
|
108
|
+
console.log(tag, "Cosmos network initialized");
|
|
101
109
|
return [4 /*yield*/, binance.init()];
|
|
102
|
-
case
|
|
110
|
+
case 9:
|
|
103
111
|
_a.sent();
|
|
112
|
+
console.log(tag, "Binance network initialized");
|
|
104
113
|
return [4 /*yield*/, thorchain.init()];
|
|
105
|
-
case
|
|
114
|
+
case 10:
|
|
106
115
|
_a.sent();
|
|
116
|
+
console.log(tag, "Thorchain network initialized");
|
|
107
117
|
return [4 /*yield*/, mayachain.init()];
|
|
108
|
-
case
|
|
118
|
+
case 11:
|
|
109
119
|
_a.sent();
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
case 8:
|
|
120
|
+
console.log(tag, "Mayachain network initialized");
|
|
121
|
+
return [4 /*yield*/, osmosis.init()];
|
|
122
|
+
case 12:
|
|
114
123
|
_a.sent();
|
|
124
|
+
console.log(tag, "Osmosis network initialized");
|
|
115
125
|
// await midgard.init() //TODO add init
|
|
126
|
+
console.log(tag, "All networks initialized. Available networks:", Object.keys(this.networks));
|
|
116
127
|
return [2 /*return*/, true];
|
|
117
|
-
case
|
|
128
|
+
case 13:
|
|
118
129
|
e_1 = _a.sent();
|
|
119
|
-
console.error(e_1);
|
|
130
|
+
console.error(tag, "Network initialization error:", e_1);
|
|
120
131
|
throw e_1;
|
|
121
|
-
case
|
|
132
|
+
case 14: return [2 /*return*/];
|
|
122
133
|
}
|
|
123
134
|
});
|
|
124
135
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pioneer-platform/pioneer-network",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.40",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"types": "./lib/main.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"@pioneer-platform/osmosis-network": "^8.3.12",
|
|
23
23
|
"@pioneer-platform/pioneer-caip": "^9.2.34",
|
|
24
24
|
"@pioneer-platform/pioneer-types": "^8.3.1",
|
|
25
|
+
"@pioneer-platform/ripple-network": "^8.3.4",
|
|
25
26
|
"@pioneer-platform/thor-network": "^8.3.4",
|
|
26
27
|
"@pioneer-platform/utxo-network": "^8.3.11",
|
|
27
28
|
"@types/node": "^18.15.11",
|