@imtbl/sdk 1.35.2-alpha → 1.35.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/dist/blockchain_data.js +2 -2
- package/dist/browser/checkout/{BridgeWidget-22c8b08d.js → BridgeWidget-b9e736eb.js} +1 -1
- package/dist/browser/checkout/{OnRampWidget-aeb5d57c.js → OnRampWidget-08bfa49c.js} +1 -1
- package/dist/browser/checkout/{SaleWidget-93a4fffd.js → SaleWidget-62cda384.js} +1 -1
- package/dist/browser/checkout/{SpendingCapHero-8459b91d.js → SpendingCapHero-341cfc38.js} +1 -1
- package/dist/browser/checkout/{SwapWidget-11ecb4ae.js → SwapWidget-40adbff0.js} +1 -1
- package/dist/browser/checkout/{TopUpView-ad058510.js → TopUpView-17d237f3.js} +1 -1
- package/dist/browser/checkout/{WalletWidget-920b03b4.js → WalletWidget-a19ab89c.js} +1 -1
- package/dist/browser/checkout/{auto-track-469b3ba5.js → auto-track-ffcab507.js} +1 -1
- package/dist/browser/checkout/{balance-c9c03af5.js → balance-4d6f9b6f.js} +1 -1
- package/dist/browser/checkout/{index-06896b92.js → index-11eefc56.js} +1 -1
- package/dist/browser/checkout/{index-09b1efac.js → index-317dcefc.js} +1 -1
- package/dist/browser/checkout/{index-9997f064.js → index-4fb1863d.js} +1 -1
- package/dist/browser/checkout/{index-e5f07d9e.js → index-7a9fdf09.js} +2 -2
- package/dist/browser/checkout/{index-cbf7168d.js → index-9a663258.js} +1 -1
- package/dist/browser/checkout/{index-37c4003a.js → index-ab21662b.js} +1 -1
- package/dist/browser/checkout/index-bafd7f6d.js +1 -0
- package/dist/browser/checkout/{index-c53e5321.js → index-be2f6fa5.js} +1 -1
- package/dist/browser/checkout/{index.umd-e783a603.js → index.umd-cb823fd6.js} +1 -1
- package/dist/browser/checkout/{retry-10de11e8.js → retry-0002f89a.js} +1 -1
- package/dist/browser/checkout/sdk.js +4 -4
- package/dist/browser/checkout/widgets-esm.js +1 -1
- package/dist/browser/checkout/widgets.js +1 -1
- package/dist/checkout.d.ts +14 -2
- package/dist/checkout.js +18 -13
- package/dist/config.js +1 -1
- package/dist/index.browser.js +4 -4
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +89 -578
- package/dist/index.d.ts +21 -114
- package/dist/index.js +90 -577
- package/dist/orderbook.js +1 -1
- package/dist/passport.js +64 -55
- package/dist/x.js +3 -3
- package/package.json +1 -9
- package/dist/browser/checkout/index-1b8b7ce9.js +0 -1
- package/dist/minting_backend.d.ts +0 -3506
- package/dist/minting_backend.js +0 -447
- package/dist/webhook.d.ts +0 -11
- package/dist/webhook.js +0 -388
package/dist/orderbook.js
CHANGED
|
@@ -132,7 +132,7 @@ const flattenProperties = (properties) => {
|
|
|
132
132
|
};
|
|
133
133
|
|
|
134
134
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
135
|
-
const SDK_VERSION = '1.35.
|
|
135
|
+
const SDK_VERSION = '1.35.3';
|
|
136
136
|
const getFrameParentDomain = () => {
|
|
137
137
|
if (isNode()) {
|
|
138
138
|
return '';
|
package/dist/passport.js
CHANGED
|
@@ -11459,7 +11459,7 @@ class MultiRollupApiClients {
|
|
|
11459
11459
|
}
|
|
11460
11460
|
|
|
11461
11461
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
11462
|
-
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.35.
|
|
11462
|
+
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.35.3' };
|
|
11463
11463
|
const createConfig$1 = ({ basePath, headers, }) => {
|
|
11464
11464
|
if (!basePath.trim()) {
|
|
11465
11465
|
throw Error('basePath can not be empty');
|
|
@@ -11638,7 +11638,7 @@ const flattenProperties = (properties) => {
|
|
|
11638
11638
|
};
|
|
11639
11639
|
|
|
11640
11640
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
11641
|
-
const SDK_VERSION = '1.35.
|
|
11641
|
+
const SDK_VERSION = '1.35.3';
|
|
11642
11642
|
const getFrameParentDomain = () => {
|
|
11643
11643
|
if (isNode()) {
|
|
11644
11644
|
return '';
|
|
@@ -12028,7 +12028,7 @@ const addKeysToHeadersOverride = (baseConfig, overrides) => {
|
|
|
12028
12028
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
12029
12029
|
class ApiConfiguration extends index$2.Configuration {
|
|
12030
12030
|
}
|
|
12031
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.35.
|
|
12031
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.35.3' };
|
|
12032
12032
|
/**
|
|
12033
12033
|
* @dev use createImmutableXConfiguration instead
|
|
12034
12034
|
*/
|
|
@@ -12067,7 +12067,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
12067
12067
|
chainID,
|
|
12068
12068
|
coreContractAddress,
|
|
12069
12069
|
registrationContractAddress,
|
|
12070
|
-
sdkVersion: 'ts-immutable-sdk-1.35.
|
|
12070
|
+
sdkVersion: 'ts-immutable-sdk-1.35.3',
|
|
12071
12071
|
baseConfig,
|
|
12072
12072
|
});
|
|
12073
12073
|
const production = ({ baseConfig }) => createImmutableXConfiguration({
|
|
@@ -20246,7 +20246,7 @@ async function exchangeTransfer({ user, starkSigner, request, exchangesApi, }) {
|
|
|
20246
20246
|
|
|
20247
20247
|
const ERC721$1 = 'ERC721';
|
|
20248
20248
|
async function createOrder({ starkSigner, user, request, ordersApi, guardianClient, }) {
|
|
20249
|
-
return withPassportError(
|
|
20249
|
+
return withPassportError(async () => {
|
|
20250
20250
|
const { ethAddress } = user.imx;
|
|
20251
20251
|
const amountSell = request.sell.type === ERC721$1 ? '1' : request.sell.amount;
|
|
20252
20252
|
const amountBuy = request.buy.type === ERC721$1 ? '1' : request.buy.amount;
|
|
@@ -20292,10 +20292,10 @@ async function createOrder({ starkSigner, user, request, ordersApi, guardianClie
|
|
|
20292
20292
|
return {
|
|
20293
20293
|
...createOrderResponse.data,
|
|
20294
20294
|
};
|
|
20295
|
-
}
|
|
20295
|
+
}, PassportErrorType.CREATE_ORDER_ERROR);
|
|
20296
20296
|
}
|
|
20297
20297
|
async function cancelOrder({ user, starkSigner, request, ordersApi, guardianClient, }) {
|
|
20298
|
-
return withPassportError(
|
|
20298
|
+
return withPassportError(async () => {
|
|
20299
20299
|
const getSignableCancelOrderRequest = {
|
|
20300
20300
|
order_id: request.order_id,
|
|
20301
20301
|
};
|
|
@@ -20322,7 +20322,7 @@ async function cancelOrder({ user, starkSigner, request, ordersApi, guardianClie
|
|
|
20322
20322
|
order_id: cancelOrderResponse.data.order_id,
|
|
20323
20323
|
status: cancelOrderResponse.data.status,
|
|
20324
20324
|
};
|
|
20325
|
-
}
|
|
20325
|
+
}, PassportErrorType.CANCEL_ORDER_ERROR);
|
|
20326
20326
|
}
|
|
20327
20327
|
|
|
20328
20328
|
async function registerPassport({ ethSigner, starkSigner, imxApiClients }, authorization) {
|
|
@@ -20354,7 +20354,7 @@ async function registerPassport({ ethSigner, starkSigner, imxApiClients }, autho
|
|
|
20354
20354
|
}
|
|
20355
20355
|
|
|
20356
20356
|
async function createTrade({ request, tradesApi, user, starkSigner, guardianClient, }) {
|
|
20357
|
-
return withPassportError(
|
|
20357
|
+
return withPassportError(async () => {
|
|
20358
20358
|
const { ethAddress } = user.imx;
|
|
20359
20359
|
const getSignableTradeRequest = {
|
|
20360
20360
|
expiration_timestamp: request.expiration_timestamp,
|
|
@@ -20395,12 +20395,12 @@ async function createTrade({ request, tradesApi, user, starkSigner, guardianClie
|
|
|
20395
20395
|
headers,
|
|
20396
20396
|
});
|
|
20397
20397
|
return createTradeResponse;
|
|
20398
|
-
}
|
|
20398
|
+
}, PassportErrorType.CREATE_TRADE_ERROR);
|
|
20399
20399
|
}
|
|
20400
20400
|
|
|
20401
20401
|
const ERC721 = 'ERC721';
|
|
20402
20402
|
async function transfer({ request, transfersApi, starkSigner, user, guardianClient, }) {
|
|
20403
|
-
return withPassportError(
|
|
20403
|
+
return withPassportError(async () => {
|
|
20404
20404
|
const transferAmount = request.type === ERC721 ? '1' : request.amount;
|
|
20405
20405
|
const getSignableTransferRequest = {
|
|
20406
20406
|
sender: user.imx.ethAddress,
|
|
@@ -20442,11 +20442,10 @@ async function transfer({ request, transfersApi, starkSigner, user, guardianClie
|
|
|
20442
20442
|
time: responseData.time,
|
|
20443
20443
|
transfer_id: responseData.transfer_id,
|
|
20444
20444
|
};
|
|
20445
|
-
}
|
|
20445
|
+
}, PassportErrorType.TRANSFER_ERROR);
|
|
20446
20446
|
}
|
|
20447
20447
|
async function batchNftTransfer({ user, starkSigner, request, transfersApi, guardianClient, }) {
|
|
20448
|
-
|
|
20449
|
-
return withPassportError(guardianClient.withConfirmationScreenTask({ width: 480, height: 784 })(async () => {
|
|
20448
|
+
return withPassportError(async () => {
|
|
20450
20449
|
const { ethAddress } = user.imx;
|
|
20451
20450
|
const signableRequests = request.map((nftTransfer) => ({
|
|
20452
20451
|
amount: '1',
|
|
@@ -20490,7 +20489,7 @@ async function batchNftTransfer({ user, starkSigner, request, transfersApi, guar
|
|
|
20490
20489
|
return {
|
|
20491
20490
|
transfer_ids: response?.data.transfer_ids,
|
|
20492
20491
|
};
|
|
20493
|
-
}
|
|
20492
|
+
}, PassportErrorType.TRANSFER_ERROR);
|
|
20494
20493
|
}
|
|
20495
20494
|
|
|
20496
20495
|
const POLL_INTERVAL = 1 * 1000; // every 1 second
|
|
@@ -20641,14 +20640,16 @@ class PassportImxProvider {
|
|
|
20641
20640
|
};
|
|
20642
20641
|
}
|
|
20643
20642
|
async transfer(request) {
|
|
20644
|
-
|
|
20645
|
-
|
|
20646
|
-
|
|
20647
|
-
|
|
20648
|
-
|
|
20649
|
-
|
|
20650
|
-
|
|
20651
|
-
|
|
20643
|
+
return (this.guardianClient.withDefaultConfirmationScreenTask(async () => {
|
|
20644
|
+
const { user, starkSigner } = await this.#getRegisteredImxUserAndSigners();
|
|
20645
|
+
return transfer({
|
|
20646
|
+
request,
|
|
20647
|
+
user,
|
|
20648
|
+
starkSigner,
|
|
20649
|
+
transfersApi: this.immutableXClient.transfersApi,
|
|
20650
|
+
guardianClient: this.guardianClient,
|
|
20651
|
+
});
|
|
20652
|
+
})());
|
|
20652
20653
|
}
|
|
20653
20654
|
async registerOffchain() {
|
|
20654
20655
|
const [user, signers] = await Promise.all([
|
|
@@ -20666,44 +20667,52 @@ class PassportImxProvider {
|
|
|
20666
20667
|
throw new PassportError('Operation not supported', PassportErrorType.OPERATION_NOT_SUPPORTED_ERROR);
|
|
20667
20668
|
}
|
|
20668
20669
|
async createOrder(request) {
|
|
20669
|
-
|
|
20670
|
-
|
|
20671
|
-
|
|
20672
|
-
|
|
20673
|
-
|
|
20674
|
-
|
|
20675
|
-
|
|
20676
|
-
|
|
20670
|
+
return this.guardianClient.withDefaultConfirmationScreenTask(async () => {
|
|
20671
|
+
const { user, starkSigner } = await this.#getRegisteredImxUserAndSigners();
|
|
20672
|
+
return createOrder({
|
|
20673
|
+
request,
|
|
20674
|
+
user,
|
|
20675
|
+
starkSigner,
|
|
20676
|
+
ordersApi: this.immutableXClient.ordersApi,
|
|
20677
|
+
guardianClient: this.guardianClient,
|
|
20678
|
+
});
|
|
20679
|
+
})();
|
|
20677
20680
|
}
|
|
20678
20681
|
async cancelOrder(request) {
|
|
20679
|
-
|
|
20680
|
-
|
|
20681
|
-
|
|
20682
|
-
|
|
20683
|
-
|
|
20684
|
-
|
|
20685
|
-
|
|
20686
|
-
|
|
20682
|
+
return this.guardianClient.withDefaultConfirmationScreenTask(async () => {
|
|
20683
|
+
const { user, starkSigner } = await this.#getRegisteredImxUserAndSigners();
|
|
20684
|
+
return cancelOrder({
|
|
20685
|
+
request,
|
|
20686
|
+
user,
|
|
20687
|
+
starkSigner,
|
|
20688
|
+
ordersApi: this.immutableXClient.ordersApi,
|
|
20689
|
+
guardianClient: this.guardianClient,
|
|
20690
|
+
});
|
|
20691
|
+
})();
|
|
20687
20692
|
}
|
|
20688
20693
|
async createTrade(request) {
|
|
20689
|
-
|
|
20690
|
-
|
|
20691
|
-
|
|
20692
|
-
|
|
20693
|
-
|
|
20694
|
-
|
|
20695
|
-
|
|
20696
|
-
|
|
20694
|
+
return this.guardianClient.withDefaultConfirmationScreenTask(async () => {
|
|
20695
|
+
const { user, starkSigner } = await this.#getRegisteredImxUserAndSigners();
|
|
20696
|
+
return createTrade({
|
|
20697
|
+
request,
|
|
20698
|
+
user,
|
|
20699
|
+
starkSigner,
|
|
20700
|
+
tradesApi: this.immutableXClient.tradesApi,
|
|
20701
|
+
guardianClient: this.guardianClient,
|
|
20702
|
+
});
|
|
20703
|
+
})();
|
|
20697
20704
|
}
|
|
20698
20705
|
async batchNftTransfer(request) {
|
|
20699
|
-
|
|
20700
|
-
|
|
20701
|
-
|
|
20702
|
-
|
|
20703
|
-
|
|
20704
|
-
|
|
20705
|
-
|
|
20706
|
-
|
|
20706
|
+
return this.guardianClient.withConfirmationScreenTask({ width: 480, height: 784 })(async () => {
|
|
20707
|
+
const { user, starkSigner } = await this.#getRegisteredImxUserAndSigners();
|
|
20708
|
+
return batchNftTransfer({
|
|
20709
|
+
request,
|
|
20710
|
+
user,
|
|
20711
|
+
starkSigner,
|
|
20712
|
+
transfersApi: this.immutableXClient.transfersApi,
|
|
20713
|
+
guardianClient: this.guardianClient,
|
|
20714
|
+
});
|
|
20715
|
+
})();
|
|
20707
20716
|
}
|
|
20708
20717
|
async exchangeTransfer(request) {
|
|
20709
20718
|
const { user, starkSigner } = await this.#getRegisteredImxUserAndSigners();
|
package/dist/x.js
CHANGED
|
@@ -9003,7 +9003,7 @@ const flattenProperties = (properties) => {
|
|
|
9003
9003
|
};
|
|
9004
9004
|
|
|
9005
9005
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
9006
|
-
const SDK_VERSION = '1.35.
|
|
9006
|
+
const SDK_VERSION = '1.35.3';
|
|
9007
9007
|
const getFrameParentDomain = () => {
|
|
9008
9008
|
if (isNode()) {
|
|
9009
9009
|
return '';
|
|
@@ -9269,7 +9269,7 @@ const addKeysToHeadersOverride = (baseConfig, overrides) => {
|
|
|
9269
9269
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
9270
9270
|
class ApiConfiguration extends index$2.Configuration {
|
|
9271
9271
|
}
|
|
9272
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.35.
|
|
9272
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.35.3' };
|
|
9273
9273
|
/**
|
|
9274
9274
|
* @dev use createImmutableXConfiguration instead
|
|
9275
9275
|
*/
|
|
@@ -9308,7 +9308,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
9308
9308
|
chainID,
|
|
9309
9309
|
coreContractAddress,
|
|
9310
9310
|
registrationContractAddress,
|
|
9311
|
-
sdkVersion: 'ts-immutable-sdk-1.35.
|
|
9311
|
+
sdkVersion: 'ts-immutable-sdk-1.35.3',
|
|
9312
9312
|
baseConfig,
|
|
9313
9313
|
});
|
|
9314
9314
|
const production = ({ baseConfig }) => createImmutableXConfiguration({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imtbl/sdk",
|
|
3
3
|
"description": "Immutable Unified SDK",
|
|
4
|
-
"version": "1.35.
|
|
4
|
+
"version": "1.35.3",
|
|
5
5
|
"author": "Immutable",
|
|
6
6
|
"browser": "./dist/index.browser.js",
|
|
7
7
|
"bugs": "https://github.com/immutable/ts-immutable-sdk/issues",
|
|
@@ -122,14 +122,6 @@
|
|
|
122
122
|
"./x": {
|
|
123
123
|
"types": "./dist/x.d.ts",
|
|
124
124
|
"import": "./dist/x.js"
|
|
125
|
-
},
|
|
126
|
-
"./webhook": {
|
|
127
|
-
"types": "./dist/webhook.d.ts",
|
|
128
|
-
"import": "./dist/webhook.js"
|
|
129
|
-
},
|
|
130
|
-
"./minting_backend": {
|
|
131
|
-
"types": "./dist/minting_backend.d.ts",
|
|
132
|
-
"import": "./dist/minting_backend.js"
|
|
133
125
|
}
|
|
134
126
|
},
|
|
135
127
|
"files": [
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{dm as n,dn as t}from"./index-e5f07d9e.js";function i(i){return n(this,void 0,void 0,(function(){var n;return t(this,(function(t){switch(t.label){case 0:return[4,import("./index.umd-e783a603.js").then((function(n){return n.i}))];case 1:return n=t.sent(),i._plugins=n,[2]}}))}))}export{i as loadLegacyVideoPlugins};
|