@dedot/codegen 0.0.1-alpha.11

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 (76) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +3 -0
  3. package/cjs/genSupportedChainTypes.js +79 -0
  4. package/cjs/generator/ApiGen.js +16 -0
  5. package/cjs/generator/ConstsGen.js +32 -0
  6. package/cjs/generator/ErrorsGen.js +41 -0
  7. package/cjs/generator/EventsGen.js +68 -0
  8. package/cjs/generator/IndexGen.js +18 -0
  9. package/cjs/generator/QueryGen.js +59 -0
  10. package/cjs/generator/RpcGen.js +175 -0
  11. package/cjs/generator/RuntimeApisGen.js +120 -0
  12. package/cjs/generator/TxGen.js +90 -0
  13. package/cjs/generator/TypeImports.js +56 -0
  14. package/cjs/generator/TypesGen.js +436 -0
  15. package/cjs/generator/dirname.js +5 -0
  16. package/cjs/generator/index.js +26 -0
  17. package/cjs/generator/utils.js +68 -0
  18. package/cjs/index.js +76 -0
  19. package/cjs/package.json +1 -0
  20. package/cjs/packageInfo.js +5 -0
  21. package/cjs/templates/consts.hbs +7 -0
  22. package/cjs/templates/errors.hbs +7 -0
  23. package/cjs/templates/events.hbs +7 -0
  24. package/cjs/templates/index.hbs +22 -0
  25. package/cjs/templates/query.hbs +7 -0
  26. package/cjs/templates/rpc.hbs +7 -0
  27. package/cjs/templates/runtime.hbs +8 -0
  28. package/cjs/templates/tx.hbs +9 -0
  29. package/cjs/templates/types.hbs +5 -0
  30. package/cjs/types.js +2 -0
  31. package/genSupportedChainTypes.d.ts +1 -0
  32. package/genSupportedChainTypes.js +74 -0
  33. package/generator/ApiGen.d.ts +138 -0
  34. package/generator/ApiGen.js +12 -0
  35. package/generator/ConstsGen.d.ts +4 -0
  36. package/generator/ConstsGen.js +28 -0
  37. package/generator/ErrorsGen.d.ts +5 -0
  38. package/generator/ErrorsGen.js +37 -0
  39. package/generator/EventsGen.d.ts +5 -0
  40. package/generator/EventsGen.js +64 -0
  41. package/generator/IndexGen.d.ts +6 -0
  42. package/generator/IndexGen.js +14 -0
  43. package/generator/QueryGen.d.ts +5 -0
  44. package/generator/QueryGen.js +55 -0
  45. package/generator/RpcGen.d.ts +10 -0
  46. package/generator/RpcGen.js +171 -0
  47. package/generator/RuntimeApisGen.d.ts +9 -0
  48. package/generator/RuntimeApisGen.js +116 -0
  49. package/generator/TxGen.d.ts +5 -0
  50. package/generator/TxGen.js +86 -0
  51. package/generator/TypeImports.d.ts +14 -0
  52. package/generator/TypeImports.js +52 -0
  53. package/generator/TypesGen.d.ts +30 -0
  54. package/generator/TypesGen.js +432 -0
  55. package/generator/dirname.d.ts +1 -0
  56. package/generator/dirname.js +6 -0
  57. package/generator/index.d.ts +10 -0
  58. package/generator/index.js +10 -0
  59. package/generator/utils.d.ts +10 -0
  60. package/generator/utils.js +35 -0
  61. package/index.d.ts +4 -0
  62. package/index.js +48 -0
  63. package/package.json +49 -0
  64. package/packageInfo.d.ts +4 -0
  65. package/packageInfo.js +2 -0
  66. package/templates/consts.hbs +7 -0
  67. package/templates/errors.hbs +7 -0
  68. package/templates/events.hbs +7 -0
  69. package/templates/index.hbs +22 -0
  70. package/templates/query.hbs +7 -0
  71. package/templates/rpc.hbs +7 -0
  72. package/templates/runtime.hbs +8 -0
  73. package/templates/tx.hbs +9 -0
  74. package/templates/types.hbs +5 -0
  75. package/types.d.ts +6 -0
  76. package/types.js +1 -0
@@ -0,0 +1,7 @@
1
+ // Generated by @dedot/codegen
2
+
3
+ {{{ importTypes }}}
4
+
5
+ export interface ChainStorage extends GenericChainStorage {
6
+ {{{ defTypeOut }}}
7
+ }
@@ -0,0 +1,7 @@
1
+ // Generated by @dedot/codegen
2
+
3
+ {{{ importTypes }}}
4
+
5
+ export interface RpcCalls extends GenericRpcCalls {
6
+ {{{rpcCallsOut}}}
7
+ }
@@ -0,0 +1,8 @@
1
+ // Generated by @dedot/codegen
2
+
3
+ {{{ importTypes }}}
4
+
5
+ export interface RuntimeApis extends GenericRuntimeApis {
6
+ {{{ runtimeCallsOut }}}
7
+ }
8
+
@@ -0,0 +1,9 @@
1
+ // Generated by @dedot/codegen
2
+
3
+ {{{ importTypes }}}
4
+
5
+ {{{ defTypes }}}
6
+
7
+ export interface ChainTx extends GenericChainTx<TxCall> {
8
+ {{{ txDefsOut }}}
9
+ }
@@ -0,0 +1,5 @@
1
+ // Generated by @dedot/codegen
2
+
3
+ {{{ importTypes }}}
4
+
5
+ {{{ defTypeOut }}}
package/types.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ export type NetworkInfo = {
2
+ chain: string;
3
+ endpoint?: string;
4
+ metadataHex?: string;
5
+ rpcMethods?: string[];
6
+ };
package/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};