@layr-labs/ecloud-sdk 0.1.0-dev.1 → 0.1.0-dev.3
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/README.md +6 -4
- package/VERSION +2 -2
- package/dist/billing.cjs +536 -0
- package/dist/billing.cjs.map +1 -0
- package/dist/billing.d.cts +20 -0
- package/dist/billing.d.ts +20 -0
- package/dist/billing.js +8 -0
- package/dist/billing.js.map +1 -0
- package/dist/chunk-6WSXUSKJ.js +668 -0
- package/dist/chunk-6WSXUSKJ.js.map +1 -0
- package/dist/chunk-COKPE6TJ.js +180 -0
- package/dist/chunk-COKPE6TJ.js.map +1 -0
- package/dist/chunk-RDONKJY6.js +6289 -0
- package/dist/chunk-RDONKJY6.js.map +1 -0
- package/dist/compute-B_ibIORD.d.cts +184 -0
- package/dist/compute-gpepEsn3.d.ts +184 -0
- package/dist/compute.cjs +6242 -0
- package/dist/compute.cjs.map +1 -0
- package/dist/compute.d.cts +3 -0
- package/dist/compute.d.ts +3 -0
- package/dist/compute.js +16 -0
- package/dist/compute.js.map +1 -0
- package/dist/index-D-SUX3IG.d.cts +218 -0
- package/dist/index-D-SUX3IG.d.ts +218 -0
- package/dist/index.cjs +981 -551
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +242 -394
- package/dist/index.d.ts +242 -394
- package/dist/index.js +97 -6621
- package/dist/index.js.map +1 -1
- package/package.json +12 -1
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { L as Logger, a as DeployAppOpts, A as AppId, U as UpgradeAppOpts, b as LifecycleOpts } from './index-D-SUX3IG.cjs';
|
|
2
|
+
import { Address } from 'viem';
|
|
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 SDKLogsOptions {
|
|
74
|
+
/** App ID (address) or app name - required */
|
|
75
|
+
appID: string | Address;
|
|
76
|
+
/** Watch logs continuously - optional */
|
|
77
|
+
watch?: boolean;
|
|
78
|
+
/** Environment name - optional, defaults to 'sepolia' */
|
|
79
|
+
environment?: string;
|
|
80
|
+
/** Private key for authenticated requests - optional */
|
|
81
|
+
privateKey?: string;
|
|
82
|
+
/** RPC URL - optional, uses environment default */
|
|
83
|
+
rpcUrl?: string;
|
|
84
|
+
/** Client ID for API requests - optional */
|
|
85
|
+
clientId?: string;
|
|
86
|
+
/** Skip telemetry (for CLI usage) - optional */
|
|
87
|
+
skipTelemetry?: boolean;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Legacy interface for backward compatibility
|
|
91
|
+
* @deprecated Use SDKLogsOptions instead
|
|
92
|
+
*/
|
|
93
|
+
interface LogsOptions {
|
|
94
|
+
appID?: string | Address;
|
|
95
|
+
watch?: boolean;
|
|
96
|
+
environment?: string;
|
|
97
|
+
privateKey?: string;
|
|
98
|
+
rpcUrl?: string;
|
|
99
|
+
clientId?: string;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* View app logs
|
|
103
|
+
*
|
|
104
|
+
* This function is non-interactive and requires appID to be provided explicitly.
|
|
105
|
+
*
|
|
106
|
+
* @param options - Required options including appID
|
|
107
|
+
* @param logger - Optional logger instance
|
|
108
|
+
* @throws Error if appID is missing or invalid
|
|
109
|
+
*/
|
|
110
|
+
declare function logs(options: SDKLogsOptions | LogsOptions, logger?: Logger, skipTelemetry?: boolean): Promise<void>;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Main App namespace entry point
|
|
114
|
+
*/
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Encode start app call data for gas estimation
|
|
118
|
+
*/
|
|
119
|
+
declare function encodeStartAppData(appId: AppId): `0x${string}`;
|
|
120
|
+
/**
|
|
121
|
+
* Encode stop app call data for gas estimation
|
|
122
|
+
*/
|
|
123
|
+
declare function encodeStopAppData(appId: AppId): `0x${string}`;
|
|
124
|
+
/**
|
|
125
|
+
* Encode terminate app call data for gas estimation
|
|
126
|
+
*/
|
|
127
|
+
declare function encodeTerminateAppData(appId: AppId): `0x${string}`;
|
|
128
|
+
interface AppModule {
|
|
129
|
+
create: (opts: CreateAppOpts) => Promise<void>;
|
|
130
|
+
deploy: (opts: DeployAppOpts) => Promise<{
|
|
131
|
+
appId: AppId;
|
|
132
|
+
tx: `0x${string}`;
|
|
133
|
+
appName: string;
|
|
134
|
+
imageRef: string;
|
|
135
|
+
ipAddress?: string;
|
|
136
|
+
}>;
|
|
137
|
+
upgrade: (appId: AppId, opts: UpgradeAppOpts) => Promise<{
|
|
138
|
+
tx: `0x${string}`;
|
|
139
|
+
appId: string;
|
|
140
|
+
imageRef: string;
|
|
141
|
+
}>;
|
|
142
|
+
logs: (opts: LogsOptions) => Promise<void>;
|
|
143
|
+
start: (appId: AppId, opts?: LifecycleOpts) => Promise<{
|
|
144
|
+
tx: `0x${string}` | false;
|
|
145
|
+
}>;
|
|
146
|
+
stop: (appId: AppId, opts?: LifecycleOpts) => Promise<{
|
|
147
|
+
tx: `0x${string}` | false;
|
|
148
|
+
}>;
|
|
149
|
+
terminate: (appId: AppId, opts?: LifecycleOpts) => Promise<{
|
|
150
|
+
tx: `0x${string}` | false;
|
|
151
|
+
}>;
|
|
152
|
+
isDelegated: () => Promise<boolean>;
|
|
153
|
+
undelegate: () => Promise<{
|
|
154
|
+
tx: `0x${string}` | false;
|
|
155
|
+
}>;
|
|
156
|
+
}
|
|
157
|
+
interface AppModuleConfig {
|
|
158
|
+
verbose?: boolean;
|
|
159
|
+
privateKey: `0x${string}`;
|
|
160
|
+
rpcUrl: string;
|
|
161
|
+
environment: string;
|
|
162
|
+
clientId?: string;
|
|
163
|
+
skipTelemetry?: boolean;
|
|
164
|
+
}
|
|
165
|
+
declare function createAppModule(ctx: AppModuleConfig): AppModule;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Main Compute namespace entry point
|
|
169
|
+
*/
|
|
170
|
+
|
|
171
|
+
interface ComputeModule {
|
|
172
|
+
app: AppModule;
|
|
173
|
+
}
|
|
174
|
+
interface ComputeModuleConfig {
|
|
175
|
+
verbose?: boolean;
|
|
176
|
+
privateKey: `0x${string}`;
|
|
177
|
+
rpcUrl: string;
|
|
178
|
+
environment: string;
|
|
179
|
+
clientId?: string;
|
|
180
|
+
skipTelemetry?: boolean;
|
|
181
|
+
}
|
|
182
|
+
declare function createComputeModule(config: ComputeModuleConfig): ComputeModule;
|
|
183
|
+
|
|
184
|
+
export { type AppModule as A, type ComputeModule as C, type LogsOptions as L, PRIMARY_LANGUAGES as P, type SDKCreateAppOpts as S, type CreateAppOpts as a, type SDKLogsOptions as b, createApp as c, createComputeModule as d, type ComputeModuleConfig as e, encodeStartAppData as f, getAvailableTemplates as g, encodeStopAppData as h, encodeTerminateAppData as i, createAppModule as j, type AppModuleConfig as k, logs as l };
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { L as Logger, a as DeployAppOpts, A as AppId, U as UpgradeAppOpts, b as LifecycleOpts } from './index-D-SUX3IG.js';
|
|
2
|
+
import { Address } from 'viem';
|
|
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 SDKLogsOptions {
|
|
74
|
+
/** App ID (address) or app name - required */
|
|
75
|
+
appID: string | Address;
|
|
76
|
+
/** Watch logs continuously - optional */
|
|
77
|
+
watch?: boolean;
|
|
78
|
+
/** Environment name - optional, defaults to 'sepolia' */
|
|
79
|
+
environment?: string;
|
|
80
|
+
/** Private key for authenticated requests - optional */
|
|
81
|
+
privateKey?: string;
|
|
82
|
+
/** RPC URL - optional, uses environment default */
|
|
83
|
+
rpcUrl?: string;
|
|
84
|
+
/** Client ID for API requests - optional */
|
|
85
|
+
clientId?: string;
|
|
86
|
+
/** Skip telemetry (for CLI usage) - optional */
|
|
87
|
+
skipTelemetry?: boolean;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Legacy interface for backward compatibility
|
|
91
|
+
* @deprecated Use SDKLogsOptions instead
|
|
92
|
+
*/
|
|
93
|
+
interface LogsOptions {
|
|
94
|
+
appID?: string | Address;
|
|
95
|
+
watch?: boolean;
|
|
96
|
+
environment?: string;
|
|
97
|
+
privateKey?: string;
|
|
98
|
+
rpcUrl?: string;
|
|
99
|
+
clientId?: string;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* View app logs
|
|
103
|
+
*
|
|
104
|
+
* This function is non-interactive and requires appID to be provided explicitly.
|
|
105
|
+
*
|
|
106
|
+
* @param options - Required options including appID
|
|
107
|
+
* @param logger - Optional logger instance
|
|
108
|
+
* @throws Error if appID is missing or invalid
|
|
109
|
+
*/
|
|
110
|
+
declare function logs(options: SDKLogsOptions | LogsOptions, logger?: Logger, skipTelemetry?: boolean): Promise<void>;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Main App namespace entry point
|
|
114
|
+
*/
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Encode start app call data for gas estimation
|
|
118
|
+
*/
|
|
119
|
+
declare function encodeStartAppData(appId: AppId): `0x${string}`;
|
|
120
|
+
/**
|
|
121
|
+
* Encode stop app call data for gas estimation
|
|
122
|
+
*/
|
|
123
|
+
declare function encodeStopAppData(appId: AppId): `0x${string}`;
|
|
124
|
+
/**
|
|
125
|
+
* Encode terminate app call data for gas estimation
|
|
126
|
+
*/
|
|
127
|
+
declare function encodeTerminateAppData(appId: AppId): `0x${string}`;
|
|
128
|
+
interface AppModule {
|
|
129
|
+
create: (opts: CreateAppOpts) => Promise<void>;
|
|
130
|
+
deploy: (opts: DeployAppOpts) => Promise<{
|
|
131
|
+
appId: AppId;
|
|
132
|
+
tx: `0x${string}`;
|
|
133
|
+
appName: string;
|
|
134
|
+
imageRef: string;
|
|
135
|
+
ipAddress?: string;
|
|
136
|
+
}>;
|
|
137
|
+
upgrade: (appId: AppId, opts: UpgradeAppOpts) => Promise<{
|
|
138
|
+
tx: `0x${string}`;
|
|
139
|
+
appId: string;
|
|
140
|
+
imageRef: string;
|
|
141
|
+
}>;
|
|
142
|
+
logs: (opts: LogsOptions) => Promise<void>;
|
|
143
|
+
start: (appId: AppId, opts?: LifecycleOpts) => Promise<{
|
|
144
|
+
tx: `0x${string}` | false;
|
|
145
|
+
}>;
|
|
146
|
+
stop: (appId: AppId, opts?: LifecycleOpts) => Promise<{
|
|
147
|
+
tx: `0x${string}` | false;
|
|
148
|
+
}>;
|
|
149
|
+
terminate: (appId: AppId, opts?: LifecycleOpts) => Promise<{
|
|
150
|
+
tx: `0x${string}` | false;
|
|
151
|
+
}>;
|
|
152
|
+
isDelegated: () => Promise<boolean>;
|
|
153
|
+
undelegate: () => Promise<{
|
|
154
|
+
tx: `0x${string}` | false;
|
|
155
|
+
}>;
|
|
156
|
+
}
|
|
157
|
+
interface AppModuleConfig {
|
|
158
|
+
verbose?: boolean;
|
|
159
|
+
privateKey: `0x${string}`;
|
|
160
|
+
rpcUrl: string;
|
|
161
|
+
environment: string;
|
|
162
|
+
clientId?: string;
|
|
163
|
+
skipTelemetry?: boolean;
|
|
164
|
+
}
|
|
165
|
+
declare function createAppModule(ctx: AppModuleConfig): AppModule;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Main Compute namespace entry point
|
|
169
|
+
*/
|
|
170
|
+
|
|
171
|
+
interface ComputeModule {
|
|
172
|
+
app: AppModule;
|
|
173
|
+
}
|
|
174
|
+
interface ComputeModuleConfig {
|
|
175
|
+
verbose?: boolean;
|
|
176
|
+
privateKey: `0x${string}`;
|
|
177
|
+
rpcUrl: string;
|
|
178
|
+
environment: string;
|
|
179
|
+
clientId?: string;
|
|
180
|
+
skipTelemetry?: boolean;
|
|
181
|
+
}
|
|
182
|
+
declare function createComputeModule(config: ComputeModuleConfig): ComputeModule;
|
|
183
|
+
|
|
184
|
+
export { type AppModule as A, type ComputeModule as C, type LogsOptions as L, PRIMARY_LANGUAGES as P, type SDKCreateAppOpts as S, type CreateAppOpts as a, type SDKLogsOptions as b, createApp as c, createComputeModule as d, type ComputeModuleConfig as e, encodeStartAppData as f, getAvailableTemplates as g, encodeStopAppData as h, encodeTerminateAppData as i, createAppModule as j, type AppModuleConfig as k, logs as l };
|