@caatinga/core 2.3.1 → 2.4.1
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/{browser-Cq4ZofIq.d.cts → artifact.schema-BH5K-IiZ.d.cts} +2 -1
- package/dist/{browser-Cq4ZofIq.d.ts → artifact.schema-BH5K-IiZ.d.ts} +2 -1
- package/dist/browser.cjs +20 -0
- package/dist/browser.d.cts +5 -1
- package/dist/browser.d.ts +5 -1
- package/dist/browser.js +19 -0
- package/dist/index.cjs +400 -63
- package/dist/index.d.cts +35 -5
- package/dist/index.d.ts +35 -5
- package/dist/index.js +392 -63
- package/package.json +1 -1
- package/scaffolds/soroban-contract-stub/Cargo.toml +24 -0
- package/scaffolds/soroban-contract-stub/src/lib.rs +42 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as CaatingaArtifacts,
|
|
2
|
-
export {
|
|
1
|
+
import { C as CaatingaArtifacts, c as ContractArtifact, d as CaatingaErrorCodeValue, a as CaatingaError } from './artifact.schema-BH5K-IiZ.cjs';
|
|
2
|
+
export { e as CaatingaArtifactsSchema, b as CaatingaErrorCode, f as formatCaatingaError, t as toCaatingaError } from './artifact.schema-BH5K-IiZ.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
|
-
declare const CAATINGA_CORE_VERSION = "2.
|
|
5
|
+
declare const CAATINGA_CORE_VERSION = "2.4.1";
|
|
6
6
|
|
|
7
7
|
declare const ContractConfigSchema: z.ZodObject<{
|
|
8
8
|
path: z.ZodString;
|
|
@@ -286,6 +286,9 @@ type RunCommandOptions = {
|
|
|
286
286
|
};
|
|
287
287
|
declare function runCommand(command: string, args: string[], options?: RunCommandOptions): Promise<RunCommandResult>;
|
|
288
288
|
|
|
289
|
+
declare function resolveSubprocessEnv(overrides?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
290
|
+
declare function isCargoBinMissingFromPath(baseEnv?: NodeJS.ProcessEnv): boolean;
|
|
291
|
+
|
|
289
292
|
type CheckBinaryOptions = {
|
|
290
293
|
skipStellarVersionCheck?: boolean;
|
|
291
294
|
};
|
|
@@ -476,6 +479,11 @@ type InvokeTarget = {
|
|
|
476
479
|
contractName: string;
|
|
477
480
|
method: string;
|
|
478
481
|
};
|
|
482
|
+
declare const READ_CALL_FAILURE_REGEX: RegExp;
|
|
483
|
+
declare function parseInvokeTarget(target: string): InvokeTarget;
|
|
484
|
+
declare function buildReadCallHint(target: InvokeTarget, networkName: string): string;
|
|
485
|
+
declare function isReadCallFailure(error: unknown): boolean;
|
|
486
|
+
|
|
479
487
|
type InvokeContractOptions = {
|
|
480
488
|
config: CaatingaConfig;
|
|
481
489
|
target: string;
|
|
@@ -484,13 +492,26 @@ type InvokeContractOptions = {
|
|
|
484
492
|
source?: string;
|
|
485
493
|
cwd?: string;
|
|
486
494
|
};
|
|
487
|
-
declare function parseInvokeTarget(target: string): InvokeTarget;
|
|
488
495
|
declare function invokeContract(options: InvokeContractOptions): Promise<{
|
|
489
496
|
target: InvokeTarget;
|
|
490
497
|
network: ResolvedNetwork;
|
|
491
498
|
result: string;
|
|
492
499
|
}>;
|
|
493
500
|
|
|
501
|
+
type ReadContractOptions = {
|
|
502
|
+
config: CaatingaConfig;
|
|
503
|
+
target: string;
|
|
504
|
+
args?: string[];
|
|
505
|
+
networkName?: string;
|
|
506
|
+
source?: string;
|
|
507
|
+
cwd?: string;
|
|
508
|
+
};
|
|
509
|
+
declare function readContract(options: ReadContractOptions): Promise<{
|
|
510
|
+
target: InvokeTarget;
|
|
511
|
+
network: ResolvedNetwork;
|
|
512
|
+
result: string;
|
|
513
|
+
}>;
|
|
514
|
+
|
|
494
515
|
type CreateProjectFromTemplateOptions = {
|
|
495
516
|
projectName: string;
|
|
496
517
|
targetDir: string;
|
|
@@ -532,6 +553,15 @@ declare function createZkProject(options: CreateZkProjectOptions): Promise<{
|
|
|
532
553
|
targetDir: string;
|
|
533
554
|
}>;
|
|
534
555
|
|
|
556
|
+
type CreateMinimalProjectOptions = {
|
|
557
|
+
projectName: string;
|
|
558
|
+
targetDir: string;
|
|
559
|
+
force?: boolean;
|
|
560
|
+
};
|
|
561
|
+
declare function createMinimalProject(options: CreateMinimalProjectOptions): Promise<{
|
|
562
|
+
targetDir: string;
|
|
563
|
+
}>;
|
|
564
|
+
|
|
535
565
|
declare const TemplateManifestSchema: z.ZodObject<{
|
|
536
566
|
name: z.ZodString;
|
|
537
567
|
version: z.ZodString;
|
|
@@ -621,4 +651,4 @@ type TemplateManifest = z.infer<typeof TemplateManifestSchema>;
|
|
|
621
651
|
|
|
622
652
|
declare function isTransientTestnetSmokeFailure(logText: string): boolean;
|
|
623
653
|
|
|
624
|
-
export { BINDING_MARKER_FILENAME, type BindingFreshness, type BindingFreshnessStatus, type BindingMarker, BindingMarkerSchema, type BuildContractOptions, CAATINGA_CORE_VERSION, CaatingaArtifacts, type CaatingaConfig, CaatingaConfigSchema, CaatingaError, type CheckStellarCliVersionOptions, type CollectProjectStatusOptions, type CompatibilityReport, type CompatibilityStatus, type CompatibilityWarning, type CompatibilityWarningCode, ContractArtifact, type ContractConfig, type ContractStatusEntry, type CreateInitialArtifactsOptions, type CreateProjectFromTemplateOptions, type CreateZkProjectOptions, type DeployArgValue, type DeployContractGraphResult, type DeployContractOptions, type EvaluateBindingFreshnessOptions, type EvaluateStellarCliCompatibilityInput, type GenerateBindingsGraphResult, type GenerateBindingsOptions, type InvokeContractOptions, type InvokeTarget, type LoadConfigOptions, type NetworkConfig, type NetworkStatus, type ProjectStatus, type ResolvedContract, type ResolvedNetwork, type RunCommandResult, STELLAR_CLI_LAST_TESTED_VERSION, STELLAR_CLI_MIN_VERSION, type SkippedContract, type TemplateManifest, TemplateManifestSchema, WELL_KNOWN_NETWORKS, buildContract, buildDependencyGraph, checkBinary, checkStellarCliVersion, collectProjectStatus, createInitialArtifacts, createProjectFromTemplate, createZkProject, defineConfig, deployContract, deployContractGraph, evaluateBindingFreshness, evaluateBindingsFreshness, evaluateStellarCliCompatibility, generateBindings, generateBindingsGraph, invokeContract, isTransientTestnetSmokeFailure, loadConfig, parseContractId, parseInvokeTarget, parseStellarCliVersion, readArtifacts, readBindingMarker, resolveContract, resolveDefaultContractName, resolveDeployArgs, resolveDeployOrder, resolveNetwork, runCommand, updateArtifact, validateSourceShape, writeArtifacts, writeBindingMarker };
|
|
654
|
+
export { BINDING_MARKER_FILENAME, type BindingFreshness, type BindingFreshnessStatus, type BindingMarker, BindingMarkerSchema, type BuildContractOptions, CAATINGA_CORE_VERSION, CaatingaArtifacts, type CaatingaConfig, CaatingaConfigSchema, CaatingaError, type CheckStellarCliVersionOptions, type CollectProjectStatusOptions, type CompatibilityReport, type CompatibilityStatus, type CompatibilityWarning, type CompatibilityWarningCode, ContractArtifact, type ContractConfig, type ContractStatusEntry, type CreateInitialArtifactsOptions, type CreateMinimalProjectOptions, type CreateProjectFromTemplateOptions, type CreateZkProjectOptions, type DeployArgValue, type DeployContractGraphResult, type DeployContractOptions, type EvaluateBindingFreshnessOptions, type EvaluateStellarCliCompatibilityInput, type GenerateBindingsGraphResult, type GenerateBindingsOptions, type InvokeContractOptions, type InvokeTarget, type LoadConfigOptions, type NetworkConfig, type NetworkStatus, type ProjectStatus, READ_CALL_FAILURE_REGEX, type ReadContractOptions, type ResolvedContract, type ResolvedNetwork, type RunCommandResult, STELLAR_CLI_LAST_TESTED_VERSION, STELLAR_CLI_MIN_VERSION, type SkippedContract, type TemplateManifest, TemplateManifestSchema, WELL_KNOWN_NETWORKS, buildContract, buildDependencyGraph, buildReadCallHint, checkBinary, checkStellarCliVersion, collectProjectStatus, createInitialArtifacts, createMinimalProject, createProjectFromTemplate, createZkProject, defineConfig, deployContract, deployContractGraph, evaluateBindingFreshness, evaluateBindingsFreshness, evaluateStellarCliCompatibility, generateBindings, generateBindingsGraph, invokeContract, isCargoBinMissingFromPath, isReadCallFailure, isTransientTestnetSmokeFailure, loadConfig, parseContractId, parseInvokeTarget, parseStellarCliVersion, readArtifacts, readBindingMarker, readContract, resolveContract, resolveDefaultContractName, resolveDeployArgs, resolveDeployOrder, resolveNetwork, resolveSubprocessEnv, runCommand, updateArtifact, validateSourceShape, writeArtifacts, writeBindingMarker };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as CaatingaArtifacts,
|
|
2
|
-
export {
|
|
1
|
+
import { C as CaatingaArtifacts, c as ContractArtifact, d as CaatingaErrorCodeValue, a as CaatingaError } from './artifact.schema-BH5K-IiZ.js';
|
|
2
|
+
export { e as CaatingaArtifactsSchema, b as CaatingaErrorCode, f as formatCaatingaError, t as toCaatingaError } from './artifact.schema-BH5K-IiZ.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
|
-
declare const CAATINGA_CORE_VERSION = "2.
|
|
5
|
+
declare const CAATINGA_CORE_VERSION = "2.4.1";
|
|
6
6
|
|
|
7
7
|
declare const ContractConfigSchema: z.ZodObject<{
|
|
8
8
|
path: z.ZodString;
|
|
@@ -286,6 +286,9 @@ type RunCommandOptions = {
|
|
|
286
286
|
};
|
|
287
287
|
declare function runCommand(command: string, args: string[], options?: RunCommandOptions): Promise<RunCommandResult>;
|
|
288
288
|
|
|
289
|
+
declare function resolveSubprocessEnv(overrides?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
290
|
+
declare function isCargoBinMissingFromPath(baseEnv?: NodeJS.ProcessEnv): boolean;
|
|
291
|
+
|
|
289
292
|
type CheckBinaryOptions = {
|
|
290
293
|
skipStellarVersionCheck?: boolean;
|
|
291
294
|
};
|
|
@@ -476,6 +479,11 @@ type InvokeTarget = {
|
|
|
476
479
|
contractName: string;
|
|
477
480
|
method: string;
|
|
478
481
|
};
|
|
482
|
+
declare const READ_CALL_FAILURE_REGEX: RegExp;
|
|
483
|
+
declare function parseInvokeTarget(target: string): InvokeTarget;
|
|
484
|
+
declare function buildReadCallHint(target: InvokeTarget, networkName: string): string;
|
|
485
|
+
declare function isReadCallFailure(error: unknown): boolean;
|
|
486
|
+
|
|
479
487
|
type InvokeContractOptions = {
|
|
480
488
|
config: CaatingaConfig;
|
|
481
489
|
target: string;
|
|
@@ -484,13 +492,26 @@ type InvokeContractOptions = {
|
|
|
484
492
|
source?: string;
|
|
485
493
|
cwd?: string;
|
|
486
494
|
};
|
|
487
|
-
declare function parseInvokeTarget(target: string): InvokeTarget;
|
|
488
495
|
declare function invokeContract(options: InvokeContractOptions): Promise<{
|
|
489
496
|
target: InvokeTarget;
|
|
490
497
|
network: ResolvedNetwork;
|
|
491
498
|
result: string;
|
|
492
499
|
}>;
|
|
493
500
|
|
|
501
|
+
type ReadContractOptions = {
|
|
502
|
+
config: CaatingaConfig;
|
|
503
|
+
target: string;
|
|
504
|
+
args?: string[];
|
|
505
|
+
networkName?: string;
|
|
506
|
+
source?: string;
|
|
507
|
+
cwd?: string;
|
|
508
|
+
};
|
|
509
|
+
declare function readContract(options: ReadContractOptions): Promise<{
|
|
510
|
+
target: InvokeTarget;
|
|
511
|
+
network: ResolvedNetwork;
|
|
512
|
+
result: string;
|
|
513
|
+
}>;
|
|
514
|
+
|
|
494
515
|
type CreateProjectFromTemplateOptions = {
|
|
495
516
|
projectName: string;
|
|
496
517
|
targetDir: string;
|
|
@@ -532,6 +553,15 @@ declare function createZkProject(options: CreateZkProjectOptions): Promise<{
|
|
|
532
553
|
targetDir: string;
|
|
533
554
|
}>;
|
|
534
555
|
|
|
556
|
+
type CreateMinimalProjectOptions = {
|
|
557
|
+
projectName: string;
|
|
558
|
+
targetDir: string;
|
|
559
|
+
force?: boolean;
|
|
560
|
+
};
|
|
561
|
+
declare function createMinimalProject(options: CreateMinimalProjectOptions): Promise<{
|
|
562
|
+
targetDir: string;
|
|
563
|
+
}>;
|
|
564
|
+
|
|
535
565
|
declare const TemplateManifestSchema: z.ZodObject<{
|
|
536
566
|
name: z.ZodString;
|
|
537
567
|
version: z.ZodString;
|
|
@@ -621,4 +651,4 @@ type TemplateManifest = z.infer<typeof TemplateManifestSchema>;
|
|
|
621
651
|
|
|
622
652
|
declare function isTransientTestnetSmokeFailure(logText: string): boolean;
|
|
623
653
|
|
|
624
|
-
export { BINDING_MARKER_FILENAME, type BindingFreshness, type BindingFreshnessStatus, type BindingMarker, BindingMarkerSchema, type BuildContractOptions, CAATINGA_CORE_VERSION, CaatingaArtifacts, type CaatingaConfig, CaatingaConfigSchema, CaatingaError, type CheckStellarCliVersionOptions, type CollectProjectStatusOptions, type CompatibilityReport, type CompatibilityStatus, type CompatibilityWarning, type CompatibilityWarningCode, ContractArtifact, type ContractConfig, type ContractStatusEntry, type CreateInitialArtifactsOptions, type CreateProjectFromTemplateOptions, type CreateZkProjectOptions, type DeployArgValue, type DeployContractGraphResult, type DeployContractOptions, type EvaluateBindingFreshnessOptions, type EvaluateStellarCliCompatibilityInput, type GenerateBindingsGraphResult, type GenerateBindingsOptions, type InvokeContractOptions, type InvokeTarget, type LoadConfigOptions, type NetworkConfig, type NetworkStatus, type ProjectStatus, type ResolvedContract, type ResolvedNetwork, type RunCommandResult, STELLAR_CLI_LAST_TESTED_VERSION, STELLAR_CLI_MIN_VERSION, type SkippedContract, type TemplateManifest, TemplateManifestSchema, WELL_KNOWN_NETWORKS, buildContract, buildDependencyGraph, checkBinary, checkStellarCliVersion, collectProjectStatus, createInitialArtifacts, createProjectFromTemplate, createZkProject, defineConfig, deployContract, deployContractGraph, evaluateBindingFreshness, evaluateBindingsFreshness, evaluateStellarCliCompatibility, generateBindings, generateBindingsGraph, invokeContract, isTransientTestnetSmokeFailure, loadConfig, parseContractId, parseInvokeTarget, parseStellarCliVersion, readArtifacts, readBindingMarker, resolveContract, resolveDefaultContractName, resolveDeployArgs, resolveDeployOrder, resolveNetwork, runCommand, updateArtifact, validateSourceShape, writeArtifacts, writeBindingMarker };
|
|
654
|
+
export { BINDING_MARKER_FILENAME, type BindingFreshness, type BindingFreshnessStatus, type BindingMarker, BindingMarkerSchema, type BuildContractOptions, CAATINGA_CORE_VERSION, CaatingaArtifacts, type CaatingaConfig, CaatingaConfigSchema, CaatingaError, type CheckStellarCliVersionOptions, type CollectProjectStatusOptions, type CompatibilityReport, type CompatibilityStatus, type CompatibilityWarning, type CompatibilityWarningCode, ContractArtifact, type ContractConfig, type ContractStatusEntry, type CreateInitialArtifactsOptions, type CreateMinimalProjectOptions, type CreateProjectFromTemplateOptions, type CreateZkProjectOptions, type DeployArgValue, type DeployContractGraphResult, type DeployContractOptions, type EvaluateBindingFreshnessOptions, type EvaluateStellarCliCompatibilityInput, type GenerateBindingsGraphResult, type GenerateBindingsOptions, type InvokeContractOptions, type InvokeTarget, type LoadConfigOptions, type NetworkConfig, type NetworkStatus, type ProjectStatus, READ_CALL_FAILURE_REGEX, type ReadContractOptions, type ResolvedContract, type ResolvedNetwork, type RunCommandResult, STELLAR_CLI_LAST_TESTED_VERSION, STELLAR_CLI_MIN_VERSION, type SkippedContract, type TemplateManifest, TemplateManifestSchema, WELL_KNOWN_NETWORKS, buildContract, buildDependencyGraph, buildReadCallHint, checkBinary, checkStellarCliVersion, collectProjectStatus, createInitialArtifacts, createMinimalProject, createProjectFromTemplate, createZkProject, defineConfig, deployContract, deployContractGraph, evaluateBindingFreshness, evaluateBindingsFreshness, evaluateStellarCliCompatibility, generateBindings, generateBindingsGraph, invokeContract, isCargoBinMissingFromPath, isReadCallFailure, isTransientTestnetSmokeFailure, loadConfig, parseContractId, parseInvokeTarget, parseStellarCliVersion, readArtifacts, readBindingMarker, readContract, resolveContract, resolveDefaultContractName, resolveDeployArgs, resolveDeployOrder, resolveNetwork, resolveSubprocessEnv, runCommand, updateArtifact, validateSourceShape, writeArtifacts, writeBindingMarker };
|