@dedot/codegen 0.0.1-next.70fc26c6.11 → 0.0.1-next.714802d9.27

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 (62) hide show
  1. package/cjs/generator/ConstsGen.js +3 -3
  2. package/cjs/generator/ErrorsGen.js +4 -4
  3. package/cjs/generator/EventsGen.js +4 -4
  4. package/cjs/generator/IndexGen.js +1 -1
  5. package/cjs/generator/JsonRpcGen.js +59 -0
  6. package/cjs/generator/QueryGen.js +19 -10
  7. package/cjs/generator/RuntimeApisGen.js +91 -16
  8. package/cjs/generator/TxGen.js +9 -7
  9. package/cjs/generator/TypeImports.js +8 -0
  10. package/cjs/generator/TypesGen.js +2 -8
  11. package/cjs/generator/index.js +1 -1
  12. package/cjs/generator/known-codecs.js +1 -1
  13. package/cjs/index.js +19 -19
  14. package/cjs/templates/consts.hbs +1 -1
  15. package/cjs/templates/errors.hbs +1 -1
  16. package/cjs/templates/events.hbs +1 -1
  17. package/cjs/templates/index.hbs +15 -10
  18. package/cjs/templates/json-rpc.hbs +5 -0
  19. package/cjs/templates/query.hbs +1 -1
  20. package/cjs/templates/runtime.hbs +1 -1
  21. package/cjs/templates/tx.hbs +1 -1
  22. package/generator/ApiGen.d.ts +3 -3
  23. package/generator/ConstsGen.d.ts +1 -1
  24. package/generator/ConstsGen.js +2 -2
  25. package/generator/ErrorsGen.js +4 -4
  26. package/generator/EventsGen.js +4 -4
  27. package/generator/IndexGen.js +1 -1
  28. package/generator/{RpcGen.d.ts → JsonRpcGen.d.ts} +1 -4
  29. package/generator/JsonRpcGen.js +55 -0
  30. package/generator/QueryGen.d.ts +1 -1
  31. package/generator/QueryGen.js +18 -9
  32. package/generator/RuntimeApisGen.d.ts +4 -4
  33. package/generator/RuntimeApisGen.js +91 -16
  34. package/generator/TxGen.js +9 -7
  35. package/generator/TypeImports.d.ts +2 -0
  36. package/generator/TypeImports.js +8 -0
  37. package/generator/TypesGen.d.ts +1 -1
  38. package/generator/TypesGen.js +2 -8
  39. package/generator/index.d.ts +1 -1
  40. package/generator/index.js +1 -1
  41. package/generator/known-codecs.js +1 -1
  42. package/index.d.ts +2 -2
  43. package/index.js +21 -21
  44. package/package.json +11 -15
  45. package/templates/consts.hbs +1 -1
  46. package/templates/errors.hbs +1 -1
  47. package/templates/events.hbs +1 -1
  48. package/templates/index.hbs +15 -10
  49. package/templates/json-rpc.hbs +5 -0
  50. package/templates/query.hbs +1 -1
  51. package/templates/runtime.hbs +1 -1
  52. package/templates/tx.hbs +1 -1
  53. package/cjs/generator/RpcGen.js +0 -175
  54. package/cjs/generator/known-types.js +0 -33
  55. package/cjs/packageInfo.js +0 -5
  56. package/cjs/templates/rpc.hbs +0 -7
  57. package/generator/RpcGen.js +0 -171
  58. package/generator/known-types.d.ts +0 -6
  59. package/generator/known-types.js +0 -30
  60. package/packageInfo.d.ts +0 -4
  61. package/packageInfo.js +0 -2
  62. package/templates/rpc.hbs +0 -7
@@ -1,30 +0,0 @@
1
- /**
2
- * Known type names registered in @dedot/types
3
- * Since TS interfaces are trim-off when compiling,
4
- * So we need to register them explicitly here for RPC codegen process
5
- */
6
- export const knownTypes = [
7
- 'ExtrinsicOrHash',
8
- 'EpochAuthorship',
9
- 'BlockStats',
10
- 'Prevotes',
11
- 'Precommits',
12
- 'RoundState',
13
- 'ReportedRoundStates',
14
- 'JustificationNotification',
15
- 'EncodedFinalityProofs',
16
- 'LeavesProof',
17
- 'StorageKind',
18
- 'RpcMethods',
19
- 'ReadProof',
20
- 'StorageChangeSet',
21
- 'TraceBlockResponse',
22
- 'MigrationStatusResult',
23
- 'ChainType',
24
- 'ChainProperties',
25
- 'Health',
26
- 'SyncState',
27
- 'PeerInfo',
28
- 'NodeRole',
29
- 'NetworkState',
30
- ];
package/packageInfo.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export declare const packageInfo: {
2
- name: string;
3
- version: string;
4
- };
package/packageInfo.js DELETED
@@ -1,2 +0,0 @@
1
- // THIS FILE IS AUTO-GENERATED, DO NOT EDIT!
2
- export const packageInfo = { name: '@dedot/codegen', version: '0.0.1-alpha.28' };
package/templates/rpc.hbs DELETED
@@ -1,7 +0,0 @@
1
- // Generated by @dedot/codegen
2
-
3
- {{{ importTypes }}}
4
-
5
- export interface RpcCalls extends GenericRpcCalls {
6
- {{{rpcCallsOut}}}
7
- }