@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.
- package/VERSION +2 -2
- package/dist/billing.cjs +70 -13
- package/dist/billing.cjs.map +1 -1
- package/dist/billing.d.cts +2 -1
- package/dist/billing.d.ts +2 -1
- package/dist/billing.js +70 -13
- package/dist/billing.js.map +1 -1
- package/dist/browser.cjs +1696 -140
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +5 -4
- package/dist/browser.d.ts +5 -4
- package/dist/browser.js +1695 -140
- package/dist/browser.js.map +1 -1
- package/dist/compute-B-V7Dbj9.d.cts +465 -0
- package/dist/compute-BJ_sqrKn.d.ts +465 -0
- package/dist/compute.cjs +1881 -812
- package/dist/compute.cjs.map +1 -1
- package/dist/compute.d.cts +3 -2
- package/dist/compute.d.ts +3 -2
- package/dist/compute.js +1869 -800
- package/dist/compute.js.map +1 -1
- package/dist/{helpers-NGE0oIa9.d.ts → helpers-CkcuSkNM.d.ts} +17 -191
- package/dist/{helpers-0Tz3MuQK.d.cts → helpers-fmu7es2L.d.cts} +17 -191
- package/dist/{index-DFqQ7v8_.d.cts → index-BVnxNfqb.d.cts} +65 -3
- package/dist/{index-DFqQ7v8_.d.ts → index-BVnxNfqb.d.ts} +65 -3
- package/dist/index.cjs +2013 -803
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +72 -240
- package/dist/index.d.ts +72 -240
- package/dist/index.js +1992 -788
- package/dist/index.js.map +1 -1
- package/dist/validation-D3yIUF-Z.d.cts +167 -0
- package/dist/validation-D3yIUF-Z.d.ts +167 -0
- package/package.json +4 -5
- package/dist/compute-DfFZvbPD.d.cts +0 -194
- package/dist/compute-GcTgGp_x.d.ts +0 -194
- package/tools/ecloud-drain-watcher-linux-amd64 +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { C as ComputeModule } from './compute-
|
|
2
|
-
export { a as ComputeModuleConfig, b as CreateAppOpts, L as LogsOptions, P as PRIMARY_LANGUAGES, S as SDKCreateAppOpts,
|
|
1
|
+
import { C as ComputeModule } from './compute-B-V7Dbj9.cjs';
|
|
2
|
+
export { a as ComputeModuleConfig, b as CreateAppOpts, L as LogsOptions, P as PRIMARY_LANGUAGES, c as PrepareDeployResult, d as PrepareUpgradeResult, S as SDKCreateAppOpts, e as SDKDeployOptions, f as SDKUpgradeOptions, W as WatchDeploymentOptions, g as WatchUpgradeOptions, h as createApp, i as createComputeModule, j as encodeStartAppData, k as encodeStopAppData, l as encodeTerminateAppData, m as executeDeploy, n as executeUpgrade, o as getAvailableTemplates, p as logs, q as prepareDeploy, r as prepareDeployFromVerifiableBuild, s as prepareUpgrade, t as prepareUpgradeFromVerifiableBuild, w as watchDeployment, u as watchUpgrade } from './compute-B-V7Dbj9.cjs';
|
|
3
3
|
import { BillingModule } from './billing.cjs';
|
|
4
4
|
export { BillingChain, BillingModuleConfig, TopUpInfo, TopUpOpts, TopUpResult, createBillingModule } from './billing.cjs';
|
|
5
|
-
import { WalletClient,
|
|
5
|
+
import { WalletClient, Address, PublicClient, Hex } from 'viem';
|
|
6
6
|
export { AttestClient, AttestClientConfig, JwtProvider } from './attest.cjs';
|
|
7
|
-
import {
|
|
8
|
-
export {
|
|
9
|
-
|
|
10
|
-
export {
|
|
7
|
+
import { L as GasEstimate, p as CreateCouponResponse, T as ListCouponsResponse, N as GetCouponResponse, a as AddAdminResponse, S as ListAdminsResponse, F as EnvironmentConfig, U as Logger } from './index-BVnxNfqb.cjs';
|
|
8
|
+
export { b as AdminCoupon, c as AdminUser, d as AlreadyActiveResponse, f as AppControllerAbiVersion, A as AppId, g as AppProfile, h as AppProfileResponse, i as AppRecord, j as BillingEnvironmentConfig, k as CancelResponse, l as CancelSuccessResponse, m as ChainID, n as CheckoutCreatedResponse, o as ContainerPolicy, q as CreateSubscriptionOptions, r as CreateSubscriptionResponse, s as CreditPurchaseResponse, t as DeployAppOpts, u as DeployOptions, v as DeployProgressCallback, w as DeployResult, x as DeployStep, y as DockerImageConfig, E as EMPTY_CONTAINER_POLICY, z as EnvVar, G as EstimateGasOptions, I as ExecuteDeployResult, K as ExecuteUpgradeResult, M as GasOpts, O as GetSubscriptionOptions, P as ImageDigestResult, R as LifecycleOpts, V as NoActiveSubscriptionResponse, W as ParsedEnvironment, X as PaymentIssueResponse, Y as PaymentMethod, Z as PaymentMethodsResponse, $ as PrepareDeployFromVerifiableBuildOpts, a0 as PrepareDeployOpts, a2 as PrepareUpgradeFromVerifiableBuildOpts, a3 as PrepareUpgradeOpts, a4 as PreparedDeploy, a6 as PreparedDeployData, a7 as PreparedUpgrade, a9 as PreparedUpgradeData, aa as ProductID, ab as ProductSubscriptionResponse, ac as RedeemCouponResponse, ad as Release, af as SequentialDeployResult, ag as SubscribeResponse, ah as SubscriptionLineItem, ai as SubscriptionOpts, aj as SubscriptionStatus, an as UpgradeAppOpts, ao as calculateAppID, aq as estimateTransactionGas, av as formatETH, ax as getAllAppsByDeveloper, aO as getAppLatestReleaseBlockNumbers, ay as getAppsByBillingAccount, aB as getBillingType, aP as getBlockTimestamps, aE as logVisibility, aF as noopLogger } from './index-BVnxNfqb.cjs';
|
|
9
|
+
export { A as AppInfo, d as AppMetrics, e as AppProfileInfo, $ as AppRelease, a0 as AppReleaseBuild, a1 as AppResponse, a2 as BASE_SEPOLIA_CHAIN_ID, B as BillingApiClient, C as ComputeApiConfig, E as EstimateBatchGasOptions, G as GeneratedKey, L as LoginRequest, n as LoginResult, a as SessionError, S as SessionInfo, b as SiweMessageParams, o as SiweMessageResult, U as UserApiClient, q as addHexPrefix, r as checkERC7702Delegation, s as createSiweMessage, a3 as createViemClients, t as estimateBatchGas, v as generateNewPrivateKey, w as generateNonce, x as getAvailableEnvironments, z as getBillingEnvironmentConfig, D as getBuildType, F as getChainFromID, H as getComputeApiSession, I as getEnvironmentConfig, K as isEnvironmentAvailable, M as isMainnet, N as isSessionValid, O as isSiweMessageExpired, P as isSiweMessageNotYetValid, Q as isSubscriptionActive, V as loginToComputeApi, Y as logoutFromComputeApi, Z as parseSiweMessage, _ as stripHexPrefix } from './helpers-fmu7es2L.cjs';
|
|
10
|
+
export { C as CreateAppParams, D as DeployParams, L as LogVisibility, a as LogsParams, R as ResourceUsageMonitoring, U as UpgradeParams, q as assertValidFilePath, b as assertValidImageReference, c as assertValidPrivateKey, e as extractAppNameFromImage, s as sanitizeString, d as sanitizeURL, f as sanitizeXURL, v as validateAppID, g as validateAppName, h as validateCreateAppParams, r as validateDeployParams, i as validateDescription, t as validateFilePath, u as validateImagePath, j as validateImageReference, k as validateInstanceTypeSKU, l as validateLogVisibility, m as validateLogsParams, n as validatePrivateKeyFormat, w as validateResourceUsageMonitoring, o as validateURL, x as validateUpgradeParams, p as validateXURL } from './validation-D3yIUF-Z.cjs';
|
|
11
11
|
|
|
12
12
|
interface SubmitBuildRequest {
|
|
13
13
|
repoUrl: string;
|
|
@@ -146,255 +146,87 @@ interface BuildModule {
|
|
|
146
146
|
declare function createBuildModule(config: BuildModuleConfig): BuildModule;
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
|
-
*
|
|
149
|
+
* Contract watcher
|
|
150
150
|
*
|
|
151
|
-
*
|
|
152
|
-
* It orchestrates all the steps: build, push, encrypt, and deploy on-chain.
|
|
153
|
-
*
|
|
154
|
-
* NOTE: This SDK function is non-interactive. All required parameters must be
|
|
155
|
-
* provided explicitly. Use the CLI for interactive parameter collection.
|
|
151
|
+
* Watches app status until it reaches Running state using UserAPI.
|
|
156
152
|
*/
|
|
157
153
|
|
|
154
|
+
declare const WATCH_DEFAULT_TIMEOUT_SECONDS: number;
|
|
158
155
|
/**
|
|
159
|
-
*
|
|
156
|
+
* Typed error thrown when watch loops exceed their timeout budget.
|
|
160
157
|
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
*/
|
|
164
|
-
interface SDKDeployOptions {
|
|
165
|
-
/** Wallet client for signing transactions */
|
|
166
|
-
walletClient: WalletClient;
|
|
167
|
-
/** Public client for reading blockchain state */
|
|
168
|
-
publicClient: PublicClient;
|
|
169
|
-
/** Environment name (e.g., 'sepolia', 'mainnet-alpha') - defaults to 'sepolia' */
|
|
170
|
-
environment?: string;
|
|
171
|
-
/** Path to Dockerfile (if building from Dockerfile) - either this or imageRef is required */
|
|
172
|
-
dockerfilePath?: string;
|
|
173
|
-
/** Image reference (registry/path:tag) - either this or dockerfilePath is required */
|
|
174
|
-
imageRef?: string;
|
|
175
|
-
/** Path to .env file - optional */
|
|
176
|
-
envFilePath?: string;
|
|
177
|
-
/** App name - required */
|
|
178
|
-
appName: string;
|
|
179
|
-
/** Instance type SKU - required */
|
|
180
|
-
instanceType: string;
|
|
181
|
-
/** Log visibility setting - required */
|
|
182
|
-
logVisibility: LogVisibility;
|
|
183
|
-
/** Resource usage monitoring setting - optional, defaults to 'enable' */
|
|
184
|
-
resourceUsageMonitoring?: ResourceUsageMonitoring;
|
|
185
|
-
/** Billing mode: developer (default) or app (isolated billing) */
|
|
186
|
-
billTo?: "developer" | "app";
|
|
187
|
-
/** Skip quota check */
|
|
188
|
-
skipQuotaCheck?: boolean;
|
|
189
|
-
/** Optional salt for deterministic app address prediction (32 bytes) */
|
|
190
|
-
salt?: Uint8Array | Buffer;
|
|
191
|
-
/** Optional gas params from estimation (use result from prepareDeploy) */
|
|
192
|
-
gas?: GasEstimate;
|
|
193
|
-
/** Skip telemetry (used when called from CLI) - optional */
|
|
194
|
-
skipTelemetry?: boolean;
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Result from prepareDeploy - includes prepared batch and gas estimate
|
|
158
|
+
* Callers (e.g. the CLI) can catch this specifically to surface a
|
|
159
|
+
* troubleshooting hint without treating it as a generic failure.
|
|
198
160
|
*/
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
environmentConfig: EnvironmentConfig;
|
|
212
|
-
};
|
|
213
|
-
gas?: GasEstimate;
|
|
214
|
-
logger?: Logger;
|
|
215
|
-
skipTelemetry?: boolean;
|
|
161
|
+
declare class WatchTimeoutError extends Error {
|
|
162
|
+
readonly appId: string;
|
|
163
|
+
readonly elapsedSeconds: number;
|
|
164
|
+
readonly lastStatus: string | undefined;
|
|
165
|
+
readonly timeoutSeconds: number;
|
|
166
|
+
constructor(args: {
|
|
167
|
+
appId: string;
|
|
168
|
+
elapsedSeconds: number;
|
|
169
|
+
lastStatus: string | undefined;
|
|
170
|
+
timeoutSeconds: number;
|
|
171
|
+
message?: string;
|
|
172
|
+
});
|
|
216
173
|
}
|
|
174
|
+
|
|
217
175
|
/**
|
|
218
|
-
*
|
|
176
|
+
* Thrown when the wallet's native ETH balance is below the estimated on-chain
|
|
177
|
+
* gas cost for a deploy/upgrade.
|
|
219
178
|
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
179
|
+
* Compute credits (Stripe / USDC-converted) do NOT pay on-chain gas — gas is
|
|
180
|
+
* paid by the user's EOA at send time via EIP-7702. Without this pre-flight the
|
|
181
|
+
* transaction reverts only after submission, which to an agent is
|
|
182
|
+
* indistinguishable from other failures.
|
|
222
183
|
*/
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
/** Path to .env file - optional */
|
|
235
|
-
envFilePath?: string;
|
|
236
|
-
/** App name - required */
|
|
237
|
-
appName: string;
|
|
238
|
-
/** Instance type SKU - required */
|
|
239
|
-
instanceType: string;
|
|
240
|
-
/** Log visibility setting - required */
|
|
241
|
-
logVisibility: LogVisibility;
|
|
242
|
-
/** Resource usage monitoring setting - optional, defaults to 'enable' */
|
|
243
|
-
resourceUsageMonitoring?: ResourceUsageMonitoring;
|
|
244
|
-
/** Billing mode: developer (default) or app (isolated billing) */
|
|
245
|
-
billTo?: "developer" | "app";
|
|
246
|
-
/** Skip quota check */
|
|
247
|
-
skipQuotaCheck?: boolean;
|
|
248
|
-
/** Skip telemetry (used when called from CLI) - optional */
|
|
249
|
-
skipTelemetry?: boolean;
|
|
184
|
+
declare class InsufficientGasError extends Error {
|
|
185
|
+
readonly address: Address;
|
|
186
|
+
readonly requiredWei: bigint;
|
|
187
|
+
readonly availableWei: bigint;
|
|
188
|
+
readonly requiredEth: string;
|
|
189
|
+
readonly availableEth: string;
|
|
190
|
+
constructor(args: {
|
|
191
|
+
address: Address;
|
|
192
|
+
requiredWei: bigint;
|
|
193
|
+
availableWei: bigint;
|
|
194
|
+
});
|
|
250
195
|
}
|
|
251
196
|
/**
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
* - imageRef (tagged image URL)
|
|
256
|
-
* - imageDigest (sha256:... digest)
|
|
257
|
-
*
|
|
258
|
-
* Flow is the same as prepareDeploy, except:
|
|
259
|
-
* - Skips ensureDockerIsRunning()
|
|
260
|
-
* - Skips prepareRelease() image layering and digest extraction
|
|
261
|
-
* - Uses provided imageDigest + derived registry name to construct the Release struct
|
|
262
|
-
*/
|
|
263
|
-
declare function prepareDeployFromVerifiableBuild(options: VerifiableBuildOptions, logger?: Logger): Promise<PrepareDeployResult>;
|
|
264
|
-
/**
|
|
265
|
-
* Prepare deployment - does all work up to the transaction
|
|
266
|
-
*
|
|
267
|
-
* This allows CLI to:
|
|
268
|
-
* 1. Call prepareDeploy to build image, prepare release, get gas estimate
|
|
269
|
-
* 2. Prompt user to confirm the cost
|
|
270
|
-
* 3. Call executeDeploy with confirmed gas params
|
|
271
|
-
*/
|
|
272
|
-
declare function prepareDeploy(options: Omit<SDKDeployOptions, "gas"> & {
|
|
273
|
-
skipTelemetry?: boolean;
|
|
274
|
-
}, logger?: Logger): Promise<PrepareDeployResult>;
|
|
275
|
-
/**
|
|
276
|
-
* Execute a prepared deployment
|
|
277
|
-
*
|
|
278
|
-
* Call this after prepareDeploy and user confirmation.
|
|
279
|
-
* Note: This only submits the on-chain transaction. Call watchDeployment separately
|
|
280
|
-
* to wait for the app to be running.
|
|
281
|
-
*/
|
|
282
|
-
declare function executeDeploy(options: ExecuteDeployOptions): Promise<DeployResult>;
|
|
283
|
-
/**
|
|
284
|
-
* Watch a deployment until the app is running
|
|
285
|
-
*
|
|
286
|
-
* Call this after executeDeploy to wait for the app to be provisioned.
|
|
287
|
-
* Can be called separately to allow for intermediate operations (e.g., profile upload).
|
|
288
|
-
*/
|
|
289
|
-
declare function watchDeployment(appId: string, walletClient: WalletClient, publicClient: PublicClient, environmentConfig: EnvironmentConfig, logger?: Logger, skipTelemetry?: boolean): Promise<string | undefined>;
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Main upgrade function
|
|
293
|
-
*
|
|
294
|
-
* This is the main entry point for upgrading existing applications on ecloud TEE.
|
|
295
|
-
* It orchestrates all the steps: build, push, encrypt, and upgrade on-chain.
|
|
296
|
-
*
|
|
297
|
-
* NOTE: This SDK function is non-interactive. All required parameters must be
|
|
298
|
-
* provided explicitly. Use the CLI for interactive parameter collection.
|
|
197
|
+
* Pre-flight gate: throw {@link InsufficientGasError} when the wallet's ETH
|
|
198
|
+
* balance is below the estimated gas cost. The threshold is the gas estimate
|
|
199
|
+
* (`maxCostWei`), not zero — dust below the cost must still fail.
|
|
299
200
|
*/
|
|
201
|
+
declare function assertSufficientGas(args: {
|
|
202
|
+
publicClient: PublicClient;
|
|
203
|
+
address: Address;
|
|
204
|
+
gasEstimate: GasEstimate;
|
|
205
|
+
}): Promise<void>;
|
|
300
206
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
207
|
+
interface AdminModule {
|
|
208
|
+
address: Address;
|
|
209
|
+
createCoupon: (amountCents: number) => Promise<CreateCouponResponse>;
|
|
210
|
+
listCoupons: (opts?: {
|
|
211
|
+
offset?: number;
|
|
212
|
+
limit?: number;
|
|
213
|
+
active?: boolean;
|
|
214
|
+
redeemed?: boolean;
|
|
215
|
+
}) => Promise<ListCouponsResponse>;
|
|
216
|
+
getCoupon: (id: string) => Promise<GetCouponResponse>;
|
|
217
|
+
deactivateCoupon: (id: string) => Promise<void>;
|
|
218
|
+
redeemCouponForUser: (id: string, address: string) => Promise<void>;
|
|
219
|
+
addAdmin: (address: string) => Promise<AddAdminResponse>;
|
|
220
|
+
removeAdmin: (address: string) => Promise<void>;
|
|
221
|
+
listAdmins: () => Promise<ListAdminsResponse>;
|
|
222
|
+
}
|
|
223
|
+
interface AdminModuleConfig {
|
|
224
|
+
verbose?: boolean;
|
|
308
225
|
walletClient: WalletClient;
|
|
309
|
-
/** Public client for reading blockchain state */
|
|
310
226
|
publicClient: PublicClient;
|
|
311
|
-
|
|
312
|
-
environment?: string;
|
|
313
|
-
/** Path to Dockerfile (if building from Dockerfile) - either this or imageRef is required */
|
|
314
|
-
dockerfilePath?: string;
|
|
315
|
-
/** Image reference (registry/path:tag) - either this or dockerfilePath is required */
|
|
316
|
-
imageRef?: string;
|
|
317
|
-
/** Path to .env file - optional */
|
|
318
|
-
envFilePath?: string;
|
|
319
|
-
/** Instance type SKU - required */
|
|
320
|
-
instanceType: string;
|
|
321
|
-
/** Log visibility setting - required */
|
|
322
|
-
logVisibility: LogVisibility;
|
|
323
|
-
/** Resource usage monitoring setting - optional, defaults to 'enable' */
|
|
324
|
-
resourceUsageMonitoring?: ResourceUsageMonitoring;
|
|
325
|
-
/** Optional gas params from estimation (use result from prepareUpgrade) */
|
|
326
|
-
gas?: GasEstimate;
|
|
327
|
-
/** Skip telemetry (used when called from CLI) - optional */
|
|
328
|
-
skipTelemetry?: boolean;
|
|
329
|
-
}
|
|
330
|
-
interface UpgradeResult {
|
|
331
|
-
/** App ID (contract address) */
|
|
332
|
-
appId: AppId;
|
|
333
|
-
/** Final image reference */
|
|
334
|
-
imageRef: string;
|
|
335
|
-
/** Transaction hash */
|
|
336
|
-
txHash: Hex;
|
|
337
|
-
}
|
|
338
|
-
/**
|
|
339
|
-
* Result from prepareUpgrade - includes prepared batch and gas estimate
|
|
340
|
-
*/
|
|
341
|
-
interface PrepareUpgradeResult {
|
|
342
|
-
/** Prepared upgrade state */
|
|
343
|
-
prepared: PreparedUpgrade;
|
|
344
|
-
/** Gas estimate for the batch transaction */
|
|
345
|
-
gasEstimate: GasEstimate;
|
|
346
|
-
}
|
|
347
|
-
/** Options for executing a prepared upgrade */
|
|
348
|
-
interface ExecuteUpgradeOptions {
|
|
349
|
-
prepared: PreparedUpgrade;
|
|
350
|
-
context: {
|
|
351
|
-
walletClient: WalletClient;
|
|
352
|
-
publicClient: PublicClient;
|
|
353
|
-
environmentConfig: EnvironmentConfig;
|
|
354
|
-
};
|
|
355
|
-
gas?: GasEstimate;
|
|
356
|
-
logger?: Logger;
|
|
357
|
-
skipTelemetry?: boolean;
|
|
227
|
+
environment: string;
|
|
358
228
|
}
|
|
359
|
-
|
|
360
|
-
* Prepare an upgrade from a pre-built image (already layered) without using Docker locally.
|
|
361
|
-
*
|
|
362
|
-
* Intended for verifiable builds: build service provides imageRef + imageDigest (sha256:...).
|
|
363
|
-
* This skips:
|
|
364
|
-
* - ensureDockerIsRunning()
|
|
365
|
-
* - prepareRelease() layering/digest extraction
|
|
366
|
-
*/
|
|
367
|
-
declare function prepareUpgradeFromVerifiableBuild(options: Omit<SDKUpgradeOptions, "gas" | "dockerfilePath" | "imageRef"> & {
|
|
368
|
-
imageRef: string;
|
|
369
|
-
imageDigest: string;
|
|
370
|
-
skipTelemetry?: boolean;
|
|
371
|
-
}, logger?: Logger): Promise<PrepareUpgradeResult>;
|
|
372
|
-
/**
|
|
373
|
-
* Prepare upgrade - does all work up to the transaction
|
|
374
|
-
*
|
|
375
|
-
* This allows CLI to:
|
|
376
|
-
* 1. Call prepareUpgrade to build image, prepare release, get gas estimate
|
|
377
|
-
* 2. Prompt user to confirm the cost
|
|
378
|
-
* 3. Call executeUpgrade with confirmed gas params
|
|
379
|
-
*/
|
|
380
|
-
declare function prepareUpgrade(options: Omit<SDKUpgradeOptions, "gas"> & {
|
|
381
|
-
skipTelemetry?: boolean;
|
|
382
|
-
}, logger?: Logger): Promise<PrepareUpgradeResult>;
|
|
383
|
-
/**
|
|
384
|
-
* Execute a prepared upgrade
|
|
385
|
-
*
|
|
386
|
-
* Call this after prepareUpgrade and user confirmation.
|
|
387
|
-
* Note: This only submits the on-chain transaction. Call watchUpgrade separately
|
|
388
|
-
* to wait for the upgrade to complete.
|
|
389
|
-
*/
|
|
390
|
-
declare function executeUpgrade(options: ExecuteUpgradeOptions): Promise<UpgradeResult>;
|
|
391
|
-
/**
|
|
392
|
-
* Watch an upgrade until it completes
|
|
393
|
-
*
|
|
394
|
-
* Call this after executeUpgrade to wait for the upgrade to finish.
|
|
395
|
-
* Can be called separately to allow for intermediate operations.
|
|
396
|
-
*/
|
|
397
|
-
declare function watchUpgrade(appId: string, walletClient: WalletClient, publicClient: PublicClient, environmentConfig: EnvironmentConfig, logger?: Logger, skipTelemetry?: boolean): Promise<void>;
|
|
229
|
+
declare function createAdminModule(config: AdminModuleConfig): AdminModule;
|
|
398
230
|
|
|
399
231
|
/**
|
|
400
232
|
* OS Keyring Integration
|
|
@@ -939,4 +771,4 @@ interface ECloudClient {
|
|
|
939
771
|
}
|
|
940
772
|
declare function createECloudClient(cfg: ClientConfig): ECloudClient;
|
|
941
773
|
|
|
942
|
-
export { type
|
|
774
|
+
export { AddAdminResponse, type AdminModule, type AdminModuleConfig, type AppEnvironment, AuthRequiredError, BUILD_STATUS, BadRequestError, BillingModule, type Build, BuildError, BuildFailedError, type BuildModule, type BuildModuleConfig, type BuildProgress, type BuildStatus, type ClientConfig, ComputeModule, ConflictError, CreateCouponResponse, type ECloudClient, ERC20 as ERC20ABI, type Environment, EnvironmentConfig, ForbiddenError, GasEstimate, GetCouponResponse, InsufficientGasError, type LegacyKey, ListAdminsResponse, ListCouponsResponse, type LogChunk, Logger, type Metric, type MetricsContext, NoopClient, NotFoundError, PostHogClient, type PrivateKeySource, type StoredKey, type SubmitBuildRequest, type SubmitBuildResponse, type TelemetryClient, type TelemetryClientOptions, type TelemetryWrapperOptions, TimeoutError, USDCCredits as USDCCreditsABI, type VerifyProvenanceFailure, type VerifyProvenanceResult, type VerifyProvenanceSuccess, WATCH_DEFAULT_TIMEOUT_SECONDS, WatchTimeoutError, addMetric, addMetricWithDimensions, assertSufficientGas, createAdminModule, createAppEnvironment, createBuildModule, createECloudClient, createMetricsContext, createTelemetryClient, deleteLegacyPrivateKey, deletePrivateKey, emitMetrics, fetchTemplateCatalog, getAddressFromPrivateKey, getCategoryDescriptions, getCurrentInstanceType, getLegacyKeys, getLegacyPrivateKey, getPostHogAPIKey, getPostHogEndpoint, getPrivateKey, getPrivateKeyWithSource, getTemplate, isNoopClient, keyExists, listStoredKeys, requirePrivateKey, storePrivateKey, validatePrivateKey, withSDKTelemetry };
|