@layr-labs/ecloud-sdk 0.3.4 → 0.4.0-dev.0
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/dist/billing.cjs +4 -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 +4 -3
- package/dist/billing.js.map +1 -1
- package/dist/browser.cjs +168 -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 +166 -4
- package/dist/browser.js.map +1 -1
- package/dist/{compute-D0TNHHmD.d.ts → compute-DccJLbtV.d.cts} +6 -1
- package/dist/{compute-6WmcUluf.d.cts → compute-DlilmZYC.d.ts} +6 -1
- package/dist/compute.cjs +206 -18
- 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 +210 -19
- package/dist/compute.js.map +1 -1
- package/dist/{helpers-D0Mn-6TI.d.cts → helpers-BNeMZYcY.d.cts} +6 -1
- package/dist/{helpers-Dn6fECtP.d.ts → helpers-D_AbDeP4.d.ts} +6 -1
- package/dist/{index-WDunKGVL.d.cts → index-DD7ZLbqD.d.cts} +24 -1
- package/dist/{index-WDunKGVL.d.ts → index-DD7ZLbqD.d.ts} +24 -1
- package/dist/index.cjs +305 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +159 -7
- package/dist/index.d.ts +159 -7
- package/dist/index.js +304 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/tools/kms-client-linux-amd64 +0 -0
- package/VERSION +0 -2
package/dist/browser.cjs
CHANGED
|
@@ -200,11 +200,13 @@ __export(browser_exports, {
|
|
|
200
200
|
getActiveAppCount: () => getActiveAppCount,
|
|
201
201
|
getAllAppsByDeveloper: () => getAllAppsByDeveloper,
|
|
202
202
|
getAppProtectedHeaders: () => getAppProtectedHeaders,
|
|
203
|
+
getAppsByBillingAccount: () => getAppsByBillingAccount,
|
|
203
204
|
getAppsByCreator: () => getAppsByCreator,
|
|
204
205
|
getAppsByDeveloper: () => getAppsByDeveloper,
|
|
205
206
|
getAvailableEnvironments: () => getAvailableEnvironments,
|
|
206
207
|
getBillingApiSession: () => getBillingApiSession,
|
|
207
208
|
getBillingEnvironmentConfig: () => getBillingEnvironmentConfig,
|
|
209
|
+
getBillingType: () => getBillingType,
|
|
208
210
|
getBuildType: () => getBuildType,
|
|
209
211
|
getChainFromID: () => getChainFromID,
|
|
210
212
|
getComputeApiSession: () => getComputeApiSession,
|
|
@@ -297,7 +299,8 @@ var ENVIRONMENTS = {
|
|
|
297
299
|
erc7702DelegatorAddress: CommonAddresses.ERC7702Delegator,
|
|
298
300
|
kmsServerURL: "http://10.128.0.57:8080",
|
|
299
301
|
userApiServerURL: "https://userapi-compute-sepolia-dev.eigencloud.xyz",
|
|
300
|
-
defaultRPCURL: "https://ethereum-sepolia-rpc.publicnode.com"
|
|
302
|
+
defaultRPCURL: "https://ethereum-sepolia-rpc.publicnode.com",
|
|
303
|
+
usdcCreditsAddress: "0xbdA3897c3A428763B59015C64AB766c288C97376"
|
|
301
304
|
},
|
|
302
305
|
sepolia: {
|
|
303
306
|
name: "sepolia",
|
|
@@ -354,7 +357,7 @@ function getBillingEnvironmentConfig(build) {
|
|
|
354
357
|
return config;
|
|
355
358
|
}
|
|
356
359
|
function getBuildType() {
|
|
357
|
-
const buildTimeType = true ? "
|
|
360
|
+
const buildTimeType = true ? "dev"?.toLowerCase() : void 0;
|
|
358
361
|
const runtimeType = process.env.BUILD_TYPE?.toLowerCase();
|
|
359
362
|
const buildType = buildTimeType || runtimeType;
|
|
360
363
|
if (buildType === "dev") {
|
|
@@ -711,7 +714,7 @@ var CanViewAppLogsPermission = "0x2fd3f2fe";
|
|
|
711
714
|
var CanViewSensitiveAppInfoPermission = "0x0e67b22f";
|
|
712
715
|
var CanUpdateAppProfilePermission = "0x036fef61";
|
|
713
716
|
function getDefaultClientId() {
|
|
714
|
-
const version = true ? "0.
|
|
717
|
+
const version = true ? "0.4.0-dev.0" : "0.0.0";
|
|
715
718
|
return `ecloud-sdk/v${version}`;
|
|
716
719
|
}
|
|
717
720
|
var UserApiClient = class {
|
|
@@ -2990,6 +2993,71 @@ var AppController_default = [
|
|
|
2990
2993
|
],
|
|
2991
2994
|
stateMutability: "nonpayable"
|
|
2992
2995
|
},
|
|
2996
|
+
{
|
|
2997
|
+
type: "function",
|
|
2998
|
+
name: "createAppWithIsolatedBilling",
|
|
2999
|
+
inputs: [
|
|
3000
|
+
{
|
|
3001
|
+
name: "salt",
|
|
3002
|
+
type: "bytes32",
|
|
3003
|
+
internalType: "bytes32"
|
|
3004
|
+
},
|
|
3005
|
+
{
|
|
3006
|
+
name: "release",
|
|
3007
|
+
type: "tuple",
|
|
3008
|
+
internalType: "structIAppController.Release",
|
|
3009
|
+
components: [
|
|
3010
|
+
{
|
|
3011
|
+
name: "rmsRelease",
|
|
3012
|
+
type: "tuple",
|
|
3013
|
+
internalType: "structIReleaseManagerTypes.Release",
|
|
3014
|
+
components: [
|
|
3015
|
+
{
|
|
3016
|
+
name: "artifacts",
|
|
3017
|
+
type: "tuple[]",
|
|
3018
|
+
internalType: "structIReleaseManagerTypes.Artifact[]",
|
|
3019
|
+
components: [
|
|
3020
|
+
{
|
|
3021
|
+
name: "digest",
|
|
3022
|
+
type: "bytes32",
|
|
3023
|
+
internalType: "bytes32"
|
|
3024
|
+
},
|
|
3025
|
+
{
|
|
3026
|
+
name: "registry",
|
|
3027
|
+
type: "string",
|
|
3028
|
+
internalType: "string"
|
|
3029
|
+
}
|
|
3030
|
+
]
|
|
3031
|
+
},
|
|
3032
|
+
{
|
|
3033
|
+
name: "upgradeByTime",
|
|
3034
|
+
type: "uint32",
|
|
3035
|
+
internalType: "uint32"
|
|
3036
|
+
}
|
|
3037
|
+
]
|
|
3038
|
+
},
|
|
3039
|
+
{
|
|
3040
|
+
name: "publicEnv",
|
|
3041
|
+
type: "bytes",
|
|
3042
|
+
internalType: "bytes"
|
|
3043
|
+
},
|
|
3044
|
+
{
|
|
3045
|
+
name: "encryptedEnv",
|
|
3046
|
+
type: "bytes",
|
|
3047
|
+
internalType: "bytes"
|
|
3048
|
+
}
|
|
3049
|
+
]
|
|
3050
|
+
}
|
|
3051
|
+
],
|
|
3052
|
+
outputs: [
|
|
3053
|
+
{
|
|
3054
|
+
name: "app",
|
|
3055
|
+
type: "address",
|
|
3056
|
+
internalType: "contractIApp"
|
|
3057
|
+
}
|
|
3058
|
+
],
|
|
3059
|
+
stateMutability: "nonpayable"
|
|
3060
|
+
},
|
|
2993
3061
|
{
|
|
2994
3062
|
type: "function",
|
|
2995
3063
|
name: "domainSeparator",
|
|
@@ -3022,6 +3090,25 @@ var AppController_default = [
|
|
|
3022
3090
|
],
|
|
3023
3091
|
stateMutability: "view"
|
|
3024
3092
|
},
|
|
3093
|
+
{
|
|
3094
|
+
type: "function",
|
|
3095
|
+
name: "getBillingType",
|
|
3096
|
+
inputs: [
|
|
3097
|
+
{
|
|
3098
|
+
name: "app",
|
|
3099
|
+
type: "address",
|
|
3100
|
+
internalType: "address"
|
|
3101
|
+
}
|
|
3102
|
+
],
|
|
3103
|
+
outputs: [
|
|
3104
|
+
{
|
|
3105
|
+
name: "",
|
|
3106
|
+
type: "uint8",
|
|
3107
|
+
internalType: "uint8"
|
|
3108
|
+
}
|
|
3109
|
+
],
|
|
3110
|
+
stateMutability: "view"
|
|
3111
|
+
},
|
|
3025
3112
|
{
|
|
3026
3113
|
type: "function",
|
|
3027
3114
|
name: "getAppCreator",
|
|
@@ -3149,6 +3236,62 @@ var AppController_default = [
|
|
|
3149
3236
|
],
|
|
3150
3237
|
stateMutability: "view"
|
|
3151
3238
|
},
|
|
3239
|
+
{
|
|
3240
|
+
type: "function",
|
|
3241
|
+
name: "getAppsByBillingAccount",
|
|
3242
|
+
inputs: [
|
|
3243
|
+
{
|
|
3244
|
+
name: "account",
|
|
3245
|
+
type: "address",
|
|
3246
|
+
internalType: "address"
|
|
3247
|
+
},
|
|
3248
|
+
{
|
|
3249
|
+
name: "offset",
|
|
3250
|
+
type: "uint256",
|
|
3251
|
+
internalType: "uint256"
|
|
3252
|
+
},
|
|
3253
|
+
{
|
|
3254
|
+
name: "limit",
|
|
3255
|
+
type: "uint256",
|
|
3256
|
+
internalType: "uint256"
|
|
3257
|
+
}
|
|
3258
|
+
],
|
|
3259
|
+
outputs: [
|
|
3260
|
+
{
|
|
3261
|
+
name: "apps",
|
|
3262
|
+
type: "address[]",
|
|
3263
|
+
internalType: "contractIApp[]"
|
|
3264
|
+
},
|
|
3265
|
+
{
|
|
3266
|
+
name: "appConfigsMem",
|
|
3267
|
+
type: "tuple[]",
|
|
3268
|
+
internalType: "structIAppController.AppConfig[]",
|
|
3269
|
+
components: [
|
|
3270
|
+
{
|
|
3271
|
+
name: "creator",
|
|
3272
|
+
type: "address",
|
|
3273
|
+
internalType: "address"
|
|
3274
|
+
},
|
|
3275
|
+
{
|
|
3276
|
+
name: "operatorSetId",
|
|
3277
|
+
type: "uint32",
|
|
3278
|
+
internalType: "uint32"
|
|
3279
|
+
},
|
|
3280
|
+
{
|
|
3281
|
+
name: "latestReleaseBlockNumber",
|
|
3282
|
+
type: "uint32",
|
|
3283
|
+
internalType: "uint32"
|
|
3284
|
+
},
|
|
3285
|
+
{
|
|
3286
|
+
name: "status",
|
|
3287
|
+
type: "uint8",
|
|
3288
|
+
internalType: "enumIAppController.AppStatus"
|
|
3289
|
+
}
|
|
3290
|
+
]
|
|
3291
|
+
}
|
|
3292
|
+
],
|
|
3293
|
+
stateMutability: "view"
|
|
3294
|
+
},
|
|
3152
3295
|
{
|
|
3153
3296
|
type: "function",
|
|
3154
3297
|
name: "getAppsByCreator",
|
|
@@ -4404,9 +4547,10 @@ async function prepareDeployBatch(options, logger = noopLogger) {
|
|
|
4404
4547
|
publicEnv: (0, import_viem5.bytesToHex)(release.publicEnv),
|
|
4405
4548
|
encryptedEnv: (0, import_viem5.bytesToHex)(release.encryptedEnv)
|
|
4406
4549
|
};
|
|
4550
|
+
const functionName = options.billTo === "app" ? "createAppWithIsolatedBilling" : "createApp";
|
|
4407
4551
|
const createData = (0, import_viem5.encodeFunctionData)({
|
|
4408
4552
|
abi: AppController_default,
|
|
4409
|
-
functionName
|
|
4553
|
+
functionName,
|
|
4410
4554
|
args: [saltHex, releaseForViem]
|
|
4411
4555
|
});
|
|
4412
4556
|
const acceptAdminData = (0, import_viem5.encodeFunctionData)({
|
|
@@ -4902,6 +5046,24 @@ async function getAppsByDeveloper(publicClient, environmentConfig, developer, of
|
|
|
4902
5046
|
appConfigs: result[1]
|
|
4903
5047
|
};
|
|
4904
5048
|
}
|
|
5049
|
+
async function getBillingType(publicClient, environmentConfig, app) {
|
|
5050
|
+
const result = await publicClient.readContract({
|
|
5051
|
+
address: environmentConfig.appControllerAddress,
|
|
5052
|
+
abi: AppController_default,
|
|
5053
|
+
functionName: "getBillingType",
|
|
5054
|
+
args: [app]
|
|
5055
|
+
});
|
|
5056
|
+
return Number(result);
|
|
5057
|
+
}
|
|
5058
|
+
async function getAppsByBillingAccount(publicClient, environmentConfig, account, offset, limit) {
|
|
5059
|
+
const result = await publicClient.readContract({
|
|
5060
|
+
address: environmentConfig.appControllerAddress,
|
|
5061
|
+
abi: AppController_default,
|
|
5062
|
+
functionName: "getAppsByBillingAccount",
|
|
5063
|
+
args: [account, offset, limit]
|
|
5064
|
+
});
|
|
5065
|
+
return { apps: result[0], appConfigs: result[1] };
|
|
5066
|
+
}
|
|
4905
5067
|
async function getAllAppsByDeveloper(publicClient, env, developer, pageSize = 100n) {
|
|
4906
5068
|
let offset = 0n;
|
|
4907
5069
|
const allApps = [];
|
|
@@ -5383,11 +5545,13 @@ function getKMSKeysForEnvironment(environment, build = "prod") {
|
|
|
5383
5545
|
getActiveAppCount,
|
|
5384
5546
|
getAllAppsByDeveloper,
|
|
5385
5547
|
getAppProtectedHeaders,
|
|
5548
|
+
getAppsByBillingAccount,
|
|
5386
5549
|
getAppsByCreator,
|
|
5387
5550
|
getAppsByDeveloper,
|
|
5388
5551
|
getAvailableEnvironments,
|
|
5389
5552
|
getBillingApiSession,
|
|
5390
5553
|
getBillingEnvironmentConfig,
|
|
5554
|
+
getBillingType,
|
|
5391
5555
|
getBuildType,
|
|
5392
5556
|
getChainFromID,
|
|
5393
5557
|
getComputeApiSession,
|