@typemove/sui 1.0.0-rc.27 → 1.0.0-rc.29
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/dist/cjs/codegen/codegen.d.ts +19 -0
- package/dist/cjs/codegen/codegen.d.ts.map +1 -0
- package/dist/cjs/codegen/codegen.js +177 -0
- package/dist/cjs/codegen/codegen.js.map +1 -0
- package/dist/cjs/codegen/index.d.ts +2 -0
- package/dist/cjs/codegen/index.d.ts.map +1 -0
- package/dist/cjs/codegen/index.js +5 -0
- package/dist/cjs/codegen/index.js.map +1 -0
- package/package.json +5 -5
- package/src/builtin/0x1.ts +285 -285
- package/src/builtin/0x2.ts +1457 -1457
- package/src/builtin/0x3.ts +490 -490
- package/src/tests/types/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.ts +25 -25
- package/src/tests/types/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.ts +281 -281
- package/src/tests/types/testnet/0xdee9.ts +313 -313
- package/src/tests/types/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.ts +1081 -1081
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SuiMoveNormalizedModule, SuiEvent, SuiMoveObject } from '@mysten/sui.js/client';
|
|
2
|
+
import { InternalMoveModule, InternalMoveStruct, AbstractCodegen, InternalMoveFunction } from '@typemove/move';
|
|
3
|
+
export declare function codegen(abisDir: string, outDir: string | undefined, endpoint: string, genExample?: boolean, builtin?: boolean): Promise<void>;
|
|
4
|
+
export declare class SuiCodegen extends AbstractCodegen<SuiMoveNormalizedModule, SuiEvent | SuiMoveObject> {
|
|
5
|
+
ADDRESS_TYPE: string;
|
|
6
|
+
SYSTEM_PACKAGE: string;
|
|
7
|
+
PREFIX: string;
|
|
8
|
+
PAYLOAD_OPTIONAL: boolean;
|
|
9
|
+
constructor(endpoint: string);
|
|
10
|
+
readModulesFile(fullPath: string): any;
|
|
11
|
+
generateStructs(module: InternalMoveModule, struct: InternalMoveStruct, events: Set<string>): string;
|
|
12
|
+
generateForEvents(module: InternalMoveModule, struct: InternalMoveStruct): string;
|
|
13
|
+
protected generateExtra(module: InternalMoveModule): string;
|
|
14
|
+
private generateArgs;
|
|
15
|
+
protected generateViewFunction(module: InternalMoveModule, func: InternalMoveFunction): string;
|
|
16
|
+
protected generateBuilderForFunction(module: InternalMoveModule, func: InternalMoveFunction): string;
|
|
17
|
+
generateImports(): string;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=codegen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codegen.d.ts","sourceRoot":"","sources":["../../../src/codegen/codegen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAIxF,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EAEf,oBAAoB,EAIrB,MAAM,gBAAgB,CAAA;AAIvB,wBAAsB,OAAO,CAC3B,OAAO,EAAE,MAAM,EACf,MAAM,oBAA8B,EACpC,QAAQ,EAAE,MAAM,EAChB,UAAU,UAAQ,EAClB,OAAO,UAAQ,iBAQhB;AAED,qBAAa,UAAW,SAAQ,eAAe,CAE7C,uBAAuB,EACvB,QAAQ,GAAG,aAAa,CACzB;IACC,YAAY,SAAW;IACvB,cAAc,SAAkB;IAIhC,MAAM,SAAQ;IAGd,gBAAgB,UAAO;gBAEX,QAAQ,EAAE,MAAM;IAI5B,eAAe,CAAC,QAAQ,EAAE,MAAM;IAQhC,eAAe,CAAC,MAAM,EAAE,kBAAkB,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM;IAsBpG,iBAAiB,CAAC,MAAM,EAAE,kBAAkB,EAAE,MAAM,EAAE,kBAAkB,GAAG,MAAM;IAajF,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM;IAe3D,OAAO,CAAC,YAAY;IA0BpB,SAAS,CAAC,oBAAoB,CAAC,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,oBAAoB,GAAG,MAAM;IA4B9F,SAAS,CAAC,0BAA0B,CAAC,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,oBAAoB,GAAG,MAAM;IAoCpG,eAAe,IAAI,MAAM;CAS1B"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SuiCodegen = exports.codegen = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs = tslib_1.__importStar(require("fs"));
|
|
6
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
7
|
+
const move_1 = require("@typemove/move");
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
const sui_chain_adapter_js_1 = require("../sui-chain-adapter.js");
|
|
10
|
+
async function codegen(abisDir, outDir = (0, path_1.join)('src', 'types', 'sui'), endpoint, genExample = false, builtin = false) {
|
|
11
|
+
if (!fs.existsSync(abisDir)) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
const gen = new SuiCodegen(endpoint);
|
|
15
|
+
const numFiles = await gen.generate(abisDir, outDir, builtin);
|
|
16
|
+
console.log(chalk_1.default.green(`Generated ${numFiles} for Sui`));
|
|
17
|
+
}
|
|
18
|
+
exports.codegen = codegen;
|
|
19
|
+
class SuiCodegen extends move_1.AbstractCodegen {
|
|
20
|
+
ADDRESS_TYPE = 'string';
|
|
21
|
+
SYSTEM_PACKAGE = '@typemove/sui';
|
|
22
|
+
// ADDRESS_TYPE = 'string'
|
|
23
|
+
// MAIN_NET = SuiNetwork.MAIN_NET
|
|
24
|
+
// TEST_NET = SuiNetwork.TEST_NET
|
|
25
|
+
PREFIX = 'Sui';
|
|
26
|
+
// STRUCT_FIELD_NAME = 'fields'
|
|
27
|
+
// GENERATE_ON_ENTRY = true
|
|
28
|
+
PAYLOAD_OPTIONAL = true;
|
|
29
|
+
constructor(endpoint) {
|
|
30
|
+
super(new sui_chain_adapter_js_1.SuiChainAdapter(endpoint));
|
|
31
|
+
}
|
|
32
|
+
readModulesFile(fullPath) {
|
|
33
|
+
const res = super.readModulesFile(fullPath);
|
|
34
|
+
if (res.result) {
|
|
35
|
+
return res.result;
|
|
36
|
+
}
|
|
37
|
+
return res;
|
|
38
|
+
}
|
|
39
|
+
generateStructs(module, struct, events) {
|
|
40
|
+
let content = '';
|
|
41
|
+
switch ((0, move_1.structQname)(module, struct)) {
|
|
42
|
+
// TODO they should still have module code generated
|
|
43
|
+
case '0x1::ascii::Char':
|
|
44
|
+
case '0x1::ascii::String':
|
|
45
|
+
case '0x2::object::ID':
|
|
46
|
+
content += `export type ${struct.name} = string`;
|
|
47
|
+
break;
|
|
48
|
+
case '0x2::coin::Coin':
|
|
49
|
+
content += `export type ${struct.name}<T> = string`;
|
|
50
|
+
break;
|
|
51
|
+
case '0x2::balance::Balance':
|
|
52
|
+
content += `export type ${struct.name}<T> = bigint`;
|
|
53
|
+
break;
|
|
54
|
+
case '0x1::option::Option':
|
|
55
|
+
content += `export type Option<T> = T | undefined`;
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
return content + super.generateStructs(module, struct, events, content !== '');
|
|
59
|
+
}
|
|
60
|
+
generateForEvents(module, struct) {
|
|
61
|
+
switch ((0, move_1.structQname)(module, struct)) {
|
|
62
|
+
case '0x1::ascii::Char':
|
|
63
|
+
case '0x1::ascii::String':
|
|
64
|
+
case '0x2::object::ID':
|
|
65
|
+
case '0x2::coin::Coin':
|
|
66
|
+
case '0x1::option::Option':
|
|
67
|
+
case '0x2::balance::Balance':
|
|
68
|
+
return '';
|
|
69
|
+
}
|
|
70
|
+
return super.generateForEvents(module, struct);
|
|
71
|
+
}
|
|
72
|
+
generateExtra(module) {
|
|
73
|
+
const funcs = module.exposedFunctions.map((f) => this.generateBuilderForFunction(module, f));
|
|
74
|
+
const viewFuncs = module.exposedFunctions.map((f) => this.generateViewFunction(module, f));
|
|
75
|
+
return `
|
|
76
|
+
export namespace builder {
|
|
77
|
+
${funcs.join('\n')}
|
|
78
|
+
}
|
|
79
|
+
export namespace view {
|
|
80
|
+
${viewFuncs.join('\n')}
|
|
81
|
+
}
|
|
82
|
+
`;
|
|
83
|
+
}
|
|
84
|
+
generateArgs(module, func) {
|
|
85
|
+
const args = [];
|
|
86
|
+
for (const [idx, arg] of func.params.entries()) {
|
|
87
|
+
if (arg.reference) {
|
|
88
|
+
args.push({
|
|
89
|
+
paramType: `${this.ADDRESS_TYPE} | ObjectCallArg | TransactionArgument`,
|
|
90
|
+
callValue: `_args.push(TransactionArgument.is(args[${idx}]) ? args[${idx}] : tx.object(args[${idx}]))`,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
else if (arg.isVector()) {
|
|
94
|
+
args.push({
|
|
95
|
+
paramType: `(${this.ADDRESS_TYPE} | ObjectCallArg)[] | TransactionArgument`,
|
|
96
|
+
callValue: `_args.push(TransactionArgument.is(args[${idx}]) ? args[${idx}] : tx.makeMoveVec({
|
|
97
|
+
objects: args[${idx}].map((a: any) => tx.object(a))
|
|
98
|
+
// type: TODO
|
|
99
|
+
}))`,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
args.push({
|
|
104
|
+
paramType: `${this.generateTypeForDescriptor(arg, module.address)} | TransactionArgument`,
|
|
105
|
+
callValue: `_args.push(TransactionArgument.is(args[${idx}]) ? args[${idx}] : tx.pure(args[${idx}]))`,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return args;
|
|
110
|
+
}
|
|
111
|
+
generateViewFunction(module, func) {
|
|
112
|
+
if (func.visibility !== move_1.InternalMoveFunctionVisibility.PUBLIC) {
|
|
113
|
+
return '';
|
|
114
|
+
}
|
|
115
|
+
const genericString = this.generateFunctionTypeParameters(func);
|
|
116
|
+
const typeParamArg = func.typeParams
|
|
117
|
+
.map((v, idx) => {
|
|
118
|
+
return `TypeDescriptor<T${idx}> | string`;
|
|
119
|
+
})
|
|
120
|
+
.join(',');
|
|
121
|
+
const args = this.generateArgs(module, func);
|
|
122
|
+
return `export async function ${(0, move_1.camel)((0, move_1.normalizeToJSName)(func.name))}${genericString}(
|
|
123
|
+
client: SuiClient,
|
|
124
|
+
args: [${args.map((a) => a.paramType).join(',')}],
|
|
125
|
+
${typeParamArg.length > 0 ? `typeArguments: [${typeParamArg}]` : ``} ) {
|
|
126
|
+
const tx = new TransactionBlock()
|
|
127
|
+
builder.${(0, move_1.camel)((0, move_1.normalizeToJSName)(func.name))}(tx, args ${typeParamArg.length > 0 ? `, typeArguments` : ''})
|
|
128
|
+
const res = await client.devInspectTransactionBlock({
|
|
129
|
+
transactionBlock: tx,
|
|
130
|
+
sender: ZERO_ADDRESS
|
|
131
|
+
})
|
|
132
|
+
return res
|
|
133
|
+
}`;
|
|
134
|
+
}
|
|
135
|
+
generateBuilderForFunction(module, func) {
|
|
136
|
+
if (func.visibility !== move_1.InternalMoveFunctionVisibility.PUBLIC) {
|
|
137
|
+
return '';
|
|
138
|
+
}
|
|
139
|
+
const args = this.generateArgs(module, func);
|
|
140
|
+
const genericString = this.generateFunctionTypeParameters(func);
|
|
141
|
+
const typeParamArg = func.typeParams
|
|
142
|
+
.map((v, idx) => {
|
|
143
|
+
return `TypeDescriptor<T${idx}> | string`;
|
|
144
|
+
})
|
|
145
|
+
.join(',');
|
|
146
|
+
const typeParamToString = func.typeParams
|
|
147
|
+
.map((v, idx) => {
|
|
148
|
+
return `typeof typeArguments[${idx}] === 'string' ? typeArguments[${idx}] : typeArguments[${idx}].getSignature()`;
|
|
149
|
+
})
|
|
150
|
+
.join(',');
|
|
151
|
+
return `export function ${(0, move_1.camel)((0, move_1.normalizeToJSName)(func.name))}${genericString}(tx: TransactionBlock,
|
|
152
|
+
args: [${args.map((a) => a.paramType).join(',')}],
|
|
153
|
+
${typeParamArg.length > 0 ? `typeArguments: [${typeParamArg}]` : ``} ):
|
|
154
|
+
TransactionArgument & [ ${'TransactionArgument,'.repeat(func.params.length)} ] {
|
|
155
|
+
const _args: any[] = []
|
|
156
|
+
${args.map((a) => a.callValue).join('\n')}
|
|
157
|
+
|
|
158
|
+
// @ts-ignore
|
|
159
|
+
return tx.moveCall({
|
|
160
|
+
target: "${module.address}::${module.name}::${func.name}",
|
|
161
|
+
arguments: _args,
|
|
162
|
+
${typeParamArg.length > 0 ? `typeArguments: [${typeParamToString}]` : ``}
|
|
163
|
+
})
|
|
164
|
+
}`;
|
|
165
|
+
}
|
|
166
|
+
generateImports() {
|
|
167
|
+
return `
|
|
168
|
+
${super.generateImports()}
|
|
169
|
+
import { ZERO_ADDRESS } from '@typemove/sui'
|
|
170
|
+
import { TransactionBlock } from '@mysten/sui.js/transactions'
|
|
171
|
+
import { ObjectCallArg, TransactionArgument } from '@mysten/sui.js'
|
|
172
|
+
import { SuiClient } from '@mysten/sui.js/client'
|
|
173
|
+
`;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
exports.SuiCodegen = SuiCodegen;
|
|
177
|
+
//# sourceMappingURL=codegen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codegen.js","sourceRoot":"","sources":["../../../src/codegen/codegen.ts"],"names":[],"mappings":";;;;AAEA,+CAAwB;AACxB,0DAAyB;AACzB,yCASuB;AACvB,+BAA2B;AAC3B,kEAAyD;AAElD,KAAK,UAAU,OAAO,CAC3B,OAAe,EACf,MAAM,GAAG,IAAA,WAAI,EAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,EACpC,QAAgB,EAChB,UAAU,GAAG,KAAK,EAClB,OAAO,GAAG,KAAK;IAEf,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;QAC3B,OAAM;KACP;IAC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AC,CAAC,GAAG,aAAa;eAClE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAC7C,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,mBAAmB,YAAY,GAAG,CAAC,CAAC,CAAC,EAAE;iCACxC,sBAAsB,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;;QAE1E,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;;;mBAI5B,MAAM,CAAC,OAAO,KAAK,MAAM,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI;;UAErD,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,mBAAmB,iBAAiB,GAAG,CAAC,CAAC,CAAC,EAAE;;MAE1E,CAAA;IACJ,CAAC;IAED,eAAe;QACb,OAAO;QACH,KAAK,CAAC,eAAe,EAAE;;;;;KAK1B,CAAA;IACH,CAAC;CACF;AAhLD,gCAgLC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/codegen/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/codegen/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typemove/sui",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.29",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"import": "./dist/esm/builtin/index.js",
|
|
13
13
|
"require": "./dist/cjs/builtin/index.js"
|
|
14
14
|
},
|
|
15
|
-
"./
|
|
16
|
-
"import": "./dist/esm/
|
|
17
|
-
"require": "./dist/cjs/
|
|
15
|
+
"./codegen": {
|
|
16
|
+
"import": "./dist/esm/codegen/index.js",
|
|
17
|
+
"require": "./dist/cjs/codegen/index.js"
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"main": "./dist/cjs/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@mysten/sui.js": "^0.39.0",
|
|
35
35
|
"chalk": "^5.2.0",
|
|
36
36
|
"radash": "^11.0.0",
|
|
37
|
-
"@typemove/move": "1.0.0-rc.
|
|
37
|
+
"@typemove/move": "1.0.0-rc.29"
|
|
38
38
|
},
|
|
39
39
|
"url": "https://github.com/sentioxyz/typemove",
|
|
40
40
|
"scripts": {
|