File tree 3 files changed +8
-0
lines changed
3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 45
45
"prismarine-registry" : " ^1.8.0"
46
46
},
47
47
"dependencies" : {
48
+ "@types/node-rsa" : " ^1.1.4" ,
48
49
"@types/readable-stream" : " ^4.0.0" ,
49
50
"aes-js" : " ^3.1.2" ,
50
51
"buffer-equal" : " ^1.0.0" ,
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { Agent } from 'http'
7
7
import { Transform } from "readable-stream" ;
8
8
import { BinaryLike , KeyObject } from 'crypto' ;
9
9
import { Realm } from "prismarine-realms"
10
+ import NodeRSA from 'node-rsa' ;
10
11
11
12
type PromiseLike = Promise < void > | void
12
13
@@ -166,6 +167,7 @@ declare module 'minecraft-protocol' {
166
167
motd : string
167
168
motdMsg ?: Object
168
169
favicon : string
170
+ serverKey : NodeRSA
169
171
close ( ) : void
170
172
on ( event : 'connection' , handler : ( client : ServerClient ) => PromiseLike ) : this
171
173
on ( event : 'error' , listener : ( error : Error ) => PromiseLike ) : this
Original file line number Diff line number Diff line change @@ -8,6 +8,11 @@ const { concat } = require('../transforms/binaryStream')
8
8
const { mojangPublicKeyPem } = require ( './constants' )
9
9
const debug = require ( 'debug' ) ( 'minecraft-protocol' )
10
10
11
+ /**
12
+ * @param {import('../index').Client } client
13
+ * @param {import('../index').Server } server
14
+ * @param {Object } options
15
+ */
11
16
module . exports = function ( client , server , options ) {
12
17
const mojangPubKey = crypto . createPublicKey ( mojangPublicKeyPem )
13
18
const raise = ( translatableError ) => client . end ( translatableError , JSON . stringify ( { translate : translatableError } ) )
You can’t perform that action at this time.
0 commit comments