Kaynağa Gözat

added tshy to all package.json files

benduran 1 ay önce
ebeveyn
işleme
5c5b9134ef
48 değiştirilmiş dosya ile 1543 ekleme ve 146 silme
  1. 8 3
      apps/hermes/client/js/package.json
  2. 7 3
      apps/price_pusher/package.json
  3. 5 2
      governance/pyth_staking_sdk/package.json
  4. 8 3
      lazer/contracts/sui/sdk/js/package.json
  5. 6 2
      lazer/sdk/js-solana/package.json
  6. 8 0
      lazer/sdk/js/.tshy/build.json
  7. 16 0
      lazer/sdk/js/.tshy/commonjs.json
  8. 15 0
      lazer/sdk/js/.tshy/esm.json
  9. 22 15
      lazer/sdk/js/package.json
  10. 2 1
      lazer/sdk/js/tsconfig.build.json
  11. 2 1
      package.json
  12. 0 1
      packages/uicli/eslint.config.js
  13. 0 19
      packages/uicli/package.json
  14. 0 9
      packages/uicli/src/cli.ts
  15. 0 3
      packages/uicli/tsconfig.json
  16. 137 42
      pnpm-lock.yaml
  17. 7 3
      price_service/client/js/package.json
  18. 36 0
      price_service/sdk/js/.tshy-build/esm/AccumulatorUpdateData.d.ts
  19. 154 0
      price_service/sdk/js/.tshy-build/esm/AccumulatorUpdateData.js
  20. 1 0
      price_service/sdk/js/.tshy-build/esm/__tests__/AccumulatorUpdateData.test.d.ts
  21. 2 0
      price_service/sdk/js/.tshy-build/esm/__tests__/AccumulatorUpdateData.test.js
  22. 1 0
      price_service/sdk/js/.tshy-build/esm/__tests__/PriceFeed.test.d.ts
  23. 94 0
      price_service/sdk/js/.tshy-build/esm/__tests__/PriceFeed.test.js
  24. 188 0
      price_service/sdk/js/.tshy-build/esm/index.d.ts
  25. 276 0
      price_service/sdk/js/.tshy-build/esm/index.js
  26. 89 0
      price_service/sdk/js/.tshy-build/esm/schemas/PriceFeed.d.ts
  27. 198 0
      price_service/sdk/js/.tshy-build/esm/schemas/PriceFeed.js
  28. 96 0
      price_service/sdk/js/.tshy-build/esm/schemas/price_feed.json
  29. 9 0
      price_service/sdk/js/.tshy/build.json
  30. 16 0
      price_service/sdk/js/.tshy/commonjs.json
  31. 15 0
      price_service/sdk/js/.tshy/esm.json
  32. 8 3
      price_service/sdk/js/package.json
  33. 8 0
      price_service/sdk/js/tsconfig.build.json
  34. 1 1
      price_service/sdk/js/tsconfig.json
  35. 7 3
      target_chains/aptos/sdk/js/package.json
  36. 8 2
      target_chains/ethereum/entropy_sdk/solidity/package.json
  37. 8 2
      target_chains/ethereum/pulse_sdk/solidity/package.json
  38. 7 3
      target_chains/ethereum/sdk/js/package.json
  39. 12 2
      target_chains/ethereum/sdk/solidity/package.json
  40. 12 2
      target_chains/ethereum/sdk/stylus/pyth-mock-solidity/package.json
  41. 7 3
      target_chains/fuel/sdk/js/package.json
  42. 7 3
      target_chains/solana/sdk/js/pyth_solana_receiver/package.json
  43. 7 3
      target_chains/solana/sdk/js/solana_utils/package.json
  44. 7 3
      target_chains/starknet/sdk/js/package.json
  45. 7 3
      target_chains/sui/sdk/js-iota/package.json
  46. 7 3
      target_chains/sui/sdk/js/package.json
  47. 7 3
      target_chains/ton/sdk/js/package.json
  48. 5 0
      turbo.json

+ 8 - 3
apps/hermes/client/js/package.json

@@ -9,7 +9,8 @@
   "main": "lib/HermesClient.js",
   "types": "lib/HermesClient.d.ts",
   "files": [
-    "lib/**/*"
+    "lib/**/*",
+    "dist/**/*"
   ],
   "repository": {
     "type": "git",
@@ -30,7 +31,8 @@
     "test:format": "prettier --check \"src/**/*.ts\"",
     "prepublishOnly": "pnpm run build:typescript && pnpm run test:lint",
     "preversion": "pnpm run test:lint",
-    "version": "pnpm run format && git add -A src"
+    "version": "pnpm run format && git add -A src",
+    "build": "tshy"
   },
   "keywords": [
     "pyth",
@@ -60,5 +62,8 @@
     "node": ">=22",
     "pnpm": ">=10.19.0"
   },
-  "packageManager": "pnpm@10.19.0"
+  "packageManager": "pnpm@10.19.0",
+  "tshy": {
+    "project": "tsconfig.build.json"
+  }
 }

+ 7 - 3
apps/price_pusher/package.json

@@ -6,7 +6,8 @@
   "main": "lib/index.js",
   "types": "lib/index.d.ts",
   "files": [
-    "lib/**/*"
+    "lib/**/*",
+    "dist/**/*"
   ],
   "bin": {
     "pyth-price-pusher": "./lib/index.js"
@@ -20,7 +21,7 @@
     "access": "public"
   },
   "scripts": {
-    "build": "tsc",
+    "build": "tshy",
     "fix:format": "prettier --write \"src/**/*.ts\"",
     "fix:lint": "eslint src/ --fix --max-warnings 0",
     "test:format": "prettier --check \"src/**/*.ts\"",
@@ -94,5 +95,8 @@
     "node": ">=22",
     "pnpm": ">=10.19.0"
   },
-  "packageManager": "pnpm@10.19.0"
+  "packageManager": "pnpm@10.19.0",
+  "tshy": {
+    "project": "tsconfig.build.json"
+  }
 }

+ 5 - 2
governance/pyth_staking_sdk/package.json

@@ -20,7 +20,7 @@
     "access": "public"
   },
   "scripts": {
-    "build": "tsc --noEmit false --incremental false --declaration true --outDir ./dist",
+    "build": "tshy",
     "fix:format": "prettier --write .",
     "fix:lint": "eslint --fix . --max-warnings 0",
     "test:format": "prettier --check .",
@@ -50,5 +50,8 @@
     "@streamparser/json": "^0.0.22",
     "zod": "catalog:"
   },
-  "packageManager": "pnpm@10.19.0"
+  "packageManager": "pnpm@10.19.0",
+  "tshy": {
+    "project": "tsconfig.build.json"
+  }
 }

+ 8 - 3
lazer/contracts/sui/sdk/js/package.json

@@ -9,7 +9,8 @@
     "pnpm": ">=10.19.0"
   },
   "files": [
-    "dist"
+    "dist",
+    "dist/**/*"
   ],
   "exports": {
     ".": {
@@ -32,7 +33,8 @@
     "test:format": "prettier --check .",
     "test:lint": "eslint . --max-warnings 0",
     "test:types": "tsc",
-    "example:fetch-and-verify": "tsx examples/fetch-and-verify-update.ts"
+    "example:fetch-and-verify": "tsx examples/fetch-and-verify-update.ts",
+    "build": "tshy"
   },
   "dependencies": {
     "@mysten/sui": "catalog:",
@@ -51,5 +53,8 @@
   "publishConfig": {
     "access": "public"
   },
-  "packageManager": "pnpm@10.19.0"
+  "packageManager": "pnpm@10.19.0",
+  "tshy": {
+    "project": "tsconfig.build.json"
+  }
 }

+ 6 - 2
lazer/sdk/js-solana/package.json

@@ -30,7 +30,8 @@
     "test:types": "tsc",
     "test:format": "prettier --check .",
     "fix:format": "prettier --write .",
-    "build:docs": "typedoc --out docs/typedoc src"
+    "build:docs": "typedoc --out docs/typedoc src",
+    "build": "tshy"
   },
   "devDependencies": {
     "@cprussin/eslint-config": "catalog:",
@@ -66,5 +67,8 @@
     "node": ">=22",
     "pnpm": ">=10.19.0"
   },
-  "packageManager": "pnpm@10.19.0"
+  "packageManager": "pnpm@10.19.0",
+  "tshy": {
+    "project": "tsconfig.build.json"
+  }
 }

+ 8 - 0
lazer/sdk/js/.tshy/build.json

@@ -0,0 +1,8 @@
+{
+  "extends": "../tsconfig.build.json",
+  "compilerOptions": {
+    "rootDir": "../src",
+    "module": "nodenext",
+    "moduleResolution": "nodenext"
+  }
+}

+ 16 - 0
lazer/sdk/js/.tshy/commonjs.json

@@ -0,0 +1,16 @@
+{
+  "extends": "./build.json",
+  "include": [
+    "../src/**/*.ts",
+    "../src/**/*.cts",
+    "../src/**/*.tsx",
+    "../src/**/*.json"
+  ],
+  "exclude": [
+    "../src/**/*.mts",
+    "../src/package.json"
+  ],
+  "compilerOptions": {
+    "outDir": "../.tshy-build/commonjs"
+  }
+}

+ 15 - 0
lazer/sdk/js/.tshy/esm.json

@@ -0,0 +1,15 @@
+{
+  "extends": "./build.json",
+  "include": [
+    "../src/**/*.ts",
+    "../src/**/*.mts",
+    "../src/**/*.tsx",
+    "../src/**/*.json"
+  ],
+  "exclude": [
+    "../src/package.json"
+  ],
+  "compilerOptions": {
+    "outDir": "../.tshy-build/esm"
+  }
+}

+ 22 - 15
lazer/sdk/js/package.json

@@ -12,21 +12,9 @@
   "files": [
     "dist/**/*"
   ],
-  "main": "./dist/cjs/index.js",
-  "types": "./dist/cjs/index.d.ts",
-  "exports": {
-    "import": {
-      "types": "./dist/esm/index.d.ts",
-      "default": "./dist/esm/index.js"
-    },
-    "require": {
-      "types": "./dist/cjs/index.d.ts",
-      "default": "./dist/cjs/index.js"
-    }
-  },
   "scripts": {
-    "build:cjs": "tsc --project tsconfig.build.json --verbatimModuleSyntax false --module commonjs --outDir ./dist/cjs && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json",
-    "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm && echo '{\"type\":\"module\"}' > dist/esm/package.json",
+    "build": "tshy",
+    "clean": "rm -rf dist/",
     "fix:lint": "eslint --fix . --max-warnings 0",
     "test:lint": "eslint . --max-warnings 0",
     "test:types": "tsc",
@@ -70,5 +58,24 @@
     "ts-log": "^2.2.7",
     "ws": "^8.18.0"
   },
-  "packageManager": "pnpm@10.19.0"
+  "packageManager": "pnpm@10.19.0",
+  "tshy": {
+    "project": "tsconfig.build.json"
+  },
+  "exports": {
+    "./package.json": "./package.json",
+    ".": {
+      "import": {
+        "types": "./dist/esm/index.d.ts",
+        "default": "./dist/esm/index.js"
+      },
+      "require": {
+        "types": "./dist/commonjs/index.d.ts",
+        "default": "./dist/commonjs/index.js"
+      }
+    }
+  },
+  "main": "./dist/commonjs/index.js",
+  "types": "./dist/commonjs/index.d.ts",
+  "module": "./dist/esm/index.js"
 }

