@eluvio/elv-client-js 4.0.65 → 4.0.67

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.
@@ -95,10 +95,14 @@ var FormatNFTDetails = function FormatNFTDetails(entry) {
95
95
  } else {
96
96
  details.Offers = info.offers || [];
97
97
  }
98
- return {
98
+ var result = {
99
99
  metadata: metadata,
100
100
  details: details
101
101
  };
102
+ if (entry.nft_template) {
103
+ result.nft_template = entry.nft_template;
104
+ }
105
+ return result;
102
106
  };
103
107
  exports.FormatNFTDetails = FormatNFTDetails;
104
108
  var FormatNFTMetadata = function FormatNFTMetadata(walletClient, nft) {
@@ -1412,6 +1412,7 @@ var ElvWalletClient = /*#__PURE__*/function () {
1412
1412
  _ref21,
1413
1413
  contents,
1414
1414
  paging,
1415
+ modesToFormat,
1415
1416
  _args20 = arguments;
1416
1417
  return _regeneratorRuntime.wrap(function _callee20$(_context20) {
1417
1418
  while (1) switch (_context20.prev = _context20.next) {
@@ -1632,6 +1633,7 @@ var ElvWalletClient = /*#__PURE__*/function () {
1632
1633
  _ref21 = _context20.t1;
1633
1634
  contents = _ref21.contents;
1634
1635
  paging = _ref21.paging;
1636
+ modesToFormat = ["owned", "listings", "owned-full-meta"];
1635
1637
  return _context20.abrupt("return", {
1636
1638
  paging: {
1637
1639
  start: params.start,
@@ -1640,14 +1642,14 @@ var ElvWalletClient = /*#__PURE__*/function () {
1640
1642
  more: paging.total > start + limit
1641
1643
  },
1642
1644
  results: (contents || []).map(function (item) {
1643
- return ["owned", "listings"].includes(mode) ? FormatNFT(_this6, item) : item;
1645
+ return modesToFormat.includes(mode) ? FormatNFT(_this6, item) : item;
1644
1646
  })
1645
1647
  });
1646
- case 71:
1647
- _context20.prev = 71;
1648
+ case 72:
1649
+ _context20.prev = 72;
1648
1650
  _context20.t4 = _context20["catch"](14);
1649
1651
  if (!(_context20.t4.status && _context20.t4.status.toString() === "404")) {
1650
- _context20.next = 75;
1652
+ _context20.next = 76;
1651
1653
  break;
1652
1654
  }
1653
1655
  return _context20.abrupt("return", {
@@ -1659,13 +1661,13 @@ var ElvWalletClient = /*#__PURE__*/function () {
1659
1661
  },
1660
1662
  results: []
1661
1663
  });
1662
- case 75:
1663
- throw _context20.t4;
1664
1664
  case 76:
1665
+ throw _context20.t4;
1666
+ case 77:
1665
1667
  case "end":
1666
1668
  return _context20.stop();
1667
1669
  }
1668
- }, _callee20, this, [[14, 71]]);
1670
+ }, _callee20, this, [[14, 72]]);
1669
1671
  }));
1670
1672
  function FilteredQuery() {
1671
1673
  return _FilteredQuery.apply(this, arguments);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eluvio/elv-client-js",
3
- "version": "4.0.65",
3
+ "version": "4.0.67",
4
4
  "description": "Javascript client for the Eluvio Content Fabric",
5
5
  "main": "src/index.js",
6
6
  "author": "Kevin Talmadge",
@@ -354,6 +354,7 @@ class FrameClient {
354
354
  "ContentTypes",
355
355
  "ContractAbi",
356
356
  "ContractEvents",
357
+ "ContractInfo",
357
358
  "ContractMetadata",
358
359
  "ContractName",
359
360
  "CopyContentObject",
@@ -51,6 +51,20 @@ exports.ContractAbi = async function({contractAddress, id}) {
51
51
  return contractInfo.abi;
52
52
  };
53
53
 
54
+ /**
55
+ * Retrieve the ABI, access type, and whether V3 is used for a given contract via its address or a Fabric ID.
56
+ *
57
+ * @methodGroup Contracts
58
+ * @namedParams
59
+ * @param {string=} id - The Fabric ID of the contract
60
+ * @param {string=} address - The address of the contract
61
+ *
62
+ * @return {Promise<Object>} - The ABI, access type, and isV3 for the given contract
63
+ */
64
+ exports.ContractInfo = async function({id, address}) {
65
+ return this.authClient.ContractInfo({id, address});
66
+ };
67
+
54
68
  /**
55
69
  * Format the arguments to be used for the specified method of the contract
56
70
  *