@layr-labs/ecloud-sdk 0.1.2 → 0.2.0-dev.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/VERSION +2 -2
- package/dist/billing.cjs +1 -1
- package/dist/billing.cjs.map +1 -1
- package/dist/billing.d.cts +1 -1
- package/dist/billing.d.ts +1 -1
- package/dist/billing.js +2 -2
- package/dist/{chunk-AOZRDBLK.js → chunk-FY7UU55U.js} +107 -31
- package/dist/chunk-FY7UU55U.js.map +1 -0
- package/dist/{chunk-4RG5IMZ7.js → chunk-GB4GM4C2.js} +2 -2
- package/dist/{chunk-MQ2NGP4C.js → chunk-O7EU5JL7.js} +312 -55
- package/dist/chunk-O7EU5JL7.js.map +1 -0
- package/dist/{compute-BlUpqWKo.d.cts → compute-CF2HOXed.d.ts} +9 -1
- package/dist/{compute-CottWiST.d.ts → compute-CbmjA8kJ.d.cts} +9 -1
- package/dist/compute.cjs +387 -47
- 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 +2 -2
- package/dist/{index-Fb_S-Cqk.d.ts → index-D2QufVB9.d.cts} +33 -1
- package/dist/{index-Fb_S-Cqk.d.cts → index-D2QufVB9.d.ts} +33 -1
- package/dist/index.cjs +769 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +314 -98
- package/dist/index.d.ts +314 -98
- package/dist/index.js +376 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-AOZRDBLK.js.map +0 -1
- package/dist/chunk-MQ2NGP4C.js.map +0 -1
- /package/dist/{chunk-4RG5IMZ7.js.map → chunk-GB4GM4C2.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,142 @@
|
|
|
1
|
-
import { G as GasEstimate, C as ComputeModule } from './compute-
|
|
2
|
-
export { e as ComputeModuleConfig, a as CreateAppOpts, E as EstimateGasOptions, L as LogsOptions, P as PRIMARY_LANGUAGES, S as SDKCreateAppOpts, b as SDKLogsOptions, c as createApp, d as createComputeModule, f as encodeStartAppData, h as encodeStopAppData, i as encodeTerminateAppData, n as estimateTransactionGas, o as formatETH, j as getAllAppsByDeveloper, k as getAppLatestReleaseBlockNumbers, g as getAvailableTemplates, m as getBlockTimestamps, l as logs } from './compute-
|
|
1
|
+
import { G as GasEstimate, C as ComputeModule } from './compute-CF2HOXed.js';
|
|
2
|
+
export { e as ComputeModuleConfig, a as CreateAppOpts, E as EstimateGasOptions, L as LogsOptions, P as PRIMARY_LANGUAGES, S as SDKCreateAppOpts, b as SDKLogsOptions, c as createApp, d as createComputeModule, f as encodeStartAppData, h as encodeStopAppData, i as encodeTerminateAppData, n as estimateTransactionGas, o as formatETH, j as getAllAppsByDeveloper, k as getAppLatestReleaseBlockNumbers, g as getAvailableTemplates, m as getBlockTimestamps, l as logs } from './compute-CF2HOXed.js';
|
|
3
3
|
import { BillingModule } from './billing.js';
|
|
4
4
|
export { BillingModuleConfig, createBillingModule } from './billing.js';
|
|
5
|
-
import { Address, WalletClient, PublicClient,
|
|
6
|
-
import {
|
|
7
|
-
export {
|
|
5
|
+
import { Address, Hex, WalletClient, PublicClient, PrivateKeyAccount } from 'viem';
|
|
6
|
+
import { E as EnvironmentConfig, S as SubscriptionStatus, L as Logger, P as PreparedDeploy, D as DeployResult, a as PreparedUpgrade, A as AppId } from './index-D2QufVB9.js';
|
|
7
|
+
export { w as AlreadyActiveResponse, q as AppProfile, r as AppProfileResponse, m as AppRecord, B as BillingEnvironmentConfig, F as CancelResponse, z as CancelSuccessResponse, C as ChainID, v as CheckoutCreatedResponse, u as CreateSubscriptionResponse, b as DeployAppOpts, n as DeployOptions, p as DockerImageConfig, g as ExecuteDeployResult, h as ExecuteUpgradeResult, G as GasOpts, I as ImageDigestResult, k as LifecycleOpts, N as NoActiveSubscriptionResponse, o as ParsedEnvironment, x as PaymentIssueResponse, e as PrepareDeployFromVerifiableBuildOpts, c as PrepareDeployOpts, f as PrepareUpgradeFromVerifiableBuildOpts, d as PrepareUpgradeOpts, i as PreparedDeployData, j as PreparedUpgradeData, s as ProductID, H as ProductSubscriptionResponse, R as Release, y as SubscribeResponse, t as SubscriptionLineItem, J as SubscriptionOpts, U as UpgradeAppOpts, l as logVisibility } from './index-D2QufVB9.js';
|
|
8
|
+
|
|
9
|
+
interface SubmitBuildRequest {
|
|
10
|
+
repoUrl: string;
|
|
11
|
+
gitRef: string;
|
|
12
|
+
dockerfilePath?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Path to a Caddyfile within the repository (relative to buildContextPath).
|
|
15
|
+
* If omitted, the build service will not copy a Caddyfile into the image.
|
|
16
|
+
*/
|
|
17
|
+
caddyfilePath?: string;
|
|
18
|
+
buildContextPath?: string;
|
|
19
|
+
dependencies?: string[];
|
|
20
|
+
}
|
|
21
|
+
interface SubmitBuildResponse {
|
|
22
|
+
buildId: string;
|
|
23
|
+
}
|
|
24
|
+
declare const BUILD_STATUS: {
|
|
25
|
+
readonly BUILDING: "building";
|
|
26
|
+
readonly SUCCESS: "success";
|
|
27
|
+
readonly FAILED: "failed";
|
|
28
|
+
};
|
|
29
|
+
type BuildStatus = (typeof BUILD_STATUS)[keyof typeof BUILD_STATUS];
|
|
30
|
+
interface Build {
|
|
31
|
+
buildId: string;
|
|
32
|
+
billingAddress: string;
|
|
33
|
+
repoUrl: string;
|
|
34
|
+
gitRef: string;
|
|
35
|
+
status: BuildStatus;
|
|
36
|
+
/** 'application' | 'dependency' (as returned by the API) */
|
|
37
|
+
buildType: string;
|
|
38
|
+
imageName: string;
|
|
39
|
+
imageUrl?: string;
|
|
40
|
+
imageDigest?: string;
|
|
41
|
+
provenanceJson?: Record<string, unknown>;
|
|
42
|
+
provenanceSignature?: string;
|
|
43
|
+
errorMessage?: string;
|
|
44
|
+
createdAt: string;
|
|
45
|
+
updatedAt: string;
|
|
46
|
+
dependencies?: Record<string, Build>;
|
|
47
|
+
}
|
|
48
|
+
type VerifyProvenanceResult = VerifyProvenanceSuccess | VerifyProvenanceFailure;
|
|
49
|
+
interface VerifyProvenanceSuccess {
|
|
50
|
+
status: "verified";
|
|
51
|
+
buildId: string;
|
|
52
|
+
imageUrl: string;
|
|
53
|
+
imageDigest: string;
|
|
54
|
+
repoUrl: string;
|
|
55
|
+
gitRef: string;
|
|
56
|
+
provenanceJson: Record<string, unknown>;
|
|
57
|
+
provenanceSignature: string;
|
|
58
|
+
payloadType: string;
|
|
59
|
+
payload: string;
|
|
60
|
+
}
|
|
61
|
+
interface VerifyProvenanceFailure {
|
|
62
|
+
status: "failed";
|
|
63
|
+
error: string;
|
|
64
|
+
buildId?: string;
|
|
65
|
+
}
|
|
66
|
+
interface LogChunk {
|
|
67
|
+
content: string;
|
|
68
|
+
totalLength: number;
|
|
69
|
+
isComplete: boolean;
|
|
70
|
+
finalStatus?: BuildStatus;
|
|
71
|
+
}
|
|
72
|
+
interface BuildProgress {
|
|
73
|
+
build: Build;
|
|
74
|
+
logs: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
declare class BuildError extends Error {
|
|
78
|
+
constructor(message: string);
|
|
79
|
+
}
|
|
80
|
+
declare class AuthRequiredError extends BuildError {
|
|
81
|
+
constructor(message?: string);
|
|
82
|
+
}
|
|
83
|
+
declare class BuildFailedError extends BuildError {
|
|
84
|
+
readonly buildId: string;
|
|
85
|
+
constructor(message: string, buildId: string);
|
|
86
|
+
}
|
|
87
|
+
declare class ConflictError extends BuildError {
|
|
88
|
+
constructor(message?: string);
|
|
89
|
+
}
|
|
90
|
+
declare class NotFoundError extends BuildError {
|
|
91
|
+
constructor(message?: string);
|
|
92
|
+
}
|
|
93
|
+
declare class ForbiddenError extends BuildError {
|
|
94
|
+
constructor(message?: string);
|
|
95
|
+
}
|
|
96
|
+
declare class TimeoutError extends BuildError {
|
|
97
|
+
constructor(message?: string);
|
|
98
|
+
}
|
|
99
|
+
declare class BadRequestError extends BuildError {
|
|
100
|
+
constructor(message?: string);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Build module entry point (verifiable builds + provenance)
|
|
105
|
+
*/
|
|
106
|
+
|
|
107
|
+
interface BuildModuleConfig {
|
|
108
|
+
privateKey?: string;
|
|
109
|
+
environment?: string;
|
|
110
|
+
verbose?: boolean;
|
|
111
|
+
clientId?: string;
|
|
112
|
+
skipTelemetry?: boolean;
|
|
113
|
+
}
|
|
114
|
+
interface BuildModule {
|
|
115
|
+
submit(request: SubmitBuildRequest): Promise<SubmitBuildResponse>;
|
|
116
|
+
getLogs(buildId: string): Promise<string>;
|
|
117
|
+
list(options: {
|
|
118
|
+
billingAddress: string;
|
|
119
|
+
limit?: number;
|
|
120
|
+
offset?: number;
|
|
121
|
+
}): Promise<Build[]>;
|
|
122
|
+
get(buildId: string): Promise<Build>;
|
|
123
|
+
getByDigest(digest: string): Promise<Build>;
|
|
124
|
+
verify(identifier: string): Promise<VerifyProvenanceResult>;
|
|
125
|
+
submitAndWait(request: SubmitBuildRequest, options?: {
|
|
126
|
+
onLog?: (chunk: string) => void;
|
|
127
|
+
onProgress?: (progress: BuildProgress) => void;
|
|
128
|
+
pollIntervalMs?: number;
|
|
129
|
+
timeoutMs?: number;
|
|
130
|
+
}): Promise<Build>;
|
|
131
|
+
waitForBuild(buildId: string, options?: {
|
|
132
|
+
onLog?: (chunk: string) => void;
|
|
133
|
+
onProgress?: (progress: BuildProgress) => void;
|
|
134
|
+
pollIntervalMs?: number;
|
|
135
|
+
timeoutMs?: number;
|
|
136
|
+
}): Promise<Build>;
|
|
137
|
+
streamLogs(buildId: string, pollIntervalMs?: number): AsyncGenerator<LogChunk, void, unknown>;
|
|
138
|
+
}
|
|
139
|
+
declare function createBuildModule(config: BuildModuleConfig): BuildModule;
|
|
8
140
|
|
|
9
141
|
/**
|
|
10
142
|
* Non-interactive validation utilities for SDK
|
|
@@ -170,6 +302,145 @@ interface LogsParams {
|
|
|
170
302
|
*/
|
|
171
303
|
declare function validateLogsParams(params: Partial<LogsParams>): void;
|
|
172
304
|
|
|
305
|
+
/**
|
|
306
|
+
* UserAPI Client to manage interactions with the coordinator
|
|
307
|
+
*/
|
|
308
|
+
|
|
309
|
+
interface AppProfileInfo {
|
|
310
|
+
name: string;
|
|
311
|
+
website?: string;
|
|
312
|
+
description?: string;
|
|
313
|
+
xURL?: string;
|
|
314
|
+
imageURL?: string;
|
|
315
|
+
}
|
|
316
|
+
interface AppMetrics {
|
|
317
|
+
cpu_utilization_percent?: number;
|
|
318
|
+
memory_utilization_percent?: number;
|
|
319
|
+
memory_used_bytes?: number;
|
|
320
|
+
memory_total_bytes?: number;
|
|
321
|
+
}
|
|
322
|
+
interface DerivedAddress {
|
|
323
|
+
address: string;
|
|
324
|
+
derivationPath: string;
|
|
325
|
+
}
|
|
326
|
+
interface AppInfo {
|
|
327
|
+
address: Address;
|
|
328
|
+
status: string;
|
|
329
|
+
ip: string;
|
|
330
|
+
machineType: string;
|
|
331
|
+
profile?: AppProfileInfo;
|
|
332
|
+
metrics?: AppMetrics;
|
|
333
|
+
evmAddresses: DerivedAddress[];
|
|
334
|
+
solanaAddresses: DerivedAddress[];
|
|
335
|
+
}
|
|
336
|
+
type AppContractStatus = "STARTED" | "STOPPED" | "TERMINATED" | "SUSPENDED" | string;
|
|
337
|
+
interface AppReleaseBuild {
|
|
338
|
+
buildId?: string;
|
|
339
|
+
billingAddress?: string;
|
|
340
|
+
repoUrl?: string;
|
|
341
|
+
gitRef?: string;
|
|
342
|
+
status?: string;
|
|
343
|
+
buildType?: string;
|
|
344
|
+
imageName?: string;
|
|
345
|
+
imageDigest?: string;
|
|
346
|
+
imageUrl?: string;
|
|
347
|
+
provenanceJson?: unknown;
|
|
348
|
+
provenanceSignature?: string;
|
|
349
|
+
createdAt?: string;
|
|
350
|
+
updatedAt?: string;
|
|
351
|
+
errorMessage?: string;
|
|
352
|
+
dependencies?: Record<string, AppReleaseBuild>;
|
|
353
|
+
}
|
|
354
|
+
interface AppRelease {
|
|
355
|
+
appId?: string;
|
|
356
|
+
rmsReleaseId?: string;
|
|
357
|
+
imageDigest?: string;
|
|
358
|
+
registryUrl?: string;
|
|
359
|
+
publicEnv?: string;
|
|
360
|
+
encryptedEnv?: string;
|
|
361
|
+
upgradeByTime?: number;
|
|
362
|
+
createdAt?: string;
|
|
363
|
+
createdAtBlock?: string;
|
|
364
|
+
build?: AppReleaseBuild;
|
|
365
|
+
}
|
|
366
|
+
interface AppResponse {
|
|
367
|
+
id: string;
|
|
368
|
+
creator?: string;
|
|
369
|
+
contractStatus?: AppContractStatus;
|
|
370
|
+
releases: AppRelease[];
|
|
371
|
+
}
|
|
372
|
+
declare class UserApiClient {
|
|
373
|
+
private readonly config;
|
|
374
|
+
private readonly account?;
|
|
375
|
+
private readonly rpcUrl?;
|
|
376
|
+
private readonly clientId;
|
|
377
|
+
constructor(config: EnvironmentConfig, privateKey?: string | Hex, rpcUrl?: string, clientId?: string);
|
|
378
|
+
getInfos(appIDs: Address[], addressCount?: number): Promise<AppInfo[]>;
|
|
379
|
+
/**
|
|
380
|
+
* Get app details from UserAPI (includes releases and build/provenance info when available).
|
|
381
|
+
*
|
|
382
|
+
* Endpoint: GET /apps/:appAddress
|
|
383
|
+
*/
|
|
384
|
+
getApp(appAddress: Address): Promise<AppResponse>;
|
|
385
|
+
/**
|
|
386
|
+
* Get available SKUs (instance types) from UserAPI
|
|
387
|
+
*/
|
|
388
|
+
getSKUs(): Promise<{
|
|
389
|
+
skus: Array<{
|
|
390
|
+
sku: string;
|
|
391
|
+
description: string;
|
|
392
|
+
}>;
|
|
393
|
+
}>;
|
|
394
|
+
/**
|
|
395
|
+
* Get logs for an app
|
|
396
|
+
*/
|
|
397
|
+
getLogs(appID: Address): Promise<string>;
|
|
398
|
+
/**
|
|
399
|
+
* Get statuses for apps
|
|
400
|
+
*/
|
|
401
|
+
getStatuses(appIDs: Address[]): Promise<Array<{
|
|
402
|
+
address: Address;
|
|
403
|
+
status: string;
|
|
404
|
+
}>>;
|
|
405
|
+
/**
|
|
406
|
+
* Upload app profile information with optional image
|
|
407
|
+
*/
|
|
408
|
+
uploadAppProfile(appAddress: Address, name: string, website?: string, description?: string, xURL?: string, imagePath?: string): Promise<{
|
|
409
|
+
name: string;
|
|
410
|
+
website?: string;
|
|
411
|
+
description?: string;
|
|
412
|
+
xURL?: string;
|
|
413
|
+
imageURL?: string;
|
|
414
|
+
}>;
|
|
415
|
+
private makeAuthenticatedRequest;
|
|
416
|
+
/**
|
|
417
|
+
* Generate authentication headers for UserAPI requests
|
|
418
|
+
*/
|
|
419
|
+
private generateAuthHeaders;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Billing utility functions
|
|
424
|
+
*/
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Check if subscription status allows deploying apps
|
|
428
|
+
*/
|
|
429
|
+
declare function isSubscriptionActive(status: SubscriptionStatus): boolean;
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* General utility helpers
|
|
433
|
+
*/
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Ensure hex string has 0x prefix
|
|
437
|
+
*/
|
|
438
|
+
declare function addHexPrefix(value: string): Hex;
|
|
439
|
+
/**
|
|
440
|
+
* Remove 0x prefix from hex string if present
|
|
441
|
+
*/
|
|
442
|
+
declare function stripHexPrefix(value: string): string;
|
|
443
|
+
|
|
173
444
|
/**
|
|
174
445
|
* Main deploy function
|
|
175
446
|
*
|
|
@@ -236,6 +507,23 @@ interface ExecuteDeployOptions {
|
|
|
236
507
|
logger?: Logger;
|
|
237
508
|
skipTelemetry?: boolean;
|
|
238
509
|
}
|
|
510
|
+
/**
|
|
511
|
+
* Prepare a deployment from a pre-built image (already layered) without using Docker locally.
|
|
512
|
+
*
|
|
513
|
+
* This is intended for verifiable builds where the build service outputs:
|
|
514
|
+
* - imageRef (tagged image URL)
|
|
515
|
+
* - imageDigest (sha256:... digest)
|
|
516
|
+
*
|
|
517
|
+
* Flow is the same as prepareDeploy, except:
|
|
518
|
+
* - Skips ensureDockerIsRunning()
|
|
519
|
+
* - Skips prepareRelease() image layering and digest extraction
|
|
520
|
+
* - Uses provided imageDigest + derived registry name to construct the Release struct
|
|
521
|
+
*/
|
|
522
|
+
declare function prepareDeployFromVerifiableBuild(options: Omit<SDKDeployOptions, "gas" | "dockerfilePath" | "imageRef"> & {
|
|
523
|
+
imageRef: string;
|
|
524
|
+
imageDigest: string;
|
|
525
|
+
skipTelemetry?: boolean;
|
|
526
|
+
}, logger?: Logger): Promise<PrepareDeployResult>;
|
|
239
527
|
/**
|
|
240
528
|
* Prepare deployment - does all work up to the transaction
|
|
241
529
|
*
|
|
@@ -337,6 +625,19 @@ interface ExecuteUpgradeOptions {
|
|
|
337
625
|
logger?: Logger;
|
|
338
626
|
skipTelemetry?: boolean;
|
|
339
627
|
}
|
|
628
|
+
/**
|
|
629
|
+
* Prepare an upgrade from a pre-built image (already layered) without using Docker locally.
|
|
630
|
+
*
|
|
631
|
+
* Intended for verifiable builds: build service provides imageRef + imageDigest (sha256:...).
|
|
632
|
+
* This skips:
|
|
633
|
+
* - ensureDockerIsRunning()
|
|
634
|
+
* - prepareRelease() layering/digest extraction
|
|
635
|
+
*/
|
|
636
|
+
declare function prepareUpgradeFromVerifiableBuild(options: Omit<SDKUpgradeOptions, "gas" | "dockerfilePath" | "imageRef"> & {
|
|
637
|
+
imageRef: string;
|
|
638
|
+
imageDigest: string;
|
|
639
|
+
skipTelemetry?: boolean;
|
|
640
|
+
}, logger?: Logger): Promise<PrepareUpgradeResult>;
|
|
340
641
|
/**
|
|
341
642
|
* Prepare upgrade - does all work up to the transaction
|
|
342
643
|
*
|
|
@@ -388,15 +689,6 @@ declare function isEnvironmentAvailable(environment: string): boolean;
|
|
|
388
689
|
*/
|
|
389
690
|
declare function isMainnet(environmentConfig: EnvironmentConfig): boolean;
|
|
390
691
|
|
|
391
|
-
/**
|
|
392
|
-
* Billing utility functions
|
|
393
|
-
*/
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* Check if subscription status allows deploying apps
|
|
397
|
-
*/
|
|
398
|
-
declare function isSubscriptionActive(status: SubscriptionStatus): boolean;
|
|
399
|
-
|
|
400
692
|
/**
|
|
401
693
|
* OS Keyring Integration
|
|
402
694
|
*
|
|
@@ -775,24 +1067,23 @@ declare function getCategoryDescriptions(catalog: TemplateCatalog, language: str
|
|
|
775
1067
|
* This module handles EIP-7702 delegation and batch execution
|
|
776
1068
|
*/
|
|
777
1069
|
|
|
1070
|
+
type Execution = {
|
|
1071
|
+
target: Address;
|
|
1072
|
+
value: bigint;
|
|
1073
|
+
callData: Hex;
|
|
1074
|
+
};
|
|
778
1075
|
/**
|
|
779
1076
|
* Options for estimating batch gas
|
|
780
1077
|
*/
|
|
781
1078
|
interface EstimateBatchGasOptions {
|
|
782
1079
|
publicClient: PublicClient;
|
|
783
|
-
|
|
784
|
-
executions:
|
|
785
|
-
target: Address;
|
|
786
|
-
value: bigint;
|
|
787
|
-
callData: Hex;
|
|
788
|
-
}>;
|
|
1080
|
+
account: Address;
|
|
1081
|
+
executions: Execution[];
|
|
789
1082
|
}
|
|
790
1083
|
/**
|
|
791
1084
|
* Estimate gas cost for a batch transaction
|
|
792
1085
|
*
|
|
793
1086
|
* Use this to get cost estimate before prompting user for confirmation.
|
|
794
|
-
* Note: This provides a conservative estimate since batch transactions
|
|
795
|
-
* through EIP-7702 can have variable costs.
|
|
796
1087
|
*/
|
|
797
1088
|
declare function estimateBatchGas(options: EstimateBatchGasOptions): Promise<GasEstimate>;
|
|
798
1089
|
/**
|
|
@@ -823,81 +1114,6 @@ interface PreflightContext {
|
|
|
823
1114
|
*/
|
|
824
1115
|
declare function getCurrentInstanceType(preflightCtx: PreflightContext, appID: Address, logger: Logger, clientId?: string): Promise<string>;
|
|
825
1116
|
|
|
826
|
-
/**
|
|
827
|
-
* UserAPI Client to manage interactions with the coordinator
|
|
828
|
-
*/
|
|
829
|
-
|
|
830
|
-
interface AppProfileInfo {
|
|
831
|
-
name: string;
|
|
832
|
-
website?: string;
|
|
833
|
-
description?: string;
|
|
834
|
-
xURL?: string;
|
|
835
|
-
imageURL?: string;
|
|
836
|
-
}
|
|
837
|
-
interface AppMetrics {
|
|
838
|
-
cpu_utilization_percent?: number;
|
|
839
|
-
memory_utilization_percent?: number;
|
|
840
|
-
memory_used_bytes?: number;
|
|
841
|
-
memory_total_bytes?: number;
|
|
842
|
-
}
|
|
843
|
-
interface DerivedAddress {
|
|
844
|
-
address: string;
|
|
845
|
-
derivationPath: string;
|
|
846
|
-
}
|
|
847
|
-
interface AppInfo {
|
|
848
|
-
address: Address;
|
|
849
|
-
status: string;
|
|
850
|
-
ip: string;
|
|
851
|
-
machineType: string;
|
|
852
|
-
profile?: AppProfileInfo;
|
|
853
|
-
metrics?: AppMetrics;
|
|
854
|
-
evmAddresses: DerivedAddress[];
|
|
855
|
-
solanaAddresses: DerivedAddress[];
|
|
856
|
-
}
|
|
857
|
-
declare class UserApiClient {
|
|
858
|
-
private readonly config;
|
|
859
|
-
private readonly account?;
|
|
860
|
-
private readonly rpcUrl?;
|
|
861
|
-
private readonly clientId;
|
|
862
|
-
constructor(config: EnvironmentConfig, privateKey?: string | Hex, rpcUrl?: string, clientId?: string);
|
|
863
|
-
getInfos(appIDs: Address[], addressCount?: number): Promise<AppInfo[]>;
|
|
864
|
-
/**
|
|
865
|
-
* Get available SKUs (instance types) from UserAPI
|
|
866
|
-
*/
|
|
867
|
-
getSKUs(): Promise<{
|
|
868
|
-
skus: Array<{
|
|
869
|
-
sku: string;
|
|
870
|
-
description: string;
|
|
871
|
-
}>;
|
|
872
|
-
}>;
|
|
873
|
-
/**
|
|
874
|
-
* Get logs for an app
|
|
875
|
-
*/
|
|
876
|
-
getLogs(appID: Address): Promise<string>;
|
|
877
|
-
/**
|
|
878
|
-
* Get statuses for apps
|
|
879
|
-
*/
|
|
880
|
-
getStatuses(appIDs: Address[]): Promise<Array<{
|
|
881
|
-
address: Address;
|
|
882
|
-
status: string;
|
|
883
|
-
}>>;
|
|
884
|
-
/**
|
|
885
|
-
* Upload app profile information with optional image
|
|
886
|
-
*/
|
|
887
|
-
uploadAppProfile(appAddress: Address, name: string, website?: string, description?: string, xURL?: string, imagePath?: string): Promise<{
|
|
888
|
-
name: string;
|
|
889
|
-
website?: string;
|
|
890
|
-
description?: string;
|
|
891
|
-
xURL?: string;
|
|
892
|
-
imageURL?: string;
|
|
893
|
-
}>;
|
|
894
|
-
private makeAuthenticatedRequest;
|
|
895
|
-
/**
|
|
896
|
-
* Generate authentication headers for UserAPI requests
|
|
897
|
-
*/
|
|
898
|
-
private generateAuthHeaders;
|
|
899
|
-
}
|
|
900
|
-
|
|
901
1117
|
/**
|
|
902
1118
|
* Main SDK Client entry point
|
|
903
1119
|
*/
|
|
@@ -915,4 +1131,4 @@ interface ECloudClient {
|
|
|
915
1131
|
}
|
|
916
1132
|
declare function createECloudClient(cfg: ClientConfig): ECloudClient;
|
|
917
1133
|
|
|
918
|
-
export { type AppEnvironment, AppId, type AppInfo, type AppMetrics, type AppProfileInfo, BillingModule, type ClientConfig, ComputeModule, type CreateAppParams, type DeployParams, DeployResult, type ECloudClient, type Environment, EnvironmentConfig, type EstimateBatchGasOptions, GasEstimate, type GeneratedKey, type LegacyKey, type LogVisibility, Logger, type LogsParams, type Metric, type MetricsContext, NoopClient, PostHogClient, type PrepareDeployResult, type PrepareUpgradeResult, PreparedDeploy, PreparedUpgrade, type PrivateKeySource, type ResourceUsageMonitoring, type SDKDeployOptions, type SDKUpgradeOptions, type StoredKey, SubscriptionStatus, type TelemetryClient, type TelemetryClientOptions, type TelemetryWrapperOptions, type UpgradeParams, UserApiClient, addMetric, addMetricWithDimensions, assertValidFilePath, assertValidImageReference, assertValidPrivateKey, checkERC7702Delegation, createAppEnvironment, createECloudClient, createMetricsContext, createTelemetryClient, deleteLegacyPrivateKey, deletePrivateKey, emitMetrics, estimateBatchGas, executeDeploy, executeUpgrade, extractAppNameFromImage, fetchTemplateCatalog, generateNewPrivateKey, getAddressFromPrivateKey, getAvailableEnvironments, getBuildType, getCategoryDescriptions, getCurrentInstanceType, getEnvironmentConfig, getLegacyKeys, getLegacyPrivateKey, getPostHogAPIKey, getPostHogEndpoint, getPrivateKey, getPrivateKeyWithSource, getTemplate, isEnvironmentAvailable, isMainnet, isNoopClient, isSubscriptionActive, keyExists, listStoredKeys, prepareDeploy, prepareUpgrade, requirePrivateKey, sanitizeString, sanitizeURL, sanitizeXURL, storePrivateKey, validateAppID, validateAppName, validateCreateAppParams, validateDeployParams, validateDescription, validateFilePath, validateImagePath, validateImageReference, validateInstanceTypeSKU, validateLogVisibility, validateLogsParams, validatePrivateKey, validatePrivateKeyFormat, validateResourceUsageMonitoring, validateURL, validateUpgradeParams, validateXURL, watchDeployment, watchUpgrade, withSDKTelemetry };
|
|
1134
|
+
export { type AppEnvironment, AppId, type AppInfo, type AppMetrics, type AppProfileInfo, type AppRelease, type AppReleaseBuild, type AppResponse, AuthRequiredError, BUILD_STATUS, BadRequestError, BillingModule, type Build, BuildError, BuildFailedError, type BuildModule, type BuildModuleConfig, type BuildProgress, type BuildStatus, type ClientConfig, ComputeModule, ConflictError, type CreateAppParams, type DeployParams, DeployResult, type ECloudClient, type Environment, EnvironmentConfig, type EstimateBatchGasOptions, ForbiddenError, GasEstimate, type GeneratedKey, type LegacyKey, type LogChunk, type LogVisibility, Logger, type LogsParams, type Metric, type MetricsContext, NoopClient, NotFoundError, PostHogClient, type PrepareDeployResult, type PrepareUpgradeResult, PreparedDeploy, PreparedUpgrade, type PrivateKeySource, type ResourceUsageMonitoring, type SDKDeployOptions, type SDKUpgradeOptions, type StoredKey, type SubmitBuildRequest, type SubmitBuildResponse, SubscriptionStatus, type TelemetryClient, type TelemetryClientOptions, type TelemetryWrapperOptions, TimeoutError, type UpgradeParams, UserApiClient, type VerifyProvenanceFailure, type VerifyProvenanceResult, type VerifyProvenanceSuccess, addHexPrefix, addMetric, addMetricWithDimensions, assertValidFilePath, assertValidImageReference, assertValidPrivateKey, checkERC7702Delegation, createAppEnvironment, createBuildModule, createECloudClient, createMetricsContext, createTelemetryClient, deleteLegacyPrivateKey, deletePrivateKey, emitMetrics, estimateBatchGas, executeDeploy, executeUpgrade, extractAppNameFromImage, fetchTemplateCatalog, generateNewPrivateKey, getAddressFromPrivateKey, getAvailableEnvironments, getBuildType, getCategoryDescriptions, getCurrentInstanceType, getEnvironmentConfig, getLegacyKeys, getLegacyPrivateKey, getPostHogAPIKey, getPostHogEndpoint, getPrivateKey, getPrivateKeyWithSource, getTemplate, isEnvironmentAvailable, isMainnet, isNoopClient, isSubscriptionActive, keyExists, listStoredKeys, prepareDeploy, prepareDeployFromVerifiableBuild, prepareUpgrade, prepareUpgradeFromVerifiableBuild, requirePrivateKey, sanitizeString, sanitizeURL, sanitizeXURL, storePrivateKey, stripHexPrefix, validateAppID, validateAppName, validateCreateAppParams, validateDeployParams, validateDescription, validateFilePath, validateImagePath, validateImageReference, validateInstanceTypeSKU, validateLogVisibility, validateLogsParams, validatePrivateKey, validatePrivateKeyFormat, validateResourceUsageMonitoring, validateURL, validateUpgradeParams, validateXURL, watchDeployment, watchUpgrade, withSDKTelemetry };
|