+ 2 - 1
lazer/sdk/js/tsconfig.build.json

@@ -3,7 +3,8 @@
   "compilerOptions": {
     "noEmit": false,
     "incremental": false,
-    "declaration": true
+    "declaration": true,
+    "verbatimModuleSyntax": false
   },
   "exclude": ["node_modules", "dist", "examples/"]
 }

+ 2 - 1
package.json

@@ -16,6 +16,7 @@
     "@cprussin/prettier-config": "catalog:",
     "prettier": "catalog:",
     "prettier-plugin-solidity": "catalog:",
-    "turbo": "^2.5.8"
+    "turbo": "^2.5.8",
+    "tshy": "^3.0.3"
   }
 }

+ 0 - 1
packages/uicli/eslint.config.js

@@ -1 +0,0 @@
-export { base as default } from '@cprussin/eslint-config';

+ 0 - 19
packages/uicli/package.json

@@ -1,19 +0,0 @@
-{
-  "private": true,
-  "name": "uicli",
-  "description": "a simple, handy-dandy CLI tool for running various UI commands to build and run your JS and TS code",
-  "version": "0.0.0",
-  "scripts": {
-    "start": "tsx ./src/cli.ts"
-  },
-  "dependencies": {
-    "tsx": "catalog:",
-    "yargs": "catalog:"
-  },
-  "devDependencies": {
-    "@types/node": "catalog:",
-    "@cprussin/eslint-config": "catalog:",
-    "@cprussin/tsconfig": "catalog:",
-    "@types/yargs": "catalog:"
-  }
-}

+ 0 - 9
packages/uicli/src/cli.ts

@@ -1,9 +0,0 @@
-import createCLI from 'yargs';
-import { hideBin } from 'yargs/helpers';
-
-async function setupCLI() {
-  const yargs = createCLI(hideBin(process.argv));
-  const {} =
-}
-
-setupCLI();

+ 0 - 3
packages/uicli/tsconfig.json

@@ -1,3 +0,0 @@
-{
-  "extends": "@cprussin/tsconfig/base.json"
-}

+ 137 - 42
pnpm-lock.yaml

@@ -379,6 +379,9 @@ importers:
       prettier-plugin-solidity:
         specifier: 'catalog:'
         version: 1.4.2(prettier@3.5.3)
+      tshy:
+        specifier: ^3.0.3
+        version: 3.0.3
       turbo:
         specifier: ^2.5.8
         version: 2.5.8
@@ -1422,7 +1425,7 @@ importers:
     dependencies:
       '@certusone/wormhole-sdk':
         specifier: ^0.9.8
-        version: 0.9.24(@types/react@19.1.0)(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.2)(utf-8-validate@5.0.10)
+        version: 0.9.24(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.2)(utf-8-validate@5.0.10)
       '@coral-xyz/anchor':
         specifier: ^0.29.0
         version: 0.29.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)
@@ -1772,7 +1775,7 @@ importers:
     dependencies:
       '@certusone/wormhole-sdk':
         specifier: ^0.10.15
-        version: 0.10.18(@types/react@19.1.0)(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@4.9.5)(utf-8-validate@5.0.10)
+        version: 0.10.18(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@4.9.5)(utf-8-validate@5.0.10)
       '@coral-xyz/anchor':
         specifier: ^0.29.0
         version: 0.29.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)
@@ -2345,28 +2348,6 @@ importers:
         specifier: 'catalog:'
         version: 5.8.2
 
-  packages/uicli:
-    dependencies:
-      tsx:
-        specifier: 'catalog:'
-        version: 4.20.6
-      yargs:
-        specifier: 'catalog:'
-        version: 18.0.0
-    devDependencies:
-      '@cprussin/eslint-config':
-        specifier: 'catalog:'
-        version: 4.0.2(@testing-library/dom@10.4.0)(@typescript-eslint/eslint-plugin@8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2))(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2))(@typescript-eslint/parser@8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2))(eslint@9.23.0(jiti@2.4.2))(jest@29.7.0(@types/node@22.14.0)(ts-node@10.9.2(@swc/core@1.13.2)(@types/node@22.14.0)(typescript@5.8.2)))(ts-node@10.9.2(@swc/core@1.13.2)(@types/node@22.14.0)(typescript@5.8.2))(turbo@2.5.8)(typescript@5.8.2)
-      '@cprussin/tsconfig':
-        specifier: 'catalog:'
-        version: 3.1.2(typescript@5.8.2)
-      '@types/node':
-        specifier: 'catalog:'
-        version: 22.14.0
-      '@types/yargs':
-        specifier: 'catalog:'
-        version: 17.0.33
-
   price_service/client/js:
     dependencies:
       '@pythnetwork/price-service-sdk':
@@ -2428,6 +2409,9 @@ importers:
         specifier: ^5.2.1
         version: 5.2.1
     devDependencies:
+      '@cprussin/tsconfig':
+        specifier: 'catalog:'
+        version: 3.1.2(typescript@4.9.5)
       '@types/bn.js':
         specifier: ^5.1.5
         version: 5.1.6
@@ -2744,7 +2728,7 @@ importers:
     dependencies:
       '@certusone/wormhole-sdk':
         specifier: ^0.9.22
-        version: 0.9.24(@types/react@19.1.0)(bufferutil@4.0.7)(encoding@0.1.13)(google-protobuf@3.21.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.2)(utf-8-validate@6.0.3)
+        version: 0.9.24(bufferutil@4.0.7)(encoding@0.1.13)(google-protobuf@3.21.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.2)(utf-8-validate@6.0.3)
       '@matterlabs/hardhat-zksync':
         specifier: ^1.1.0
         version: 1.5.0(72d1c37dadfb409731b518bd145750dd)
@@ -3126,7 +3110,7 @@ importers:
     dependencies:
       '@certusone/wormhole-sdk':
         specifier: ^0.9.12
-        version: 0.9.24(@types/react@19.1.0)(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.2)(utf-8-validate@5.0.10)
+        version: 0.9.24(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.2)(utf-8-validate@5.0.10)
       '@mysten/sui':
         specifier: ^1.3.0
         version: 1.26.1(typescript@5.8.2)
@@ -3163,7 +3147,7 @@ importers:
     dependencies:
       '@certusone/wormhole-sdk':
         specifier: ^0.9.12
-        version: 0.9.24(@types/react@19.1.0)(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.2)(utf-8-validate@5.0.10)
+        version: 0.9.24(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.2)(utf-8-validate@5.0.10)
       '@iota/iota-sdk':
         specifier: ^0.5.0
         version: 0.5.0(typescript@5.8.2)
@@ -12997,6 +12981,10 @@ packages:
     resolution: {integrity: sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==}
     engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
 
+  chalk@5.6.2:
+    resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==}
+    engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
+
   change-case@4.1.2:
     resolution: {integrity: sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==}
 
@@ -15646,6 +15634,11 @@ packages:
     resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==}
     hasBin: true
 
+  glob@11.0.3:
+    resolution: {integrity: sha512-2Nim7dha1KVkaiF4q6Dj+ngPPMdfvLJEOpZk/jKiUAkqKebpGAWQXAq9z1xu9HKu5lWfqw/FASuccEjyznjPaA==}
+    engines: {node: 20 || >=22}
+    hasBin: true
+
   glob@7.1.6:
     resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==}
     deprecated: Glob versions prior to v9 are no longer supported
@@ -16573,6 +16566,10 @@ packages:
   jackspeak@3.4.3:
     resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==}
 
+  jackspeak@4.1.1:
+    resolution: {integrity: sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==}
+    engines: {node: 20 || >=22}
+
   jake@10.9.2:
     resolution: {integrity: sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==}
     engines: {node: '>=10'}
@@ -18550,6 +18547,10 @@ packages:
     resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}
     engines: {node: '>=16 || 14 >=14.18'}
 
+  path-scurry@2.0.0:
+    resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==}
+    engines: {node: 20 || >=22}
+
   path-to-regexp@0.1.12:
     resolution: {integrity: sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==}
 
@@ -18694,6 +18695,10 @@ packages:
     resolution: {integrity: sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==}
     engines: {node: '>=10.13.0'}
 
+  polite-json@5.0.0:
+    resolution: {integrity: sha512-OLS/0XeUAcE8a2fdwemNja+udKgXNnY6yKVIXqAD2zVRx1KvY6Ato/rZ2vdzbxqYwPW0u6SCNC/bAMPNzpzxbw==}
+    engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
+
   pony-cause@2.1.11:
     resolution: {integrity: sha512-M7LhCsdNbNgiLYiP4WjsfLUuFmCfnjdF6jKe2R9NKl4WFN+HZPGHJZ9lnLP7f9ZnKe3U9nuWD0szirmj+migUg==}
     engines: {node: '>=12.0.0'}
@@ -19616,6 +19621,10 @@ packages:
     resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==}
     engines: {node: '>=8'}
 
+  resolve-import@2.0.0:
+    resolution: {integrity: sha512-jpKjLibLuc8D1XEV2+7zb0aqN7I8d12u89g/v6IsgCzdVlccMQJq4TKkPw5fbhHdxhm7nbVtN+KvOTnjFf+nEA==}
+    engines: {node: 20 || >=22}
+
   resolve-pkg-maps@1.0.0:
     resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}
 
@@ -19676,6 +19685,11 @@ packages:
     resolution: {integrity: sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==}
     hasBin: true
 
+  rimraf@6.0.1:
+    resolution: {integrity: sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==}
+    engines: {node: 20 || >=22}
+    hasBin: true
+
   ripemd160-min@0.0.6:
     resolution: {integrity: sha512-+GcJgQivhs6S9qvLogusiTcS9kQUfgR75whKuy5jIhuiOfQuJ8fjqxV6EGD5duH1Y/FawFUMtMhyeq3Fbnib8A==}
     engines: {node: '>=8'}
@@ -20579,6 +20593,11 @@ packages:
   symbol.inspect@1.0.1:
     resolution: {integrity: sha512-YQSL4duoHmLhsTD1Pw8RW6TZ5MaTX5rXJnqacJottr2P2LZBF/Yvrc3ku4NUpMOm8aM0KOCqM+UAkMA5HWQCzQ==}
 
+  sync-content@2.0.1:
+    resolution: {integrity: sha512-NI1mo514yFhr8pV/5Etvgh+pSBUIpoAKoiBIUwALVlQQNAwb40bTw8hhPFaip/dvv0GhpHVOq0vq8iY02ppLTg==}
+    engines: {node: 20 || >=22}
+    hasBin: true
+
   synckit@0.10.3:
     resolution: {integrity: sha512-R1urvuyiTaWfeCggqEvpDJwAlDVdsT9NM+IP//Tk2x7qHCkSvBk/fwFgw/TLAHzZlrAnnazMcRw0ZD8HlYFTEQ==}
     engines: {node: ^14.18.0 || >=16.0.0}
@@ -20981,6 +21000,11 @@ packages:
     resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==}
     engines: {node: '>=6'}
 
+  tshy@3.0.3:
+    resolution: {integrity: sha512-bUX6HQCvVdPyPLy2VZuKw95CtYD5aRSEgYEK7IPV9l9xN/z284kl5/hIwOfLY/mZOOdhrO34dFOOcL1VUMVyaw==}
+    engines: {node: 20 || >=22}
+    hasBin: true
+
   tslib@1.14.1:
     resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==}
 
@@ -21157,6 +21181,11 @@ packages:
     engines: {node: '>=14.17'}
     hasBin: true
 
