@layr-labs/ecloud-sdk 0.2.0 → 0.2.2-dev
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/VERSION +2 -2
- package/dist/billing.cjs +48 -43
- package/dist/billing.cjs.map +1 -1
- package/dist/billing.d.cts +6 -3
- package/dist/billing.d.ts +6 -3
- package/dist/billing.js +519 -4
- package/dist/billing.js.map +1 -1
- package/dist/browser.cjs +5034 -0
- package/dist/browser.cjs.map +1 -0
- package/dist/browser.d.cts +239 -0
- package/dist/browser.d.ts +239 -0
- package/dist/browser.js +4924 -0
- package/dist/browser.js.map +1 -0
- package/dist/{compute-CF2HOXed.d.ts → compute-BYhSs8en.d.ts} +15 -96
- package/dist/{compute-CbmjA8kJ.d.cts → compute-Bpjb3hYD.d.cts} +15 -96
- package/dist/compute.cjs +875 -846
- package/dist/compute.cjs.map +1 -1
- package/dist/compute.d.cts +2 -2
- package/dist/compute.d.ts +2 -2
- package/dist/compute.js +7009 -8
- package/dist/compute.js.map +1 -1
- package/dist/helpers-CEvhJz7f.d.cts +742 -0
- package/dist/helpers-CQuBwQnu.d.ts +742 -0
- package/dist/index-DeQzn_yM.d.cts +739 -0
- package/dist/index-DeQzn_yM.d.ts +739 -0
- package/dist/index.cjs +1958 -1758
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +69 -414
- package/dist/index.d.ts +69 -414
- package/dist/index.js +7977 -134
- package/dist/index.js.map +1 -1
- package/package.json +17 -2
- package/dist/chunk-CA5Y4OVI.js +0 -744
- package/dist/chunk-CA5Y4OVI.js.map +0 -1
- package/dist/chunk-ZDXN2WKP.js +0 -434
- package/dist/chunk-ZDXN2WKP.js.map +0 -1
- package/dist/chunk-ZTLKZMSW.js +0 -6719
- package/dist/chunk-ZTLKZMSW.js.map +0 -1
- package/dist/index-D2QufVB9.d.cts +0 -342
- package/dist/index-D2QufVB9.d.ts +0 -342
|
@@ -1,342 +0,0 @@
|
|
|
1
|
-
import { Address, Hex } from 'viem';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Core types for ECloud SDK
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
type AppId = Address;
|
|
8
|
-
type logVisibility = "public" | "private" | "off";
|
|
9
|
-
interface DeployAppOpts {
|
|
10
|
-
/** App name - required */
|
|
11
|
-
name: string;
|
|
12
|
-
/** Path to Dockerfile (if building from Dockerfile) - either this or imageRef is required */
|
|
13
|
-
dockerfile?: string;
|
|
14
|
-
/** Path to .env file - optional */
|
|
15
|
-
envFile?: string;
|
|
16
|
-
/** Image reference (registry/path:tag) - either this or dockerfile is required */
|
|
17
|
-
imageRef?: string;
|
|
18
|
-
/** Instance type SKU - required */
|
|
19
|
-
instanceType: string;
|
|
20
|
-
/** Log visibility setting - required */
|
|
21
|
-
logVisibility: logVisibility;
|
|
22
|
-
/** Optional gas params from estimation */
|
|
23
|
-
gas?: {
|
|
24
|
-
maxFeePerGas?: bigint;
|
|
25
|
-
maxPriorityFeePerGas?: bigint;
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
interface UpgradeAppOpts {
|
|
29
|
-
/** Path to Dockerfile (if building from Dockerfile) - either this or imageRef is required */
|
|
30
|
-
dockerfile?: string;
|
|
31
|
-
/** Image reference (registry/path:tag) - either this or dockerfile is required */
|
|
32
|
-
imageRef?: string;
|
|
33
|
-
/** Path to .env file - optional */
|
|
34
|
-
envFile?: string;
|
|
35
|
-
/** Instance type SKU - required */
|
|
36
|
-
instanceType: string;
|
|
37
|
-
/** Log visibility setting - required */
|
|
38
|
-
logVisibility: logVisibility;
|
|
39
|
-
gas?: {
|
|
40
|
-
maxFeePerGas?: bigint;
|
|
41
|
-
maxPriorityFeePerGas?: bigint;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
/** Options for prepareDeploy */
|
|
45
|
-
interface PrepareDeployOpts {
|
|
46
|
-
/** App name - required */
|
|
47
|
-
name: string;
|
|
48
|
-
/** Path to Dockerfile (if building from Dockerfile) */
|
|
49
|
-
dockerfile?: string;
|
|
50
|
-
/** Path to .env file - optional */
|
|
51
|
-
envFile?: string;
|
|
52
|
-
/** Image reference (registry/path:tag) */
|
|
53
|
-
imageRef?: string;
|
|
54
|
-
/** Instance type SKU - required */
|
|
55
|
-
instanceType: string;
|
|
56
|
-
/** Log visibility setting - required */
|
|
57
|
-
logVisibility: logVisibility;
|
|
58
|
-
/** Resource usage monitoring setting - optional */
|
|
59
|
-
resourceUsageMonitoring?: "enable" | "disable";
|
|
60
|
-
}
|
|
61
|
-
/** Options for prepareUpgrade */
|
|
62
|
-
interface PrepareUpgradeOpts {
|
|
63
|
-
/** Path to Dockerfile (if building from Dockerfile) */
|
|
64
|
-
dockerfile?: string;
|
|
65
|
-
/** Image reference (registry/path:tag) */
|
|
66
|
-
imageRef?: string;
|
|
67
|
-
/** Path to .env file - optional */
|
|
68
|
-
envFile?: string;
|
|
69
|
-
/** Instance type SKU - required */
|
|
70
|
-
instanceType: string;
|
|
71
|
-
/** Log visibility setting - required */
|
|
72
|
-
logVisibility: logVisibility;
|
|
73
|
-
/** Resource usage monitoring setting - optional */
|
|
74
|
-
resourceUsageMonitoring?: "enable" | "disable";
|
|
75
|
-
}
|
|
76
|
-
/** Options for prepareDeployFromVerifiableBuild */
|
|
77
|
-
interface PrepareDeployFromVerifiableBuildOpts {
|
|
78
|
-
/** App name - required */
|
|
79
|
-
name: string;
|
|
80
|
-
/** Image reference (registry/path:tag) - required */
|
|
81
|
-
imageRef: string;
|
|
82
|
-
/** Image digest (sha256:...) - required */
|
|
83
|
-
imageDigest: string;
|
|
84
|
-
/** Path to .env file - optional */
|
|
85
|
-
envFile?: string;
|
|
86
|
-
/** Instance type SKU - required */
|
|
87
|
-
instanceType: string;
|
|
88
|
-
/** Log visibility setting - required */
|
|
89
|
-
logVisibility: logVisibility;
|
|
90
|
-
/** Resource usage monitoring setting - optional */
|
|
91
|
-
resourceUsageMonitoring?: "enable" | "disable";
|
|
92
|
-
}
|
|
93
|
-
/** Options for prepareUpgradeFromVerifiableBuild */
|
|
94
|
-
interface PrepareUpgradeFromVerifiableBuildOpts {
|
|
95
|
-
/** Image reference (registry/path:tag) - required */
|
|
96
|
-
imageRef: string;
|
|
97
|
-
/** Image digest (sha256:...) - required */
|
|
98
|
-
imageDigest: string;
|
|
99
|
-
/** Path to .env file - optional */
|
|
100
|
-
envFile?: string;
|
|
101
|
-
/** Instance type SKU - required */
|
|
102
|
-
instanceType: string;
|
|
103
|
-
/** Log visibility setting - required */
|
|
104
|
-
logVisibility: logVisibility;
|
|
105
|
-
/** Resource usage monitoring setting - optional */
|
|
106
|
-
resourceUsageMonitoring?: "enable" | "disable";
|
|
107
|
-
}
|
|
108
|
-
/** Gas options for execute functions */
|
|
109
|
-
interface GasOpts {
|
|
110
|
-
maxFeePerGas?: bigint;
|
|
111
|
-
maxPriorityFeePerGas?: bigint;
|
|
112
|
-
}
|
|
113
|
-
/** Result from executeDeploy */
|
|
114
|
-
interface ExecuteDeployResult {
|
|
115
|
-
appId: AppId;
|
|
116
|
-
txHash: Hex;
|
|
117
|
-
appName: string;
|
|
118
|
-
imageRef: string;
|
|
119
|
-
}
|
|
120
|
-
/** Result from executeUpgrade */
|
|
121
|
-
interface ExecuteUpgradeResult {
|
|
122
|
-
appId: AppId;
|
|
123
|
-
txHash: Hex;
|
|
124
|
-
imageRef: string;
|
|
125
|
-
}
|
|
126
|
-
/** Data-only batch for deploy (clients provided by module) */
|
|
127
|
-
interface PreparedDeployData {
|
|
128
|
-
/** The app ID that will be deployed */
|
|
129
|
-
appId: AppId;
|
|
130
|
-
/** The salt used for deployment */
|
|
131
|
-
salt: Uint8Array;
|
|
132
|
-
/** Batch executions to be sent */
|
|
133
|
-
executions: Array<{
|
|
134
|
-
target: Address;
|
|
135
|
-
value: bigint;
|
|
136
|
-
callData: Hex;
|
|
137
|
-
}>;
|
|
138
|
-
}
|
|
139
|
-
/** Data-only batch for upgrade (clients provided by module) */
|
|
140
|
-
interface PreparedUpgradeData {
|
|
141
|
-
/** The app ID being upgraded */
|
|
142
|
-
appId: AppId;
|
|
143
|
-
/** Batch executions to be sent */
|
|
144
|
-
executions: Array<{
|
|
145
|
-
target: Address;
|
|
146
|
-
value: bigint;
|
|
147
|
-
callData: Hex;
|
|
148
|
-
}>;
|
|
149
|
-
}
|
|
150
|
-
/** Prepared deployment ready for execution */
|
|
151
|
-
interface PreparedDeploy {
|
|
152
|
-
/** The prepared data (executions, appId, etc.) */
|
|
153
|
-
data: PreparedDeployData;
|
|
154
|
-
/** App name */
|
|
155
|
-
appName: string;
|
|
156
|
-
/** Final image reference */
|
|
157
|
-
imageRef: string;
|
|
158
|
-
}
|
|
159
|
-
/** Prepared upgrade ready for execution */
|
|
160
|
-
interface PreparedUpgrade {
|
|
161
|
-
/** The prepared data (executions, appId, etc.) */
|
|
162
|
-
data: PreparedUpgradeData;
|
|
163
|
-
/** App ID being upgraded */
|
|
164
|
-
appId: AppId;
|
|
165
|
-
/** Final image reference */
|
|
166
|
-
imageRef: string;
|
|
167
|
-
}
|
|
168
|
-
interface LifecycleOpts {
|
|
169
|
-
gas?: {
|
|
170
|
-
maxFeePerGas?: bigint;
|
|
171
|
-
maxPriorityFeePerGas?: bigint;
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
interface AppRecord {
|
|
175
|
-
id: AppId;
|
|
176
|
-
owner: Address;
|
|
177
|
-
image: string;
|
|
178
|
-
status: "starting" | "running" | "stopped" | "terminated";
|
|
179
|
-
createdAt: number;
|
|
180
|
-
lastUpdatedAt: number;
|
|
181
|
-
}
|
|
182
|
-
interface DeployOptions {
|
|
183
|
-
/** Private key for signing transactions (hex string with or without 0x prefix) - optional, will prompt if not provided */
|
|
184
|
-
privateKey?: string;
|
|
185
|
-
/** RPC URL for blockchain connection - optional, uses environment default if not provided */
|
|
186
|
-
rpcUrl?: string;
|
|
187
|
-
/** Environment name (e.g., 'sepolia', 'mainnet-alpha') - optional, defaults to 'sepolia' */
|
|
188
|
-
environment?: string;
|
|
189
|
-
/** Path to Dockerfile (if building from Dockerfile) */
|
|
190
|
-
dockerfilePath?: string;
|
|
191
|
-
/** Image reference (registry/path:tag) - optional, will prompt if not provided */
|
|
192
|
-
imageRef?: string;
|
|
193
|
-
/** Path to .env file - optional, will use .env if exists or prompt */
|
|
194
|
-
envFilePath?: string;
|
|
195
|
-
/** App name - optional, will prompt if not provided */
|
|
196
|
-
appName?: string;
|
|
197
|
-
/** Instance type - optional, will prompt if not provided */
|
|
198
|
-
instanceType?: string;
|
|
199
|
-
/** Log visibility setting - optional, will prompt if not provided */
|
|
200
|
-
logVisibility?: logVisibility;
|
|
201
|
-
}
|
|
202
|
-
interface DeployResult {
|
|
203
|
-
/** App ID (contract address) */
|
|
204
|
-
appId: AppId;
|
|
205
|
-
/** App name */
|
|
206
|
-
appName: string;
|
|
207
|
-
/** Final image reference */
|
|
208
|
-
imageRef: string;
|
|
209
|
-
/** IP address (if available) */
|
|
210
|
-
ipAddress?: string;
|
|
211
|
-
/** Transaction hash */
|
|
212
|
-
txHash: Hex;
|
|
213
|
-
}
|
|
214
|
-
interface EnvironmentConfig {
|
|
215
|
-
name: string;
|
|
216
|
-
build: "dev" | "prod";
|
|
217
|
-
chainID: bigint;
|
|
218
|
-
appControllerAddress: Address;
|
|
219
|
-
permissionControllerAddress: string;
|
|
220
|
-
erc7702DelegatorAddress: string;
|
|
221
|
-
kmsServerURL: string;
|
|
222
|
-
userApiServerURL: string;
|
|
223
|
-
defaultRPCURL: string;
|
|
224
|
-
}
|
|
225
|
-
interface Release {
|
|
226
|
-
rmsRelease: {
|
|
227
|
-
artifacts: Array<{
|
|
228
|
-
digest: Uint8Array;
|
|
229
|
-
registry: string;
|
|
230
|
-
}>;
|
|
231
|
-
upgradeByTime: number;
|
|
232
|
-
};
|
|
233
|
-
publicEnv: Uint8Array;
|
|
234
|
-
encryptedEnv: Uint8Array;
|
|
235
|
-
}
|
|
236
|
-
interface ParsedEnvironment {
|
|
237
|
-
public: Record<string, string>;
|
|
238
|
-
private: Record<string, string>;
|
|
239
|
-
}
|
|
240
|
-
interface ImageDigestResult {
|
|
241
|
-
digest: Uint8Array;
|
|
242
|
-
registry: string;
|
|
243
|
-
platform: string;
|
|
244
|
-
}
|
|
245
|
-
interface DockerImageConfig {
|
|
246
|
-
cmd: string[];
|
|
247
|
-
entrypoint: string[];
|
|
248
|
-
user: string;
|
|
249
|
-
labels: Record<string, string>;
|
|
250
|
-
}
|
|
251
|
-
interface Logger {
|
|
252
|
-
debug(message: string, ...args: any[]): void;
|
|
253
|
-
info(message: string, ...args: any[]): void;
|
|
254
|
-
warn(message: string, ...args: any[]): void;
|
|
255
|
-
error(message: string, ...args: any[]): void;
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* Profile information for an app
|
|
259
|
-
*/
|
|
260
|
-
interface AppProfile {
|
|
261
|
-
/** App name (required) */
|
|
262
|
-
name: string;
|
|
263
|
-
/** Website URL (optional) */
|
|
264
|
-
website?: string;
|
|
265
|
-
/** Description (optional) */
|
|
266
|
-
description?: string;
|
|
267
|
-
/** X (Twitter) URL (optional) */
|
|
268
|
-
xURL?: string;
|
|
269
|
-
/** Path to image file (optional) */
|
|
270
|
-
imagePath?: string;
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* Profile response from API
|
|
274
|
-
*/
|
|
275
|
-
interface AppProfileResponse {
|
|
276
|
-
name: string;
|
|
277
|
-
website?: string;
|
|
278
|
-
description?: string;
|
|
279
|
-
xURL?: string;
|
|
280
|
-
imageURL?: string;
|
|
281
|
-
}
|
|
282
|
-
type ProductID = "compute";
|
|
283
|
-
type ChainID = "ethereum-mainnet" | "ethereum-sepolia";
|
|
284
|
-
type SubscriptionStatus = "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused" | "inactive";
|
|
285
|
-
interface SubscriptionLineItem {
|
|
286
|
-
description: string;
|
|
287
|
-
price: number;
|
|
288
|
-
quantity: number;
|
|
289
|
-
currency: string;
|
|
290
|
-
subtotal: number;
|
|
291
|
-
}
|
|
292
|
-
interface CreateSubscriptionResponse {
|
|
293
|
-
checkoutUrl: string;
|
|
294
|
-
}
|
|
295
|
-
interface CheckoutCreatedResponse {
|
|
296
|
-
type: "checkout_created";
|
|
297
|
-
checkoutUrl: string;
|
|
298
|
-
}
|
|
299
|
-
interface AlreadyActiveResponse {
|
|
300
|
-
type: "already_active";
|
|
301
|
-
status: SubscriptionStatus;
|
|
302
|
-
}
|
|
303
|
-
interface PaymentIssueResponse {
|
|
304
|
-
type: "payment_issue";
|
|
305
|
-
status: SubscriptionStatus;
|
|
306
|
-
portalUrl?: string;
|
|
307
|
-
}
|
|
308
|
-
type SubscribeResponse = CheckoutCreatedResponse | AlreadyActiveResponse | PaymentIssueResponse;
|
|
309
|
-
interface CancelSuccessResponse {
|
|
310
|
-
type: "canceled";
|
|
311
|
-
}
|
|
312
|
-
interface NoActiveSubscriptionResponse {
|
|
313
|
-
type: "no_active_subscription";
|
|
314
|
-
status: SubscriptionStatus;
|
|
315
|
-
}
|
|
316
|
-
type CancelResponse = CancelSuccessResponse | NoActiveSubscriptionResponse;
|
|
317
|
-
interface ProductSubscriptionResponse {
|
|
318
|
-
productId: ProductID;
|
|
319
|
-
subscriptionStatus: SubscriptionStatus;
|
|
320
|
-
currentPeriodStart?: string;
|
|
321
|
-
currentPeriodEnd?: string;
|
|
322
|
-
lineItems?: SubscriptionLineItem[];
|
|
323
|
-
upcomingInvoiceSubtotal?: number;
|
|
324
|
-
upcomingInvoiceTotal?: number;
|
|
325
|
-
creditsApplied?: number;
|
|
326
|
-
remainingCredits?: number;
|
|
327
|
-
nextCreditExpiry?: number;
|
|
328
|
-
cancelAtPeriodEnd?: boolean;
|
|
329
|
-
canceledAt?: string;
|
|
330
|
-
portalUrl?: string;
|
|
331
|
-
}
|
|
332
|
-
interface SubscriptionOpts {
|
|
333
|
-
productId?: ProductID;
|
|
334
|
-
}
|
|
335
|
-
interface BillingEnvironmentConfig {
|
|
336
|
-
billingApiServerURL: string;
|
|
337
|
-
}
|
|
338
|
-
interface BillingEnvironmentConfig {
|
|
339
|
-
billingApiServerURL: string;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
export type { AppId as A, BillingEnvironmentConfig as B, ChainID as C, DeployResult as D, EnvironmentConfig as E, CancelResponse as F, GasOpts as G, ProductSubscriptionResponse as H, ImageDigestResult as I, SubscriptionOpts as J, Logger as L, NoActiveSubscriptionResponse as N, PreparedDeploy as P, Release as R, SubscriptionStatus as S, UpgradeAppOpts as U, PreparedUpgrade as a, DeployAppOpts as b, PrepareDeployOpts as c, PrepareUpgradeOpts as d, PrepareDeployFromVerifiableBuildOpts as e, PrepareUpgradeFromVerifiableBuildOpts as f, ExecuteDeployResult as g, ExecuteUpgradeResult as h, PreparedDeployData as i, PreparedUpgradeData as j, LifecycleOpts as k, logVisibility as l, AppRecord as m, DeployOptions as n, ParsedEnvironment as o, DockerImageConfig as p, AppProfile as q, AppProfileResponse as r, ProductID as s, SubscriptionLineItem as t, CreateSubscriptionResponse as u, CheckoutCreatedResponse as v, AlreadyActiveResponse as w, PaymentIssueResponse as x, SubscribeResponse as y, CancelSuccessResponse as z };
|
package/dist/index-D2QufVB9.d.ts
DELETED
|
@@ -1,342 +0,0 @@
|
|
|
1
|
-
import { Address, Hex } from 'viem';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Core types for ECloud SDK
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
type AppId = Address;
|
|
8
|
-
type logVisibility = "public" | "private" | "off";
|
|
9
|
-
interface DeployAppOpts {
|
|
10
|
-
/** App name - required */
|
|
11
|
-
name: string;
|
|
12
|
-
/** Path to Dockerfile (if building from Dockerfile) - either this or imageRef is required */
|
|
13
|
-
dockerfile?: string;
|
|
14
|
-
/** Path to .env file - optional */
|
|
15
|
-
envFile?: string;
|
|
16
|
-
/** Image reference (registry/path:tag) - either this or dockerfile is required */
|
|
17
|
-
imageRef?: string;
|
|
18
|
-
/** Instance type SKU - required */
|
|
19
|
-
instanceType: string;
|
|
20
|
-
/** Log visibility setting - required */
|
|
21
|
-
logVisibility: logVisibility;
|
|
22
|
-
/** Optional gas params from estimation */
|
|
23
|
-
gas?: {
|
|
24
|
-
maxFeePerGas?: bigint;
|
|
25
|
-
maxPriorityFeePerGas?: bigint;
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
interface UpgradeAppOpts {
|
|
29
|
-
/** Path to Dockerfile (if building from Dockerfile) - either this or imageRef is required */
|
|
30
|
-
dockerfile?: string;
|
|
31
|
-
/** Image reference (registry/path:tag) - either this or dockerfile is required */
|
|
32
|
-
imageRef?: string;
|
|
33
|
-
/** Path to .env file - optional */
|
|
34
|
-
envFile?: string;
|
|
35
|
-
/** Instance type SKU - required */
|
|
36
|
-
instanceType: string;
|
|
37
|
-
/** Log visibility setting - required */
|
|
38
|
-
logVisibility: logVisibility;
|
|
39
|
-
gas?: {
|
|
40
|
-
maxFeePerGas?: bigint;
|
|
41
|
-
maxPriorityFeePerGas?: bigint;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
/** Options for prepareDeploy */
|
|
45
|
-
interface PrepareDeployOpts {
|
|
46
|
-
/** App name - required */
|
|
47
|
-
name: string;
|
|
48
|
-
/** Path to Dockerfile (if building from Dockerfile) */
|
|
49
|
-
dockerfile?: string;
|
|
50
|
-
/** Path to .env file - optional */
|
|
51
|
-
envFile?: string;
|
|
52
|
-
/** Image reference (registry/path:tag) */
|
|
53
|
-
imageRef?: string;
|
|
54
|
-
/** Instance type SKU - required */
|
|
55
|
-
instanceType: string;
|
|
56
|
-
/** Log visibility setting - required */
|
|
57
|
-
logVisibility: logVisibility;
|
|
58
|
-
/** Resource usage monitoring setting - optional */
|
|
59
|
-
resourceUsageMonitoring?: "enable" | "disable";
|
|
60
|
-
}
|
|
61
|
-
/** Options for prepareUpgrade */
|
|
62
|
-
interface PrepareUpgradeOpts {
|
|
63
|
-
/** Path to Dockerfile (if building from Dockerfile) */
|
|
64
|
-
dockerfile?: string;
|
|
65
|
-
/** Image reference (registry/path:tag) */
|
|
66
|
-
imageRef?: string;
|
|
67
|
-
/** Path to .env file - optional */
|
|
68
|
-
envFile?: string;
|
|
69
|
-
/** Instance type SKU - required */
|
|
70
|
-
instanceType: string;
|
|
71
|
-
/** Log visibility setting - required */
|
|
72
|
-
logVisibility: logVisibility;
|
|
73
|
-
/** Resource usage monitoring setting - optional */
|
|
74
|
-
resourceUsageMonitoring?: "enable" | "disable";
|
|
75
|
-
}
|
|
76
|
-
/** Options for prepareDeployFromVerifiableBuild */
|
|
77
|
-
interface PrepareDeployFromVerifiableBuildOpts {
|
|
78
|
-
/** App name - required */
|
|
79
|
-
name: string;
|
|
80
|
-
/** Image reference (registry/path:tag) - required */
|
|
81
|
-
imageRef: string;
|
|
82
|
-
/** Image digest (sha256:...) - required */
|
|
83
|
-
imageDigest: string;
|
|
84
|
-
/** Path to .env file - optional */
|
|
85
|
-
envFile?: string;
|
|
86
|
-
/** Instance type SKU - required */
|
|
87
|
-
instanceType: string;
|
|
88
|
-
/** Log visibility setting - required */
|
|
89
|
-
logVisibility: logVisibility;
|
|
90
|
-
/** Resource usage monitoring setting - optional */
|
|
91
|
-
resourceUsageMonitoring?: "enable" | "disable";
|
|
92
|
-
}
|
|
93
|
-
/** Options for prepareUpgradeFromVerifiableBuild */
|
|
94
|
-
interface PrepareUpgradeFromVerifiableBuildOpts {
|
|
95
|
-
/** Image reference (registry/path:tag) - required */
|
|
96
|
-
imageRef: string;
|
|
97
|
-
/** Image digest (sha256:...) - required */
|
|
98
|
-
imageDigest: string;
|
|
99
|
-
/** Path to .env file - optional */
|
|
100
|
-
envFile?: string;
|
|
101
|
-
/** Instance type SKU - required */
|
|
102
|
-
instanceType: string;
|
|
103
|
-
/** Log visibility setting - required */
|
|
104
|
-
logVisibility: logVisibility;
|
|
105
|
-
/** Resource usage monitoring setting - optional */
|
|
106
|
-
resourceUsageMonitoring?: "enable" | "disable";
|
|
107
|
-
}
|
|
108
|
-
/** Gas options for execute functions */
|
|
109
|
-
interface GasOpts {
|
|
110
|
-
maxFeePerGas?: bigint;
|
|
111
|
-
maxPriorityFeePerGas?: bigint;
|
|
112
|
-
}
|
|
113
|
-
/** Result from executeDeploy */
|
|
114
|
-
interface ExecuteDeployResult {
|
|
115
|
-
appId: AppId;
|
|
116
|
-
txHash: Hex;
|
|
117
|
-
appName: string;
|
|
118
|
-
imageRef: string;
|
|
119
|
-
}
|
|
120
|
-
/** Result from executeUpgrade */
|
|
121
|
-
interface ExecuteUpgradeResult {
|
|
122
|
-
appId: AppId;
|
|
123
|
-
txHash: Hex;
|
|
124
|
-
imageRef: string;
|
|
125
|
-
}
|
|
126
|
-
/** Data-only batch for deploy (clients provided by module) */
|
|
127
|
-
interface PreparedDeployData {
|
|
128
|
-
/** The app ID that will be deployed */
|
|
129
|
-
appId: AppId;
|
|
130
|
-
/** The salt used for deployment */
|
|
131
|
-
salt: Uint8Array;
|
|
132
|
-
/** Batch executions to be sent */
|
|
133
|
-
executions: Array<{
|
|
134
|
-
target: Address;
|
|
135
|
-
value: bigint;
|
|
136
|
-
callData: Hex;
|
|
137
|
-
}>;
|
|
138
|
-
}
|
|
139
|
-
/** Data-only batch for upgrade (clients provided by module) */
|
|
140
|
-
interface PreparedUpgradeData {
|
|
141
|
-
/** The app ID being upgraded */
|
|
142
|
-
appId: AppId;
|
|
143
|
-
/** Batch executions to be sent */
|
|
144
|
-
executions: Array<{
|
|
145
|
-
target: Address;
|
|
146
|
-
value: bigint;
|
|
147
|
-
callData: Hex;
|
|
148
|
-
}>;
|
|
149
|
-
}
|
|
150
|
-
/** Prepared deployment ready for execution */
|
|
151
|
-
interface PreparedDeploy {
|
|
152
|
-
/** The prepared data (executions, appId, etc.) */
|
|
153
|
-
data: PreparedDeployData;
|
|
154
|
-
/** App name */
|
|
155
|
-
appName: string;
|
|
156
|
-
/** Final image reference */
|
|
157
|
-
imageRef: string;
|
|
158
|
-
}
|
|
159
|
-
/** Prepared upgrade ready for execution */
|
|
160
|
-
interface PreparedUpgrade {
|
|
161
|
-
/** The prepared data (executions, appId, etc.) */
|
|
162
|
-
data: PreparedUpgradeData;
|
|
163
|
-
/** App ID being upgraded */
|
|
164
|
-
appId: AppId;
|
|
165
|
-
/** Final image reference */
|
|
166
|
-
imageRef: string;
|
|
167
|
-
}
|
|
168
|
-
interface LifecycleOpts {
|
|
169
|
-
gas?: {
|
|
170
|
-
maxFeePerGas?: bigint;
|
|
171
|
-
maxPriorityFeePerGas?: bigint;
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
interface AppRecord {
|
|
175
|
-
id: AppId;
|
|
176
|
-
owner: Address;
|
|
177
|
-
image: string;
|
|
178
|
-
status: "starting" | "running" | "stopped" | "terminated";
|
|
179
|
-
createdAt: number;
|
|
180
|
-
lastUpdatedAt: number;
|
|
181
|
-
}
|
|
182
|
-
interface DeployOptions {
|
|
183
|
-
/** Private key for signing transactions (hex string with or without 0x prefix) - optional, will prompt if not provided */
|
|
184
|
-
privateKey?: string;
|
|
185
|
-
/** RPC URL for blockchain connection - optional, uses environment default if not provided */
|
|
186
|
-
rpcUrl?: string;
|
|
187
|
-
/** Environment name (e.g., 'sepolia', 'mainnet-alpha') - optional, defaults to 'sepolia' */
|
|
188
|
-
environment?: string;
|
|
189
|
-
/** Path to Dockerfile (if building from Dockerfile) */
|
|
190
|
-
dockerfilePath?: string;
|
|
191
|
-
/** Image reference (registry/path:tag) - optional, will prompt if not provided */
|
|
192
|
-
imageRef?: string;
|
|
193
|
-
/** Path to .env file - optional, will use .env if exists or prompt */
|
|
194
|
-
envFilePath?: string;
|
|
195
|
-
/** App name - optional, will prompt if not provided */
|
|
196
|
-
appName?: string;
|
|
197
|
-
/** Instance type - optional, will prompt if not provided */
|
|
198
|
-
instanceType?: string;
|
|
199
|
-
/** Log visibility setting - optional, will prompt if not provided */
|
|
200
|
-
logVisibility?: logVisibility;
|
|
201
|
-
}
|
|
202
|
-
interface DeployResult {
|
|
203
|
-
/** App ID (contract address) */
|
|
204
|
-
appId: AppId;
|
|
205
|
-
/** App name */
|
|
206
|
-
appName: string;
|
|
207
|
-
/** Final image reference */
|
|
208
|
-
imageRef: string;
|
|
209
|
-
/** IP address (if available) */
|
|
210
|
-
ipAddress?: string;
|
|
211
|
-
/** Transaction hash */
|
|
212
|
-
txHash: Hex;
|
|
213
|
-
}
|
|
214
|
-
interface EnvironmentConfig {
|
|
215
|
-
name: string;
|
|
216
|
-
build: "dev" | "prod";
|
|
217
|
-
chainID: bigint;
|
|
218
|
-
appControllerAddress: Address;
|
|
219
|
-
permissionControllerAddress: string;
|
|
220
|
-
erc7702DelegatorAddress: string;
|
|
221
|
-
kmsServerURL: string;
|
|
222
|
-
userApiServerURL: string;
|
|
223
|
-
defaultRPCURL: string;
|
|
224
|
-
}
|
|
225
|
-
interface Release {
|
|
226
|
-
rmsRelease: {
|
|
227
|
-
artifacts: Array<{
|
|
228
|
-
digest: Uint8Array;
|
|
229
|
-
registry: string;
|
|
230
|
-
}>;
|
|
231
|
-
upgradeByTime: number;
|
|
232
|
-
};
|
|
233
|
-
publicEnv: Uint8Array;
|
|
234
|
-
encryptedEnv: Uint8Array;
|
|
235
|
-
}
|
|
236
|
-
interface ParsedEnvironment {
|
|
237
|
-
public: Record<string, string>;
|
|
238
|
-
private: Record<string, string>;
|
|
239
|
-
}
|
|
240
|
-
interface ImageDigestResult {
|
|
241
|
-
digest: Uint8Array;
|
|
242
|
-
registry: string;
|
|
243
|
-
platform: string;
|
|
244
|
-
}
|
|
245
|
-
interface DockerImageConfig {
|
|
246
|
-
cmd: string[];
|
|
247
|
-
entrypoint: string[];
|
|
248
|
-
user: string;
|
|
249
|
-
labels: Record<string, string>;
|
|
250
|
-
}
|
|
251
|
-
interface Logger {
|
|
252
|
-
debug(message: string, ...args: any[]): void;
|
|
253
|
-
info(message: string, ...args: any[]): void;
|
|
254
|
-
warn(message: string, ...args: any[]): void;
|
|
255
|
-
error(message: string, ...args: any[]): void;
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* Profile information for an app
|
|
259
|
-
*/
|
|
260
|
-
interface AppProfile {
|
|
261
|
-
/** App name (required) */
|
|
262
|
-
name: string;
|
|
263
|
-
/** Website URL (optional) */
|
|
264
|
-
website?: string;
|
|
265
|
-
/** Description (optional) */
|
|
266
|
-
description?: string;
|
|
267
|
-
/** X (Twitter) URL (optional) */
|
|
268
|
-
xURL?: string;
|
|
269
|
-
/** Path to image file (optional) */
|
|
270
|
-
imagePath?: string;
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* Profile response from API
|
|
274
|
-
*/
|
|
275
|
-
interface AppProfileResponse {
|
|
276
|
-
name: string;
|
|
277
|
-
website?: string;
|
|
278
|
-
description?: string;
|
|
279
|
-
xURL?: string;
|
|
280
|
-
imageURL?: string;
|
|
281
|
-
}
|
|
282
|
-
type ProductID = "compute";
|
|
283
|
-
type ChainID = "ethereum-mainnet" | "ethereum-sepolia";
|
|
284
|
-
type SubscriptionStatus = "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused" | "inactive";
|
|
285
|
-
interface SubscriptionLineItem {
|
|
286
|
-
description: string;
|
|
287
|
-
price: number;
|
|
288
|
-
quantity: number;
|
|
289
|
-
currency: string;
|
|
290
|
-
subtotal: number;
|
|
291
|
-
}
|
|
292
|
-
interface CreateSubscriptionResponse {
|
|
293
|
-
checkoutUrl: string;
|
|
294
|
-
}
|
|
295
|
-
interface CheckoutCreatedResponse {
|
|
296
|
-
type: "checkout_created";
|
|
297
|
-
checkoutUrl: string;
|
|
298
|
-
}
|
|
299
|
-
interface AlreadyActiveResponse {
|
|
300
|
-
type: "already_active";
|
|
301
|
-
status: SubscriptionStatus;
|
|
302
|
-
}
|
|
303
|
-
interface PaymentIssueResponse {
|
|
304
|
-
type: "payment_issue";
|
|
305
|
-
status: SubscriptionStatus;
|
|
306
|
-
portalUrl?: string;
|
|
307
|
-
}
|
|
308
|
-
type SubscribeResponse = CheckoutCreatedResponse | AlreadyActiveResponse | PaymentIssueResponse;
|
|
309
|
-
interface CancelSuccessResponse {
|
|
310
|
-
type: "canceled";
|
|
311
|
-
}
|
|
312
|
-
interface NoActiveSubscriptionResponse {
|
|
313
|
-
type: "no_active_subscription";
|
|
314
|
-
status: SubscriptionStatus;
|
|
315
|
-
}
|
|
316
|
-
type CancelResponse = CancelSuccessResponse | NoActiveSubscriptionResponse;
|
|
317
|
-
interface ProductSubscriptionResponse {
|
|
318
|
-
productId: ProductID;
|
|
319
|
-
subscriptionStatus: SubscriptionStatus;
|
|
320
|
-
currentPeriodStart?: string;
|
|
321
|
-
currentPeriodEnd?: string;
|
|
322
|
-
lineItems?: SubscriptionLineItem[];
|
|
323
|
-
upcomingInvoiceSubtotal?: number;
|
|
324
|
-
upcomingInvoiceTotal?: number;
|
|
325
|
-
creditsApplied?: number;
|
|
326
|
-
remainingCredits?: number;
|
|
327
|
-
nextCreditExpiry?: number;
|
|
328
|
-
cancelAtPeriodEnd?: boolean;
|
|
329
|
-
canceledAt?: string;
|
|
330
|
-
portalUrl?: string;
|
|
331
|
-
}
|
|
332
|
-
interface SubscriptionOpts {
|
|
333
|
-
productId?: ProductID;
|
|
334
|
-
}
|
|
335
|
-
interface BillingEnvironmentConfig {
|
|
336
|
-
billingApiServerURL: string;
|
|
337
|
-
}
|
|
338
|
-
interface BillingEnvironmentConfig {
|
|
339
|
-
billingApiServerURL: string;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
export type { AppId as A, BillingEnvironmentConfig as B, ChainID as C, DeployResult as D, EnvironmentConfig as E, CancelResponse as F, GasOpts as G, ProductSubscriptionResponse as H, ImageDigestResult as I, SubscriptionOpts as J, Logger as L, NoActiveSubscriptionResponse as N, PreparedDeploy as P, Release as R, SubscriptionStatus as S, UpgradeAppOpts as U, PreparedUpgrade as a, DeployAppOpts as b, PrepareDeployOpts as c, PrepareUpgradeOpts as d, PrepareDeployFromVerifiableBuildOpts as e, PrepareUpgradeFromVerifiableBuildOpts as f, ExecuteDeployResult as g, ExecuteUpgradeResult as h, PreparedDeployData as i, PreparedUpgradeData as j, LifecycleOpts as k, logVisibility as l, AppRecord as m, DeployOptions as n, ParsedEnvironment as o, DockerImageConfig as p, AppProfile as q, AppProfileResponse as r, ProductID as s, SubscriptionLineItem as t, CreateSubscriptionResponse as u, CheckoutCreatedResponse as v, AlreadyActiveResponse as w, PaymentIssueResponse as x, SubscribeResponse as y, CancelSuccessResponse as z };
|