@layr-labs/ecloud-sdk 1.0.0-dev.7 → 1.0.0-dev.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { F as EnvironmentConfig, aj as SubscriptionStatus, j as BillingEnvironmentConfig, aa as ProductID, q as CreateSubscriptionOptions, r as CreateSubscriptionResponse, O as GetSubscriptionOptions, ab as ProductSubscriptionResponse, Z as PaymentMethodsResponse, s as CreditPurchaseResponse, p as CreateCouponResponse, T as ListCouponsResponse, N as GetCouponResponse, a as AddAdminResponse, S as ListAdminsResponse, ac as RedeemCouponResponse, L as GasEstimate, U as Logger } from './index-BVnxNfqb.js';
2
- import { Address, Hex, WalletClient, PublicClient, SignAuthorizationReturnType, Chain } from 'viem';
2
+ import { Hex, Address, WalletClient, PublicClient, SignAuthorizationReturnType, Chain } from 'viem';
3
3
 
4
4
  /**
5
5
  * Environment configuration for different networks
@@ -33,170 +33,6 @@ declare function isEnvironmentAvailable(environment: string): boolean;
33
33
  */
34
34
  declare function isMainnet(environmentConfig: EnvironmentConfig): boolean;
35
35
 
36
- /**
37
- * Non-interactive validation utilities for SDK
38
- *
39
- * These functions validate parameters without any interactive prompts.
40
- * They either return the validated value or throw an error.
41
- */
42
-
43
- /**
44
- * Validate app name format
45
- * @throws Error if name is invalid
46
- */
47
- declare function validateAppName(name: string): void;
48
- /**
49
- * Validate Docker image reference format
50
- * @returns true if valid, error message string if invalid
51
- */
52
- declare function validateImageReference(value: string): true | string;
53
- /**
54
- * Validate image reference and throw if invalid
55
- * @throws Error if image reference is invalid
56
- */
57
- declare function assertValidImageReference(value: string): void;
58
- /**
59
- * Extract app name from image reference
60
- */
61
- declare function extractAppNameFromImage(imageRef: string): string;
62
- /**
63
- * Validate that a file path exists
64
- * @returns true if valid, error message string if invalid
65
- */
66
- declare function validateFilePath(value: string): true | string;
67
- /**
68
- * Validate file path and throw if invalid
69
- * @throws Error if file path is invalid or doesn't exist
70
- */
71
- declare function assertValidFilePath(value: string): void;
72
- /**
73
- * Validate instance type SKU against available types
74
- * @returns the validated SKU
75
- * @throws Error if SKU is not in the available types list
76
- */
77
- declare function validateInstanceTypeSKU(sku: string, availableTypes: Array<{
78
- sku: string;
79
- }>): string;
80
- /**
81
- * Validate private key format
82
- * Matches Go's common.ValidatePrivateKey() function
83
- */
84
- declare function validatePrivateKeyFormat(key: string): boolean;
85
- /**
86
- * Validate private key and throw if invalid
87
- * @throws Error if private key format is invalid
88
- */
89
- declare function assertValidPrivateKey(key: string): void;
90
- /**
91
- * Validate URL format
92
- * @returns undefined if valid, error message string if invalid
93
- */
94
- declare function validateURL(rawURL: string): string | undefined;
95
- /**
96
- * Validate X/Twitter URL format
97
- * @returns undefined if valid, error message string if invalid
98
- */
99
- declare function validateXURL(rawURL: string): string | undefined;
100
- /**
101
- * Validate description length
102
- * @returns undefined if valid, error message string if invalid
103
- */
104
- declare function validateDescription(description: string): string | undefined;
105
- /**
106
- * Validate image file path
107
- * @returns undefined if valid, error message string if invalid
108
- */
109
- declare function validateImagePath(filePath: string): string | undefined;
110
- /**
111
- * Validate and normalize app ID address
112
- * @param appID - App ID (must be a valid address)
113
- * @returns Normalized app address
114
- * @throws Error if app ID is not a valid address
115
- *
116
- * Note: Name resolution should be handled by CLI before calling SDK functions.
117
- * The SDK only accepts resolved addresses.
118
- */
119
- declare function validateAppID(appID: string | Address): Address;
120
- type LogVisibility = "public" | "private" | "off";
121
- /**
122
- * Validate and convert log visibility setting to internal format
123
- * @param logVisibility - Log visibility setting
124
- * @returns Object with logRedirect and publicLogs settings
125
- * @throws Error if log visibility value is invalid
126
- */
127
- declare function validateLogVisibility(logVisibility: LogVisibility): {
128
- logRedirect: string;
129
- publicLogs: boolean;
130
- };
131
- type ResourceUsageMonitoring = "enable" | "disable";
132
- /**
133
- * Validate and convert resource usage monitoring setting to internal format
134
- * @param resourceUsageMonitoring - Resource usage monitoring setting
135
- * @returns The resourceUsageAllow value for the Dockerfile label ("always" or "never")
136
- * @throws Error if resource usage monitoring value is invalid
137
- */
138
- declare function validateResourceUsageMonitoring(resourceUsageMonitoring: ResourceUsageMonitoring | undefined): string;
139
- /**
140
- * Sanitize string (HTML escape and trim)
141
- */
142
- declare function sanitizeString(s: string): string;
143
- /**
144
- * Sanitize URL (add https:// if missing, validate)
145
- * @throws Error if URL is invalid after sanitization
146
- */
147
- declare function sanitizeURL(rawURL: string): string;
148
- /**
149
- * Sanitize X/Twitter URL (handle username-only input, normalize)
150
- * @throws Error if URL is invalid after sanitization
151
- */
152
- declare function sanitizeXURL(rawURL: string): string;
153
- interface DeployParams {
154
- dockerfilePath?: string;
155
- imageRef?: string;
156
- appName: string;
157
- envFilePath?: string;
158
- instanceType: string;
159
- logVisibility: LogVisibility;
160
- }
161
- /**
162
- * Validate deploy parameters
163
- * @throws Error if required parameters are missing or invalid
164
- */
165
- declare function validateDeployParams(params: Partial<DeployParams>): void;
166
- interface UpgradeParams {
167
- appID: string | Address;
168
- dockerfilePath?: string;
169
- imageRef?: string;
170
- envFilePath?: string;
171
- instanceType: string;
172
- logVisibility: LogVisibility;
173
- }
174
- /**
175
- * Validate upgrade parameters
176
- * @throws Error if required parameters are missing or invalid
177
- */
178
- declare function validateUpgradeParams(params: Partial<UpgradeParams>): void;
179
- interface CreateAppParams {
180
- name: string;
181
- language: string;
182
- template?: string;
183
- templateVersion?: string;
184
- }
185
- /**
186
- * Validate create app parameters
187
- * @throws Error if required parameters are missing or invalid
188
- */
189
- declare function validateCreateAppParams(params: Partial<CreateAppParams>): void;
190
- interface LogsParams {
191
- appID: string | Address;
192
- watch?: boolean;
193
- }
194
- /**
195
- * Validate logs parameters
196
- * @throws Error if required parameters are missing or invalid
197
- */
198
- declare function validateLogsParams(params: Partial<LogsParams>): void;
199
-
200
36
  /**
201
37
  * Billing utility functions
202
38
  */