+  typescript@5.9.3:
+    resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==}
+    engines: {node: '>=14.17'}
+    hasBin: true
+
   typical@4.0.0:
     resolution: {integrity: sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==}
     engines: {node: '>=8'}
@@ -21639,6 +21668,10 @@ packages:
       typescript:
         optional: true
 
+  walk-up-path@4.0.0:
+    resolution: {integrity: sha512-3hu+tD8YzSLGuFYtPRb48vdhKMi0KQV5sn+uWr8+7dMEq/2G/dtLrdDinkLjqq5TIbIBjYJ4Ax/n3YiaW7QM8A==}
+    engines: {node: 20 || >=22}
+
   walker@1.0.8:
     resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==}
 
@@ -24681,14 +24714,14 @@ snapshots:
       '@types/long': 4.0.2
       '@types/node': 18.19.86
 
-  '@certusone/wormhole-sdk@0.10.18(@types/react@19.1.0)(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@4.9.5)(utf-8-validate@5.0.10)':
+  '@certusone/wormhole-sdk@0.10.18(@types/react@19.1.0)(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.2)(utf-8-validate@5.0.10)':
     dependencies:
       '@certusone/wormhole-sdk-proto-web': 0.0.7(google-protobuf@3.21.4)
       '@certusone/wormhole-sdk-wasm': 0.0.1
       '@coral-xyz/borsh': 0.2.6(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))
       '@mysten/sui.js': 0.32.2(bufferutil@4.0.9)(utf-8-validate@5.0.10)
       '@project-serum/anchor': 0.25.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)
-      '@solana/spl-token': 0.3.11(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(encoding@0.1.13)(typescript@4.9.5)(utf-8-validate@5.0.10)
+      '@solana/spl-token': 0.3.11(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(utf-8-validate@5.0.10)
       '@solana/web3.js': 1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)
       '@terra-money/terra.js': 3.1.9
       '@xpla/xpla.js': 0.2.3
@@ -24719,14 +24752,14 @@ snapshots:
       - typescript
       - utf-8-validate
 
-  '@certusone/wormhole-sdk@0.10.18(@types/react@19.1.0)(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.2)(utf-8-validate@5.0.10)':
+  '@certusone/wormhole-sdk@0.10.18(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@4.9.5)(utf-8-validate@5.0.10)':
     dependencies:
       '@certusone/wormhole-sdk-proto-web': 0.0.7(google-protobuf@3.21.4)
       '@certusone/wormhole-sdk-wasm': 0.0.1
       '@coral-xyz/borsh': 0.2.6(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))
       '@mysten/sui.js': 0.32.2(bufferutil@4.0.9)(utf-8-validate@5.0.10)
       '@project-serum/anchor': 0.25.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)
-      '@solana/spl-token': 0.3.11(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(utf-8-validate@5.0.10)
+      '@solana/spl-token': 0.3.11(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(encoding@0.1.13)(typescript@4.9.5)(utf-8-validate@5.0.10)
       '@solana/web3.js': 1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)
       '@terra-money/terra.js': 3.1.9
       '@xpla/xpla.js': 0.2.3
@@ -24757,7 +24790,7 @@ snapshots:
       - typescript
       - utf-8-validate
 
-  '@certusone/wormhole-sdk@0.9.24(@types/react@19.1.0)(bufferutil@4.0.7)(encoding@0.1.13)(google-protobuf@3.21.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.2)(utf-8-validate@6.0.3)':
+  '@certusone/wormhole-sdk@0.9.24(bufferutil@4.0.7)(encoding@0.1.13)(google-protobuf@3.21.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.2)(utf-8-validate@6.0.3)':
     dependencies:
       '@certusone/wormhole-sdk-proto-web': 0.0.6(google-protobuf@3.21.4)
       '@certusone/wormhole-sdk-wasm': 0.0.1
@@ -24779,7 +24812,7 @@ snapshots:
       near-api-js: 1.1.0(encoding@0.1.13)
     optionalDependencies:
       '@injectivelabs/networks': 1.10.12
-      '@injectivelabs/sdk-ts': 1.10.72(@types/react@19.1.0)(bufferutil@4.0.7)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(utf-8-validate@6.0.3)
+      '@injectivelabs/sdk-ts': 1.10.72(bufferutil@4.0.7)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(utf-8-validate@6.0.3)
       '@injectivelabs/utils': 1.10.12
     transitivePeerDependencies:
       - '@types/react'
@@ -24795,7 +24828,7 @@ snapshots:
       - typescript
       - utf-8-validate
 
-  '@certusone/wormhole-sdk@0.9.24(@types/react@19.1.0)(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.2)(utf-8-validate@5.0.10)':
+  '@certusone/wormhole-sdk@0.9.24(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.2)(utf-8-validate@5.0.10)':
     dependencies:
       '@certusone/wormhole-sdk-proto-web': 0.0.6(google-protobuf@3.21.4)
       '@certusone/wormhole-sdk-wasm': 0.0.1
@@ -25648,6 +25681,10 @@ snapshots:
       - prettier-plugin-style-order
       - prettier-plugin-svelte
 
+  '@cprussin/tsconfig@3.1.2(typescript@4.9.5)':
+    dependencies:
+      typescript: 4.9.5
+
   '@cprussin/tsconfig@3.1.2(typescript@5.8.2)':
     dependencies:
       typescript: 5.8.2
@@ -27415,12 +27452,12 @@ snapshots:
       protobufjs: 7.4.0
       rxjs: 7.8.2
 
-  '@injectivelabs/sdk-ts@1.10.72(@types/react@19.1.0)(bufferutil@4.0.7)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(utf-8-validate@6.0.3)':
+  '@injectivelabs/sdk-ts@1.10.72(@types/react@19.1.0)(bufferutil@4.0.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(utf-8-validate@5.0.10)':
     dependencies:
       '@apollo/client': 3.13.5(@types/react@19.1.0)(graphql@16.10.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
       '@cosmjs/amino': 0.30.1
       '@cosmjs/proto-signing': 0.30.1
-      '@cosmjs/stargate': 0.30.1(bufferutil@4.0.7)(utf-8-validate@6.0.3)
+      '@cosmjs/stargate': 0.30.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)
       '@ethersproject/bytes': 5.8.0
       '@injectivelabs/core-proto-ts': 0.0.14
       '@injectivelabs/exceptions': 1.14.47
@@ -27439,9 +27476,9 @@ snapshots:
       bech32: 2.0.0
       bip39: 3.1.0
       cosmjs-types: 0.7.2
-      eth-crypto: 2.7.0(bufferutil@4.0.7)(utf-8-validate@6.0.3)
+      eth-crypto: 2.7.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)
       ethereumjs-util: 7.1.5
-      ethers: 5.8.0(bufferutil@4.0.7)(utf-8-validate@6.0.3)
+      ethers: 5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)
       google-protobuf: 3.21.4
       graphql: 16.10.0
       http-status-codes: 2.3.0
@@ -27464,12 +27501,12 @@ snapshots:
       - utf-8-validate
     optional: true
 
-  '@injectivelabs/sdk-ts@1.10.72(@types/react@19.1.0)(bufferutil@4.0.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(utf-8-validate@5.0.10)':
+  '@injectivelabs/sdk-ts@1.10.72(bufferutil@4.0.7)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(utf-8-validate@6.0.3)':
     dependencies:
       '@apollo/client': 3.13.5(@types/react@19.1.0)(graphql@16.10.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
       '@cosmjs/amino': 0.30.1
       '@cosmjs/proto-signing': 0.30.1
-      '@cosmjs/stargate': 0.30.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)
+      '@cosmjs/stargate': 0.30.1(bufferutil@4.0.7)(utf-8-validate@6.0.3)
       '@ethersproject/bytes': 5.8.0
       '@injectivelabs/core-proto-ts': 0.0.14
       '@injectivelabs/exceptions': 1.14.47
@@ -27488,9 +27525,9 @@ snapshots:
       bech32: 2.0.0
       bip39: 3.1.0
       cosmjs-types: 0.7.2
-      eth-crypto: 2.7.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)
+      eth-crypto: 2.7.0(bufferutil@4.0.7)(utf-8-validate@6.0.3)
       ethereumjs-util: 7.1.5
-      ethers: 5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)
+      ethers: 5.8.0(bufferutil@4.0.7)(utf-8-validate@6.0.3)
       google-protobuf: 3.21.4
       graphql: 16.10.0
       http-status-codes: 2.3.0
@@ -39303,6 +39340,8 @@ snapshots:
 
   chalk@5.4.1: {}
 
+  chalk@5.6.2: {}
+
   change-case@4.1.2:
     dependencies:
       camel-case: 4.1.2
@@ -43028,6 +43067,15 @@ snapshots:
       package-json-from-dist: 1.0.1
       path-scurry: 1.11.1
 
+  glob@11.0.3:
+    dependencies:
+      foreground-child: 3.3.1
+      jackspeak: 4.1.1
+      minimatch: 10.0.3
+      minipass: 7.1.2
+      package-json-from-dist: 1.0.1
+      path-scurry: 2.0.0
+
   glob@7.1.6:
     dependencies:
       fs.realpath: 1.0.0
@@ -44195,6 +44243,10 @@ snapshots:
     optionalDependencies:
       '@pkgjs/parseargs': 0.11.0
 
+  jackspeak@4.1.1:
+    dependencies:
+      '@isaacs/cliui': 8.0.2
+
   jake@10.9.2:
     dependencies:
       async: 3.2.6
@@ -47417,6 +47469,11 @@ snapshots:
       lru-cache: 10.4.3
       minipass: 7.1.2
 
+  path-scurry@2.0.0:
+    dependencies:
+      lru-cache: 11.2.1
+      minipass: 7.1.2
+
   path-to-regexp@0.1.12: {}
 
   path-to-regexp@1.9.0:
@@ -47565,6 +47622,8 @@ snapshots:
 
   pngjs@5.0.0: {}
 
+  polite-json@5.0.0: {}
+
   pony-cause@2.1.11: {}
 
   popmotion@11.0.3:
@@ -48855,6 +48914,11 @@ snapshots:
 
   resolve-from@5.0.0: {}
 
+  resolve-import@2.0.0:
+    dependencies:
+      glob: 11.0.3
+      walk-up-path: 4.0.0
+
   resolve-pkg-maps@1.0.0: {}
 
   resolve-url-loader@5.0.0:
@@ -48914,6 +48978,11 @@ snapshots:
     dependencies:
       glob: 10.4.5
 
+  rimraf@6.0.1:
+    dependencies:
+      glob: 11.0.3
+      package-json-from-dist: 1.0.1
+
   ripemd160-min@0.0.6: {}
 
   ripemd160@2.0.2:
@@ -50141,6 +50210,14 @@ snapshots:
 
   symbol.inspect@1.0.1: {}
 
+  sync-content@2.0.1:
+    dependencies:
+      glob: 11.0.3
+      mkdirp: 3.0.1
+      path-scurry: 2.0.0
+      rimraf: 6.0.1
+      tshy: 3.0.3
+
   synckit@0.10.3:
     dependencies:
       '@pkgr/core': 0.2.0
@@ -50926,6 +51003,20 @@ snapshots:
       minimist: 1.2.8
       strip-bom: 3.0.0
 
+  tshy@3.0.3:
+    dependencies:
+      chalk: 5.6.2
+      chokidar: 4.0.3
+      foreground-child: 3.3.1
+      minimatch: 10.0.3
+      mkdirp: 3.0.1
+      polite-json: 5.0.0
+      resolve-import: 2.0.0
+      rimraf: 6.0.1
+      sync-content: 2.0.1
+      typescript: 5.9.3
+      walk-up-path: 4.0.0
+
   tslib@1.14.1: {}
 
   tslib@2.7.0: {}
