@imtbl/sdk 0.16.0-alpha.1 → 0.17.0

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/passport.js CHANGED
@@ -627,6 +627,47 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
627
627
  options: localVarRequestOptions,
628
628
  };
629
629
  },
630
+ /**
631
+ * List collections by NFT owner account address
632
+ * @summary List collections by NFT owner
633
+ * @param {string} accountAddress Account address
634
+ * @param {string} chainName The name of chain
635
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
636
+ * @param {number} [pageSize] Maximum number of items to return
637
+ * @param {*} [options] Override http request option.
638
+ * @throws {RequiredError}
639
+ */
640
+ listCollectionsByNFTOwner: async (accountAddress, chainName, pageCursor, pageSize, options = {}) => {
641
+ // verify required parameter 'accountAddress' is not null or undefined
642
+ assertParamExists$1('listCollectionsByNFTOwner', 'accountAddress', accountAddress);
643
+ // verify required parameter 'chainName' is not null or undefined
644
+ assertParamExists$1('listCollectionsByNFTOwner', 'chainName', chainName);
645
+ const localVarPath = `/v1/chains/{chain_name}/accounts/{account_address}/collections`
646
+ .replace(`{${"account_address"}}`, encodeURIComponent(String(accountAddress)))
647
+ .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
648
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
649
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
650
+ let baseOptions;
651
+ if (configuration) {
652
+ baseOptions = configuration.baseOptions;
653
+ }
654
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
655
+ const localVarHeaderParameter = {};
656
+ const localVarQueryParameter = {};
657
+ if (pageCursor !== undefined) {
658
+ localVarQueryParameter['page_cursor'] = pageCursor;
659
+ }
660
+ if (pageSize !== undefined) {
661
+ localVarQueryParameter['page_size'] = pageSize;
662
+ }
663
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
664
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
665
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
666
+ return {
667
+ url: toPathString$1(localVarUrlObj),
668
+ options: localVarRequestOptions,
669
+ };
670
+ },
630
671
  };
631
672
  };
632
673
  /**
@@ -661,6 +702,20 @@ const CollectionsApiFp = function (configuration) {
661
702
  const localVarAxiosArgs = await localVarAxiosParamCreator.listCollections(chainName, pageCursor, pageSize, options);
662
703
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
663
704
  },
705
+ /**
706
+ * List collections by NFT owner account address
707
+ * @summary List collections by NFT owner
708
+ * @param {string} accountAddress Account address
709
+ * @param {string} chainName The name of chain
710
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
711
+ * @param {number} [pageSize] Maximum number of items to return
712
+ * @param {*} [options] Override http request option.
713
+ * @throws {RequiredError}
714
+ */
715
+ async listCollectionsByNFTOwner(accountAddress, chainName, pageCursor, pageSize, options) {
716
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listCollectionsByNFTOwner(accountAddress, chainName, pageCursor, pageSize, options);
717
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
718
+ },
664
719
  };
665
720
  };
666
721
  /**
@@ -692,6 +747,17 @@ class CollectionsApi extends BaseAPI$1 {
692
747
  listCollections(requestParameters, options) {
693
748
  return CollectionsApiFp(this.configuration).listCollections(requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
694
749
  }
750
+ /**
751
+ * List collections by NFT owner account address
752
+ * @summary List collections by NFT owner
753
+ * @param {CollectionsApiListCollectionsByNFTOwnerRequest} requestParameters Request parameters.
754
+ * @param {*} [options] Override http request option.
755
+ * @throws {RequiredError}
756
+ * @memberof CollectionsApi
757
+ */
758
+ listCollectionsByNFTOwner(requestParameters, options) {
759
+ return CollectionsApiFp(this.configuration).listCollectionsByNFTOwner(requestParameters.accountAddress, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
760
+ }
695
761
  }
696
762
 
697
763
  /* tslint:disable */
@@ -1259,6 +1325,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1259
1325
  * List all trades
1260
1326
  * @summary List all trades
1261
1327
  * @param {string} chainName
1328
+ * @param {string} [accountAddress]
1262
1329
  * @param {number} [pageSize] Maximum number of trades to return per page
1263
1330
  * @param {'created_at'} [sortBy] Trade field to sort by
1264
1331
  * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
@@ -1266,7 +1333,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1266
1333
  * @param {*} [options] Override http request option.
1267
1334
  * @throws {RequiredError}
1268
1335
  */
