@lytok/js 1.0.6

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/LICENSE ADDED
@@ -0,0 +1,17 @@
1
+ PROPRIETARY LICENSE
2
+
3
+ Copyright (c) 2026 Jose Miguel Silva Castro (@joguel96). All rights reserved.
4
+
5
+ This software and its associated documentation files (the "Software") are proprietary to Jose Miguel Silva Castro.
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy of the Software for EVALUATION and NON-COMMERCIAL purposes ONLY, subject to the following conditions:
8
+
9
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10
+
11
+ The Software may not be redistributed, sublicensed, or sold without express written permission from the owner.
12
+
13
+ Modification of the binary files (.node, .wasm) or reverse engineering of the core engine is strictly prohibited.
14
+
15
+ FOR COMMERCIAL USE, A PRO LICENSE IS REQUIRED.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND...
package/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # LYTOK-JS:
2
+
3
+ ![Version](https://img.shields.io/badge/version-1.0.6-blue)
4
+ ![License](https://img.shields.io/badge/license-Propietary-red)
5
+ ![Platform](https://img.shields.io/badge/platform-Node.js_|_Browser-lightgrey)
6
+
7
+ ### SDK Oficial de Serialización de Alta Densidad para JavaScript
8
+
9
+ **LYTOK-JS** es la implementación oficial para JavaScript del protocolo LYTOK. Diseñado para maximizar el ahorro de tokens en arquitecturas de IA y ofrecer un rendimiento nativo mediante un núcleo híbrido en Rust.
10
+
11
+ #### ⚠️ AVISO LEGAL: Al instalar, copiar o utilizar este SDK, aceptas de manera expresa los términos y condiciones establecidos en el [EULA.md](/EULA.md). Durante la fase de Early Access, el procesamiento es ilimitado.
12
+
13
+ ## Características Principales
14
+
15
+ - **Eficiencia de Tokens:** Ahorro de hasta un 44% en comparación con JSON para contextos de LLM.
16
+ - **Rendimiento Nativo:** Procesamiento directo a nivel de bits mediante binarios optimizados.
17
+ - **Tipado Real:** Soporte nativo para BigInt, Date y tipos numéricos de alta precisión.
18
+ - **Carga Inteligente:** Conmutación automática entre motor NAPI (Node.js) y WASM (Navegador).
19
+ - **alidación Integrada:** Herramientas para asegurar la integridad de datos post-proceso.
20
+
21
+ ## 📦 Instalación
22
+
23
+ Instala el SDK desde el registro oficial de LYTOK:
24
+
25
+ ```bash
26
+ npm install lytok
27
+ ```
28
+
29
+ ## 🛠️ Guía de Uso
30
+
31
+ El SDK es "zero-config" por defecto. El motor detecta la configuración local del sistema para gestionar cuotas y llaves.
32
+
33
+ ```javascript
34
+ import LYTOK from 'lytok';
35
+
36
+ const data = {
37
+ id: 125853265656235595232n,
38
+ user: 'Mike',
39
+ active: true,
40
+ };
41
+
42
+ // Serialización
43
+ const ltkData = LYTOK.stringify(data, { name: 'User', binary: true });
44
+
45
+ // Deserialización
46
+ const originalData = LYTOK.parse(ltkData);
47
+
48
+ // 3. Validación de Integridad
49
+ const isValid = LYTOK.validate(data, originalData);
50
+ console.log(isValid ? 'Datos íntegros' : 'Error de integridad');
51
+ ```
52
+
53
+ ## ⚖️ Licencia
54
+
55
+ Este SDK es **software propietario**.
56
+
57
+ - **Especificación LYTOK:** Apache License 2.0
58
+
59
+ - **Motor / SDK:** Propiedad privada de Jose Miguel Silva Castro (@joguel96).
60
+
61
+ ---
62
+
63
+ **LYTOK: Eficiencia bruta a nivel de bit.** Maintainer: Jose Miguel Silva Castro ([@joguel96](https://www.github.com/joguel96))
package/dist/EULA.md ADDED
@@ -0,0 +1,33 @@
1
+ # END USER LICENSE AGREEMENT (EULA)
2
+
3
+ #### Last Updated: January 2026
4
+
5
+ This End User License Agreement ("Agreement") is a binding legal agreement between you and Jose Miguel Silva Castro (@joguel96) regarding the use of the LYTOK SDK and Engine.
6
+
7
+ ### 1. GRANT OF LICENSE
8
+
9
+ - **Early Access Unlimited License:** During this current "Early Access" phase, you are granted a non-exclusive, non-transferable license to use the Software without data processing limits.
10
+
11
+ - **Transition Period:** This unlimited access is temporary. Once the official "Tiers" and "Registered Accounts" infrastructure is fully implemented, users will be notified to migrate to the corresponding plan (Free, Community, or Pro).
12
+
13
+ - **Commercial Use:** You are allowed to use the SDK in commercial environments during this phase, provided you acknowledge the software is in a "Beta/Early Access" state.
14
+
15
+ ### 2. RESTRICTIONS
16
+
17
+ You may NOT:
18
+
19
+ - Decompile, reverse engineer, or attempt to derive the source code of the binary components (.node, .wasm).
20
+
21
+ - Redistribute the SDK as a standalone tool or competitive product without explicit authorization.
22
+
23
+ ### 3. DATA INTEGRITY & VALIDATION
24
+
25
+ The SDK provides internal functions to verify data integrity. It is the responsibility of the developer to implement these checks when handling critical data during the transition between JSON and LYTOK formats.
26
+
27
+ ### 4. INTELLECTUAL PROPERTY
28
+
29
+ The LYTOK Specification is open (Apache 2.0), but the Implementation (this SDK and the underlying Engine) remains the exclusive property of Jose Miguel Silva Castro.
30
+
31
+ ### 5. LIMITATION OF LIABILITY
32
+
33
+ The software is provided "as is". In no event shall the author be liable for any damages arising out of the use or inability to use this Early Access software.
package/dist/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # LYTOK-JS:
2
+
3
+ ![Version](https://img.shields.io/badge/version-1.0.6-blue)
4
+ ![License](https://img.shields.io/badge/license-Propietary-red)
5
+ ![Platform](https://img.shields.io/badge/platform-Node.js_|_Browser-lightgrey)
6
+
7
+ ### SDK Oficial de Serialización de Alta Densidad para JavaScript
8
+
9
+ **LYTOK-JS** es la implementación oficial para JavaScript del protocolo LYTOK. Diseñado para maximizar el ahorro de tokens en arquitecturas de IA y ofrecer un rendimiento nativo mediante un núcleo híbrido en Rust.
10
+
11
+ #### ⚠️ AVISO LEGAL: Al instalar, copiar o utilizar este SDK, aceptas de manera expresa los términos y condiciones establecidos en el [EULA.md](/EULA.md). Durante la fase de Early Access, el procesamiento es ilimitado.
12
+
13
+ ## Características Principales
14
+
15
+ - **Eficiencia de Tokens:** Ahorro de hasta un 44% en comparación con JSON para contextos de LLM.
16
+ - **Rendimiento Nativo:** Procesamiento directo a nivel de bits mediante binarios optimizados.
17
+ - **Tipado Real:** Soporte nativo para BigInt, Date y tipos numéricos de alta precisión.
18
+ - **Carga Inteligente:** Conmutación automática entre motor NAPI (Node.js) y WASM (Navegador).
19
+ - **alidación Integrada:** Herramientas para asegurar la integridad de datos post-proceso.
20
+
21
+ ## 📦 Instalación
22
+
23
+ Instala el SDK desde el registro oficial de LYTOK:
24
+
25
+ ```bash
26
+ npm install lytok
27
+ ```
28
+
29
+ ## 🛠️ Guía de Uso
30
+
31
+ El SDK es "zero-config" por defecto. El motor detecta la configuración local del sistema para gestionar cuotas y llaves.
32
+
33
+ ```javascript
34
+ import LYTOK from 'lytok';
35
+
36
+ const data = {
37
+ id: 125853265656235595232n,
38
+ user: 'Mike',
39
+ active: true,
40
+ };
41
+
42
+ // Serialización
43
+ const ltkData = LYTOK.stringify(data, { name: 'User', binary: true });
44
+
45
+ // Deserialización
46
+ const originalData = LYTOK.parse(ltkData);
47
+
48
+ // 3. Validación de Integridad
49
+ const isValid = LYTOK.validate(data, originalData);
50
+ console.log(isValid ? 'Datos íntegros' : 'Error de integridad');
51
+ ```
52
+
53
+ ## ⚖️ Licencia
54
+
55
+ Este SDK es **software propietario**.
56
+
57
+ - **Especificación LYTOK:** Apache License 2.0
58
+
59
+ - **Motor / SDK:** Propiedad privada de Jose Miguel Silva Castro (@joguel96).
60
+
61
+ ---
62
+
63
+ **LYTOK: Eficiencia bruta a nivel de bit.** Maintainer: Jose Miguel Silva Castro ([@joguel96](https://www.github.com/joguel96))
@@ -0,0 +1,26 @@
1
+ /* auto-generated by NAPI-RS */
2
+ /* eslint-disable */
3
+ export declare const enum LytokBinaryTag {
4
+ Null = 0,
5
+ Int = 1,
6
+ Float = 2,
7
+ BoolTrue = 3,
8
+ BoolFalse = 4,
9
+ String = 5,
10
+ Array = 6,
11
+ Map = 7,
12
+ BigInt = 8,
13
+ Date = 9
14
+ }
15
+
16
+ /** * Función directa que convierte un formato lytok a binarios.
17
+ */
18
+ export declare function parse(input: string, formatted?: boolean | undefined | null): Buffer
19
+
20
+ /** * Función directa que convierte un objeto JS a binario.
21
+ */
22
+ export declare function stringifyBinary(data: unknown): Buffer
23
+
24
+ /** * Función legacy que convierte un objeto JS a un formato lytok.
25
+ */
26
+ export declare function stringifyLytok(data: unknown, format?: boolean | undefined | null): string