dedot 1.0.2 → 1.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.
Files changed (64) hide show
  1. package/README.md +3 -127
  2. package/dist/LICENSE +201 -0
  3. package/dist/README.md +129 -0
  4. package/dist/bin/dedot.mjs +4 -0
  5. package/dist/package.json +128 -0
  6. package/package.json +54 -69
  7. package/src/chaintypes/index.ts +1 -0
  8. package/src/codecs/index.ts +1 -0
  9. package/src/contracts/index.ts +1 -0
  10. package/src/index.ts +3 -0
  11. package/src/merkleized-metadata/index.ts +1 -0
  12. package/src/runtime-specs/index.ts +1 -0
  13. package/src/shape/index.ts +1 -0
  14. package/src/smoldot/index.ts +1 -0
  15. package/src/smoldot/with-worker.ts +2 -0
  16. package/src/smoldot/worker.ts +7 -0
  17. package/src/types/index.ts +1 -0
  18. package/src/types/json-rpc/index.ts +1 -0
  19. package/src/utils/index.ts +1 -0
  20. package/tsconfig.build.cjs.json +44 -0
  21. package/tsconfig.build.json +39 -0
  22. package/tsconfig.build.tsbuildinfo +1 -0
  23. package/tsconfig.json +47 -0
  24. package/typedoc.json +5 -0
  25. /package/{chaintypes → dist/chaintypes}/index.d.ts +0 -0
  26. /package/{chaintypes → dist/chaintypes}/index.js +0 -0
  27. /package/{cjs → dist/cjs}/chaintypes/index.js +0 -0
  28. /package/{cjs → dist/cjs}/codecs/index.js +0 -0
  29. /package/{cjs → dist/cjs}/contracts/index.js +0 -0
  30. /package/{cjs → dist/cjs}/index.js +0 -0
  31. /package/{cjs → dist/cjs}/merkleized-metadata/index.js +0 -0
  32. /package/{cjs → dist/cjs}/package.json +0 -0
  33. /package/{cjs → dist/cjs}/runtime-specs/index.js +0 -0
  34. /package/{cjs → dist/cjs}/shape/index.js +0 -0
  35. /package/{cjs → dist/cjs}/smoldot/index.js +0 -0
  36. /package/{cjs → dist/cjs}/smoldot/with-worker.js +0 -0
  37. /package/{cjs → dist/cjs}/smoldot/worker.js +0 -0
  38. /package/{cjs → dist/cjs}/types/index.js +0 -0
  39. /package/{cjs → dist/cjs}/types/json-rpc/index.js +0 -0
  40. /package/{cjs → dist/cjs}/utils/index.js +0 -0
  41. /package/{codecs → dist/codecs}/index.d.ts +0 -0
  42. /package/{codecs → dist/codecs}/index.js +0 -0
  43. /package/{contracts → dist/contracts}/index.d.ts +0 -0
  44. /package/{contracts → dist/contracts}/index.js +0 -0
  45. /package/{index.d.ts → dist/index.d.ts} +0 -0
  46. /package/{index.js → dist/index.js} +0 -0
  47. /package/{merkleized-metadata → dist/merkleized-metadata}/index.d.ts +0 -0
  48. /package/{merkleized-metadata → dist/merkleized-metadata}/index.js +0 -0
  49. /package/{runtime-specs → dist/runtime-specs}/index.d.ts +0 -0
  50. /package/{runtime-specs → dist/runtime-specs}/index.js +0 -0
  51. /package/{shape → dist/shape}/index.d.ts +0 -0
  52. /package/{shape → dist/shape}/index.js +0 -0
  53. /package/{smoldot → dist/smoldot}/index.d.ts +0 -0
  54. /package/{smoldot → dist/smoldot}/index.js +0 -0
  55. /package/{smoldot → dist/smoldot}/with-worker.d.ts +0 -0
  56. /package/{smoldot → dist/smoldot}/with-worker.js +0 -0
  57. /package/{smoldot → dist/smoldot}/worker.d.ts +0 -0
  58. /package/{smoldot → dist/smoldot}/worker.js +0 -0
  59. /package/{types → dist/types}/index.d.ts +0 -0
  60. /package/{types → dist/types}/index.js +0 -0
  61. /package/{types → dist/types}/json-rpc/index.d.ts +0 -0
  62. /package/{types → dist/types}/json-rpc/index.js +0 -0
  63. /package/{utils → dist/utils}/index.d.ts +0 -0
  64. /package/{utils → dist/utils}/index.js +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dedot",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "A delightful JavaScript/TypeScript client for Polkadot & Substrate",