@@ -51091,6 +51182,8 @@ snapshots:
 
   typescript@5.8.2: {}
 
+  typescript@5.9.3: {}
+
   typical@4.0.0: {}
 
   typical@7.3.0: {}
@@ -51670,6 +51763,8 @@ snapshots:
       - utf-8-validate
       - zod
 
+  walk-up-path@4.0.0: {}
+
   walker@1.0.8:
     dependencies:
       makeerror: 1.0.12

+ 7 - 3
price_service/client/js/package.json

@@ -10,7 +10,8 @@
   "main": "lib/index.js",
   "types": "lib/index.d.ts",
   "files": [
-    "lib/**/*"
+    "lib/**/*",
+    "dist/**/*"
   ],
   "repository": {
     "type": "git",
@@ -22,7 +23,7 @@
   },
   "scripts": {
     "test:e2e": "jest --testPathPattern=.*.e2e.test.ts",
-    "build": "tsc",
+    "build": "tshy",
     "example": "pnpm run build && node lib/examples/PriceServiceClient.js",
     "fix:format": "prettier --write \"src/**/*.ts\"",
     "fix:lint": "eslint src/ --fix --max-warnings 0",
@@ -62,5 +63,8 @@
     "node": ">=22",
     "pnpm": ">=10.19.0"
   },
-  "packageManager": "pnpm@10.19.0"
+  "packageManager": "pnpm@10.19.0",
+  "tshy": {
+    "project": "tsconfig.build.json"
+  }
 }

+ 36 - 0
price_service/sdk/js/.tshy-build/esm/AccumulatorUpdateData.d.ts

@@ -0,0 +1,36 @@
+import BN from "bn.js";
+export type AccumulatorUpdateData = {
+    vaa: Buffer;
+    updates: {
+        message: Buffer;
+        proof: number[][];
+    }[];
+};
+export type PriceFeedMessage = {
+    feedId: Buffer;
+    price: BN;
+    confidence: BN;
+    exponent: number;
+    publishTime: BN;
+    prevPublishTime: BN;
+    emaPrice: BN;
+    emaConf: BN;
+};
+export type TwapMessage = {
+    feedId: Buffer;
+    cumulativePrice: BN;
+    cumulativeConf: BN;
+    numDownSlots: BN;
+    exponent: number;
+    publishTime: BN;
+    prevPublishTime: BN;
+    publishSlot: BN;
+};
+export declare function isAccumulatorUpdateData(updateBytes: Buffer): boolean;
+export declare function parsePriceFeedMessage(message: Buffer): PriceFeedMessage;
+export declare function parseTwapMessage(message: Buffer): TwapMessage;
+/**
+ * An AccumulatorUpdateData contains a VAA and a list of updates. This function returns a new serialized AccumulatorUpdateData with only the updates in the range [start, end).
+ */
+export declare function sliceAccumulatorUpdateData(data: Buffer, start?: number, end?: number): Buffer;
+export declare function parseAccumulatorUpdateData(data: Buffer): AccumulatorUpdateData;

+ 154 - 0
price_service/sdk/js/.tshy-build/esm/AccumulatorUpdateData.js

@@ -0,0 +1,154 @@
+import BN from "bn.js";
+const ACCUMULATOR_MAGIC = "504e4155";
+const MAJOR_VERSION = 1;
+const MINOR_VERSION = 0;
+const KECCAK160_HASH_SIZE = 20;
+const PRICE_FEED_MESSAGE_VARIANT = 0;
+const TWAP_MESSAGE_VARIANT = 1;
+export function isAccumulatorUpdateData(updateBytes) {
+    return (updateBytes.toString("hex").slice(0, 8) === ACCUMULATOR_MAGIC &&
+        updateBytes[4] === MAJOR_VERSION &&
+        updateBytes[5] === MINOR_VERSION);
+}
+export function parsePriceFeedMessage(message) {
+    let cursor = 0;
+    const variant = message.readUInt8(cursor);
+    if (variant !== PRICE_FEED_MESSAGE_VARIANT) {
+        throw new Error("Not a price feed message");
+    }
+    cursor += 1;
+    const feedId = message.subarray(cursor, cursor + 32);
+    cursor += 32;
+    const price = new BN(message.subarray(cursor, cursor + 8), "be");
+    cursor += 8;
+    const confidence = new BN(message.subarray(cursor, cursor + 8), "be");
+    cursor += 8;
+    const exponent = message.readInt32BE(cursor);
+    cursor += 4;
+    const publishTime = new BN(message.subarray(cursor, cursor + 8), "be");
+    cursor += 8;
+    const prevPublishTime = new BN(message.subarray(cursor, cursor + 8), "be");
+    cursor += 8;
+    const emaPrice = new BN(message.subarray(cursor, cursor + 8), "be");
+    cursor += 8;
+    const emaConf = new BN(message.subarray(cursor, cursor + 8), "be");
+    cursor += 8;
+    return {
+        feedId,
+        price,
+        confidence,
+        exponent,
+        publishTime,
+        prevPublishTime,
+        emaPrice,
+        emaConf,
+    };
+}
+export function parseTwapMessage(message) {
+    let cursor = 0;
+    const variant = message.readUInt8(cursor);
+    if (variant !== TWAP_MESSAGE_VARIANT) {
+        throw new Error("Not a twap message");
+    }
+    cursor += 1;
+    const feedId = message.subarray(cursor, cursor + 32);
+    cursor += 32;
+    const cumulativePrice = new BN(message.subarray(cursor, cursor + 16), "be");
+    cursor += 16;
+    const cumulativeConf = new BN(message.subarray(cursor, cursor + 16), "be");
+    cursor += 16;
+    const numDownSlots = new BN(message.subarray(cursor, cursor + 8), "be");
+    cursor += 8;
+    const exponent = message.readInt32BE(cursor);
+    cursor += 4;
+    const publishTime = new BN(message.subarray(cursor, cursor + 8), "be");
+    cursor += 8;
+    const prevPublishTime = new BN(message.subarray(cursor, cursor + 8), "be");
+    cursor += 8;
+    const publishSlot = new BN(message.subarray(cursor, cursor + 8), "be");
+    cursor += 8;
+    return {
+        feedId,
+        cumulativePrice,
+        cumulativeConf,
+        numDownSlots,
+        exponent,
+        publishTime,
+        prevPublishTime,
+        publishSlot,
+    };
+}
+/**
+ * An AccumulatorUpdateData contains a VAA and a list of updates. This function returns a new serialized AccumulatorUpdateData with only the updates in the range [start, end).
+ */
+export function sliceAccumulatorUpdateData(data, start, end) {
+    if (!isAccumulatorUpdateData(data)) {
+        throw new Error("Invalid accumulator message");
+    }
+    let cursor = 6;
+    const trailingPayloadSize = data.readUint8(cursor);
+    cursor += 1 + trailingPayloadSize;
+    // const proofType = data.readUint8(cursor);
+    cursor += 1;
+    const vaaSize = data.readUint16BE(cursor);
+    cursor += 2;
+    cursor += vaaSize;
+    const endOfVaa = cursor;
+    const updates = [];
+    const numUpdates = data.readUInt8(cursor);
+    cursor += 1;
+    for (let i = 0; i < numUpdates; i++) {
+        const updateStart = cursor;
+        const messageSize = data.readUint16BE(cursor);
+        cursor += 2;
+        cursor += messageSize;
+        const numProofs = data.readUInt8(cursor);
+        cursor += 1;
+        cursor += KECCAK160_HASH_SIZE * numProofs;
+        updates.push(data.subarray(updateStart, cursor));
+    }
+    if (cursor !== data.length) {
+        throw new Error("Didn't reach the end of the message");
+    }
+    const sliceUpdates = updates.slice(start, end);
+    return Buffer.concat([
+        data.subarray(0, endOfVaa),
+        Buffer.from([sliceUpdates.length]),
+        ...updates.slice(start, end),
+    ]);
+}
+export function parseAccumulatorUpdateData(data) {
+    if (!isAccumulatorUpdateData(data)) {
+        throw new Error("Invalid accumulator message");
+    }
+    let cursor = 6;
+    const trailingPayloadSize = data.readUint8(cursor);
+    cursor += 1 + trailingPayloadSize;
+    // const proofType = data.readUint8(cursor);
+    cursor += 1;
+    const vaaSize = data.readUint16BE(cursor);
+    cursor += 2;
+    const vaa = data.subarray(cursor, cursor + vaaSize);
+    cursor += vaaSize;
+    const numUpdates = data.readUInt8(cursor);
+    const updates = [];
+    cursor += 1;
+    for (let i = 0; i < numUpdates; i++) {
+        const messageSize = data.readUint16BE(cursor);
+        cursor += 2;
+        const message = data.subarray(cursor, cursor + messageSize);
+        cursor += messageSize;
+        const numProofs = data.readUInt8(cursor);
+        cursor += 1;
+        const proof = [];
+        for (let j = 0; j < numProofs; j++) {
+            proof.push(Array.from(data.subarray(cursor, cursor + KECCAK160_HASH_SIZE)));
+            cursor += KECCAK160_HASH_SIZE;
+        }
+        updates.push({ message, proof });
+    }
+    if (cursor !== data.length) {
+        throw new Error("Didn't reach the end of the message");
+    }
+    return { vaa, updates };
+}

+ 1 - 0
price_service/sdk/js/.tshy-build/esm/__tests__/AccumulatorUpdateData.test.d.ts

@@ -0,0 +1 @@
+export {};

Dosya farkı çok büyük olduğundan ihmal edildi
+ 2 - 0
price_service/sdk/js/.tshy-build/esm/__tests__/AccumulatorUpdateData.test.js


+ 1 - 0
price_service/sdk/js/.tshy-build/esm/__tests__/PriceFeed.test.d.ts

@@ -0,0 +1 @@
+export {};

+ 94 - 0
price_service/sdk/js/.tshy-build/esm/__tests__/PriceFeed.test.js