1269
- listTrades: async (chainName, pageSize, sortBy, sortDirection, pageCursor, options = {}) => {
1336
+ listTrades: async (chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, options = {}) => {
1270
1337
  // verify required parameter 'chainName' is not null or undefined
1271
1338
  assertParamExists$1('listTrades', 'chainName', chainName);
1272
1339
  const localVarPath = `/v1/chains/{chain_name}/trades`
@@ -1280,6 +1347,9 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1280
1347
  const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1281
1348
  const localVarHeaderParameter = {};
1282
1349
  const localVarQueryParameter = {};
1350
+ if (accountAddress !== undefined) {
1351
+ localVarQueryParameter['account_address'] = accountAddress;
1352
+ }
1283
1353
  if (pageSize !== undefined) {
1284
1354
  localVarQueryParameter['page_size'] = pageSize;
1285
1355
  }
@@ -1380,6 +1450,7 @@ const OrdersApiFp = function (configuration) {
1380
1450
  * List all trades
1381
1451
  * @summary List all trades
1382
1452
  * @param {string} chainName
1453
+ * @param {string} [accountAddress]
1383
1454
  * @param {number} [pageSize] Maximum number of trades to return per page
1384
1455
  * @param {'created_at'} [sortBy] Trade field to sort by
1385
1456
  * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
@@ -1387,8 +1458,8 @@ const OrdersApiFp = function (configuration) {
1387
1458
  * @param {*} [options] Override http request option.
1388
1459
  * @throws {RequiredError}
1389
1460
  */
1390
- async listTrades(chainName, pageSize, sortBy, sortDirection, pageCursor, options) {
1391
- const localVarAxiosArgs = await localVarAxiosParamCreator.listTrades(chainName, pageSize, sortBy, sortDirection, pageCursor, options);
1461
+ async listTrades(chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, options) {
1462
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listTrades(chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, options);
1392
1463
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1393
1464
  },
1394
1465
  };
@@ -1464,7 +1535,7 @@ class OrdersApi extends BaseAPI$1 {
1464
1535
  * @memberof OrdersApi
1465
1536
  */
1466
1537
  listTrades(requestParameters, options) {
1467
- return OrdersApiFp(this.configuration).listTrades(requestParameters.chainName, requestParameters.pageSize, requestParameters.sortBy, requestParameters.sortDirection, requestParameters.pageCursor, options).then((request) => request(this.axios, this.basePath));
1538
+ return OrdersApiFp(this.configuration).listTrades(requestParameters.chainName, requestParameters.accountAddress, requestParameters.pageSize, requestParameters.sortBy, requestParameters.sortDirection, requestParameters.pageCursor, options).then((request) => request(this.axios, this.basePath));
1468
1539
  }
1469
1540
  }
1470
1541
 
@@ -1638,7 +1709,7 @@ class MultiRollupApiClients {
1638
1709
  }
1639
1710
 
1640
1711
  // eslint-disable-next-line @typescript-eslint/naming-convention
1641
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.16.0-alpha.1' };
1712
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.0.0' };
1642
1713
  const createConfig = ({ basePath, headers, }) => {
1643
1714
  if (!basePath.trim()) {
1644
1715
  throw Error('basePath can not be empty');
@@ -1694,7 +1765,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
1694
1765
  chainID,
1695
1766
  coreContractAddress,
1696
1767
  registrationContractAddress,
1697
- sdkVersion: 'ts-immutable-sdk-0.16.0-alpha.1',
1768
+ sdkVersion: 'ts-immutable-sdk-0.0.0',
1698
1769
  });
1699
1770
  /**
1700
1771
  * Sets `sdkVersion` at the time of build
package/package.json CHANGED
@@ -1,14 +1,17 @@
1
1
  {
2
2
  "name": "@imtbl/sdk",
3
3
  "description": "Immutable Unified SDK",
4
- "version": "0.16.0-alpha.1",
4
+ "version": "0.17.0",
5
5
  "author": "Immutable",
6
6
  "browser": "./dist/index.browser.js",
7
7
  "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",
8
8
  "dependencies": {
9
9
  "@0xsequence/abi": "^0.43.34",
10
10
  "@0xsequence/config": "^0.43.34",
11
+ "@ethersproject/abi": "^5.7.0",
11
12
  "@ethersproject/abstract-signer": "^5.7.0",
13
+ "@ethersproject/bignumber": "^5.7.0",
14
+ "@ethersproject/contracts": "^5.7.0",
12
15
  "@ethersproject/providers": "^5.7.2",
13
16
  "@ethersproject/wallet": "^5.7.0",
14
17
  "@imtbl/core-sdk": "^2.0.2",
@@ -24,7 +27,8 @@
24
27
  "enc-utils": "^3.0.0",
25
28
  "ethers": "^5.7.2",
26
29
  "magic-sdk": "^13.3.1",
27
- "oidc-client-ts": "^2.2.1"
30
+ "oidc-client-ts": "^2.2.1",
31
+ "typechain": "^8.1.1"
28
32
  },
29
33
  "devDependencies": {
30
34
  "@imtbl/blockchain-data": "0.0.0",