@layr-labs/ecloud-sdk 1.0.0-devep2 → 1.0.0-devep4
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 +12 -3
- 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 +12 -3
- package/dist/billing.js.map +1 -1
- package/dist/browser.cjs +78 -4
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +4 -4
- package/dist/browser.d.ts +4 -4
- package/dist/browser.js +78 -4
- package/dist/browser.js.map +1 -1
- package/dist/{compute-BbgMH6Ef.d.ts → compute-2WkiO-d8.d.ts} +1 -1
- package/dist/{compute-yAqGf5hM.d.cts → compute-CoBGVJXh.d.cts} +1 -1
- package/dist/compute.cjs +523 -152
- 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 +523 -152
- package/dist/compute.js.map +1 -1
- package/dist/{helpers-CnlJ5yPE.d.cts → helpers-B8KBOdM4.d.ts} +26 -2
- package/dist/{helpers-GWlLS3gz.d.ts → helpers-BVSe7yTf.d.cts} +26 -2
- package/dist/{index-Bac4HjC0.d.cts → index-XhjPvHIY.d.cts} +2 -0
- package/dist/{index-Bac4HjC0.d.ts → index-XhjPvHIY.d.ts} +2 -0
- package/dist/index.cjs +519 -179
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +519 -179
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/browser.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as AppId } from './index-
|
|
2
|
-
export { a as AlreadyActiveResponse, b as AppConfig, c as AppProfile, d as AppProfileResponse, e as AppRecord, B as BatchedDeployResult, f as BillingEnvironmentConfig, C as CalculateAppIDOptions, g as CancelResponse, h as CancelSuccessResponse, i as ChainID, j as CheckoutCreatedResponse, k as CreateSubscriptionOptions, l as CreateSubscriptionResponse, m as CreditPurchaseResponse, D as DeployAppOptions, n as DeployAppOpts, o as DeployOptions, p as DeployProgressCallback, q as DeployResult, r as DeployStep, s as DockerImageConfig, E as EnvironmentConfig, t as EstimateGasOptions, u as ExecuteDeployBatchedOptions, v as ExecuteDeployResult, w as ExecuteDeploySequentialOptions, x as ExecuteUpgradeResult, G as GasEstimate, y as GasOpts, z as GetSubscriptionOptions, I as ImageDigestResult, F as IsDelegatedOptions, L as LifecycleOpts, H as Logger, N as NoActiveSubscriptionResponse, P as ParsedEnvironment, J as PaymentIssueResponse, K as PaymentMethod, M as PaymentMethodsResponse, O as PrepareDeployBatchOptions, Q as PrepareDeployFromVerifiableBuildOpts, R as PrepareDeployOpts, S as PrepareUpgradeBatchOptions, T as PrepareUpgradeFromVerifiableBuildOpts, U as PrepareUpgradeOpts, V as PreparedDeploy, W as PreparedDeployBatch, X as PreparedDeployData, Y as PreparedUpgrade, Z as PreparedUpgradeBatch, _ as PreparedUpgradeData, $ as ProductID, a0 as ProductSubscriptionResponse, a1 as Release, a2 as SendTransactionOptions, a3 as SequentialDeployResult, a4 as SubscribeResponse, a5 as SubscriptionLineItem, a6 as SubscriptionOpts, a7 as SubscriptionStatus, a8 as SuspendOptions, a9 as UndelegateOptions, aa as UpgradeAppOptions, ab as UpgradeAppOpts, ac as calculateAppID, ad as deployApp, ae as estimateTransactionGas, af as executeDeployBatch, ag as executeDeployBatched, ah as executeDeploySequential, ai as executeUpgradeBatch, aj as formatETH, ak as getActiveAppCount, al as getAllAppsByDeveloper, am as getAppsByBillingAccount, an as getAppsByCreator, ao as getAppsByDeveloper, ap as getBillingType, aq as getMaxActiveAppsPerUser, ar as isDelegated, as as logVisibility, at as noopLogger, au as prepareDeployBatch, av as prepareUpgradeBatch, aw as sendAndWaitForTransaction, ax as supportsEIP5792, ay as supportsEIP7702, az as suspend, aA as undelegate, aB as upgradeApp } from './index-
|
|
3
|
-
import { C as ComputeApiConfig, S as SessionInfo, a as SessionError, b as SiweMessageParams } from './helpers-
|
|
4
|
-
export { A as AppInfo, c as AppInfoResponse, d as AppMetrics, e as AppProfileInfo, B as BillingApiClient, f as BillingApiClientOptions, g as BillingApiConfig, h as BillingLoginRequest, i as BillingLoginResult, j as BillingSessionError, k as BillingSessionInfo, l as CreateAppParams, E as EstimateBatchGasOptions, m as ExecuteBatchOptions, n as Execution, G as GeneratedKey, L as LogVisibility, o as LoginRequest, p as LoginResult, q as LogsParams, r as SiweMessageResult, U as UserApiClient, s as UserApiClientOptions, t as addHexPrefix, u as assertValidImageReference, v as assertValidPrivateKey, w as checkERC7702Delegation, x as createSiweMessage, y as estimateBatchGas, z as executeBatch, D as extractAppNameFromImage, F as generateNewPrivateKey, H as generateNonce, I as getAvailableEnvironments, J as getBillingApiSession, K as getBillingEnvironmentConfig, M as getBuildType, N as getChainFromID, O as getComputeApiSession, P as getEnvironmentConfig, Q as isBillingSessionValid, R as isEnvironmentAvailable, T as isMainnet, V as isSessionValid, W as isSiweMessageExpired, X as isSiweMessageNotYetValid, Y as isSubscriptionActive, Z as loginToBillingApi, _ as loginToBothApis, $ as loginToComputeApi, a0 as logoutFromBillingApi, a1 as logoutFromBothApis, a2 as logoutFromComputeApi, a3 as parseSiweMessage, a4 as sanitizeString, a5 as sanitizeURL, a6 as sanitizeXURL, a7 as stripHexPrefix, a8 as validateAppID, a9 as validateAppName, aa as validateCreateAppParams, ab as validateDescription, ac as validateImageReference, ad as validateInstanceTypeSKU, ae as validateLogVisibility, af as validateLogsParams, ag as validatePrivateKeyFormat, ah as validateURL, ai as validateXURL } from './helpers-
|
|
1
|
+
import { A as AppId } from './index-XhjPvHIY.cjs';
|
|
2
|
+
export { a as AlreadyActiveResponse, b as AppConfig, c as AppProfile, d as AppProfileResponse, e as AppRecord, B as BatchedDeployResult, f as BillingEnvironmentConfig, C as CalculateAppIDOptions, g as CancelResponse, h as CancelSuccessResponse, i as ChainID, j as CheckoutCreatedResponse, k as CreateSubscriptionOptions, l as CreateSubscriptionResponse, m as CreditPurchaseResponse, D as DeployAppOptions, n as DeployAppOpts, o as DeployOptions, p as DeployProgressCallback, q as DeployResult, r as DeployStep, s as DockerImageConfig, E as EnvironmentConfig, t as EstimateGasOptions, u as ExecuteDeployBatchedOptions, v as ExecuteDeployResult, w as ExecuteDeploySequentialOptions, x as ExecuteUpgradeResult, G as GasEstimate, y as GasOpts, z as GetSubscriptionOptions, I as ImageDigestResult, F as IsDelegatedOptions, L as LifecycleOpts, H as Logger, N as NoActiveSubscriptionResponse, P as ParsedEnvironment, J as PaymentIssueResponse, K as PaymentMethod, M as PaymentMethodsResponse, O as PrepareDeployBatchOptions, Q as PrepareDeployFromVerifiableBuildOpts, R as PrepareDeployOpts, S as PrepareUpgradeBatchOptions, T as PrepareUpgradeFromVerifiableBuildOpts, U as PrepareUpgradeOpts, V as PreparedDeploy, W as PreparedDeployBatch, X as PreparedDeployData, Y as PreparedUpgrade, Z as PreparedUpgradeBatch, _ as PreparedUpgradeData, $ as ProductID, a0 as ProductSubscriptionResponse, a1 as Release, a2 as SendTransactionOptions, a3 as SequentialDeployResult, a4 as SubscribeResponse, a5 as SubscriptionLineItem, a6 as SubscriptionOpts, a7 as SubscriptionStatus, a8 as SuspendOptions, a9 as UndelegateOptions, aa as UpgradeAppOptions, ab as UpgradeAppOpts, ac as calculateAppID, ad as deployApp, ae as estimateTransactionGas, af as executeDeployBatch, ag as executeDeployBatched, ah as executeDeploySequential, ai as executeUpgradeBatch, aj as formatETH, ak as getActiveAppCount, al as getAllAppsByDeveloper, am as getAppsByBillingAccount, an as getAppsByCreator, ao as getAppsByDeveloper, ap as getBillingType, aq as getMaxActiveAppsPerUser, ar as isDelegated, as as logVisibility, at as noopLogger, au as prepareDeployBatch, av as prepareUpgradeBatch, aw as sendAndWaitForTransaction, ax as supportsEIP5792, ay as supportsEIP7702, az as suspend, aA as undelegate, aB as upgradeApp } from './index-XhjPvHIY.cjs';
|
|
3
|
+
import { C as ComputeApiConfig, S as SessionInfo, a as SessionError, b as SiweMessageParams } from './helpers-BVSe7yTf.cjs';
|
|
4
|
+
export { A as AppInfo, c as AppInfoResponse, d as AppMetrics, e as AppProfileInfo, B as BillingApiClient, f as BillingApiClientOptions, g as BillingApiConfig, h as BillingLoginRequest, i as BillingLoginResult, j as BillingSessionError, k as BillingSessionInfo, l as CreateAppParams, E as EstimateBatchGasOptions, m as ExecuteBatchOptions, n as Execution, G as GeneratedKey, L as LogVisibility, o as LoginRequest, p as LoginResult, q as LogsParams, r as SiweMessageResult, U as UserApiClient, s as UserApiClientOptions, t as addHexPrefix, u as assertValidImageReference, v as assertValidPrivateKey, w as checkERC7702Delegation, x as createSiweMessage, y as estimateBatchGas, z as executeBatch, D as extractAppNameFromImage, F as generateNewPrivateKey, H as generateNonce, I as getAvailableEnvironments, J as getBillingApiSession, K as getBillingEnvironmentConfig, M as getBuildType, N as getChainFromID, O as getComputeApiSession, P as getEnvironmentConfig, Q as isBillingSessionValid, R as isEnvironmentAvailable, T as isMainnet, V as isSessionValid, W as isSiweMessageExpired, X as isSiweMessageNotYetValid, Y as isSubscriptionActive, Z as loginToBillingApi, _ as loginToBothApis, $ as loginToComputeApi, a0 as logoutFromBillingApi, a1 as logoutFromBothApis, a2 as logoutFromComputeApi, a3 as parseSiweMessage, a4 as sanitizeString, a5 as sanitizeURL, a6 as sanitizeXURL, a7 as stripHexPrefix, a8 as validateAppID, a9 as validateAppName, aa as validateCreateAppParams, ab as validateDescription, ac as validateImageReference, ad as validateInstanceTypeSKU, ae as validateLogVisibility, af as validateLogsParams, ag as validatePrivateKeyFormat, ah as validateURL, ai as validateXURL } from './helpers-BVSe7yTf.cjs';
|
|
5
5
|
import { WalletClient, Address, Hex } from 'viem';
|
|
6
6
|
import { Buffer as Buffer$1 } from 'buffer';
|
|
7
7
|
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as AppId } from './index-
|
|
2
|
-
export { a as AlreadyActiveResponse, b as AppConfig, c as AppProfile, d as AppProfileResponse, e as AppRecord, B as BatchedDeployResult, f as BillingEnvironmentConfig, C as CalculateAppIDOptions, g as CancelResponse, h as CancelSuccessResponse, i as ChainID, j as CheckoutCreatedResponse, k as CreateSubscriptionOptions, l as CreateSubscriptionResponse, m as CreditPurchaseResponse, D as DeployAppOptions, n as DeployAppOpts, o as DeployOptions, p as DeployProgressCallback, q as DeployResult, r as DeployStep, s as DockerImageConfig, E as EnvironmentConfig, t as EstimateGasOptions, u as ExecuteDeployBatchedOptions, v as ExecuteDeployResult, w as ExecuteDeploySequentialOptions, x as ExecuteUpgradeResult, G as GasEstimate, y as GasOpts, z as GetSubscriptionOptions, I as ImageDigestResult, F as IsDelegatedOptions, L as LifecycleOpts, H as Logger, N as NoActiveSubscriptionResponse, P as ParsedEnvironment, J as PaymentIssueResponse, K as PaymentMethod, M as PaymentMethodsResponse, O as PrepareDeployBatchOptions, Q as PrepareDeployFromVerifiableBuildOpts, R as PrepareDeployOpts, S as PrepareUpgradeBatchOptions, T as PrepareUpgradeFromVerifiableBuildOpts, U as PrepareUpgradeOpts, V as PreparedDeploy, W as PreparedDeployBatch, X as PreparedDeployData, Y as PreparedUpgrade, Z as PreparedUpgradeBatch, _ as PreparedUpgradeData, $ as ProductID, a0 as ProductSubscriptionResponse, a1 as Release, a2 as SendTransactionOptions, a3 as SequentialDeployResult, a4 as SubscribeResponse, a5 as SubscriptionLineItem, a6 as SubscriptionOpts, a7 as SubscriptionStatus, a8 as SuspendOptions, a9 as UndelegateOptions, aa as UpgradeAppOptions, ab as UpgradeAppOpts, ac as calculateAppID, ad as deployApp, ae as estimateTransactionGas, af as executeDeployBatch, ag as executeDeployBatched, ah as executeDeploySequential, ai as executeUpgradeBatch, aj as formatETH, ak as getActiveAppCount, al as getAllAppsByDeveloper, am as getAppsByBillingAccount, an as getAppsByCreator, ao as getAppsByDeveloper, ap as getBillingType, aq as getMaxActiveAppsPerUser, ar as isDelegated, as as logVisibility, at as noopLogger, au as prepareDeployBatch, av as prepareUpgradeBatch, aw as sendAndWaitForTransaction, ax as supportsEIP5792, ay as supportsEIP7702, az as suspend, aA as undelegate, aB as upgradeApp } from './index-
|
|
3
|
-
import { C as ComputeApiConfig, S as SessionInfo, a as SessionError, b as SiweMessageParams } from './helpers-
|
|
4
|
-
export { A as AppInfo, c as AppInfoResponse, d as AppMetrics, e as AppProfileInfo, B as BillingApiClient, f as BillingApiClientOptions, g as BillingApiConfig, h as BillingLoginRequest, i as BillingLoginResult, j as BillingSessionError, k as BillingSessionInfo, l as CreateAppParams, E as EstimateBatchGasOptions, m as ExecuteBatchOptions, n as Execution, G as GeneratedKey, L as LogVisibility, o as LoginRequest, p as LoginResult, q as LogsParams, r as SiweMessageResult, U as UserApiClient, s as UserApiClientOptions, t as addHexPrefix, u as assertValidImageReference, v as assertValidPrivateKey, w as checkERC7702Delegation, x as createSiweMessage, y as estimateBatchGas, z as executeBatch, D as extractAppNameFromImage, F as generateNewPrivateKey, H as generateNonce, I as getAvailableEnvironments, J as getBillingApiSession, K as getBillingEnvironmentConfig, M as getBuildType, N as getChainFromID, O as getComputeApiSession, P as getEnvironmentConfig, Q as isBillingSessionValid, R as isEnvironmentAvailable, T as isMainnet, V as isSessionValid, W as isSiweMessageExpired, X as isSiweMessageNotYetValid, Y as isSubscriptionActive, Z as loginToBillingApi, _ as loginToBothApis, $ as loginToComputeApi, a0 as logoutFromBillingApi, a1 as logoutFromBothApis, a2 as logoutFromComputeApi, a3 as parseSiweMessage, a4 as sanitizeString, a5 as sanitizeURL, a6 as sanitizeXURL, a7 as stripHexPrefix, a8 as validateAppID, a9 as validateAppName, aa as validateCreateAppParams, ab as validateDescription, ac as validateImageReference, ad as validateInstanceTypeSKU, ae as validateLogVisibility, af as validateLogsParams, ag as validatePrivateKeyFormat, ah as validateURL, ai as validateXURL } from './helpers-
|
|
1
|
+
import { A as AppId } from './index-XhjPvHIY.js';
|
|
2
|
+
export { a as AlreadyActiveResponse, b as AppConfig, c as AppProfile, d as AppProfileResponse, e as AppRecord, B as BatchedDeployResult, f as BillingEnvironmentConfig, C as CalculateAppIDOptions, g as CancelResponse, h as CancelSuccessResponse, i as ChainID, j as CheckoutCreatedResponse, k as CreateSubscriptionOptions, l as CreateSubscriptionResponse, m as CreditPurchaseResponse, D as DeployAppOptions, n as DeployAppOpts, o as DeployOptions, p as DeployProgressCallback, q as DeployResult, r as DeployStep, s as DockerImageConfig, E as EnvironmentConfig, t as EstimateGasOptions, u as ExecuteDeployBatchedOptions, v as ExecuteDeployResult, w as ExecuteDeploySequentialOptions, x as ExecuteUpgradeResult, G as GasEstimate, y as GasOpts, z as GetSubscriptionOptions, I as ImageDigestResult, F as IsDelegatedOptions, L as LifecycleOpts, H as Logger, N as NoActiveSubscriptionResponse, P as ParsedEnvironment, J as PaymentIssueResponse, K as PaymentMethod, M as PaymentMethodsResponse, O as PrepareDeployBatchOptions, Q as PrepareDeployFromVerifiableBuildOpts, R as PrepareDeployOpts, S as PrepareUpgradeBatchOptions, T as PrepareUpgradeFromVerifiableBuildOpts, U as PrepareUpgradeOpts, V as PreparedDeploy, W as PreparedDeployBatch, X as PreparedDeployData, Y as PreparedUpgrade, Z as PreparedUpgradeBatch, _ as PreparedUpgradeData, $ as ProductID, a0 as ProductSubscriptionResponse, a1 as Release, a2 as SendTransactionOptions, a3 as SequentialDeployResult, a4 as SubscribeResponse, a5 as SubscriptionLineItem, a6 as SubscriptionOpts, a7 as SubscriptionStatus, a8 as SuspendOptions, a9 as UndelegateOptions, aa as UpgradeAppOptions, ab as UpgradeAppOpts, ac as calculateAppID, ad as deployApp, ae as estimateTransactionGas, af as executeDeployBatch, ag as executeDeployBatched, ah as executeDeploySequential, ai as executeUpgradeBatch, aj as formatETH, ak as getActiveAppCount, al as getAllAppsByDeveloper, am as getAppsByBillingAccount, an as getAppsByCreator, ao as getAppsByDeveloper, ap as getBillingType, aq as getMaxActiveAppsPerUser, ar as isDelegated, as as logVisibility, at as noopLogger, au as prepareDeployBatch, av as prepareUpgradeBatch, aw as sendAndWaitForTransaction, ax as supportsEIP5792, ay as supportsEIP7702, az as suspend, aA as undelegate, aB as upgradeApp } from './index-XhjPvHIY.js';
|
|
3
|
+
import { C as ComputeApiConfig, S as SessionInfo, a as SessionError, b as SiweMessageParams } from './helpers-B8KBOdM4.js';
|
|
4
|
+
export { A as AppInfo, c as AppInfoResponse, d as AppMetrics, e as AppProfileInfo, B as BillingApiClient, f as BillingApiClientOptions, g as BillingApiConfig, h as BillingLoginRequest, i as BillingLoginResult, j as BillingSessionError, k as BillingSessionInfo, l as CreateAppParams, E as EstimateBatchGasOptions, m as ExecuteBatchOptions, n as Execution, G as GeneratedKey, L as LogVisibility, o as LoginRequest, p as LoginResult, q as LogsParams, r as SiweMessageResult, U as UserApiClient, s as UserApiClientOptions, t as addHexPrefix, u as assertValidImageReference, v as assertValidPrivateKey, w as checkERC7702Delegation, x as createSiweMessage, y as estimateBatchGas, z as executeBatch, D as extractAppNameFromImage, F as generateNewPrivateKey, H as generateNonce, I as getAvailableEnvironments, J as getBillingApiSession, K as getBillingEnvironmentConfig, M as getBuildType, N as getChainFromID, O as getComputeApiSession, P as getEnvironmentConfig, Q as isBillingSessionValid, R as isEnvironmentAvailable, T as isMainnet, V as isSessionValid, W as isSiweMessageExpired, X as isSiweMessageNotYetValid, Y as isSubscriptionActive, Z as loginToBillingApi, _ as loginToBothApis, $ as loginToComputeApi, a0 as logoutFromBillingApi, a1 as logoutFromBothApis, a2 as logoutFromComputeApi, a3 as parseSiweMessage, a4 as sanitizeString, a5 as sanitizeURL, a6 as sanitizeXURL, a7 as stripHexPrefix, a8 as validateAppID, a9 as validateAppName, aa as validateCreateAppParams, ab as validateDescription, ac as validateImageReference, ad as validateInstanceTypeSKU, ae as validateLogVisibility, af as validateLogsParams, ag as validatePrivateKeyFormat, ah as validateURL, ai as validateXURL } from './helpers-B8KBOdM4.js';
|
|
5
5
|
import { WalletClient, Address, Hex } from 'viem';
|
|
6
6
|
import { Buffer as Buffer$1 } from 'buffer';
|
|
7
7
|
|
package/dist/browser.js
CHANGED
|
@@ -179,6 +179,9 @@ var BILLING_ENVIRONMENTS = {
|
|
|
179
179
|
billingApiServerURL: "https://billingapi.eigencloud.xyz"
|
|
180
180
|
}
|
|
181
181
|
};
|
|
182
|
+
var PLATFORM_ENV_TESTNET_SEPOLIA = "testnet-sepolia";
|
|
183
|
+
var PLATFORM_ENV_MAINNET_ETHEREUM = "mainnet-ethereum";
|
|
184
|
+
var DEFAULT_APP_BASE_DOMAIN = "eigencloud.xyz";
|
|
182
185
|
var ENVIRONMENTS = {
|
|
183
186
|
"sepolia-dev": {
|
|
184
187
|
name: "sepolia",
|
|
@@ -189,7 +192,9 @@ var ENVIRONMENTS = {
|
|
|
189
192
|
kmsServerURL: "http://10.128.0.57:8080",
|
|
190
193
|
userApiServerURL: "https://userapi-compute-sepolia-dev.eigencloud.xyz",
|
|
191
194
|
defaultRPCURL: "https://ethereum-sepolia-rpc.publicnode.com",
|
|
192
|
-
usdcCreditsAddress: "0xbdA3897c3A428763B59015C64AB766c288C97376"
|
|
195
|
+
usdcCreditsAddress: "0xbdA3897c3A428763B59015C64AB766c288C97376",
|
|
196
|
+
platformEnv: PLATFORM_ENV_TESTNET_SEPOLIA,
|
|
197
|
+
appBaseDomain: DEFAULT_APP_BASE_DOMAIN
|
|
193
198
|
},
|
|
194
199
|
sepolia: {
|
|
195
200
|
name: "sepolia",
|
|
@@ -201,7 +206,9 @@ var ENVIRONMENTS = {
|
|
|
201
206
|
userApiServerURL: "https://userapi-compute-sepolia-prod.eigencloud.xyz",
|
|
202
207
|
defaultRPCURL: "https://ethereum-sepolia-rpc.publicnode.com",
|
|
203
208
|
billingRPCURL: "https://ethereum-rpc.publicnode.com",
|
|
204
|
-
usdcCreditsAddress: "0xed9c88640ca9149Bd9f7ee6620074af10F2E145d"
|
|
209
|
+
usdcCreditsAddress: "0xed9c88640ca9149Bd9f7ee6620074af10F2E145d",
|
|
210
|
+
platformEnv: PLATFORM_ENV_TESTNET_SEPOLIA,
|
|
211
|
+
appBaseDomain: DEFAULT_APP_BASE_DOMAIN
|
|
205
212
|
},
|
|
206
213
|
"mainnet-alpha": {
|
|
207
214
|
name: "mainnet-alpha",
|
|
@@ -212,7 +219,9 @@ var ENVIRONMENTS = {
|
|
|
212
219
|
kmsServerURL: "http://10.128.0.2:8080",
|
|
213
220
|
userApiServerURL: "https://userapi-compute.eigencloud.xyz",
|
|
214
221
|
defaultRPCURL: "https://ethereum-rpc.publicnode.com",
|
|
215
|
-
usdcCreditsAddress: "0xed9c88640ca9149Bd9f7ee6620074af10F2E145d"
|
|
222
|
+
usdcCreditsAddress: "0xed9c88640ca9149Bd9f7ee6620074af10F2E145d",
|
|
223
|
+
platformEnv: PLATFORM_ENV_MAINNET_ETHEREUM,
|
|
224
|
+
appBaseDomain: DEFAULT_APP_BASE_DOMAIN
|
|
216
225
|
}
|
|
217
226
|
};
|
|
218
227
|
var CHAIN_ID_TO_ENVIRONMENT = {
|
|
@@ -629,7 +638,7 @@ var CanViewAppLogsPermission = "0x2fd3f2fe";
|
|
|
629
638
|
var CanViewSensitiveAppInfoPermission = "0x0e67b22f";
|
|
630
639
|
var CanUpdateAppProfilePermission = "0x036fef61";
|
|
631
640
|
function getDefaultClientId() {
|
|
632
|
-
const version = true ? "1.0.0-
|
|
641
|
+
const version = true ? "1.0.0-devep4" : "0.0.0";
|
|
633
642
|
return `ecloud-sdk/v${version}`;
|
|
634
643
|
}
|
|
635
644
|
var UserApiClient = class {
|
|
@@ -664,6 +673,7 @@ var UserApiClient = class {
|
|
|
664
673
|
status: app.app_status,
|
|
665
674
|
ip: app.ip,
|
|
666
675
|
machineType: app.machine_type,
|
|
676
|
+
hostname: app.hostname,
|
|
667
677
|
profile: app.profile,
|
|
668
678
|
metrics: app.metrics,
|
|
669
679
|
evmAddresses,
|
|
@@ -729,6 +739,28 @@ var UserApiClient = class {
|
|
|
729
739
|
status: app.app_status || app.App_Status || ""
|
|
730
740
|
}));
|
|
731
741
|
}
|
|
742
|
+
/**
|
|
743
|
+
* Get deployments for an app from the gRPC-gateway endpoint.
|
|
744
|
+
* Returns deployment records including upgrade_phase for tracking upgrade progress.
|
|
745
|
+
*
|
|
746
|
+
* Endpoint: GET /v1/apps/:appAddress/deployments
|
|
747
|
+
*/
|
|
748
|
+
async getDeployments(appAddress) {
|
|
749
|
+
const endpoint = `${this.config.userApiServerURL}/v1/apps/${appAddress}/deployments`;
|
|
750
|
+
const response = await this.makeEIP712AuthenticatedRequest(endpoint);
|
|
751
|
+
const result = await response.json();
|
|
752
|
+
const deployments = result.deployments || [];
|
|
753
|
+
return deployments.map((dep) => ({
|
|
754
|
+
id: dep.id || "",
|
|
755
|
+
externalId: dep.external_id || dep.externalId || "",
|
|
756
|
+
endpoint: dep.endpoint || "",
|
|
757
|
+
releaseId: dep.release_id || dep.releaseId || "",
|
|
758
|
+
upgradePhase: dep.upgrade_phase || dep.upgradePhase || "",
|
|
759
|
+
replacesDeploymentId: dep.replaces_deployment_id || dep.replacesDeploymentId || "",
|
|
760
|
+
createdAt: dep.created_at || dep.createdAt || "",
|
|
761
|
+
updatedAt: dep.updated_at || dep.updatedAt || ""
|
|
762
|
+
}));
|
|
763
|
+
}
|
|
732
764
|
/**
|
|
733
765
|
* Upload app profile information with optional image
|
|
734
766
|
*
|
|
@@ -862,6 +894,48 @@ Please check:
|
|
|
862
894
|
"X-eigenx-expiry": expiry.toString()
|
|
863
895
|
};
|
|
864
896
|
}
|
|
897
|
+
/**
|
|
898
|
+
* Make an EIP-712 authenticated request to the gRPC-gateway endpoints.
|
|
899
|
+
* Uses the billing/compute auth pattern: Authorization + X-Account + X-Expiry headers.
|
|
900
|
+
*/
|
|
901
|
+
async makeEIP712AuthenticatedRequest(url) {
|
|
902
|
+
const expiry = BigInt(Math.floor(Date.now() / 1e3) + 5 * 60);
|
|
903
|
+
const { signature } = await calculateBillingAuthSignature({
|
|
904
|
+
walletClient: this.walletClient,
|
|
905
|
+
product: "compute",
|
|
906
|
+
expiry
|
|
907
|
+
});
|
|
908
|
+
const headers = {
|
|
909
|
+
Authorization: `Bearer ${signature}`,
|
|
910
|
+
"X-Account": this.address,
|
|
911
|
+
"X-Expiry": expiry.toString(),
|
|
912
|
+
"x-client-id": this.clientId
|
|
913
|
+
};
|
|
914
|
+
try {
|
|
915
|
+
const response = await requestWithRetry({
|
|
916
|
+
method: "GET",
|
|
917
|
+
url,
|
|
918
|
+
headers,
|
|
919
|
+
maxRedirects: 0,
|
|
920
|
+
withCredentials: true
|
|
921
|
+
});
|
|
922
|
+
const status = response.status;
|
|
923
|
+
if (status < 200 || status >= 300) {
|
|
924
|
+
const body = typeof response.data === "string" ? response.data : JSON.stringify(response.data);
|
|
925
|
+
throw new Error(`gRPC-gateway request failed: ${status} - ${body}`);
|
|
926
|
+
}
|
|
927
|
+
return {
|
|
928
|
+
json: async () => response.data,
|
|
929
|
+
text: async () => typeof response.data === "string" ? response.data : JSON.stringify(response.data)
|
|
930
|
+
};
|
|
931
|
+
} catch (error) {
|
|
932
|
+
if (error.message?.includes("fetch failed") || error.message?.includes("ECONNREFUSED") || error.message?.includes("ENOTFOUND") || error.cause) {
|
|
933
|
+
const cause = error.cause?.message || error.cause || error.message;
|
|
934
|
+
throw new Error(`Failed to connect to API at ${url}: ${cause}`);
|
|
935
|
+
}
|
|
936
|
+
throw error;
|
|
937
|
+
}
|
|
938
|
+
}
|
|
865
939
|
// ==========================================================================
|
|
866
940
|
// SIWE Session Management
|
|
867
941
|
// ==========================================================================
|