@dedot/codegen 0.0.1-alpha.33 → 0.0.1-alpha.34

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/cjs/index.js CHANGED
@@ -31,7 +31,7 @@ const fs = __importStar(require("fs"));
31
31
  const path = __importStar(require("path"));
32
32
  const index_js_1 = require("./generator/index.js");
33
33
  async function generateTypesFromEndpoint(chain, endpoint, outDir, extension = 'd.ts', useSubPaths = false) {
34
- const api = await api_1.Dedot.new(new providers_1.WsProvider(endpoint));
34
+ const api = await api_1.LegacyClient.new(new providers_1.WsProvider(endpoint));
35
35
  const { methods } = await api.rpc.rpc_methods();
36
36
  const apis = api.runtimeVersion.apis || {};
37
37
  if (!chain) {
package/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { Dedot } from '@dedot/api';
1
+ import { LegacyClient } from '@dedot/api';
2
2
  import { WsProvider } from '@dedot/providers';
3
3
  import { stringCamelCase } from '@dedot/utils';
4
4
  import * as fs from 'fs';
5
5
  import * as path from 'path';
6
6
  import { ConstsGen, ErrorsGen, EventsGen, IndexGen, JsonRpcGen, QueryGen, RuntimeApisGen, TxGen, TypesGen, } from './generator/index.js';
7
7
  export async function generateTypesFromEndpoint(chain, endpoint, outDir, extension = 'd.ts', useSubPaths = false) {
8
- const api = await Dedot.new(new WsProvider(endpoint));
8
+ const api = await LegacyClient.new(new WsProvider(endpoint));
9
9
  const { methods } = await api.rpc.rpc_methods();
10
10
  const apis = api.runtimeVersion.apis || {};
11
11
  if (!chain) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dedot/codegen",
3
- "version": "0.0.1-alpha.33",
3
+ "version": "0.0.1-alpha.34",
4
4
  "description": "Generate types",
5
5
  "author": "Thang X. Vu <thang@coongcrafts.io>",
6
6
  "homepage": "https://github.com/dedotdev/dedot/tree/main/packages/codegen",
@@ -18,13 +18,13 @@
18
18
  "copy": "cp -R ./src/templates ./dist && cp -R ./src/templates ./dist/cjs"
19
19
  },
20
20
  "dependencies": {
21
- "@dedot/api": "0.0.1-alpha.33",
22
- "@dedot/codecs": "0.0.1-alpha.33",
23
- "@dedot/providers": "0.0.1-alpha.33",
24
- "@dedot/runtime-specs": "0.0.1-alpha.33",
25
- "@dedot/shape": "0.0.1-alpha.33",
26
- "@dedot/types": "0.0.1-alpha.33",
27
- "@dedot/utils": "0.0.1-alpha.33",
21
+ "@dedot/api": "0.0.1-alpha.34",
22
+ "@dedot/codecs": "0.0.1-alpha.34",
23
+ "@dedot/providers": "0.0.1-alpha.34",
24
+ "@dedot/runtime-specs": "0.0.1-alpha.34",
25
+ "@dedot/shape": "0.0.1-alpha.34",
26
+ "@dedot/types": "0.0.1-alpha.34",
27
+ "@dedot/utils": "0.0.1-alpha.34",
28
28
  "handlebars": "^4.7.7",
29
29
  "prettier": "^3.2.5"
30
30
  },
@@ -33,7 +33,7 @@
33
33
  "directory": "dist"
34
34
  },
35
35
  "license": "Apache-2.0",
36
- "gitHead": "36b30a0cec2d8652915e3660329b78f1c6e4221f",
36
+ "gitHead": "053078f3aed79a3044314421967325b9fe0e6f57",
37
37
  "module": "./index.js",
38
38
  "types": "./index.d.ts",
39
39
  "exports": {