@imtbl/sdk 0.28.3 → 0.28.4-alpha.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/dist/blockchain_data.js +1 -1
- package/dist/browser/checkout.js +2 -2
- package/dist/checkout_sdk.d.ts +14 -16
- package/dist/checkout_sdk.js +2 -4
- package/dist/checkout_widgets.d.ts +19 -3
- package/dist/checkout_widgets.js +3 -2
- 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 +7 -8
- package/dist/index.d.ts +34 -18
- package/dist/index.js +7 -8
- package/dist/passport.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3651,7 +3651,7 @@ class MultiRollupApiClients {
|
|
|
3651
3651
|
}
|
|
3652
3652
|
|
|
3653
3653
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
3654
|
-
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.28.
|
|
3654
|
+
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.28.4-alpha.1' };
|
|
3655
3655
|
const createConfig = ({ basePath, headers, }) => {
|
|
3656
3656
|
if (!basePath.trim()) {
|
|
3657
3657
|
throw Error('basePath can not be empty');
|
|
@@ -3711,7 +3711,7 @@ class APIError extends Error {
|
|
|
3711
3711
|
|
|
3712
3712
|
/* eslint-disable implicit-arrow-linebreak */
|
|
3713
3713
|
const defaultHeaders = {
|
|
3714
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.28.
|
|
3714
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.28.4-alpha.1',
|
|
3715
3715
|
};
|
|
3716
3716
|
/**
|
|
3717
3717
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -4122,7 +4122,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
4122
4122
|
chainID,
|
|
4123
4123
|
coreContractAddress,
|
|
4124
4124
|
registrationContractAddress,
|
|
4125
|
-
sdkVersion: 'ts-immutable-sdk-0.28.
|
|
4125
|
+
sdkVersion: 'ts-immutable-sdk-0.28.4-alpha.1',
|
|
4126
4126
|
});
|
|
4127
4127
|
/**
|
|
4128
4128
|
* Sets `sdkVersion` at the time of build
|
|
@@ -33365,10 +33365,8 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
|
|
|
33365
33365
|
allowUnsupportedProvider: true
|
|
33366
33366
|
});
|
|
33367
33367
|
await $c99672cf2294e839$export$43f7168eb392a88c(web3Provider);
|
|
33368
|
-
const networkInfo = await $de192de6ef100f9f$export$79f13b4cfaaf0d09(this.config, web3Provider);
|
|
33369
33368
|
return {
|
|
33370
|
-
provider: web3Provider
|
|
33371
|
-
network: networkInfo
|
|
33369
|
+
provider: web3Provider
|
|
33372
33370
|
};
|
|
33373
33371
|
}
|
|
33374
33372
|
/**
|
|
@@ -33587,7 +33585,7 @@ var $045213b18e9f1f94$export$75be0f6af9650f2c;
|
|
|
33587
33585
|
})($045213b18e9f1f94$export$75be0f6af9650f2c || ($045213b18e9f1f94$export$75be0f6af9650f2c = {}));
|
|
33588
33586
|
|
|
33589
33587
|
|
|
33590
|
-
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.28.
|
|
33588
|
+
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.28.4-alpha.1";
|
|
33591
33589
|
const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
|
|
33592
33590
|
const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
|
|
33593
33591
|
|
|
@@ -33772,6 +33770,7 @@ $parcel$export($9b3189b6b155842e$exports, "SaleEventType", () => $9b3189b6b15584
|
|
|
33772
33770
|
SaleEventType["SUCCESS"] = "success";
|
|
33773
33771
|
SaleEventType["FAILURE"] = "failure";
|
|
33774
33772
|
SaleEventType["REJECTED"] = "rejected";
|
|
33773
|
+
SaleEventType["TRANSACTION_SUCCESS"] = "transaction-success";
|
|
33775
33774
|
})($9b3189b6b155842e$export$881881ffb3bd733e || ($9b3189b6b155842e$export$881881ffb3bd733e = {}));
|
|
33776
33775
|
|
|
33777
33776
|
|
|
@@ -33881,7 +33880,7 @@ function $b222a8f062090058$export$fae4199086a966a3(tagName, passport) {
|
|
|
33881
33880
|
if (attempts >= maxAttempts) {
|
|
33882
33881
|
window.clearInterval(timer);
|
|
33883
33882
|
// eslint-disable-next-line no-console
|
|
33884
|
-
console.error("failed to set the provider");
|
|
33883
|
+
console.error("failed to set the provider", err);
|
|
33885
33884
|
}
|
|
33886
33885
|
}
|
|
33887
33886
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -16713,20 +16713,6 @@ type ChainTokensConfig = {
|
|
|
16713
16713
|
allowed?: TokenInfo[];
|
|
16714
16714
|
blockscout?: boolean;
|
|
16715
16715
|
};
|
|
16716
|
-
/**
|
|
16717
|
-
* Represents information about a network.
|
|
16718
|
-
* @interface NetworkInfo
|
|
16719
|
-
* @property {string} name - The name of the network.
|
|
16720
|
-
* @property {number} chainId - The chain ID of the network.
|
|
16721
|
-
* @property {TokenInfo} nativeCurrency - Information about the native currency of the network.
|
|
16722
|
-
* @property {boolean} isSupported - Indicates whether the network is supported.
|
|
16723
|
-
*/
|
|
16724
|
-
interface NetworkInfo {
|
|
16725
|
-
name: string;
|
|
16726
|
-
chainId: number;
|
|
16727
|
-
nativeCurrency: TokenInfo;
|
|
16728
|
-
isSupported: boolean;
|
|
16729
|
-
}
|
|
16730
16716
|
/**
|
|
16731
16717
|
* Interface representing the params of {@link Checkout.connect}.
|
|
16732
16718
|
* @property {Web3Provider} provider - The provider used to connect to the network.
|
|
@@ -16737,11 +16723,9 @@ interface ConnectParams {
|
|
|
16737
16723
|
/**
|
|
16738
16724
|
* Interface representing the result of {@link Checkout.connect}.
|
|
16739
16725
|
* @property {Web3Provider} provider - The provider used to connect to the network.
|
|
16740
|
-
* @property {NetworkInfo} network - Information about the connected network.
|
|
16741
16726
|
*/
|
|
16742
16727
|
interface ConnectResult {
|
|
16743
16728
|
provider: Web3Provider;
|
|
16744
|
-
network: NetworkInfo;
|
|
16745
16729
|
}
|
|
16746
16730
|
/**
|
|
16747
16731
|
* Interface representing the params of {@link Checkout.checkIsWalletConnected}.
|
|
@@ -16822,6 +16806,20 @@ interface TokenAmountEstimate {
|
|
|
16822
16806
|
estimatedAmount?: BigNumber;
|
|
16823
16807
|
token?: TokenInfo;
|
|
16824
16808
|
}
|
|
16809
|
+
/**
|
|
16810
|
+
* Represents information about a network.
|
|
16811
|
+
* @interface NetworkInfo
|
|
16812
|
+
* @property {string} name - The name of the network.
|
|
16813
|
+
* @property {number} chainId - The chain ID of the network.
|
|
16814
|
+
* @property {TokenInfo} nativeCurrency - Information about the native currency of the network.
|
|
16815
|
+
* @property {boolean} isSupported - Indicates whether the network is supported.
|
|
16816
|
+
*/
|
|
16817
|
+
interface NetworkInfo {
|
|
16818
|
+
name: string;
|
|
16819
|
+
chainId: number;
|
|
16820
|
+
nativeCurrency: TokenInfo;
|
|
16821
|
+
isSupported: boolean;
|
|
16822
|
+
}
|
|
16825
16823
|
/**
|
|
16826
16824
|
* Interface representing the parameters for {@link Checkout.switchNetwork}.
|
|
16827
16825
|
* @property {Web3Provider} provider - The provider to connect to the network.
|
|
@@ -32175,11 +32173,12 @@ declare enum SaleEventType {
|
|
|
32175
32173
|
CLOSE_WIDGET = "close-widget",
|
|
32176
32174
|
SUCCESS = "success",
|
|
32177
32175
|
FAILURE = "failure",
|
|
32178
|
-
REJECTED = "rejected"
|
|
32176
|
+
REJECTED = "rejected",
|
|
32177
|
+
TRANSACTION_SUCCESS = "transaction-success"
|
|
32179
32178
|
}
|
|
32180
32179
|
/**
|
|
32181
32180
|
* Represents a successful Sale transaction.
|
|
32182
|
-
* @property {
|
|
32181
|
+
* @property {Array} transactions - The executed transactions
|
|
32183
32182
|
*/
|
|
32184
32183
|
type SaleSuccess = {
|
|
32185
32184
|
transactions: {
|
|
@@ -32192,10 +32191,25 @@ type SaleSuccess = {
|
|
|
32192
32191
|
* Type representing a Sale Widget with type FAILURE.
|
|
32193
32192
|
* @property {string} reason - The reason why the swap failed.
|
|
32194
32193
|
* @property {number} timestamp - The timestamp of the failed swap.
|
|
32194
|
+
* @property {Array} transactions - The executed transactions
|
|
32195
32195
|
*/
|
|
32196
32196
|
type SaleFailed = {
|
|
32197
32197
|
reason: string;
|
|
32198
32198
|
timestamp: number;
|
|
32199
|
+
transactions: {
|
|
32200
|
+
method: string;
|
|
32201
|
+
hash: string | undefined;
|
|
32202
|
+
}[];
|
|
32203
|
+
};
|
|
32204
|
+
/**
|
|
32205
|
+
* Type representing a Sale Widget with type TRANSACTION_SUCCESS.
|
|
32206
|
+
* @property {Object} transactions - The executed transactions
|
|
32207
|
+
*/
|
|
32208
|
+
type SaleTransactionSuccess = {
|
|
32209
|
+
transactions: {
|
|
32210
|
+
method: string;
|
|
32211
|
+
hash: string | undefined;
|
|
32212
|
+
}[];
|
|
32199
32213
|
};
|
|
32200
32214
|
/**
|
|
32201
32215
|
* Enum representing the events emitted by the widgets.
|
|
@@ -32486,6 +32500,7 @@ type checkout_widgets_d_SaleEventType = SaleEventType;
|
|
|
32486
32500
|
declare const checkout_widgets_d_SaleEventType: typeof SaleEventType;
|
|
32487
32501
|
type checkout_widgets_d_SaleFailed = SaleFailed;
|
|
32488
32502
|
type checkout_widgets_d_SaleSuccess = SaleSuccess;
|
|
32503
|
+
type checkout_widgets_d_SaleTransactionSuccess = SaleTransactionSuccess;
|
|
32489
32504
|
type checkout_widgets_d_SemanticVersion = SemanticVersion;
|
|
32490
32505
|
type checkout_widgets_d_SwapEventType = SwapEventType;
|
|
32491
32506
|
declare const checkout_widgets_d_SwapEventType: typeof SwapEventType;
|
|
@@ -32540,6 +32555,7 @@ declare namespace checkout_widgets_d {
|
|
|
32540
32555
|
checkout_widgets_d_SaleEventType as SaleEventType,
|
|
32541
32556
|
checkout_widgets_d_SaleFailed as SaleFailed,
|
|
32542
32557
|
checkout_widgets_d_SaleSuccess as SaleSuccess,
|
|
32558
|
+
checkout_widgets_d_SaleTransactionSuccess as SaleTransactionSuccess,
|
|
32543
32559
|
checkout_widgets_d_SemanticVersion as SemanticVersion,
|
|
32544
32560
|
checkout_widgets_d_SwapEventType as SwapEventType,
|
|
32545
32561
|
checkout_widgets_d_SwapFailed as SwapFailed,
|
package/dist/index.js
CHANGED
|
@@ -3629,7 +3629,7 @@ class MultiRollupApiClients {
|
|
|
3629
3629
|
}
|
|
3630
3630
|
|
|
3631
3631
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
3632
|
-
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.28.
|
|
3632
|
+
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.28.4-alpha.1' };
|
|
3633
3633
|
const createConfig = ({ basePath, headers, }) => {
|
|
3634
3634
|
if (!basePath.trim()) {
|
|
3635
3635
|
throw Error('basePath can not be empty');
|
|
@@ -3689,7 +3689,7 @@ class APIError extends Error {
|
|
|
3689
3689
|
|
|
3690
3690
|
/* eslint-disable implicit-arrow-linebreak */
|
|
3691
3691
|
const defaultHeaders = {
|
|
3692
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.28.
|
|
3692
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.28.4-alpha.1',
|
|
3693
3693
|
};
|
|
3694
3694
|
/**
|
|
3695
3695
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -4100,7 +4100,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
4100
4100
|
chainID,
|
|
4101
4101
|
coreContractAddress,
|
|
4102
4102
|
registrationContractAddress,
|
|
4103
|
-
sdkVersion: 'ts-immutable-sdk-0.28.
|
|
4103
|
+
sdkVersion: 'ts-immutable-sdk-0.28.4-alpha.1',
|
|
4104
4104
|
});
|
|
4105
4105
|
/**
|
|
4106
4106
|
* Sets `sdkVersion` at the time of build
|
|
@@ -33343,10 +33343,8 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
|
|
|
33343
33343
|
allowUnsupportedProvider: true
|
|
33344
33344
|
});
|
|
33345
33345
|
await $c99672cf2294e839$export$43f7168eb392a88c(web3Provider);
|
|
33346
|
-
const networkInfo = await $de192de6ef100f9f$export$79f13b4cfaaf0d09(this.config, web3Provider);
|
|
33347
33346
|
return {
|
|
33348
|
-
provider: web3Provider
|
|
33349
|
-
network: networkInfo
|
|
33347
|
+
provider: web3Provider
|
|
33350
33348
|
};
|
|
33351
33349
|
}
|
|
33352
33350
|
/**
|
|
@@ -33565,7 +33563,7 @@ var $045213b18e9f1f94$export$75be0f6af9650f2c;
|
|
|
33565
33563
|
})($045213b18e9f1f94$export$75be0f6af9650f2c || ($045213b18e9f1f94$export$75be0f6af9650f2c = {}));
|
|
33566
33564
|
|
|
33567
33565
|
|
|
33568
|
-
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.28.
|
|
33566
|
+
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.28.4-alpha.1";
|
|
33569
33567
|
const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
|
|
33570
33568
|
const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
|
|
33571
33569
|
|
|
@@ -33750,6 +33748,7 @@ $parcel$export($9b3189b6b155842e$exports, "SaleEventType", () => $9b3189b6b15584
|
|
|
33750
33748
|
SaleEventType["SUCCESS"] = "success";
|
|
33751
33749
|
SaleEventType["FAILURE"] = "failure";
|
|
33752
33750
|
SaleEventType["REJECTED"] = "rejected";
|
|
33751
|
+
SaleEventType["TRANSACTION_SUCCESS"] = "transaction-success";
|
|
33753
33752
|
})($9b3189b6b155842e$export$881881ffb3bd733e || ($9b3189b6b155842e$export$881881ffb3bd733e = {}));
|
|
33754
33753
|
|
|
33755
33754
|
|
|
@@ -33859,7 +33858,7 @@ function $b222a8f062090058$export$fae4199086a966a3(tagName, passport) {
|
|
|
33859
33858
|
if (attempts >= maxAttempts) {
|
|
33860
33859
|
window.clearInterval(timer);
|
|
33861
33860
|
// eslint-disable-next-line no-console
|
|
33862
|
-
console.error("failed to set the provider");
|
|
33861
|
+
console.error("failed to set the provider", err);
|
|
33863
33862
|
}
|
|
33864
33863
|
}
|
|
33865
33864
|
};
|
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.28.
|
|
2075
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.28.4-alpha.1' };
|
|
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.28.
|
|
2131
|
+
sdkVersion: 'ts-immutable-sdk-0.28.4-alpha.1',
|
|
2132
2132
|
});
|
|
2133
2133
|
/**
|
|
2134
2134
|
* Sets `sdkVersion` at the time of build
|
package/package.json
CHANGED