@layr-labs/ecloud-sdk 1.0.0-dev.1 → 1.0.0-dev.3
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 +15 -0
- 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 +15 -0
- package/dist/billing.js.map +1 -1
- package/dist/browser.cjs +16 -1
- 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 +16 -1
- package/dist/browser.js.map +1 -1
- package/dist/{compute-Do2t0Fo8.d.ts → compute-BbgMH6Ef.d.ts} +1 -1
- package/dist/{compute-Bn6KcW3x.d.cts → compute-yAqGf5hM.d.cts} +1 -1
- package/dist/compute.cjs +9 -1
- 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 +9 -1
- package/dist/compute.js.map +1 -1
- package/dist/{helpers-CfsfcGJO.d.cts → helpers-CnlJ5yPE.d.cts} +1 -1
- package/dist/{helpers-BRamdfGn.d.ts → helpers-GWlLS3gz.d.ts} +1 -1
- package/dist/{index-BbH7ZCIu.d.cts → index-Bac4HjC0.d.cts} +2 -0
- package/dist/{index-BbH7ZCIu.d.ts → index-Bac4HjC0.d.ts} +2 -0
- package/dist/index.cjs +16 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as EnvironmentConfig, a7 as SubscriptionStatus, f as BillingEnvironmentConfig, $ as ProductID, k as CreateSubscriptionOptions, l as CreateSubscriptionResponse, z as GetSubscriptionOptions, a0 as ProductSubscriptionResponse, M as PaymentMethodsResponse, m as CreditPurchaseResponse, G as GasEstimate, H as Logger } from './index-
|
|
1
|
+
import { E as EnvironmentConfig, a7 as SubscriptionStatus, f as BillingEnvironmentConfig, $ as ProductID, k as CreateSubscriptionOptions, l as CreateSubscriptionResponse, z as GetSubscriptionOptions, a0 as ProductSubscriptionResponse, M as PaymentMethodsResponse, m as CreditPurchaseResponse, G as GasEstimate, H as Logger } from './index-Bac4HjC0.cjs';
|
|
2
2
|
import { Address, Hex, WalletClient, PublicClient, SignAuthorizationReturnType, Chain } from 'viem';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as EnvironmentConfig, a7 as SubscriptionStatus, f as BillingEnvironmentConfig, $ as ProductID, k as CreateSubscriptionOptions, l as CreateSubscriptionResponse, z as GetSubscriptionOptions, a0 as ProductSubscriptionResponse, M as PaymentMethodsResponse, m as CreditPurchaseResponse, G as GasEstimate, H as Logger } from './index-
|
|
1
|
+
import { E as EnvironmentConfig, a7 as SubscriptionStatus, f as BillingEnvironmentConfig, $ as ProductID, k as CreateSubscriptionOptions, l as CreateSubscriptionResponse, z as GetSubscriptionOptions, a0 as ProductSubscriptionResponse, M as PaymentMethodsResponse, m as CreditPurchaseResponse, G as GasEstimate, H as Logger } from './index-Bac4HjC0.js';
|
|
2
2
|
import { Address, Hex, WalletClient, PublicClient, SignAuthorizationReturnType, Chain } from 'viem';
|
|
3
3
|
|
|
4
4
|
/**
|
package/dist/index.cjs
CHANGED
|
@@ -4986,7 +4986,7 @@ var CanViewAppLogsPermission = "0x2fd3f2fe";
|
|
|
4986
4986
|
var CanViewSensitiveAppInfoPermission = "0x0e67b22f";
|
|
4987
4987
|
var CanUpdateAppProfilePermission = "0x036fef61";
|
|
4988
4988
|
function getDefaultClientId() {
|
|
4989
|
-
const version = true ? "1.0.0-dev.
|
|
4989
|
+
const version = true ? "1.0.0-dev.3" : "0.0.0";
|
|
4990
4990
|
return `ecloud-sdk/v${version}`;
|
|
4991
4991
|
}
|
|
4992
4992
|
var UserApiClient = class {
|
|
@@ -5804,6 +5804,12 @@ var CHAIN_ID_TO_ENVIRONMENT = {
|
|
|
5804
5804
|
[SEPOLIA_CHAIN_ID.toString()]: "sepolia",
|
|
5805
5805
|
[MAINNET_CHAIN_ID.toString()]: "mainnet-alpha"
|
|
5806
5806
|
};
|
|
5807
|
+
function getApiUrlOverride() {
|
|
5808
|
+
const raw = process.env.ECLOUD_API_URL;
|
|
5809
|
+
if (!raw) return void 0;
|
|
5810
|
+
const trimmed = raw.trim().replace(/\/+$/, "");
|
|
5811
|
+
return trimmed.length > 0 ? trimmed : void 0;
|
|
5812
|
+
}
|
|
5807
5813
|
function getEnvironmentConfig(environment, chainID) {
|
|
5808
5814
|
const env = ENVIRONMENTS[environment];
|
|
5809
5815
|
if (!env) {
|
|
@@ -5821,9 +5827,11 @@ function getEnvironmentConfig(environment, chainID) {
|
|
|
5821
5827
|
}
|
|
5822
5828
|
}
|
|
5823
5829
|
const resolvedChainID = chainID || (environment === "sepolia" || environment === "sepolia-dev" ? SEPOLIA_CHAIN_ID : MAINNET_CHAIN_ID);
|
|
5830
|
+
const apiUrlOverride = getApiUrlOverride();
|
|
5824
5831
|
return {
|
|
5825
5832
|
...env,
|
|
5826
5833
|
chainID: BigInt(resolvedChainID),
|
|
5834
|
+
...apiUrlOverride ? { userApiServerURL: apiUrlOverride } : {},
|
|
5827
5835
|
...process.env.ECLOUD_USER_API_URL && {
|
|
5828
5836
|
userApiServerURL: process.env.ECLOUD_USER_API_URL
|
|
5829
5837
|
},
|
|
@@ -5837,6 +5845,10 @@ function getBillingEnvironmentConfig(build) {
|
|
|
5837
5845
|
if (!config) {
|
|
5838
5846
|
throw new Error(`Unknown billing environment: ${build}`);
|
|
5839
5847
|
}
|
|
5848
|
+
const apiUrlOverride = getApiUrlOverride();
|
|
5849
|
+
if (apiUrlOverride) {
|
|
5850
|
+
return { billingApiServerURL: apiUrlOverride };
|
|
5851
|
+
}
|
|
5840
5852
|
return {
|
|
5841
5853
|
...config,
|
|
5842
5854
|
...process.env.ECLOUD_BILLING_API_URL && {
|
|
@@ -6172,6 +6184,9 @@ var BillingApiClient = class {
|
|
|
6172
6184
|
async makeAuthenticatedRequest(url, method, productId, body) {
|
|
6173
6185
|
if (this.options.verbose) {
|
|
6174
6186
|
console.debug(`[BillingAPI] ${method} ${url}`);
|
|
6187
|
+
if (body) {
|
|
6188
|
+
console.debug(`[BillingAPI] Payload:`, JSON.stringify(body, null, 2));
|
|
6189
|
+
}
|
|
6175
6190
|
}
|
|
6176
6191
|
const resp = this.useSession ? await this.makeSessionAuthenticatedRequest(url, method, body) : await this.makeSignatureAuthenticatedRequest(url, method, productId, body);
|
|
6177
6192
|
if (this.options.verbose) {
|