@dedot/codegen 0.0.1-alpha.40 → 0.0.1-alpha.41
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.
|
@@ -5,7 +5,7 @@ export class TxGen extends ApiGen {
|
|
|
5
5
|
generate(useSubPaths = false) {
|
|
6
6
|
const { pallets, types } = this.metadata;
|
|
7
7
|
this.typesGen.clearCache();
|
|
8
|
-
this.typesGen.typeImports.addKnownType('GenericChainTx', 'GenericTxCall', 'ISubmittableExtrinsic', 'ISubmittableResult', 'IRuntimeTxCall', 'RpcVersion', 'RpcV2', 'ISubmittableExtrinsicLegacy', '
|
|
8
|
+
this.typesGen.typeImports.addKnownType('GenericChainTx', 'GenericTxCall', 'ISubmittableExtrinsic', 'ISubmittableResult', 'IRuntimeTxCall', 'RpcVersion', 'RpcV2', 'ISubmittableExtrinsicLegacy', 'TxStatus');
|
|
9
9
|
const { callTypeId, addressTypeId, signatureTypeId } = this.metadata.extrinsic;
|
|
10
10
|
const callTypeIn = this.typesGen.generateType(callTypeId, 1);
|
|
11
11
|
const addressTypeIn = this.typesGen.generateType(addressTypeId, 1);
|
|
@@ -53,8 +53,8 @@ export class TxGen extends ApiGen {
|
|
|
53
53
|
export type ChainSubmittableExtrinsic<Rv extends RpcVersion, T extends IRuntimeTxCall = ${callTypeIn}> =
|
|
54
54
|
Extrinsic<${addressTypeIn}, T, ${signatureTypeIn}, any[]> &
|
|
55
55
|
(Rv extends RpcV2
|
|
56
|
-
? ISubmittableExtrinsic<ISubmittableResult<FrameSystemEventRecord,
|
|
57
|
-
: ISubmittableExtrinsicLegacy<ISubmittableResult<FrameSystemEventRecord,
|
|
56
|
+
? ISubmittableExtrinsic<ISubmittableResult<FrameSystemEventRecord, TxStatus>>
|
|
57
|
+
: ISubmittableExtrinsicLegacy<ISubmittableResult<FrameSystemEventRecord, TxStatus>>)
|
|
58
58
|
|
|
59
59
|
export type TxCall<Rv extends RpcVersion> = (...args: any[]) => ChainSubmittableExtrinsic<Rv>;
|
|
60
60
|
`;
|
|
@@ -8,7 +8,7 @@ class TxGen extends index_js_1.ApiGen {
|
|
|
8
8
|
generate(useSubPaths = false) {
|
|
9
9
|
const { pallets, types } = this.metadata;
|
|
10
10
|
this.typesGen.clearCache();
|
|
11
|
-
this.typesGen.typeImports.addKnownType('GenericChainTx', 'GenericTxCall', 'ISubmittableExtrinsic', 'ISubmittableResult', 'IRuntimeTxCall', 'RpcVersion', 'RpcV2', 'ISubmittableExtrinsicLegacy', '
|
|
11
|
+
this.typesGen.typeImports.addKnownType('GenericChainTx', 'GenericTxCall', 'ISubmittableExtrinsic', 'ISubmittableResult', 'IRuntimeTxCall', 'RpcVersion', 'RpcV2', 'ISubmittableExtrinsicLegacy', 'TxStatus');
|
|
12
12
|
const { callTypeId, addressTypeId, signatureTypeId } = this.metadata.extrinsic;
|
|
13
13
|
const callTypeIn = this.typesGen.generateType(callTypeId, 1);
|
|
14
14
|
const addressTypeIn = this.typesGen.generateType(addressTypeId, 1);
|
|
@@ -56,8 +56,8 @@ class TxGen extends index_js_1.ApiGen {
|
|
|
56
56
|
export type ChainSubmittableExtrinsic<Rv extends RpcVersion, T extends IRuntimeTxCall = ${callTypeIn}> =
|
|
57
57
|
Extrinsic<${addressTypeIn}, T, ${signatureTypeIn}, any[]> &
|
|
58
58
|
(Rv extends RpcV2
|
|
59
|
-
? ISubmittableExtrinsic<ISubmittableResult<FrameSystemEventRecord,
|
|
60
|
-
: ISubmittableExtrinsicLegacy<ISubmittableResult<FrameSystemEventRecord,
|
|
59
|
+
? ISubmittableExtrinsic<ISubmittableResult<FrameSystemEventRecord, TxStatus>>
|
|
60
|
+
: ISubmittableExtrinsicLegacy<ISubmittableResult<FrameSystemEventRecord, TxStatus>>)
|
|
61
61
|
|
|
62
62
|
export type TxCall<Rv extends RpcVersion> = (...args: any[]) => ChainSubmittableExtrinsic<Rv>;
|
|
63
63
|
`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dedot/codegen",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.41",
|
|
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,22 +18,22 @@
|
|
|
18
18
|
"copy": "cp -R ./src/chaintypes/templates ./dist/chaintypes && cp -R ./src/chaintypes/templates ./dist/cjs/chaintypes && cp -R ./src/typink/templates ./dist/typink && cp -R ./src/typink/templates ./dist/cjs/typink"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dedot/api": "0.0.1-alpha.
|
|
22
|
-
"@dedot/codecs": "0.0.1-alpha.
|
|
23
|
-
"@dedot/providers": "0.0.1-alpha.
|
|
24
|
-
"@dedot/runtime-specs": "0.0.1-alpha.
|
|
25
|
-
"@dedot/shape": "0.0.1-alpha.
|
|
26
|
-
"@dedot/types": "0.0.1-alpha.
|
|
27
|
-
"@dedot/utils": "0.0.1-alpha.
|
|
21
|
+
"@dedot/api": "0.0.1-alpha.41",
|
|
22
|
+
"@dedot/codecs": "0.0.1-alpha.41",
|
|
23
|
+
"@dedot/providers": "0.0.1-alpha.41",
|
|
24
|
+
"@dedot/runtime-specs": "0.0.1-alpha.41",
|
|
25
|
+
"@dedot/shape": "0.0.1-alpha.41",
|
|
26
|
+
"@dedot/types": "0.0.1-alpha.41",
|
|
27
|
+
"@dedot/utils": "0.0.1-alpha.41",
|
|
28
28
|
"handlebars": "^4.7.8",
|
|
29
|
-
"prettier": "^3.3.
|
|
29
|
+
"prettier": "^3.3.3"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public",
|
|
33
33
|
"directory": "dist"
|
|
34
34
|
},
|
|
35
35
|
"license": "Apache-2.0",
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "4c699c73281cf4525be2d8e31c416f4dd7dc2fdd",
|
|
37
37
|
"module": "./index.js",
|
|
38
38
|
"types": "./index.d.ts",
|
|
39
39
|
"exports": {
|