@caatinga/core 0.2.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.
@@ -0,0 +1,575 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const CaatingaErrorCode: {
4
+ readonly CONFIG_NOT_FOUND: "CAATINGA_CONFIG_NOT_FOUND";
5
+ readonly INVALID_CONFIG: "CAATINGA_INVALID_CONFIG";
6
+ readonly COMMAND_FAILED: "CAATINGA_COMMAND_FAILED";
7
+ readonly UNEXPECTED_ERROR: "CAATINGA_UNEXPECTED_ERROR";
8
+ readonly STELLAR_CLI_NOT_FOUND: "CAATINGA_STELLAR_CLI_NOT_FOUND";
9
+ readonly STELLAR_CLI_VERSION_PARSE_FAILED: "CAATINGA_STELLAR_CLI_VERSION_PARSE_FAILED";
10
+ readonly UNSUPPORTED_CLI_VERSION: "CAATINGA_UNSUPPORTED_CLI_VERSION";
11
+ readonly UNTESTED_CLI_VERSION: "CAATINGA_UNTESTED_CLI_VERSION";
12
+ readonly RUST_NOT_FOUND: "CAATINGA_RUST_NOT_FOUND";
13
+ readonly RUST_TARGET_NOT_FOUND: "CAATINGA_RUST_TARGET_NOT_FOUND";
14
+ readonly DEPLOY_FAILED: "CAATINGA_DEPLOY_FAILED";
15
+ readonly BUILD_FAILED: "CAATINGA_BUILD_FAILED";
16
+ readonly BINDINGS_FAILED: "CAATINGA_BINDINGS_FAILED";
17
+ readonly INVOKE_FAILED: "CAATINGA_INVOKE_FAILED";
18
+ readonly CONTRACT_NOT_FOUND: "CAATINGA_CONTRACT_NOT_FOUND";
19
+ readonly NETWORK_NOT_FOUND: "CAATINGA_NETWORK_NOT_FOUND";
20
+ readonly ARTIFACT_NOT_FOUND: "CAATINGA_ARTIFACT_NOT_FOUND";
21
+ readonly ARTIFACT_INVALID: "CAATINGA_ARTIFACT_INVALID";
22
+ readonly CONTRACT_ID_NOT_FOUND: "CAATINGA_CONTRACT_ID_NOT_FOUND";
23
+ readonly CONTRACT_ARTIFACT_NOT_FOUND: "CAATINGA_CONTRACT_ARTIFACT_NOT_FOUND";
24
+ readonly CONTRACT_DEPENDENCY_NOT_FOUND: "CAATINGA_CONTRACT_DEPENDENCY_NOT_FOUND";
25
+ readonly CONTRACT_DEPENDENCY_CYCLE: "CAATINGA_CONTRACT_DEPENDENCY_CYCLE";
26
+ readonly CONTRACT_DEPENDENCY_ARTIFACT_NOT_FOUND: "CAATINGA_CONTRACT_DEPENDENCY_ARTIFACT_NOT_FOUND";
27
+ readonly DEPLOY_ARG_PLACEHOLDER_INVALID: "CAATINGA_DEPLOY_ARG_PLACEHOLDER_INVALID";
28
+ readonly DEPLOY_ARG_PLACEHOLDER_UNRESOLVED: "CAATINGA_DEPLOY_ARG_PLACEHOLDER_UNRESOLVED";
29
+ readonly BINDING_CLIENT_NOT_FOUND: "CAATINGA_BINDING_CLIENT_NOT_FOUND";
30
+ readonly BINDING_METHOD_NOT_FOUND: "CAATINGA_BINDING_METHOD_NOT_FOUND";
31
+ readonly XDR_BUILD_FAILED: "CAATINGA_XDR_BUILD_FAILED";
32
+ readonly XDR_PREPARE_FAILED: "CAATINGA_XDR_PREPARE_FAILED";
33
+ readonly XDR_SIGN_FAILED: "CAATINGA_XDR_SIGN_FAILED";
34
+ readonly XDR_SUBMIT_FAILED: "CAATINGA_XDR_SUBMIT_FAILED";
35
+ readonly XDR_RESULT_FAILED: "CAATINGA_XDR_RESULT_FAILED";
36
+ readonly WALLET_NOT_CONNECTED: "CAATINGA_WALLET_NOT_CONNECTED";
37
+ readonly SOURCE_ACCOUNT_REQUIRED: "CAATINGA_SOURCE_ACCOUNT_REQUIRED";
38
+ readonly UNSAFE_SOURCE_ACCOUNT: "CAATINGA_UNSAFE_SOURCE_ACCOUNT";
39
+ readonly INVOKE_TARGET_INVALID: "CAATINGA_INVOKE_TARGET_INVALID";
40
+ readonly TEMPLATE_NOT_FOUND: "CAATINGA_TEMPLATE_NOT_FOUND";
41
+ readonly INVALID_TEMPLATE_MANIFEST: "CAATINGA_INVALID_TEMPLATE_MANIFEST";
42
+ readonly TEMPLATE_MANIFEST_NOT_FOUND: "CAATINGA_TEMPLATE_MANIFEST_NOT_FOUND";
43
+ readonly TEMPLATE_INCOMPATIBLE: "CAATINGA_TEMPLATE_INCOMPATIBLE";
44
+ };
45
+ type CaatingaErrorCodeValue = typeof CaatingaErrorCode[keyof typeof CaatingaErrorCode];
46
+
47
+ declare class CaatingaError extends Error {
48
+ readonly code: CaatingaErrorCodeValue;
49
+ readonly hint?: string | undefined;
50
+ readonly cause?: unknown | undefined;
51
+ constructor(message: string, code: CaatingaErrorCodeValue, hint?: string | undefined, cause?: unknown | undefined);
52
+ }
53
+ declare function toCaatingaError(error: unknown): CaatingaError;
54
+
55
+ declare const CAATINGA_CORE_VERSION = "0.2.0";
56
+
57
+ declare const ContractConfigSchema: z.ZodObject<{
58
+ path: z.ZodString;
59
+ wasm: z.ZodString;
60
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
61
+ deployArgs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
62
+ }, "strip", z.ZodTypeAny, {
63
+ path: string;
64
+ wasm: string;
65
+ dependsOn: string[];
66
+ deployArgs: Record<string, string | number | boolean>;
67
+ }, {
68
+ path: string;
69
+ wasm: string;
70
+ dependsOn?: string[] | undefined;
71
+ deployArgs?: Record<string, string | number | boolean> | undefined;
72
+ }>;
73
+ declare const NetworkConfigSchema: z.ZodObject<{
74
+ rpcUrl: z.ZodString;
75
+ networkPassphrase: z.ZodString;
76
+ }, "strip", z.ZodTypeAny, {
77
+ rpcUrl: string;
78
+ networkPassphrase: string;
79
+ }, {
80
+ rpcUrl: string;
81
+ networkPassphrase: string;
82
+ }>;
83
+ declare const CaatingaConfigSchema: z.ZodObject<{
84
+ project: z.ZodString;
85
+ defaultNetwork: z.ZodDefault<z.ZodString>;
86
+ contracts: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{
87
+ path: z.ZodString;
88
+ wasm: z.ZodString;
89
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
90
+ deployArgs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
91
+ }, "strip", z.ZodTypeAny, {
92
+ path: string;
93
+ wasm: string;
94
+ dependsOn: string[];
95
+ deployArgs: Record<string, string | number | boolean>;
96
+ }, {
97
+ path: string;
98
+ wasm: string;
99
+ dependsOn?: string[] | undefined;
100
+ deployArgs?: Record<string, string | number | boolean> | undefined;
101
+ }>>, Record<string, {
102
+ path: string;
103
+ wasm: string;
104
+ dependsOn: string[];
105
+ deployArgs: Record<string, string | number | boolean>;
106
+ }>, Record<string, {
107
+ path: string;
108
+ wasm: string;
109
+ dependsOn?: string[] | undefined;
110
+ deployArgs?: Record<string, string | number | boolean> | undefined;
111
+ }>>;
112
+ networks: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{
113
+ rpcUrl: z.ZodString;
114
+ networkPassphrase: z.ZodString;
115
+ }, "strip", z.ZodTypeAny, {
116
+ rpcUrl: string;
117
+ networkPassphrase: string;
118
+ }, {
119
+ rpcUrl: string;
120
+ networkPassphrase: string;
121
+ }>>, Record<string, {
122
+ rpcUrl: string;
123
+ networkPassphrase: string;
124
+ }>, Record<string, {
125
+ rpcUrl: string;
126
+ networkPassphrase: string;
127
+ }>>;
128
+ frontend: z.ZodObject<{
129
+ framework: z.ZodDefault<z.ZodEnum<["vite-react", "next", "astro"]>>;
130
+ bindingsOutput: z.ZodString;
131
+ }, "strip", z.ZodTypeAny, {
132
+ framework: "vite-react" | "next" | "astro";
133
+ bindingsOutput: string;
134
+ }, {
135
+ bindingsOutput: string;
136
+ framework?: "vite-react" | "next" | "astro" | undefined;
137
+ }>;
138
+ }, "strip", z.ZodTypeAny, {
139
+ project: string;
140
+ defaultNetwork: string;
141
+ contracts: Record<string, {
142
+ path: string;
143
+ wasm: string;
144
+ dependsOn: string[];
145
+ deployArgs: Record<string, string | number | boolean>;
146
+ }>;
147
+ networks: Record<string, {
148
+ rpcUrl: string;
149
+ networkPassphrase: string;
150
+ }>;
151
+ frontend: {
152
+ framework: "vite-react" | "next" | "astro";
153
+ bindingsOutput: string;
154
+ };
155
+ }, {
156
+ project: string;
157
+ contracts: Record<string, {
158
+ path: string;
159
+ wasm: string;
160
+ dependsOn?: string[] | undefined;
161
+ deployArgs?: Record<string, string | number | boolean> | undefined;
162
+ }>;
163
+ networks: Record<string, {
164
+ rpcUrl: string;
165
+ networkPassphrase: string;
166
+ }>;
167
+ frontend: {
168
+ bindingsOutput: string;
169
+ framework?: "vite-react" | "next" | "astro" | undefined;
170
+ };
171
+ defaultNetwork?: string | undefined;
172
+ }>;
173
+ type CaatingaConfig = z.infer<typeof CaatingaConfigSchema>;
174
+ type ContractConfig = z.infer<typeof ContractConfigSchema>;
175
+ type NetworkConfig = z.infer<typeof NetworkConfigSchema>;
176
+
177
+ declare function defineConfig(config: CaatingaConfig): CaatingaConfig;
178
+
179
+ type LoadConfigOptions = {
180
+ cwd?: string;
181
+ configPath?: string;
182
+ };
183
+ declare function loadConfig(options?: LoadConfigOptions): Promise<CaatingaConfig>;
184
+
185
+ declare const ContractArtifactSchema: z.ZodObject<{
186
+ contractId: z.ZodString;
187
+ wasmHash: z.ZodString;
188
+ deployedAt: z.ZodString;
189
+ sourcePath: z.ZodString;
190
+ wasmPath: z.ZodString;
191
+ dependencies: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
192
+ resolvedDeployArgs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
193
+ }, "strip", z.ZodTypeAny, {
194
+ contractId: string;
195
+ wasmHash: string;
196
+ deployedAt: string;
197
+ sourcePath: string;
198
+ wasmPath: string;
199
+ dependencies: string[];
200
+ resolvedDeployArgs: Record<string, string | number | boolean>;
201
+ }, {
202
+ contractId: string;
203
+ wasmHash: string;
204
+ deployedAt: string;
205
+ sourcePath: string;
206
+ wasmPath: string;
207
+ dependencies?: string[] | undefined;
208
+ resolvedDeployArgs?: Record<string, string | number | boolean> | undefined;
209
+ }>;
210
+ declare const CaatingaArtifactsSchema: z.ZodObject<{
211
+ project: z.ZodString;
212
+ version: z.ZodLiteral<1>;
213
+ networks: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
214
+ contracts: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
215
+ contractId: z.ZodString;
216
+ wasmHash: z.ZodString;
217
+ deployedAt: z.ZodString;
218
+ sourcePath: z.ZodString;
219
+ wasmPath: z.ZodString;
220
+ dependencies: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
221
+ resolvedDeployArgs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
222
+ }, "strip", z.ZodTypeAny, {
223
+ contractId: string;
224
+ wasmHash: string;
225
+ deployedAt: string;
226
+ sourcePath: string;
227
+ wasmPath: string;
228
+ dependencies: string[];
229
+ resolvedDeployArgs: Record<string, string | number | boolean>;
230
+ }, {
231
+ contractId: string;
232
+ wasmHash: string;
233
+ deployedAt: string;
234
+ sourcePath: string;
235
+ wasmPath: string;
236
+ dependencies?: string[] | undefined;
237
+ resolvedDeployArgs?: Record<string, string | number | boolean> | undefined;
238
+ }>>>;
239
+ dependencyGraph: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
240
+ }, "strip", z.ZodTypeAny, {
241
+ contracts: Record<string, {
242
+ contractId: string;
243
+ wasmHash: string;
244
+ deployedAt: string;
245
+ sourcePath: string;
246
+ wasmPath: string;
247
+ dependencies: string[];
248
+ resolvedDeployArgs: Record<string, string | number | boolean>;
249
+ }>;
250
+ dependencyGraph: Record<string, string[]>;
251
+ }, {
252
+ contracts?: Record<string, {
253
+ contractId: string;
254
+ wasmHash: string;
255
+ deployedAt: string;
256
+ sourcePath: string;
257
+ wasmPath: string;
258
+ dependencies?: string[] | undefined;
259
+ resolvedDeployArgs?: Record<string, string | number | boolean> | undefined;
260
+ }> | undefined;
261
+ dependencyGraph?: Record<string, string[]> | undefined;
262
+ }>>>;
263
+ }, "strip", z.ZodTypeAny, {
264
+ project: string;
265
+ networks: Record<string, {
266
+ contracts: Record<string, {
267
+ contractId: string;
268
+ wasmHash: string;
269
+ deployedAt: string;
270
+ sourcePath: string;
271
+ wasmPath: string;
272
+ dependencies: string[];
273
+ resolvedDeployArgs: Record<string, string | number | boolean>;
274
+ }>;
275
+ dependencyGraph: Record<string, string[]>;
276
+ }>;
277
+ version: 1;
278
+ }, {
279
+ project: string;
280
+ version: 1;
281
+ networks?: Record<string, {
282
+ contracts?: Record<string, {
283
+ contractId: string;
284
+ wasmHash: string;
285
+ deployedAt: string;
286
+ sourcePath: string;
287
+ wasmPath: string;
288
+ dependencies?: string[] | undefined;
289
+ resolvedDeployArgs?: Record<string, string | number | boolean> | undefined;
290
+ }> | undefined;
291
+ dependencyGraph?: Record<string, string[]> | undefined;
292
+ }> | undefined;
293
+ }>;
294
+ type ContractArtifact = z.infer<typeof ContractArtifactSchema>;
295
+ type CaatingaArtifacts = z.infer<typeof CaatingaArtifactsSchema>;
296
+
297
+ declare function readArtifacts(cwd?: string): Promise<CaatingaArtifacts>;
298
+
299
+ declare function writeArtifacts(artifacts: CaatingaArtifacts, cwd?: string): Promise<string>;
300
+ declare function createInitialArtifacts(project: string): CaatingaArtifacts;
301
+
302
+ declare function updateArtifact(artifacts: CaatingaArtifacts, networkName: string, contractName: string, contractArtifact: ContractArtifact, networkExtras?: {
303
+ dependencyGraph?: Record<string, string[]>;
304
+ }): CaatingaArtifacts;
305
+
306
+ declare const WELL_KNOWN_NETWORKS: Record<string, NetworkConfig>;
307
+
308
+ type ResolvedNetwork = {
309
+ name: string;
310
+ config: NetworkConfig;
311
+ };
312
+ declare function resolveNetwork(config: CaatingaConfig, networkName?: string): ResolvedNetwork;
313
+
314
+ type RunCommandResult = {
315
+ stdout: string;
316
+ stderr: string;
317
+ all: string;
318
+ };
319
+ type RunCommandOptions = {
320
+ cwd?: string;
321
+ env?: NodeJS.ProcessEnv;
322
+ allowUntestedStellarCli?: boolean;
323
+ skipStellarVersionCheck?: boolean;
324
+ failureCode?: CaatingaErrorCodeValue;
325
+ };
326
+ declare function runCommand(command: string, args: string[], options?: RunCommandOptions): Promise<RunCommandResult>;
327
+
328
+ type CheckBinaryOptions = {
329
+ allowUntestedStellarCli?: boolean;
330
+ skipStellarVersionCheck?: boolean;
331
+ };
332
+ declare function checkBinary(binary: string, hint: string, options?: CheckBinaryOptions): Promise<void>;
333
+
334
+ declare function parseContractId(output: string): string;
335
+
336
+ declare const STELLAR_CLI_MIN_VERSION = "22.0.0";
337
+ declare const STELLAR_CLI_TESTED_MAX_VERSION = "25.2.0";
338
+ declare function parseStellarCliVersion(output: string): string;
339
+ declare function assertSupportedStellarCliVersion(input: {
340
+ version: string;
341
+ allowUntested: boolean;
342
+ }): string;
343
+
344
+ type ResolvedContract = {
345
+ name: string;
346
+ config: ContractConfig;
347
+ sourcePath: string;
348
+ wasmPath: string;
349
+ };
350
+ declare function resolveContract(config: CaatingaConfig, contractName: string, cwd?: string): ResolvedContract;
351
+
352
+ type BuildContractOptions = {
353
+ config: CaatingaConfig;
354
+ contractName: string;
355
+ cwd?: string;
356
+ allowUntestedStellarCli?: boolean;
357
+ };
358
+ declare function buildContract(options: BuildContractOptions): Promise<{
359
+ contract: ResolvedContract;
360
+ output: string;
361
+ }>;
362
+
363
+ type DeployArgValue = string | number | boolean;
364
+ declare function resolveDeployArgs(input: {
365
+ deployArgs: Record<string, DeployArgValue>;
366
+ artifacts: CaatingaArtifacts;
367
+ network: string;
368
+ }): Record<string, DeployArgValue>;
369
+
370
+ type DeployContractOptions = {
371
+ config: CaatingaConfig;
372
+ contractName: string;
373
+ networkName?: string;
374
+ source?: string;
375
+ cwd?: string;
376
+ allowUntestedStellarCli?: boolean;
377
+ force?: boolean;
378
+ resolvedDeployArgs?: Record<string, DeployArgValue>;
379
+ dependencies?: string[];
380
+ };
381
+ declare function deployContract(options: DeployContractOptions): Promise<{
382
+ contract: ResolvedContract;
383
+ network: ResolvedNetwork;
384
+ contractId: string;
385
+ artifactsPath: string;
386
+ output: string;
387
+ skipped: true;
388
+ } | {
389
+ contract: ResolvedContract;
390
+ network: ResolvedNetwork;
391
+ contractId: string;
392
+ artifactsPath: string;
393
+ output: string;
394
+ skipped: false;
395
+ }>;
396
+
397
+ declare function deployContractGraph(options: {
398
+ config: CaatingaConfig;
399
+ contractName?: string;
400
+ networkName?: string;
401
+ source?: string;
402
+ cwd?: string;
403
+ includeDependencies: boolean;
404
+ force: boolean;
405
+ allowUntestedStellarCli?: boolean;
406
+ }): Promise<{
407
+ network: ResolvedNetwork;
408
+ deployedContracts: {
409
+ name: string;
410
+ contractId: string;
411
+ }[];
412
+ }>;
413
+
414
+ declare function buildDependencyGraph(contracts: Record<string, ContractConfig>): Record<string, string[]>;
415
+
416
+ declare function resolveDeployOrder(input: {
417
+ contracts: Record<string, ContractConfig>;
418
+ selectedContract?: string;
419
+ includeDependencies: boolean;
420
+ }): string[];
421
+
422
+ type GenerateBindingsOptions = {
423
+ config: CaatingaConfig;
424
+ contractName: string;
425
+ networkName?: string;
426
+ cwd?: string;
427
+ allowUntestedStellarCli?: boolean;
428
+ };
429
+ declare function generateBindings(options: GenerateBindingsOptions): Promise<{
430
+ contractName: string;
431
+ network: ResolvedNetwork;
432
+ outputDir: string;
433
+ output: string;
434
+ }>;
435
+
436
+ type InvokeTarget = {
437
+ contractName: string;
438
+ method: string;
439
+ };
440
+ type InvokeContractOptions = {
441
+ config: CaatingaConfig;
442
+ target: string;
443
+ args?: string[];
444
+ networkName?: string;
445
+ source?: string;
446
+ cwd?: string;
447
+ allowUntestedStellarCli?: boolean;
448
+ };
449
+ declare function parseInvokeTarget(target: string): InvokeTarget;
450
+ declare function invokeContract(options: InvokeContractOptions): Promise<{
451
+ target: InvokeTarget;
452
+ network: ResolvedNetwork;
453
+ result: string;
454
+ }>;
455
+
456
+ type CreateProjectFromTemplateOptions = {
457
+ projectName: string;
458
+ targetDir: string;
459
+ templateDir: string;
460
+ };
461
+ declare function createProjectFromTemplate(options: CreateProjectFromTemplateOptions): Promise<{
462
+ targetDir: string;
463
+ template: {
464
+ contracts: {
465
+ path: string;
466
+ default?: string | undefined;
467
+ };
468
+ frontend: {
469
+ framework: "vite-react" | "next" | "astro";
470
+ packageManager: "npm" | "pnpm" | "yarn" | "bun";
471
+ };
472
+ version: string;
473
+ name: string;
474
+ caatinga: {
475
+ compatibleCore: string;
476
+ templateVersion: number;
477
+ };
478
+ files: {
479
+ config: string;
480
+ artifacts: string;
481
+ };
482
+ description?: string | undefined;
483
+ };
484
+ }>;
485
+
486
+ declare const TemplateManifestSchema: z.ZodObject<{
487
+ name: z.ZodString;
488
+ version: z.ZodString;
489
+ description: z.ZodOptional<z.ZodString>;
490
+ caatinga: z.ZodObject<{
491
+ compatibleCore: z.ZodString;
492
+ templateVersion: z.ZodNumber;
493
+ }, "strip", z.ZodTypeAny, {
494
+ compatibleCore: string;
495
+ templateVersion: number;
496
+ }, {
497
+ compatibleCore: string;
498
+ templateVersion: number;
499
+ }>;
500
+ frontend: z.ZodObject<{
501
+ framework: z.ZodEnum<["vite-react", "next", "astro"]>;
502
+ packageManager: z.ZodDefault<z.ZodEnum<["npm", "pnpm", "yarn", "bun"]>>;
503
+ }, "strip", z.ZodTypeAny, {
504
+ framework: "vite-react" | "next" | "astro";
505
+ packageManager: "npm" | "pnpm" | "yarn" | "bun";
506
+ }, {
507
+ framework: "vite-react" | "next" | "astro";
508
+ packageManager?: "npm" | "pnpm" | "yarn" | "bun" | undefined;
509
+ }>;
510
+ contracts: z.ZodObject<{
511
+ path: z.ZodString;
512
+ default: z.ZodOptional<z.ZodString>;
513
+ }, "strip", z.ZodTypeAny, {
514
+ path: string;
515
+ default?: string | undefined;
516
+ }, {
517
+ path: string;
518
+ default?: string | undefined;
519
+ }>;
520
+ files: z.ZodObject<{
521
+ config: z.ZodDefault<z.ZodString>;
522
+ artifacts: z.ZodDefault<z.ZodString>;
523
+ }, "strip", z.ZodTypeAny, {
524
+ config: string;
525
+ artifacts: string;
526
+ }, {
527
+ config?: string | undefined;
528
+ artifacts?: string | undefined;
529
+ }>;
530
+ }, "strip", z.ZodTypeAny, {
531
+ contracts: {
532
+ path: string;
533
+ default?: string | undefined;
534
+ };
535
+ frontend: {
536
+ framework: "vite-react" | "next" | "astro";
537
+ packageManager: "npm" | "pnpm" | "yarn" | "bun";
538
+ };
539
+ version: string;
540
+ name: string;
541
+ caatinga: {
542
+ compatibleCore: string;
543
+ templateVersion: number;
544
+ };
545
+ files: {
546
+ config: string;
547
+ artifacts: string;
548
+ };
549
+ description?: string | undefined;
550
+ }, {
551
+ contracts: {
552
+ path: string;
553
+ default?: string | undefined;
554
+ };
555
+ frontend: {
556
+ framework: "vite-react" | "next" | "astro";
557
+ packageManager?: "npm" | "pnpm" | "yarn" | "bun" | undefined;
558
+ };
559
+ version: string;
560
+ name: string;
561
+ caatinga: {
562
+ compatibleCore: string;
563
+ templateVersion: number;
564
+ };
565
+ files: {
566
+ config?: string | undefined;
567
+ artifacts?: string | undefined;
568
+ };
569
+ description?: string | undefined;
570
+ }>;
571
+ type TemplateManifest = z.infer<typeof TemplateManifestSchema>;
572
+
573
+ declare function isTransientTestnetSmokeFailure(logText: string): boolean;
574
+
575
+ export { type BuildContractOptions, CAATINGA_CORE_VERSION, type CaatingaArtifacts, CaatingaArtifactsSchema, type CaatingaConfig, CaatingaConfigSchema, CaatingaError, CaatingaErrorCode, type ContractArtifact, type ContractConfig, type CreateProjectFromTemplateOptions, type DeployArgValue, type DeployContractOptions, type GenerateBindingsOptions, type InvokeContractOptions, type InvokeTarget, type LoadConfigOptions, type NetworkConfig, type ResolvedContract, type ResolvedNetwork, type RunCommandResult, STELLAR_CLI_MIN_VERSION, STELLAR_CLI_TESTED_MAX_VERSION, type TemplateManifest, TemplateManifestSchema, WELL_KNOWN_NETWORKS, assertSupportedStellarCliVersion, buildContract, buildDependencyGraph, checkBinary, createInitialArtifacts, createProjectFromTemplate, defineConfig, deployContract, deployContractGraph, generateBindings, invokeContract, isTransientTestnetSmokeFailure, loadConfig, parseContractId, parseInvokeTarget, parseStellarCliVersion, readArtifacts, resolveContract, resolveDeployArgs, resolveDeployOrder, resolveNetwork, runCommand, toCaatingaError, updateArtifact, writeArtifacts };