@@ -0,0 +1,94 @@
+import { Price, PriceFeed, PriceFeedMetadata } from "../index";
+beforeAll(() => {
+    jest.useFakeTimers();
+});
+test("Parsing Price Feed works as expected", () => {
+    const data = {
+        ema_price: {
+            conf: "2",
+            expo: 4,
+            price: "3",
+            publish_time: 11,
+        },
+        id: "abcdef0123456789",
+        price: {
+            conf: "1",
+            expo: 4,
+            price: "10",
+            publish_time: 11,
+        },
+    };
+    const priceFeed = PriceFeed.fromJson(data);
+    expect(priceFeed.id).toBe("abcdef0123456789");
+    const expectedPrice = new Price({
+        conf: "1",
+        expo: 4,
+        price: "10",
+        publishTime: 11,
+    });
+    expect(priceFeed.getPriceUnchecked()).toStrictEqual(expectedPrice);
+    const expectedEmaPrice = new Price({
+        conf: "2",
+        expo: 4,
+        price: "3",
+        publishTime: 11,
+    });
+    expect(priceFeed.getEmaPriceUnchecked()).toStrictEqual(expectedEmaPrice);
+    jest.setSystemTime(20000);
+    expect(priceFeed.getPriceNoOlderThan(15)).toStrictEqual(expectedPrice);
+    expect(priceFeed.getPriceNoOlderThan(5)).toBeUndefined();
+    expect(priceFeed.getEmaPriceNoOlderThan(15)).toStrictEqual(expectedEmaPrice);
+    expect(priceFeed.getEmaPriceNoOlderThan(5)).toBeUndefined();
+    expect(priceFeed.toJson()).toEqual(data);
+});
+test("getMetadata returns PriceFeedMetadata as expected", () => {
+    const data = {
+        ema_price: {
+            conf: "2",
+            expo: 4,
+            price: "3",
+            publish_time: 11,
+        },
+        id: "abcdef0123456789",
+        price: {
+            conf: "1",
+            expo: 4,
+            price: "10",
+            publish_time: 11,
+        },
+        metadata: {
+            attestation_time: 7,
+            emitter_chain: 8,
+            price_service_receive_time: 9,
+            sequence_number: 10,
+            something_else: 11, // Ensuring the code is future compatible.
+        },
+    };
+    const priceFeed = PriceFeed.fromJson(data);
+    expect(priceFeed.getMetadata()).toStrictEqual(PriceFeedMetadata.fromJson({
+        attestation_time: 7,
+        emitter_chain: 8,
+        price_service_receive_time: 9,
+        sequence_number: 10,
+    }));
+});
+test("getVAA returns string as expected", () => {
+    const data = {
+        ema_price: {
+            conf: "2",
+            expo: 4,
+            price: "3",
+            publish_time: 11,
+        },
+        id: "abcdef0123456789",
+        price: {
+            conf: "1",
+            expo: 4,
+            price: "10",
+            publish_time: 11,
+        },
+        vaa: "abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef",
+    };
+    const priceFeed = PriceFeed.fromJson(data);
+    expect(priceFeed.getVAA()).toStrictEqual("abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef");
+});

+ 188 - 0
price_service/sdk/js/.tshy-build/esm/index.d.ts

@@ -0,0 +1,188 @@
+export type UnixTimestamp = number;
+export type DurationInSeconds = number;
+export type HexString = string;
+export { isAccumulatorUpdateData, sliceAccumulatorUpdateData, parseAccumulatorUpdateData, AccumulatorUpdateData, parsePriceFeedMessage, parseTwapMessage, } from "./AccumulatorUpdateData";
+/**
+ * A Pyth Price represented as `${price} ± ${conf} * 10^${expo}` published at `publishTime`.
+ */
+export declare class Price {
+    conf: string;
+    expo: number;
+    price: string;
+    publishTime: UnixTimestamp;
+    constructor(rawPrice: {
+        conf: string;
+        expo: number;
+        price: string;
+        publishTime: UnixTimestamp;
+    });
+    /**
+     * Get price as number. Warning: this conversion might result in an inaccurate number.
+     * We store price and confidence values in our Oracle at 64-bit precision, but the JavaScript
+     * number type can only represent numbers with 52-bit precision. So if a price or confidence
+     * is larger than 52-bits, the conversion will lose the most insignificant bits.
+     *
+     * @returns a floating point number representing the price
+     */
+    getPriceAsNumberUnchecked(): number;
+    /**
+     * Get price as number. Warning: this conversion might result in an inaccurate number.
+     * Explanation is the same as `priceAsNumberUnchecked()` documentation.
+     *
+     * @returns a floating point number representing the price
+     */
+    getConfAsNumberUnchecked(): number;
+    static fromJson(json: any): Price;
+    toJson(): any;
+}
+/**
+ * Metadata about the price
+ *
+ * Represents metadata of a price feed.
+ */
+export declare class PriceFeedMetadata {
+    /**
+     * Attestation time of the price
+     */
+    attestationTime?: number;
+    /**
+     * Chain of the emitter
+     */
+    emitterChain: number;
+    /**
+     * The time that the price service received the price
+     */
+    priceServiceReceiveTime?: number;
+    /**
+     * Sequence number of the price
+     */
+    sequenceNumber?: number;
+    /**
+     * Pythnet slot number of the price
+     */
+    slot?: number;
+    /**
+     * The time that the previous price was published
+     */
+    prevPublishTime?: number;
+    constructor(metadata: {
+        attestationTime?: number;
+        emitterChain: number;
+        receiveTime?: number;
+        sequenceNumber?: number;
+        slot?: number;
+        prevPublishTime?: number;
+    });
+    static fromJson(json: any): PriceFeedMetadata | undefined;
+    toJson(): any;
+}
+/**
+ * Pyth Price Feed
+ *
+ * Represents a current aggregation price from pyth publisher feeds.
+ */
+export declare class PriceFeed {
+    /**
+     * Exponentially-weighted moving average Price
+     */
+    private emaPrice;
+    /**
+     * Unique identifier for this price.
+     */
+    id: HexString;
+    /**
+     * Metadata of the price
+     */
+    metadata?: PriceFeedMetadata;
+    /**
+     * VAA of the price
+     */
+    vaa?: string;
+    /**
+     * Price
+     */
+    private price;
+    constructor(rawFeed: {
+        emaPrice: Price;
+        id: HexString;
+        metadata?: PriceFeedMetadata;
+        vaa?: string;
+        price: Price;
+    });
+    static fromJson(json: any): PriceFeed;
+    toJson(): any;
+    /**
+     * Get the price and confidence interval as fixed-point numbers of the form a * 10^e.
+     * This function returns the current best estimate of the price at the time that this `PriceFeed` was
+     * published (`publishTime`). The returned price can be from arbitrarily far in the past; this function
+     * makes no guarantees that the returned price is recent or useful for any particular application.
+     *
+     * Users of this function should check the returned `publishTime` to ensure that the returned price is
+     * sufficiently recent for their application. If you are considering using this function, it may be
+     * safer / easier to use `getPriceNoOlderThan` method.
+     *
+     * @returns a Price that contains the price and confidence interval along with
+     * the exponent for them, and publish time of the price.
+     */
+    getPriceUnchecked(): Price;
+    /**
+     * Get the exponentially-weighted moving average (EMA) price and confidence interval.
+     *
+     * This function returns the current best estimate of the price at the time that this `PriceFeed` was
+     * published (`publishTime`). The returned price can be from arbitrarily far in the past; this function
+     * makes no guarantees that the returned price is recent or useful for any particular application.
+     *
+     * Users of this function should check the returned `publishTime` to ensure that the returned price is
+     * sufficiently recent for their application. If you are considering using this function, it may be
+     * safer / easier to use `getEmaPriceNoOlderThan` method.
+     *
+     * At the moment, the confidence interval returned by this method is computed in
+     * a somewhat questionable way, so we do not recommend using it for high-value applications.
+     *
+     * @returns a Price that contains the EMA price and confidence interval along with
+     * the exponent for them, and publish time of the price.
+     */
+    getEmaPriceUnchecked(): Price;
+    /**
+     * Get the price if it was updated no older than `age` seconds of the current time.
+     *
+     * This function is a sanity-checked version of `getPriceUnchecked` which is useful in
+     * applications that require a sufficiently-recent price. Returns `undefined` if the price
+     * is not recent enough.
+     *
+     * @param age return a price as long as it has been updated within this number of seconds
+     * @returns a Price struct containing the price, confidence interval along with the exponent for
+     * both numbers, and its publish time, or `undefined` if no price update occurred within `age` seconds of the current time.
+     */
+    getPriceNoOlderThan(age: DurationInSeconds): Price | undefined;
+    /**
+     * Get the exponentially-weighted moving average (EMA) price if it was updated no older than
+     * `age` seconds of the current time.
+     *
+     * This function is a sanity-checked version of `getEmaPriceUnchecked` which is useful in
+     * applications that require a sufficiently-recent price. Returns `undefined` if the price
+     * is not recent enough.
+     *
+     * At the moment, the confidence interval returned by this method is computed in
+     * a somewhat questionable way, so we do not recommend using it for high-value applications.
+     *
+     * @param age return a price as long as it has been updated within this number of seconds
+     * @returns a Price struct containing the EMA price, confidence interval along with the exponent for
+     * both numbers, and its publish time, or `undefined` if no price update occurred within `age` seconds of the current time.
+     */
+    getEmaPriceNoOlderThan(age: DurationInSeconds): Price | undefined;
+    /**
+     * Get the price feed metadata.
+     *
+     * @returns a struct containing the attestation time, emitter chain, and the sequence number.
+     * Returns `undefined` if metadata is currently unavailable.
+     */
+    getMetadata(): PriceFeedMetadata | undefined;
+    /**
+     * Get the price feed vaa.
+     *
+     * @returns vaa in base64.
+     * Returns `undefined` if vaa is unavailable.
+     */
+    getVAA(): string | undefined;
+}

+ 276 - 0
price_service/sdk/js/.tshy-build/esm/index.js

