@layr-labs/ecloud-sdk 1.0.0-devep4 → 1.0.0-devep5

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 CHANGED
@@ -1,2 +1,2 @@
1
- version=1.0.0-devep4
2
- commit=d34097bc2cac7cd1e0d74c3ae107481d47fbded9
1
+ version=1.0.0-devep5
2
+ commit=8c8210ee1e833160b553cf2c9549908f55a0a88c
package/dist/browser.cjs CHANGED
@@ -749,7 +749,7 @@ var CanViewAppLogsPermission = "0x2fd3f2fe";
749
749
  var CanViewSensitiveAppInfoPermission = "0x0e67b22f";
750
750
  var CanUpdateAppProfilePermission = "0x036fef61";
751
751
  function getDefaultClientId() {
752
- const version = true ? "1.0.0-devep4" : "0.0.0";
752
+ const version = true ? "1.0.0-devep5" : "0.0.0";
753
753
  return `ecloud-sdk/v${version}`;
754
754
  }
755
755
  var UserApiClient = class {
package/dist/browser.js CHANGED
@@ -638,7 +638,7 @@ var CanViewAppLogsPermission = "0x2fd3f2fe";
638
638
  var CanViewSensitiveAppInfoPermission = "0x0e67b22f";
639
639
  var CanUpdateAppProfilePermission = "0x036fef61";
640
640
  function getDefaultClientId() {
641
- const version = true ? "1.0.0-devep4" : "0.0.0";
641
+ const version = true ? "1.0.0-devep5" : "0.0.0";
642
642
  return `ecloud-sdk/v${version}`;
643
643
  }
644
644
  var UserApiClient = class {
package/dist/compute.cjs CHANGED
@@ -1515,132 +1515,6 @@ async function encryptRSAOAEPAndAES256GCM(encryptionKeyPEM, plaintext, protected
1515
1515
  return jwe;
1516
1516
  }
1517
1517
 
1518
- // src/client/common/config/environment.ts
1519
- var SEPOLIA_CHAIN_ID = 11155111;
1520
- var MAINNET_CHAIN_ID = 1;
1521
- var CommonAddresses = {
1522
- ERC7702Delegator: "0x63c0c19a282a1b52b07dd5a65b58948a07dae32b"
1523
- };
1524
- var ChainAddresses = {
1525
- [MAINNET_CHAIN_ID]: {
1526
- PermissionController: "0x25E5F8B1E7aDf44518d35D5B2271f114e081f0E5"
1527
- },
1528
- [SEPOLIA_CHAIN_ID]: {
1529
- PermissionController: "0x44632dfBdCb6D3E21EF613B0ca8A6A0c618F5a37"
1530
- }
1531
- };
1532
- var PLATFORM_ENV_TESTNET_SEPOLIA = "testnet-sepolia";
1533
- var PLATFORM_ENV_MAINNET_ETHEREUM = "mainnet-ethereum";
1534
- var DEFAULT_APP_BASE_DOMAIN = "eigencloud.xyz";
1535
- var ENVIRONMENTS = {
1536
- "sepolia-dev": {
1537
- name: "sepolia",
1538
- build: "dev",
1539
- appControllerAddress: "0xa86DC1C47cb2518327fB4f9A1627F51966c83B92",
1540
- permissionControllerAddress: ChainAddresses[SEPOLIA_CHAIN_ID].PermissionController,
1541
- erc7702DelegatorAddress: CommonAddresses.ERC7702Delegator,
1542
- kmsServerURL: "http://10.128.0.57:8080",
1543
- userApiServerURL: "https://userapi-compute-sepolia-dev.eigencloud.xyz",
1544
- defaultRPCURL: "https://ethereum-sepolia-rpc.publicnode.com",
1545
- usdcCreditsAddress: "0xbdA3897c3A428763B59015C64AB766c288C97376",
1546
- platformEnv: PLATFORM_ENV_TESTNET_SEPOLIA,
1547
- appBaseDomain: DEFAULT_APP_BASE_DOMAIN
1548
- },
1549
- sepolia: {
1550
- name: "sepolia",
1551
- build: "prod",
1552
- appControllerAddress: "0x0dd810a6ffba6a9820a10d97b659f07d8d23d4E2",
1553
- permissionControllerAddress: ChainAddresses[SEPOLIA_CHAIN_ID].PermissionController,
1554
- erc7702DelegatorAddress: CommonAddresses.ERC7702Delegator,
1555
- kmsServerURL: "http://10.128.15.203:8080",
1556
- userApiServerURL: "https://userapi-compute-sepolia-prod.eigencloud.xyz",
1557
- defaultRPCURL: "https://ethereum-sepolia-rpc.publicnode.com",
1558
- billingRPCURL: "https://ethereum-rpc.publicnode.com",
1559
- usdcCreditsAddress: "0xed9c88640ca9149Bd9f7ee6620074af10F2E145d",
1560
- platformEnv: PLATFORM_ENV_TESTNET_SEPOLIA,
1561
- appBaseDomain: DEFAULT_APP_BASE_DOMAIN
1562
- },
1563
- "mainnet-alpha": {
1564
- name: "mainnet-alpha",
1565
- build: "prod",
1566
- appControllerAddress: "0xc38d35Fc995e75342A21CBd6D770305b142Fbe67",
1567
- permissionControllerAddress: ChainAddresses[MAINNET_CHAIN_ID].PermissionController,
1568
- erc7702DelegatorAddress: CommonAddresses.ERC7702Delegator,
1569
- kmsServerURL: "http://10.128.0.2:8080",
1570
- userApiServerURL: "https://userapi-compute.eigencloud.xyz",
1571
- defaultRPCURL: "https://ethereum-rpc.publicnode.com",
1572
- usdcCreditsAddress: "0xed9c88640ca9149Bd9f7ee6620074af10F2E145d",
1573
- platformEnv: PLATFORM_ENV_MAINNET_ETHEREUM,
1574
- appBaseDomain: DEFAULT_APP_BASE_DOMAIN
1575
- }
1576
- };
1577
- function derivePlatformHost(environmentConfig, appAddress) {
1578
- if (!environmentConfig.platformEnv || !environmentConfig.appBaseDomain) {
1579
- return "";
1580
- }
1581
- const addr = appAddress.toLowerCase().replace(/^0x/, "");
1582
- return `${addr}.${environmentConfig.platformEnv}.${environmentConfig.appBaseDomain}`;
1583
- }
1584
- var CHAIN_ID_TO_ENVIRONMENT = {
1585
- [SEPOLIA_CHAIN_ID.toString()]: "sepolia",
1586
- [MAINNET_CHAIN_ID.toString()]: "mainnet-alpha"
1587
- };
1588
- function getApiUrlOverride() {
1589
- const raw = process.env.ECLOUD_API_URL;
1590
- if (!raw) return void 0;
1591
- const trimmed = raw.trim().replace(/\/+$/, "");
1592
- return trimmed.length > 0 ? trimmed : void 0;
1593
- }
1594
- function getEnvironmentConfig(environment, chainID) {
1595
- const env = ENVIRONMENTS[environment];
1596
- if (!env) {
1597
- throw new Error(`Unknown environment: ${environment}`);
1598
- }
1599
- if (!isEnvironmentAvailable(environment)) {
1600
- throw new Error(
1601
- `Environment ${environment} is not available in this build type. Available environments: ${getAvailableEnvironments().join(", ")}`
1602
- );
1603
- }
1604
- if (chainID) {
1605
- const expectedEnv = CHAIN_ID_TO_ENVIRONMENT[chainID.toString()];
1606
- if (expectedEnv && expectedEnv !== environment) {
1607
- throw new Error(`Environment ${environment} does not match chain ID ${chainID}`);
1608
- }
1609
- }
1610
- const resolvedChainID = chainID || (environment === "sepolia" || environment === "sepolia-dev" ? SEPOLIA_CHAIN_ID : MAINNET_CHAIN_ID);
1611
- const apiUrlOverride = getApiUrlOverride();
1612
- return {
1613
- ...env,
1614
- chainID: BigInt(resolvedChainID),
1615
- ...apiUrlOverride ? { userApiServerURL: apiUrlOverride } : {},
1616
- ...process.env.ECLOUD_USER_API_URL && {
1617
- userApiServerURL: process.env.ECLOUD_USER_API_URL
1618
- },
1619
- ...process.env.ECLOUD_RPC_URL && {
1620
- defaultRPCURL: process.env.ECLOUD_RPC_URL
1621
- }
1622
- };
1623
- }
1624
- function getBuildType() {
1625
- const buildTimeType = true ? "dev"?.toLowerCase() : void 0;
1626
- const runtimeType = process.env.BUILD_TYPE?.toLowerCase();
1627
- const buildType = buildTimeType || runtimeType;
1628
- if (buildType === "dev") {
1629
- return "dev";
1630
- }
1631
- return "prod";
1632
- }
1633
- function getAvailableEnvironments() {
1634
- const buildType = getBuildType();
1635
- if (buildType === "dev") {
1636
- return ["sepolia-dev"];
1637
- }
1638
- return ["sepolia", "mainnet-alpha"];
1639
- }
1640
- function isEnvironmentAvailable(environment) {
1641
- return getAvailableEnvironments().includes(environment);
1642
- }
1643
-
1644
1518
  // src/client/common/env/parser.ts
1645
1519
  var fs2 = __toESM(require("fs"), 1);
1646
1520
  var MNEMONIC_ENV_VAR = "MNEMONIC";
@@ -1778,11 +1652,6 @@ Please verify the image exists: docker manifest inspect ${finalImageRef}`
1778
1652
  }
1779
1653
  publicEnv["EIGEN_MACHINE_TYPE_PUBLIC"] = instanceType;
1780
1654
  logger.info(`Instance type: ${instanceType}`);
1781
- const platformHost = derivePlatformHost(environmentConfig, options.appId);
1782
- if (platformHost !== "") {
1783
- publicEnv["ECLOUD_PLATFORM_HOST"] = platformHost;
1784
- logger.info(`Platform hostname: ${platformHost}`);
1785
- }
1786
1655
  logger.info("Encrypting environment variables...");
1787
1656
  const { encryptionKey } = getKMSKeysForEnvironment(
1788
1657
  environmentConfig.name,
@@ -5365,7 +5234,7 @@ var CanViewAppLogsPermission = "0x2fd3f2fe";
5365
5234
  var CanViewSensitiveAppInfoPermission = "0x0e67b22f";
5366
5235
  var CanUpdateAppProfilePermission = "0x036fef61";
5367
5236
  function getDefaultClientId() {
5368
- const version = true ? "1.0.0-devep4" : "0.0.0";
5237
+ const version = true ? "1.0.0-devep5" : "0.0.0";
5369
5238
  return `ecloud-sdk/v${version}`;
5370
5239
  }
5371
5240
  var UserApiClient = class {
@@ -6027,6 +5896,125 @@ function validateResourceUsageMonitoring(resourceUsageMonitoring) {
6027
5896
  }
6028
5897
  }
6029
5898
 
5899
+ // src/client/common/config/environment.ts
5900
+ var SEPOLIA_CHAIN_ID = 11155111;
5901
+ var MAINNET_CHAIN_ID = 1;
5902
+ var CommonAddresses = {
5903
+ ERC7702Delegator: "0x63c0c19a282a1b52b07dd5a65b58948a07dae32b"
5904
+ };
5905
+ var ChainAddresses = {
5906
+ [MAINNET_CHAIN_ID]: {
5907
+ PermissionController: "0x25E5F8B1E7aDf44518d35D5B2271f114e081f0E5"
5908
+ },
5909
+ [SEPOLIA_CHAIN_ID]: {
5910
+ PermissionController: "0x44632dfBdCb6D3E21EF613B0ca8A6A0c618F5a37"
5911
+ }
5912
+ };
5913
+ var PLATFORM_ENV_TESTNET_SEPOLIA = "testnet-sepolia";
5914
+ var PLATFORM_ENV_MAINNET_ETHEREUM = "mainnet-ethereum";
5915
+ var DEFAULT_APP_BASE_DOMAIN = "eigencloud.xyz";
5916
+ var ENVIRONMENTS = {
5917
+ "sepolia-dev": {
5918
+ name: "sepolia",
5919
+ build: "dev",
5920
+ appControllerAddress: "0xa86DC1C47cb2518327fB4f9A1627F51966c83B92",
5921
+ permissionControllerAddress: ChainAddresses[SEPOLIA_CHAIN_ID].PermissionController,
5922
+ erc7702DelegatorAddress: CommonAddresses.ERC7702Delegator,
5923
+ kmsServerURL: "http://10.128.0.57:8080",
5924
+ userApiServerURL: "https://userapi-compute-sepolia-dev.eigencloud.xyz",
5925
+ defaultRPCURL: "https://ethereum-sepolia-rpc.publicnode.com",
5926
+ usdcCreditsAddress: "0xbdA3897c3A428763B59015C64AB766c288C97376",
5927
+ platformEnv: PLATFORM_ENV_TESTNET_SEPOLIA,
5928
+ appBaseDomain: DEFAULT_APP_BASE_DOMAIN
5929
+ },
5930
+ sepolia: {
5931
+ name: "sepolia",
5932
+ build: "prod",
5933
+ appControllerAddress: "0x0dd810a6ffba6a9820a10d97b659f07d8d23d4E2",
5934
+ permissionControllerAddress: ChainAddresses[SEPOLIA_CHAIN_ID].PermissionController,
5935
+ erc7702DelegatorAddress: CommonAddresses.ERC7702Delegator,
5936
+ kmsServerURL: "http://10.128.15.203:8080",
5937
+ userApiServerURL: "https://userapi-compute-sepolia-prod.eigencloud.xyz",
5938
+ defaultRPCURL: "https://ethereum-sepolia-rpc.publicnode.com",
5939
+ billingRPCURL: "https://ethereum-rpc.publicnode.com",
5940
+ usdcCreditsAddress: "0xed9c88640ca9149Bd9f7ee6620074af10F2E145d",
5941
+ platformEnv: PLATFORM_ENV_TESTNET_SEPOLIA,
5942
+ appBaseDomain: DEFAULT_APP_BASE_DOMAIN
5943
+ },
5944
+ "mainnet-alpha": {
5945
+ name: "mainnet-alpha",
5946
+ build: "prod",
5947
+ appControllerAddress: "0xc38d35Fc995e75342A21CBd6D770305b142Fbe67",
5948
+ permissionControllerAddress: ChainAddresses[MAINNET_CHAIN_ID].PermissionController,
5949
+ erc7702DelegatorAddress: CommonAddresses.ERC7702Delegator,
5950
+ kmsServerURL: "http://10.128.0.2:8080",
5951
+ userApiServerURL: "https://userapi-compute.eigencloud.xyz",
5952
+ defaultRPCURL: "https://ethereum-rpc.publicnode.com",
5953
+ usdcCreditsAddress: "0xed9c88640ca9149Bd9f7ee6620074af10F2E145d",
5954
+ platformEnv: PLATFORM_ENV_MAINNET_ETHEREUM,
5955
+ appBaseDomain: DEFAULT_APP_BASE_DOMAIN
5956
+ }
5957
+ };
5958
+ var CHAIN_ID_TO_ENVIRONMENT = {
5959
+ [SEPOLIA_CHAIN_ID.toString()]: "sepolia",
5960
+ [MAINNET_CHAIN_ID.toString()]: "mainnet-alpha"
5961
+ };
5962
+ function getApiUrlOverride() {
5963
+ const raw = process.env.ECLOUD_API_URL;
5964
+ if (!raw) return void 0;
5965
+ const trimmed = raw.trim().replace(/\/+$/, "");
5966
+ return trimmed.length > 0 ? trimmed : void 0;
5967
+ }
5968
+ function getEnvironmentConfig(environment, chainID) {
5969
+ const env = ENVIRONMENTS[environment];
5970
+ if (!env) {
5971
+ throw new Error(`Unknown environment: ${environment}`);
5972
+ }
5973
+ if (!isEnvironmentAvailable(environment)) {
5974
+ throw new Error(
5975
+ `Environment ${environment} is not available in this build type. Available environments: ${getAvailableEnvironments().join(", ")}`
5976
+ );
5977
+ }
5978
+ if (chainID) {
5979
+ const expectedEnv = CHAIN_ID_TO_ENVIRONMENT[chainID.toString()];
5980
+ if (expectedEnv && expectedEnv !== environment) {
5981
+ throw new Error(`Environment ${environment} does not match chain ID ${chainID}`);
5982
+ }
5983
+ }
5984
+ const resolvedChainID = chainID || (environment === "sepolia" || environment === "sepolia-dev" ? SEPOLIA_CHAIN_ID : MAINNET_CHAIN_ID);
5985
+ const apiUrlOverride = getApiUrlOverride();
5986
+ return {
5987
+ ...env,
5988
+ chainID: BigInt(resolvedChainID),
5989
+ ...apiUrlOverride ? { userApiServerURL: apiUrlOverride } : {},
5990
+ ...process.env.ECLOUD_USER_API_URL && {
5991
+ userApiServerURL: process.env.ECLOUD_USER_API_URL
5992
+ },
5993
+ ...process.env.ECLOUD_RPC_URL && {
5994
+ defaultRPCURL: process.env.ECLOUD_RPC_URL
5995
+ }
5996
+ };
5997
+ }
5998
+ function getBuildType() {
5999
+ const buildTimeType = true ? "dev"?.toLowerCase() : void 0;
6000
+ const runtimeType = process.env.BUILD_TYPE?.toLowerCase();
6001
+ const buildType = buildTimeType || runtimeType;
6002
+ if (buildType === "dev") {
6003
+ return "dev";
6004
+ }
6005
+ return "prod";
6006
+ }
6007
+ function getAvailableEnvironments() {
6008
+ const buildType = getBuildType();
6009
+ if (buildType === "dev") {
6010
+ return ["sepolia-dev"];
6011
+ }
6012
+ return ["sepolia", "mainnet-alpha"];
6013
+ }
6014
+ function isEnvironmentAvailable(environment) {
6015
+ return getAvailableEnvironments().includes(environment);
6016
+ }
6017
+
6030
6018
  // src/client/common/utils/preflight.ts
6031
6019
  async function doPreflightChecks(options, logger) {
6032
6020
  const { walletClient, publicClient } = options;