@latticexyz/world 2.2.18-90aac1d4acce19ac592d47a090732dd11c1c3e7a → 2.2.18-9fa07c8489f1fbf167d0db01cd9aaa645a29c8e2
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/IBaseWorld.abi-S745M2QE.js +2015 -0
- package/dist/{IBaseWorld.abi-SGUPOG6A.js.map → IBaseWorld.abi-S745M2QE.js.map} +1 -1
- package/dist/System.abi-UHI2DJK6.js +67 -0
- package/dist/{System.abi-D2D3OAI5.js.map → System.abi-UHI2DJK6.js.map} +1 -1
- package/dist/chunk-AAKXFFCU.js +158 -0
- package/dist/chunk-AAKXFFCU.js.map +1 -0
- package/dist/chunk-AAWFTQHP.js +35 -0
- package/dist/chunk-S5LARYWY.js +136 -0
- package/dist/{chunk-AJUHOWGE.js.map → chunk-S5LARYWY.js.map} +1 -1
- package/dist/chunk-TL2M3LZH.js +119 -0
- package/dist/{chunk-DIHBEOC2.js.map → chunk-TL2M3LZH.js.map} +1 -1
- package/dist/dynamicResolution-AmVd5Qtd.d.cts +161 -0
- package/dist/index.cjs +241 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +11 -0
- package/dist/index.js +20 -1
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +656 -0
- package/dist/internal.cjs.map +1 -0
- package/dist/internal.d.cts +169 -0
- package/dist/internal.js +318 -3
- package/dist/internal.js.map +1 -1
- package/dist/mud.config.cjs +357 -0
- package/dist/mud.config.cjs.map +1 -0
- package/dist/mud.config.d.cts +869 -0
- package/dist/mud.config.js +11 -1
- package/dist/node.cjs +9599 -0
- package/dist/node.cjs.map +1 -0
- package/dist/node.d.cts +131 -0
- package/dist/node.js +7328 -102
- package/dist/node.js.map +1 -1
- package/dist/world-DUniZQxy.d.cts +266 -0
- package/package.json +49 -14
- package/dist/IBaseWorld.abi-SGUPOG6A.js +0 -2
- package/dist/System.abi-D2D3OAI5.js +0 -2
- package/dist/chunk-AJUHOWGE.js +0 -2
- package/dist/chunk-CGF3NYHC.js +0 -2
- package/dist/chunk-CGF3NYHC.js.map +0 -1
- package/dist/chunk-DIHBEOC2.js +0 -2
- package/dist/chunk-FW4363Y4.js +0 -2
- /package/dist/{chunk-FW4363Y4.js.map → chunk-AAWFTQHP.js.map} +0 -0
package/dist/node.d.cts
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
import { ImportDatum, ContractInterfaceFunction, ContractInterfaceError } from '@latticexyz/common/codegen';
|
2
|
+
import { W as World, c as System } from './dynamicResolution-AmVd5Qtd.cjs';
|
3
|
+
import { Hex, Abi } from 'viem';
|
4
|
+
import * as arktype_internal_subtypes_object_ts from 'arktype/internal/subtypes/object.ts';
|
5
|
+
import * as arktype_internal_ast_ts from 'arktype/internal/ast.ts';
|
6
|
+
import '@latticexyz/store';
|
7
|
+
import '@latticexyz/store/internal';
|
8
|
+
|
9
|
+
interface RenderSystemInterfaceOptions {
|
10
|
+
/** List of symbols to import, and their file paths */
|
11
|
+
imports: ImportDatum[];
|
12
|
+
name: string;
|
13
|
+
functionPrefix: string;
|
14
|
+
functions: ContractInterfaceFunction[];
|
15
|
+
errors: ContractInterfaceError[];
|
16
|
+
}
|
17
|
+
interface RenderSystemLibraryOptions {
|
18
|
+
/** List of symbols to import, and their file paths */
|
19
|
+
imports: ImportDatum[];
|
20
|
+
systemLabel: string;
|
21
|
+
systemName: string;
|
22
|
+
namespace: string;
|
23
|
+
interfaceName: string;
|
24
|
+
libraryName: string;
|
25
|
+
resourceId: string;
|
26
|
+
functions: ContractInterfaceFunction[];
|
27
|
+
errors: ContractInterfaceError[];
|
28
|
+
/** Path for store package imports */
|
29
|
+
storeImportPath: string;
|
30
|
+
/** Path for world package imports */
|
31
|
+
worldImportPath: string;
|
32
|
+
}
|
33
|
+
|
34
|
+
declare function renderSystemInterface(options: RenderSystemInterfaceOptions): string;
|
35
|
+
|
36
|
+
declare function renderSystemLibrary(options: RenderSystemLibraryOptions): string;
|
37
|
+
|
38
|
+
type RenderWorldOptions = {
|
39
|
+
/** List of symbols to import, and their file paths */
|
40
|
+
imports: ImportDatum[];
|
41
|
+
/** Name of the interface to render */
|
42
|
+
interfaceName: string;
|
43
|
+
/** Path for store package imports */
|
44
|
+
storeImportPath: string;
|
45
|
+
/** Path for world package imports */
|
46
|
+
worldImportPath: string;
|
47
|
+
};
|
48
|
+
declare function renderWorldInterface({ interfaceName, storeImportPath, worldImportPath, imports: initialImports, }: RenderWorldOptions): string;
|
49
|
+
|
50
|
+
declare function worldgen({ rootDir, config, clean, }: {
|
51
|
+
rootDir: string;
|
52
|
+
config: World;
|
53
|
+
clean?: boolean;
|
54
|
+
}): Promise<void>;
|
55
|
+
|
56
|
+
declare const contractSizeLimit: number;
|
57
|
+
declare const systemsManifestFilename = ".mud/local/systems.json";
|
58
|
+
type ReferenceIdentifier = {
|
59
|
+
/**
|
60
|
+
* Path to source file, e.g. `src/SomeLib.sol`
|
61
|
+
*/
|
62
|
+
sourcePath: string;
|
63
|
+
/**
|
64
|
+
* Reference name, e.g. `SomeLib`
|
65
|
+
*/
|
66
|
+
name: string;
|
67
|
+
};
|
68
|
+
type PendingBytecode = readonly (Hex | ReferenceIdentifier)[];
|
69
|
+
type ContractArtifact = {
|
70
|
+
readonly sourcePath: string;
|
71
|
+
readonly name: string;
|
72
|
+
readonly bytecode: PendingBytecode;
|
73
|
+
readonly abi: Abi;
|
74
|
+
};
|
75
|
+
|
76
|
+
type Input = {
|
77
|
+
readonly forgeOutDir: string;
|
78
|
+
};
|
79
|
+
type Output = readonly ContractArtifact[];
|
80
|
+
declare function findContractArtifacts({ forgeOutDir }: Input): Promise<Output>;
|
81
|
+
|
82
|
+
declare function findSolidityFiles({ cwd, pattern }: {
|
83
|
+
cwd?: string;
|
84
|
+
pattern: string;
|
85
|
+
}): Promise<{
|
86
|
+
filename: string;
|
87
|
+
basename: string;
|
88
|
+
}[]>;
|
89
|
+
|
90
|
+
type SystemContract = {
|
91
|
+
readonly sourcePath: string;
|
92
|
+
readonly namespaceLabel: string;
|
93
|
+
readonly systemLabel: string;
|
94
|
+
};
|
95
|
+
type GetSystemContractsOptions = {
|
96
|
+
readonly rootDir: string;
|
97
|
+
readonly config: World;
|
98
|
+
};
|
99
|
+
declare function getSystemContracts({ rootDir, config, }: GetSystemContractsOptions): Promise<readonly SystemContract[]>;
|
100
|
+
|
101
|
+
type ResolvedSystem = System & {
|
102
|
+
readonly sourcePath: string;
|
103
|
+
};
|
104
|
+
declare function resolveSystems({ rootDir, config, }: {
|
105
|
+
rootDir: string;
|
106
|
+
config: World;
|
107
|
+
}): Promise<readonly ResolvedSystem[]>;
|
108
|
+
|
109
|
+
declare const SystemsManifest: arktype_internal_subtypes_object_ts.ObjectType<{
|
110
|
+
systems: {
|
111
|
+
namespaceLabel: string;
|
112
|
+
label: string;
|
113
|
+
namespace: string;
|
114
|
+
name: string;
|
115
|
+
systemId: arktype_internal_ast_ts.constrain<`0x${string}`, arktype_internal_ast_ts.Narrowed>;
|
116
|
+
abi: string[];
|
117
|
+
worldAbi: string[];
|
118
|
+
}[];
|
119
|
+
createdAt: number;
|
120
|
+
}, {}>;
|
121
|
+
declare function buildSystemsManifest(opts: {
|
122
|
+
rootDir: string;
|
123
|
+
config: World;
|
124
|
+
}): Promise<void>;
|
125
|
+
|
126
|
+
declare function loadSystemsManifest(opts: {
|
127
|
+
rootDir: string;
|
128
|
+
config?: World;
|
129
|
+
}): Promise<typeof SystemsManifest.infer>;
|
130
|
+
|
131
|
+
export { type ContractArtifact, type GetSystemContractsOptions, type Input, type Output, type PendingBytecode, type ReferenceIdentifier, type RenderSystemInterfaceOptions, type RenderSystemLibraryOptions, type RenderWorldOptions, type ResolvedSystem, type SystemContract, SystemsManifest, buildSystemsManifest, contractSizeLimit, findContractArtifacts, findSolidityFiles, getSystemContracts, loadSystemsManifest, renderSystemInterface, renderSystemLibrary, renderWorldInterface, resolveSystems, systemsManifestFilename, worldgen };
|