@@ -0,0 +1,276 @@
+import { Convert, } from "./schemas/PriceFeed";
+export { isAccumulatorUpdateData, sliceAccumulatorUpdateData, parseAccumulatorUpdateData, AccumulatorUpdateData, parsePriceFeedMessage, parseTwapMessage, } from "./AccumulatorUpdateData";
+/**
+ * A Pyth Price represented as `${price} ± ${conf} * 10^${expo}` published at `publishTime`.
+ */
+export class Price {
+    conf;
+    expo;
+    price;
+    publishTime;
+    constructor(rawPrice) {
+        this.conf = rawPrice.conf;
+        this.expo = rawPrice.expo;
+        this.price = rawPrice.price;
+        this.publishTime = rawPrice.publishTime;
+    }
+    /**
+     * Get price as number. Warning: this conversion might result in an inaccurate number.
+     * We store price and confidence values in our Oracle at 64-bit precision, but the JavaScript
+     * number type can only represent numbers with 52-bit precision. So if a price or confidence
+     * is larger than 52-bits, the conversion will lose the most insignificant bits.
+     *
+     * @returns a floating point number representing the price
+     */
+    getPriceAsNumberUnchecked() {
+        return Number(this.price) * 10 ** this.expo;
+    }
+    /**
+     * Get price as number. Warning: this conversion might result in an inaccurate number.
+     * Explanation is the same as `priceAsNumberUnchecked()` documentation.
+     *
+     * @returns a floating point number representing the price
+     */
+    getConfAsNumberUnchecked() {
+        return Number(this.conf) * 10 ** this.expo;
+    }
+    static fromJson(json) {
+        const jsonPrice = Convert.toPrice(json);
+        return new Price({
+            conf: jsonPrice.conf,
+            expo: jsonPrice.expo,
+            price: jsonPrice.price,
+            publishTime: jsonPrice.publish_time,
+        });
+    }
+    toJson() {
+        const jsonPrice = {
+            conf: this.conf,
+            expo: this.expo,
+            price: this.price,
+            publish_time: this.publishTime,
+        };
+        // this is done to avoid sending undefined values to the server
+        return Convert.priceToJson(jsonPrice);
+    }
+}
+/**
+ * Metadata about the price
+ *
+ * Represents metadata of a price feed.
+ */
+export class PriceFeedMetadata {
+    /**
+     * Attestation time of the price
+     */
+    attestationTime;
+    /**
+     * Chain of the emitter
+     */
+    emitterChain;
+    /**
+     * The time that the price service received the price
+     */
+    priceServiceReceiveTime;
+    /**
+     * Sequence number of the price
+     */
+    sequenceNumber;
+    /**
+     * Pythnet slot number of the price
+     */
+    slot;
+    /**
+     * The time that the previous price was published
+     */
+    prevPublishTime;
+    constructor(metadata) {
+        this.attestationTime = metadata.attestationTime;
+        this.emitterChain = metadata.emitterChain;
+        this.priceServiceReceiveTime = metadata.receiveTime;
+        this.sequenceNumber = metadata.sequenceNumber;
+        this.slot = metadata.slot;
+        this.prevPublishTime = metadata.prevPublishTime;
+    }
+    static fromJson(json) {
+        if (json === undefined) {
+            return undefined;
+        }
+        const jsonFeed = Convert.toPriceFeedMetadata(json);
+        return new PriceFeedMetadata({
+            attestationTime: jsonFeed.attestation_time,
+            emitterChain: jsonFeed.emitter_chain,
+            receiveTime: jsonFeed.price_service_receive_time,
+            sequenceNumber: jsonFeed.sequence_number,
+            slot: jsonFeed.slot,
+            prevPublishTime: jsonFeed.prev_publish_time,
+        });
+    }
+    toJson() {
+        const jsonFeed = {
+            attestation_time: this.attestationTime,
+            emitter_chain: this.emitterChain,
+            price_service_receive_time: this.priceServiceReceiveTime,
+            sequence_number: this.sequenceNumber,
+            slot: this.slot,
+            prev_publish_time: this.prevPublishTime,
+        };
+        // this is done to avoid sending undefined values to the server
+        return Convert.priceFeedMetadataToJson(jsonFeed);
+    }
+}
+/**
+ * Pyth Price Feed
+ *
+ * Represents a current aggregation price from pyth publisher feeds.
+ */
+export class PriceFeed {
+    /**
+     * Exponentially-weighted moving average Price
+     */
+    emaPrice;
+    /**
+     * Unique identifier for this price.
+     */
+    id;
+    /**
+     * Metadata of the price
+     */
+    metadata;
+    /**
+     * VAA of the price
+     */
+    vaa;
+    /**
+     * Price
+     */
+    price;
+    constructor(rawFeed) {
+        this.emaPrice = rawFeed.emaPrice;
+        this.id = rawFeed.id;
+        this.metadata = rawFeed.metadata;
+        this.vaa = rawFeed.vaa;
+        this.price = rawFeed.price;
+    }
+    static fromJson(json) {
+        const jsonFeed = Convert.toPriceFeed(json);
+        return new PriceFeed({
+            emaPrice: Price.fromJson(jsonFeed.ema_price),
+            id: jsonFeed.id,
+            metadata: PriceFeedMetadata.fromJson(jsonFeed.metadata),
+            vaa: jsonFeed.vaa,
+            price: Price.fromJson(jsonFeed.price),
+        });
+    }
+    toJson() {
+        const jsonFeed = {
+            ema_price: this.emaPrice.toJson(),
+            id: this.id,
+            metadata: this.metadata?.toJson(),
+            price: this.price.toJson(),
+        };
+        return Convert.priceFeedToJson(jsonFeed);
+    }
+    /**
+     * Get the price and confidence interval as fixed-point numbers of the form a * 10^e.
+     * This function returns the current best estimate of the price at the time that this `PriceFeed` was
+     * published (`publishTime`). The returned price can be from arbitrarily far in the past; this function
+     * makes no guarantees that the returned price is recent or useful for any particular application.
+     *
+     * Users of this function should check the returned `publishTime` to ensure that the returned price is
+     * sufficiently recent for their application. If you are considering using this function, it may be
+     * safer / easier to use `getPriceNoOlderThan` method.
+     *
+     * @returns a Price that contains the price and confidence interval along with
+     * the exponent for them, and publish time of the price.
+     */
+    getPriceUnchecked() {
+        return this.price;
+    }
+    /**
+     * Get the exponentially-weighted moving average (EMA) price and confidence interval.
+     *
+     * This function returns the current best estimate of the price at the time that this `PriceFeed` was
+     * published (`publishTime`). The returned price can be from arbitrarily far in the past; this function
+     * makes no guarantees that the returned price is recent or useful for any particular application.
+     *
+     * Users of this function should check the returned `publishTime` to ensure that the returned price is
+     * sufficiently recent for their application. If you are considering using this function, it may be
+     * safer / easier to use `getEmaPriceNoOlderThan` method.
+     *
+     * At the moment, the confidence interval returned by this method is computed in
+     * a somewhat questionable way, so we do not recommend using it for high-value applications.
+     *
+     * @returns a Price that contains the EMA price and confidence interval along with
+     * the exponent for them, and publish time of the price.
+     */
+    getEmaPriceUnchecked() {
+        return this.emaPrice;
+    }
+    /**
+     * Get the price if it was updated no older than `age` seconds of the current time.
+     *
+     * This function is a sanity-checked version of `getPriceUnchecked` which is useful in
+     * applications that require a sufficiently-recent price. Returns `undefined` if the price
+     * is not recent enough.
+     *
+     * @param age return a price as long as it has been updated within this number of seconds
+     * @returns a Price struct containing the price, confidence interval along with the exponent for
+     * both numbers, and its publish time, or `undefined` if no price update occurred within `age` seconds of the current time.
+     */
+    getPriceNoOlderThan(age) {
+        const price = this.getPriceUnchecked();
+        const currentTime = Math.floor(Date.now() / 1000);
+        // This checks the absolute difference as a sanity check
+        // for the cases that the system time is behind or price
+        // feed timestamp happen to be in the future (a bug).
+        if (Math.abs(currentTime - price.publishTime) > age) {
+            return undefined;
+        }
+        return price;
+    }
+    /**
+     * Get the exponentially-weighted moving average (EMA) price if it was updated no older than
+     * `age` seconds of the current time.
+     *
+     * This function is a sanity-checked version of `getEmaPriceUnchecked` which is useful in
+     * applications that require a sufficiently-recent price. Returns `undefined` if the price
+     * is not recent enough.
+     *
+     * At the moment, the confidence interval returned by this method is computed in
+     * a somewhat questionable way, so we do not recommend using it for high-value applications.
+     *
+     * @param age return a price as long as it has been updated within this number of seconds
+     * @returns a Price struct containing the EMA price, confidence interval along with the exponent for
+     * both numbers, and its publish time, or `undefined` if no price update occurred within `age` seconds of the current time.
+     */
+    getEmaPriceNoOlderThan(age) {
+        const emaPrice = this.getEmaPriceUnchecked();
+        const currentTime = Math.floor(Date.now() / 1000);
+        // This checks the absolute difference as a sanity check
+        // for the cases that the system time is behind or price
+        // feed timestamp happen to be in the future (a bug).
+        if (Math.abs(currentTime - emaPrice.publishTime) > age) {
+            return undefined;
+        }
+        return emaPrice;
+    }
+    /**
+     * Get the price feed metadata.
+     *
+     * @returns a struct containing the attestation time, emitter chain, and the sequence number.
+     * Returns `undefined` if metadata is currently unavailable.
+     */
+    getMetadata() {
+        return this.metadata;
+    }
+    /**
+     * Get the price feed vaa.
+     *
+     * @returns vaa in base64.
+     * Returns `undefined` if vaa is unavailable.
+     */
+    getVAA() {
+        return this.vaa;
+    }
+}

+ 89 - 0
price_service/sdk/js/.tshy-build/esm/schemas/PriceFeed.d.ts

@@ -0,0 +1,89 @@
+/**
+ * Represents an aggregate price from Pyth publisher feeds.
+ */
+export interface PriceFeed {
+    /**
+     * Exponentially-weighted moving average Price
+     */
+    ema_price: Price;
+    /**
+     * Unique identifier for this price.
+     */
+    id: string;
+    /**
+     * Metadata of the price
+     */
+    metadata?: PriceFeedMetadata;
+    /**
+     * Price
+     */
+    price: Price;
+    /**
+     * VAA of the price
+     */
+    vaa?: string;
+}
+/**
+ * Exponentially-weighted moving average Price
+ *
+ * Represents a Pyth price
+ *
+ * Price
+ */
+export interface Price {
+    /**
+     * Confidence interval around the price.
+     */
+    conf: string;
+    /**
+     * Price exponent.
+     */
+    expo: number;
+    /**
+     * Price.
+     */
+    price: string;
+    /**
+     * Publish Time of the price
+     */
+    publish_time: number;
+}
+/**
+ * Metadata of the price
+ *
+ * Represents metadata of a price feed.
+ */
+export interface PriceFeedMetadata {
+    /**
+     * Attestation time of the price
+     */
+    attestation_time?: number;
+    /**
+     * Chain of the emitter
+     */
+    emitter_chain: number;
+    /**
+     * The time that the previous price was published
+     */
+    prev_publish_time?: number;
+    /**
+     * The time that the price service received the price
+     */
+    price_service_receive_time?: number;
+    /**
+     * Sequence number of the price
+     */
+    sequence_number?: number;
+    /**
+     * Pythnet slot number of the price
+     */
+    slot?: number;
+}
+export declare class Convert {
+    static toPriceFeed(json: any): PriceFeed;
+    static priceFeedToJson(value: PriceFeed): any;
+    static toPrice(json: any): Price;
+    static priceToJson(value: Price): any;
+    static toPriceFeedMetadata(json: any): PriceFeedMetadata;
+    static priceFeedMetadataToJson(value: PriceFeedMetadata): any;
+}

+ 198 - 0
price_service/sdk/js/.tshy-build/esm/schemas/PriceFeed.js

