baltica 0.1.27 → 0.1.28
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.
|
@@ -44,6 +44,8 @@ exports.defaultClientOptions = {
|
|
|
44
44
|
compressionThreshold: 1,
|
|
45
45
|
/** Default Value: Zlib */
|
|
46
46
|
compressionMethod: protocol_1.CompressionMethod.Zlib,
|
|
47
|
-
/** Default Value:
|
|
48
|
-
emitUnknownPackets:
|
|
47
|
+
/** Default Value: true */
|
|
48
|
+
emitUnknownPackets: true,
|
|
49
|
+
/** Default Value: true */
|
|
50
|
+
authLogs: true,
|
|
49
51
|
};
|
package/dist/shared/auth.js
CHANGED
|
@@ -52,7 +52,8 @@ async function createOfflineSession(client) {
|
|
|
52
52
|
if (!client.options.username) {
|
|
53
53
|
throw new Error("Must specify a valid username for offline session");
|
|
54
54
|
}
|
|
55
|
-
|
|
55
|
+
if (client.options.authLogs)
|
|
56
|
+
raknet_1.Logger.info("Creating offline session...");
|
|
56
57
|
const profile = {
|
|
57
58
|
name: client.options.username,
|
|
58
59
|
uuid: generateUUID(client.options.username),
|
|
@@ -61,7 +62,8 @@ async function createOfflineSession(client) {
|
|
|
61
62
|
await setupClientProfile(client, profile, []);
|
|
62
63
|
await setupClientChains(client, true);
|
|
63
64
|
client.emit("session");
|
|
64
|
-
|
|
65
|
+
if (client.options.authLogs)
|
|
66
|
+
raknet_1.Logger.info("Offline session created");
|
|
65
67
|
}
|
|
66
68
|
catch (error) {
|
|
67
69
|
const err = error instanceof Error ? error : new Error(String(error));
|
|
@@ -86,7 +88,8 @@ async function authenticate(client) {
|
|
|
86
88
|
await setupClientProfile(client, profile, chains);
|
|
87
89
|
await setupClientChains(client);
|
|
88
90
|
const endTime = Date.now();
|
|
89
|
-
|
|
91
|
+
if (client.options.authLogs)
|
|
92
|
+
raknet_1.Logger.info(`Authentication with Xbox took ${(endTime - startTime) / 1000}s.`);
|
|
90
93
|
client.emit("session");
|
|
91
94
|
}
|
|
92
95
|
catch (error) {
|
|
@@ -147,7 +150,8 @@ async function authenticateWithEmailPassword(client) {
|
|
|
147
150
|
raknet_1.Logger.warn(`Failed to extract pfcd from session token: ${e instanceof Error ? e.message : String(e)}`);
|
|
148
151
|
}
|
|
149
152
|
const endTime = Date.now();
|
|
150
|
-
|
|
153
|
+
if (client.options.authLogs)
|
|
154
|
+
raknet_1.Logger.info(`Authentication with Xbox (email/password) took ${(endTime - startTime) / 1000}s.`);
|
|
151
155
|
setupClientProfile(client, profile, tokens.chains);
|
|
152
156
|
await setupClientChains(client);
|
|
153
157
|
client.emit("session");
|
|
@@ -365,7 +369,9 @@ function createAuthflow(client) {
|
|
|
365
369
|
flow: "live",
|
|
366
370
|
deviceType: "Nintendo",
|
|
367
371
|
}, (res) => {
|
|
368
|
-
|
|
372
|
+
client.emit("msa", res.message);
|
|
373
|
+
if (client.options.authLogs)
|
|
374
|
+
raknet_1.Logger.info(res.message);
|
|
369
375
|
});
|
|
370
376
|
}
|
|
371
377
|
async function getMinecraftBedrockToken(authflow, client) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "baltica",
|
|
3
3
|
"description": "Library for Minecraft Bedrock Edition community developers.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.28",
|
|
5
5
|
"minecraft": "1.21.130",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"license": "MIT",
|
|
@@ -22,17 +22,17 @@
|
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@sanctumterra/raknet": "latest",
|
|
25
|
-
"@serenityjs/binarystream": "^3.0
|
|
25
|
+
"@serenityjs/binarystream": "^3.1.0",
|
|
26
26
|
"@serenityjs/protocol": "^0.8.17",
|
|
27
27
|
"fetch-socks": "^1.3.2",
|
|
28
28
|
"jose": "^5.10.0",
|
|
29
29
|
"prismarine-auth": "^2.7.0",
|
|
30
|
-
"undici": "^7.
|
|
30
|
+
"undici": "^7.20.0",
|
|
31
31
|
"uuid-1345": "^1.0.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@biomejs/biome": "1.9.4",
|
|
35
|
-
"@types/node": "^22.19.
|
|
35
|
+
"@types/node": "^22.19.9",
|
|
36
36
|
"@types/pngjs": "^6.0.5",
|
|
37
37
|
"@types/uuid-1345": "^0.99.25",
|
|
38
38
|
"pngjs": "^7.0.0",
|