@imtbl/sdk 0.26.0 → 0.27.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.d.ts +6 -0
- package/dist/blockchain_data.js +136 -17
- package/dist/browser/checkout.js +2 -2
- package/dist/checkout_sdk.d.ts +12 -32
- package/dist/checkout_sdk.js +161 -58
- package/dist/checkout_widgets.d.ts +14 -14
- package/dist/checkout_widgets.js +13 -13
- 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 +170 -67
- package/dist/index.d.ts +75 -55
- package/dist/index.js +170 -67
- package/dist/passport.js +13 -8
- package/package.json +1 -1
package/dist/checkout_sdk.d.ts
CHANGED
|
@@ -11030,11 +11030,11 @@ type BuyResult = BuyResultSuccess | BuyResultFailed | BuyResultInsufficientFunds
|
|
|
11030
11030
|
/**
|
|
11031
11031
|
* Represents the result of {@link Checkout.buy}
|
|
11032
11032
|
* @property {CheckoutStatus.SUCCESS} status - The status to indicate success
|
|
11033
|
-
* @property {SmartCheckoutSufficient
|
|
11033
|
+
* @property {SmartCheckoutSufficient} smartCheckoutResult - The sufficient result of smart checkout
|
|
11034
11034
|
*/
|
|
11035
11035
|
type BuyResultSuccess = {
|
|
11036
11036
|
status: CheckoutStatus.SUCCESS;
|
|
11037
|
-
smartCheckoutResult: SmartCheckoutSufficient
|
|
11037
|
+
smartCheckoutResult: SmartCheckoutSufficient;
|
|
11038
11038
|
};
|
|
11039
11039
|
/**
|
|
11040
11040
|
* Represents the result of {@link Checkout.buy}
|
|
@@ -11047,49 +11047,49 @@ type BuyResultFailed = {
|
|
|
11047
11047
|
status: CheckoutStatus.FAILED;
|
|
11048
11048
|
transactionHash: string;
|
|
11049
11049
|
reason: string;
|
|
11050
|
-
smartCheckoutResult: SmartCheckoutSufficient
|
|
11050
|
+
smartCheckoutResult: SmartCheckoutSufficient;
|
|
11051
11051
|
};
|
|
11052
11052
|
/**
|
|
11053
11053
|
* Represents the result of {@link Checkout.buy}
|
|
11054
11054
|
* @property {CheckoutStatus.INSUFFICIENT_FUNDS} status - The status to indicate insufficient funds
|
|
11055
|
-
* @property {SmartCheckoutInsufficient
|
|
11055
|
+
* @property {SmartCheckoutInsufficient} smartCheckoutResult - The insufficient result of smart checkout
|
|
11056
11056
|
*/
|
|
11057
11057
|
type BuyResultInsufficientFunds = {
|
|
11058
11058
|
status: CheckoutStatus.INSUFFICIENT_FUNDS;
|
|
11059
|
-
smartCheckoutResult: SmartCheckoutInsufficient
|
|
11059
|
+
smartCheckoutResult: SmartCheckoutInsufficient;
|
|
11060
11060
|
};
|
|
11061
11061
|
type SellResult = SellResultSuccess | SellResultFailed | SellResultInsufficientFunds;
|
|
11062
11062
|
/**
|
|
11063
11063
|
* Represents the result of {@link Checkout.sell}
|
|
11064
11064
|
* @property {CheckoutStatus.SUCCESS} status - The status to indicate success
|
|
11065
|
-
* @property {SmartCheckoutSufficient
|
|
11065
|
+
* @property {SmartCheckoutSufficient} smartCheckoutResult - The sufficient result of smart checkout
|
|
11066
11066
|
*/
|
|
11067
11067
|
type SellResultSuccess = {
|
|
11068
11068
|
status: CheckoutStatus.SUCCESS;
|
|
11069
11069
|
orderIds: string[];
|
|
11070
|
-
smartCheckoutResult: SmartCheckoutSufficient
|
|
11070
|
+
smartCheckoutResult: SmartCheckoutSufficient;
|
|
11071
11071
|
};
|
|
11072
11072
|
/**
|
|
11073
11073
|
* Represents the result of {@link Checkout.sell}
|
|
11074
11074
|
* @property {CheckoutStatus.FAILED} status - The status to indicate failure
|
|
11075
11075
|
* @property {string} transactionHash - The transaction hash of the failed transaction
|
|
11076
11076
|
* @property {string} reason - The reason for the failure
|
|
11077
|
-
* @property {SmartCheckoutSufficient
|
|
11077
|
+
* @property {SmartCheckoutSufficient} smartCheckoutResult - The sufficient result of smart checkout
|
|
11078
11078
|
*/
|
|
11079
11079
|
type SellResultFailed = {
|
|
11080
11080
|
status: CheckoutStatus.FAILED;
|
|
11081
11081
|
transactionHash: string;
|
|
11082
11082
|
reason: string;
|
|
11083
|
-
smartCheckoutResult: SmartCheckoutSufficient
|
|
11083
|
+
smartCheckoutResult: SmartCheckoutSufficient;
|
|
11084
11084
|
};
|
|
11085
11085
|
/**
|
|
11086
11086
|
* Represents the result of {@link Checkout.sell}
|
|
11087
11087
|
* @property {CheckoutStatus.INSUFFICIENT_FUNDS} status - The status to indicate insufficient funds
|
|
11088
|
-
* @property {SmartCheckoutInsufficient
|
|
11088
|
+
* @property {SmartCheckoutInsufficient} smartCheckoutResult - The insufficient result of smart checkout
|
|
11089
11089
|
*/
|
|
11090
11090
|
type SellResultInsufficientFunds = {
|
|
11091
11091
|
status: CheckoutStatus.INSUFFICIENT_FUNDS;
|
|
11092
|
-
smartCheckoutResult: SmartCheckoutInsufficient
|
|
11092
|
+
smartCheckoutResult: SmartCheckoutInsufficient;
|
|
11093
11093
|
};
|
|
11094
11094
|
type CancelResult = CancelResultSuccess | CancelResultFailed;
|
|
11095
11095
|
/**
|
|
@@ -11324,13 +11324,11 @@ type SmartCheckoutInsufficient = {
|
|
|
11324
11324
|
};
|
|
11325
11325
|
/**
|
|
11326
11326
|
* Represents the routing outcome for a transaction.
|
|
11327
|
-
* @property {boolean} isPassport - Indicates if the provider used was a passport provider.
|
|
11328
11327
|
* @property {AvailableRoutingOptions} availableRoutingOptions - The routing options available to the user
|
|
11329
11328
|
* @property {RoutingOutcome} routingOutcome - The routing outcome for the transaction which
|
|
11330
11329
|
* includes the funding routes if routes were found
|
|
11331
11330
|
*/
|
|
11332
11331
|
type SmartCheckoutRouter = {
|
|
11333
|
-
isPassport: boolean;
|
|
11334
11332
|
availableRoutingOptions: AvailableRoutingOptions;
|
|
11335
11333
|
routingOutcome: RoutingOutcome;
|
|
11336
11334
|
};
|
|
@@ -11559,24 +11557,6 @@ type AvailableRoutingOptions = {
|
|
|
11559
11557
|
swap?: boolean;
|
|
11560
11558
|
bridge?: boolean;
|
|
11561
11559
|
};
|
|
11562
|
-
type FundingRouteFeeEstimate = SwapRouteFeeEstimate | BridgeRouteFeeEstimate;
|
|
11563
|
-
type SwapRouteFeeEstimate = {
|
|
11564
|
-
type: FundingStepType.SWAP;
|
|
11565
|
-
estimatedAmount: BigNumber;
|
|
11566
|
-
token: TokenInfo;
|
|
11567
|
-
};
|
|
11568
|
-
type BridgeRouteFeeEstimate = {
|
|
11569
|
-
type: FundingStepType.BRIDGE;
|
|
11570
|
-
gasFee: {
|
|
11571
|
-
estimatedAmount: BigNumber;
|
|
11572
|
-
token?: TokenInfo;
|
|
11573
|
-
};
|
|
11574
|
-
bridgeFee: {
|
|
11575
|
-
estimatedAmount: BigNumber;
|
|
11576
|
-
token?: TokenInfo;
|
|
11577
|
-
};
|
|
11578
|
-
totalFees: BigNumber;
|
|
11579
|
-
};
|
|
11580
11560
|
/**
|
|
11581
11561
|
* Interface representing the parameters for {@link Checkout.buy}
|
|
11582
11562
|
* @property {Web3Provider} provider - The provider to use for the buy.
|
|
@@ -12268,4 +12248,4 @@ declare class Checkout {
|
|
|
12268
12248
|
getExchangeFeeEstimate(): Promise<OnRampProviderFees>;
|
|
12269
12249
|
}
|
|
12270
12250
|
|
|
12271
|
-
export { AllowedNetworkConfig, AvailableRoutingOptions, BalanceDelta, BuyOrder, BuyParams, BuyResult, BuyToken, CHECKOUT_API_BASE_URL, CancelParams, CancelResult, ChainId, ChainName, CheckConnectionParams, CheckConnectionResult, Checkout, CheckoutErrorType, CheckoutModuleConfiguration, CheckoutStatus, ConnectParams, ConnectResult, DexConfig, ERC20ItemRequirement, ERC721ItemRequirement, ErrorType, ExchangeType, FeePercentage, FeeToken, FiatRampParams, FulfillmentTransaction, FundingItem, FundingRoute,
|
|
12251
|
+
export { AllowedNetworkConfig, AvailableRoutingOptions, BalanceDelta, BridgeFundingStep, BuyOrder, BuyParams, BuyResult, BuyResultFailed, BuyResultInsufficientFunds, BuyResultSuccess, BuyToken, CHECKOUT_API_BASE_URL, CancelParams, CancelResult, CancelResultFailed, CancelResultSuccess, ChainId, ChainName, CheckConnectionParams, CheckConnectionResult, Checkout, CheckoutErrorType, CheckoutModuleConfiguration, CheckoutStatus, ConnectParams, ConnectResult, DexConfig, ERC20ItemRequirement, ERC721Balance, ERC721ItemRequirement, ErrorType, ExchangeType, FeePercentage, FeeToken, FiatRampParams, FulfillmentTransaction, FundingItem, FundingRoute, FundingStep, FundingStepType, GasAmount, GasEstimateBridgeToL2Result, GasEstimateParams, GasEstimateSwapResult, GasEstimateTokenConfig, GasEstimateType, GasToken, GasTokenType, GetAllBalancesParams, GetAllBalancesResult, GetBalanceParams, GetBalanceResult, GetNetworkAllowListParams, GetNetworkAllowListResult, GetNetworkParams, GetTokenAllowListParams, GetTokenAllowListResult, GetWalletAllowListParams, GetWalletAllowListResult, ItemBalance, ItemType, NativeItemRequirement, NetworkFilter, NetworkFilterTypes, NetworkInfo, NoRouteOptions, NoRoutesFound, OnRampFundingStep, OrderFee, RemoteConfiguration, RoutesFound, RoutingOutcome, RoutingOutcomeType, SellOrder, SellParams, SellResult, SellResultFailed, SellResultInsufficientFunds, SellResultSuccess, SellToken, SendTransactionParams, SendTransactionResult, SmartCheckoutInsufficient, SmartCheckoutParams, SmartCheckoutResult, SmartCheckoutRouter, SmartCheckoutSufficient, SwapFundingStep, SwitchNetworkParams, SwitchNetworkResult, TokenBalance, TokenFilter, TokenFilterTypes, TokenInfo, TransactionOrGasType, TransactionRequirement, WalletFilter, WalletFilterTypes, WalletInfo, WalletProviderName };
|
package/dist/checkout_sdk.js
CHANGED
|
@@ -16214,7 +16214,7 @@ var Fee;
|
|
|
16214
16214
|
/**
|
|
16215
16215
|
* The Order status
|
|
16216
16216
|
*/
|
|
16217
|
-
var OrderStatusName;
|
|
16217
|
+
var OrderStatusName$1;
|
|
16218
16218
|
(function (OrderStatusName) {
|
|
16219
16219
|
OrderStatusName["PENDING"] = "PENDING";
|
|
16220
16220
|
OrderStatusName["ACTIVE"] = "ACTIVE";
|
|
@@ -16222,7 +16222,7 @@ var OrderStatusName;
|
|
|
16222
16222
|
OrderStatusName["FILLED"] = "FILLED";
|
|
16223
16223
|
OrderStatusName["EXPIRED"] = "EXPIRED";
|
|
16224
16224
|
OrderStatusName["CANCELLED"] = "CANCELLED";
|
|
16225
|
-
})(OrderStatusName || (OrderStatusName = {}));
|
|
16225
|
+
})(OrderStatusName$1 || (OrderStatusName$1 = {}));
|
|
16226
16226
|
|
|
16227
16227
|
/* istanbul ignore file */
|
|
16228
16228
|
/* tslint:disable */
|
|
@@ -17011,7 +17011,7 @@ class Orderbook {
|
|
|
17011
17011
|
}
|
|
17012
17012
|
const extraData = fulfillmentDataRes.result.fulfillable_orders[0].extra_data;
|
|
17013
17013
|
const orderResult = fulfillmentDataRes.result.fulfillable_orders[0].order;
|
|
17014
|
-
if (orderResult.status.name !== OrderStatusName.ACTIVE) {
|
|
17014
|
+
if (orderResult.status.name !== OrderStatusName$1.ACTIVE) {
|
|
17015
17015
|
throw new Error(`Cannot fulfil order that is not active. Current status: ${orderResult.status}`);
|
|
17016
17016
|
}
|
|
17017
17017
|
return this.seaport.fulfillOrder(orderResult, takerAddress, extraData);
|
|
@@ -17043,9 +17043,9 @@ class Orderbook {
|
|
|
17043
17043
|
*/
|
|
17044
17044
|
async cancelOrder(listingId, accountAddress) {
|
|
17045
17045
|
const orderResult = await this.apiClient.getListing(listingId);
|
|
17046
|
-
if (orderResult.result.status.name !== OrderStatusName.ACTIVE
|
|
17047
|
-
&& orderResult.result.status.name !== OrderStatusName.INACTIVE
|
|
17048
|
-
&& orderResult.result.status.name !== OrderStatusName.PENDING) {
|
|
17046
|
+
if (orderResult.result.status.name !== OrderStatusName$1.ACTIVE
|
|
17047
|
+
&& orderResult.result.status.name !== OrderStatusName$1.INACTIVE
|
|
17048
|
+
&& orderResult.result.status.name !== OrderStatusName$1.PENDING) {
|
|
17049
17049
|
throw new Error(`Cannot cancel order with status ${orderResult.result.status}`);
|
|
17050
17050
|
}
|
|
17051
17051
|
if (orderResult.result.account_address !== accountAddress.toLowerCase()) {
|
|
@@ -17628,13 +17628,14 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
|
|
|
17628
17628
|
* List all collections
|
|
17629
17629
|
* @summary List all collections
|
|
17630
17630
|
* @param {string} chainName The name of chain
|
|
17631
|
+
* @param {Array<string>} [contractAddress] List of contract addresses to filter by
|
|
17631
17632
|
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
17632
17633
|
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
17633
17634
|
* @param {number} [pageSize] Maximum number of items to return
|
|
17634
17635
|
* @param {*} [options] Override http request option.
|
|
17635
17636
|
* @throws {RequiredError}
|
|
17636
17637
|
*/
|
|
17637
|
-
listCollections: async (chainName, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
|
|
17638
|
+
listCollections: async (chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
|
|
17638
17639
|
// verify required parameter 'chainName' is not null or undefined
|
|
17639
17640
|
assertParamExists('listCollections', 'chainName', chainName);
|
|
17640
17641
|
const localVarPath = `/v1/chains/{chain_name}/collections`
|
|
@@ -17648,6 +17649,9 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
|
|
|
17648
17649
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
17649
17650
|
const localVarHeaderParameter = {};
|
|
17650
17651
|
const localVarQueryParameter = {};
|
|
17652
|
+
if (contractAddress) {
|
|
17653
|
+
localVarQueryParameter['contract_address'] = contractAddress;
|
|
17654
|
+
}
|
|
17651
17655
|
if (fromUpdatedAt !== undefined) {
|
|
17652
17656
|
localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
|
|
17653
17657
|
fromUpdatedAt.toISOString() :
|
|
@@ -17773,14 +17777,15 @@ const CollectionsApiFp = function (configuration) {
|
|
|
17773
17777
|
* List all collections
|
|
17774
17778
|
* @summary List all collections
|
|
17775
17779
|
* @param {string} chainName The name of chain
|
|
17780
|
+
* @param {Array<string>} [contractAddress] List of contract addresses to filter by
|
|
17776
17781
|
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
17777
17782
|
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
17778
17783
|
* @param {number} [pageSize] Maximum number of items to return
|
|
17779
17784
|
* @param {*} [options] Override http request option.
|
|
17780
17785
|
* @throws {RequiredError}
|
|
17781
17786
|
*/
|
|
17782
|
-
async listCollections(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
|
|
17783
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.listCollections(chainName, fromUpdatedAt, pageCursor, pageSize, options);
|
|
17787
|
+
async listCollections(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options) {
|
|
17788
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listCollections(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options);
|
|
17784
17789
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
17785
17790
|
},
|
|
17786
17791
|
/**
|
|
@@ -17834,14 +17839,15 @@ const CollectionsApiFactory = function (configuration, basePath, axios) {
|
|
|
17834
17839
|
* List all collections
|
|
17835
17840
|
* @summary List all collections
|
|
17836
17841
|
* @param {string} chainName The name of chain
|
|
17842
|
+
* @param {Array<string>} [contractAddress] List of contract addresses to filter by
|
|
17837
17843
|
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
17838
17844
|
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
17839
17845
|
* @param {number} [pageSize] Maximum number of items to return
|
|
17840
17846
|
* @param {*} [options] Override http request option.
|
|
17841
17847
|
* @throws {RequiredError}
|
|
17842
17848
|
*/
|
|
17843
|
-
listCollections(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
|
|
17844
|
-
return localVarFp.listCollections(chainName, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
17849
|
+
listCollections(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options) {
|
|
17850
|
+
return localVarFp.listCollections(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
17845
17851
|
},
|
|
17846
17852
|
/**
|
|
17847
17853
|
* List collections by NFT owner account address
|
|
@@ -17897,7 +17903,7 @@ class CollectionsApi extends BaseAPI {
|
|
|
17897
17903
|
* @memberof CollectionsApi
|
|
17898
17904
|
*/
|
|
17899
17905
|
listCollections(requestParameters, options) {
|
|
17900
|
-
return CollectionsApiFp(this.configuration).listCollections(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
17906
|
+
return CollectionsApiFp(this.configuration).listCollections(requestParameters.chainName, requestParameters.contractAddress, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
17901
17907
|
}
|
|
17902
17908
|
/**
|
|
17903
17909
|
* List collections by NFT owner account address
|
|
@@ -19151,7 +19157,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
19151
19157
|
* List all listings
|
|
19152
19158
|
* @summary List all listings
|
|
19153
19159
|
* @param {string} chainName
|
|
19154
|
-
* @param {
|
|
19160
|
+
* @param {OrderStatusName} [status] Order status to filter by
|
|
19155
19161
|
* @param {string} [sellItemContractAddress] Sell item contract address to filter by
|
|
19156
19162
|
* @param {string} [buyItemContractAddress] Buy item contract address to filter by
|
|
19157
19163
|
* @param {string} [sellItemTokenId] Sell item token identifier to filter by
|
|
@@ -19330,7 +19336,7 @@ const OrdersApiFp = function (configuration) {
|
|
|
19330
19336
|
* List all listings
|
|
19331
19337
|
* @summary List all listings
|
|
19332
19338
|
* @param {string} chainName
|
|
19333
|
-
* @param {
|
|
19339
|
+
* @param {OrderStatusName} [status] Order status to filter by
|
|
19334
19340
|
* @param {string} [sellItemContractAddress] Sell item contract address to filter by
|
|
19335
19341
|
* @param {string} [buyItemContractAddress] Buy item contract address to filter by
|
|
19336
19342
|
* @param {string} [sellItemTokenId] Sell item token identifier to filter by
|
|
@@ -19429,7 +19435,7 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
|
|
|
19429
19435
|
* List all listings
|
|
19430
19436
|
* @summary List all listings
|
|
19431
19437
|
* @param {string} chainName
|
|
19432
|
-
* @param {
|
|
19438
|
+
* @param {OrderStatusName} [status] Order status to filter by
|
|
19433
19439
|
* @param {string} [sellItemContractAddress] Sell item contract address to filter by
|
|
19434
19440
|
* @param {string} [buyItemContractAddress] Buy item contract address to filter by
|
|
19435
19441
|
* @param {string} [sellItemTokenId] Sell item token identifier to filter by
|
|
@@ -20126,6 +20132,23 @@ const APIError501AllOfCodeEnum = {
|
|
|
20126
20132
|
NotImplementedError: 'NOT_IMPLEMENTED_ERROR'
|
|
20127
20133
|
};
|
|
20128
20134
|
|
|
20135
|
+
/* tslint:disable */
|
|
20136
|
+
/* eslint-disable */
|
|
20137
|
+
/**
|
|
20138
|
+
* Immutable zkEVM API
|
|
20139
|
+
* Immutable Multi Rollup API
|
|
20140
|
+
*
|
|
20141
|
+
* The version of the OpenAPI document: 1.0.0
|
|
20142
|
+
* Contact: support@immutable.com
|
|
20143
|
+
*
|
|
20144
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
20145
|
+
* https://openapi-generator.tech
|
|
20146
|
+
* Do not edit the class manually.
|
|
20147
|
+
*/
|
|
20148
|
+
const ActiveOrderStatusNameEnum = {
|
|
20149
|
+
Active: 'ACTIVE'
|
|
20150
|
+
};
|
|
20151
|
+
|
|
20129
20152
|
/* tslint:disable */
|
|
20130
20153
|
/* eslint-disable */
|
|
20131
20154
|
/**
|
|
@@ -20166,8 +20189,12 @@ const ActivityType = {
|
|
|
20166
20189
|
* https://openapi-generator.tech
|
|
20167
20190
|
* Do not edit the class manually.
|
|
20168
20191
|
*/
|
|
20169
|
-
const
|
|
20170
|
-
|
|
20192
|
+
const CancelledOrderStatusNameEnum = {
|
|
20193
|
+
Cancelled: 'CANCELLED'
|
|
20194
|
+
};
|
|
20195
|
+
const CancelledOrderStatusCancellationTypeEnum = {
|
|
20196
|
+
OnChain: 'ON_CHAIN',
|
|
20197
|
+
OffChain: 'OFF_CHAIN'
|
|
20171
20198
|
};
|
|
20172
20199
|
|
|
20173
20200
|
/* tslint:disable */
|
|
@@ -20226,6 +20253,40 @@ const ERC721ItemItemTypeEnum = {
|
|
|
20226
20253
|
Erc721: 'ERC721'
|
|
20227
20254
|
};
|
|
20228
20255
|
|
|
20256
|
+
/* tslint:disable */
|
|
20257
|
+
/* eslint-disable */
|
|
20258
|
+
/**
|
|
20259
|
+
* Immutable zkEVM API
|
|
20260
|
+
* Immutable Multi Rollup API
|
|
20261
|
+
*
|
|
20262
|
+
* The version of the OpenAPI document: 1.0.0
|
|
20263
|
+
* Contact: support@immutable.com
|
|
20264
|
+
*
|
|
20265
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
20266
|
+
* https://openapi-generator.tech
|
|
20267
|
+
* Do not edit the class manually.
|
|
20268
|
+
*/
|
|
20269
|
+
const ExpiredOrderStatusNameEnum = {
|
|
20270
|
+
Expired: 'EXPIRED'
|
|
20271
|
+
};
|
|
20272
|
+
|
|
20273
|
+
/* tslint:disable */
|
|
20274
|
+
/* eslint-disable */
|
|
20275
|
+
/**
|
|
20276
|
+
* Immutable zkEVM API
|
|
20277
|
+
* Immutable Multi Rollup API
|
|
20278
|
+
*
|
|
20279
|
+
* The version of the OpenAPI document: 1.0.0
|
|
20280
|
+
* Contact: support@immutable.com
|
|
20281
|
+
*
|
|
20282
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
20283
|
+
* https://openapi-generator.tech
|
|
20284
|
+
* Do not edit the class manually.
|
|
20285
|
+
*/
|
|
20286
|
+
const FailedOrderCancellationReasonCodeEnum = {
|
|
20287
|
+
AlreadyFilled: 'ALREADY_FILLED'
|
|
20288
|
+
};
|
|
20289
|
+
|
|
20229
20290
|
/* tslint:disable */
|
|
20230
20291
|
/* eslint-disable */
|
|
20231
20292
|
/**
|
|
@@ -20246,6 +20307,40 @@ const FeeFeeTypeEnum = {
|
|
|
20246
20307
|
Protocol: 'PROTOCOL'
|
|
20247
20308
|
};
|
|
20248
20309
|
|
|
20310
|
+
/* tslint:disable */
|
|
20311
|
+
/* eslint-disable */
|
|
20312
|
+
/**
|
|
20313
|
+
* Immutable zkEVM API
|
|
20314
|
+
* Immutable Multi Rollup API
|
|
20315
|
+
*
|
|
20316
|
+
* The version of the OpenAPI document: 1.0.0
|
|
20317
|
+
* Contact: support@immutable.com
|
|
20318
|
+
*
|
|
20319
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
20320
|
+
* https://openapi-generator.tech
|
|
20321
|
+
* Do not edit the class manually.
|
|
20322
|
+
*/
|
|
20323
|
+
const FilledOrderStatusNameEnum = {
|
|
20324
|
+
Filled: 'FILLED'
|
|
20325
|
+
};
|
|
20326
|
+
|
|
20327
|
+
/* tslint:disable */
|
|
20328
|
+
/* eslint-disable */
|
|
20329
|
+
/**
|
|
20330
|
+
* Immutable zkEVM API
|
|
20331
|
+
* Immutable Multi Rollup API
|
|
20332
|
+
*
|
|
20333
|
+
* The version of the OpenAPI document: 1.0.0
|
|
20334
|
+
* Contact: support@immutable.com
|
|
20335
|
+
*
|
|
20336
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
20337
|
+
* https://openapi-generator.tech
|
|
20338
|
+
* Do not edit the class manually.
|
|
20339
|
+
*/
|
|
20340
|
+
const InactiveOrderStatusNameEnum = {
|
|
20341
|
+
Inactive: 'INACTIVE'
|
|
20342
|
+
};
|
|
20343
|
+
|
|
20249
20344
|
/* tslint:disable */
|
|
20250
20345
|
/* eslint-disable */
|
|
20251
20346
|
/**
|
|
@@ -20303,13 +20398,30 @@ const NativeItemItemTypeEnum = {
|
|
|
20303
20398
|
* @export
|
|
20304
20399
|
* @enum {string}
|
|
20305
20400
|
*/
|
|
20306
|
-
const
|
|
20401
|
+
const OrderStatusName = {
|
|
20307
20402
|
Pending: 'PENDING',
|
|
20308
20403
|
Active: 'ACTIVE',
|
|
20309
20404
|
Inactive: 'INACTIVE',
|
|
20310
20405
|
Filled: 'FILLED',
|
|
20311
|
-
|
|
20312
|
-
|
|
20406
|
+
Expired: 'EXPIRED',
|
|
20407
|
+
Cancelled: 'CANCELLED'
|
|
20408
|
+
};
|
|
20409
|
+
|
|
20410
|
+
/* tslint:disable */
|
|
20411
|
+
/* eslint-disable */
|
|
20412
|
+
/**
|
|
20413
|
+
* Immutable zkEVM API
|
|
20414
|
+
* Immutable Multi Rollup API
|
|
20415
|
+
*
|
|
20416
|
+
* The version of the OpenAPI document: 1.0.0
|
|
20417
|
+
* Contact: support@immutable.com
|
|
20418
|
+
*
|
|
20419
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
20420
|
+
* https://openapi-generator.tech
|
|
20421
|
+
* Do not edit the class manually.
|
|
20422
|
+
*/
|
|
20423
|
+
const PendingOrderStatusNameEnum = {
|
|
20424
|
+
Pending: 'PENDING'
|
|
20313
20425
|
};
|
|
20314
20426
|
|
|
20315
20427
|
/* tslint:disable */
|
|
@@ -20391,12 +20503,14 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
20391
20503
|
APIError429AllOfCodeEnum: APIError429AllOfCodeEnum,
|
|
20392
20504
|
APIError500AllOfCodeEnum: APIError500AllOfCodeEnum,
|
|
20393
20505
|
APIError501AllOfCodeEnum: APIError501AllOfCodeEnum,
|
|
20506
|
+
ActiveOrderStatusNameEnum: ActiveOrderStatusNameEnum,
|
|
20394
20507
|
ActivitiesApi: ActivitiesApi,
|
|
20395
20508
|
ActivitiesApiAxiosParamCreator: ActivitiesApiAxiosParamCreator,
|
|
20396
20509
|
ActivitiesApiFactory: ActivitiesApiFactory,
|
|
20397
20510
|
ActivitiesApiFp: ActivitiesApiFp,
|
|
20398
20511
|
ActivityType: ActivityType,
|
|
20399
|
-
|
|
20512
|
+
CancelledOrderStatusCancellationTypeEnum: CancelledOrderStatusCancellationTypeEnum,
|
|
20513
|
+
CancelledOrderStatusNameEnum: CancelledOrderStatusNameEnum,
|
|
20400
20514
|
ChainsApi: ChainsApi,
|
|
20401
20515
|
ChainsApiAxiosParamCreator: ChainsApiAxiosParamCreator,
|
|
20402
20516
|
ChainsApiFactory: ChainsApiFactory,
|
|
@@ -20409,7 +20523,11 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
20409
20523
|
Configuration: Configuration,
|
|
20410
20524
|
ERC20ItemItemTypeEnum: ERC20ItemItemTypeEnum,
|
|
20411
20525
|
ERC721ItemItemTypeEnum: ERC721ItemItemTypeEnum,
|
|
20526
|
+
ExpiredOrderStatusNameEnum: ExpiredOrderStatusNameEnum,
|
|
20527
|
+
FailedOrderCancellationReasonCodeEnum: FailedOrderCancellationReasonCodeEnum,
|
|
20412
20528
|
FeeFeeTypeEnum: FeeFeeTypeEnum,
|
|
20529
|
+
FilledOrderStatusNameEnum: FilledOrderStatusNameEnum,
|
|
20530
|
+
InactiveOrderStatusNameEnum: InactiveOrderStatusNameEnum,
|
|
20413
20531
|
MetadataApi: MetadataApi,
|
|
20414
20532
|
MetadataApiAxiosParamCreator: MetadataApiAxiosParamCreator,
|
|
20415
20533
|
MetadataApiFactory: MetadataApiFactory,
|
|
@@ -20424,7 +20542,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
20424
20542
|
NftsApiAxiosParamCreator: NftsApiAxiosParamCreator,
|
|
20425
20543
|
NftsApiFactory: NftsApiFactory,
|
|
20426
20544
|
NftsApiFp: NftsApiFp,
|
|
20427
|
-
|
|
20545
|
+
OrderStatusName: OrderStatusName,
|
|
20428
20546
|
OrdersApi: OrdersApi,
|
|
20429
20547
|
OrdersApiAxiosParamCreator: OrdersApiAxiosParamCreator,
|
|
20430
20548
|
OrdersApiFactory: OrdersApiFactory,
|
|
@@ -20433,6 +20551,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
20433
20551
|
PassportApiAxiosParamCreator: PassportApiAxiosParamCreator,
|
|
20434
20552
|
PassportApiFactory: PassportApiFactory,
|
|
20435
20553
|
PassportApiFp: PassportApiFp,
|
|
20554
|
+
PendingOrderStatusNameEnum: PendingOrderStatusNameEnum,
|
|
20436
20555
|
ProtocolDataOrderTypeEnum: ProtocolDataOrderTypeEnum,
|
|
20437
20556
|
SaleFeeTypeEnum: SaleFeeTypeEnum,
|
|
20438
20557
|
TokenContractType: TokenContractType,
|
|
@@ -20461,7 +20580,7 @@ class APIError extends Error {
|
|
|
20461
20580
|
|
|
20462
20581
|
/* eslint-disable implicit-arrow-linebreak */
|
|
20463
20582
|
const defaultHeaders = {
|
|
20464
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.
|
|
20583
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.27.1',
|
|
20465
20584
|
};
|
|
20466
20585
|
/**
|
|
20467
20586
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -24069,15 +24188,6 @@ const $c16168a9c28ae4fd$export$92606e71d0a264ff = async (config, ownerAddress, b
|
|
|
24069
24188
|
fundingRoutes: []
|
|
24070
24189
|
};
|
|
24071
24190
|
let priority = 0;
|
|
24072
|
-
if (bridgeFundingStep) {
|
|
24073
|
-
priority++;
|
|
24074
|
-
response.fundingRoutes.push({
|
|
24075
|
-
priority: priority,
|
|
24076
|
-
steps: [
|
|
24077
|
-
bridgeFundingStep
|
|
24078
|
-
]
|
|
24079
|
-
});
|
|
24080
|
-
}
|
|
24081
24191
|
if (swapFundingSteps.length > 0) {
|
|
24082
24192
|
priority++;
|
|
24083
24193
|
swapFundingSteps.forEach((swapFundingStep)=>{
|
|
@@ -24089,6 +24199,15 @@ const $c16168a9c28ae4fd$export$92606e71d0a264ff = async (config, ownerAddress, b
|
|
|
24089
24199
|
});
|
|
24090
24200
|
});
|
|
24091
24201
|
}
|
|
24202
|
+
if (bridgeFundingStep) {
|
|
24203
|
+
priority++;
|
|
24204
|
+
response.fundingRoutes.push({
|
|
24205
|
+
priority: priority,
|
|
24206
|
+
steps: [
|
|
24207
|
+
bridgeFundingStep
|
|
24208
|
+
]
|
|
24209
|
+
});
|
|
24210
|
+
}
|
|
24092
24211
|
if (onRampFundingStep) {
|
|
24093
24212
|
priority++;
|
|
24094
24213
|
response.fundingRoutes.push({
|
|
@@ -24136,12 +24255,10 @@ const $0e7419077c373b24$export$9e073f9ada8c81e6 = async (config, provider, itemR
|
|
|
24136
24255
|
};
|
|
24137
24256
|
const availableRoutingOptions = await ($7f2e17f026d4fc8d$export$86d9f998ddda013e)(config, provider);
|
|
24138
24257
|
const routingOutcome = await ($c16168a9c28ae4fd$export$92606e71d0a264ff)(config, ownerAddress, balanceCheckResult, availableRoutingOptions);
|
|
24139
|
-
const isPassport = provider.provider?.isPassport || false;
|
|
24140
24258
|
return {
|
|
24141
24259
|
sufficient: sufficient,
|
|
24142
24260
|
transactionRequirements: transactionRequirements,
|
|
24143
24261
|
router: {
|
|
24144
|
-
isPassport: isPassport,
|
|
24145
24262
|
availableRoutingOptions: availableRoutingOptions,
|
|
24146
24263
|
routingOutcome: routingOutcome
|
|
24147
24264
|
}
|
|
@@ -24355,7 +24472,7 @@ const $64863c39386de592$export$7f8e2b98eca5a7f0 = async (config, provider, order
|
|
|
24355
24472
|
let order;
|
|
24356
24473
|
let spenderAddress = "";
|
|
24357
24474
|
const gasLimit = (constants).estimatedFulfillmentGasGwei;
|
|
24358
|
-
if (orders.length === 0) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("No orders were
|
|
24475
|
+
if (orders.length === 0) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("No orders were provided to the orders array. Please provide at least one order.", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).FULFILL_ORDER_LISTING_ERROR);
|
|
24359
24476
|
const { id: id, takerFees: takerFees } = orders[0];
|
|
24360
24477
|
try {
|
|
24361
24478
|
orderbook = await $67fc622a2b913d5f$export$c60ce6c6a92bc2ff(config);
|
|
@@ -24431,9 +24548,7 @@ const $64863c39386de592$export$7f8e2b98eca5a7f0 = async (config, provider, order
|
|
|
24431
24548
|
status: ($4b58188d47aafe8d$export$de7bcda3c490bf18).FAILED,
|
|
24432
24549
|
transactionHash: approvalResult.transactionHash,
|
|
24433
24550
|
reason: approvalResult.reason,
|
|
24434
|
-
smartCheckoutResult:
|
|
24435
|
-
smartCheckoutResult
|
|
24436
|
-
]
|
|
24551
|
+
smartCheckoutResult: smartCheckoutResult
|
|
24437
24552
|
};
|
|
24438
24553
|
try {
|
|
24439
24554
|
if (unsignedFulfillmentTransactions.length === 0) unsignedFulfillmentTransactions = await (0, $a7367d01c6e76b1c$export$396bd6ce7d3ab533)(orderActions);
|
|
@@ -24447,22 +24562,16 @@ const $64863c39386de592$export$7f8e2b98eca5a7f0 = async (config, provider, order
|
|
|
24447
24562
|
status: ($4b58188d47aafe8d$export$de7bcda3c490bf18).FAILED,
|
|
24448
24563
|
transactionHash: fulfillmentResult.transactionHash,
|
|
24449
24564
|
reason: fulfillmentResult.reason,
|
|
24450
|
-
smartCheckoutResult:
|
|
24451
|
-
smartCheckoutResult
|
|
24452
|
-
]
|
|
24565
|
+
smartCheckoutResult: smartCheckoutResult
|
|
24453
24566
|
};
|
|
24454
24567
|
return {
|
|
24455
24568
|
status: ($4b58188d47aafe8d$export$de7bcda3c490bf18).SUCCESS,
|
|
24456
|
-
smartCheckoutResult:
|
|
24457
|
-
smartCheckoutResult
|
|
24458
|
-
]
|
|
24569
|
+
smartCheckoutResult: smartCheckoutResult
|
|
24459
24570
|
};
|
|
24460
24571
|
}
|
|
24461
24572
|
return {
|
|
24462
24573
|
status: ($4b58188d47aafe8d$export$de7bcda3c490bf18).INSUFFICIENT_FUNDS,
|
|
24463
|
-
smartCheckoutResult:
|
|
24464
|
-
smartCheckoutResult
|
|
24465
|
-
]
|
|
24574
|
+
smartCheckoutResult: smartCheckoutResult
|
|
24466
24575
|
};
|
|
24467
24576
|
};
|
|
24468
24577
|
|
|
@@ -24476,7 +24585,7 @@ const $64863c39386de592$export$7f8e2b98eca5a7f0 = async (config, provider, order
|
|
|
24476
24585
|
|
|
24477
24586
|
const $9c3db1bb9c8b69d3$export$70b61ad426ddbe54 = async (config, provider, orderIds)=>{
|
|
24478
24587
|
let unsignedCancelOrderTransaction;
|
|
24479
|
-
if (orderIds.length === 0) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("No orderIds were
|
|
24588
|
+
if (orderIds.length === 0) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("No orderIds were provided to the orderIds array. Please provide at least one orderId.", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).CANCEL_ORDER_LISTING_ERROR);
|
|
24480
24589
|
// Update this when bulk cancel is supported
|
|
24481
24590
|
const orderId = orderIds[0];
|
|
24482
24591
|
try {
|
|
@@ -24537,7 +24646,7 @@ const $9085b221b72ac69e$export$e761f9e0703de895 = async (config, provider, order
|
|
|
24537
24646
|
let orderbook;
|
|
24538
24647
|
let listing;
|
|
24539
24648
|
let spenderAddress = "";
|
|
24540
|
-
if (orders.length === 0) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("No orders were
|
|
24649
|
+
if (orders.length === 0) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("No orders were provided to the orders array. Please provide at least one order.", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PREPARE_ORDER_LISTING_ERROR);
|
|
24541
24650
|
const { buyToken: buyToken, sellToken: sellToken, makerFees: makerFees } = orders[0];
|
|
24542
24651
|
let decimals = 18;
|
|
24543
24652
|
if (buyToken.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC20) {
|
|
@@ -24584,9 +24693,7 @@ const $9085b221b72ac69e$export$e761f9e0703de895 = async (config, provider, order
|
|
|
24584
24693
|
status: ($4b58188d47aafe8d$export$de7bcda3c490bf18).FAILED,
|
|
24585
24694
|
transactionHash: approvalResult.transactionHash,
|
|
24586
24695
|
reason: approvalResult.reason,
|
|
24587
|
-
smartCheckoutResult:
|
|
24588
|
-
smartCheckoutResult
|
|
24589
|
-
]
|
|
24696
|
+
smartCheckoutResult: smartCheckoutResult
|
|
24590
24697
|
};
|
|
24591
24698
|
const unsignedMessage = ($a7367d01c6e76b1c$export$d62081fac18000c2)(listing.orderHash, listing.orderComponents, listing.actions);
|
|
24592
24699
|
if (!unsignedMessage) // For sell it is expected the orderbook will always return an unsigned message
|
|
@@ -24623,16 +24730,12 @@ const $9085b221b72ac69e$export$e761f9e0703de895 = async (config, provider, order
|
|
|
24623
24730
|
orderIds: [
|
|
24624
24731
|
orderId
|
|
24625
24732
|
],
|
|
24626
|
-
smartCheckoutResult:
|
|
24627
|
-
smartCheckoutResult
|
|
24628
|
-
]
|
|
24733
|
+
smartCheckoutResult: smartCheckoutResult
|
|
24629
24734
|
};
|
|
24630
24735
|
}
|
|
24631
24736
|
return {
|
|
24632
24737
|
status: ($4b58188d47aafe8d$export$de7bcda3c490bf18).INSUFFICIENT_FUNDS,
|
|
24633
|
-
smartCheckoutResult:
|
|
24634
|
-
smartCheckoutResult
|
|
24635
|
-
]
|
|
24738
|
+
smartCheckoutResult: smartCheckoutResult
|
|
24636
24739
|
};
|
|
24637
24740
|
};
|
|
24638
24741
|
|