5
5
  "author": "Thang X. Vu <thang@dedot.dev>",
6
6
  "homepage": "https://dedot.dev",
@@ -9,7 +9,7 @@
9
9
  "type": "git",
10
10
  "url": "https://github.com/dedotdev/dedot.git"
11
11
  },
12
- "main": "./cjs/index.js",
12
+ "main": "src/index.ts",
13
13
  "bin": {
14
14
  "dedot": "./bin/dedot.mjs",
15
15
  "djs": "./bin/dedot.mjs"
@@ -21,97 +21,84 @@
21
21
  "clean": "rm -rf ./dist && rm -rf ./tsconfig.tsbuildinfo ./tsconfig.build.tsbuildinfo"
22
22
  },
23
23
  "dependencies": {
24
- "@dedot/api": "1.0.2",
25
- "@dedot/cli": "1.0.2",
26
- "@dedot/codecs": "1.0.2",
27
- "@dedot/contracts": "1.0.2",
28
- "@dedot/merkleized-metadata": "1.0.2",
29
- "@dedot/providers": "1.0.2",
30
- "@dedot/runtime-specs": "1.0.2",
31
- "@dedot/shape": "1.0.2",
32
- "@dedot/smoldot": "1.0.2",
33
- "@dedot/types": "1.0.2",
34
- "@dedot/utils": "1.0.2",
24
+ "@dedot/api": "1.0.3",
25
+ "@dedot/cli": "1.0.3",
26
+ "@dedot/codecs": "1.0.3",
27
+ "@dedot/contracts": "1.0.3",
28
+ "@dedot/merkleized-metadata": "1.0.3",
29
+ "@dedot/providers": "1.0.3",
30
+ "@dedot/runtime-specs": "1.0.3",
31
+ "@dedot/shape": "1.0.3",
32
+ "@dedot/smoldot": "1.0.3",
33
+ "@dedot/types": "1.0.3",
34
+ "@dedot/utils": "1.0.3",
35
35
  "smoldot": "^2.0.40"
36
36
  },
