@imtbl/sdk 0.27.5 → 0.27.7
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/blockchain_data.js +1 -1
- package/dist/browser/checkout.js +2 -2
- package/dist/checkout_sdk.d.ts +3 -3
- package/dist/checkout_sdk.js +42 -44
- package/dist/checkout_widgets.d.ts +5 -1
- package/dist/checkout_widgets.js +1 -1
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +4 -4
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +45 -47
- package/dist/index.d.ts +8 -4
- package/dist/index.js +45 -47
- package/dist/passport.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3631,7 +3631,7 @@ class MultiRollupApiClients {
|
|
|
3631
3631
|
}
|
|
3632
3632
|
|
|
3633
3633
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
3634
|
-
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.27.
|
|
3634
|
+
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.27.7' };
|
|
3635
3635
|
const createConfig = ({ basePath, headers, }) => {
|
|
3636
3636
|
if (!basePath.trim()) {
|
|
3637
3637
|
throw Error('basePath can not be empty');
|
|
@@ -3691,7 +3691,7 @@ class APIError extends Error {
|
|
|
3691
3691
|
|
|
3692
3692
|
/* eslint-disable implicit-arrow-linebreak */
|
|
3693
3693
|
const defaultHeaders = {
|
|
3694
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.27.
|
|
3694
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.27.7',
|
|
3695
3695
|
};
|
|
3696
3696
|
/**
|
|
3697
3697
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -4102,7 +4102,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
4102
4102
|
chainID,
|
|
4103
4103
|
coreContractAddress,
|
|
4104
4104
|
registrationContractAddress,
|
|
4105
|
-
sdkVersion: 'ts-immutable-sdk-0.27.
|
|
4105
|
+
sdkVersion: 'ts-immutable-sdk-0.27.7',
|
|
4106
4106
|
});
|
|
4107
4107
|
/**
|
|
4108
4108
|
* Sets `sdkVersion` at the time of build
|
|
@@ -28712,7 +28712,7 @@ const CONTRACTS_FOR_CHAIN_ID = {
|
|
|
28712
28712
|
multicall: '0xD17c98b38bA28c7eA1080317EB9AB2b9663BEd92',
|
|
28713
28713
|
coreFactory: '0x8AC26EfCbf5D700b37A27aA00E6934e6904e7B8e',
|
|
28714
28714
|
quoterV2: '0x0Afe6F5f4DC34461A801420634239FFaD50A2e44',
|
|
28715
|
-
peripheryRouter: '
|
|
28715
|
+
peripheryRouter: '0x57c73281f2697a632AEF1A48CD6ff600f49ee344',
|
|
28716
28716
|
secondaryFee: '0x5893A5c7bc615Dfd36D7383366d00FFFca5f7178',
|
|
28717
28717
|
},
|
|
28718
28718
|
};
|
|
@@ -31034,8 +31034,46 @@ const $7d1bfafb81e64d74$export$3a4140bd9e983e4e = async (provider, insufficientI
|
|
|
31034
31034
|
|
|
31035
31035
|
|
|
31036
31036
|
|
|
31037
|
+
|
|
31038
|
+
|
|
31039
|
+
|
|
31040
|
+
|
|
31041
|
+
const $5e9bcae98dc8ff19$export$1165ca270f090a66 = (isDevelopment, isProduction)=>{
|
|
31042
|
+
const postEndpoint = ()=>{
|
|
31043
|
+
if (isDevelopment) return ($d85ad1457a3f1a83$export$89133ca13c5ee30)[$d85ad1457a3f1a83$export$7d3a9eeba384fa59];
|
|
31044
|
+
if (isProduction) return ($d85ad1457a3f1a83$export$89133ca13c5ee30)[(Environment$1).PRODUCTION];
|
|
31045
|
+
return ($d85ad1457a3f1a83$export$89133ca13c5ee30)[(Environment$1).SANDBOX];
|
|
31046
|
+
};
|
|
31047
|
+
const checkDexAvailability = async ()=>{
|
|
31048
|
+
// TEMP FIX: Returns true for sandbox environment
|
|
31049
|
+
if (!isDevelopment && !isProduction) return true;
|
|
31050
|
+
let response;
|
|
31051
|
+
try {
|
|
31052
|
+
response = await (0, globalAxios$1).post(`${postEndpoint()}/v1/availability/checkout/swap`);
|
|
31053
|
+
} catch (error) {
|
|
31054
|
+
response = error.response;
|
|
31055
|
+
}
|
|
31056
|
+
if (response.status === 403) return false;
|
|
31057
|
+
if (response.status === 204) return true;
|
|
31058
|
+
throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`Error fetching from api: ${response.status} ${response.statusText}`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).API_ERROR);
|
|
31059
|
+
};
|
|
31060
|
+
return {
|
|
31061
|
+
checkDexAvailability: checkDexAvailability
|
|
31062
|
+
};
|
|
31063
|
+
};
|
|
31064
|
+
|
|
31065
|
+
|
|
31066
|
+
|
|
31067
|
+
|
|
31037
31068
|
const $1fda5c40669a566d$export$1fac8e857d728583 = async ()=>false;
|
|
31038
|
-
const $1fda5c40669a566d$export$2e83e9eeaf217e20 = async ()=>
|
|
31069
|
+
const $1fda5c40669a566d$export$2e83e9eeaf217e20 = async (config)=>{
|
|
31070
|
+
const availability = ($5e9bcae98dc8ff19$export$1165ca270f090a66)(config.isDevelopment, config.isProduction);
|
|
31071
|
+
try {
|
|
31072
|
+
return await availability.checkDexAvailability();
|
|
31073
|
+
} catch {
|
|
31074
|
+
return false;
|
|
31075
|
+
}
|
|
31076
|
+
};
|
|
31039
31077
|
|
|
31040
31078
|
|
|
31041
31079
|
const $7f2e17f026d4fc8d$var$isPassportProvider = (provider)=>(provider.provider?.isPassport === true) ?? false;
|
|
@@ -31053,7 +31091,7 @@ const $7f2e17f026d4fc8d$export$86d9f998ddda013e = async (config, provider)=>{
|
|
|
31053
31091
|
});
|
|
31054
31092
|
if (availableRoutingOptions.swap) geoBlockingChecks.push({
|
|
31055
31093
|
id: "swap",
|
|
31056
|
-
promise: ($1fda5c40669a566d$export$2e83e9eeaf217e20)()
|
|
31094
|
+
promise: ($1fda5c40669a566d$export$2e83e9eeaf217e20)(config)
|
|
31057
31095
|
});
|
|
31058
31096
|
if (geoBlockingChecks.length > 0) {
|
|
31059
31097
|
const promises = geoBlockingChecks.map((geoBlockingCheck)=>geoBlockingCheck.promise);
|
|
@@ -32760,34 +32798,6 @@ async function $d35036efee31c5d1$export$dc8635800ef20f4b(provider, requirements)
|
|
|
32760
32798
|
|
|
32761
32799
|
|
|
32762
32800
|
|
|
32763
|
-
|
|
32764
|
-
|
|
32765
|
-
|
|
32766
|
-
const $5e9bcae98dc8ff19$export$1165ca270f090a66 = (isDevelopment, isProduction)=>{
|
|
32767
|
-
const postEndpoint = ()=>{
|
|
32768
|
-
if (isDevelopment) return ($d85ad1457a3f1a83$export$89133ca13c5ee30)[$d85ad1457a3f1a83$export$7d3a9eeba384fa59];
|
|
32769
|
-
if (isProduction) return ($d85ad1457a3f1a83$export$89133ca13c5ee30)[(Environment$1).PRODUCTION];
|
|
32770
|
-
return ($d85ad1457a3f1a83$export$89133ca13c5ee30)[(Environment$1).SANDBOX];
|
|
32771
|
-
};
|
|
32772
|
-
const checkDexAvailability = async ()=>{
|
|
32773
|
-
let response;
|
|
32774
|
-
try {
|
|
32775
|
-
response = await (0, globalAxios$1).post(`${postEndpoint()}/v1/availability/checkout/swap`);
|
|
32776
|
-
} catch (error) {
|
|
32777
|
-
response = error.response;
|
|
32778
|
-
}
|
|
32779
|
-
if (response.status === 403) return false;
|
|
32780
|
-
if (response.status === 204) return true;
|
|
32781
|
-
throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`Error fetching from api: ${response.status} ${response.statusText}`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).API_ERROR);
|
|
32782
|
-
};
|
|
32783
|
-
return {
|
|
32784
|
-
checkDexAvailability: checkDexAvailability
|
|
32785
|
-
};
|
|
32786
|
-
};
|
|
32787
|
-
|
|
32788
|
-
|
|
32789
|
-
|
|
32790
|
-
|
|
32791
32801
|
const $a8cb37a3fc8eb863$var$SANDBOX_CONFIGURATION = {
|
|
32792
32802
|
baseConfig: {
|
|
32793
32803
|
environment: (Environment$1).SANDBOX
|
|
@@ -32913,9 +32923,6 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
|
|
|
32913
32923
|
* Determines the requirements for performing a buy.
|
|
32914
32924
|
* @param {BuyParams} params - The parameters for the buy.
|
|
32915
32925
|
*/ async buy(params) {
|
|
32916
|
-
if (this.config.isProduction) throw new Error("This endpoint is not currently available.");
|
|
32917
|
-
// eslint-disable-next-line no-console
|
|
32918
|
-
console.warn("This endpoint is currently under construction.");
|
|
32919
32926
|
if (params.orders.length > 1) // eslint-disable-next-line no-console
|
|
32920
32927
|
console.warn("This endpoint currently only processes the first order in the array.");
|
|
32921
32928
|
const web3Provider = await $bb88265fe45a0393$export$9e1fd9cc88c637a0(this.config, params.provider);
|
|
@@ -32927,9 +32934,6 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
|
|
|
32927
32934
|
* Only currently actions the first order in the array until we support batch processing.
|
|
32928
32935
|
* Only currently actions the first fee in the fees array of each order until we support multiple fees.
|
|
32929
32936
|
*/ async sell(params) {
|
|
32930
|
-
if (this.config.isProduction) throw new Error("This endpoint is not currently available.");
|
|
32931
|
-
// eslint-disable-next-line no-console
|
|
32932
|
-
console.warn("This endpoint is currently under construction.");
|
|
32933
32937
|
if (params.orders.length > 1) // eslint-disable-next-line no-console
|
|
32934
32938
|
console.warn("This endpoint currently only processes the first order in the array.");
|
|
32935
32939
|
const web3Provider = await $bb88265fe45a0393$export$9e1fd9cc88c637a0(this.config, params.provider);
|
|
@@ -32939,9 +32943,6 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
|
|
|
32939
32943
|
* Cancels a sell.
|
|
32940
32944
|
* @param {CancelParams} params - The parameters for the cancel.
|
|
32941
32945
|
*/ async cancel(params) {
|
|
32942
|
-
if (this.config.isProduction) throw new Error("This endpoint is not currently available.");
|
|
32943
|
-
// eslint-disable-next-line no-console
|
|
32944
|
-
console.warn("This endpoint is currently under construction.");
|
|
32945
32946
|
// eslint-disable-next-line no-console
|
|
32946
32947
|
console.warn("This endpoint currently only processes the first order in the array.");
|
|
32947
32948
|
const web3Provider = await $bb88265fe45a0393$export$9e1fd9cc88c637a0(this.config, params.provider);
|
|
@@ -32951,9 +32952,6 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
|
|
|
32951
32952
|
* Determines the transaction requirements to complete a purchase.
|
|
32952
32953
|
* @params {SmartCheckoutParams} params - The parameters for smart checkout.
|
|
32953
32954
|
*/ async smartCheckout(params) {
|
|
32954
|
-
if (this.config.isProduction) throw new Error("This endpoint is not currently available.");
|
|
32955
|
-
// eslint-disable-next-line no-console
|
|
32956
|
-
console.warn("This endpoint is currently under construction.");
|
|
32957
32955
|
const web3Provider = await $bb88265fe45a0393$export$9e1fd9cc88c637a0(this.config, params.provider);
|
|
32958
32956
|
let itemRequirements = [];
|
|
32959
32957
|
try {
|
|
@@ -33068,7 +33066,7 @@ var $045213b18e9f1f94$export$75be0f6af9650f2c;
|
|
|
33068
33066
|
})($045213b18e9f1f94$export$75be0f6af9650f2c || ($045213b18e9f1f94$export$75be0f6af9650f2c = {}));
|
|
33069
33067
|
|
|
33070
33068
|
|
|
33071
|
-
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.27.
|
|
33069
|
+
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.27.7";
|
|
33072
33070
|
const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
|
|
33073
33071
|
const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
|
|
33074
33072
|
|
package/dist/index.d.ts
CHANGED
|
@@ -17284,6 +17284,9 @@ declare class CheckoutConfiguration {
|
|
|
17284
17284
|
readonly networkMap: NetworkMap;
|
|
17285
17285
|
constructor(config: CheckoutModuleConfiguration);
|
|
17286
17286
|
}
|
|
17287
|
+
type AvailabilityService = {
|
|
17288
|
+
checkDexAvailability: () => Promise<boolean>;
|
|
17289
|
+
};
|
|
17287
17290
|
interface FiatRampWidgetParams {
|
|
17288
17291
|
exchangeType: ExchangeType;
|
|
17289
17292
|
isPassport: boolean;
|
|
@@ -17302,9 +17305,6 @@ declare class FiatRampService {
|
|
|
17302
17305
|
feeEstimate(): Promise<OnRampProviderFees>;
|
|
17303
17306
|
createWidgetUrl(params: FiatRampWidgetParams): Promise<string>;
|
|
17304
17307
|
}
|
|
17305
|
-
type AvailabilityService = {
|
|
17306
|
-
checkDexAvailability: () => Promise<boolean>;
|
|
17307
|
-
};
|
|
17308
17308
|
declare class Checkout {
|
|
17309
17309
|
readonly config: CheckoutConfiguration;
|
|
17310
17310
|
readonly fiatRampService: FiatRampService;
|
|
@@ -32344,7 +32344,11 @@ declare enum SaleEventType {
|
|
|
32344
32344
|
* @property {string} transactionHash - The hash of the successful transaction.
|
|
32345
32345
|
*/
|
|
32346
32346
|
type SaleSuccess = {
|
|
32347
|
-
|
|
32347
|
+
transactions: {
|
|
32348
|
+
method: string;
|
|
32349
|
+
hash: string | undefined;
|
|
32350
|
+
}[];
|
|
32351
|
+
[key: string]: unknown;
|
|
32348
32352
|
};
|
|
32349
32353
|
/**
|
|
32350
32354
|
* Type representing a Sale Widget with type FAILURE.
|
package/dist/index.js
CHANGED
|
@@ -3609,7 +3609,7 @@ class MultiRollupApiClients {
|
|
|
3609
3609
|
}
|
|
3610
3610
|
|
|
3611
3611
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
3612
|
-
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.27.
|
|
3612
|
+
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.27.7' };
|
|
3613
3613
|
const createConfig = ({ basePath, headers, }) => {
|
|
3614
3614
|
if (!basePath.trim()) {
|
|
3615
3615
|
throw Error('basePath can not be empty');
|
|
@@ -3669,7 +3669,7 @@ class APIError extends Error {
|
|
|
3669
3669
|
|
|
3670
3670
|
/* eslint-disable implicit-arrow-linebreak */
|
|
3671
3671
|
const defaultHeaders = {
|
|
3672
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.27.
|
|
3672
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.27.7',
|
|
3673
3673
|
};
|
|
3674
3674
|
/**
|
|
3675
3675
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -4080,7 +4080,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
4080
4080
|
chainID,
|
|
4081
4081
|
coreContractAddress,
|
|
4082
4082
|
registrationContractAddress,
|
|
4083
|
-
sdkVersion: 'ts-immutable-sdk-0.27.
|
|
4083
|
+
sdkVersion: 'ts-immutable-sdk-0.27.7',
|
|
4084
4084
|
});
|
|
4085
4085
|
/**
|
|
4086
4086
|
* Sets `sdkVersion` at the time of build
|
|
@@ -28690,7 +28690,7 @@ const CONTRACTS_FOR_CHAIN_ID = {
|
|
|
28690
28690
|
multicall: '0xD17c98b38bA28c7eA1080317EB9AB2b9663BEd92',
|
|
28691
28691
|
coreFactory: '0x8AC26EfCbf5D700b37A27aA00E6934e6904e7B8e',
|
|
28692
28692
|
quoterV2: '0x0Afe6F5f4DC34461A801420634239FFaD50A2e44',
|
|
28693
|
-
peripheryRouter: '
|
|
28693
|
+
peripheryRouter: '0x57c73281f2697a632AEF1A48CD6ff600f49ee344',
|
|
28694
28694
|
secondaryFee: '0x5893A5c7bc615Dfd36D7383366d00FFFca5f7178',
|
|
28695
28695
|
},
|
|
28696
28696
|
};
|
|
@@ -31012,8 +31012,46 @@ const $7d1bfafb81e64d74$export$3a4140bd9e983e4e = async (provider, insufficientI
|
|
|
31012
31012
|
|
|
31013
31013
|
|
|
31014
31014
|
|
|
31015
|
+
|
|
31016
|
+
|
|
31017
|
+
|
|
31018
|
+
|
|
31019
|
+
const $5e9bcae98dc8ff19$export$1165ca270f090a66 = (isDevelopment, isProduction)=>{
|
|
31020
|
+
const postEndpoint = ()=>{
|
|
31021
|
+
if (isDevelopment) return ($d85ad1457a3f1a83$export$89133ca13c5ee30)[$d85ad1457a3f1a83$export$7d3a9eeba384fa59];
|
|
31022
|
+
if (isProduction) return ($d85ad1457a3f1a83$export$89133ca13c5ee30)[(Environment$1).PRODUCTION];
|
|
31023
|
+
return ($d85ad1457a3f1a83$export$89133ca13c5ee30)[(Environment$1).SANDBOX];
|
|
31024
|
+
};
|
|
31025
|
+
const checkDexAvailability = async ()=>{
|
|
31026
|
+
// TEMP FIX: Returns true for sandbox environment
|
|
31027
|
+
if (!isDevelopment && !isProduction) return true;
|
|
31028
|
+
let response;
|
|
31029
|
+
try {
|
|
31030
|
+
response = await (0, globalAxios$1).post(`${postEndpoint()}/v1/availability/checkout/swap`);
|
|
31031
|
+
} catch (error) {
|
|
31032
|
+
response = error.response;
|
|
31033
|
+
}
|
|
31034
|
+
if (response.status === 403) return false;
|
|
31035
|
+
if (response.status === 204) return true;
|
|
31036
|
+
throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`Error fetching from api: ${response.status} ${response.statusText}`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).API_ERROR);
|
|
31037
|
+
};
|
|
31038
|
+
return {
|
|
31039
|
+
checkDexAvailability: checkDexAvailability
|
|
31040
|
+
};
|
|
31041
|
+
};
|
|
31042
|
+
|
|
31043
|
+
|
|
31044
|
+
|
|
31045
|
+
|
|
31015
31046
|
const $1fda5c40669a566d$export$1fac8e857d728583 = async ()=>false;
|
|
31016
|
-
const $1fda5c40669a566d$export$2e83e9eeaf217e20 = async ()=>
|
|
31047
|
+
const $1fda5c40669a566d$export$2e83e9eeaf217e20 = async (config)=>{
|
|
31048
|
+
const availability = ($5e9bcae98dc8ff19$export$1165ca270f090a66)(config.isDevelopment, config.isProduction);
|
|
31049
|
+
try {
|
|
31050
|
+
return await availability.checkDexAvailability();
|
|
31051
|
+
} catch {
|
|
31052
|
+
return false;
|
|
31053
|
+
}
|
|
31054
|
+
};
|
|
31017
31055
|
|
|
31018
31056
|
|
|
31019
31057
|
const $7f2e17f026d4fc8d$var$isPassportProvider = (provider)=>(provider.provider?.isPassport === true) ?? false;
|
|
@@ -31031,7 +31069,7 @@ const $7f2e17f026d4fc8d$export$86d9f998ddda013e = async (config, provider)=>{
|
|
|
31031
31069
|
});
|
|
31032
31070
|
if (availableRoutingOptions.swap) geoBlockingChecks.push({
|
|
31033
31071
|
id: "swap",
|
|
31034
|
-
promise: ($1fda5c40669a566d$export$2e83e9eeaf217e20)()
|
|
31072
|
+
promise: ($1fda5c40669a566d$export$2e83e9eeaf217e20)(config)
|
|
31035
31073
|
});
|
|
31036
31074
|
if (geoBlockingChecks.length > 0) {
|
|
31037
31075
|
const promises = geoBlockingChecks.map((geoBlockingCheck)=>geoBlockingCheck.promise);
|
|
@@ -32738,34 +32776,6 @@ async function $d35036efee31c5d1$export$dc8635800ef20f4b(provider, requirements)
|
|
|
32738
32776
|
|
|
32739
32777
|
|
|
32740
32778
|
|
|
32741
|
-
|
|
32742
|
-
|
|
32743
|
-
|
|
32744
|
-
const $5e9bcae98dc8ff19$export$1165ca270f090a66 = (isDevelopment, isProduction)=>{
|
|
32745
|
-
const postEndpoint = ()=>{
|
|
32746
|
-
if (isDevelopment) return ($d85ad1457a3f1a83$export$89133ca13c5ee30)[$d85ad1457a3f1a83$export$7d3a9eeba384fa59];
|
|
32747
|
-
if (isProduction) return ($d85ad1457a3f1a83$export$89133ca13c5ee30)[(Environment$1).PRODUCTION];
|
|
32748
|
-
return ($d85ad1457a3f1a83$export$89133ca13c5ee30)[(Environment$1).SANDBOX];
|
|
32749
|
-
};
|
|
32750
|
-
const checkDexAvailability = async ()=>{
|
|
32751
|
-
let response;
|
|
32752
|
-
try {
|
|
32753
|
-
response = await (0, globalAxios$1).post(`${postEndpoint()}/v1/availability/checkout/swap`);
|
|
32754
|
-
} catch (error) {
|
|
32755
|
-
response = error.response;
|
|
32756
|
-
}
|
|
32757
|
-
if (response.status === 403) return false;
|
|
32758
|
-
if (response.status === 204) return true;
|
|
32759
|
-
throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`Error fetching from api: ${response.status} ${response.statusText}`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).API_ERROR);
|
|
32760
|
-
};
|
|
32761
|
-
return {
|
|
32762
|
-
checkDexAvailability: checkDexAvailability
|
|
32763
|
-
};
|
|
32764
|
-
};
|
|
32765
|
-
|
|
32766
|
-
|
|
32767
|
-
|
|
32768
|
-
|
|
32769
32779
|
const $a8cb37a3fc8eb863$var$SANDBOX_CONFIGURATION = {
|
|
32770
32780
|
baseConfig: {
|
|
32771
32781
|
environment: (Environment$1).SANDBOX
|
|
@@ -32891,9 +32901,6 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
|
|
|
32891
32901
|
* Determines the requirements for performing a buy.
|
|
32892
32902
|
* @param {BuyParams} params - The parameters for the buy.
|
|
32893
32903
|
*/ async buy(params) {
|
|
32894
|
-
if (this.config.isProduction) throw new Error("This endpoint is not currently available.");
|
|
32895
|
-
// eslint-disable-next-line no-console
|
|
32896
|
-
console.warn("This endpoint is currently under construction.");
|
|
32897
32904
|
if (params.orders.length > 1) // eslint-disable-next-line no-console
|
|
32898
32905
|
console.warn("This endpoint currently only processes the first order in the array.");
|
|
32899
32906
|
const web3Provider = await $bb88265fe45a0393$export$9e1fd9cc88c637a0(this.config, params.provider);
|
|
@@ -32905,9 +32912,6 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
|
|
|
32905
32912
|
* Only currently actions the first order in the array until we support batch processing.
|
|
32906
32913
|
* Only currently actions the first fee in the fees array of each order until we support multiple fees.
|
|
32907
32914
|
*/ async sell(params) {
|
|
32908
|
-
if (this.config.isProduction) throw new Error("This endpoint is not currently available.");
|
|
32909
|
-
// eslint-disable-next-line no-console
|
|
32910
|
-
console.warn("This endpoint is currently under construction.");
|
|
32911
32915
|
if (params.orders.length > 1) // eslint-disable-next-line no-console
|
|
32912
32916
|
console.warn("This endpoint currently only processes the first order in the array.");
|
|
32913
32917
|
const web3Provider = await $bb88265fe45a0393$export$9e1fd9cc88c637a0(this.config, params.provider);
|
|
@@ -32917,9 +32921,6 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
|
|
|
32917
32921
|
* Cancels a sell.
|
|
32918
32922
|
* @param {CancelParams} params - The parameters for the cancel.
|
|
32919
32923
|
*/ async cancel(params) {
|
|
32920
|
-
if (this.config.isProduction) throw new Error("This endpoint is not currently available.");
|
|
32921
|
-
// eslint-disable-next-line no-console
|
|
32922
|
-
console.warn("This endpoint is currently under construction.");
|
|
32923
32924
|
// eslint-disable-next-line no-console
|
|
32924
32925
|
console.warn("This endpoint currently only processes the first order in the array.");
|
|
32925
32926
|
const web3Provider = await $bb88265fe45a0393$export$9e1fd9cc88c637a0(this.config, params.provider);
|
|
@@ -32929,9 +32930,6 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
|
|
|
32929
32930
|
* Determines the transaction requirements to complete a purchase.
|
|
32930
32931
|
* @params {SmartCheckoutParams} params - The parameters for smart checkout.
|
|
32931
32932
|
*/ async smartCheckout(params) {
|
|
32932
|
-
if (this.config.isProduction) throw new Error("This endpoint is not currently available.");
|
|
32933
|
-
// eslint-disable-next-line no-console
|
|
32934
|
-
console.warn("This endpoint is currently under construction.");
|
|
32935
32933
|
const web3Provider = await $bb88265fe45a0393$export$9e1fd9cc88c637a0(this.config, params.provider);
|
|
32936
32934
|
let itemRequirements = [];
|
|
32937
32935
|
try {
|
|
@@ -33046,7 +33044,7 @@ var $045213b18e9f1f94$export$75be0f6af9650f2c;
|
|
|
33046
33044
|
})($045213b18e9f1f94$export$75be0f6af9650f2c || ($045213b18e9f1f94$export$75be0f6af9650f2c = {}));
|
|
33047
33045
|
|
|
33048
33046
|
|
|
33049
|
-
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.27.
|
|
33047
|
+
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.27.7";
|
|
33050
33048
|
const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
|
|
33051
33049
|
const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
|
|
33052
33050
|
|
package/dist/passport.js
CHANGED
|
@@ -2072,7 +2072,7 @@ class MultiRollupApiClients {
|
|
|
2072
2072
|
}
|
|
2073
2073
|
|
|
2074
2074
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2075
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.27.
|
|
2075
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.27.7' };
|
|
2076
2076
|
const createConfig = ({ basePath, headers, }) => {
|
|
2077
2077
|
if (!basePath.trim()) {
|
|
2078
2078
|
throw Error('basePath can not be empty');
|
|
@@ -2128,7 +2128,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
2128
2128
|
chainID,
|
|
2129
2129
|
coreContractAddress,
|
|
2130
2130
|
registrationContractAddress,
|
|
2131
|
-
sdkVersion: 'ts-immutable-sdk-0.27.
|
|
2131
|
+
sdkVersion: 'ts-immutable-sdk-0.27.7',
|
|
2132
2132
|
});
|
|
2133
2133
|
/**
|
|
2134
2134
|
* Sets `sdkVersion` at the time of build
|
package/package.json
CHANGED