@eluvio/elv-client-js 3.2.13 → 3.2.14
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.
|
@@ -1637,6 +1637,60 @@ exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
|
|
|
1637
1637
|
}
|
|
1638
1638
|
}, _callee26, this);
|
|
1639
1639
|
}));
|
|
1640
|
+
/* PURCHASE / CLAIM */
|
|
1641
|
+
|
|
1642
|
+
/**
|
|
1643
|
+
* Claim the specified item from the specified marketplace
|
|
1644
|
+
*
|
|
1645
|
+
* Use the <a href="#.ClaimStatus">ClaimStatus</a> method to check minting status after claiming
|
|
1646
|
+
*
|
|
1647
|
+
* @methodGroup Purchase
|
|
1648
|
+
* @namedParams
|
|
1649
|
+
* @param {Object} marketplaceParams - Parameters of the marketplace
|
|
1650
|
+
* @param {string} sku - The SKU of the item to claime
|
|
1651
|
+
*/
|
|
1652
|
+
|
|
1653
|
+
exports.ClaimItem = /*#__PURE__*/function () {
|
|
1654
|
+
var _ref51 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(_ref50) {
|
|
1655
|
+
var marketplaceParams, sku, marketplaceInfo;
|
|
1656
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
1657
|
+
while (1) {
|
|
1658
|
+
switch (_context27.prev = _context27.next) {
|
|
1659
|
+
case 0:
|
|
1660
|
+
marketplaceParams = _ref50.marketplaceParams, sku = _ref50.sku;
|
|
1661
|
+
_context27.next = 3;
|
|
1662
|
+
return this.MarketplaceInfo({
|
|
1663
|
+
marketplaceParams: marketplaceParams
|
|
1664
|
+
});
|
|
1665
|
+
|
|
1666
|
+
case 3:
|
|
1667
|
+
marketplaceInfo = _context27.sent;
|
|
1668
|
+
_context27.next = 6;
|
|
1669
|
+
return this.client.authClient.MakeAuthServiceRequest({
|
|
1670
|
+
method: "POST",
|
|
1671
|
+
path: UrlJoin("as", "wlt", "act", marketplaceInfo.tenant_id),
|
|
1672
|
+
body: {
|
|
1673
|
+
op: "nft-claim",
|
|
1674
|
+
sid: marketplaceInfo.marketplaceId,
|
|
1675
|
+
sku: sku
|
|
1676
|
+
},
|
|
1677
|
+
headers: {
|
|
1678
|
+
Authorization: "Bearer ".concat(this.AuthToken())
|
|
1679
|
+
}
|
|
1680
|
+
});
|
|
1681
|
+
|
|
1682
|
+
case 6:
|
|
1683
|
+
case "end":
|
|
1684
|
+
return _context27.stop();
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
}, _callee27, this);
|
|
1688
|
+
}));
|
|
1689
|
+
|
|
1690
|
+
return function (_x14) {
|
|
1691
|
+
return _ref51.apply(this, arguments);
|
|
1692
|
+
};
|
|
1693
|
+
}();
|
|
1640
1694
|
/* MINTING STATUS */
|
|
1641
1695
|
|
|
1642
1696
|
/**
|
|
@@ -1650,62 +1704,63 @@ exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
|
|
|
1650
1704
|
* @returns {Promise<Object>} - The status of the purchase
|
|
1651
1705
|
*/
|
|
1652
1706
|
|
|
1707
|
+
|
|
1653
1708
|
exports.ListingPurchaseStatus = /*#__PURE__*/function () {
|
|
1654
|
-
var
|
|
1709
|
+
var _ref53 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(_ref52) {
|
|
1655
1710
|
var listingId, confirmationId, listingStatus, statuses;
|
|
1656
|
-
return _regeneratorRuntime.wrap(function
|
|
1711
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
1657
1712
|
while (1) {
|
|
1658
|
-
switch (
|
|
1713
|
+
switch (_context28.prev = _context28.next) {
|
|
1659
1714
|
case 0:
|
|
1660
|
-
listingId =
|
|
1661
|
-
|
|
1662
|
-
|
|
1715
|
+
listingId = _ref52.listingId, confirmationId = _ref52.confirmationId;
|
|
1716
|
+
_context28.prev = 1;
|
|
1717
|
+
_context28.next = 4;
|
|
1663
1718
|
return this.ListingStatus({
|
|
1664
1719
|
listingId: listingId
|
|
1665
1720
|
});
|
|
1666
1721
|
|
|
1667
1722
|
case 4:
|
|
1668
|
-
listingStatus =
|
|
1723
|
+
listingStatus = _context28.sent;
|
|
1669
1724
|
|
|
1670
1725
|
if (listingStatus) {
|
|
1671
|
-
|
|
1726
|
+
_context28.next = 7;
|
|
1672
1727
|
break;
|
|
1673
1728
|
}
|
|
1674
1729
|
|
|
1675
1730
|
throw Error("Unable to find info for listing " + listingId);
|
|
1676
1731
|
|
|
1677
1732
|
case 7:
|
|
1678
|
-
|
|
1733
|
+
_context28.next = 9;
|
|
1679
1734
|
return this.MintingStatus({
|
|
1680
1735
|
tenantId: listingStatus.tenant
|
|
1681
1736
|
});
|
|
1682
1737
|
|
|
1683
1738
|
case 9:
|
|
1684
|
-
statuses =
|
|
1685
|
-
return
|
|
1739
|
+
statuses = _context28.sent;
|
|
1740
|
+
return _context28.abrupt("return", statuses.find(function (status) {
|
|
1686
1741
|
return status.op === "nft-transfer" && status.extra && status.extra[0] === confirmationId;
|
|
1687
1742
|
}) || {
|
|
1688
1743
|
status: "none"
|
|
1689
1744
|
});
|
|
1690
1745
|
|
|
1691
1746
|
case 13:
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
this.Log(
|
|
1695
|
-
return
|
|
1747
|
+
_context28.prev = 13;
|
|
1748
|
+
_context28.t0 = _context28["catch"](1);
|
|
1749
|
+
this.Log(_context28.t0, true);
|
|
1750
|
+
return _context28.abrupt("return", {
|
|
1696
1751
|
status: "unknown"
|
|
1697
1752
|
});
|
|
1698
1753
|
|
|
1699
1754
|
case 17:
|
|
1700
1755
|
case "end":
|
|
1701
|
-
return
|
|
1756
|
+
return _context28.stop();
|
|
1702
1757
|
}
|
|
1703
1758
|
}
|
|
1704
|
-
},
|
|
1759
|
+
}, _callee28, this, [[1, 13]]);
|
|
1705
1760
|
}));
|
|
1706
1761
|
|
|
1707
|
-
return function (
|
|
1708
|
-
return
|
|
1762
|
+
return function (_x15) {
|
|
1763
|
+
return _ref53.apply(this, arguments);
|
|
1709
1764
|
};
|
|
1710
1765
|
}();
|
|
1711
1766
|
/**
|
|
@@ -1721,52 +1776,52 @@ exports.ListingPurchaseStatus = /*#__PURE__*/function () {
|
|
|
1721
1776
|
|
|
1722
1777
|
|
|
1723
1778
|
exports.PurchaseStatus = /*#__PURE__*/function () {
|
|
1724
|
-
var
|
|
1779
|
+
var _ref55 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(_ref54) {
|
|
1725
1780
|
var marketplaceParams, confirmationId, marketplaceInfo, statuses;
|
|
1726
|
-
return _regeneratorRuntime.wrap(function
|
|
1781
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
1727
1782
|
while (1) {
|
|
1728
|
-
switch (
|
|
1783
|
+
switch (_context29.prev = _context29.next) {
|
|
1729
1784
|
case 0:
|
|
1730
|
-
marketplaceParams =
|
|
1731
|
-
|
|
1732
|
-
|
|
1785
|
+
marketplaceParams = _ref54.marketplaceParams, confirmationId = _ref54.confirmationId;
|
|
1786
|
+
_context29.prev = 1;
|
|
1787
|
+
_context29.next = 4;
|
|
1733
1788
|
return this.MarketplaceInfo({
|
|
1734
1789
|
marketplaceParams: marketplaceParams
|
|
1735
1790
|
});
|
|
1736
1791
|
|
|
1737
1792
|
case 4:
|
|
1738
|
-
marketplaceInfo =
|
|
1739
|
-
|
|
1793
|
+
marketplaceInfo = _context29.sent;
|
|
1794
|
+
_context29.next = 7;
|
|
1740
1795
|
return this.MintingStatus({
|
|
1741
1796
|
tenantId: marketplaceInfo.tenant_id
|
|
1742
1797
|
});
|
|
1743
1798
|
|
|
1744
1799
|
case 7:
|
|
1745
|
-
statuses =
|
|
1746
|
-
return
|
|
1800
|
+
statuses = _context29.sent;
|
|
1801
|
+
return _context29.abrupt("return", statuses.find(function (status) {
|
|
1747
1802
|
return status.op === "nft-buy" && status.confirmationId === confirmationId;
|
|
1748
1803
|
}) || {
|
|
1749
1804
|
status: "none"
|
|
1750
1805
|
});
|
|
1751
1806
|
|
|
1752
1807
|
case 11:
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
this.Log(
|
|
1756
|
-
return
|
|
1808
|
+
_context29.prev = 11;
|
|
1809
|
+
_context29.t0 = _context29["catch"](1);
|
|
1810
|
+
this.Log(_context29.t0, true);
|
|
1811
|
+
return _context29.abrupt("return", {
|
|
1757
1812
|
status: "unknown"
|
|
1758
1813
|
});
|
|
1759
1814
|
|
|
1760
1815
|
case 15:
|
|
1761
1816
|
case "end":
|
|
1762
|
-
return
|
|
1817
|
+
return _context29.stop();
|
|
1763
1818
|
}
|
|
1764
1819
|
}
|
|
1765
|
-
},
|
|
1820
|
+
}, _callee29, this, [[1, 11]]);
|
|
1766
1821
|
}));
|
|
1767
1822
|
|
|
1768
|
-
return function (
|
|
1769
|
-
return
|
|
1823
|
+
return function (_x16) {
|
|
1824
|
+
return _ref55.apply(this, arguments);
|
|
1770
1825
|
};
|
|
1771
1826
|
}();
|
|
1772
1827
|
/**
|
|
@@ -1782,52 +1837,52 @@ exports.PurchaseStatus = /*#__PURE__*/function () {
|
|
|
1782
1837
|
|
|
1783
1838
|
|
|
1784
1839
|
exports.ClaimStatus = /*#__PURE__*/function () {
|
|
1785
|
-
var
|
|
1840
|
+
var _ref57 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(_ref56) {
|
|
1786
1841
|
var marketplaceParams, sku, marketplaceInfo, statuses;
|
|
1787
|
-
return _regeneratorRuntime.wrap(function
|
|
1842
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
1788
1843
|
while (1) {
|
|
1789
|
-
switch (
|
|
1844
|
+
switch (_context30.prev = _context30.next) {
|
|
1790
1845
|
case 0:
|
|
1791
|
-
marketplaceParams =
|
|
1792
|
-
|
|
1793
|
-
|
|
1846
|
+
marketplaceParams = _ref56.marketplaceParams, sku = _ref56.sku;
|
|
1847
|
+
_context30.prev = 1;
|
|
1848
|
+
_context30.next = 4;
|
|
1794
1849
|
return this.MarketplaceInfo({
|
|
1795
1850
|
marketplaceParams: marketplaceParams
|
|
1796
1851
|
});
|
|
1797
1852
|
|
|
1798
1853
|
case 4:
|
|
1799
|
-
marketplaceInfo =
|
|
1800
|
-
|
|
1854
|
+
marketplaceInfo = _context30.sent;
|
|
1855
|
+
_context30.next = 7;
|
|
1801
1856
|
return this.MintingStatus({
|
|
1802
1857
|
tenantId: marketplaceInfo.tenantId
|
|
1803
1858
|
});
|
|
1804
1859
|
|
|
1805
1860
|
case 7:
|
|
1806
|
-
statuses =
|
|
1807
|
-
return
|
|
1861
|
+
statuses = _context30.sent;
|
|
1862
|
+
return _context30.abrupt("return", statuses.find(function (status) {
|
|
1808
1863
|
return status.op === "nft-claim" && status.marketplaceId === marketplaceInfo.marketplaceId && status.confirmationId === sku;
|
|
1809
1864
|
}) || {
|
|
1810
1865
|
status: "none"
|
|
1811
1866
|
});
|
|
1812
1867
|
|
|
1813
1868
|
case 11:
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
this.Log(
|
|
1817
|
-
return
|
|
1869
|
+
_context30.prev = 11;
|
|
1870
|
+
_context30.t0 = _context30["catch"](1);
|
|
1871
|
+
this.Log(_context30.t0, true);
|
|
1872
|
+
return _context30.abrupt("return", {
|
|
1818
1873
|
status: "unknown"
|
|
1819
1874
|
});
|
|
1820
1875
|
|
|
1821
1876
|
case 15:
|
|
1822
1877
|
case "end":
|
|
1823
|
-
return
|
|
1878
|
+
return _context30.stop();
|
|
1824
1879
|
}
|
|
1825
1880
|
}
|
|
1826
|
-
},
|
|
1881
|
+
}, _callee30, this, [[1, 11]]);
|
|
1827
1882
|
}));
|
|
1828
1883
|
|
|
1829
|
-
return function (
|
|
1830
|
-
return
|
|
1884
|
+
return function (_x17) {
|
|
1885
|
+
return _ref57.apply(this, arguments);
|
|
1831
1886
|
};
|
|
1832
1887
|
}();
|
|
1833
1888
|
/**
|
|
@@ -1843,52 +1898,52 @@ exports.ClaimStatus = /*#__PURE__*/function () {
|
|
|
1843
1898
|
|
|
1844
1899
|
|
|
1845
1900
|
exports.PackOpenStatus = /*#__PURE__*/function () {
|
|
1846
|
-
var
|
|
1901
|
+
var _ref59 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(_ref58) {
|
|
1847
1902
|
var contractAddress, tokenId, tenantConfig, statuses;
|
|
1848
|
-
return _regeneratorRuntime.wrap(function
|
|
1903
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
1849
1904
|
while (1) {
|
|
1850
|
-
switch (
|
|
1905
|
+
switch (_context31.prev = _context31.next) {
|
|
1851
1906
|
case 0:
|
|
1852
|
-
contractAddress =
|
|
1853
|
-
|
|
1854
|
-
|
|
1907
|
+
contractAddress = _ref58.contractAddress, tokenId = _ref58.tokenId;
|
|
1908
|
+
_context31.prev = 1;
|
|
1909
|
+
_context31.next = 4;
|
|
1855
1910
|
return this.TenantConfiguration({
|
|
1856
1911
|
contractAddress: contractAddress
|
|
1857
1912
|
});
|
|
1858
1913
|
|
|
1859
1914
|
case 4:
|
|
1860
|
-
tenantConfig =
|
|
1861
|
-
|
|
1915
|
+
tenantConfig = _context31.sent;
|
|
1916
|
+
_context31.next = 7;
|
|
1862
1917
|
return this.MintingStatus({
|
|
1863
1918
|
tenantId: tenantConfig.tenant
|
|
1864
1919
|
});
|
|
1865
1920
|
|
|
1866
1921
|
case 7:
|
|
1867
|
-
statuses =
|
|
1868
|
-
return
|
|
1922
|
+
statuses = _context31.sent;
|
|
1923
|
+
return _context31.abrupt("return", statuses.find(function (status) {
|
|
1869
1924
|
return status.op === "nft-open" && Utils.EqualAddress(contractAddress, status.address) && status.tokenId === tokenId;
|
|
1870
1925
|
}) || {
|
|
1871
1926
|
status: "none"
|
|
1872
1927
|
});
|
|
1873
1928
|
|
|
1874
1929
|
case 11:
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
this.Log(
|
|
1878
|
-
return
|
|
1930
|
+
_context31.prev = 11;
|
|
1931
|
+
_context31.t0 = _context31["catch"](1);
|
|
1932
|
+
this.Log(_context31.t0, true);
|
|
1933
|
+
return _context31.abrupt("return", {
|
|
1879
1934
|
status: "unknown"
|
|
1880
1935
|
});
|
|
1881
1936
|
|
|
1882
1937
|
case 15:
|
|
1883
1938
|
case "end":
|
|
1884
|
-
return
|
|
1939
|
+
return _context31.stop();
|
|
1885
1940
|
}
|
|
1886
1941
|
}
|
|
1887
|
-
},
|
|
1942
|
+
}, _callee31, this, [[1, 11]]);
|
|
1888
1943
|
}));
|
|
1889
1944
|
|
|
1890
|
-
return function (
|
|
1891
|
-
return
|
|
1945
|
+
return function (_x18) {
|
|
1946
|
+
return _ref59.apply(this, arguments);
|
|
1892
1947
|
};
|
|
1893
1948
|
}();
|
|
1894
1949
|
/**
|
|
@@ -1904,60 +1959,60 @@ exports.PackOpenStatus = /*#__PURE__*/function () {
|
|
|
1904
1959
|
|
|
1905
1960
|
|
|
1906
1961
|
exports.CollectionRedemptionStatus = /*#__PURE__*/function () {
|
|
1907
|
-
var
|
|
1962
|
+
var _ref61 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(_ref60) {
|
|
1908
1963
|
var marketplaceParams, confirmationId, statuses;
|
|
1909
|
-
return _regeneratorRuntime.wrap(function
|
|
1964
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
1910
1965
|
while (1) {
|
|
1911
|
-
switch (
|
|
1966
|
+
switch (_context32.prev = _context32.next) {
|
|
1912
1967
|
case 0:
|
|
1913
|
-
marketplaceParams =
|
|
1914
|
-
|
|
1915
|
-
|
|
1968
|
+
marketplaceParams = _ref60.marketplaceParams, confirmationId = _ref60.confirmationId;
|
|
1969
|
+
_context32.prev = 1;
|
|
1970
|
+
_context32.next = 4;
|
|
1916
1971
|
return this.MintingStatus({
|
|
1917
1972
|
marketplaceParams: marketplaceParams
|
|
1918
1973
|
});
|
|
1919
1974
|
|
|
1920
1975
|
case 4:
|
|
1921
|
-
statuses =
|
|
1922
|
-
return
|
|
1976
|
+
statuses = _context32.sent;
|
|
1977
|
+
return _context32.abrupt("return", statuses.find(function (status) {
|
|
1923
1978
|
return status.op === "nft-redeem" && status.confirmationId === confirmationId;
|
|
1924
1979
|
}) || {
|
|
1925
1980
|
status: "none"
|
|
1926
1981
|
});
|
|
1927
1982
|
|
|
1928
1983
|
case 8:
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
this.Log(
|
|
1932
|
-
return
|
|
1984
|
+
_context32.prev = 8;
|
|
1985
|
+
_context32.t0 = _context32["catch"](1);
|
|
1986
|
+
this.Log(_context32.t0, true);
|
|
1987
|
+
return _context32.abrupt("return", {
|
|
1933
1988
|
status: "unknown"
|
|
1934
1989
|
});
|
|
1935
1990
|
|
|
1936
1991
|
case 12:
|
|
1937
1992
|
case "end":
|
|
1938
|
-
return
|
|
1993
|
+
return _context32.stop();
|
|
1939
1994
|
}
|
|
1940
1995
|
}
|
|
1941
|
-
},
|
|
1996
|
+
}, _callee32, this, [[1, 8]]);
|
|
1942
1997
|
}));
|
|
1943
1998
|
|
|
1944
|
-
return function (
|
|
1945
|
-
return
|
|
1999
|
+
return function (_x19) {
|
|
2000
|
+
return _ref61.apply(this, arguments);
|
|
1946
2001
|
};
|
|
1947
2002
|
}();
|
|
1948
2003
|
/* EVENTS */
|
|
1949
2004
|
|
|
1950
2005
|
|
|
1951
2006
|
exports.LoadDrop = /*#__PURE__*/function () {
|
|
1952
|
-
var
|
|
2007
|
+
var _ref63 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(_ref62) {
|
|
1953
2008
|
var _this2 = this;
|
|
1954
2009
|
|
|
1955
2010
|
var tenantSlug, eventSlug, dropId, mainSiteHash, event, eventId;
|
|
1956
|
-
return _regeneratorRuntime.wrap(function
|
|
2011
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
1957
2012
|
while (1) {
|
|
1958
|
-
switch (
|
|
2013
|
+
switch (_context33.prev = _context33.next) {
|
|
1959
2014
|
case 0:
|
|
1960
|
-
tenantSlug =
|
|
2015
|
+
tenantSlug = _ref62.tenantSlug, eventSlug = _ref62.eventSlug, dropId = _ref62.dropId;
|
|
1961
2016
|
|
|
1962
2017
|
if (!this.drops) {
|
|
1963
2018
|
this.drops = {};
|
|
@@ -1972,18 +2027,18 @@ exports.LoadDrop = /*#__PURE__*/function () {
|
|
|
1972
2027
|
}
|
|
1973
2028
|
|
|
1974
2029
|
if (this.drops[tenantSlug][eventSlug][dropId]) {
|
|
1975
|
-
|
|
2030
|
+
_context33.next = 16;
|
|
1976
2031
|
break;
|
|
1977
2032
|
}
|
|
1978
2033
|
|
|
1979
|
-
|
|
2034
|
+
_context33.next = 7;
|
|
1980
2035
|
return this.client.LatestVersionHash({
|
|
1981
2036
|
objectId: this.mainSiteId
|
|
1982
2037
|
});
|
|
1983
2038
|
|
|
1984
2039
|
case 7:
|
|
1985
|
-
mainSiteHash =
|
|
1986
|
-
|
|
2040
|
+
mainSiteHash = _context33.sent;
|
|
2041
|
+
_context33.next = 10;
|
|
1987
2042
|
return this.client.ContentObjectMetadata({
|
|
1988
2043
|
versionHash: mainSiteHash,
|
|
1989
2044
|
metadataSubtree: UrlJoin("public", "asset_metadata", "tenants", tenantSlug, "sites", eventSlug, "info"),
|
|
@@ -1996,17 +2051,17 @@ exports.LoadDrop = /*#__PURE__*/function () {
|
|
|
1996
2051
|
});
|
|
1997
2052
|
|
|
1998
2053
|
case 10:
|
|
1999
|
-
|
|
2054
|
+
_context33.t0 = _context33.sent;
|
|
2000
2055
|
|
|
2001
|
-
if (
|
|
2002
|
-
|
|
2056
|
+
if (_context33.t0) {
|
|
2057
|
+
_context33.next = 13;
|
|
2003
2058
|
break;
|
|
2004
2059
|
}
|
|
2005
2060
|
|
|
2006
|
-
|
|
2061
|
+
_context33.t0 = [];
|
|
2007
2062
|
|
|
2008
2063
|
case 13:
|
|
2009
|
-
event =
|
|
2064
|
+
event = _context33.t0;
|
|
2010
2065
|
eventId = Utils.DecodeVersionHash(event["."].source).objectId;
|
|
2011
2066
|
event.drops.forEach(function (drop) {
|
|
2012
2067
|
drop = _objectSpread(_objectSpread({}, drop), {}, {
|
|
@@ -2017,37 +2072,37 @@ exports.LoadDrop = /*#__PURE__*/function () {
|
|
|
2017
2072
|
});
|
|
2018
2073
|
|
|
2019
2074
|
case 16:
|
|
2020
|
-
return
|
|
2075
|
+
return _context33.abrupt("return", this.drops[dropId]);
|
|
2021
2076
|
|
|
2022
2077
|
case 17:
|
|
2023
2078
|
case "end":
|
|
2024
|
-
return
|
|
2079
|
+
return _context33.stop();
|
|
2025
2080
|
}
|
|
2026
2081
|
}
|
|
2027
|
-
},
|
|
2082
|
+
}, _callee33, this);
|
|
2028
2083
|
}));
|
|
2029
2084
|
|
|
2030
|
-
return function (
|
|
2031
|
-
return
|
|
2085
|
+
return function (_x20) {
|
|
2086
|
+
return _ref63.apply(this, arguments);
|
|
2032
2087
|
};
|
|
2033
2088
|
}();
|
|
2034
2089
|
|
|
2035
2090
|
exports.SubmitDropVote = /*#__PURE__*/function () {
|
|
2036
|
-
var
|
|
2091
|
+
var _ref65 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(_ref64) {
|
|
2037
2092
|
var marketplaceParams, eventId, dropId, sku, marketplaceInfo;
|
|
2038
|
-
return _regeneratorRuntime.wrap(function
|
|
2093
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
2039
2094
|
while (1) {
|
|
2040
|
-
switch (
|
|
2095
|
+
switch (_context34.prev = _context34.next) {
|
|
2041
2096
|
case 0:
|
|
2042
|
-
marketplaceParams =
|
|
2043
|
-
|
|
2097
|
+
marketplaceParams = _ref64.marketplaceParams, eventId = _ref64.eventId, dropId = _ref64.dropId, sku = _ref64.sku;
|
|
2098
|
+
_context34.next = 3;
|
|
2044
2099
|
return this.MarketplaceInfo({
|
|
2045
2100
|
marketplaceParams: marketplaceParams
|
|
2046
2101
|
});
|
|
2047
2102
|
|
|
2048
2103
|
case 3:
|
|
2049
|
-
marketplaceInfo =
|
|
2050
|
-
|
|
2104
|
+
marketplaceInfo = _context34.sent;
|
|
2105
|
+
_context34.next = 6;
|
|
2051
2106
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
2052
2107
|
path: UrlJoin("as", "wlt", "act", marketplaceInfo.tenant_id),
|
|
2053
2108
|
method: "POST",
|
|
@@ -2064,27 +2119,27 @@ exports.SubmitDropVote = /*#__PURE__*/function () {
|
|
|
2064
2119
|
|
|
2065
2120
|
case 6:
|
|
2066
2121
|
case "end":
|
|
2067
|
-
return
|
|
2122
|
+
return _context34.stop();
|
|
2068
2123
|
}
|
|
2069
2124
|
}
|
|
2070
|
-
},
|
|
2125
|
+
}, _callee34, this);
|
|
2071
2126
|
}));
|
|
2072
2127
|
|
|
2073
|
-
return function (
|
|
2074
|
-
return
|
|
2128
|
+
return function (_x21) {
|
|
2129
|
+
return _ref65.apply(this, arguments);
|
|
2075
2130
|
};
|
|
2076
2131
|
}();
|
|
2077
2132
|
|
|
2078
2133
|
exports.DropStatus = /*#__PURE__*/function () {
|
|
2079
|
-
var
|
|
2134
|
+
var _ref67 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(_ref66) {
|
|
2080
2135
|
var marketplace, eventId, dropId, response;
|
|
2081
|
-
return _regeneratorRuntime.wrap(function
|
|
2136
|
+
return _regeneratorRuntime.wrap(function _callee35$(_context35) {
|
|
2082
2137
|
while (1) {
|
|
2083
|
-
switch (
|
|
2138
|
+
switch (_context35.prev = _context35.next) {
|
|
2084
2139
|
case 0:
|
|
2085
|
-
marketplace =
|
|
2086
|
-
|
|
2087
|
-
|
|
2140
|
+
marketplace = _ref66.marketplace, eventId = _ref66.eventId, dropId = _ref66.dropId;
|
|
2141
|
+
_context35.prev = 1;
|
|
2142
|
+
_context35.next = 4;
|
|
2088
2143
|
return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
|
|
2089
2144
|
path: UrlJoin("as", "wlt", "act", marketplace.tenant_id, eventId, dropId),
|
|
2090
2145
|
method: "GET",
|
|
@@ -2094,28 +2149,28 @@ exports.DropStatus = /*#__PURE__*/function () {
|
|
|
2094
2149
|
}));
|
|
2095
2150
|
|
|
2096
2151
|
case 4:
|
|
2097
|
-
response =
|
|
2098
|
-
return
|
|
2152
|
+
response = _context35.sent;
|
|
2153
|
+
return _context35.abrupt("return", response.sort(function (a, b) {
|
|
2099
2154
|
return a.ts > b.ts ? 1 : -1;
|
|
2100
2155
|
})[0] || {
|
|
2101
2156
|
status: "none"
|
|
2102
2157
|
});
|
|
2103
2158
|
|
|
2104
2159
|
case 8:
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
this.Log(
|
|
2108
|
-
return
|
|
2160
|
+
_context35.prev = 8;
|
|
2161
|
+
_context35.t0 = _context35["catch"](1);
|
|
2162
|
+
this.Log(_context35.t0, true);
|
|
2163
|
+
return _context35.abrupt("return", "");
|
|
2109
2164
|
|
|
2110
2165
|
case 12:
|
|
2111
2166
|
case "end":
|
|
2112
|
-
return
|
|
2167
|
+
return _context35.stop();
|
|
2113
2168
|
}
|
|
2114
2169
|
}
|
|
2115
|
-
},
|
|
2170
|
+
}, _callee35, this, [[1, 8]]);
|
|
2116
2171
|
}));
|
|
2117
2172
|
|
|
2118
|
-
return function (
|
|
2119
|
-
return
|
|
2173
|
+
return function (_x22) {
|
|
2174
|
+
return _ref67.apply(this, arguments);
|
|
2120
2175
|
};
|
|
2121
2176
|
}();
|
|
@@ -1434,26 +1434,26 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
1434
1434
|
|
|
1435
1435
|
if (priceRange) {
|
|
1436
1436
|
if (priceRange.min) {
|
|
1437
|
-
filters.push("price:
|
|
1437
|
+
filters.push("price:ge:".concat(parseFloat(priceRange.min)));
|
|
1438
1438
|
}
|
|
1439
1439
|
|
|
1440
1440
|
if (priceRange.max) {
|
|
1441
|
-
filters.push("price:
|
|
1441
|
+
filters.push("price:le:".concat(parseFloat(priceRange.max)));
|
|
1442
1442
|
}
|
|
1443
1443
|
}
|
|
1444
1444
|
|
|
1445
1445
|
if (tokenIdRange) {
|
|
1446
1446
|
if (tokenIdRange.min) {
|
|
1447
|
-
filters.push("info/token_id:
|
|
1447
|
+
filters.push("info/token_id:ge:".concat(parseInt(tokenIdRange.min)));
|
|
1448
1448
|
}
|
|
1449
1449
|
|
|
1450
1450
|
if (tokenIdRange.max) {
|
|
1451
|
-
filters.push("info/token_id:
|
|
1451
|
+
filters.push("info/token_id:le:".concat(parseInt(tokenIdRange.max)));
|
|
1452
1452
|
}
|
|
1453
1453
|
}
|
|
1454
1454
|
|
|
1455
1455
|
if (capLimit) {
|
|
1456
|
-
filters.push("info/cap:
|
|
1456
|
+
filters.push("info/cap:le:".concat(parseInt(capLimit)));
|
|
1457
1457
|
}
|
|
1458
1458
|
|
|
1459
1459
|
_context16.t0 = mode;
|