@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/index.js CHANGED
@@ -697,13 +697,14 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
697
697
  * List all collections
698
698
  * @summary List all collections
699
699
  * @param {string} chainName The name of chain
700
+ * @param {Array<string>} [contractAddress] List of contract addresses to filter by
700
701
  * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
701
702
  * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
702
703
  * @param {number} [pageSize] Maximum number of items to return
703
704
  * @param {*} [options] Override http request option.
704
705
  * @throws {RequiredError}
705
706
  */
706
- listCollections: async (chainName, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
707
+ listCollections: async (chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
707
708
  // verify required parameter 'chainName' is not null or undefined
708
709
  assertParamExists$1('listCollections', 'chainName', chainName);
709
710
  const localVarPath = `/v1/chains/{chain_name}/collections`
@@ -717,6 +718,9 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
717
718
  const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
718
719
  const localVarHeaderParameter = {};
719
720
  const localVarQueryParameter = {};
721
+ if (contractAddress) {
722
+ localVarQueryParameter['contract_address'] = contractAddress;
723
+ }
720
724
  if (fromUpdatedAt !== undefined) {
721
725
  localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
722
726
  fromUpdatedAt.toISOString() :
@@ -842,14 +846,15 @@ const CollectionsApiFp = function (configuration) {
842
846
  * List all collections
843
847
  * @summary List all collections
844
848
  * @param {string} chainName The name of chain
849
+ * @param {Array<string>} [contractAddress] List of contract addresses to filter by
845
850
  * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
846
851
  * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
847
852
  * @param {number} [pageSize] Maximum number of items to return
848
853
  * @param {*} [options] Override http request option.
849
854
  * @throws {RequiredError}
850
855
  */
851
- async listCollections(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
852
- const localVarAxiosArgs = await localVarAxiosParamCreator.listCollections(chainName, fromUpdatedAt, pageCursor, pageSize, options);
856
+ async listCollections(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options) {
857
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listCollections(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options);
853
858
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
854
859
  },
855
860
  /**
@@ -903,14 +908,15 @@ const CollectionsApiFactory = function (configuration, basePath, axios) {
903
908
  * List all collections
904
909
  * @summary List all collections
905
910
  * @param {string} chainName The name of chain
911
+ * @param {Array<string>} [contractAddress] List of contract addresses to filter by
906
912
  * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
907
913
  * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
908
914
  * @param {number} [pageSize] Maximum number of items to return
909
915
  * @param {*} [options] Override http request option.
910
916
  * @throws {RequiredError}
911
917
  */
912
- listCollections(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
913
- return localVarFp.listCollections(chainName, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
918
+ listCollections(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options) {
919
+ return localVarFp.listCollections(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
914
920
  },
915
921
  /**
916
922
  * List collections by NFT owner account address
@@ -966,7 +972,7 @@ class CollectionsApi extends BaseAPI$1 {
966
972
  * @memberof CollectionsApi
967
973
  */
968
974
  listCollections(requestParameters, options) {
969
- return CollectionsApiFp(this.configuration).listCollections(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
975
+ return CollectionsApiFp(this.configuration).listCollections(requestParameters.chainName, requestParameters.contractAddress, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
970
976
  }
971
977
  /**
972
978
  * List collections by NFT owner account address
@@ -2220,7 +2226,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
2220
2226
  * List all listings
2221
2227
  * @summary List all listings
2222
2228
  * @param {string} chainName
2223
- * @param {OrderStatus} [status] Order status to filter by
2229
+ * @param {OrderStatusName} [status] Order status to filter by
2224
2230
  * @param {string} [sellItemContractAddress] Sell item contract address to filter by
2225
2231
  * @param {string} [buyItemContractAddress] Buy item contract address to filter by
2226
2232
  * @param {string} [sellItemTokenId] Sell item token identifier to filter by
@@ -2399,7 +2405,7 @@ const OrdersApiFp = function (configuration) {
2399
2405
  * List all listings
2400
2406
  * @summary List all listings
2401
2407
  * @param {string} chainName
2402
- * @param {OrderStatus} [status] Order status to filter by
2408
+ * @param {OrderStatusName} [status] Order status to filter by
2403
2409
  * @param {string} [sellItemContractAddress] Sell item contract address to filter by
2404
2410
  * @param {string} [buyItemContractAddress] Buy item contract address to filter by
2405
2411
  * @param {string} [sellItemTokenId] Sell item token identifier to filter by
@@ -2498,7 +2504,7 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
2498
2504
  * List all listings
2499
2505
  * @summary List all listings
2500
2506
  * @param {string} chainName
2501
- * @param {OrderStatus} [status] Order status to filter by
2507
+ * @param {OrderStatusName} [status] Order status to filter by
2502
2508
  * @param {string} [sellItemContractAddress] Sell item contract address to filter by
2503
2509
  * @param {string} [buyItemContractAddress] Buy item contract address to filter by
2504
2510
  * @param {string} [sellItemTokenId] Sell item token identifier to filter by
@@ -3195,6 +3201,23 @@ const APIError501AllOfCodeEnum = {
3195
3201
  NotImplementedError: 'NOT_IMPLEMENTED_ERROR'
3196
3202
  };
3197
3203
 
3204
+ /* tslint:disable */
3205
+ /* eslint-disable */
3206
+ /**
3207
+ * Immutable zkEVM API
3208
+ * Immutable Multi Rollup API
3209
+ *
3210
+ * The version of the OpenAPI document: 1.0.0
3211
+ * Contact: support@immutable.com
3212
+ *
3213
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3214
+ * https://openapi-generator.tech
3215
+ * Do not edit the class manually.
3216
+ */
3217
+ const ActiveOrderStatusNameEnum = {
3218
+ Active: 'ACTIVE'
3219
+ };
3220
+
3198
3221
  /* tslint:disable */
3199
3222
  /* eslint-disable */
3200
3223
  /**
@@ -3235,8 +3258,12 @@ const ActivityType = {
3235
3258
  * https://openapi-generator.tech
3236
3259
  * Do not edit the class manually.
3237
3260
  */
3238
- const CancelOrdersResultResultFailedCancellationsInnerReasonCodeEnum = {
3239
- AlreadyFilled: 'ALREADY_FILLED'
3261
+ const CancelledOrderStatusNameEnum = {
3262
+ Cancelled: 'CANCELLED'
3263
+ };
3264
+ const CancelledOrderStatusCancellationTypeEnum = {
3265
+ OnChain: 'ON_CHAIN',
3266
+ OffChain: 'OFF_CHAIN'
3240
3267
  };
3241
3268
 
3242
3269
  /* tslint:disable */
@@ -3295,6 +3322,40 @@ const ERC721ItemItemTypeEnum = {
3295
3322
  Erc721: 'ERC721'
3296
3323
  };
3297
3324
 
3325
+ /* tslint:disable */
3326
+ /* eslint-disable */
3327
+ /**
3328
+ * Immutable zkEVM API
3329
+ * Immutable Multi Rollup API
3330
+ *
3331
+ * The version of the OpenAPI document: 1.0.0
3332
+ * Contact: support@immutable.com
3333
+ *
3334
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3335
+ * https://openapi-generator.tech
3336
+ * Do not edit the class manually.
3337
+ */
3338
+ const ExpiredOrderStatusNameEnum = {
3339
+ Expired: 'EXPIRED'
3340
+ };
3341
+
3342
+ /* tslint:disable */
3343
+ /* eslint-disable */
3344
+ /**
3345
+ * Immutable zkEVM API
3346
+ * Immutable Multi Rollup API
3347
+ *
3348
+ * The version of the OpenAPI document: 1.0.0
3349
+ * Contact: support@immutable.com
3350
+ *
3351
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3352
+ * https://openapi-generator.tech
3353
+ * Do not edit the class manually.
3354
+ */
3355
+ const FailedOrderCancellationReasonCodeEnum = {
3356
+ AlreadyFilled: 'ALREADY_FILLED'
3357
+ };
3358
+
3298
3359
  /* tslint:disable */
3299
3360
  /* eslint-disable */
3300
3361
  /**
@@ -3315,6 +3376,40 @@ const FeeFeeTypeEnum = {
3315
3376
  Protocol: 'PROTOCOL'
3316
3377
  };
3317
3378
 
3379
+ /* tslint:disable */
3380
+ /* eslint-disable */
3381
+ /**
3382
+ * Immutable zkEVM API
3383
+ * Immutable Multi Rollup API
3384
+ *
3385
+ * The version of the OpenAPI document: 1.0.0
3386
+ * Contact: support@immutable.com
3387
+ *
3388
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3389
+ * https://openapi-generator.tech
3390
+ * Do not edit the class manually.
3391
+ */
3392
+ const FilledOrderStatusNameEnum = {
3393
+ Filled: 'FILLED'
3394
+ };
3395
+
3396
+ /* tslint:disable */
3397
+ /* eslint-disable */
3398
+ /**
3399
+ * Immutable zkEVM API
3400
+ * Immutable Multi Rollup API
3401
+ *
3402
+ * The version of the OpenAPI document: 1.0.0
3403
+ * Contact: support@immutable.com
3404
+ *
3405
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3406
+ * https://openapi-generator.tech
3407
+ * Do not edit the class manually.
3408
+ */
3409
+ const InactiveOrderStatusNameEnum = {
3410
+ Inactive: 'INACTIVE'
3411
+ };
3412
+
3318
3413
  /* tslint:disable */
3319
3414
  /* eslint-disable */
3320
3415
  /**
@@ -3372,13 +3467,30 @@ const NativeItemItemTypeEnum = {
3372
3467
  * @export
3373
3468
  * @enum {string}
3374
3469
  */
3375
- const OrderStatus = {
3470
+ const OrderStatusName$1 = {
3376
3471
  Pending: 'PENDING',
3377
3472
  Active: 'ACTIVE',
3378
3473
  Inactive: 'INACTIVE',
3379
3474
  Filled: 'FILLED',
3380
- Cancelled: 'CANCELLED',
3381
- Expired: 'EXPIRED'
3475
+ Expired: 'EXPIRED',
3476
+ Cancelled: 'CANCELLED'
3477
+ };
3478
+
3479
+ /* tslint:disable */
3480
+ /* eslint-disable */
3481
+ /**
3482
+ * Immutable zkEVM API
3483
+ * Immutable Multi Rollup API
3484
+ *
3485
+ * The version of the OpenAPI document: 1.0.0
3486
+ * Contact: support@immutable.com
3487
+ *
3488
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3489
+ * https://openapi-generator.tech
3490
+ * Do not edit the class manually.
3491
+ */
3492
+ const PendingOrderStatusNameEnum = {
3493
+ Pending: 'PENDING'
3382
3494
  };
3383
3495
 
3384
3496
  /* tslint:disable */
@@ -3460,12 +3572,14 @@ var index = /*#__PURE__*/Object.freeze({
3460
3572
  APIError429AllOfCodeEnum: APIError429AllOfCodeEnum,
3461
3573
  APIError500AllOfCodeEnum: APIError500AllOfCodeEnum,
3462
3574
  APIError501AllOfCodeEnum: APIError501AllOfCodeEnum,
3575
+ ActiveOrderStatusNameEnum: ActiveOrderStatusNameEnum,
3463
3576
  ActivitiesApi: ActivitiesApi,
3464
3577
  ActivitiesApiAxiosParamCreator: ActivitiesApiAxiosParamCreator,
3465
3578
  ActivitiesApiFactory: ActivitiesApiFactory,
3466
3579
  ActivitiesApiFp: ActivitiesApiFp,
3467
3580
  ActivityType: ActivityType,
3468
- CancelOrdersResultResultFailedCancellationsInnerReasonCodeEnum: CancelOrdersResultResultFailedCancellationsInnerReasonCodeEnum,
3581
+ CancelledOrderStatusCancellationTypeEnum: CancelledOrderStatusCancellationTypeEnum,
3582
+ CancelledOrderStatusNameEnum: CancelledOrderStatusNameEnum,
3469
3583
  ChainsApi: ChainsApi,
3470
3584
  ChainsApiAxiosParamCreator: ChainsApiAxiosParamCreator,
3471
3585
  ChainsApiFactory: ChainsApiFactory,
@@ -3478,7 +3592,11 @@ var index = /*#__PURE__*/Object.freeze({
3478
3592
  Configuration: Configuration$2,
3479
3593
  ERC20ItemItemTypeEnum: ERC20ItemItemTypeEnum,
3480
3594
  ERC721ItemItemTypeEnum: ERC721ItemItemTypeEnum,
3595
+ ExpiredOrderStatusNameEnum: ExpiredOrderStatusNameEnum,
3596
+ FailedOrderCancellationReasonCodeEnum: FailedOrderCancellationReasonCodeEnum,
3481
3597
  FeeFeeTypeEnum: FeeFeeTypeEnum,
3598
+ FilledOrderStatusNameEnum: FilledOrderStatusNameEnum,
3599
+ InactiveOrderStatusNameEnum: InactiveOrderStatusNameEnum,
3482
3600
  MetadataApi: MetadataApi,
3483
3601
  MetadataApiAxiosParamCreator: MetadataApiAxiosParamCreator,
3484
3602
  MetadataApiFactory: MetadataApiFactory,
@@ -3493,7 +3611,7 @@ var index = /*#__PURE__*/Object.freeze({
3493
3611
  NftsApiAxiosParamCreator: NftsApiAxiosParamCreator,
3494
3612
  NftsApiFactory: NftsApiFactory,
3495
3613
  NftsApiFp: NftsApiFp,
3496
- OrderStatus: OrderStatus,
3614
+ OrderStatusName: OrderStatusName$1,
3497
3615
  OrdersApi: OrdersApi,
3498
3616
  OrdersApiAxiosParamCreator: OrdersApiAxiosParamCreator,
3499
3617
  OrdersApiFactory: OrdersApiFactory,
@@ -3502,6 +3620,7 @@ var index = /*#__PURE__*/Object.freeze({
3502
3620
  PassportApiAxiosParamCreator: PassportApiAxiosParamCreator,
3503
3621
  PassportApiFactory: PassportApiFactory,
3504
3622
  PassportApiFp: PassportApiFp,
3623
+ PendingOrderStatusNameEnum: PendingOrderStatusNameEnum,
3505
3624
  ProtocolDataOrderTypeEnum: ProtocolDataOrderTypeEnum,
3506
3625
  SaleFeeTypeEnum: SaleFeeTypeEnum,
3507
3626
  TokenContractType: TokenContractType,
@@ -3533,7 +3652,7 @@ class MultiRollupApiClients {
3533
3652
  }
3534
3653
 
3535
3654
  // eslint-disable-next-line @typescript-eslint/naming-convention
3536
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.26.0' };
3655
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.27.1' };
3537
3656
  const createConfig = ({ basePath, headers, }) => {
3538
3657
  if (!basePath.trim()) {
3539
3658
  throw Error('basePath can not be empty');
@@ -3593,7 +3712,7 @@ class APIError extends Error {
3593
3712
 
3594
3713
  /* eslint-disable implicit-arrow-linebreak */
3595
3714
  const defaultHeaders = {
3596
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.26.0',
3715
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.27.1',
3597
3716
  };
3598
3717
  /**
3599
3718
  * createAPIConfiguration to create a custom Configuration
@@ -3997,7 +4116,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
3997
4116
  chainID,
3998
4117
  coreContractAddress,
3999
4118
  registrationContractAddress,
4000
- sdkVersion: 'ts-immutable-sdk-0.26.0',
4119
+ sdkVersion: 'ts-immutable-sdk-0.27.1',
4001
4120
  });
4002
4121
  /**
4003
4122
  * Sets `sdkVersion` at the time of build
@@ -32018,15 +32137,6 @@ const $c16168a9c28ae4fd$export$92606e71d0a264ff = async (config, ownerAddress, b
32018
32137
  fundingRoutes: []
32019
32138
  };
32020
32139
  let priority = 0;
32021
- if (bridgeFundingStep) {
32022
- priority++;
32023
- response.fundingRoutes.push({
32024
- priority: priority,
32025
- steps: [
32026
- bridgeFundingStep
32027
- ]
32028
- });
32029
- }
32030
32140
  if (swapFundingSteps.length > 0) {
32031
32141
  priority++;
32032
32142
  swapFundingSteps.forEach((swapFundingStep)=>{
@@ -32038,6 +32148,15 @@ const $c16168a9c28ae4fd$export$92606e71d0a264ff = async (config, ownerAddress, b
32038
32148
  });
32039
32149
  });
32040
32150
  }
32151
+ if (bridgeFundingStep) {
32152
+ priority++;
32153
+ response.fundingRoutes.push({
32154
+ priority: priority,
32155
+ steps: [
32156
+ bridgeFundingStep
32157
+ ]
32158
+ });
32159
+ }
32041
32160
  if (onRampFundingStep) {
32042
32161
  priority++;
32043
32162
  response.fundingRoutes.push({
@@ -32085,12 +32204,10 @@ const $0e7419077c373b24$export$9e073f9ada8c81e6 = async (config, provider, itemR
32085
32204
  };
32086
32205
  const availableRoutingOptions = await ($7f2e17f026d4fc8d$export$86d9f998ddda013e)(config, provider);
32087
32206
  const routingOutcome = await ($c16168a9c28ae4fd$export$92606e71d0a264ff)(config, ownerAddress, balanceCheckResult, availableRoutingOptions);
32088
- const isPassport = provider.provider?.isPassport || false;
32089
32207
  return {
32090
32208
  sufficient: sufficient,
32091
32209
  transactionRequirements: transactionRequirements,
32092
32210
  router: {
32093
- isPassport: isPassport,
32094
32211
  availableRoutingOptions: availableRoutingOptions,
32095
32212
  routingOutcome: routingOutcome
32096
32213
  }
@@ -32304,7 +32421,7 @@ const $64863c39386de592$export$7f8e2b98eca5a7f0 = async (config, provider, order
32304
32421
  let order;
32305
32422
  let spenderAddress = "";
32306
32423
  const gasLimit = (constants).estimatedFulfillmentGasGwei;
32307
- if (orders.length === 0) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("No orders were passed in, must pass at least one order", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).FULFILL_ORDER_LISTING_ERROR);
32424
+ 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);
32308
32425
  const { id: id, takerFees: takerFees } = orders[0];
32309
32426
  try {
32310
32427
  orderbook = await $67fc622a2b913d5f$export$c60ce6c6a92bc2ff(config);
@@ -32380,9 +32497,7 @@ const $64863c39386de592$export$7f8e2b98eca5a7f0 = async (config, provider, order
32380
32497
  status: ($4b58188d47aafe8d$export$de7bcda3c490bf18).FAILED,
32381
32498
  transactionHash: approvalResult.transactionHash,
32382
32499
  reason: approvalResult.reason,
32383
- smartCheckoutResult: [
32384
- smartCheckoutResult
32385
- ]
32500
+ smartCheckoutResult: smartCheckoutResult
32386
32501
  };
32387
32502
  try {
32388
32503
  if (unsignedFulfillmentTransactions.length === 0) unsignedFulfillmentTransactions = await (0, $a7367d01c6e76b1c$export$396bd6ce7d3ab533)(orderActions);
@@ -32396,22 +32511,16 @@ const $64863c39386de592$export$7f8e2b98eca5a7f0 = async (config, provider, order
32396
32511
  status: ($4b58188d47aafe8d$export$de7bcda3c490bf18).FAILED,
32397
32512
  transactionHash: fulfillmentResult.transactionHash,
32398
32513
  reason: fulfillmentResult.reason,
32399
- smartCheckoutResult: [
32400
- smartCheckoutResult
32401
- ]
32514
+ smartCheckoutResult: smartCheckoutResult
32402
32515
  };
32403
32516
  return {
32404
32517
  status: ($4b58188d47aafe8d$export$de7bcda3c490bf18).SUCCESS,
32405
- smartCheckoutResult: [
32406
- smartCheckoutResult
32407
- ]
32518
+ smartCheckoutResult: smartCheckoutResult
32408
32519
  };
32409
32520
  }
32410
32521
  return {
32411
32522
  status: ($4b58188d47aafe8d$export$de7bcda3c490bf18).INSUFFICIENT_FUNDS,
32412
- smartCheckoutResult: [
32413
- smartCheckoutResult
32414
- ]
32523
+ smartCheckoutResult: smartCheckoutResult
32415
32524
  };
32416
32525
  };
32417
32526
 
@@ -32425,7 +32534,7 @@ const $64863c39386de592$export$7f8e2b98eca5a7f0 = async (config, provider, order
32425
32534
 
32426
32535
  const $9c3db1bb9c8b69d3$export$70b61ad426ddbe54 = async (config, provider, orderIds)=>{
32427
32536
  let unsignedCancelOrderTransaction;
32428
- if (orderIds.length === 0) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("No orderIds were passed in, must pass at least one orderId to cancel", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).CANCEL_ORDER_LISTING_ERROR);
32537
+ 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);
32429
32538
  // Update this when bulk cancel is supported
32430
32539
  const orderId = orderIds[0];
32431
32540
  try {
@@ -32486,7 +32595,7 @@ const $9085b221b72ac69e$export$e761f9e0703de895 = async (config, provider, order
32486
32595
  let orderbook;
32487
32596
  let listing;
32488
32597
  let spenderAddress = "";
32489
- if (orders.length === 0) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("No orders were parsed, must parse at least one order", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PREPARE_ORDER_LISTING_ERROR);
32598
+ 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);
32490
32599
  const { buyToken: buyToken, sellToken: sellToken, makerFees: makerFees } = orders[0];
32491
32600
  let decimals = 18;
32492
32601
  if (buyToken.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC20) {
@@ -32533,9 +32642,7 @@ const $9085b221b72ac69e$export$e761f9e0703de895 = async (config, provider, order
32533
32642
  status: ($4b58188d47aafe8d$export$de7bcda3c490bf18).FAILED,
32534
32643
  transactionHash: approvalResult.transactionHash,
32535
32644
  reason: approvalResult.reason,
32536
- smartCheckoutResult: [
32537
- smartCheckoutResult
32538
- ]
32645
+ smartCheckoutResult: smartCheckoutResult
32539
32646
  };
32540
32647
  const unsignedMessage = ($a7367d01c6e76b1c$export$d62081fac18000c2)(listing.orderHash, listing.orderComponents, listing.actions);
32541
32648
  if (!unsignedMessage) // For sell it is expected the orderbook will always return an unsigned message
@@ -32572,16 +32679,12 @@ const $9085b221b72ac69e$export$e761f9e0703de895 = async (config, provider, order
32572
32679
  orderIds: [
32573
32680
  orderId
32574
32681
  ],
32575
- smartCheckoutResult: [
32576
- smartCheckoutResult
32577
- ]
32682
+ smartCheckoutResult: smartCheckoutResult
32578
32683
  };
32579
32684
  }
32580
32685
  return {
32581
32686
  status: ($4b58188d47aafe8d$export$de7bcda3c490bf18).INSUFFICIENT_FUNDS,
32582
- smartCheckoutResult: [
32583
- smartCheckoutResult
32584
- ]
32687
+ smartCheckoutResult: smartCheckoutResult
32585
32688
  };
32586
32689
  };
32587
32690
 
@@ -32938,7 +33041,7 @@ var $045213b18e9f1f94$export$75be0f6af9650f2c;
32938
33041
  })($045213b18e9f1f94$export$75be0f6af9650f2c || ($045213b18e9f1f94$export$75be0f6af9650f2c = {}));
32939
33042
 
32940
33043
 
32941
- const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.26.0";
33044
+ const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.27.1";
32942
33045
  const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
32943
33046
  const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
32944
33047
 
@@ -33072,7 +33175,7 @@ var $207ed853f11d19d5$export$5a0ace85cae72d45;
33072
33175
  IMTBLWidgetEvents["IMTBL_SWAP_WIDGET_EVENT"] = "imtbl-swap-widget";
33073
33176
  IMTBLWidgetEvents["IMTBL_BRIDGE_WIDGET_EVENT"] = "imtbl-bridge-widget";
33074
33177
  IMTBLWidgetEvents["IMTBL_ONRAMP_WIDGET_EVENT"] = "imtbl-onramp-widget";
33075
- IMTBLWidgetEvents["IMTBL_PRIMARY_REVENUE_WIDGET_EVENT"] = "imtbl-primary-revenue-widget";
33178
+ IMTBLWidgetEvents["IMTBL_PRIMARY_REVENUE_WIDGET_EVENT"] = "imtbl-sale-widget";
33076
33179
  })($207ed853f11d19d5$export$5a0ace85cae72d45 || ($207ed853f11d19d5$export$5a0ace85cae72d45 = {}));
33077
33180
 
33078
33181
 
@@ -33112,18 +33215,18 @@ $parcel$export($53d219e7f6bf0cd6$exports, "SwapEventType", () => $53d219e7f6bf0c
33112
33215
  })($53d219e7f6bf0cd6$export$140a49745ab55563 || ($53d219e7f6bf0cd6$export$140a49745ab55563 = {}));
33113
33216
 
33114
33217
 
33115
- var $8c83f59522c4ca40$exports = {};
33218
+ var $9b3189b6b155842e$exports = {};
33116
33219
 
33117
- $parcel$export($8c83f59522c4ca40$exports, "PrimaryRevenueEventType", () => $8c83f59522c4ca40$export$b33478ffb988bd5e);
33220
+ $parcel$export($9b3189b6b155842e$exports, "SaleEventType", () => $9b3189b6b155842e$export$881881ffb3bd733e);
33118
33221
  /**
33119
- * Enum representing possible Primary Revenue Widget event types.
33120
- */ var $8c83f59522c4ca40$export$b33478ffb988bd5e;
33121
- (function(PrimaryRevenueEventType) {
33122
- PrimaryRevenueEventType["CLOSE_WIDGET"] = "close-widget";
33123
- PrimaryRevenueEventType["SUCCESS"] = "success";
33124
- PrimaryRevenueEventType["FAILURE"] = "failure";
33125
- PrimaryRevenueEventType["REJECTED"] = "rejected";
33126
- })($8c83f59522c4ca40$export$b33478ffb988bd5e || ($8c83f59522c4ca40$export$b33478ffb988bd5e = {}));
33222
+ * Enum representing possible Sale Widget event types.
33223
+ */ var $9b3189b6b155842e$export$881881ffb3bd733e;
33224
+ (function(SaleEventType) {
33225
+ SaleEventType["CLOSE_WIDGET"] = "close-widget";
33226
+ SaleEventType["SUCCESS"] = "success";
33227
+ SaleEventType["FAILURE"] = "failure";
33228
+ SaleEventType["REJECTED"] = "rejected";
33229
+ })($9b3189b6b155842e$export$881881ffb3bd733e || ($9b3189b6b155842e$export$881881ffb3bd733e = {}));
33127
33230
 
33128
33231
 
33129
33232
  var $15cc9e120aa6f3bf$exports = {};
@@ -33371,7 +33474,7 @@ var checkout_widgets = /*#__PURE__*/Object.freeze({
33371
33474
  get OnRampEventType () { return $d882ddc5600b1284$export$66ec39c0924078d8; },
33372
33475
  OnRampReact: $f94f63f2c041a04c$export$9e363c61ea99bbb4,
33373
33476
  get OrchestrationEventType () { return $ad06b030b1a3ba34$export$b80d2daf830437b9; },
33374
- get PrimaryRevenueEventType () { return $8c83f59522c4ca40$export$b33478ffb988bd5e; },
33477
+ get SaleEventType () { return $9b3189b6b155842e$export$881881ffb3bd733e; },
33375
33478
  get SwapEventType () { return $53d219e7f6bf0cd6$export$140a49745ab55563; },
33376
33479
  SwapReact: $a4fbb8e3a6aeff58$export$971e031379577f4,
33377
33480
  UpdateConfig: $430e3eda76fa4d5f$export$bf1548ba7e61c17f,
package/dist/passport.js CHANGED
@@ -606,13 +606,14 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
606
606
  * List all collections
607
607
  * @summary List all collections
608
608
  * @param {string} chainName The name of chain
609
+ * @param {Array<string>} [contractAddress] List of contract addresses to filter by
609
610
  * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
610
611
  * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
611
612
  * @param {number} [pageSize] Maximum number of items to return
612
613
  * @param {*} [options] Override http request option.
613
614
  * @throws {RequiredError}
614
615
  */
615
- listCollections: async (chainName, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
616
+ listCollections: async (chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
616
617
  // verify required parameter 'chainName' is not null or undefined
617
618
  assertParamExists$1('listCollections', 'chainName', chainName);
618
619
  const localVarPath = `/v1/chains/{chain_name}/collections`
@@ -626,6 +627,9 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
626
627
  const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
627
628
  const localVarHeaderParameter = {};
628
629
  const localVarQueryParameter = {};
630
+ if (contractAddress) {
631
+ localVarQueryParameter['contract_address'] = contractAddress;
632
+ }
629
633
  if (fromUpdatedAt !== undefined) {
630
634
  localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
631
635
  fromUpdatedAt.toISOString() :
@@ -751,14 +755,15 @@ const CollectionsApiFp = function (configuration) {
751
755
  * List all collections
752
756
  * @summary List all collections
753
757
  * @param {string} chainName The name of chain
758
+ * @param {Array<string>} [contractAddress] List of contract addresses to filter by
754
759
  * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
755
760
  * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
756
761
  * @param {number} [pageSize] Maximum number of items to return
757
762
  * @param {*} [options] Override http request option.
758
763
  * @throws {RequiredError}
759
764
  */
760
- async listCollections(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
761
- const localVarAxiosArgs = await localVarAxiosParamCreator.listCollections(chainName, fromUpdatedAt, pageCursor, pageSize, options);
765
+ async listCollections(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options) {
766
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listCollections(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options);
762
767
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
763
768
  },
764
769
  /**
@@ -817,7 +822,7 @@ class CollectionsApi extends BaseAPI$1 {
817
822
  * @memberof CollectionsApi
818
823
  */
819
824
  listCollections(requestParameters, options) {
820
- return CollectionsApiFp(this.configuration).listCollections(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
825
+ return CollectionsApiFp(this.configuration).listCollections(requestParameters.chainName, requestParameters.contractAddress, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
821
826
  }
822
827
  /**
823
828
  * List collections by NFT owner account address
@@ -1599,7 +1604,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1599
1604
  * List all listings
1600
1605
  * @summary List all listings
1601
1606
  * @param {string} chainName
1602
- * @param {OrderStatus} [status] Order status to filter by
1607
+ * @param {OrderStatusName} [status] Order status to filter by
1603
1608
  * @param {string} [sellItemContractAddress] Sell item contract address to filter by
1604
1609
  * @param {string} [buyItemContractAddress] Buy item contract address to filter by
1605
1610
  * @param {string} [sellItemTokenId] Sell item token identifier to filter by
@@ -1778,7 +1783,7 @@ const OrdersApiFp = function (configuration) {
1778
1783
  * List all listings
1779
1784
  * @summary List all listings
1780
1785
  * @param {string} chainName
1781
- * @param {OrderStatus} [status] Order status to filter by
1786
+ * @param {OrderStatusName} [status] Order status to filter by
1782
1787
  * @param {string} [sellItemContractAddress] Sell item contract address to filter by
1783
1788
  * @param {string} [buyItemContractAddress] Buy item contract address to filter by
1784
1789
  * @param {string} [sellItemTokenId] Sell item token identifier to filter by
@@ -2067,7 +2072,7 @@ class MultiRollupApiClients {
2067
2072
  }
2068
2073
 
2069
2074
  // eslint-disable-next-line @typescript-eslint/naming-convention
2070
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.26.0' };
2075
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.27.1' };
2071
2076
  const createConfig = ({ basePath, headers, }) => {
2072
2077
  if (!basePath.trim()) {
2073
2078
  throw Error('basePath can not be empty');
@@ -2123,7 +2128,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
2123
2128
  chainID,
2124
2129
  coreContractAddress,
2125
2130
  registrationContractAddress,
2126
- sdkVersion: 'ts-immutable-sdk-0.26.0',
2131
+ sdkVersion: 'ts-immutable-sdk-0.27.1',
2127
2132
  });
2128
2133
  /**
2129
2134
  * Sets `sdkVersion` at the time of build
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@imtbl/sdk",
3
3
  "description": "Immutable Unified SDK",
4
- "version": "0.26.0",
4
+ "version": "0.27.1",
5
5
  "author": "Immutable",
6
6
  "browser": "./dist/index.browser.js",
7
7
  "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",