@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.
Files changed (83) hide show
  1. package/package.json +17 -0
  2. package/scripts/generate-artifacts.ts +178 -0
  3. package/src/codec/entry-input.test.ts +198 -0
  4. package/src/codec/entry-input.ts +959 -0
  5. package/src/codec/index.ts +8 -0
  6. package/src/generated/contracts/CCF.registry.json +741 -0
  7. package/src/generated/contracts/CCF.types.ts +307 -0
  8. package/src/generated/contracts/GQMPROP.registry.json +518 -0
  9. package/src/generated/contracts/GQMPROP.types.ts +238 -0
  10. package/src/generated/contracts/MLM.registry.json +8 -0
  11. package/src/generated/contracts/MLM.types.ts +42 -0
  12. package/src/generated/contracts/MSVAULT.registry.json +1162 -0
  13. package/src/generated/contracts/MSVAULT.types.ts +598 -0
  14. package/src/generated/contracts/NOST.registry.json +1131 -0
  15. package/src/generated/contracts/NOST.types.ts +515 -0
  16. package/src/generated/contracts/QBAY.registry.json +1492 -0
  17. package/src/generated/contracts/QBAY.types.ts +681 -0
  18. package/src/generated/contracts/QBOND.registry.json +734 -0
  19. package/src/generated/contracts/QBOND.types.ts +397 -0
  20. package/src/generated/contracts/QDRAW.registry.json +112 -0
  21. package/src/generated/contracts/QDRAW.types.ts +110 -0
  22. package/src/generated/contracts/QDUEL.registry.json +466 -0
  23. package/src/generated/contracts/QDUEL.types.ts +265 -0
  24. package/src/generated/contracts/QEARN.registry.json +458 -0
  25. package/src/generated/contracts/QEARN.types.ts +265 -0
  26. package/src/generated/contracts/QIP.registry.json +483 -0
  27. package/src/generated/contracts/QIP.types.ts +194 -0
  28. package/src/generated/contracts/QRAFFLE.registry.json +916 -0
  29. package/src/generated/contracts/QRAFFLE.types.ts +446 -0
  30. package/src/generated/contracts/QRP.registry.json +139 -0
  31. package/src/generated/contracts/QRP.types.ts +144 -0
  32. package/src/generated/contracts/QRWA.registry.json +765 -0
  33. package/src/generated/contracts/QRWA.types.ts +402 -0
  34. package/src/generated/contracts/QSWAP.registry.json +941 -0
  35. package/src/generated/contracts/QSWAP.types.ts +479 -0
  36. package/src/generated/contracts/QTF.registry.json +480 -0
  37. package/src/generated/contracts/QTF.types.ts +346 -0
  38. package/src/generated/contracts/QUOTTERY.registry.json +530 -0
  39. package/src/generated/contracts/QUOTTERY.types.ts +262 -0
  40. package/src/generated/contracts/QUTIL.registry.json +1378 -0
  41. package/src/generated/contracts/QUTIL.types.ts +612 -0
  42. package/src/generated/contracts/QVAULT.registry.json +527 -0
  43. package/src/generated/contracts/QVAULT.types.ts +309 -0
  44. package/src/generated/contracts/QX.registry.json +610 -0
  45. package/src/generated/contracts/QX.types.ts +323 -0
  46. package/src/generated/contracts/RANDOM.registry.json +51 -0
  47. package/src/generated/contracts/RANDOM.types.ts +65 -0
  48. package/src/generated/contracts/RL.registry.json +490 -0
  49. package/src/generated/contracts/RL.types.ts +304 -0
  50. package/src/generated/contracts/SWATCH.registry.json +8 -0
  51. package/src/generated/contracts/SWATCH.types.ts +42 -0
  52. package/src/generated/core-registry.codecs.ts +6622 -0
  53. package/src/generated/core-registry.source.json +14342 -0
  54. package/src/generated/core-registry.ts +14349 -0
  55. package/src/generated/core-registry.types.ts +100 -0
  56. package/src/generator/contract-codecs.fixture.test.ts +17 -0
  57. package/src/generator/contract-codecs.test.ts +115 -0
  58. package/src/generator/contract-codecs.ts +416 -0
  59. package/src/generator/index.ts +14 -0
  60. package/src/generator/per-contract-files.test.ts +70 -0
  61. package/src/generator/per-contract-files.ts +122 -0
  62. package/src/generator/registry-runtime.fixture.test.ts +17 -0
  63. package/src/generator/registry-runtime.test.ts +55 -0
  64. package/src/generator/registry-runtime.ts +28 -0
  65. package/src/generator/registry-types.fixture.test.ts +17 -0
  66. package/src/generator/registry-types.test.ts +55 -0
  67. package/src/generator/registry-types.ts +75 -0
  68. package/src/index.test.ts +29 -0
  69. package/src/index.ts +49 -0
  70. package/src/registry/index.ts +17 -0
  71. package/src/registry/io-layout.fixture.test.ts +24 -0
  72. package/src/registry/io-layout.test.ts +93 -0
  73. package/src/registry/io-layout.ts +57 -0
  74. package/src/registry/normalize.ts +61 -0
  75. package/src/registry/schema.fixture.test.ts +21 -0
  76. package/src/registry/schema.ts +97 -0
  77. package/src/registry/types.ts +98 -0
  78. package/test/fixtures/io-layout.contracts.json +32 -0
  79. package/test/fixtures/io-layout.layouts.json +14 -0
  80. package/test/fixtures/registry.sample.codecs.ts +100 -0
  81. package/test/fixtures/registry.sample.json +27 -0
  82. package/test/fixtures/registry.sample.runtime.ts +54 -0
  83. package/test/fixtures/registry.sample.types.ts +16 -0
