@layr-labs/ecloud-sdk 0.1.1-dev → 0.1.2-dev

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,3 +1,3 @@
1
- export { A as AppModule, k as AppModuleConfig, C as ComputeModule, e as ComputeModuleConfig, j as createAppModule, d as createComputeModule, f as encodeStartAppData, h as encodeStopAppData, i as encodeTerminateAppData } from './compute-B_ibIORD.cjs';
2
- import './index-D-SUX3IG.cjs';
1
+ export { A as AppModule, q as AppModuleConfig, C as ComputeModule, e as ComputeModuleConfig, p as createAppModule, d as createComputeModule, f as encodeStartAppData, h as encodeStopAppData, i as encodeTerminateAppData } from './compute-BlUpqWKo.cjs';
3
2
  import 'viem';
3
+ import './index-Fb_S-Cqk.cjs';
package/dist/compute.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { A as AppModule, k as AppModuleConfig, C as ComputeModule, e as ComputeModuleConfig, j as createAppModule, d as createComputeModule, f as encodeStartAppData, h as encodeStopAppData, i as encodeTerminateAppData } from './compute-gpepEsn3.js';
2
- import './index-D-SUX3IG.js';
1
+ export { A as AppModule, q as AppModuleConfig, C as ComputeModule, e as ComputeModuleConfig, p as createAppModule, d as createComputeModule, f as encodeStartAppData, h as encodeStopAppData, i as encodeTerminateAppData } from './compute-CottWiST.js';
3
2
  import 'viem';
3
+ import './index-Fb_S-Cqk.js';
package/dist/compute.js CHANGED
@@ -4,8 +4,8 @@ import {
4
4
  encodeStartAppData,
5
5
  encodeStopAppData,
6
6
  encodeTerminateAppData
7
- } from "./chunk-X4Y6OOUS.js";
8
- import "./chunk-AXSYVG7H.js";
7
+ } from "./chunk-XDS4EF4J.js";
8
+ import "./chunk-JLZOAV5R.js";
9
9
  export {
10
10
  createAppModule,
11
11
  createComputeModule,
@@ -1,4 +1,4 @@
1
- import { Address } from 'viem';
1
+ import { Address, Hex } from 'viem';
2
2
 
3
3
  /**
4
4
  * Core types for ECloud SDK
@@ -41,6 +41,98 @@ interface UpgradeAppOpts {
41
41
  maxPriorityFeePerGas?: bigint;
42
42
  };
43
43
  }
44
+ /** Options for prepareDeploy */
45
+ interface PrepareDeployOpts {
46
+ /** App name - required */
47
+ name: string;
48
+ /** Path to Dockerfile (if building from Dockerfile) */
49
+ dockerfile?: string;
50
+ /** Path to .env file - optional */
51
+ envFile?: string;
52
+ /** Image reference (registry/path:tag) */
53
+ imageRef?: string;
54
+ /** Instance type SKU - required */
55
+ instanceType: string;
56
+ /** Log visibility setting - required */
57
+ logVisibility: logVisibility;
58
+ /** Resource usage monitoring setting - optional */
59
+ resourceUsageMonitoring?: "enable" | "disable";
60
+ }
61
+ /** Options for prepareUpgrade */
62
+ interface PrepareUpgradeOpts {
63
+ /** Path to Dockerfile (if building from Dockerfile) */
64
+ dockerfile?: string;
65
+ /** Image reference (registry/path:tag) */
66
+ imageRef?: string;
67
+ /** Path to .env file - optional */
68
+ envFile?: string;
69
+ /** Instance type SKU - required */
70
+ instanceType: string;
71
+ /** Log visibility setting - required */
72
+ logVisibility: logVisibility;
73
+ /** Resource usage monitoring setting - optional */
74
+ resourceUsageMonitoring?: "enable" | "disable";
75
+ }
76
+ /** Gas options for execute functions */
77
+ interface GasOpts {
78
+ maxFeePerGas?: bigint;
79
+ maxPriorityFeePerGas?: bigint;
80
+ }
81
+ /** Result from executeDeploy */
82
+ interface ExecuteDeployResult {
83
+ appId: AppId;
84
+ txHash: Hex;
85
+ appName: string;
86
+ imageRef: string;
87
+ }
88
+ /** Result from executeUpgrade */
89
+ interface ExecuteUpgradeResult {
90
+ appId: AppId;
91
+ txHash: Hex;
92
+ imageRef: string;
93
+ }
94
+ /** Data-only batch for deploy (clients provided by module) */
95
+ interface PreparedDeployData {
96
+ /** The app ID that will be deployed */
97
+ appId: AppId;
98
+ /** The salt used for deployment */
99
+ salt: Uint8Array;
100
+ /** Batch executions to be sent */
101
+ executions: Array<{
102
+ target: Address;
103
+ value: bigint;
104
+ callData: Hex;
105
+ }>;
106
+ }
107
+ /** Data-only batch for upgrade (clients provided by module) */
108
+ interface PreparedUpgradeData {
109
+ /** The app ID being upgraded */
110
+ appId: AppId;
111
+ /** Batch executions to be sent */
112
+ executions: Array<{
113
+ target: Address;
114
+ value: bigint;
115
+ callData: Hex;
116
+ }>;
117
+ }
118
+ /** Prepared deployment ready for execution */
119
+ interface PreparedDeploy {
120
+ /** The prepared data (executions, appId, etc.) */
121
+ data: PreparedDeployData;
122
+ /** App name */
123
+ appName: string;
124
+ /** Final image reference */
125
+ imageRef: string;
126
+ }
127
+ /** Prepared upgrade ready for execution */
128
+ interface PreparedUpgrade {
129
+ /** The prepared data (executions, appId, etc.) */
130
+ data: PreparedUpgradeData;
131
+ /** App ID being upgraded */
132
+ appId: AppId;
133
+ /** Final image reference */
134
+ imageRef: string;
135
+ }
44
136
  interface LifecycleOpts {
45
137
  gas?: {
46
138
  maxFeePerGas?: bigint;
@@ -49,7 +141,7 @@ interface LifecycleOpts {
49
141
  }
50
142
  interface AppRecord {
51
143
  id: AppId;
52
- owner: `0x${string}`;
144
+ owner: Address;
53
145
  image: string;
54
146
  status: "starting" | "running" | "stopped" | "terminated";
55
147
  createdAt: number;
@@ -77,7 +169,7 @@ interface DeployOptions {
77
169
  }
78
170
  interface DeployResult {
79
171
  /** App ID (contract address) */
80
- appId: string;
172
+ appId: AppId;
81
173
  /** App name */
82
174
  appName: string;
83
175
  /** Final image reference */
@@ -85,13 +177,13 @@ interface DeployResult {
85
177
  /** IP address (if available) */
86
178
  ipAddress?: string;
87
179
  /** Transaction hash */
88
- txHash: `0x${string}`;
180
+ txHash: Hex;
89
181
  }
90
182
  interface EnvironmentConfig {
91
183
  name: string;
92
184
  build: "dev" | "prod";
93
185
  chainID: bigint;
94
- appControllerAddress: string;
186
+ appControllerAddress: Address;
95
187
  permissionControllerAddress: string;
96
188
  erc7702DelegatorAddress: string;
97
189
  kmsServerURL: string;
@@ -215,4 +307,4 @@ interface BillingEnvironmentConfig {
215
307
  billingApiServerURL: string;
216
308
  }
217
309
 
218
- export type { AppId as A, BillingEnvironmentConfig as B, ChainID as C, DeployResult as D, EnvironmentConfig as E, ImageDigestResult as I, Logger as L, NoActiveSubscriptionResponse as N, ParsedEnvironment as P, Release as R, SubscriptionStatus as S, UpgradeAppOpts as U, DeployAppOpts as a, LifecycleOpts as b, AppRecord as c, DeployOptions as d, DockerImageConfig as e, AppProfile as f, AppProfileResponse as g, ProductID as h, SubscriptionLineItem as i, CreateSubscriptionResponse as j, CheckoutCreatedResponse as k, logVisibility as l, AlreadyActiveResponse as m, PaymentIssueResponse as n, SubscribeResponse as o, CancelSuccessResponse as p, CancelResponse as q, ProductSubscriptionResponse as r, SubscriptionOpts as s };
310
+ export type { AppId as A, BillingEnvironmentConfig as B, ChainID as C, DeployResult as D, EnvironmentConfig as E, SubscriptionOpts as F, GasOpts as G, ImageDigestResult as I, Logger as L, NoActiveSubscriptionResponse as N, PreparedDeploy as P, Release as R, SubscriptionStatus as S, UpgradeAppOpts as U, PreparedUpgrade as a, DeployAppOpts as b, PrepareDeployOpts as c, PrepareUpgradeOpts as d, ExecuteDeployResult as e, ExecuteUpgradeResult as f, PreparedDeployData as g, PreparedUpgradeData as h, LifecycleOpts as i, AppRecord as j, DeployOptions as k, logVisibility as l, ParsedEnvironment as m, DockerImageConfig as n, AppProfile as o, AppProfileResponse as p, ProductID as q, SubscriptionLineItem as r, CreateSubscriptionResponse as s, CheckoutCreatedResponse as t, AlreadyActiveResponse as u, PaymentIssueResponse as v, SubscribeResponse as w, CancelSuccessResponse as x, CancelResponse as y, ProductSubscriptionResponse as z };
@@ -1,4 +1,4 @@
1
- import { Address } from 'viem';
1
+ import { Address, Hex } from 'viem';
2
2
 
3
3
  /**
4
4
  * Core types for ECloud SDK
@@ -41,6 +41,98 @@ interface UpgradeAppOpts {
41
41
  maxPriorityFeePerGas?: bigint;
42
42
  };
43
43
  }
44
+ /** Options for prepareDeploy */
45
+ interface PrepareDeployOpts {
46
+ /** App name - required */
47
+ name: string;
48
+ /** Path to Dockerfile (if building from Dockerfile) */
49
+ dockerfile?: string;
50
+ /** Path to .env file - optional */
51
+ envFile?: string;
52
+ /** Image reference (registry/path:tag) */
53
+ imageRef?: string;
54
+ /** Instance type SKU - required */
55
+ instanceType: string;
56
+ /** Log visibility setting - required */
57
+ logVisibility: logVisibility;
58
+ /** Resource usage monitoring setting - optional */
59
+ resourceUsageMonitoring?: "enable" | "disable";
60
+ }
61
+ /** Options for prepareUpgrade */
62
+ interface PrepareUpgradeOpts {
63
+ /** Path to Dockerfile (if building from Dockerfile) */
64
+ dockerfile?: string;
65
+ /** Image reference (registry/path:tag) */
66
+ imageRef?: string;
67
+ /** Path to .env file - optional */
68
+ envFile?: string;
69
+ /** Instance type SKU - required */
70
+ instanceType: string;
71
+ /** Log visibility setting - required */
72
+ logVisibility: logVisibility;
73
+ /** Resource usage monitoring setting - optional */
74
+ resourceUsageMonitoring?: "enable" | "disable";
75
+ }
76
+ /** Gas options for execute functions */
77
+ interface GasOpts {
78
+ maxFeePerGas?: bigint;
79
+ maxPriorityFeePerGas?: bigint;
80
+ }
81
+ /** Result from executeDeploy */
82
+ interface ExecuteDeployResult {
83
+ appId: AppId;
84
+ txHash: Hex;
85
+ appName: string;
86
+ imageRef: string;
87
+ }
88
+ /** Result from executeUpgrade */
89
+ interface ExecuteUpgradeResult {
90
+ appId: AppId;
91
+ txHash: Hex;
92
+ imageRef: string;
93
+ }
94
+ /** Data-only batch for deploy (clients provided by module) */
95
+ interface PreparedDeployData {
96
+ /** The app ID that will be deployed */
97
+ appId: AppId;
98
+ /** The salt used for deployment */
99
+ salt: Uint8Array;
100
+ /** Batch executions to be sent */
101
+ executions: Array<{
102
+ target: Address;
103
+ value: bigint;
104
+ callData: Hex;
105
+ }>;
106
+ }
107
+ /** Data-only batch for upgrade (clients provided by module) */
108
+ interface PreparedUpgradeData {
109
+ /** The app ID being upgraded */
110
+ appId: AppId;
111
+ /** Batch executions to be sent */
112
+ executions: Array<{
113
+ target: Address;
114
+ value: bigint;
115
+ callData: Hex;
116
+ }>;
117
+ }
118
+ /** Prepared deployment ready for execution */
119
+ interface PreparedDeploy {
120
+ /** The prepared data (executions, appId, etc.) */
121
+ data: PreparedDeployData;
122
+ /** App name */
123
+ appName: string;
124
+ /** Final image reference */
125
+ imageRef: string;
126
+ }
127
+ /** Prepared upgrade ready for execution */
128
+ interface PreparedUpgrade {
129
+ /** The prepared data (executions, appId, etc.) */
130
+ data: PreparedUpgradeData;
131
+ /** App ID being upgraded */
132
+ appId: AppId;
133
+ /** Final image reference */
134
+ imageRef: string;
135
+ }
44
136
  interface LifecycleOpts {
45
137
  gas?: {
46
138
  maxFeePerGas?: bigint;
@@ -49,7 +141,7 @@ interface LifecycleOpts {
49
141
  }
50
142
  interface AppRecord {
51
143
  id: AppId;
52
- owner: `0x${string}`;
144
+ owner: Address;
53
145
  image: string;
54
146
  status: "starting" | "running" | "stopped" | "terminated";
55
147
  createdAt: number;
@@ -77,7 +169,7 @@ interface DeployOptions {
77
169
  }
78
170
  interface DeployResult {
79
171
  /** App ID (contract address) */
80
- appId: string;
172
+ appId: AppId;
81
173
  /** App name */
82
174
  appName: string;
83
175
  /** Final image reference */
@@ -85,13 +177,13 @@ interface DeployResult {
85
177
  /** IP address (if available) */
86
178
  ipAddress?: string;
87
179
  /** Transaction hash */
88
- txHash: `0x${string}`;
180
+ txHash: Hex;
89
181
  }
90
182
  interface EnvironmentConfig {
91
183
  name: string;
92
184
  build: "dev" | "prod";
93
185
  chainID: bigint;
94
- appControllerAddress: string;
186
+ appControllerAddress: Address;
95
187
  permissionControllerAddress: string;
96
188
  erc7702DelegatorAddress: string;
97
189
  kmsServerURL: string;
@@ -215,4 +307,4 @@ interface BillingEnvironmentConfig {
215
307
  billingApiServerURL: string;
216
308
  }
217
309
 
218
- export type { AppId as A, BillingEnvironmentConfig as B, ChainID as C, DeployResult as D, EnvironmentConfig as E, ImageDigestResult as I, Logger as L, NoActiveSubscriptionResponse as N, ParsedEnvironment as P, Release as R, SubscriptionStatus as S, UpgradeAppOpts as U, DeployAppOpts as a, LifecycleOpts as b, AppRecord as c, DeployOptions as d, DockerImageConfig as e, AppProfile as f, AppProfileResponse as g, ProductID as h, SubscriptionLineItem as i, CreateSubscriptionResponse as j, CheckoutCreatedResponse as k, logVisibility as l, AlreadyActiveResponse as m, PaymentIssueResponse as n, SubscribeResponse as o, CancelSuccessResponse as p, CancelResponse as q, ProductSubscriptionResponse as r, SubscriptionOpts as s };
310
+ export type { AppId as A, BillingEnvironmentConfig as B, ChainID as C, DeployResult as D, EnvironmentConfig as E, SubscriptionOpts as F, GasOpts as G, ImageDigestResult as I, Logger as L, NoActiveSubscriptionResponse as N, PreparedDeploy as P, Release as R, SubscriptionStatus as S, UpgradeAppOpts as U, PreparedUpgrade as a, DeployAppOpts as b, PrepareDeployOpts as c, PrepareUpgradeOpts as d, ExecuteDeployResult as e, ExecuteUpgradeResult as f, PreparedDeployData as g, PreparedUpgradeData as h, LifecycleOpts as i, AppRecord as j, DeployOptions as k, logVisibility as l, ParsedEnvironment as m, DockerImageConfig as n, AppProfile as o, AppProfileResponse as p, ProductID as q, SubscriptionLineItem as r, CreateSubscriptionResponse as s, CheckoutCreatedResponse as t, AlreadyActiveResponse as u, PaymentIssueResponse as v, SubscribeResponse as w, CancelSuccessResponse as x, CancelResponse as y, ProductSubscriptionResponse as z };