@@ -0,0 +1,198 @@
+// To parse this data:
+//
+//   import { Convert, PriceFeed } from "./file";
+//
+//   const priceFeed = Convert.toPriceFeed(json);
+//
+// These functions will throw an error if the JSON doesn't
+// match the expected interface, even if the JSON is valid.
+// Converts JSON types to/from your types
+// and asserts the results at runtime
+export class Convert {
+    static toPriceFeed(json) {
+        return cast(json, r("PriceFeed"));
+    }
+    static priceFeedToJson(value) {
+        return uncast(value, r("PriceFeed"));
+    }
+    static toPrice(json) {
+        return cast(json, r("Price"));
+    }
+    static priceToJson(value) {
+        return uncast(value, r("Price"));
+    }
+    static toPriceFeedMetadata(json) {
+        return cast(json, r("PriceFeedMetadata"));
+    }
+    static priceFeedMetadataToJson(value) {
+        return uncast(value, r("PriceFeedMetadata"));
+    }
+}
+function invalidValue(typ, val, key = "") {
+    if (key) {
+        throw Error(`Invalid value for key "${key}". Expected type ${JSON.stringify(typ)} but got ${JSON.stringify(val)}`);
+    }
+    throw Error(`Invalid value ${JSON.stringify(val)} for type ${JSON.stringify(typ)}`);
+}
+function jsonToJSProps(typ) {
+    if (typ.jsonToJS === undefined) {
+        const map = {};
+        typ.props.forEach((p) => (map[p.json] = { key: p.js, typ: p.typ }));
+        typ.jsonToJS = map;
+    }
+    return typ.jsonToJS;
+}
+function jsToJSONProps(typ) {
+    if (typ.jsToJSON === undefined) {
+        const map = {};
+        typ.props.forEach((p) => (map[p.js] = { key: p.json, typ: p.typ }));
+        typ.jsToJSON = map;
+    }
+    return typ.jsToJSON;
+}
+function transform(val, typ, getProps, key = "") {
+    function transformPrimitive(typ, val) {
+        if (typeof typ === typeof val)
+            return val;
+        return invalidValue(typ, val, key);
+    }
+    function transformUnion(typs, val) {
+        // val must validate against one typ in typs
+        const l = typs.length;
+        for (let i = 0; i < l; i++) {
+            const typ = typs[i];
+            try {
+                return transform(val, typ, getProps);
+            }
+            catch (_) { }
+        }
+        return invalidValue(typs, val);
+    }
+    function transformEnum(cases, val) {
+        if (cases.indexOf(val) !== -1)
+            return val;
+        return invalidValue(cases, val);
+    }
+    function transformArray(typ, val) {
+        // val must be an array with no invalid elements
+        if (!Array.isArray(val))
+            return invalidValue("array", val);
+        return val.map((el) => transform(el, typ, getProps));
+    }
+    function transformDate(val) {
+        if (val === null) {
+            return null;
+        }
+        const d = new Date(val);
+        if (isNaN(d.valueOf())) {
+            return invalidValue("Date", val);
+        }
+        return d;
+    }
+    function transformObject(props, additional, val) {
+        if (val === null || typeof val !== "object" || Array.isArray(val)) {
+            return invalidValue("object", val);
+        }
+        const result = {};
+        Object.getOwnPropertyNames(props).forEach((key) => {
+            const prop = props[key];
+            const v = Object.prototype.hasOwnProperty.call(val, key)
+                ? val[key]
+                : undefined;
+            result[prop.key] = transform(v, prop.typ, getProps, prop.key);
+        });
+        Object.getOwnPropertyNames(val).forEach((key) => {
+            if (!Object.prototype.hasOwnProperty.call(props, key)) {
+                result[key] = transform(val[key], additional, getProps, key);
+            }
+        });
+        return result;
+    }
+    if (typ === "any")
+        return val;
+    if (typ === null) {
+        if (val === null)
+            return val;
+        return invalidValue(typ, val);
+    }
+    if (typ === false)
+        return invalidValue(typ, val);
+    while (typeof typ === "object" && typ.ref !== undefined) {
+        typ = typeMap[typ.ref];
+    }
+    if (Array.isArray(typ))
+        return transformEnum(typ, val);
+    if (typeof typ === "object") {
+        return typ.hasOwnProperty("unionMembers")
+            ? transformUnion(typ.unionMembers, val)
+            : typ.hasOwnProperty("arrayItems")
+                ? transformArray(typ.arrayItems, val)
+                : typ.hasOwnProperty("props")
+                    ? transformObject(getProps(typ), typ.additional, val)
+                    : invalidValue(typ, val);
+    }
+    // Numbers can be parsed by Date but shouldn't be.
+    if (typ === Date && typeof val !== "number")
+        return transformDate(val);
+    return transformPrimitive(typ, val);
+}
+function cast(val, typ) {
+    return transform(val, typ, jsonToJSProps);
+}
+function uncast(val, typ) {
+    return transform(val, typ, jsToJSONProps);
+}
+function a(typ) {
+    return { arrayItems: typ };
+}
+function u(...typs) {
+    return { unionMembers: typs };
+}
+function o(props, additional) {
+    return { props, additional };
+}
+function m(additional) {
+    return { props: [], additional };
+}
+function r(name) {
+    return { ref: name };
+}
+const typeMap = {
+    PriceFeed: o([
+        { json: "ema_price", js: "ema_price", typ: r("Price") },
+        { json: "id", js: "id", typ: "" },
+        {
+            json: "metadata",
+            js: "metadata",
+            typ: u(undefined, r("PriceFeedMetadata")),
+        },
+        { json: "price", js: "price", typ: r("Price") },
+        { json: "vaa", js: "vaa", typ: u(undefined, "") },
+    ], "any"),
+    Price: o([
+        { json: "conf", js: "conf", typ: "" },
+        { json: "expo", js: "expo", typ: 0 },
+        { json: "price", js: "price", typ: "" },
+        { json: "publish_time", js: "publish_time", typ: 0 },
+    ], "any"),
+    PriceFeedMetadata: o([
+        {
+            json: "attestation_time",
+            js: "attestation_time",
+            typ: u(undefined, 0),
+        },
+        { json: "emitter_chain", js: "emitter_chain", typ: 0 },
+        {
+            json: "prev_publish_time",
+            js: "prev_publish_time",
+            typ: u(undefined, 0),
+        },
+        {
+            json: "price_service_receive_time",
+            js: "price_service_receive_time",
+            typ: u(undefined, 0),
+        },
+        { json: "sequence_number", js: "sequence_number", typ: u(undefined, 0) },
+        { json: "slot", js: "slot", typ: u(undefined, 0) },
+    ], "any"),
+};

+ 96 - 0
price_service/sdk/js/.tshy-build/esm/schemas/price_feed.json

@@ -0,0 +1,96 @@
+{
+    "$schema": "http://json-schema.org/draft-07/schema#",
+    "title": "PriceFeed",
+    "description": "Represents an aggregate price from Pyth publisher feeds.",
+    "type": "object",
+    "required": ["id", "price", "ema_price"],
+    "properties": {
+        "id": {
+            "description": "Unique identifier for this price.",
+            "$ref": "#/definitions/Identifier"
+        },
+        "price": {
+            "description": "Price",
+            "$ref": "#/definitions/Price"
+        },
+        "ema_price": {
+            "description": "Exponentially-weighted moving average Price",
+            "$ref": "#/definitions/Price"
+        },
+        "metadata": {
+            "description": "Metadata of the price",
+            "$ref": "#/definitions/PriceFeedMetadata"
+        },
+        "vaa": {
+            "description": "VAA of the price",
+            "$ref": "#/definitions/Identifier"
+        }
+    },
+    "definitions": {
+        "Identifier": {
+            "type": "string"
+        },
+        "Price": {
+            "description": "Represents a Pyth price",
+            "type": "object",
+            "required": ["conf", "expo", "price", "publish_time"],
+            "properties": {
+                "conf": {
+                    "description": "Confidence interval around the price.",
+                    "type": "string"
+                },
+                "expo": {
+                    "description": "Price exponent.",
+                    "type": "integer",
+                    "format": "int32"
+                },
+                "price": {
+                    "description": "Price.",
+                    "type": "string"
+                },
+                "publish_time": {
+                    "description": "Publish Time of the price",
+                    "type": "integer",
+                    "format": "int64"
+                }
+            }
+        },
+        "PriceFeedMetadata": {
+            "description": "Represents metadata of a price feed.",
+            "type": "object",
+            "required": ["emitter_chain"],
+            "properties": {
+                "attestation_time": {
+                    "description": "Attestation time of the price",
+                    "type": "integer",
+                    "format": "int64"
+                },
+                "emitter_chain": {
+                    "description": "Chain of the emitter",
+                    "type": "integer",
+                    "format": "int16"
+                },
+                "price_service_receive_time": {
+                    "description": "The time that the price service received the price",
+                    "type": "integer",
+                    "format": "int64"
+                },
+                "sequence_number": {
+                    "description": "Sequence number of the price",
+                    "type": "integer",
+                    "format": "int64"
+                },
+                "slot": {
+                    "description": "Pythnet slot number of the price",
+                    "type": "integer",
+                    "format": "int64"
+                },
+                "prev_publish_time": {
+                    "description": "The time that the previous price was published",
+                    "type": "integer",
+                    "format": "int64"
+                }
+            }
+        }
+    }
+}

+ 9 - 0
price_service/sdk/js/.tshy/build.json

@@ -0,0 +1,9 @@
+{
+  "extends": "../tsconfig.build.json",
+  "compilerOptions": {
+    "target": "es2022",
+    "rootDir": "../src",
+    "module": "nodenext",
+    "moduleResolution": "nodenext"
+  }
+}

+ 16 - 0
price_service/sdk/js/.tshy/commonjs.json

@@ -0,0 +1,16 @@
+{
+  "extends": "./build.json",
+  "include": [
+    "../src/**/*.ts",
+    "../src/**/*.cts",
+    "../src/**/*.tsx",
+    "../src/**/*.json"
+  ],
+  "exclude": [
+    "../src/**/*.mts",
+    "../src/package.json"
+  ],
+  "compilerOptions": {
+    "outDir": "../.tshy-build/commonjs"
+  }
+}

+ 15 - 0
price_service/sdk/js/.tshy/esm.json

@@ -0,0 +1,15 @@
+{
+  "extends": "./build.json",
+  "include": [
+    "../src/**/*.ts",
+    "../src/**/*.mts",
+    "../src/**/*.tsx",
+    "../src/**/*.json"
+  ],
+  "exclude": [
+    "../src/package.json"
+  ],
+  "compilerOptions": {
+    "outDir": "../.tshy-build/esm"
+  }
+}

+ 8 - 3
price_service/sdk/js/package.json

@@ -6,7 +6,8 @@
   "main": "lib/index.js",
   "types": "lib/index.d.ts",
   "files": [
-    "lib/**/*"
+    "lib/**/*",
+    "dist/**/*"
   ],
   "repository": {
     "type": "git",
@@ -17,7 +18,7 @@
     "access": "public"
   },
   "scripts": {
-    "build": "tsc",
+    "build": "tshy",
     "gen-ts-schema": "quicktype --src-lang schema src/schemas/price_feed.json -o src/schemas/PriceFeed.ts --raw-type any --converters all-objects && prettier --write \"src/schemas/*.ts\"",
     "test:unit": "jest",
     "test:lint": "eslint src/ --max-warnings 0",
@@ -33,6 +34,7 @@
   ],
   "license": "Apache-2.0",
   "devDependencies": {
+    "@cprussin/tsconfig": "catalog:",
     "@types/bn.js": "^5.1.5",
     "@types/jest": "^29.4.0",
     "@typescript-eslint/eslint-plugin": "^5.20.0",
@@ -51,5 +53,8 @@
     "node": ">=22",
     "pnpm": ">=10.19.0"
   },
-  "packageManager": "pnpm@10.19.0"
+  "packageManager": "pnpm@10.19.0",
+  "tshy": {
+    "project": "tsconfig.build.json"
+  }
 }

+ 8 - 0
price_service/sdk/js/tsconfig.build.json

@@ -0,0 +1,8 @@
+{
+  "extends": "tsconfig.json",
+  "compilerOptions": {
+    "noEmit": false,
+    "declaration": true,
+    "verbatimModuleSyntax": false
+  }
+}

+ 1 - 1
price_service/sdk/js/tsconfig.json

@@ -1,5 +1,5 @@
 {
-  "extends": "../../../tsconfig.base.json",
+  "extends": "@cprussin/tsconfig/base.json",
   "include": ["src"],
   "exclude": ["node_modules", "**/__tests__/*"],
   "compilerOptions": {

+ 7 - 3
target_chains/aptos/sdk/js/package.json

@@ -9,7 +9,8 @@
   "main": "lib/index.js",
   "types": "lib/index.d.ts",
   "files": [
-    "lib/**/*"
+    "lib/**/*",
+    "dist/**/*"
   ],
   "repository": {
     "type": "git",
@@ -20,7 +21,7 @@
     "access": "public"
   },
   "scripts": {
-    "build": "tsc",
+    "build": "tshy",
     "example-relay": "pnpm run build && node lib/examples/AptosRelay.js",
     "fix:format": "prettier --write \"src/**/*.ts\"",
     "fix:lint": "eslint src/ --fix --max-warnings 0",
@@ -61,5 +62,8 @@
     "node": ">=22",
     "pnpm": ">=10.19.0"
   },
-  "packageManager": "pnpm@10.19.0"
+  "packageManager": "pnpm@10.19.0",
+  "tshy": {
+    "project": "tsconfig.build.json"
+  }
 }

+ 8 - 2
target_chains/ethereum/entropy_sdk/solidity/package.json

@@ -14,7 +14,7 @@
   "scripts": {
     "test:format": "prettier --check .",
     "fix:format": "prettier --write .",
-    "build": "generate-abis IEntropy IEntropyV2 IEntropyConsumer EntropyErrors EntropyEvents EntropyEventsV2 EntropyStructs EntropyStructsV2 EntropyStatusConstants PRNG",
+    "build": "tshy",
     "test": "git diff --exit-code abis"
   },
   "keywords": [
@@ -37,5 +37,11 @@
     "node": ">=22",
     "pnpm": ">=10.19.0"
   },
-  "packageManager": "pnpm@10.19.0"
+  "packageManager": "pnpm@10.19.0",
+  "tshy": {
+    "project": "tsconfig.build.json"
+  },
+  "files": [
+    "dist/**/*"
+  ]
 }