37
37
  "exports": {
38
38
  ".": {
39
- "types": "./index.d.ts",
40
- "import": "./index.js",
41
- "require": "./cjs/index.js",
42
- "default": "./index.js"
39
+ "types": "./src/index.ts",
40
+ "import": "./src/index.ts",
41
+ "default": "./src/index.ts"
43
42
  },
44
43
  "./chaintypes": {
45
- "types": "./chaintypes/index.d.ts",
46
- "import": "./chaintypes/index.js",
47
- "require": "./cjs/chaintypes/index.js",
48
- "default": "./chaintypes/index.js"
44
+ "types": "./src/chaintypes/index.ts",
45
+ "import": "./src/chaintypes/index.ts",
46
+ "default": "./src/chaintypes/index.ts"
49
47
  },
50
48
  "./codecs": {
51
- "types": "./codecs/index.d.ts",
52
- "import": "./codecs/index.js",
53
- "require": "./cjs/codecs/index.js",
54
- "default": "./codecs/index.js"
49
+ "types": "./src/codecs/index.ts",
50
+ "import": "./src/codecs/index.ts",
51
+ "default": "./src/codecs/index.ts"
55
52
  },
56
53
  "./types": {
57
- "types": "./types/index.d.ts",
58
- "import": "./types/index.js",
59
- "require": "./cjs/types/index.js",
60
- "default": "./types/index.js"
54
+ "types": "./src/types/index.ts",
55
+ "import": "./src/types/index.ts",
56
+ "default": "./src/types/index.ts"
61
57
  },
62
58
  "./types/json-rpc": {
63
- "types": "./types/json-rpc/index.d.ts",
64
- "import": "./types/json-rpc/index.js",
65
- "require": "./cjs/types/json-rpc/index.js",
66
- "default": "./types/json-rpc/index.js"
59
+ "types": "./src/types/json-rpc/index.ts",
60
+ "import": "./src/types/json-rpc/index.ts",
61
+ "default": "./src/types/json-rpc/index.ts"
67
62
  },
68
63
  "./runtime-specs": {
69
- "types": "./runtime-specs/index.d.ts",
70
- "import": "./runtime-specs/index.js",
71
- "require": "./cjs/runtime-specs/index.js",
72
- "default": "./runtime-specs/index.js"
64
+ "types": "./src/runtime-specs/index.ts",
65
+ "import": "./src/runtime-specs/index.ts",
66
+ "default": "./src/runtime-specs/index.ts"
73
67
  },
74
68
  "./utils": {
75
- "types": "./utils/index.d.ts",
76
- "import": "./utils/index.js",
77
- "require": "./cjs/utils/index.js",
78
- "default": "./utils/index.js"
69
+ "types": "./src/utils/index.ts",
70
+ "import": "./src/utils/index.ts",
71
+ "default": "./src/utils/index.ts"
79
72
  },
80
73
  "./shape": {
81
- "types": "./shape/index.d.ts",
82
- "import": "./shape/index.js",
83
- "require": "./cjs/shape/index.js",
84
- "default": "./shape/index.js"
74
+ "types": "./src/shape/index.ts",
75
+ "import": "./src/shape/index.ts",
76
+ "default": "./src/shape/index.ts"
85
77
  },
86
78
  "./contracts": {
87
- "types": "./contracts/index.d.ts",
88
- "import": "./contracts/index.js",
89
- "require": "./cjs/contracts/index.js",
90
- "default": "./contracts/index.js"
79
+ "types": "./src/contracts/index.ts",
80
+ "import": "./src/contracts/index.ts",
81
+ "default": "./src/contracts/index.ts"
91
82
  },
92
83
  "./merkleized-metadata": {
93
- "types": "./merkleized-metadata/index.d.ts",
94
- "import": "./merkleized-metadata/index.js",
95
- "require": "./cjs/merkleized-metadata/index.js",
96
- "default": "./merkleized-metadata/index.js"
84
+ "types": "./src/merkleized-metadata/index.ts",
85
+ "import": "./src/merkleized-metadata/index.ts",
86
+ "default": "./src/merkleized-metadata/index.ts"
97
87
  },
98
88
  "./smoldot": {
99
- "types": "./smoldot/index.d.ts",
100
- "import": "./smoldot/index.js",
101
- "require": "./cjs/smoldot/index.js",
102
- "default": "./smoldot/index.js"
89
+ "types": "./src/smoldot/index.ts",
90
+ "import": "./src/smoldot/index.ts",
91
+ "default": "./src/smoldot/index.ts"
103
92
  },
104
93
  "./smoldot/worker": {
105
- "types": "./smoldot/worker.d.ts",
106
- "import": "./smoldot/worker.js",
107
- "require": "./cjs/smoldot/worker.js",
108
- "default": "./smoldot/worker.js"
94
+ "types": "./src/smoldot/worker.ts",
95
+ "import": "./src/smoldot/worker.ts",
96
+ "default": "./src/smoldot/worker.ts"
109
97
  },
110
98
  "./smoldot/with-worker": {
111
- "types": "./smoldot/with-worker.d.ts",
112
- "import": "./smoldot/with-worker.js",
113
- "require": "./cjs/smoldot/with-worker.js",
114
- "default": "./smoldot/with-worker.js"
99
+ "types": "./src/smoldot/with-worker.ts",
100
+ "import": "./src/smoldot/with-worker.ts",
101
+ "default": "./src/smoldot/with-worker.ts"
115
102
  }
116
103
  },
117
104
  "publishConfig": {
@@ -122,7 +109,5 @@
122
109
  "node": ">=18"
123
110
  },
124
111
  "license": "Apache-2.0",