@@ -1007,4 +843,4 @@ declare function addHexPrefix(value: string): Hex;
1007
843
  */
1008
844
  declare function stripHexPrefix(value: string): string;
1009
845
 
1010
- export { loginToComputeApi as $, type AppInfo as A, BillingApiClient as B, type ComputeApiConfig as C, extractAppNameFromImage as D, type EstimateBatchGasOptions as E, generateNewPrivateKey as F, type GeneratedKey as G, generateNonce as H, getAvailableEnvironments as I, getBillingApiSession as J, getBillingEnvironmentConfig as K, type LogVisibility as L, getBuildType as M, getChainFromID as N, getComputeApiSession as O, getEnvironmentConfig as P, isBillingSessionValid as Q, isEnvironmentAvailable as R, type SessionInfo as S, isMainnet as T, UserApiClient as U, isSessionValid as V, isSiweMessageExpired as W, isSiweMessageNotYetValid as X, isSubscriptionActive as Y, loginToBillingApi as Z, loginToBothApis as _, SessionError as a, logoutFromBillingApi as a0, logoutFromBothApis as a1, logoutFromComputeApi as a2, parseSiweMessage as a3, sanitizeString as a4, sanitizeURL as a5, sanitizeXURL as a6, stripHexPrefix as a7, validateAppID as a8, validateAppName as a9, validateCreateAppParams as aa, validateDescription as ab, validateImageReference as ac, validateInstanceTypeSKU as ad, validateLogVisibility as ae, validateLogsParams as af, validatePrivateKeyFormat as ag, validateURL as ah, validateXURL as ai, type ResourceUsageMonitoring as aj, type AppRelease as ak, type AppReleaseBuild as al, type AppResponse as am, BASE_SEPOLIA_CHAIN_ID as an, type DeployParams as ao, type UpgradeParams as ap, assertValidFilePath as aq, createClients as ar, validateDeployParams as as, validateFilePath as at, validateImagePath as au, validateResourceUsageMonitoring as av, validateUpgradeParams as aw, type SiweMessageParams as b, type AppInfoResponse as c, type AppMetrics as d, type AppProfileInfo as e, type BillingApiClientOptions as f, type BillingApiConfig as g, type BillingLoginRequest as h, type BillingLoginResult as i, BillingSessionError as j, type BillingSessionInfo as k, type CreateAppParams as l, type ExecuteBatchOptions as m, type Execution as n, type LoginRequest as o, type LoginResult as p, type LogsParams as q, type SiweMessageResult as r, type UserApiClientOptions as s, addHexPrefix as t, assertValidImageReference as u, assertValidPrivateKey as v, checkERC7702Delegation as w, createSiweMessage as x, estimateBatchGas as y, executeBatch as z };
846
+ export { type AppRelease as $, type AppInfo as A, BillingApiClient as B, type ComputeApiConfig as C, getBuildType as D, type EstimateBatchGasOptions as E, getChainFromID as F, type GeneratedKey as G, getComputeApiSession as H, getEnvironmentConfig as I, isBillingSessionValid as J, isEnvironmentAvailable as K, type LoginRequest as L, isMainnet as M, isSessionValid as N, isSiweMessageExpired as O, isSiweMessageNotYetValid as P, isSubscriptionActive as Q, loginToBillingApi as R, type SessionInfo as S, loginToBothApis as T, UserApiClient as U, loginToComputeApi as V, logoutFromBillingApi as W, logoutFromBothApis as X, logoutFromComputeApi as Y, parseSiweMessage as Z, stripHexPrefix as _, SessionError as a, type AppReleaseBuild as a0, type AppResponse as a1, BASE_SEPOLIA_CHAIN_ID as a2, createClients as a3, type SiweMessageParams as b, type AppInfoResponse as c, type AppMetrics as d, type AppProfileInfo as e, type BillingApiClientOptions as f, type BillingApiConfig as g, type BillingLoginRequest as h, type BillingLoginResult as i, BillingSessionError as j, type BillingSessionInfo as k, type ExecuteBatchOptions as l, type Execution as m, type LoginResult as n, type SiweMessageResult as o, type UserApiClientOptions as p, addHexPrefix as q, checkERC7702Delegation as r, createSiweMessage as s, estimateBatchGas as t, executeBatch as u, generateNewPrivateKey as v, generateNonce as w, getAvailableEnvironments as x, getBillingApiSession as y, getBillingEnvironmentConfig as z };
@@ -1,5 +1,5 @@
1
1
  import { F as EnvironmentConfig, aj as SubscriptionStatus, j as BillingEnvironmentConfig, aa as ProductID, q as CreateSubscriptionOptions, r as CreateSubscriptionResponse, O as GetSubscriptionOptions, ab as ProductSubscriptionResponse, Z as PaymentMethodsResponse, s as CreditPurchaseResponse, p as CreateCouponResponse, T as ListCouponsResponse, N as GetCouponResponse, a as AddAdminResponse, S as ListAdminsResponse, ac as RedeemCouponResponse, L as GasEstimate, U as Logger } from './index-BVnxNfqb.cjs';
