@hazae41/turbine 0.1.4 → 0.1.5

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.
@@ -53,6 +53,7 @@ var __disposeResources = (this && this.__disposeResources) || (function (Suppres
53
53
  import { RpcPaymentError } from "@hazae41/bobine";
54
54
  import { RpcErr, RpcError, RpcInvalidParamsError, RpcMethodNotFoundError, RpcOk } from "@hazae41/jsonrpc";
55
55
  import { Mutex } from "@hazae41/mutex";
56
+ import { Packed } from "@hazae41/webpack";
56
57
  /**
57
58
  * Translates HTTP or WebSocket into JSON-RPC
58
59
  */
@@ -170,7 +171,7 @@ export class RpcServer {
170
171
  const proven = new Uint8Array(await crypto.subtle.digest("SHA-256", effort));
171
172
  const target = (2n ** 256n) / BigInt("0x" + proven.toHex());
172
173
  const result = await this.worker.execute(module, method, params, target);
173
- return result.toHex();
174
+ return Packed.encode(result).toHex();
174
175
  }
175
176
  catch (e_2) {
176
177
  env_2.error = e_2;
@@ -203,7 +204,7 @@ export class RpcServer {
203
204
  const proven = new Uint8Array(await crypto.subtle.digest("SHA-256", effort));
204
205
  const target = (2n ** 256n) / BigInt("0x" + proven.toHex());
205
206
  const result = await this.worker.simulate(module, method, params, target);
206
- return result.toHex();
207
+ return Packed.encode(result).toHex();
207
208
  }
208
209
  catch (e_3) {
209
210
  env_3.error = e_3;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@hazae41/turbine",
4
- "version": "0.1.4",
4
+ "version": "0.1.5",
5
5
  "description": "Bobine over HTTP and WebSocket",
6
6
  "repository": "github:hazae41/turbine",
7
7
  "author": "hazae41",
@@ -22,14 +22,16 @@
22
22
  }
23
23
  },
24
24
  "dependencies": {
25
- "@hazae41/bobine": "^0.1.2",
25
+ "@hazae41/binary": "^2.1.1",
26
+ "@hazae41/bobine": "^0.1.6",
26
27
  "@hazae41/jsonrpc": "^1.2.1",
27
- "@hazae41/mutex": "^3.0.1"
28
+ "@hazae41/mutex": "^3.0.1",
29
+ "@hazae41/webpack": "^1.0.0"
28
30
  },
29
31
  "devDependencies": {
30
32
  "@hazae41/phobos": "^2.0.16",
31
33
  "@hazae41/tscousin": "^1.0.28",
32
- "@types/node": "^26.6.6",
34
+ "@types/node": "^26.6.11",
33
35
  "typescript": "^7.0.2"
34
36
  },
35
37
  "keywords": [