125
- "gitHead": "dd12c2407c1c3aa72928039b563e9e4e8b532ae3",
126
- "module": "./index.js",
127
- "types": "./index.d.ts"
128
- }
112
+ "gitHead": "034c564d00bd0f8b041a13e89623c605da54f38a"
113
+ }
@@ -0,0 +1 @@
1
+ export * from '@dedot/api/chaintypes';
@@ -0,0 +1 @@
1
+ export * from '@dedot/codecs';
@@ -0,0 +1 @@
1
+ export * from '@dedot/contracts';
package/src/index.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * as $ from '@dedot/shape';
2
+ export * from '@dedot/api';
3
+ export * from '@dedot/providers';
@@ -0,0 +1 @@
1
+ export * from '@dedot/merkleized-metadata';
@@ -0,0 +1 @@
1
+ export * from '@dedot/runtime-specs';
@@ -0,0 +1 @@
1
+ export * from '@dedot/shape';
@@ -0,0 +1 @@
1
+ export * from '@dedot/smoldot';
@@ -0,0 +1,2 @@
1
+ // @ts-nocheck
2
+ export * from '@dedot/smoldot/with-worker';
@@ -0,0 +1,7 @@
1
+ // @ts-nocheck
2
+ // Inspired By: https://smol-dot.github.io/smoldot/doc-javascript/#md:usage-with-a-worker
3
+ import { compileBytecode } from 'smoldot/bytecode';
4
+ import { run } from 'smoldot/worker';
5
+
6
+ compileBytecode().then((bytecode) => postMessage(bytecode));
7
+ onmessage = (msg) => run(msg.data);
@@ -0,0 +1 @@
1
+ export * from '@dedot/types';
@@ -0,0 +1 @@
1
+ export * from '@dedot/types/json-rpc';
@@ -0,0 +1 @@
1
+ export * from '@dedot/utils';
@@ -0,0 +1,44 @@
1
+ {
2
+ "extends": "./tsconfig.build.json",
3
+ "compilerOptions": {
4
+ "outDir": "dist/cjs",
5
+ "module": "CommonJS",
6
+ "moduleResolution": "Node10"
7
+ },
8
+ "exclude": ["**/__tests__/*"],
9
+ "references": [
10
+ {
11
+ "path": "../codecs/tsconfig.json"
12
+ },
13
+ {
14
+ "path": "../types/tsconfig.json"
15
+ },
16
+ {
17
+ "path": "../runtime-specs/tsconfig.json"
18
+ },
19
+ {
20
+ "path": "../api/tsconfig.json"
21
+ },
22
+ {
23
+ "path": "../cli/tsconfig.json"
24
+ },
25
+ {
26
+ "path": "../shape/tsconfig.json"
27
+ },
28
+ {
29
+ "path": "../utils/tsconfig.json"
30
+ },
31
+ {
32
+ "path": "../cli/tsconfig.json"
33
+ },
34
+ {
35
+ "path": "../contracts/tsconfig.json"
36
+ },
37
+ {
38
+ "path": "../merkleized-metadata/tsconfig.json"
39
+ },
40
+ {
41
+ "path": "../smoldot/tsconfig.json"
42
+ }
43
+ ]
44
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "exclude": ["**/__tests__/*"],
4
+ "references": [
5
+ {
6
+ "path": "../codecs/tsconfig.json"
7
+ },
8
+ {
9
+ "path": "../types/tsconfig.json"
10
+ },
11
+ {
12
+ "path": "../runtime-specs/tsconfig.json"
13
+ },
14
+ {
15
+ "path": "../api/tsconfig.json"
16
+ },
17
+ {
18
+ "path": "../providers/tsconfig.json"
19
+ },
20
+ {
21
+ "path": "../shape/tsconfig.json"
22
+ },
23
+ {
24
+ "path": "../utils/tsconfig.json"
25
+ },
26
+ {
27
+ "path": "../cli/tsconfig.json"
28
+ },
29
+ {
30
+ "path": "../contracts/tsconfig.json"
31
+ },
32
+ {
33
+ "path": "../merkleized-metadata/tsconfig.json"
34
+ },
35
+ {
36
+ "path": "../smoldot/tsconfig.json"
37
+ }
38
+ ]
39
+ }