@qubic.ts/contracts 0.1.0
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/package.json +17 -0
- package/scripts/generate-artifacts.ts +178 -0
- package/src/codec/entry-input.test.ts +198 -0
- package/src/codec/entry-input.ts +959 -0
- package/src/codec/index.ts +8 -0
- package/src/generated/contracts/CCF.registry.json +741 -0
- package/src/generated/contracts/CCF.types.ts +307 -0
- package/src/generated/contracts/GQMPROP.registry.json +518 -0
- package/src/generated/contracts/GQMPROP.types.ts +238 -0
- package/src/generated/contracts/MLM.registry.json +8 -0
- package/src/generated/contracts/MLM.types.ts +42 -0
- package/src/generated/contracts/MSVAULT.registry.json +1162 -0
- package/src/generated/contracts/MSVAULT.types.ts +598 -0
- package/src/generated/contracts/NOST.registry.json +1131 -0
- package/src/generated/contracts/NOST.types.ts +515 -0
- package/src/generated/contracts/QBAY.registry.json +1492 -0
- package/src/generated/contracts/QBAY.types.ts +681 -0
- package/src/generated/contracts/QBOND.registry.json +734 -0
- package/src/generated/contracts/QBOND.types.ts +397 -0
- package/src/generated/contracts/QDRAW.registry.json +112 -0
- package/src/generated/contracts/QDRAW.types.ts +110 -0
- package/src/generated/contracts/QDUEL.registry.json +466 -0
- package/src/generated/contracts/QDUEL.types.ts +265 -0
- package/src/generated/contracts/QEARN.registry.json +458 -0
- package/src/generated/contracts/QEARN.types.ts +265 -0
- package/src/generated/contracts/QIP.registry.json +483 -0
- package/src/generated/contracts/QIP.types.ts +194 -0
- package/src/generated/contracts/QRAFFLE.registry.json +916 -0
- package/src/generated/contracts/QRAFFLE.types.ts +446 -0
- package/src/generated/contracts/QRP.registry.json +139 -0
- package/src/generated/contracts/QRP.types.ts +144 -0
- package/src/generated/contracts/QRWA.registry.json +765 -0
- package/src/generated/contracts/QRWA.types.ts +402 -0
- package/src/generated/contracts/QSWAP.registry.json +941 -0
- package/src/generated/contracts/QSWAP.types.ts +479 -0
- package/src/generated/contracts/QTF.registry.json +480 -0
- package/src/generated/contracts/QTF.types.ts +346 -0
- package/src/generated/contracts/QUOTTERY.registry.json +530 -0
- package/src/generated/contracts/QUOTTERY.types.ts +262 -0
- package/src/generated/contracts/QUTIL.registry.json +1378 -0
- package/src/generated/contracts/QUTIL.types.ts +612 -0
- package/src/generated/contracts/QVAULT.registry.json +527 -0
- package/src/generated/contracts/QVAULT.types.ts +309 -0
- package/src/generated/contracts/QX.registry.json +610 -0
- package/src/generated/contracts/QX.types.ts +323 -0
- package/src/generated/contracts/RANDOM.registry.json +51 -0
- package/src/generated/contracts/RANDOM.types.ts +65 -0
- package/src/generated/contracts/RL.registry.json +490 -0
- package/src/generated/contracts/RL.types.ts +304 -0
- package/src/generated/contracts/SWATCH.registry.json +8 -0
- package/src/generated/contracts/SWATCH.types.ts +42 -0
- package/src/generated/core-registry.codecs.ts +6622 -0
- package/src/generated/core-registry.source.json +14342 -0
- package/src/generated/core-registry.ts +14349 -0
- package/src/generated/core-registry.types.ts +100 -0
- package/src/generator/contract-codecs.fixture.test.ts +17 -0
- package/src/generator/contract-codecs.test.ts +115 -0
- package/src/generator/contract-codecs.ts +416 -0
- package/src/generator/index.ts +14 -0
- package/src/generator/per-contract-files.test.ts +70 -0
- package/src/generator/per-contract-files.ts +122 -0
- package/src/generator/registry-runtime.fixture.test.ts +17 -0
- package/src/generator/registry-runtime.test.ts +55 -0
- package/src/generator/registry-runtime.ts +28 -0
- package/src/generator/registry-types.fixture.test.ts +17 -0
- package/src/generator/registry-types.test.ts +55 -0
- package/src/generator/registry-types.ts +75 -0
- package/src/index.test.ts +29 -0
- package/src/index.ts +49 -0
- package/src/registry/index.ts +17 -0
- package/src/registry/io-layout.fixture.test.ts +24 -0
- package/src/registry/io-layout.test.ts +93 -0
- package/src/registry/io-layout.ts +57 -0
- package/src/registry/normalize.ts +61 -0
- package/src/registry/schema.fixture.test.ts +21 -0
- package/src/registry/schema.ts +97 -0
- package/src/registry/types.ts +98 -0
- package/test/fixtures/io-layout.contracts.json +32 -0
- package/test/fixtures/io-layout.layouts.json +14 -0
- package/test/fixtures/registry.sample.codecs.ts +100 -0
- package/test/fixtures/registry.sample.json +27 -0
- package/test/fixtures/registry.sample.runtime.ts +54 -0
- package/test/fixtures/registry.sample.types.ts +16 -0
package/package.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@qubic.ts/contracts",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./src/index.ts",
|
|
6
|
+
"types": "./src/index.ts",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"zod": "^4.3.6"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "echo \"qubic-ts-contracts build pending\"",
|
|
12
|
+
"generate": "bun run ./scripts/generate-artifacts.ts",
|
|
13
|
+
"generate:check": "bun run ./scripts/generate-artifacts.ts --check",
|
|
14
|
+
"check": "bun run generate:check && bun test ./src/**/*.test.ts",
|
|
15
|
+
"test": "bun test ./src/**/*.test.ts"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { mkdir, readdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import {
|
|
4
|
+
generateContractCodecs,
|
|
5
|
+
type GeneratedPerContractFile,
|
|
6
|
+
generatePerContractFiles,
|
|
7
|
+
generateRegistryRuntime,
|
|
8
|
+
generateRegistryTypes,
|
|
9
|
+
} from "../src/generator/index.js";
|
|
10
|
+
import { validateContractsRegistry } from "../src/registry/schema.js";
|
|
11
|
+
|
|
12
|
+
type CliOptions = Readonly<{
|
|
13
|
+
check: boolean;
|
|
14
|
+
registryInput: string;
|
|
15
|
+
runtimeOutput: string;
|
|
16
|
+
typesOutput: string;
|
|
17
|
+
codecsOutput: string;
|
|
18
|
+
perContractDir: string;
|
|
19
|
+
}>;
|
|
20
|
+
|
|
21
|
+
const options = parseArgs(process.argv.slice(2));
|
|
22
|
+
|
|
23
|
+
const sourceRaw = (await Bun.file(options.registryInput).json()) as unknown;
|
|
24
|
+
const registry = validateContractsRegistry(sourceRaw);
|
|
25
|
+
|
|
26
|
+
const runtimeOutput = generateRegistryRuntime(registry);
|
|
27
|
+
const typesOutput = generateRegistryTypes(registry);
|
|
28
|
+
const codecsOutput = generateContractCodecs(registry);
|
|
29
|
+
const perContractFiles = generatePerContractFiles(registry);
|
|
30
|
+
|
|
31
|
+
if (options.check) {
|
|
32
|
+
await assertFileEquals(options.runtimeOutput, runtimeOutput, "runtime registry");
|
|
33
|
+
await assertFileEquals(options.typesOutput, typesOutput, "registry types");
|
|
34
|
+
await assertFileEquals(options.codecsOutput, codecsOutput, "contract codecs");
|
|
35
|
+
await assertPerContractFilesUpToDate(options.perContractDir, perContractFiles);
|
|
36
|
+
console.log("Generated contracts artifacts are up to date.");
|
|
37
|
+
process.exit(0);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
await writeTextFile(options.runtimeOutput, runtimeOutput);
|
|
41
|
+
await writeTextFile(options.typesOutput, typesOutput);
|
|
42
|
+
await writeTextFile(options.codecsOutput, codecsOutput);
|
|
43
|
+
await writePerContractFiles(options.perContractDir, perContractFiles);
|
|
44
|
+
|
|
45
|
+
console.log("Generated contracts artifacts:");
|
|
46
|
+
console.log(`- ${options.runtimeOutput}`);
|
|
47
|
+
console.log(`- ${options.typesOutput}`);
|
|
48
|
+
console.log(`- ${options.codecsOutput}`);
|
|
49
|
+
console.log(`- ${options.perContractDir} (${perContractFiles.length * 2} files)`);
|
|
50
|
+
|
|
51
|
+
function parseArgs(argv: readonly string[]): CliOptions {
|
|
52
|
+
let check = false;
|
|
53
|
+
let registryInput = "./src/generated/core-registry.source.json";
|
|
54
|
+
let runtimeOutput = "./src/generated/core-registry.ts";
|
|
55
|
+
let typesOutput = "./src/generated/core-registry.types.ts";
|
|
56
|
+
let codecsOutput = "./src/generated/core-registry.codecs.ts";
|
|
57
|
+
let perContractDir = "./src/generated/contracts";
|
|
58
|
+
|
|
59
|
+
for (let i = 0; i < argv.length; i++) {
|
|
60
|
+
const arg = argv[i];
|
|
61
|
+
if (arg === "--check") {
|
|
62
|
+
check = true;
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
if (arg === "--registry-input") {
|
|
66
|
+
registryInput = argv[i + 1] ?? registryInput;
|
|
67
|
+
i++;
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
if (arg === "--runtime-output") {
|
|
71
|
+
runtimeOutput = argv[i + 1] ?? runtimeOutput;
|
|
72
|
+
i++;
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
if (arg === "--types-output") {
|
|
76
|
+
typesOutput = argv[i + 1] ?? typesOutput;
|
|
77
|
+
i++;
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
if (arg === "--codecs-output") {
|
|
81
|
+
codecsOutput = argv[i + 1] ?? codecsOutput;
|
|
82
|
+
i++;
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
if (arg === "--per-contract-dir") {
|
|
86
|
+
perContractDir = argv[i + 1] ?? perContractDir;
|
|
87
|
+
i++;
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
throw new Error(`Unknown argument: ${arg}`);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
check,
|
|
96
|
+
registryInput,
|
|
97
|
+
runtimeOutput,
|
|
98
|
+
typesOutput,
|
|
99
|
+
codecsOutput,
|
|
100
|
+
perContractDir,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
async function writeTextFile(path: string, content: string): Promise<void> {
|
|
105
|
+
await mkdir(dirname(path), { recursive: true });
|
|
106
|
+
await writeFile(path, content, "utf8");
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
async function writePerContractFiles(
|
|
110
|
+
outputDir: string,
|
|
111
|
+
files: readonly GeneratedPerContractFile[],
|
|
112
|
+
): Promise<void> {
|
|
113
|
+
await mkdir(outputDir, { recursive: true });
|
|
114
|
+
await clearExistingGeneratedFiles(outputDir);
|
|
115
|
+
|
|
116
|
+
for (const file of files) {
|
|
117
|
+
await writeFile(join(outputDir, `${file.fileStem}.registry.json`), file.registryJson, "utf8");
|
|
118
|
+
await writeFile(join(outputDir, `${file.fileStem}.types.ts`), file.typesTs, "utf8");
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
async function assertFileEquals(path: string, expected: string, label: string): Promise<void> {
|
|
123
|
+
const actual = await readFile(path, "utf8").catch(() => null);
|
|
124
|
+
if (actual === null) {
|
|
125
|
+
throw new Error(`Missing generated ${label} file: ${path}`);
|
|
126
|
+
}
|
|
127
|
+
if (actual !== expected) {
|
|
128
|
+
throw new Error(`Generated ${label} is out of date: ${path}`);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
async function assertPerContractFilesUpToDate(
|
|
133
|
+
outputDir: string,
|
|
134
|
+
files: readonly GeneratedPerContractFile[],
|
|
135
|
+
): Promise<void> {
|
|
136
|
+
const expected = new Map<string, string>();
|
|
137
|
+
for (const file of files) {
|
|
138
|
+
expected.set(`${file.fileStem}.registry.json`, file.registryJson);
|
|
139
|
+
expected.set(`${file.fileStem}.types.ts`, file.typesTs);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const entries = await readdir(outputDir, { withFileTypes: true }).catch(() => []);
|
|
143
|
+
const existingNames = entries
|
|
144
|
+
.filter((entry) => entry.isFile())
|
|
145
|
+
.map((entry) => entry.name)
|
|
146
|
+
.filter((name) => isGeneratedContractFileName(name));
|
|
147
|
+
|
|
148
|
+
for (const name of existingNames) {
|
|
149
|
+
if (!expected.has(name)) {
|
|
150
|
+
throw new Error(`Unexpected generated file: ${join(outputDir, name)}`);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
for (const [name, expectedContent] of expected) {
|
|
155
|
+
const path = join(outputDir, name);
|
|
156
|
+
const actual = await readFile(path, "utf8").catch(() => null);
|
|
157
|
+
if (actual === null) {
|
|
158
|
+
throw new Error(`Missing generated file: ${path}`);
|
|
159
|
+
}
|
|
160
|
+
if (actual !== expectedContent) {
|
|
161
|
+
throw new Error(`Generated file is out of date: ${path}`);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
async function clearExistingGeneratedFiles(outputDir: string): Promise<void> {
|
|
167
|
+
const entries = await readdir(outputDir, { withFileTypes: true }).catch(() => []);
|
|
168
|
+
await Promise.all(
|
|
169
|
+
entries
|
|
170
|
+
.filter((entry) => entry.isFile())
|
|
171
|
+
.filter((entry) => isGeneratedContractFileName(entry.name))
|
|
172
|
+
.map((entry) => rm(join(outputDir, entry.name))),
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function isGeneratedContractFileName(name: string): boolean {
|
|
177
|
+
return name.endsWith(".registry.json") || name.endsWith(".types.ts");
|
|
178
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { describe, expect, it } from "bun:test";
|
|
2
|
+
import { decodeContractEntryInputData, encodeContractEntryInputData } from "./entry-input.js";
|
|
3
|
+
|
|
4
|
+
describe("encodeContractEntryInputData", () => {
|
|
5
|
+
it("encodes and decodes a struct input using castxml offsets", () => {
|
|
6
|
+
const encoded = encodeContractEntryInputData({
|
|
7
|
+
registry: makeContracts(),
|
|
8
|
+
contractName: "QTEST",
|
|
9
|
+
entryName: "SetConfig",
|
|
10
|
+
value: {
|
|
11
|
+
enabled: true,
|
|
12
|
+
threshold: 500,
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
expect(encoded.inputType).toBe(7);
|
|
17
|
+
expect([...encoded.bytes]).toEqual([1, 0, 0, 0, 244, 1, 0, 0]);
|
|
18
|
+
|
|
19
|
+
const decoded = decodeContractEntryInputData({
|
|
20
|
+
registry: makeContracts(),
|
|
21
|
+
contractName: "QTEST",
|
|
22
|
+
entryName: "SetConfig",
|
|
23
|
+
bytes: encoded.bytes,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
expect(decoded.value).toEqual({
|
|
27
|
+
enabled: true,
|
|
28
|
+
threshold: 500,
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it("encodes alias types as raw bytes when target type is unknown but byteSize exists", () => {
|
|
33
|
+
const encoded = encodeContractEntryInputData({
|
|
34
|
+
registry: makeContracts(),
|
|
35
|
+
contractName: "QTEST",
|
|
36
|
+
entryName: "SetRawBlob",
|
|
37
|
+
value: Uint8Array.of(1, 2, 3, 4),
|
|
38
|
+
});
|
|
39
|
+
expect([...encoded.bytes]).toEqual([1, 2, 3, 4]);
|
|
40
|
+
|
|
41
|
+
const decoded = decodeContractEntryInputData({
|
|
42
|
+
registry: makeContracts(),
|
|
43
|
+
contractName: "QTEST",
|
|
44
|
+
entryName: "SetRawBlob",
|
|
45
|
+
bytes: Uint8Array.of(9, 8, 7, 6),
|
|
46
|
+
});
|
|
47
|
+
expect(decoded.value).toEqual(Uint8Array.of(9, 8, 7, 6));
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it("requires layout metadata unless sequential mode is enabled", () => {
|
|
51
|
+
expect(() =>
|
|
52
|
+
encodeContractEntryInputData({
|
|
53
|
+
registry: makeContracts(),
|
|
54
|
+
contractName: "QTEST",
|
|
55
|
+
entryName: "SetSequential",
|
|
56
|
+
value: { first: 1, second: 2 },
|
|
57
|
+
}),
|
|
58
|
+
).toThrow("Missing byteOffset metadata");
|
|
59
|
+
|
|
60
|
+
const encoded = encodeContractEntryInputData({
|
|
61
|
+
registry: makeContracts(),
|
|
62
|
+
contractName: "QTEST",
|
|
63
|
+
entryName: "SetSequential",
|
|
64
|
+
value: { first: 1, second: 2 },
|
|
65
|
+
allowSequentialLayout: true,
|
|
66
|
+
});
|
|
67
|
+
expect([...encoded.bytes]).toEqual([1, 0, 2, 0]);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it("resolves namespaced nested type names inside Array declarations", () => {
|
|
71
|
+
const encoded = encodeContractEntryInputData({
|
|
72
|
+
registry: makeContracts(),
|
|
73
|
+
contractName: "QTEST",
|
|
74
|
+
entryName: "SetOrders",
|
|
75
|
+
value: {
|
|
76
|
+
orders: [{ value: 10 }, { value: 20 }],
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
expect([...encoded.bytes]).toEqual([10, 0, 20, 0]);
|
|
80
|
+
|
|
81
|
+
const decoded = decodeContractEntryInputData({
|
|
82
|
+
registry: makeContracts(),
|
|
83
|
+
contractName: "QTEST",
|
|
84
|
+
entryName: "SetOrders",
|
|
85
|
+
bytes: encoded.bytes,
|
|
86
|
+
});
|
|
87
|
+
expect(decoded.value).toEqual({
|
|
88
|
+
orders: [{ value: 10 }, { value: 20 }],
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
function makeContracts() {
|
|
94
|
+
return [
|
|
95
|
+
{
|
|
96
|
+
name: "QTEST",
|
|
97
|
+
contractIndex: 99,
|
|
98
|
+
address: "QTEST",
|
|
99
|
+
entries: [
|
|
100
|
+
{
|
|
101
|
+
kind: "procedure" as const,
|
|
102
|
+
name: "SetConfig",
|
|
103
|
+
inputType: 7,
|
|
104
|
+
inputTypeName: "SetConfig_input",
|
|
105
|
+
outputTypeName: "SetConfig_output",
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
kind: "procedure" as const,
|
|
109
|
+
name: "SetRawBlob",
|
|
110
|
+
inputType: 8,
|
|
111
|
+
inputTypeName: "SetRawBlob_input",
|
|
112
|
+
outputTypeName: "SetRawBlob_output",
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
kind: "procedure" as const,
|
|
116
|
+
name: "SetSequential",
|
|
117
|
+
inputType: 9,
|
|
118
|
+
inputTypeName: "SetSequential_input",
|
|
119
|
+
outputTypeName: "SetSequential_output",
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
kind: "procedure" as const,
|
|
123
|
+
name: "SetOrders",
|
|
124
|
+
inputType: 10,
|
|
125
|
+
inputTypeName: "SetOrders_input",
|
|
126
|
+
outputTypeName: "SetOrders_output",
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
ioTypes: [
|
|
130
|
+
{
|
|
131
|
+
kind: "struct" as const,
|
|
132
|
+
name: "SetConfig_input",
|
|
133
|
+
byteSize: 8,
|
|
134
|
+
fields: [
|
|
135
|
+
{ name: "enabled", type: "bit", byteOffset: 0 },
|
|
136
|
+
{ name: "threshold", type: "uint32", byteOffset: 4 },
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
kind: "alias" as const,
|
|
141
|
+
name: "SetConfig_output",
|
|
142
|
+
target: "NoData",
|
|
143
|
+
byteSize: 1,
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
kind: "alias" as const,
|
|
147
|
+
name: "SetRawBlob_input",
|
|
148
|
+
target: "ExternalBlobType",
|
|
149
|
+
byteSize: 4,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
kind: "alias" as const,
|
|
153
|
+
name: "SetRawBlob_output",
|
|
154
|
+
target: "NoData",
|
|
155
|
+
byteSize: 1,
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
kind: "struct" as const,
|
|
159
|
+
name: "SetSequential_input",
|
|
160
|
+
fields: [
|
|
161
|
+
{ name: "first", type: "uint16" },
|
|
162
|
+
{ name: "second", type: "uint16" },
|
|
163
|
+
],
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
kind: "alias" as const,
|
|
167
|
+
name: "SetSequential_output",
|
|
168
|
+
target: "NoData",
|
|
169
|
+
byteSize: 1,
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
kind: "struct" as const,
|
|
173
|
+
name: "Order",
|
|
174
|
+
byteSize: 2,
|
|
175
|
+
fields: [{ name: "value", type: "uint16", byteOffset: 0 }],
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
kind: "struct" as const,
|
|
179
|
+
name: "SetOrders_input",
|
|
180
|
+
byteSize: 4,
|
|
181
|
+
fields: [
|
|
182
|
+
{
|
|
183
|
+
name: "orders",
|
|
184
|
+
type: "Array<QTEST::SetOrders_input::Order, 2>",
|
|
185
|
+
byteOffset: 0,
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
kind: "alias" as const,
|
|
191
|
+
name: "SetOrders_output",
|
|
192
|
+
target: "NoData",
|
|
193
|
+
byteSize: 1,
|
|
194
|
+
},
|
|
195
|
+
],
|
|
196
|
+
},
|
|
197
|
+
];
|
|
198
|
+
}
|