@@ -0,0 +1,57 @@
1
+ import type { ContractDefinition, ContractIoTypeDefinition } from "./types.js";
2
+
3
+ export type CompilerIoTypeLayout = Readonly<{
4
+ contractName: string;
5
+ typeName: string;
6
+ byteSize: number;
7
+ byteAlign: number;
8
+ }>;
9
+
10
+ export function applyIoTypeLayouts(
11
+ contracts: readonly ContractDefinition[],
12
+ layouts: readonly CompilerIoTypeLayout[],
13
+ ): readonly ContractDefinition[] {
14
+ if (layouts.length === 0) return contracts;
15
+
16
+ const layoutByKey = new Map<string, CompilerIoTypeLayout>();
17
+ for (const layout of layouts) {
18
+ layoutByKey.set(makeLayoutKey(layout.contractName, layout.typeName), layout);
19
+ }
20
+
21
+ return contracts.map((contract) => {
22
+ if (!contract.ioTypes || contract.ioTypes.length === 0) return contract;
23
+
24
+ const ioTypes = contract.ioTypes.map((typeDef) => {
25
+ const layout = layoutByKey.get(makeLayoutKey(contract.name, typeDef.name));
26
+ if (!layout) return typeDef;
27
+ return {
28
+ ...typeDef,
29
+ byteSize: layout.byteSize,
30
+ byteAlign: layout.byteAlign,
31
+ } as ContractIoTypeDefinition;
32
+ });
33
+
34
+ const ioTypeByName = new Map(ioTypes.map((typeDef) => [typeDef.name, typeDef]));
35
+
36
+ const entries = contract.entries.map((entry) => {
37
+ const inputType = entry.inputTypeName ? ioTypeByName.get(entry.inputTypeName) : undefined;
38
+ const outputType = entry.outputTypeName ? ioTypeByName.get(entry.outputTypeName) : undefined;
39
+
40
+ return {
41
+ ...entry,
42
+ inputSize: entry.inputSize ?? inputType?.byteSize,
43
+ outputSize: entry.outputSize ?? outputType?.byteSize,
44
+ };
45
+ });
46
+
47
+ return {
48
+ ...contract,
49
+ entries,
50
+ ioTypes,
51
+ };
52
+ });
53
+ }
54
+
55
+ function makeLayoutKey(contractName: string, typeName: string): string {
56
+ return `${contractName}::${typeName}`;
57
+ }
@@ -0,0 +1,61 @@
1
+ import type {
2
+ ContractDefinition,
3
+ ContractEntry,
4
+ ContractIoTypeDefinition,
5
+ ContractsRegistry,
6
+ ContractsRegistryIndex,
7
+ } from "./types.js";
8
+
9
+ export function normalizeContractsRegistry(registry: ContractsRegistry): ContractsRegistry {
10
+ const contracts = [...registry.contracts].map(normalizeContract).sort(compareContracts);
11
+ return {
12
+ ...registry,
13
+ contracts,
14
+ };
15
+ }
16
+
17
+ export function createContractsRegistryIndex(registry: ContractsRegistry): ContractsRegistryIndex {
18
+ const byName = new Map<string, ContractDefinition>();
19
+ const byIndex = new Map<number, ContractDefinition>();
20
+ const byAddress = new Map<string, ContractDefinition>();
21
+
22
+ for (const contract of registry.contracts) {
23
+ byName.set(contract.name, contract);
24
+ byIndex.set(contract.contractIndex, contract);
25
+ byAddress.set(contract.address, contract);
26
+ }
27
+
28
+ return { byName, byIndex, byAddress };
29
+ }
30
+
31
+ function normalizeContract(contract: ContractDefinition): ContractDefinition {
32
+ return {
33
+ ...contract,
34
+ entries: [...contract.entries].sort(compareEntries),
35
+ ioTypes: contract.ioTypes ? [...contract.ioTypes].sort(compareIoTypes) : undefined,
36
+ };
37
+ }
38
+
39
+ function compareContracts(a: ContractDefinition, b: ContractDefinition): number {
40
+ if (a.contractIndex !== b.contractIndex) {
41
+ return a.contractIndex - b.contractIndex;
42
+ }
43
+ return a.name.localeCompare(b.name);
44
+ }
45
+
46
+ function compareEntries(a: ContractEntry, b: ContractEntry): number {
47
+ if (a.kind !== b.kind) {
48
+ return a.kind === "function" ? -1 : 1;
49
+ }
50
+ if (a.inputType !== b.inputType) {
51
+ return a.inputType - b.inputType;
52
+ }
53
+ return a.name.localeCompare(b.name);
54
+ }
55
+
56
+ function compareIoTypes(a: ContractIoTypeDefinition, b: ContractIoTypeDefinition): number {
57
+ if (a.kind !== b.kind) {
58
+ return a.kind === "struct" ? -1 : 1;
59
+ }
60
+ return a.name.localeCompare(b.name);
61
+ }
@@ -0,0 +1,21 @@
1
+ import { describe, expect, it } from "bun:test";
2
+ import {
3
+ createContractsRegistryIndex,
4
+ normalizeContractsRegistry,
5
+ validateContractsRegistry,
6
+ } from "./index.js";
7
+
8
+ describe("registry schema fixture", () => {
9
+ it("validates, normalizes, and indexes fixture registry", async () => {
10
+ const fixturePath = new URL("../../test/fixtures/registry.sample.json", import.meta.url);
11
+ const fixtureRaw = (await Bun.file(fixturePath).json()) as unknown;
12
+
13
+ const parsed = validateContractsRegistry(fixtureRaw);
14
+ const normalized = normalizeContractsRegistry(parsed);
15
+ const index = createContractsRegistryIndex(normalized);
16
+
17
+ expect(parsed.version).toBe(1);
18
+ expect(normalized.contracts[0]?.name).toBe("QUTIL");
19
+ expect(index.byIndex.get(10)?.name).toBe("QVAULT");
20
+ });
21
+ });
@@ -0,0 +1,97 @@
1
+ import { z } from "zod";
2
+ import type {
3
+ ContractDefinition,
4
+ ContractEntry,
5
+ ContractIoField,
6
+ ContractIoTypeDefinition,
7
+ ContractsRegistry,
8
+ RegistrySource,
9
+ } from "./types.js";
10
+
11
+ const uint32Schema = z.number().int().nonnegative().max(0xffff_ffff);
12
+ const nonEmptyStringSchema = z.string().trim().min(1);
13
+
14
+ export const registrySourceSchema: z.ZodType<RegistrySource> = z
15
+ .object({
16
+ name: nonEmptyStringSchema,
17
+ revision: z.string().optional(),
18
+ hash: z.string().optional(),
19
+ })
20
+ .strict();
21
+
22
+ export const contractEntrySchema: z.ZodType<ContractEntry> = z
23
+ .object({
24
+ kind: z.enum(["function", "procedure"]),
25
+ name: nonEmptyStringSchema,
26
+ displayName: z.string().optional(),
27
+ inputType: uint32Schema,
28
+ inputTypeName: nonEmptyStringSchema.optional(),
29
+ outputTypeName: nonEmptyStringSchema.optional(),
30
+ inputSize: uint32Schema.optional(),
31
+ outputSize: uint32Schema.optional(),
32
+ })
33
+ .strict();
34
+
35
+ export const contractIoFieldSchema: z.ZodType<ContractIoField> = z
36
+ .object({
37
+ name: nonEmptyStringSchema,
38
+ type: nonEmptyStringSchema,
39
+ byteOffset: uint32Schema.optional(),
40
+ })
41
+ .strict();
42
+
43
+ export const contractIoTypeDefinitionSchema: z.ZodType<ContractIoTypeDefinition> =
44
+ z.discriminatedUnion("kind", [
45
+ z
46
+ .object({
47
+ kind: z.literal("struct"),
48
+ name: nonEmptyStringSchema,
49
+ fields: z.array(contractIoFieldSchema),
50
+ byteSize: uint32Schema.optional(),
51
+ byteAlign: uint32Schema.optional(),
52
+ })
53
+ .strict(),
54
+ z
55
+ .object({
56
+ kind: z.literal("alias"),
57
+ name: nonEmptyStringSchema,
58
+ target: nonEmptyStringSchema,
59
+ byteSize: uint32Schema.optional(),
60
+ byteAlign: uint32Schema.optional(),
61
+ })
62
+ .strict(),
63
+ ]);
64
+
65
+ export const contractDefinitionSchema: z.ZodType<ContractDefinition> = z
66
+ .object({
67
+ name: nonEmptyStringSchema,
68
+ contractIndex: uint32Schema,
69
+ address: nonEmptyStringSchema,
70
+ label: z.string().optional(),
71
+ filename: z.string().optional(),
72
+ githubUrl: z.string().optional(),
73
+ website: z.string().optional(),
74
+ proposalUrl: z.string().optional(),
75
+ entries: z.array(contractEntrySchema),
76
+ ioTypes: z.array(contractIoTypeDefinitionSchema).optional(),
77
+ })
78
+ .strict();
79
+
80
+ export const contractsRegistrySchema: z.ZodType<ContractsRegistry> = z
81
+ .object({
82
+ version: z.literal(1),
83
+ metadata: z
84
+ .object({
85
+ generatedAt: z.string().refine((value) => !Number.isNaN(Date.parse(value)), {
86
+ message: "generatedAt must be an ISO date string",
87
+ }),
88
+ sources: z.array(registrySourceSchema),
89
+ })
90
+ .strict(),
91
+ contracts: z.array(contractDefinitionSchema),
92
+ })
93
+ .strict();
94
+
95
+ export function validateContractsRegistry(value: unknown): ContractsRegistry {
96
+ return contractsRegistrySchema.parse(value);
97
+ }
@@ -0,0 +1,98 @@
1
+ export type ContractEntryKind = "function" | "procedure";
2
+
3
+ export type ContractEntry = Readonly<{
4
+ kind: ContractEntryKind;
5
+ name: string;
6
+ displayName?: string;
7
+ inputType: number;
8
+ inputTypeName?: string;
9
+ outputTypeName?: string;
10
+ inputSize?: number;
11
+ outputSize?: number;
12
+ }>;
13
+
14
+ export type ContractIoField = Readonly<{
15
+ name: string;
16
+ type: string;
17
+ byteOffset?: number;
18
+ }>;
19
+
20
+ export type ContractIoTypeDefinition =
21
+ | Readonly<{
22
+ kind: "struct";
23
+ name: string;
24
+ fields: readonly ContractIoField[];
25
+ byteSize?: number;
26
+ byteAlign?: number;
27
+ }>
28
+ | Readonly<{
29
+ kind: "alias";
30
+ name: string;
31
+ target: string;
32
+ byteSize?: number;
33
+ byteAlign?: number;
34
+ }>;
35
+
36
+ export type ContractDefinition = Readonly<{
37
+ name: string;
38
+ contractIndex: number;
39
+ address: string;
40
+ label?: string;
41
+ filename?: string;
42
+ githubUrl?: string;
43
+ website?: string;
44
+ proposalUrl?: string;
45
+ entries: readonly ContractEntry[];
46
+ ioTypes?: readonly ContractIoTypeDefinition[];
47
+ }>;
48
+
49
+ export type RegistrySource = Readonly<{
50
+ name: string;
51
+ revision?: string;
52
+ hash?: string;
53
+ }>;
54
+
55
+ export type ContractsRegistry = Readonly<{
56
+ version: 1;
57
+ metadata: Readonly<{
58
+ generatedAt: string;
59
+ sources: readonly RegistrySource[];
60
+ }>;
61
+ contracts: readonly ContractDefinition[];
62
+ }>;
63
+
64
+ export type ContractsRegistryIndex = Readonly<{
65
+ byName: ReadonlyMap<string, ContractDefinition>;
66
+ byIndex: ReadonlyMap<number, ContractDefinition>;
67
+ byAddress: ReadonlyMap<string, ContractDefinition>;
68
+ }>;
69
+
70
+ export type StaticProcedureEnrichment = Readonly<{
71
+ id: number;
72
+ name: string;
73
+ }>;
74
+
75
+ export type StaticContractEnrichment = Readonly<{
76
+ contractIndex?: number;
77
+ name?: string;
78
+ address?: string;
79
+ label?: string;
80
+ filename?: string;
81
+ githubUrl?: string;
82
+ website?: string;
83
+ proposalUrl?: string;
84
+ procedures?: readonly StaticProcedureEnrichment[];
85
+ }>;
86
+
87
+ export type ContractOverlay = Readonly<{
88
+ contractIndex: number;
89
+ patch?: Readonly<
90
+ Partial<
91
+ Pick<
92
+ ContractDefinition,
93
+ "name" | "address" | "label" | "filename" | "githubUrl" | "website" | "proposalUrl"
94
+ >
95
+ >
96
+ >;
97
+ entryDisplayNames?: Readonly<Record<number, string>>;
98
+ }>;
@@ -0,0 +1,32 @@
1
+ [
2
+ {
3
+ "name": "QUTIL",
4
+ "contractIndex": 4,
5
+ "address": "QUTIL",
6
+ "entries": [
7
+ {
8
+ "kind": "function",
9
+ "name": "GetFees",
10
+ "inputType": 7,
11
+ "inputTypeName": "GetFees_input",
12
+ "outputTypeName": "GetFees_output"
13
+ }
14
+ ],
15
+ "ioTypes": [
16
+ {
17
+ "kind": "struct",
18
+ "name": "GetFees_input",
19
+ "fields": [
20
+ { "name": "contractIndex", "type": "uint32" }
21
+ ]
22
+ },
23
+ {
24
+ "kind": "struct",
25
+ "name": "GetFees_output",
26
+ "fields": [
27
+ { "name": "fee", "type": "uint64" }
28
+ ]
29
+ }
30
+ ]
31
+ }
32
+ ]
@@ -0,0 +1,14 @@
1
+ [
2
+ {
3
+ "contractName": "QUTIL",
4
+ "typeName": "GetFees_input",
5
+ "byteSize": 8,
6
+ "byteAlign": 8
7
+ },
8
+ {
9
+ "contractName": "QUTIL",
10
+ "typeName": "GetFees_output",
11
+ "byteSize": 16,
12
+ "byteAlign": 8
13
+ }
14
+ ]
@@ -0,0 +1,100 @@
1
+ /* eslint-disable */
2
+ /* This file is generated. Do not edit manually. */
3
+
4
+ export interface ContractTypeMap {
5
+ QUTIL: {
6
+ readonly contractIndex: 4;
7
+ readonly functions: {
8
+ GetFees: {
9
+ readonly kind: "function";
10
+ readonly inputType: 1;
11
+ readonly inputTypeName: "GetFees_input";
12
+ readonly outputTypeName: "GetFees_output";
13
+ readonly input: unknown;
14
+ readonly output: unknown;
15
+ };
16
+ };
17
+ readonly procedures: {
18
+ BurnQubic: {
19
+ readonly kind: "procedure";
20
+ readonly inputType: 2;
21
+ readonly inputTypeName: "BurnQubic_input";
22
+ readonly outputTypeName: "BurnQubic_output";
23
+ readonly input: unknown;
24
+ readonly output: unknown;
25
+ };
26
+ };
27
+ };
28
+ QVAULT: {
29
+ readonly contractIndex: 10;
30
+ readonly functions: Record<never, never>;
31
+ readonly procedures: {
32
+ SubmitAuthAddress: {
33
+ readonly kind: "procedure";
34
+ readonly inputType: 7;
35
+ readonly inputTypeName: "SubmitAuthAddress_input";
36
+ readonly outputTypeName: "SubmitAuthAddress_output";
37
+ readonly input: unknown;
38
+ readonly output: unknown;
39
+ };
40
+ };
41
+ };
42
+ }
43
+
44
+ export type ContractName = keyof ContractTypeMap & string;
45
+ export type FunctionName<C extends ContractName> = keyof ContractTypeMap[C]["functions"] & string;
46
+ export type ProcedureName<C extends ContractName> = keyof ContractTypeMap[C]["procedures"] & string;
47
+
48
+ export type FunctionInput<
49
+ C extends ContractName,
50
+ F extends FunctionName<C>,
51
+ > = ContractTypeMap[C]["functions"][F]["input"];
52
+ export type FunctionOutput<
53
+ C extends ContractName,
54
+ F extends FunctionName<C>,
55
+ > = ContractTypeMap[C]["functions"][F]["output"];
56
+
57
+ export type ProcedureInput<
58
+ C extends ContractName,
59
+ P extends ProcedureName<C>,
60
+ > = ContractTypeMap[C]["procedures"][P]["input"];
61
+ export type ProcedureOutput<
62
+ C extends ContractName,
63
+ P extends ProcedureName<C>,
64
+ > = ContractTypeMap[C]["procedures"][P]["output"];
65
+
66
+ export const contractCodecRegistry = {
67
+ QUTIL: {
68
+ contractIndex: 4,
69
+ functions: {
70
+ GetFees: {
71
+ kind: "function",
72
+ inputType: 1,
73
+ inputTypeName: "GetFees_input",
74
+ outputTypeName: "GetFees_output",
75
+ },
76
+ },
77
+ procedures: {
78
+ BurnQubic: {
79
+ kind: "procedure",
80
+ inputType: 2,
81
+ inputTypeName: "BurnQubic_input",
82
+ outputTypeName: "BurnQubic_output",
83
+ },
84
+ },
85
+ },
86
+ QVAULT: {
87
+ contractIndex: 10,
88
+ functions: {},
89
+ procedures: {
90
+ SubmitAuthAddress: {
91
+ kind: "procedure",
92
+ inputType: 7,
93
+ inputTypeName: "SubmitAuthAddress_input",
94
+ outputTypeName: "SubmitAuthAddress_output",
95
+ },
96
+ },
97
+ },
98
+ } as const satisfies Readonly<Record<ContractName, unknown>>;
99
+
100
+ export type RuntimeContractCodecRegistry = typeof contractCodecRegistry;
@@ -0,0 +1,27 @@
1
+ {
2
+ "version": 1,
3
+ "metadata": {
4
+ "generatedAt": "2026-02-18T00:00:00.000Z",
5
+ "sources": [
6
+ { "name": "qubic/core", "revision": "abc123" },
7
+ { "name": "static", "revision": "def456" }
8
+ ]
9
+ },
10
+ "contracts": [
11
+ {
12
+ "name": "QVAULT",
13
+ "contractIndex": 10,
14
+ "address": "KAAAA",
15
+ "entries": [{ "kind": "procedure", "name": "SubmitAuthAddress", "inputType": 7 }]
16
+ },
17
+ {
18
+ "name": "QUTIL",
19
+ "contractIndex": 4,
20
+ "address": "EAAAA",
21
+ "entries": [
22
+ { "kind": "procedure", "name": "BurnQubic", "inputType": 2 },
23
+ { "kind": "function", "name": "GetFees", "inputType": 1 }
24
+ ]
25
+ }
26
+ ]
27
+ }
@@ -0,0 +1,54 @@
1
+ /* eslint-disable */
2
+ /* This file is generated. Do not edit manually. */
3
+
4
+ import type { ContractsRegistry } from "../registry/types.js";
5
+
6
+ export const coreContractsRegistry = {
7
+ "version": 1,
8
+ "metadata": {
9
+ "generatedAt": "2026-02-18T00:00:00.000Z",
10
+ "sources": [
11
+ {
12
+ "name": "qubic/core",
13
+ "revision": "abc123"
14
+ },
15
+ {
16
+ "name": "static",
17
+ "revision": "def456"
18
+ }
19
+ ]
20
+ },
21
+ "contracts": [
22
+ {
23
+ "name": "QUTIL",
24
+ "contractIndex": 4,
25
+ "address": "EAAAA",
26
+ "entries": [
27
+ {
28
+ "kind": "function",
29
+ "name": "GetFees",
30
+ "inputType": 1
31
+ },
32
+ {
33
+ "kind": "procedure",
34
+ "name": "BurnQubic",
35
+ "inputType": 2
36
+ }
37
+ ]
38
+ },
39
+ {
40
+ "name": "QVAULT",
41
+ "contractIndex": 10,
42
+ "address": "KAAAA",
43
+ "entries": [
44
+ {
45
+ "kind": "procedure",
46
+ "name": "SubmitAuthAddress",
47
+ "inputType": 7
48
+ }
49
+ ]
50
+ }
51
+ ]
52
+ } as const satisfies ContractsRegistry;
53
+
54
+ export const coreContractDefinitions = coreContractsRegistry.contracts;
@@ -0,0 +1,16 @@
1
+ /* eslint-disable */
2
+ /* This file is generated. Do not edit manually. */
3
+
4
+ export type ContractName = "QUTIL" | "QVAULT";
5
+
6
+ export type FunctionName<C extends ContractName> = C extends "QUTIL"
7
+ ? "GetFees"
8
+ : C extends "QVAULT"
9
+ ? never
10
+ : never;
11
+
12
+ export type ProcedureName<C extends ContractName> = C extends "QUTIL"
13
+ ? "BurnQubic"
14
+ : C extends "QVAULT"
15
+ ? "SubmitAuthAddress"
16
+ : never;