first commit
This commit is contained in:
commit
b6256abbfb
397 files changed
+537630
No files matched your search
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
export * from "./loco.js";
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
export * from "./loco.js";
|
||||
//# sourceMappingURL=index.js.map
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
||||
Vendored
+54
@@ -0,0 +1,54 @@
|
||||
/** Known LOCO commands */
|
||||
export type LocoCommand = "GETTOKEN" | "CHECKIN" | "LOGINLIST" | "WRITE" | "MSG" | "SYNCMSG" | "GETCONF" | "GETPK" | "GETLPK" | "SETPK" | "SETSK" | "SETST" | "SCREATE" | "SWRITE" | "CHATONROOM" | "ACTION" | "GETMEM" | "BLSYNC" | (string & {});
|
||||
export interface LocoPacketHeader {
|
||||
/** Packet identifier (auto-incrementing, starts at 1000 / 0x3E8) */
|
||||
id: number;
|
||||
/** Status code (0 = request from client, response status from server) */
|
||||
statusCode: number;
|
||||
/** LOCO command name, max 11 bytes null-padded */
|
||||
command: LocoCommand;
|
||||
/** Body type (0 = BSON) */
|
||||
bodyType: number;
|
||||
/** Body payload length in bytes */
|
||||
bodyLength: number;
|
||||
}
|
||||
/** LOCO header is always 22 bytes */
|
||||
export declare const LOCO_HEADER_SIZE = 22;
|
||||
/** Encrypted packet: [length:4][nonce:12][ciphertext+tag] */
|
||||
export declare const ENCRYPTED_HEADER_SIZE = 16;
|
||||
/** Handshake packet length field value */
|
||||
export declare const HANDSHAKE_LENGTH = 256;
|
||||
export interface LocoHandshakeData {
|
||||
/** Encryption type (15 = RSA-OAEP-SHA1) */
|
||||
type: number;
|
||||
/** Block cipher mode (4 = AES/GCM/NoPadding) */
|
||||
blockCipherMode: number;
|
||||
/** RSA-encrypted AES key */
|
||||
payload: Buffer;
|
||||
}
|
||||
export interface LocoClientConfig {
|
||||
/** LOCO server host */
|
||||
host: string;
|
||||
/** LOCO server port */
|
||||
port: number;
|
||||
/** RSA public key of the server (PEM or base64) */
|
||||
serverPublicKey: string;
|
||||
/** Whether to use TLS for the initial TCP connection */
|
||||
useTLS: boolean;
|
||||
}
|
||||
export declare const DEFAULT_CONFIG: LocoClientConfig;
|
||||
export interface LoginCredentials {
|
||||
/** OAuth token obtained from KakaoTalk auth */
|
||||
oauthToken: string;
|
||||
/** Device UUID */
|
||||
duuid: string;
|
||||
/** User ID */
|
||||
userId: number;
|
||||
/** App version string */
|
||||
appVer: string;
|
||||
/** Language code */
|
||||
lang: string;
|
||||
/** Mobile Country Code + Mobile Network Code */
|
||||
mccmnc: string;
|
||||
}
|
||||
//# sourceMappingURL=loco.d.ts.map
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"loco.d.ts","sourceRoot":"","sources":["../../src/types/loco.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,MAAM,MAAM,WAAW,GACnB,UAAU,GACV,SAAS,GACT,WAAW,GACX,OAAO,GACP,KAAK,GACL,SAAS,GACT,SAAS,GACT,OAAO,GACP,QAAQ,GACR,OAAO,GACP,OAAO,GACP,OAAO,GACP,SAAS,GACT,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,MAAM,WAAW,gBAAgB;IAC/B,oEAAoE;IACpE,EAAE,EAAE,MAAM,CAAC;IACX,yEAAyE;IACzE,UAAU,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,OAAO,EAAE,WAAW,CAAC;IACrB,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,qCAAqC;AACrC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,6DAA6D;AAC7D,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC,0CAA0C;AAC1C,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,MAAM,WAAW,iBAAiB;IAChC,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,eAAe,EAAE,MAAM,CAAC;IACxB,4BAA4B;IAC5B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,eAAe,EAAE,MAAM,CAAC;IACxB,wDAAwD;IACxD,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,cAAc,EAAE,gBAK5B,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,+CAA+C;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc;IACd,MAAM,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
/** LOCO header is always 22 bytes */
|
||||
export const LOCO_HEADER_SIZE = 22;
|
||||
/** Encrypted packet: [length:4][nonce:12][ciphertext+tag] */
|
||||
export const ENCRYPTED_HEADER_SIZE = 16; // 4 (length) + 12 (nonce)
|
||||
/** Handshake packet length field value */
|
||||
export const HANDSHAKE_LENGTH = 256;
|
||||
export const DEFAULT_CONFIG = {
|
||||
host: "211.249.240.122",
|
||||
port: 9282,
|
||||
useTLS: false,
|
||||
serverPublicKey: "",
|
||||
};
|
||||
//# sourceMappingURL=loco.js.map
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"loco.js","sourceRoot":"","sources":["../../src/types/loco.ts"],"names":[],"mappings":"AAmCA,qCAAqC;AACrC,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAEnC,6DAA6D;AAC7D,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC,CAAC,0BAA0B;AAEnE,0CAA0C;AAC1C,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAsBpC,MAAM,CAAC,MAAM,cAAc,GAAqB;IAC9C,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,KAAK;IACb,eAAe,EAAE,EAAE;CACpB,CAAC"}
|
||||
Reference in new issue
Block a user