2
- import { Address, Hex, WalletClient, PublicClient, SignAuthorizationReturnType, Chain } from 'viem';
2
+ import { Hex, Address, WalletClient, PublicClient, SignAuthorizationReturnType, Chain } from 'viem';
3
3
 
4
4
  /**
5
5
  * Environment configuration for different networks
@@ -33,170 +33,6 @@ declare function isEnvironmentAvailable(environment: string): boolean;
33
33
  */
34
34
  declare function isMainnet(environmentConfig: EnvironmentConfig): boolean;
35
35
 
36
- /**
37
- * Non-interactive validation utilities for SDK
38
- *
39
- * These functions validate parameters without any interactive prompts.
40
- * They either return the validated value or throw an error.
41
- */
42
-
43
- /**
44
- * Validate app name format
45
- * @throws Error if name is invalid
46
- */
47
- declare function validateAppName(name: string): void;
48
- /**
49
- * Validate Docker image reference format
50
- * @returns true if valid, error message string if invalid
51
- */
52
- declare function validateImageReference(value: string): true | string;
53
- /**
54
- * Validate image reference and throw if invalid
55
- * @throws Error if image reference is invalid
56
- */
57
- declare function assertValidImageReference(value: string): void;
58
- /**
59
- * Extract app name from image reference
60
- */
61
- declare function extractAppNameFromImage(imageRef: string): string;
62
- /**
63
- * Validate that a file path exists
64
- * @returns true if valid, error message string if invalid
65
- */
66
- declare function validateFilePath(value: string): true | string;
67
- /**
68
- * Validate file path and throw if invalid
69
- * @throws Error if file path is invalid or doesn't exist
70
- */
71
- declare function assertValidFilePath(value: string): void;
72
- /**
73
- * Validate instance type SKU against available types
74
- * @returns the validated SKU
75
- * @throws Error if SKU is not in the available types list
76
- */
77
- declare function validateInstanceTypeSKU(sku: string, availableTypes: Array<{
78
- sku: string;
79
- }>): string;
80
- /**
81
- * Validate private key format
82
- * Matches Go's common.ValidatePrivateKey() function
83
- */
84
- declare function validatePrivateKeyFormat(key: string): boolean;
85
- /**
86
- * Validate private key and throw if invalid
87
- * @throws Error if private key format is invalid
88
- */
89
- declare function assertValidPrivateKey(key: string): void;
90
- /**
91
- * Validate URL format
92
- * @returns undefined if valid, error message string if invalid
93
- */
94
- declare function validateURL(rawURL: string): string | undefined;
95
- /**
96
- * Validate X/Twitter URL format
97
- * @returns undefined if valid, error message string if invalid
98
- */
99
- declare function validateXURL(rawURL: string): string | undefined;
100
- /**
101
- * Validate description length
102
- * @returns undefined if valid, error message string if invalid
103
- */
104
- declare function validateDescription(description: string): string | undefined;
105
- /**
106
- * Validate image file path
107
- * @returns undefined if valid, error message string if invalid
108
- */
109
- declare function validateImagePath(filePath: string): string | undefined;
110
- /**
111
- * Validate and normalize app ID address
112
- * @param appID - App ID (must be a valid address)
113
- * @returns Normalized app address
114
- * @throws Error if app ID is not a valid address
115
- *
116
- * Note: Name resolution should be handled by CLI before calling SDK functions.
117
- * The SDK only accepts resolved addresses.
118
- */
119
- declare function validateAppID(appID: string | Address): Address;
120
- type LogVisibility = "public" | "private" | "off";
121
- /**
122
- * Validate and convert log visibility setting to internal format
123
- * @param logVisibility - Log visibility setting
124
- * @returns Object with logRedirect and publicLogs settings
125
- * @throws Error if log visibility value is invalid
126
- */
127
- declare function validateLogVisibility(logVisibility: LogVisibility): {
128
- logRedirect: string;
129
- publicLogs: boolean;
130
- };
131
- type ResourceUsageMonitoring = "enable" | "disable";
132
- /**
133
- * Validate and convert resource usage monitoring setting to internal format
134
- * @param resourceUsageMonitoring - Resource usage monitoring setting
135
- * @returns The resourceUsageAllow value for the Dockerfile label ("always" or "never")
136
- * @throws Error if resource usage monitoring value is invalid
137
- */
138
- declare function validateResourceUsageMonitoring(resourceUsageMonitoring: ResourceUsageMonitoring | undefined): string;
139
- /**
140
- * Sanitize string (HTML escape and trim)
141
- */
142
- declare function sanitizeString(s: string): string;
143
- /**
144
- * Sanitize URL (add https:// if missing, validate)
145
- * @throws Error if URL is invalid after sanitization
146
- */
147
- declare function sanitizeURL(rawURL: string): string;
148
- /**
149
- * Sanitize X/Twitter URL (handle username-only input, normalize)
150
- * @throws Error if URL is invalid after sanitization
151
- */
152
- declare function sanitizeXURL(rawURL: string): string;
153
- interface DeployParams {
154
- dockerfilePath?: string;
155
- imageRef?: string;
156
- appName: string;
157
- envFilePath?: string;
158
- instanceType: string;
159
- logVisibility: LogVisibility;
160
- }
161
- /**
162
- * Validate deploy parameters
163
- * @throws Error if required parameters are missing or invalid
164
- */
165
- declare function validateDeployParams(params: Partial<DeployParams>): void;
166
- interface UpgradeParams {
167
- appID: string | Address;
168
- dockerfilePath?: string;
169
- imageRef?: string;
170
- envFilePath?: string;
171
- instanceType: string;
172
- logVisibility: LogVisibility;
173
- }
174
- /**
175
- * Validate upgrade parameters
176
- * @throws Error if required parameters are missing or invalid
177
- */
178
- declare function validateUpgradeParams(params: Partial<UpgradeParams>): void;
179
- interface CreateAppParams {
180
- name: string;
181
- language: string;
182
- template?: string;
183
- templateVersion?: string;
184
- }
185
- /**
186
- * Validate create app parameters
187
- * @throws Error if required parameters are missing or invalid
188
- */
189
- declare function validateCreateAppParams(params: Partial<CreateAppParams>): void;
190
- interface LogsParams {
191
- appID: string | Address;
192
- watch?: boolean;
193
- }
194
- /**
195
- * Validate logs parameters
196
- * @throws Error if required parameters are missing or invalid
197
- */
198
- declare function validateLogsParams(params: Partial<LogsParams>): void;
199
-
200
36
  /**
201
37
  * Billing utility functions
202
38
  */
