@layr-labs/ecloud-sdk 1.0.0-devep8 → 1.0.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.
@@ -1,194 +0,0 @@
1
- import { Address, WalletClient, PublicClient, Hex } from 'viem';
2
- import { H as Logger, E as EnvironmentConfig, n as DeployAppOpts, A as AppId, ab as UpgradeAppOpts, R as PrepareDeployOpts, V as PreparedDeploy, G as GasEstimate, Q as PrepareDeployFromVerifiableBuildOpts, v as ExecuteDeployResult, U as PrepareUpgradeOpts, Y as PreparedUpgrade, T as PrepareUpgradeFromVerifiableBuildOpts, x as ExecuteUpgradeResult, c as AppProfile, d as AppProfileResponse, L as LifecycleOpts, b as AppConfig } from './index-DFqQ7v8_.js';
3
-
4
- /**
5
- * Create command
6
- *
7
- * Creates a new app project from a template
8
- *
9
- * NOTE: This SDK function is non-interactive. All required parameters must be
10
- * provided explicitly. Use the CLI for interactive parameter collection.
11
- */
12
-
13
- /**
14
- * Required create app options for SDK (non-interactive)
15
- */
16
- interface SDKCreateAppOpts {
17
- /** Project name - required */
18
- name: string;
19
- /** Programming language - required (typescript, golang, rust, python) */
20
- language: string;
21
- /** Template name/category (e.g., "minimal") or custom template URL - optional, defaults to first available */
22
- template?: string;
23
- /** Template version/ref - optional */
24
- templateVersion?: string;
25
- /** Verbose output - optional */
26
- verbose?: boolean;
27
- /** Skip telemetry (used when called from CLI) - optional */
28
- skipTelemetry?: boolean;
29
- }
30
- /**
31
- * Legacy interface for backward compatibility
32
- * @deprecated Use SDKCreateAppOpts instead
33
- */
34
- interface CreateAppOpts {
35
- name?: string;
36
- language?: string;
37
- template?: string;
38
- templateVersion?: string;
39
- verbose?: boolean;
40
- skipTelemetry?: boolean;
41
- }
42
- declare const PRIMARY_LANGUAGES: string[];
43
- /**
44
- * Get available template categories for a language
45
- */
46
- declare function getAvailableTemplates(language: string): Promise<Array<{
47
- name: string;
48
- description: string;
49
- }>>;
50
- /**
51
- * Create a new app project from template
52
- *
53
- * This function is non-interactive and requires all parameters to be provided explicitly.
54
- *
55
- * @param options - Required options including name and language
56
- * @param logger - Optional logger instance
57
- * @throws Error if required parameters are missing or invalid
58
- */
59
- declare function createApp(options: SDKCreateAppOpts | CreateAppOpts, logger?: Logger): Promise<void>;
60
-
61
- /**
62
- * Logs command
63
- *
64
- * View app logs with optional watch mode
65
- *
66
- * NOTE: This SDK function is non-interactive. All required parameters must be
67
- * provided explicitly. Use the CLI for interactive parameter collection.
68
- */
69
-
70
- /**
71
- * Required logs options for SDK (non-interactive)
72
- */
73
- interface LogsOptions {
74
- /** App ID (address) or app name - required */
75
- appID: string | Address;
76
- /** Watch logs continuously - optional */
77
- watch?: boolean;
78
- /** Client ID for API requests - optional */
79
- clientId?: string;
80
- }
81
- /**
82
- * View app logs
83
- *
84
- * This function is non-interactive and requires appID to be provided explicitly.
85
- *
86
- * @param options - Required options including appID
87
- * @param walletClient - Viem WalletClient for signing requests
88
- * @param publicClient - Viem PublicClient for chain queries
89
- * @param environmentConfig - Environment configuration
90
- * @param logger - Optional logger instance
91
- * @param skipTelemetry - Skip telemetry (for CLI usage)
92
- * @throws Error if appID is missing or invalid
93
- */
94
- declare function logs(options: LogsOptions, walletClient: WalletClient, publicClient: PublicClient, environmentConfig: EnvironmentConfig, logger?: Logger, skipTelemetry?: boolean): Promise<void>;
95
-
96
- /**
97
- * Main App namespace entry point
98
- */
99
-
100
- /**
101
- * Encode start app call data for gas estimation
102
- */
103
- declare function encodeStartAppData(appId: AppId): Hex;
104
- /**
105
- * Encode stop app call data for gas estimation
106
- */
107
- declare function encodeStopAppData(appId: AppId): Hex;
108
- /**
109
- * Encode terminate app call data for gas estimation
110
- */
111
- declare function encodeTerminateAppData(appId: AppId): Hex;
112
- interface AppModule {
113
- create: (opts: CreateAppOpts) => Promise<void>;
114
- deploy: (opts: DeployAppOpts) => Promise<{
115
- appId: AppId;
116
- tx: Hex;
117
- appName: string;
118
- imageRef: string;
119
- ipAddress?: string;
120
- }>;
121
- upgrade: (appId: AppId, opts: UpgradeAppOpts) => Promise<{
122
- tx: Hex;
123
- appId: AppId;
124
- imageRef: string;
125
- }>;
126
- prepareDeploy: (opts: PrepareDeployOpts) => Promise<{
127
- prepared: PreparedDeploy;
128
- gasEstimate: GasEstimate;
129
- }>;
130
- prepareDeployFromVerifiableBuild: (opts: PrepareDeployFromVerifiableBuildOpts) => Promise<{
131
- prepared: PreparedDeploy;
132
- gasEstimate: GasEstimate;
133
- }>;
134
- executeDeploy: (prepared: PreparedDeploy, gas?: GasEstimate) => Promise<ExecuteDeployResult>;
135
- watchDeployment: (appId: AppId) => Promise<string | undefined>;
136
- prepareUpgrade: (appId: AppId, opts: PrepareUpgradeOpts) => Promise<{
137
- prepared: PreparedUpgrade;
138
- gasEstimate: GasEstimate;
139
- }>;
140
- prepareUpgradeFromVerifiableBuild: (appId: AppId, opts: PrepareUpgradeFromVerifiableBuildOpts) => Promise<{
141
- prepared: PreparedUpgrade;
142
- gasEstimate: GasEstimate;
143
- }>;
144
- executeUpgrade: (prepared: PreparedUpgrade, gas?: GasEstimate) => Promise<ExecuteUpgradeResult>;
145
- watchUpgrade: (appId: AppId) => Promise<void>;
146
- setProfile: (appId: AppId, profile: AppProfile) => Promise<AppProfileResponse>;
147
- logs: (opts: LogsOptions) => Promise<void>;
148
- start: (appId: AppId, opts?: LifecycleOpts) => Promise<{
149
- tx: Hex | false;
150
- }>;
151
- stop: (appId: AppId, opts?: LifecycleOpts) => Promise<{
152
- tx: Hex | false;
153
- }>;
154
- terminate: (appId: AppId, opts?: LifecycleOpts) => Promise<{
155
- tx: Hex | false;
156
- }>;
157
- getBillingType: (appId: AppId) => Promise<number>;
158
- getAppsByBillingAccount: (account: Address, offset: bigint, limit: bigint) => Promise<{
159
- apps: Address[];
160
- appConfigs: AppConfig[];
161
- }>;
162
- isDelegated: () => Promise<boolean>;
163
- undelegate: () => Promise<{
164
- tx: Hex | false;
165
- }>;
166
- }
167
- interface AppModuleConfig {
168
- verbose?: boolean;
169
- walletClient: WalletClient;
170
- publicClient: PublicClient;
171
- environment: string;
172
- clientId?: string;
173
- skipTelemetry?: boolean;
174
- }
175
- declare function createAppModule(ctx: AppModuleConfig): AppModule;
176
-
177
- /**
178
- * Main Compute namespace entry point
179
- */
180
-
181
- interface ComputeModule {
182
- app: AppModule;
183
- }
184
- interface ComputeModuleConfig {
185
- verbose?: boolean;
186
- walletClient: WalletClient;
187
- publicClient: PublicClient;
188
- environment: string;
189
- clientId?: string;
190
- skipTelemetry?: boolean;
191
- }
192
- declare function createComputeModule(config: ComputeModuleConfig): ComputeModule;
193
-
194
- export { type AppModule as A, type ComputeModule as C, type LogsOptions as L, PRIMARY_LANGUAGES as P, type SDKCreateAppOpts as S, type ComputeModuleConfig as a, type CreateAppOpts as b, createApp as c, createComputeModule as d, encodeStartAppData as e, encodeStopAppData as f, encodeTerminateAppData as g, getAvailableTemplates as h, type AppModuleConfig as i, createAppModule as j, logs as l };