open-l2encdec 0.0.1 → 0.0.3

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/README.md CHANGED
@@ -1,15 +1,13 @@
1
- # open-l2encdec TypeScript/JavaScript Bindings
2
-
3
- TypeScript and JavaScript bindings for the open-l2encdec WASM module. This package provides a type-safe wrapper around the WebAssembly implementation of the Lineage 2 encryption/decryption library.
1
+ # open-l2encdec typescript bindings
4
2
 
5
3
  ## Installation
6
4
 
7
5
  ```bash
8
- npm install @open-l2encdec/typescript
6
+ npm install open-l2encdec
9
7
  # or
10
- yarn add @open-l2encdec/typescript
8
+ yarn add open-l2encdec
11
9
  # or
12
- pnpm add @open-l2encdec/typescript
10
+ pnpm add open-l2encdec
13
11
  ```
14
12
 
15
13
  ## Usage
@@ -17,7 +15,7 @@ pnpm add @open-l2encdec/typescript
17
15
  ### TypeScript / ES Modules
18
16
 
19
17
  ```typescript
20
- import { initL2EncDec, encode, decode, initParams } from '@open-l2encdec/typescript';
18
+ import { initL2EncDec, encode, decode, initParams } from 'open-l2encdec';
21
19
 
22
20
  // Initialize the module
23
21
  const module = await initL2EncDec();
@@ -34,7 +32,7 @@ const decoded = await decode(encoded, params, module);
34
32
  ### JavaScript / CommonJS
35
33
 
36
34
  ```javascript
37
- const { initL2EncDec, encode, decode, initParams } = require('@open-l2encdec/typescript');
35
+ const { initL2EncDec, encode, decode, initParams } = require('open-l2encdec');
38
36
 
39
37
  (async () => {
40
38
  const module = await initL2EncDec();
@@ -50,7 +48,7 @@ const { initL2EncDec, encode, decode, initParams } = require('@open-l2encdec/typ
50
48
  You can also access the WASM module directly:
51
49
 
52
50
  ```typescript
53
- import createModule from '@open-l2encdec/typescript/wasm';
51
+ import createModule from 'open-l2encdec/wasm';
54
52
 
55
53
  const module = await createModule();
56
54
  const params = new module.Params();
@@ -92,7 +90,7 @@ Initializes default parameters for the specified protocol.
92
90
 
93
91
  - `protocol`: Protocol number (last three digits of file header)
94
92
  - `filename`: Filename used for protocol 121 (XOR_FILENAME)
95
- - `use_legacy_decrypt_rsa`: Use legacy RSA decryption for protocols 411-414
93
+ - `use_legacy_decrypt_rsa`: Use legacy (original) RSA decryption for protocols 411-414
96
94
  - `module`: Optional pre-initialized module (for performance)
97
95
 
98
96
  ### Types
@@ -106,11 +104,9 @@ import type {
106
104
  Type,
107
105
  EncodeResult,
108
106
  DecodeResult
109
- } from '@open-l2encdec/typescript';
107
+ } from 'open-l2encdec';
110
108
  ```
111
109
 
112
- The generated `interface.d.ts` from Emscripten is also available at `@open-l2encdec/typescript/wasm` for direct WASM module type access.
113
-
114
110
  ## Development
115
111
 
116
112
  ### Prerequisites
@@ -125,33 +121,24 @@ The generated `interface.d.ts` from Emscripten is also available at `@open-l2enc
125
121
  1. Install dependencies:
126
122
  ```bash
127
123
  yarn install
128
- # or npm install
129
124
  ```
130
125
 
131
126
  2. Build the WASM module:
132
127
  ```bash
133
128
  yarn wasm:build
134
- # or npm run wasm:build
135
129
  ```
136
130
 
137
131
  3. Build the TypeScript package:
138
132
  ```bash
139
133
  yarn build
140
- # or npm run build
141
134
  ```
142
135
 
143
- This will:
144
- - Compile TypeScript to JavaScript
145
- - Copy WASM artifacts (`l2encdec.js`, `l2encdec.wasm`, `interface.d.ts`) to `dist/`
146
- - Generate type declarations
147
-
148
136
  ### Development Server
149
137
 
150
138
  Run the Vite development server:
151
139
 
152
140
  ```bash
153
141
  yarn dev
154
- # or npm run dev
155
142
  ```
156
143
 
157
144
  ### Publishing to npm
@@ -166,8 +153,6 @@ yarn build
166
153
  npm publish
167
154
  ```
168
155
 
169
- The `prepublishOnly` script will automatically run the build before publishing.
170
-
171
156
  ## License
172
157
 
173
158
  MIT License - see [LICENSE](../../LICENSE) file for details.
package/dist/l2encdec.js CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-l2encdec",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "TypeScript/JavaScript bindings for open-l2encdec WASM module",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",