+ 8 - 2
target_chains/ethereum/pulse_sdk/solidity/package.json

@@ -14,7 +14,7 @@
   "scripts": {
     "test:format": "prettier --check .",
     "fix:format": "prettier --write .",
-    "build": "generate-abis IScheduler SchedulerConstants SchedulerErrors SchedulerEvents SchedulerStructs",
+    "build": "tshy",
     "test": "git diff --exit-code abis"
   },
   "keywords": [
@@ -41,5 +41,11 @@
     "node": ">=22",
     "pnpm": ">=10.19.0"
   },
-  "packageManager": "pnpm@10.19.0"
+  "packageManager": "pnpm@10.19.0",
+  "tshy": {
+    "project": "tsconfig.build.json"
+  },
+  "files": [
+    "dist/**/*"
+  ]
 }

+ 7 - 3
target_chains/ethereum/sdk/js/package.json

@@ -9,7 +9,8 @@
   "main": "lib/index.js",
   "types": "lib/index.d.ts",
   "files": [
-    "lib/**/*"
+    "lib/**/*",
+    "dist/**/*"
   ],
   "repository": {
     "type": "git",
@@ -20,7 +21,7 @@
     "access": "public"
   },
   "scripts": {
-    "build": "tsc",
+    "build": "tshy",
     "test:format": "prettier --check \"src/**/*.ts\"",
     "test:lint": "eslint src/ --max-warnings 0",
     "fix:format": "prettier --write \"src/**/*.ts\"",
@@ -57,5 +58,8 @@
     "node": ">=22",
     "pnpm": ">=10.19.0"
   },
-  "packageManager": "pnpm@10.19.0"
+  "packageManager": "pnpm@10.19.0",
+  "tshy": {
+    "project": "tsconfig.build.json"
+  }
 }

+ 12 - 2
target_chains/ethereum/sdk/solidity/package.json

@@ -13,7 +13,8 @@
     "build:bin": "solcjs --bin MockPyth.sol --base-path . -o build/",
     "fix:format": "prettier --write .",
     "test:format": "prettier --check .",
-    "test": "git diff --exit-code abis"
+    "test": "git diff --exit-code abis",
+    "build": "tshy"
   },
   "keywords": [
     "pyth",
@@ -36,5 +37,14 @@
     "node": ">=22",
     "pnpm": ">=10.19.0"
   },
-  "packageManager": "pnpm@10.19.0"
+  "packageManager": "pnpm@10.19.0",
+  "tshy": {
+    "project": "tsconfig.build.json"
+  },
+  "publishConfig": {
+    "access": "public"
+  },
+  "files": [
+    "dist/**/*"
+  ]
 }

+ 12 - 2
target_chains/ethereum/sdk/stylus/pyth-mock-solidity/package.json

@@ -9,7 +9,8 @@
   },
   "scripts": {
     "test:format": "prettier --check .",
-    "fix:format": "prettier --write ."
+    "fix:format": "prettier --write .",
+    "build": "tshy"
   },
   "keywords": [],
   "author": "",
@@ -25,5 +26,14 @@
     "node": ">=22",
     "pnpm": ">=10.19.0"
   },
-  "packageManager": "pnpm@10.19.0"
+  "packageManager": "pnpm@10.19.0",
+  "tshy": {
+    "project": "tsconfig.build.json"
+  },
+  "publishConfig": {
+    "access": "public"
+  },
+  "files": [
+    "dist/**/*"
+  ]
 }

+ 7 - 3
target_chains/fuel/sdk/js/package.json

@@ -9,7 +9,8 @@
   "main": "lib/index.js",
   "types": "lib/index.d.ts",
   "files": [
-    "lib/**/*"
+    "lib/**/*",
+    "dist/**/*"
   ],
   "repository": {
     "type": "git",
@@ -21,7 +22,7 @@
   },
   "scripts": {
     "usage-example": "tsx src/examples/usage.ts",
-    "build": "pnpm run generate-fuel-types && tsc && copyfiles -u 1 \"src/**/*.d.ts\" lib",
+    "build": "tshy",
     "test:format": "prettier --check \"src/**/*.ts\"",
     "test:lint": "eslint src/ --max-warnings 0",
     "fix:format": "prettier --write \"src/**/*.ts\"",
@@ -54,5 +55,8 @@
     "node": ">=22",
     "pnpm": ">=10.19.0"
   },
-  "packageManager": "pnpm@10.19.0"
+  "packageManager": "pnpm@10.19.0",
+  "tshy": {
+    "project": "tsconfig.build.json"
+  }
 }

+ 7 - 3
target_chains/solana/sdk/js/pyth_solana_receiver/package.json

@@ -6,7 +6,8 @@
   "main": "lib/index.js",
   "types": "lib/index.d.ts",
   "files": [
-    "lib/**/*"
+    "lib/**/*",
+    "dist/**/*"
   ],
   "repository": {
     "type": "git",
@@ -17,7 +18,7 @@
     "access": "public"
   },
   "scripts": {
-    "build": "tsc",
+    "build": "tshy",
     "test:lint": "eslint src/ --max-warnings 0",
     "test:format": "prettier --check \"src/**/*.ts\"",
     "fix:lint": "eslint src/ --fix --max-warnings 0",
@@ -56,5 +57,8 @@
     "node": ">=22",
     "pnpm": ">=10.19.0"
   },
-  "packageManager": "pnpm@10.19.0"
+  "packageManager": "pnpm@10.19.0",
+  "tshy": {
+    "project": "tsconfig.build.json"
+  }
 }

+ 7 - 3
target_chains/solana/sdk/js/solana_utils/package.json

@@ -6,7 +6,8 @@
   "main": "lib/index.js",
   "types": "lib/index.d.ts",
   "files": [
-    "lib/**/*"
+    "lib/**/*",
+    "dist/**/*"
   ],
   "repository": {
     "type": "git",
@@ -17,7 +18,7 @@
     "access": "public"
   },
   "scripts": {
-    "build": "tsc",
+    "build": "tshy",
     "test:unit": "jest",
     "test:lint": "eslint src/ --max-warnings 0",
     "test:format": "prettier --check \"src/**/*.ts\"",
@@ -56,5 +57,8 @@
     "node": ">=22",
     "pnpm": ">=10.19.0"
   },
-  "packageManager": "pnpm@10.19.0"
+  "packageManager": "pnpm@10.19.0",
+  "tshy": {
+    "project": "tsconfig.build.json"
+  }
 }

+ 7 - 3
target_chains/starknet/sdk/js/package.json

@@ -9,7 +9,8 @@
   "main": "lib/index.js",
   "types": "lib/index.d.ts",
   "files": [
-    "lib/**/*"
+    "lib/**/*",
+    "dist/**/*"
   ],
   "repository": {
     "type": "git",
@@ -20,7 +21,7 @@
     "access": "public"
   },
   "scripts": {
-    "build": "tsc",
+    "build": "tshy",
     "usage-example": "tsx src/examples/usage.ts",
     "test:format": "prettier --check \"src/**/*.ts\"",
     "test:lint": "eslint src/ --max-warnings 0",
@@ -50,5 +51,8 @@
     "node": ">=22",
     "pnpm": ">=10.19.0"
   },
-  "packageManager": "pnpm@10.19.0"
+  "packageManager": "pnpm@10.19.0",
+  "tshy": {
+    "project": "tsconfig.build.json"
+  }
 }

+ 7 - 3
target_chains/sui/sdk/js-iota/package.json

@@ -9,7 +9,8 @@
   "main": "lib/index.js",
   "types": "lib/index.d.ts",
   "files": [
-    "lib/**/*"
+    "lib/**/*",
+    "dist/**/*"
   ],
   "repository": {
     "type": "git",
@@ -20,7 +21,7 @@
     "access": "public"
   },
   "scripts": {
-    "build": "tsc",
+    "build": "tshy",
     "example-relay": "pnpm run build && node lib/examples/SuiRelay.js",
     "test:lint": "eslint src/",
     "test:format": "prettier --check \"src/**/*.ts\"",
@@ -62,5 +63,8 @@
     "node": ">=22",
     "pnpm": ">=10.19.0"
   },
-  "packageManager": "pnpm@10.19.0"
+  "packageManager": "pnpm@10.19.0",
+  "tshy": {
+    "project": "tsconfig.build.json"
+  }
 }

+ 7 - 3
target_chains/sui/sdk/js/package.json

@@ -9,7 +9,8 @@
   "main": "lib/index.js",
   "types": "lib/index.d.ts",
   "files": [
-    "lib/**/*"
+    "lib/**/*",
+    "dist/**/*"
   ],
   "repository": {
     "type": "git",
@@ -20,7 +21,7 @@
     "access": "public"
   },
   "scripts": {
-    "build": "tsc",
+    "build": "tshy",
     "example-relay": "node lib/examples/SuiRelay.js",
     "test:lint": "eslint src/ --max-warnings 0",
     "test:format": "prettier --check \"src/**/*.ts\"",
@@ -62,5 +63,8 @@
     "node": ">=22",
     "pnpm": ">=10.19.0"
   },
-  "packageManager": "pnpm@10.19.0"
+  "packageManager": "pnpm@10.19.0",
+  "tshy": {
+    "project": "tsconfig.build.json"
+  }
 }

+ 7 - 3
target_chains/ton/sdk/js/package.json

@@ -9,7 +9,8 @@
   "main": "lib/index.js",
   "types": "lib/index.d.ts",
   "files": [
-    "lib/**/*"
+    "lib/**/*",
+    "dist/**/*"
   ],
   "repository": {
     "type": "git",
@@ -20,7 +21,7 @@
     "access": "public"
   },
   "scripts": {
-    "build": "tsc",
+    "build": "tshy",
     "test:lint": "eslint src/ --max-warnings 0",
     "test:format": "prettier --check \"src/**/*.ts\"",
     "fix:lint": "eslint src/ --fix --max-warnings 0",
@@ -52,5 +53,8 @@
     "node": ">=22",
     "pnpm": ">=10.19.0"
   },
-  "packageManager": "pnpm@10.19.0"
+  "packageManager": "pnpm@10.19.0",
+  "tshy": {
+    "project": "tsconfig.build.json"
+  }
 }

+ 5 - 0
turbo.json

@@ -56,6 +56,7 @@
         "//#install:modules",
         "pull:env",
         "^build",
+        "clean",
         "build:cjs",
         "build:esm"
       ],
@@ -115,6 +116,10 @@
       ],
       "outputs": ["lib/**", "dist/**", ".next/**", "!.next/cache/**"]
     },
+    "clean": {
+      "cache": false,
+      "outputs": []
+    },
     "fix": {
       "dependsOn": ["fix:lint", "fix:format"],
       "cache": false

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor