@layr-labs/ecloud-sdk 0.2.0-dev → 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 +19 -0
- package/dist/billing.cjs.map +1 -1
- package/dist/billing.d.cts +3 -2
- package/dist/billing.d.ts +3 -2
- package/dist/billing.js +2 -2
- package/dist/{chunk-34DXGQ35.js → chunk-FY7UU55U.js} +2 -2
- package/dist/chunk-FY7UU55U.js.map +1 -0
- package/dist/chunk-GB4GM4C2.js +434 -0
- package/dist/chunk-GB4GM4C2.js.map +1 -0
- package/dist/{chunk-HLH3AMQF.js → chunk-O7EU5JL7.js} +328 -123
- package/dist/chunk-O7EU5JL7.js.map +1 -0
- package/dist/{compute-B_ibIORD.d.cts → compute-CF2HOXed.d.ts} +101 -15
- package/dist/{compute-gpepEsn3.d.ts → compute-CbmjA8kJ.d.cts} +101 -15
- package/dist/compute.cjs +772 -62
- 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-D-SUX3IG.d.ts → index-D2QufVB9.d.cts} +130 -6
- package/dist/{index-D-SUX3IG.d.cts → index-D2QufVB9.d.ts} +130 -6
- package/dist/index.cjs +646 -438
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +52 -166
- package/dist/index.d.ts +52 -166
- package/dist/index.js +17 -243
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/dist/chunk-34DXGQ35.js.map +0 -1
- package/dist/chunk-HLH3AMQF.js.map +0 -1
- package/dist/chunk-LINGJMAS.js +0 -180
- package/dist/chunk-LINGJMAS.js.map +0 -1
package/dist/compute.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as AppModule,
|
|
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-CbmjA8kJ.cjs';
|
|
3
2
|
import 'viem';
|
|
3
|
+
import './index-D2QufVB9.cjs';
|
package/dist/compute.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as AppModule,
|
|
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-CF2HOXed.js';
|
|
3
2
|
import 'viem';
|
|
3
|
+
import './index-D2QufVB9.js';
|
package/dist/compute.js
CHANGED
|
@@ -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,130 @@ 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
|
+
/** Options for prepareDeployFromVerifiableBuild */
|
|
77
|
+
interface PrepareDeployFromVerifiableBuildOpts {
|
|
78
|
+
/** App name - required */
|
|
79
|
+
name: string;
|
|
80
|
+
/** Image reference (registry/path:tag) - required */
|
|
81
|
+
imageRef: string;
|
|
82
|
+
/** Image digest (sha256:...) - required */
|
|
83
|
+
imageDigest: string;
|
|
84
|
+
/** Path to .env file - optional */
|
|
85
|
+
envFile?: string;
|
|
86
|
+
/** Instance type SKU - required */
|
|
87
|
+
instanceType: string;
|
|
88
|
+
/** Log visibility setting - required */
|
|
89
|
+
logVisibility: logVisibility;
|
|
90
|
+
/** Resource usage monitoring setting - optional */
|
|
91
|
+
resourceUsageMonitoring?: "enable" | "disable";
|
|
92
|
+
}
|
|
93
|
+
/** Options for prepareUpgradeFromVerifiableBuild */
|
|
94
|
+
interface PrepareUpgradeFromVerifiableBuildOpts {
|
|
95
|
+
/** Image reference (registry/path:tag) - required */
|
|
96
|
+
imageRef: string;
|
|
97
|
+
/** Image digest (sha256:...) - required */
|
|
98
|
+
imageDigest: string;
|
|
99
|
+
/** Path to .env file - optional */
|
|
100
|
+
envFile?: string;
|
|
101
|
+
/** Instance type SKU - required */
|
|
102
|
+
instanceType: string;
|
|
103
|
+
/** Log visibility setting - required */
|
|
104
|
+
logVisibility: logVisibility;
|
|
105
|
+
/** Resource usage monitoring setting - optional */
|
|
106
|
+
resourceUsageMonitoring?: "enable" | "disable";
|
|
107
|
+
}
|
|
108
|
+
/** Gas options for execute functions */
|
|
109
|
+
interface GasOpts {
|
|
110
|
+
maxFeePerGas?: bigint;
|
|
111
|
+
maxPriorityFeePerGas?: bigint;
|
|
112
|
+
}
|
|
113
|
+
/** Result from executeDeploy */
|
|
114
|
+
interface ExecuteDeployResult {
|
|
115
|
+
appId: AppId;
|
|
116
|
+
txHash: Hex;
|
|
117
|
+
appName: string;
|
|
118
|
+
imageRef: string;
|
|
119
|
+
}
|
|
120
|
+
/** Result from executeUpgrade */
|
|
121
|
+
interface ExecuteUpgradeResult {
|
|
122
|
+
appId: AppId;
|
|
123
|
+
txHash: Hex;
|
|
124
|
+
imageRef: string;
|
|
125
|
+
}
|
|
126
|
+
/** Data-only batch for deploy (clients provided by module) */
|
|
127
|
+
interface PreparedDeployData {
|
|
128
|
+
/** The app ID that will be deployed */
|
|
129
|
+
appId: AppId;
|
|
130
|
+
/** The salt used for deployment */
|
|
131
|
+
salt: Uint8Array;
|
|
132
|
+
/** Batch executions to be sent */
|
|
133
|
+
executions: Array<{
|
|
134
|
+
target: Address;
|
|
135
|
+
value: bigint;
|
|
136
|
+
callData: Hex;
|
|
137
|
+
}>;
|
|
138
|
+
}
|
|
139
|
+
/** Data-only batch for upgrade (clients provided by module) */
|
|
140
|
+
interface PreparedUpgradeData {
|
|
141
|
+
/** The app ID being upgraded */
|
|
142
|
+
appId: AppId;
|
|
143
|
+
/** Batch executions to be sent */
|
|
144
|
+
executions: Array<{
|
|
145
|
+
target: Address;
|
|
146
|
+
value: bigint;
|
|
147
|
+
callData: Hex;
|
|
148
|
+
}>;
|
|
149
|
+
}
|
|
150
|
+
/** Prepared deployment ready for execution */
|
|
151
|
+
interface PreparedDeploy {
|
|
152
|
+
/** The prepared data (executions, appId, etc.) */
|
|
153
|
+
data: PreparedDeployData;
|
|
154
|
+
/** App name */
|
|
155
|
+
appName: string;
|
|
156
|
+
/** Final image reference */
|
|
157
|
+
imageRef: string;
|
|
158
|
+
}
|
|
159
|
+
/** Prepared upgrade ready for execution */
|
|
160
|
+
interface PreparedUpgrade {
|
|
161
|
+
/** The prepared data (executions, appId, etc.) */
|
|
162
|
+
data: PreparedUpgradeData;
|
|
163
|
+
/** App ID being upgraded */
|
|
164
|
+
appId: AppId;
|
|
165
|
+
/** Final image reference */
|
|
166
|
+
imageRef: string;
|
|
167
|
+
}
|
|
44
168
|
interface LifecycleOpts {
|
|
45
169
|
gas?: {
|
|
46
170
|
maxFeePerGas?: bigint;
|
|
@@ -49,7 +173,7 @@ interface LifecycleOpts {
|
|
|
49
173
|
}
|
|
50
174
|
interface AppRecord {
|
|
51
175
|
id: AppId;
|
|
52
|
-
owner:
|
|
176
|
+
owner: Address;
|
|
53
177
|
image: string;
|
|
54
178
|
status: "starting" | "running" | "stopped" | "terminated";
|
|
55
179
|
createdAt: number;
|
|
@@ -77,7 +201,7 @@ interface DeployOptions {
|
|
|
77
201
|
}
|
|
78
202
|
interface DeployResult {
|
|
79
203
|
/** App ID (contract address) */
|
|
80
|
-
appId:
|
|
204
|
+
appId: AppId;
|
|
81
205
|
/** App name */
|
|
82
206
|
appName: string;
|
|
83
207
|
/** Final image reference */
|
|
@@ -85,13 +209,13 @@ interface DeployResult {
|
|
|
85
209
|
/** IP address (if available) */
|
|
86
210
|
ipAddress?: string;
|
|
87
211
|
/** Transaction hash */
|
|
88
|
-
txHash:
|
|
212
|
+
txHash: Hex;
|
|
89
213
|
}
|
|
90
214
|
interface EnvironmentConfig {
|
|
91
215
|
name: string;
|
|
92
216
|
build: "dev" | "prod";
|
|
93
217
|
chainID: bigint;
|
|
94
|
-
appControllerAddress:
|
|
218
|
+
appControllerAddress: Address;
|
|
95
219
|
permissionControllerAddress: string;
|
|
96
220
|
erc7702DelegatorAddress: string;
|
|
97
221
|
kmsServerURL: string;
|
|
@@ -215,4 +339,4 @@ interface BillingEnvironmentConfig {
|
|
|
215
339
|
billingApiServerURL: string;
|
|
216
340
|
}
|
|
217
341
|
|
|
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,
|
|
342
|
+
export type { AppId as A, BillingEnvironmentConfig as B, ChainID as C, DeployResult as D, EnvironmentConfig as E, CancelResponse as F, GasOpts as G, ProductSubscriptionResponse as H, ImageDigestResult as I, SubscriptionOpts as J, 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, PrepareDeployFromVerifiableBuildOpts as e, PrepareUpgradeFromVerifiableBuildOpts as f, ExecuteDeployResult as g, ExecuteUpgradeResult as h, PreparedDeployData as i, PreparedUpgradeData as j, LifecycleOpts as k, logVisibility as l, AppRecord as m, DeployOptions as n, ParsedEnvironment as o, DockerImageConfig as p, AppProfile as q, AppProfileResponse as r, ProductID as s, SubscriptionLineItem as t, CreateSubscriptionResponse as u, CheckoutCreatedResponse as v, AlreadyActiveResponse as w, PaymentIssueResponse as x, SubscribeResponse as y, CancelSuccessResponse 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,130 @@ 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
|
+
/** Options for prepareDeployFromVerifiableBuild */
|
|
77
|
+
interface PrepareDeployFromVerifiableBuildOpts {
|
|
78
|
+
/** App name - required */
|
|
79
|
+
name: string;
|
|
80
|
+
/** Image reference (registry/path:tag) - required */
|
|
81
|
+
imageRef: string;
|
|
82
|
+
/** Image digest (sha256:...) - required */
|
|
83
|
+
imageDigest: string;
|
|
84
|
+
/** Path to .env file - optional */
|
|
85
|
+
envFile?: string;
|
|
86
|
+
/** Instance type SKU - required */
|
|
87
|
+
instanceType: string;
|
|
88
|
+
/** Log visibility setting - required */
|
|
89
|
+
logVisibility: logVisibility;
|
|
90
|
+
/** Resource usage monitoring setting - optional */
|
|
91
|
+
resourceUsageMonitoring?: "enable" | "disable";
|
|
92
|
+
}
|
|
93
|
+
/** Options for prepareUpgradeFromVerifiableBuild */
|
|
94
|
+
interface PrepareUpgradeFromVerifiableBuildOpts {
|
|
95
|
+
/** Image reference (registry/path:tag) - required */
|
|
96
|
+
imageRef: string;
|
|
97
|
+
/** Image digest (sha256:...) - required */
|
|
98
|
+
imageDigest: string;
|
|
99
|
+
/** Path to .env file - optional */
|
|
100
|
+
envFile?: string;
|
|
101
|
+
/** Instance type SKU - required */
|
|
102
|
+
instanceType: string;
|
|
103
|
+
/** Log visibility setting - required */
|
|
104
|
+
logVisibility: logVisibility;
|
|
105
|
+
/** Resource usage monitoring setting - optional */
|
|
106
|
+
resourceUsageMonitoring?: "enable" | "disable";
|
|
107
|
+
}
|
|
108
|
+
/** Gas options for execute functions */
|
|
109
|
+
interface GasOpts {
|
|
110
|
+
maxFeePerGas?: bigint;
|
|
111
|
+
maxPriorityFeePerGas?: bigint;
|
|
112
|
+
}
|
|
113
|
+
/** Result from executeDeploy */
|
|
114
|
+
interface ExecuteDeployResult {
|
|
115
|
+
appId: AppId;
|
|
116
|
+
txHash: Hex;
|
|
117
|
+
appName: string;
|
|
118
|
+
imageRef: string;
|
|
119
|
+
}
|
|
120
|
+
/** Result from executeUpgrade */
|
|
121
|
+
interface ExecuteUpgradeResult {
|
|
122
|
+
appId: AppId;
|
|
123
|
+
txHash: Hex;
|
|
124
|
+
imageRef: string;
|
|
125
|
+
}
|
|
126
|
+
/** Data-only batch for deploy (clients provided by module) */
|
|
127
|
+
interface PreparedDeployData {
|
|
128
|
+
/** The app ID that will be deployed */
|
|
129
|
+
appId: AppId;
|
|
130
|
+
/** The salt used for deployment */
|
|
131
|
+
salt: Uint8Array;
|
|
132
|
+
/** Batch executions to be sent */
|
|
133
|
+
executions: Array<{
|
|
134
|
+
target: Address;
|
|
135
|
+
value: bigint;
|
|
136
|
+
callData: Hex;
|
|
137
|
+
}>;
|
|
138
|
+
}
|
|
139
|
+
/** Data-only batch for upgrade (clients provided by module) */
|
|
140
|
+
interface PreparedUpgradeData {
|
|
141
|
+
/** The app ID being upgraded */
|
|
142
|
+
appId: AppId;
|
|
143
|
+
/** Batch executions to be sent */
|
|
144
|
+
executions: Array<{
|
|
145
|
+
target: Address;
|
|
146
|
+
value: bigint;
|
|
147
|
+
callData: Hex;
|
|
148
|
+
}>;
|
|
149
|
+
}
|
|
150
|
+
/** Prepared deployment ready for execution */
|
|
151
|
+
interface PreparedDeploy {
|
|
152
|
+
/** The prepared data (executions, appId, etc.) */
|
|
153
|
+
data: PreparedDeployData;
|
|
154
|
+
/** App name */
|
|
155
|
+
appName: string;
|
|
156
|
+
/** Final image reference */
|
|
157
|
+
imageRef: string;
|
|
158
|
+
}
|
|
159
|
+
/** Prepared upgrade ready for execution */
|
|
160
|
+
interface PreparedUpgrade {
|
|
161
|
+
/** The prepared data (executions, appId, etc.) */
|
|
162
|
+
data: PreparedUpgradeData;
|
|
163
|
+
/** App ID being upgraded */
|
|
164
|
+
appId: AppId;
|
|
165
|
+
/** Final image reference */
|
|
166
|
+
imageRef: string;
|
|
167
|
+
}
|
|
44
168
|
interface LifecycleOpts {
|
|
45
169
|
gas?: {
|
|
46
170
|
maxFeePerGas?: bigint;
|
|
@@ -49,7 +173,7 @@ interface LifecycleOpts {
|
|
|
49
173
|
}
|
|
50
174
|
interface AppRecord {
|
|
51
175
|
id: AppId;
|
|
52
|
-
owner:
|
|
176
|
+
owner: Address;
|
|
53
177
|
image: string;
|
|
54
178
|
status: "starting" | "running" | "stopped" | "terminated";
|
|
55
179
|
createdAt: number;
|
|
@@ -77,7 +201,7 @@ interface DeployOptions {
|
|
|
77
201
|
}
|
|
78
202
|
interface DeployResult {
|
|
79
203
|
/** App ID (contract address) */
|
|
80
|
-
appId:
|
|
204
|
+
appId: AppId;
|
|
81
205
|
/** App name */
|
|
82
206
|
appName: string;
|
|
83
207
|
/** Final image reference */
|
|
@@ -85,13 +209,13 @@ interface DeployResult {
|
|
|
85
209
|
/** IP address (if available) */
|
|
86
210
|
ipAddress?: string;
|
|
87
211
|
/** Transaction hash */
|
|
88
|
-
txHash:
|
|
212
|
+
txHash: Hex;
|
|
89
213
|
}
|
|
90
214
|
interface EnvironmentConfig {
|
|
91
215
|
name: string;
|
|
92
216
|
build: "dev" | "prod";
|
|
93
217
|
chainID: bigint;
|
|
94
|
-
appControllerAddress:
|
|
218
|
+
appControllerAddress: Address;
|
|
95
219
|
permissionControllerAddress: string;
|
|
96
220
|
erc7702DelegatorAddress: string;
|
|
97
221
|
kmsServerURL: string;
|
|
@@ -215,4 +339,4 @@ interface BillingEnvironmentConfig {
|
|
|
215
339
|
billingApiServerURL: string;
|
|
216
340
|
}
|
|
217
341
|
|
|
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,
|
|
342
|
+
export type { AppId as A, BillingEnvironmentConfig as B, ChainID as C, DeployResult as D, EnvironmentConfig as E, CancelResponse as F, GasOpts as G, ProductSubscriptionResponse as H, ImageDigestResult as I, SubscriptionOpts as J, 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, PrepareDeployFromVerifiableBuildOpts as e, PrepareUpgradeFromVerifiableBuildOpts as f, ExecuteDeployResult as g, ExecuteUpgradeResult as h, PreparedDeployData as i, PreparedUpgradeData as j, LifecycleOpts as k, logVisibility as l, AppRecord as m, DeployOptions as n, ParsedEnvironment as o, DockerImageConfig as p, AppProfile as q, AppProfileResponse as r, ProductID as s, SubscriptionLineItem as t, CreateSubscriptionResponse as u, CheckoutCreatedResponse as v, AlreadyActiveResponse as w, PaymentIssueResponse as x, SubscribeResponse as y, CancelSuccessResponse as z };
|