@layr-labs/ecloud-sdk 0.4.0-dev → 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 +3 -2
- 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 +3 -2
- package/dist/billing.js.map +1 -1
- package/dist/browser.cjs +167 -3
- 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 +165 -3
- 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 +204 -16
- 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 +208 -17
- package/dist/compute.js.map +1 -1
- package/dist/{helpers-CDL9Hcxy.d.cts → helpers-BNeMZYcY.d.cts} +1 -1
- package/dist/{helpers-BcT2gJ7-.d.ts → helpers-D_AbDeP4.d.ts} +1 -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 +303 -16
- 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 +302 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/VERSION +0 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { C as ComputeModule } from './compute-
|
|
2
|
-
export { d as ComputeModuleConfig, a as CreateAppOpts, L as LogsOptions, P as PRIMARY_LANGUAGES, S as SDKCreateAppOpts, c as createApp, b as createComputeModule, e as encodeStartAppData, f as encodeStopAppData, h as encodeTerminateAppData, g as getAvailableTemplates, l as logs } from './compute-
|
|
1
|
+
import { C as ComputeModule } from './compute-DccJLbtV.cjs';
|
|
2
|
+
export { d as ComputeModuleConfig, a as CreateAppOpts, L as LogsOptions, P as PRIMARY_LANGUAGES, S as SDKCreateAppOpts, c as createApp, b as createComputeModule, e as encodeStartAppData, f as encodeStopAppData, h as encodeTerminateAppData, g as getAvailableTemplates, l as logs } from './compute-DccJLbtV.cjs';
|
|
3
3
|
import { BillingModule } from './billing.cjs';
|
|
4
4
|
export { BillingModuleConfig, createBillingModule } from './billing.cjs';
|
|
5
5
|
import { WalletClient, PublicClient, Address, Hex } from 'viem';
|
|
6
|
-
import { L as LogVisibility, aj as ResourceUsageMonitoring } from './helpers-
|
|
7
|
-
export { F as AppInfo, I as AppMetrics, H as AppProfileInfo, al as AppRelease, am as AppReleaseBuild, an as AppResponse, K as BillingApiClient, C as ComputeApiConfig, z as CreateAppParams, as as DeployParams, Q as EstimateBatchGasOptions, G as GeneratedKey, a4 as LoginRequest, a3 as LoginResult, A as LogsParams, a as SessionError, S as SessionInfo, b as SiweMessageParams, _ as SiweMessageResult, au as UpgradeParams, U as UserApiClient, ah as addHexPrefix, ap as assertValidFilePath, j as assertValidImageReference, n as assertValidPrivateKey, P as checkERC7702Delegation, V as createSiweMessage, ak as createViemClients, N as estimateBatchGas, k as extractAppNameFromImage, D as generateNewPrivateKey, X as generateNonce, d as getAvailableEnvironments, c as getBillingEnvironmentConfig, e as getBuildType, ag as getChainFromID, a1 as getComputeApiSession, g as getEnvironmentConfig, i as isEnvironmentAvailable, f as isMainnet, a2 as isSessionValid, Y as isSiweMessageExpired, Z as isSiweMessageNotYetValid, B as isSubscriptionActive, $ as loginToComputeApi, a0 as logoutFromComputeApi, W as parseSiweMessage, t as sanitizeString, u as sanitizeURL, w as sanitizeXURL, ai as stripHexPrefix, r as validateAppID, v as validateAppName, x as validateCreateAppParams, at as validateDeployParams, q as validateDescription, ao as validateFilePath, aq as validateImagePath, h as validateImageReference, l as validateInstanceTypeSKU, s as validateLogVisibility, y as validateLogsParams, m as validatePrivateKeyFormat, ar as validateResourceUsageMonitoring, o as validateURL, av as validateUpgradeParams, p as validateXURL } from './helpers-
|
|
8
|
-
import { G as GasEstimate,
|
|
9
|
-
export {
|
|
6
|
+
import { L as LogVisibility, aj as ResourceUsageMonitoring } from './helpers-BNeMZYcY.cjs';
|
|
7
|
+
export { F as AppInfo, I as AppMetrics, H as AppProfileInfo, al as AppRelease, am as AppReleaseBuild, an as AppResponse, K as BillingApiClient, C as ComputeApiConfig, z as CreateAppParams, as as DeployParams, Q as EstimateBatchGasOptions, G as GeneratedKey, a4 as LoginRequest, a3 as LoginResult, A as LogsParams, a as SessionError, S as SessionInfo, b as SiweMessageParams, _ as SiweMessageResult, au as UpgradeParams, U as UserApiClient, ah as addHexPrefix, ap as assertValidFilePath, j as assertValidImageReference, n as assertValidPrivateKey, P as checkERC7702Delegation, V as createSiweMessage, ak as createViemClients, N as estimateBatchGas, k as extractAppNameFromImage, D as generateNewPrivateKey, X as generateNonce, d as getAvailableEnvironments, c as getBillingEnvironmentConfig, e as getBuildType, ag as getChainFromID, a1 as getComputeApiSession, g as getEnvironmentConfig, i as isEnvironmentAvailable, f as isMainnet, a2 as isSessionValid, Y as isSiweMessageExpired, Z as isSiweMessageNotYetValid, B as isSubscriptionActive, $ as loginToComputeApi, a0 as logoutFromComputeApi, W as parseSiweMessage, t as sanitizeString, u as sanitizeURL, w as sanitizeXURL, ai as stripHexPrefix, r as validateAppID, v as validateAppName, x as validateCreateAppParams, at as validateDeployParams, q as validateDescription, ao as validateFilePath, aq as validateImagePath, h as validateImageReference, l as validateInstanceTypeSKU, s as validateLogVisibility, y as validateLogsParams, m as validatePrivateKeyFormat, ar as validateResourceUsageMonitoring, o as validateURL, av as validateUpgradeParams, p as validateXURL } from './helpers-BNeMZYcY.cjs';
|
|
8
|
+
import { G as GasEstimate, ad as Logger, a1 as PreparedDeploy, a8 as EnvironmentConfig, a6 as DeployResult, a2 as PreparedUpgrade, A as AppId } from './index-DD7ZLbqD.cjs';
|
|
9
|
+
export { ao as AlreadyActiveResponse, ae as AppProfile, af as AppProfileResponse, a4 as AppRecord, a7 as BillingEnvironmentConfig, at as CancelResponse, ar as CancelSuccessResponse, ah as ChainID, an as CheckoutCreatedResponse, ak as CreateSubscriptionOptions, am as CreateSubscriptionResponse, Q as DeployAppOpts, a5 as DeployOptions, aw as DeployProgressCallback, ax as DeployStep, ac as DockerImageConfig, E as EstimateGasOptions, Z as ExecuteDeployResult, _ as ExecuteUpgradeResult, Y as GasOpts, al as GetSubscriptionOptions, ab as ImageDigestResult, a3 as LifecycleOpts, as as NoActiveSubscriptionResponse, aa as ParsedEnvironment, ap as PaymentIssueResponse, W as PrepareDeployFromVerifiableBuildOpts, T as PrepareDeployOpts, X as PrepareUpgradeFromVerifiableBuildOpts, V as PrepareUpgradeOpts, $ as PreparedDeployData, a0 as PreparedUpgradeData, ag as ProductID, au as ProductSubscriptionResponse, a9 as Release, ay as SequentialDeployResult, aq as SubscribeResponse, aj as SubscriptionLineItem, av as SubscriptionOpts, ai as SubscriptionStatus, R as UpgradeAppOpts, l as calculateAppID, h as estimateTransactionGas, i as formatETH, g as getAllAppsByDeveloper, az as getAppLatestReleaseBlockNumbers, f as getAppsByBillingAccount, e as getBillingType, aA as getBlockTimestamps, O as logVisibility, N as noopLogger } from './index-DD7ZLbqD.cjs';
|
|
10
10
|
|
|
11
11
|
interface SubmitBuildRequest {
|
|
12
12
|
repoUrl: string;
|
|
@@ -181,6 +181,12 @@ interface SDKDeployOptions {
|
|
|
181
181
|
logVisibility: LogVisibility;
|
|
182
182
|
/** Resource usage monitoring setting - optional, defaults to 'enable' */
|
|
183
183
|
resourceUsageMonitoring?: ResourceUsageMonitoring;
|
|
184
|
+
/** Billing mode: developer (default) or app (isolated billing) */
|
|
185
|
+
billTo?: "developer" | "app";
|
|
186
|
+
/** Skip quota check */
|
|
187
|
+
skipQuotaCheck?: boolean;
|
|
188
|
+
/** Optional salt for deterministic app address prediction (32 bytes) */
|
|
189
|
+
salt?: Uint8Array | Buffer;
|
|
184
190
|
/** Optional gas params from estimation (use result from prepareDeploy) */
|
|
185
191
|
gas?: GasEstimate;
|
|
186
192
|
/** Skip telemetry (used when called from CLI) - optional */
|
|
@@ -234,6 +240,10 @@ interface VerifiableBuildOptions {
|
|
|
234
240
|
logVisibility: LogVisibility;
|
|
235
241
|
/** Resource usage monitoring setting - optional, defaults to 'enable' */
|
|
236
242
|
resourceUsageMonitoring?: ResourceUsageMonitoring;
|
|
243
|
+
/** Billing mode: developer (default) or app (isolated billing) */
|
|
244
|
+
billTo?: "developer" | "app";
|
|
245
|
+
/** Skip quota check */
|
|
246
|
+
skipQuotaCheck?: boolean;
|
|
237
247
|
/** Skip telemetry (used when called from CLI) - optional */
|
|
238
248
|
skipTelemetry?: boolean;
|
|
239
249
|
}
|
|
@@ -769,6 +779,148 @@ interface PreflightContext {
|
|
|
769
779
|
*/
|
|
770
780
|
declare function getCurrentInstanceType(preflightCtx: PreflightContext, appID: Address, logger: Logger, clientId?: string): Promise<string>;
|
|
771
781
|
|
|
782
|
+
var USDCCredits = [
|
|
783
|
+
{
|
|
784
|
+
type: "function",
|
|
785
|
+
name: "purchaseCreditsFor",
|
|
786
|
+
stateMutability: "nonpayable",
|
|
787
|
+
inputs: [
|
|
788
|
+
{
|
|
789
|
+
name: "amount",
|
|
790
|
+
type: "uint256"
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
name: "account",
|
|
794
|
+
type: "address"
|
|
795
|
+
}
|
|
796
|
+
],
|
|
797
|
+
outputs: [
|
|
798
|
+
]
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
type: "function",
|
|
802
|
+
name: "purchaseCredits",
|
|
803
|
+
stateMutability: "nonpayable",
|
|
804
|
+
inputs: [
|
|
805
|
+
{
|
|
806
|
+
name: "amount",
|
|
807
|
+
type: "uint256"
|
|
808
|
+
}
|
|
809
|
+
],
|
|
810
|
+
outputs: [
|
|
811
|
+
]
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
type: "function",
|
|
815
|
+
name: "usdc",
|
|
816
|
+
stateMutability: "view",
|
|
817
|
+
inputs: [
|
|
818
|
+
],
|
|
819
|
+
outputs: [
|
|
820
|
+
{
|
|
821
|
+
name: "",
|
|
822
|
+
type: "address"
|
|
823
|
+
}
|
|
824
|
+
]
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
type: "function",
|
|
828
|
+
name: "minimumPurchase",
|
|
829
|
+
stateMutability: "view",
|
|
830
|
+
inputs: [
|
|
831
|
+
],
|
|
832
|
+
outputs: [
|
|
833
|
+
{
|
|
834
|
+
name: "",
|
|
835
|
+
type: "uint256"
|
|
836
|
+
}
|
|
837
|
+
]
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
type: "event",
|
|
841
|
+
name: "CreditsPurchased",
|
|
842
|
+
inputs: [
|
|
843
|
+
{
|
|
844
|
+
name: "purchaser",
|
|
845
|
+
type: "address",
|
|
846
|
+
indexed: true
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
name: "account",
|
|
850
|
+
type: "address",
|
|
851
|
+
indexed: true
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
name: "amount",
|
|
855
|
+
type: "uint256",
|
|
856
|
+
indexed: false
|
|
857
|
+
}
|
|
858
|
+
]
|
|
859
|
+
}
|
|
860
|
+
];
|
|
861
|
+
|
|
862
|
+
var ERC20 = [
|
|
863
|
+
{
|
|
864
|
+
type: "function",
|
|
865
|
+
name: "approve",
|
|
866
|
+
stateMutability: "nonpayable",
|
|
867
|
+
inputs: [
|
|
868
|
+
{
|
|
869
|
+
name: "spender",
|
|
870
|
+
type: "address"
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
name: "amount",
|
|
874
|
+
type: "uint256"
|
|
875
|
+
}
|
|
876
|
+
],
|
|
877
|
+
outputs: [
|
|
878
|
+
{
|
|
879
|
+
name: "",
|
|
880
|
+
type: "bool"
|
|
881
|
+
}
|
|
882
|
+
]
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
type: "function",
|
|
886
|
+
name: "balanceOf",
|
|
887
|
+
stateMutability: "view",
|
|
888
|
+
inputs: [
|
|
889
|
+
{
|
|
890
|
+
name: "account",
|
|
891
|
+
type: "address"
|
|
892
|
+
}
|
|
893
|
+
],
|
|
894
|
+
outputs: [
|
|
895
|
+
{
|
|
896
|
+
name: "",
|
|
897
|
+
type: "uint256"
|
|
898
|
+
}
|
|
899
|
+
]
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
type: "function",
|
|
903
|
+
name: "allowance",
|
|
904
|
+
stateMutability: "view",
|
|
905
|
+
inputs: [
|
|
906
|
+
{
|
|
907
|
+
name: "owner",
|
|
908
|
+
type: "address"
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
name: "spender",
|
|
912
|
+
type: "address"
|
|
913
|
+
}
|
|
914
|
+
],
|
|
915
|
+
outputs: [
|
|
916
|
+
{
|
|
917
|
+
name: "",
|
|
918
|
+
type: "uint256"
|
|
919
|
+
}
|
|
920
|
+
]
|
|
921
|
+
}
|
|
922
|
+
];
|
|
923
|
+
|
|
772
924
|
/**
|
|
773
925
|
* Main SDK Client entry point
|
|
774
926
|
*/
|
|
@@ -786,4 +938,4 @@ interface ECloudClient {
|
|
|
786
938
|
}
|
|
787
939
|
declare function createECloudClient(cfg: ClientConfig): ECloudClient;
|
|
788
940
|
|
|
789
|
-
export { type AppEnvironment, AppId, AuthRequiredError, BUILD_STATUS, BadRequestError, BillingModule, type Build, BuildError, BuildFailedError, type BuildModule, type BuildModuleConfig, type BuildProgress, type BuildStatus, type ClientConfig, ComputeModule, ConflictError, DeployResult, type ECloudClient, type Environment, EnvironmentConfig, ForbiddenError, GasEstimate, type LegacyKey, type LogChunk, LogVisibility, Logger, type Metric, type MetricsContext, NoopClient, NotFoundError, PostHogClient, type PrepareDeployResult, type PrepareUpgradeResult, PreparedDeploy, PreparedUpgrade, type PrivateKeySource, ResourceUsageMonitoring, type SDKDeployOptions, type SDKUpgradeOptions, type StoredKey, type SubmitBuildRequest, type SubmitBuildResponse, type TelemetryClient, type TelemetryClientOptions, type TelemetryWrapperOptions, TimeoutError, type VerifyProvenanceFailure, type VerifyProvenanceResult, type VerifyProvenanceSuccess, addMetric, addMetricWithDimensions, createAppEnvironment, createBuildModule, createECloudClient, createMetricsContext, createTelemetryClient, deleteLegacyPrivateKey, deletePrivateKey, emitMetrics, executeDeploy, executeUpgrade, fetchTemplateCatalog, getAddressFromPrivateKey, getCategoryDescriptions, getCurrentInstanceType, getLegacyKeys, getLegacyPrivateKey, getPostHogAPIKey, getPostHogEndpoint, getPrivateKey, getPrivateKeyWithSource, getTemplate, isNoopClient, keyExists, listStoredKeys, prepareDeploy, prepareDeployFromVerifiableBuild, prepareUpgrade, prepareUpgradeFromVerifiableBuild, requirePrivateKey, storePrivateKey, validatePrivateKey, watchDeployment, watchUpgrade, withSDKTelemetry };
|
|
941
|
+
export { type AppEnvironment, AppId, AuthRequiredError, BUILD_STATUS, BadRequestError, BillingModule, type Build, BuildError, BuildFailedError, type BuildModule, type BuildModuleConfig, type BuildProgress, type BuildStatus, type ClientConfig, ComputeModule, ConflictError, DeployResult, type ECloudClient, ERC20 as ERC20ABI, type Environment, EnvironmentConfig, ForbiddenError, GasEstimate, type LegacyKey, type LogChunk, LogVisibility, Logger, type Metric, type MetricsContext, NoopClient, NotFoundError, PostHogClient, type PrepareDeployResult, type PrepareUpgradeResult, PreparedDeploy, PreparedUpgrade, type PrivateKeySource, ResourceUsageMonitoring, type SDKDeployOptions, type SDKUpgradeOptions, type StoredKey, type SubmitBuildRequest, type SubmitBuildResponse, type TelemetryClient, type TelemetryClientOptions, type TelemetryWrapperOptions, TimeoutError, USDCCredits as USDCCreditsABI, type VerifyProvenanceFailure, type VerifyProvenanceResult, type VerifyProvenanceSuccess, addMetric, addMetricWithDimensions, createAppEnvironment, createBuildModule, createECloudClient, createMetricsContext, createTelemetryClient, deleteLegacyPrivateKey, deletePrivateKey, emitMetrics, executeDeploy, executeUpgrade, fetchTemplateCatalog, getAddressFromPrivateKey, getCategoryDescriptions, getCurrentInstanceType, getLegacyKeys, getLegacyPrivateKey, getPostHogAPIKey, getPostHogEndpoint, getPrivateKey, getPrivateKeyWithSource, getTemplate, isNoopClient, keyExists, listStoredKeys, prepareDeploy, prepareDeployFromVerifiableBuild, prepareUpgrade, prepareUpgradeFromVerifiableBuild, requirePrivateKey, storePrivateKey, validatePrivateKey, watchDeployment, watchUpgrade, withSDKTelemetry };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { C as ComputeModule } from './compute-
|
|
2
|
-
export { d as ComputeModuleConfig, a as CreateAppOpts, L as LogsOptions, P as PRIMARY_LANGUAGES, S as SDKCreateAppOpts, c as createApp, b as createComputeModule, e as encodeStartAppData, f as encodeStopAppData, h as encodeTerminateAppData, g as getAvailableTemplates, l as logs } from './compute-
|
|
1
|
+
import { C as ComputeModule } from './compute-DlilmZYC.js';
|
|
2
|
+
export { d as ComputeModuleConfig, a as CreateAppOpts, L as LogsOptions, P as PRIMARY_LANGUAGES, S as SDKCreateAppOpts, c as createApp, b as createComputeModule, e as encodeStartAppData, f as encodeStopAppData, h as encodeTerminateAppData, g as getAvailableTemplates, l as logs } from './compute-DlilmZYC.js';
|
|
3
3
|
import { BillingModule } from './billing.js';
|
|
4
4
|
export { BillingModuleConfig, createBillingModule } from './billing.js';
|
|
5
5
|
import { WalletClient, PublicClient, Address, Hex } from 'viem';
|
|
6
|
-
import { L as LogVisibility, aj as ResourceUsageMonitoring } from './helpers-
|
|
7
|
-
export { F as AppInfo, I as AppMetrics, H as AppProfileInfo, al as AppRelease, am as AppReleaseBuild, an as AppResponse, K as BillingApiClient, C as ComputeApiConfig, z as CreateAppParams, as as DeployParams, Q as EstimateBatchGasOptions, G as GeneratedKey, a4 as LoginRequest, a3 as LoginResult, A as LogsParams, a as SessionError, S as SessionInfo, b as SiweMessageParams, _ as SiweMessageResult, au as UpgradeParams, U as UserApiClient, ah as addHexPrefix, ap as assertValidFilePath, j as assertValidImageReference, n as assertValidPrivateKey, P as checkERC7702Delegation, V as createSiweMessage, ak as createViemClients, N as estimateBatchGas, k as extractAppNameFromImage, D as generateNewPrivateKey, X as generateNonce, d as getAvailableEnvironments, c as getBillingEnvironmentConfig, e as getBuildType, ag as getChainFromID, a1 as getComputeApiSession, g as getEnvironmentConfig, i as isEnvironmentAvailable, f as isMainnet, a2 as isSessionValid, Y as isSiweMessageExpired, Z as isSiweMessageNotYetValid, B as isSubscriptionActive, $ as loginToComputeApi, a0 as logoutFromComputeApi, W as parseSiweMessage, t as sanitizeString, u as sanitizeURL, w as sanitizeXURL, ai as stripHexPrefix, r as validateAppID, v as validateAppName, x as validateCreateAppParams, at as validateDeployParams, q as validateDescription, ao as validateFilePath, aq as validateImagePath, h as validateImageReference, l as validateInstanceTypeSKU, s as validateLogVisibility, y as validateLogsParams, m as validatePrivateKeyFormat, ar as validateResourceUsageMonitoring, o as validateURL, av as validateUpgradeParams, p as validateXURL } from './helpers-
|
|
8
|
-
import { G as GasEstimate,
|
|
9
|
-
export {
|
|
6
|
+
import { L as LogVisibility, aj as ResourceUsageMonitoring } from './helpers-D_AbDeP4.js';
|
|
7
|
+
export { F as AppInfo, I as AppMetrics, H as AppProfileInfo, al as AppRelease, am as AppReleaseBuild, an as AppResponse, K as BillingApiClient, C as ComputeApiConfig, z as CreateAppParams, as as DeployParams, Q as EstimateBatchGasOptions, G as GeneratedKey, a4 as LoginRequest, a3 as LoginResult, A as LogsParams, a as SessionError, S as SessionInfo, b as SiweMessageParams, _ as SiweMessageResult, au as UpgradeParams, U as UserApiClient, ah as addHexPrefix, ap as assertValidFilePath, j as assertValidImageReference, n as assertValidPrivateKey, P as checkERC7702Delegation, V as createSiweMessage, ak as createViemClients, N as estimateBatchGas, k as extractAppNameFromImage, D as generateNewPrivateKey, X as generateNonce, d as getAvailableEnvironments, c as getBillingEnvironmentConfig, e as getBuildType, ag as getChainFromID, a1 as getComputeApiSession, g as getEnvironmentConfig, i as isEnvironmentAvailable, f as isMainnet, a2 as isSessionValid, Y as isSiweMessageExpired, Z as isSiweMessageNotYetValid, B as isSubscriptionActive, $ as loginToComputeApi, a0 as logoutFromComputeApi, W as parseSiweMessage, t as sanitizeString, u as sanitizeURL, w as sanitizeXURL, ai as stripHexPrefix, r as validateAppID, v as validateAppName, x as validateCreateAppParams, at as validateDeployParams, q as validateDescription, ao as validateFilePath, aq as validateImagePath, h as validateImageReference, l as validateInstanceTypeSKU, s as validateLogVisibility, y as validateLogsParams, m as validatePrivateKeyFormat, ar as validateResourceUsageMonitoring, o as validateURL, av as validateUpgradeParams, p as validateXURL } from './helpers-D_AbDeP4.js';
|
|
8
|
+
import { G as GasEstimate, ad as Logger, a1 as PreparedDeploy, a8 as EnvironmentConfig, a6 as DeployResult, a2 as PreparedUpgrade, A as AppId } from './index-DD7ZLbqD.js';
|
|
9
|
+
export { ao as AlreadyActiveResponse, ae as AppProfile, af as AppProfileResponse, a4 as AppRecord, a7 as BillingEnvironmentConfig, at as CancelResponse, ar as CancelSuccessResponse, ah as ChainID, an as CheckoutCreatedResponse, ak as CreateSubscriptionOptions, am as CreateSubscriptionResponse, Q as DeployAppOpts, a5 as DeployOptions, aw as DeployProgressCallback, ax as DeployStep, ac as DockerImageConfig, E as EstimateGasOptions, Z as ExecuteDeployResult, _ as ExecuteUpgradeResult, Y as GasOpts, al as GetSubscriptionOptions, ab as ImageDigestResult, a3 as LifecycleOpts, as as NoActiveSubscriptionResponse, aa as ParsedEnvironment, ap as PaymentIssueResponse, W as PrepareDeployFromVerifiableBuildOpts, T as PrepareDeployOpts, X as PrepareUpgradeFromVerifiableBuildOpts, V as PrepareUpgradeOpts, $ as PreparedDeployData, a0 as PreparedUpgradeData, ag as ProductID, au as ProductSubscriptionResponse, a9 as Release, ay as SequentialDeployResult, aq as SubscribeResponse, aj as SubscriptionLineItem, av as SubscriptionOpts, ai as SubscriptionStatus, R as UpgradeAppOpts, l as calculateAppID, h as estimateTransactionGas, i as formatETH, g as getAllAppsByDeveloper, az as getAppLatestReleaseBlockNumbers, f as getAppsByBillingAccount, e as getBillingType, aA as getBlockTimestamps, O as logVisibility, N as noopLogger } from './index-DD7ZLbqD.js';
|
|
10
10
|
|
|
11
11
|
interface SubmitBuildRequest {
|
|
12
12
|
repoUrl: string;
|
|
@@ -181,6 +181,12 @@ interface SDKDeployOptions {
|
|
|
181
181
|
logVisibility: LogVisibility;
|
|
182
182
|
/** Resource usage monitoring setting - optional, defaults to 'enable' */
|
|
183
183
|
resourceUsageMonitoring?: ResourceUsageMonitoring;
|
|
184
|
+
/** Billing mode: developer (default) or app (isolated billing) */
|
|
185
|
+
billTo?: "developer" | "app";
|
|
186
|
+
/** Skip quota check */
|
|
187
|
+
skipQuotaCheck?: boolean;
|
|
188
|
+
/** Optional salt for deterministic app address prediction (32 bytes) */
|
|
189
|
+
salt?: Uint8Array | Buffer;
|
|
184
190
|
/** Optional gas params from estimation (use result from prepareDeploy) */
|
|
185
191
|
gas?: GasEstimate;
|
|
186
192
|
/** Skip telemetry (used when called from CLI) - optional */
|
|
@@ -234,6 +240,10 @@ interface VerifiableBuildOptions {
|
|
|
234
240
|
logVisibility: LogVisibility;
|
|
235
241
|
/** Resource usage monitoring setting - optional, defaults to 'enable' */
|
|
236
242
|
resourceUsageMonitoring?: ResourceUsageMonitoring;
|
|
243
|
+
/** Billing mode: developer (default) or app (isolated billing) */
|
|
244
|
+
billTo?: "developer" | "app";
|
|
245
|
+
/** Skip quota check */
|
|
246
|
+
skipQuotaCheck?: boolean;
|
|
237
247
|
/** Skip telemetry (used when called from CLI) - optional */
|
|
238
248
|
skipTelemetry?: boolean;
|
|
239
249
|
}
|
|
@@ -769,6 +779,148 @@ interface PreflightContext {
|
|
|
769
779
|
*/
|
|
770
780
|
declare function getCurrentInstanceType(preflightCtx: PreflightContext, appID: Address, logger: Logger, clientId?: string): Promise<string>;
|
|
771
781
|
|
|
782
|
+
var USDCCredits = [
|
|
783
|
+
{
|
|
784
|
+
type: "function",
|
|
785
|
+
name: "purchaseCreditsFor",
|
|
786
|
+
stateMutability: "nonpayable",
|
|
787
|
+
inputs: [
|
|
788
|
+
{
|
|
789
|
+
name: "amount",
|
|
790
|
+
type: "uint256"
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
name: "account",
|
|
794
|
+
type: "address"
|
|
795
|
+
}
|
|
796
|
+
],
|
|
797
|
+
outputs: [
|
|
798
|
+
]
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
type: "function",
|
|
802
|
+
name: "purchaseCredits",
|
|
803
|
+
stateMutability: "nonpayable",
|
|
804
|
+
inputs: [
|
|
805
|
+
{
|
|
806
|
+
name: "amount",
|
|
807
|
+
type: "uint256"
|
|
808
|
+
}
|
|
809
|
+
],
|
|
810
|
+
outputs: [
|
|
811
|
+
]
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
type: "function",
|
|
815
|
+
name: "usdc",
|
|
816
|
+
stateMutability: "view",
|
|
817
|
+
inputs: [
|
|
818
|
+
],
|
|
819
|
+
outputs: [
|
|
820
|
+
{
|
|
821
|
+
name: "",
|
|
822
|
+
type: "address"
|
|
823
|
+
}
|
|
824
|
+
]
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
type: "function",
|
|
828
|
+
name: "minimumPurchase",
|
|
829
|
+
stateMutability: "view",
|
|
830
|
+
inputs: [
|
|
831
|
+
],
|
|
832
|
+
outputs: [
|
|
833
|
+
{
|
|
834
|
+
name: "",
|
|
835
|
+
type: "uint256"
|
|
836
|
+
}
|
|
837
|
+
]
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
type: "event",
|
|
841
|
+
name: "CreditsPurchased",
|
|
842
|
+
inputs: [
|
|
843
|
+
{
|
|
844
|
+
name: "purchaser",
|
|
845
|
+
type: "address",
|
|
846
|
+
indexed: true
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
name: "account",
|
|
850
|
+
type: "address",
|
|
851
|
+
indexed: true
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
name: "amount",
|
|
855
|
+
type: "uint256",
|
|
856
|
+
indexed: false
|
|
857
|
+
}
|
|
858
|
+
]
|
|
859
|
+
}
|
|
860
|
+
];
|
|
861
|
+
|
|
862
|
+
var ERC20 = [
|
|
863
|
+
{
|
|
864
|
+
type: "function",
|
|
865
|
+
name: "approve",
|
|
866
|
+
stateMutability: "nonpayable",
|
|
867
|
+
inputs: [
|
|
868
|
+
{
|
|
869
|
+
name: "spender",
|
|
870
|
+
type: "address"
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
name: "amount",
|
|
874
|
+
type: "uint256"
|
|
875
|
+
}
|
|
876
|
+
],
|
|
877
|
+
outputs: [
|
|
878
|
+
{
|
|
879
|
+
name: "",
|
|
880
|
+
type: "bool"
|
|
881
|
+
}
|
|
882
|
+
]
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
type: "function",
|
|
886
|
+
name: "balanceOf",
|
|
887
|
+
stateMutability: "view",
|
|
888
|
+
inputs: [
|
|
889
|
+
{
|
|
890
|
+
name: "account",
|
|
891
|
+
type: "address"
|
|
892
|
+
}
|
|
893
|
+
],
|
|
894
|
+
outputs: [
|
|
895
|
+
{
|
|
896
|
+
name: "",
|
|
897
|
+
type: "uint256"
|
|
898
|
+
}
|
|
899
|
+
]
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
type: "function",
|
|
903
|
+
name: "allowance",
|
|
904
|
+
stateMutability: "view",
|
|
905
|
+
inputs: [
|
|
906
|
+
{
|
|
907
|
+
name: "owner",
|
|
908
|
+
type: "address"
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
name: "spender",
|
|
912
|
+
type: "address"
|
|
913
|
+
}
|
|
914
|
+
],
|
|
915
|
+
outputs: [
|
|
916
|
+
{
|
|
917
|
+
name: "",
|
|
918
|
+
type: "uint256"
|
|
919
|
+
}
|
|
920
|
+
]
|
|
921
|
+
}
|
|
922
|
+
];
|
|
923
|
+
|
|
772
924
|
/**
|
|
773
925
|
* Main SDK Client entry point
|
|
774
926
|
*/
|
|
@@ -786,4 +938,4 @@ interface ECloudClient {
|
|
|
786
938
|
}
|
|
787
939
|
declare function createECloudClient(cfg: ClientConfig): ECloudClient;
|
|
788
940
|
|
|
789
|
-
export { type AppEnvironment, AppId, AuthRequiredError, BUILD_STATUS, BadRequestError, BillingModule, type Build, BuildError, BuildFailedError, type BuildModule, type BuildModuleConfig, type BuildProgress, type BuildStatus, type ClientConfig, ComputeModule, ConflictError, DeployResult, type ECloudClient, type Environment, EnvironmentConfig, ForbiddenError, GasEstimate, type LegacyKey, type LogChunk, LogVisibility, Logger, type Metric, type MetricsContext, NoopClient, NotFoundError, PostHogClient, type PrepareDeployResult, type PrepareUpgradeResult, PreparedDeploy, PreparedUpgrade, type PrivateKeySource, ResourceUsageMonitoring, type SDKDeployOptions, type SDKUpgradeOptions, type StoredKey, type SubmitBuildRequest, type SubmitBuildResponse, type TelemetryClient, type TelemetryClientOptions, type TelemetryWrapperOptions, TimeoutError, type VerifyProvenanceFailure, type VerifyProvenanceResult, type VerifyProvenanceSuccess, addMetric, addMetricWithDimensions, createAppEnvironment, createBuildModule, createECloudClient, createMetricsContext, createTelemetryClient, deleteLegacyPrivateKey, deletePrivateKey, emitMetrics, executeDeploy, executeUpgrade, fetchTemplateCatalog, getAddressFromPrivateKey, getCategoryDescriptions, getCurrentInstanceType, getLegacyKeys, getLegacyPrivateKey, getPostHogAPIKey, getPostHogEndpoint, getPrivateKey, getPrivateKeyWithSource, getTemplate, isNoopClient, keyExists, listStoredKeys, prepareDeploy, prepareDeployFromVerifiableBuild, prepareUpgrade, prepareUpgradeFromVerifiableBuild, requirePrivateKey, storePrivateKey, validatePrivateKey, watchDeployment, watchUpgrade, withSDKTelemetry };
|
|
941
|
+
export { type AppEnvironment, AppId, AuthRequiredError, BUILD_STATUS, BadRequestError, BillingModule, type Build, BuildError, BuildFailedError, type BuildModule, type BuildModuleConfig, type BuildProgress, type BuildStatus, type ClientConfig, ComputeModule, ConflictError, DeployResult, type ECloudClient, ERC20 as ERC20ABI, type Environment, EnvironmentConfig, ForbiddenError, GasEstimate, type LegacyKey, type LogChunk, LogVisibility, Logger, type Metric, type MetricsContext, NoopClient, NotFoundError, PostHogClient, type PrepareDeployResult, type PrepareUpgradeResult, PreparedDeploy, PreparedUpgrade, type PrivateKeySource, ResourceUsageMonitoring, type SDKDeployOptions, type SDKUpgradeOptions, type StoredKey, type SubmitBuildRequest, type SubmitBuildResponse, type TelemetryClient, type TelemetryClientOptions, type TelemetryWrapperOptions, TimeoutError, USDCCredits as USDCCreditsABI, type VerifyProvenanceFailure, type VerifyProvenanceResult, type VerifyProvenanceSuccess, addMetric, addMetricWithDimensions, createAppEnvironment, createBuildModule, createECloudClient, createMetricsContext, createTelemetryClient, deleteLegacyPrivateKey, deletePrivateKey, emitMetrics, executeDeploy, executeUpgrade, fetchTemplateCatalog, getAddressFromPrivateKey, getCategoryDescriptions, getCurrentInstanceType, getLegacyKeys, getLegacyPrivateKey, getPostHogAPIKey, getPostHogEndpoint, getPrivateKey, getPrivateKeyWithSource, getTemplate, isNoopClient, keyExists, listStoredKeys, prepareDeploy, prepareDeployFromVerifiableBuild, prepareUpgrade, prepareUpgradeFromVerifiableBuild, requirePrivateKey, storePrivateKey, validatePrivateKey, watchDeployment, watchUpgrade, withSDKTelemetry };
|