@@ -1007,4 +843,4 @@ declare function addHexPrefix(value: string): Hex;
1007
843
  */
1008
844
  declare function stripHexPrefix(value: string): string;
1009
845
 
1010
- export { loginToComputeApi as $, type AppInfo as A, BillingApiClient as B, type ComputeApiConfig as C, extractAppNameFromImage as D, type EstimateBatchGasOptions as E, generateNewPrivateKey as F, type GeneratedKey as G, generateNonce as H, getAvailableEnvironments as I, getBillingApiSession as J, getBillingEnvironmentConfig as K, type LogVisibility as L, getBuildType as M, getChainFromID as N, getComputeApiSession as O, getEnvironmentConfig as P, isBillingSessionValid as Q, isEnvironmentAvailable as R, type SessionInfo as S, isMainnet as T, UserApiClient as U, isSessionValid as V, isSiweMessageExpired as W, isSiweMessageNotYetValid as X, isSubscriptionActive as Y, loginToBillingApi as Z, loginToBothApis as _, SessionError as a, logoutFromBillingApi as a0, logoutFromBothApis as a1, logoutFromComputeApi as a2, parseSiweMessage as a3, sanitizeString as a4, sanitizeURL as a5, sanitizeXURL as a6, stripHexPrefix as a7, validateAppID as a8, validateAppName as a9, validateCreateAppParams as aa, validateDescription as ab, validateImageReference as ac, validateInstanceTypeSKU as ad, validateLogVisibility as ae, validateLogsParams as af, validatePrivateKeyFormat as ag, validateURL as ah, validateXURL as ai, type ResourceUsageMonitoring as aj, type AppRelease as ak, type AppReleaseBuild as al, type AppResponse as am, BASE_SEPOLIA_CHAIN_ID as an, type DeployParams as ao, type UpgradeParams as ap, assertValidFilePath as aq, createClients as ar, validateDeployParams as as, validateFilePath as at, validateImagePath as au, validateResourceUsageMonitoring as av, validateUpgradeParams as aw, type SiweMessageParams as b, type AppInfoResponse as c, type AppMetrics as d, type AppProfileInfo as e, type BillingApiClientOptions as f, type BillingApiConfig as g, type BillingLoginRequest as h, type BillingLoginResult as i, BillingSessionError as j, type BillingSessionInfo as k, type CreateAppParams as l, type ExecuteBatchOptions as m, type Execution as n, type LoginRequest as o, type LoginResult as p, type LogsParams as q, type SiweMessageResult as r, type UserApiClientOptions as s, addHexPrefix as t, assertValidImageReference as u, assertValidPrivateKey as v, checkERC7702Delegation as w, createSiweMessage as x, estimateBatchGas as y, executeBatch as z };
846
+ export { type AppRelease as $, type AppInfo as A, BillingApiClient as B, type ComputeApiConfig as C, getBuildType as D, type EstimateBatchGasOptions as E, getChainFromID as F, type GeneratedKey as G, getComputeApiSession as H, getEnvironmentConfig as I, isBillingSessionValid as J, isEnvironmentAvailable as K, type LoginRequest as L, isMainnet as M, isSessionValid as N, isSiweMessageExpired as O, isSiweMessageNotYetValid as P, isSubscriptionActive as Q, loginToBillingApi as R, type SessionInfo as S, loginToBothApis as T, UserApiClient as U, loginToComputeApi as V, logoutFromBillingApi as W, logoutFromBothApis as X, logoutFromComputeApi as Y, parseSiweMessage as Z, stripHexPrefix as _, SessionError as a, type AppReleaseBuild as a0, type AppResponse as a1, BASE_SEPOLIA_CHAIN_ID as a2, createClients as a3, type SiweMessageParams as b, type AppInfoResponse as c, type AppMetrics as d, type AppProfileInfo as e, type BillingApiClientOptions as f, type BillingApiConfig as g, type BillingLoginRequest as h, type BillingLoginResult as i, BillingSessionError as j, type BillingSessionInfo as k, type ExecuteBatchOptions as l, type Execution as m, type LoginResult as n, type SiweMessageResult as o, type UserApiClientOptions as p, addHexPrefix as q, checkERC7702Delegation as r, createSiweMessage as s, estimateBatchGas as t, executeBatch as u, generateNewPrivateKey as v, generateNonce as w, getAvailableEnvironments as x, getBillingApiSession as y, getBillingEnvironmentConfig as z };