@eluvio/elv-client-js 3.2.22 → 3.2.23
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/ElvClient-min.js +1 -1
- package/dist/ElvClient-node-min.js +1 -1
- package/dist/ElvWalletClient-min.js +3 -3
- package/dist/ElvWalletClient-node-min.js +2 -2
- package/dist/src/ElvClient.js +282 -249
- package/dist/src/walletClient/ClientMethods.js +266 -188
- package/dist/src/walletClient/Configuration.js +1 -1
- package/dist/src/walletClient/Utils.js +1 -0
- package/dist/src/walletClient/index.js +144 -40
- package/package.json +1 -1
- package/src/walletClient/ClientMethods.js +26 -0
- package/package-lock.json +0 -42401
|
@@ -1535,6 +1535,18 @@ exports.SalesStats = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRu
|
|
|
1535
1535
|
}
|
|
1536
1536
|
}, _callee24, this);
|
|
1537
1537
|
}));
|
|
1538
|
+
/**
|
|
1539
|
+
* Get the leaderboard rankings for the specified marketplace. If user address is specified, will return the ranking for the specified user (if present)
|
|
1540
|
+
*
|
|
1541
|
+
* @methodGroup Leaderboard
|
|
1542
|
+
* @namedParams
|
|
1543
|
+
* @param {Object=} marketplaceParams - Filter results by marketplace
|
|
1544
|
+
* @param {string=} userAddress - Retrieve the ranking for a specific user
|
|
1545
|
+
* @param {integer=} start=0 - PAGINATION: Index from which the results should start
|
|
1546
|
+
* @param {integer=} limit=50 - PAGINATION: Maximum number of results to return
|
|
1547
|
+
*
|
|
1548
|
+
* @returns {Promise<Array|Object>} - Returns a list of leaderboard rankings or, if userAddress is specified, ranking for that user.
|
|
1549
|
+
*/
|
|
1538
1550
|
|
|
1539
1551
|
exports.Leaderboard = /*#__PURE__*/function () {
|
|
1540
1552
|
var _ref47 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(_ref46) {
|
|
@@ -1747,7 +1759,7 @@ exports.RemoveListing = /*#__PURE__*/function () {
|
|
|
1747
1759
|
};
|
|
1748
1760
|
}();
|
|
1749
1761
|
/**
|
|
1750
|
-
* Retrieve all valid names for filtering
|
|
1762
|
+
* Retrieve all valid names for filtering listing sales names. Full item names are required for filtering sales results by name.
|
|
1751
1763
|
*
|
|
1752
1764
|
* Specify marketplace information to filter the results to only items offered in that marketplace.
|
|
1753
1765
|
*
|
|
@@ -1759,7 +1771,7 @@ exports.RemoveListing = /*#__PURE__*/function () {
|
|
|
1759
1771
|
*/
|
|
1760
1772
|
|
|
1761
1773
|
|
|
1762
|
-
exports.
|
|
1774
|
+
exports.SalesNames = /*#__PURE__*/function () {
|
|
1763
1775
|
var _ref53 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(_ref52) {
|
|
1764
1776
|
var marketplaceParams, tenantId;
|
|
1765
1777
|
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
@@ -1785,7 +1797,7 @@ exports.ListingNames = /*#__PURE__*/function () {
|
|
|
1785
1797
|
_context28.t0 = Utils;
|
|
1786
1798
|
_context28.next = 8;
|
|
1787
1799
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1788
|
-
path: UrlJoin("as", "mkt", "names"),
|
|
1800
|
+
path: UrlJoin("as", "mkt", "names", "hst"),
|
|
1789
1801
|
method: "GET",
|
|
1790
1802
|
queryParams: tenantId ? {
|
|
1791
1803
|
filter: "tenant:eq:".concat(tenantId)
|
|
@@ -1812,6 +1824,72 @@ exports.ListingNames = /*#__PURE__*/function () {
|
|
|
1812
1824
|
return _ref53.apply(this, arguments);
|
|
1813
1825
|
};
|
|
1814
1826
|
}();
|
|
1827
|
+
/**
|
|
1828
|
+
* Retrieve all valid names for filtering listings. Full item names are required for filtering listing results by name.
|
|
1829
|
+
*
|
|
1830
|
+
* Specify marketplace information to filter the results to only items offered in that marketplace.
|
|
1831
|
+
*
|
|
1832
|
+
* @methodGroup Listings
|
|
1833
|
+
* @namedParams
|
|
1834
|
+
* @param {Object} marketplaceParams - Parameters of a marketplace to filter results by
|
|
1835
|
+
*
|
|
1836
|
+
* @returns {Promise<Array<String>>} - A list of item names
|
|
1837
|
+
*/
|
|
1838
|
+
|
|
1839
|
+
|
|
1840
|
+
exports.ListingNames = /*#__PURE__*/function () {
|
|
1841
|
+
var _ref55 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(_ref54) {
|
|
1842
|
+
var marketplaceParams, tenantId;
|
|
1843
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
1844
|
+
while (1) {
|
|
1845
|
+
switch (_context29.prev = _context29.next) {
|
|
1846
|
+
case 0:
|
|
1847
|
+
marketplaceParams = _ref54.marketplaceParams;
|
|
1848
|
+
|
|
1849
|
+
if (!marketplaceParams) {
|
|
1850
|
+
_context29.next = 5;
|
|
1851
|
+
break;
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
_context29.next = 4;
|
|
1855
|
+
return this.MarketplaceInfo({
|
|
1856
|
+
marketplaceParams: marketplaceParams
|
|
1857
|
+
});
|
|
1858
|
+
|
|
1859
|
+
case 4:
|
|
1860
|
+
tenantId = _context29.sent.tenantId;
|
|
1861
|
+
|
|
1862
|
+
case 5:
|
|
1863
|
+
_context29.t0 = Utils;
|
|
1864
|
+
_context29.next = 8;
|
|
1865
|
+
return this.client.authClient.MakeAuthServiceRequest({
|
|
1866
|
+
path: UrlJoin("as", "mkt", "names"),
|
|
1867
|
+
method: "GET",
|
|
1868
|
+
queryParams: tenantId ? {
|
|
1869
|
+
filter: "tenant:eq:".concat(tenantId)
|
|
1870
|
+
} : {}
|
|
1871
|
+
});
|
|
1872
|
+
|
|
1873
|
+
case 8:
|
|
1874
|
+
_context29.t1 = _context29.sent;
|
|
1875
|
+
_context29.next = 11;
|
|
1876
|
+
return _context29.t0.ResponseToJson.call(_context29.t0, _context29.t1);
|
|
1877
|
+
|
|
1878
|
+
case 11:
|
|
1879
|
+
return _context29.abrupt("return", _context29.sent);
|
|
1880
|
+
|
|
1881
|
+
case 12:
|
|
1882
|
+
case "end":
|
|
1883
|
+
return _context29.stop();
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
}, _callee29, this);
|
|
1887
|
+
}));
|
|
1888
|
+
|
|
1889
|
+
return function (_x15) {
|
|
1890
|
+
return _ref55.apply(this, arguments);
|
|
1891
|
+
};
|
|
1892
|
+
}();
|
|
1815
1893
|
/**
|
|
1816
1894
|
* Retrieve all valid edition names of the specified item. Full item edition names are required for filtering listing results by edition.
|
|
1817
1895
|
*
|
|
@@ -1824,15 +1902,15 @@ exports.ListingNames = /*#__PURE__*/function () {
|
|
|
1824
1902
|
|
|
1825
1903
|
|
|
1826
1904
|
exports.ListingEditionNames = /*#__PURE__*/function () {
|
|
1827
|
-
var
|
|
1905
|
+
var _ref57 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(_ref56) {
|
|
1828
1906
|
var displayName;
|
|
1829
|
-
return _regeneratorRuntime.wrap(function
|
|
1907
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
1830
1908
|
while (1) {
|
|
1831
|
-
switch (
|
|
1909
|
+
switch (_context30.prev = _context30.next) {
|
|
1832
1910
|
case 0:
|
|
1833
|
-
displayName =
|
|
1834
|
-
|
|
1835
|
-
|
|
1911
|
+
displayName = _ref56.displayName;
|
|
1912
|
+
_context30.t0 = Utils;
|
|
1913
|
+
_context30.next = 4;
|
|
1836
1914
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1837
1915
|
path: UrlJoin("as", "mkt", "editions"),
|
|
1838
1916
|
queryParams: {
|
|
@@ -1842,23 +1920,23 @@ exports.ListingEditionNames = /*#__PURE__*/function () {
|
|
|
1842
1920
|
});
|
|
1843
1921
|
|
|
1844
1922
|
case 4:
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
return
|
|
1923
|
+
_context30.t1 = _context30.sent;
|
|
1924
|
+
_context30.next = 7;
|
|
1925
|
+
return _context30.t0.ResponseToJson.call(_context30.t0, _context30.t1);
|
|
1848
1926
|
|
|
1849
1927
|
case 7:
|
|
1850
|
-
return
|
|
1928
|
+
return _context30.abrupt("return", _context30.sent);
|
|
1851
1929
|
|
|
1852
1930
|
case 8:
|
|
1853
1931
|
case "end":
|
|
1854
|
-
return
|
|
1932
|
+
return _context30.stop();
|
|
1855
1933
|
}
|
|
1856
1934
|
}
|
|
1857
|
-
},
|
|
1935
|
+
}, _callee30, this);
|
|
1858
1936
|
}));
|
|
1859
1937
|
|
|
1860
|
-
return function (
|
|
1861
|
-
return
|
|
1938
|
+
return function (_x16) {
|
|
1939
|
+
return _ref57.apply(this, arguments);
|
|
1862
1940
|
};
|
|
1863
1941
|
}();
|
|
1864
1942
|
/**
|
|
@@ -1875,46 +1953,46 @@ exports.ListingEditionNames = /*#__PURE__*/function () {
|
|
|
1875
1953
|
*/
|
|
1876
1954
|
|
|
1877
1955
|
|
|
1878
|
-
exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1879
|
-
var
|
|
1956
|
+
exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31() {
|
|
1957
|
+
var _ref59,
|
|
1880
1958
|
marketplaceParams,
|
|
1881
1959
|
displayName,
|
|
1882
1960
|
filters,
|
|
1883
1961
|
attributes,
|
|
1884
|
-
|
|
1962
|
+
_args31 = arguments;
|
|
1885
1963
|
|
|
1886
|
-
return _regeneratorRuntime.wrap(function
|
|
1964
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
1887
1965
|
while (1) {
|
|
1888
|
-
switch (
|
|
1966
|
+
switch (_context31.prev = _context31.next) {
|
|
1889
1967
|
case 0:
|
|
1890
|
-
|
|
1968
|
+
_ref59 = _args31.length > 0 && _args31[0] !== undefined ? _args31[0] : {}, marketplaceParams = _ref59.marketplaceParams, displayName = _ref59.displayName;
|
|
1891
1969
|
filters = [];
|
|
1892
1970
|
|
|
1893
1971
|
if (!marketplaceParams) {
|
|
1894
|
-
|
|
1972
|
+
_context31.next = 10;
|
|
1895
1973
|
break;
|
|
1896
1974
|
}
|
|
1897
1975
|
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1976
|
+
_context31.t0 = filters;
|
|
1977
|
+
_context31.t1 = "tenant:eq:";
|
|
1978
|
+
_context31.next = 7;
|
|
1901
1979
|
return this.MarketplaceInfo({
|
|
1902
1980
|
marketplaceParams: marketplaceParams
|
|
1903
1981
|
});
|
|
1904
1982
|
|
|
1905
1983
|
case 7:
|
|
1906
|
-
|
|
1907
|
-
|
|
1984
|
+
_context31.t2 = _context31.sent.tenantId;
|
|
1985
|
+
_context31.t3 = _context31.t1.concat.call(_context31.t1, _context31.t2);
|
|
1908
1986
|
|
|
1909
|
-
|
|
1987
|
+
_context31.t0.push.call(_context31.t0, _context31.t3);
|
|
1910
1988
|
|
|
1911
1989
|
case 10:
|
|
1912
1990
|
if (displayName) {
|
|
1913
1991
|
filters.push("nft/display_name:eq:".concat(displayName));
|
|
1914
1992
|
}
|
|
1915
1993
|
|
|
1916
|
-
|
|
1917
|
-
|
|
1994
|
+
_context31.t4 = Utils;
|
|
1995
|
+
_context31.next = 14;
|
|
1918
1996
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1919
1997
|
path: UrlJoin("as", "mkt", "attributes"),
|
|
1920
1998
|
method: "GET",
|
|
@@ -1924,30 +2002,30 @@ exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
|
|
|
1924
2002
|
});
|
|
1925
2003
|
|
|
1926
2004
|
case 14:
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
return
|
|
2005
|
+
_context31.t5 = _context31.sent;
|
|
2006
|
+
_context31.next = 17;
|
|
2007
|
+
return _context31.t4.ResponseToJson.call(_context31.t4, _context31.t5);
|
|
1930
2008
|
|
|
1931
2009
|
case 17:
|
|
1932
|
-
attributes =
|
|
1933
|
-
return
|
|
1934
|
-
var trait_type =
|
|
1935
|
-
values =
|
|
2010
|
+
attributes = _context31.sent;
|
|
2011
|
+
return _context31.abrupt("return", attributes.map(function (_ref60) {
|
|
2012
|
+
var trait_type = _ref60.trait_type,
|
|
2013
|
+
values = _ref60.values;
|
|
1936
2014
|
return {
|
|
1937
2015
|
name: trait_type,
|
|
1938
2016
|
values: values
|
|
1939
2017
|
};
|
|
1940
|
-
}).filter(function (
|
|
1941
|
-
var name =
|
|
2018
|
+
}).filter(function (_ref61) {
|
|
2019
|
+
var name = _ref61.name;
|
|
1942
2020
|
return !["Content Fabric Hash", "Total Minted Supply", "Creator"].includes(name);
|
|
1943
2021
|
}));
|
|
1944
2022
|
|
|
1945
2023
|
case 19:
|
|
1946
2024
|
case "end":
|
|
1947
|
-
return
|
|
2025
|
+
return _context31.stop();
|
|
1948
2026
|
}
|
|
1949
2027
|
}
|
|
1950
|
-
},
|
|
2028
|
+
}, _callee31, this);
|
|
1951
2029
|
}));
|
|
1952
2030
|
/* PURCHASE / CLAIM */
|
|
1953
2031
|
|
|
@@ -1963,21 +2041,21 @@ exports.ListingAttributes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regene
|
|
|
1963
2041
|
*/
|
|
1964
2042
|
|
|
1965
2043
|
exports.ClaimItem = /*#__PURE__*/function () {
|
|
1966
|
-
var
|
|
2044
|
+
var _ref63 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(_ref62) {
|
|
1967
2045
|
var marketplaceParams, sku, marketplaceInfo;
|
|
1968
|
-
return _regeneratorRuntime.wrap(function
|
|
2046
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
1969
2047
|
while (1) {
|
|
1970
|
-
switch (
|
|
2048
|
+
switch (_context32.prev = _context32.next) {
|
|
1971
2049
|
case 0:
|
|
1972
|
-
marketplaceParams =
|
|
1973
|
-
|
|
2050
|
+
marketplaceParams = _ref62.marketplaceParams, sku = _ref62.sku;
|
|
2051
|
+
_context32.next = 3;
|
|
1974
2052
|
return this.MarketplaceInfo({
|
|
1975
2053
|
marketplaceParams: marketplaceParams
|
|
1976
2054
|
});
|
|
1977
2055
|
|
|
1978
2056
|
case 3:
|
|
1979
|
-
marketplaceInfo =
|
|
1980
|
-
|
|
2057
|
+
marketplaceInfo = _context32.sent;
|
|
2058
|
+
_context32.next = 6;
|
|
1981
2059
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
1982
2060
|
method: "POST",
|
|
1983
2061
|
path: UrlJoin("as", "wlt", "act", marketplaceInfo.tenant_id),
|
|
@@ -1993,14 +2071,14 @@ exports.ClaimItem = /*#__PURE__*/function () {
|
|
|
1993
2071
|
|
|
1994
2072
|
case 6:
|
|
1995
2073
|
case "end":
|
|
1996
|
-
return
|
|
2074
|
+
return _context32.stop();
|
|
1997
2075
|
}
|
|
1998
2076
|
}
|
|
1999
|
-
},
|
|
2077
|
+
}, _callee32, this);
|
|
2000
2078
|
}));
|
|
2001
2079
|
|
|
2002
|
-
return function (
|
|
2003
|
-
return
|
|
2080
|
+
return function (_x17) {
|
|
2081
|
+
return _ref63.apply(this, arguments);
|
|
2004
2082
|
};
|
|
2005
2083
|
}();
|
|
2006
2084
|
/* MINTING STATUS */
|
|
@@ -2018,61 +2096,61 @@ exports.ClaimItem = /*#__PURE__*/function () {
|
|
|
2018
2096
|
|
|
2019
2097
|
|
|
2020
2098
|
exports.ListingPurchaseStatus = /*#__PURE__*/function () {
|
|
2021
|
-
var
|
|
2099
|
+
var _ref65 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(_ref64) {
|
|
2022
2100
|
var listingId, confirmationId, listingStatus, statuses;
|
|
2023
|
-
return _regeneratorRuntime.wrap(function
|
|
2101
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
2024
2102
|
while (1) {
|
|
2025
|
-
switch (
|
|
2103
|
+
switch (_context33.prev = _context33.next) {
|
|
2026
2104
|
case 0:
|
|
2027
|
-
listingId =
|
|
2028
|
-
|
|
2029
|
-
|
|
2105
|
+
listingId = _ref64.listingId, confirmationId = _ref64.confirmationId;
|
|
2106
|
+
_context33.prev = 1;
|
|
2107
|
+
_context33.next = 4;
|
|
2030
2108
|
return this.ListingStatus({
|
|
2031
2109
|
listingId: listingId
|
|
2032
2110
|
});
|
|
2033
2111
|
|
|
2034
2112
|
case 4:
|
|
2035
|
-
listingStatus =
|
|
2113
|
+
listingStatus = _context33.sent;
|
|
2036
2114
|
|
|
2037
2115
|
if (listingStatus) {
|
|
2038
|
-
|
|
2116
|
+
_context33.next = 7;
|
|
2039
2117
|
break;
|
|
2040
2118
|
}
|
|
2041
2119
|
|
|
2042
2120
|
throw Error("Unable to find info for listing " + listingId);
|
|
2043
2121
|
|
|
2044
2122
|
case 7:
|
|
2045
|
-
|
|
2123
|
+
_context33.next = 9;
|
|
2046
2124
|
return this.MintingStatus({
|
|
2047
2125
|
tenantId: listingStatus.tenant
|
|
2048
2126
|
});
|
|
2049
2127
|
|
|
2050
2128
|
case 9:
|
|
2051
|
-
statuses =
|
|
2052
|
-
return
|
|
2129
|
+
statuses = _context33.sent;
|
|
2130
|
+
return _context33.abrupt("return", statuses.find(function (status) {
|
|
2053
2131
|
return status.op === "nft-transfer" && status.extra && status.extra[0] === confirmationId;
|
|
2054
2132
|
}) || {
|
|
2055
2133
|
status: "none"
|
|
2056
2134
|
});
|
|
2057
2135
|
|
|
2058
2136
|
case 13:
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
this.Log(
|
|
2062
|
-
return
|
|
2137
|
+
_context33.prev = 13;
|
|
2138
|
+
_context33.t0 = _context33["catch"](1);
|
|
2139
|
+
this.Log(_context33.t0, true);
|
|
2140
|
+
return _context33.abrupt("return", {
|
|
2063
2141
|
status: "unknown"
|
|
2064
2142
|
});
|
|
2065
2143
|
|
|
2066
2144
|
case 17:
|
|
2067
2145
|
case "end":
|
|
2068
|
-
return
|
|
2146
|
+
return _context33.stop();
|
|
2069
2147
|
}
|
|
2070
2148
|
}
|
|
2071
|
-
},
|
|
2149
|
+
}, _callee33, this, [[1, 13]]);
|
|
2072
2150
|
}));
|
|
2073
2151
|
|
|
2074
|
-
return function (
|
|
2075
|
-
return
|
|
2152
|
+
return function (_x18) {
|
|
2153
|
+
return _ref65.apply(this, arguments);
|
|
2076
2154
|
};
|
|
2077
2155
|
}();
|
|
2078
2156
|
/**
|
|
@@ -2088,52 +2166,52 @@ exports.ListingPurchaseStatus = /*#__PURE__*/function () {
|
|
|
2088
2166
|
|
|
2089
2167
|
|
|
2090
2168
|
exports.PurchaseStatus = /*#__PURE__*/function () {
|
|
2091
|
-
var
|
|
2169
|
+
var _ref67 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(_ref66) {
|
|
2092
2170
|
var marketplaceParams, confirmationId, marketplaceInfo, statuses;
|
|
2093
|
-
return _regeneratorRuntime.wrap(function
|
|
2171
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
2094
2172
|
while (1) {
|
|
2095
|
-
switch (
|
|
2173
|
+
switch (_context34.prev = _context34.next) {
|
|
2096
2174
|
case 0:
|
|
2097
|
-
marketplaceParams =
|
|
2098
|
-
|
|
2099
|
-
|
|
2175
|
+
marketplaceParams = _ref66.marketplaceParams, confirmationId = _ref66.confirmationId;
|
|
2176
|
+
_context34.prev = 1;
|
|
2177
|
+
_context34.next = 4;
|
|
2100
2178
|
return this.MarketplaceInfo({
|
|
2101
2179
|
marketplaceParams: marketplaceParams
|
|
2102
2180
|
});
|
|
2103
2181
|
|
|
2104
2182
|
case 4:
|
|
2105
|
-
marketplaceInfo =
|
|
2106
|
-
|
|
2183
|
+
marketplaceInfo = _context34.sent;
|
|
2184
|
+
_context34.next = 7;
|
|
2107
2185
|
return this.MintingStatus({
|
|
2108
2186
|
tenantId: marketplaceInfo.tenant_id
|
|
2109
2187
|
});
|
|
2110
2188
|
|
|
2111
2189
|
case 7:
|
|
2112
|
-
statuses =
|
|
2113
|
-
return
|
|
2190
|
+
statuses = _context34.sent;
|
|
2191
|
+
return _context34.abrupt("return", statuses.find(function (status) {
|
|
2114
2192
|
return status.op === "nft-buy" && status.confirmationId === confirmationId;
|
|
2115
2193
|
}) || {
|
|
2116
2194
|
status: "none"
|
|
2117
2195
|
});
|
|
2118
2196
|
|
|
2119
2197
|
case 11:
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
this.Log(
|
|
2123
|
-
return
|
|
2198
|
+
_context34.prev = 11;
|
|
2199
|
+
_context34.t0 = _context34["catch"](1);
|
|
2200
|
+
this.Log(_context34.t0, true);
|
|
2201
|
+
return _context34.abrupt("return", {
|
|
2124
2202
|
status: "unknown"
|
|
2125
2203
|
});
|
|
2126
2204
|
|
|
2127
2205
|
case 15:
|
|
2128
2206
|
case "end":
|
|
2129
|
-
return
|
|
2207
|
+
return _context34.stop();
|
|
2130
2208
|
}
|
|
2131
2209
|
}
|
|
2132
|
-
},
|
|
2210
|
+
}, _callee34, this, [[1, 11]]);
|
|
2133
2211
|
}));
|
|
2134
2212
|
|
|
2135
|
-
return function (
|
|
2136
|
-
return
|
|
2213
|
+
return function (_x19) {
|
|
2214
|
+
return _ref67.apply(this, arguments);
|
|
2137
2215
|
};
|
|
2138
2216
|
}();
|
|
2139
2217
|
/**
|
|
@@ -2149,52 +2227,52 @@ exports.PurchaseStatus = /*#__PURE__*/function () {
|
|
|
2149
2227
|
|
|
2150
2228
|
|
|
2151
2229
|
exports.ClaimStatus = /*#__PURE__*/function () {
|
|
2152
|
-
var
|
|
2230
|
+
var _ref69 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(_ref68) {
|
|
2153
2231
|
var marketplaceParams, sku, marketplaceInfo, statuses;
|
|
2154
|
-
return _regeneratorRuntime.wrap(function
|
|
2232
|
+
return _regeneratorRuntime.wrap(function _callee35$(_context35) {
|
|
2155
2233
|
while (1) {
|
|
2156
|
-
switch (
|
|
2234
|
+
switch (_context35.prev = _context35.next) {
|
|
2157
2235
|
case 0:
|
|
2158
|
-
marketplaceParams =
|
|
2159
|
-
|
|
2160
|
-
|
|
2236
|
+
marketplaceParams = _ref68.marketplaceParams, sku = _ref68.sku;
|
|
2237
|
+
_context35.prev = 1;
|
|
2238
|
+
_context35.next = 4;
|
|
2161
2239
|
return this.MarketplaceInfo({
|
|
2162
2240
|
marketplaceParams: marketplaceParams
|
|
2163
2241
|
});
|
|
2164
2242
|
|
|
2165
2243
|
case 4:
|
|
2166
|
-
marketplaceInfo =
|
|
2167
|
-
|
|
2244
|
+
marketplaceInfo = _context35.sent;
|
|
2245
|
+
_context35.next = 7;
|
|
2168
2246
|
return this.MintingStatus({
|
|
2169
2247
|
tenantId: marketplaceInfo.tenantId
|
|
2170
2248
|
});
|
|
2171
2249
|
|
|
2172
2250
|
case 7:
|
|
2173
|
-
statuses =
|
|
2174
|
-
return
|
|
2251
|
+
statuses = _context35.sent;
|
|
2252
|
+
return _context35.abrupt("return", statuses.find(function (status) {
|
|
2175
2253
|
return status.op === "nft-claim" && status.marketplaceId === marketplaceInfo.marketplaceId && status.confirmationId === sku;
|
|
2176
2254
|
}) || {
|
|
2177
2255
|
status: "none"
|
|
2178
2256
|
});
|
|
2179
2257
|
|
|
2180
2258
|
case 11:
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
this.Log(
|
|
2184
|
-
return
|
|
2259
|
+
_context35.prev = 11;
|
|
2260
|
+
_context35.t0 = _context35["catch"](1);
|
|
2261
|
+
this.Log(_context35.t0, true);
|
|
2262
|
+
return _context35.abrupt("return", {
|
|
2185
2263
|
status: "unknown"
|
|
2186
2264
|
});
|
|
2187
2265
|
|
|
2188
2266
|
case 15:
|
|
2189
2267
|
case "end":
|
|
2190
|
-
return
|
|
2268
|
+
return _context35.stop();
|
|
2191
2269
|
}
|
|
2192
2270
|
}
|
|
2193
|
-
},
|
|
2271
|
+
}, _callee35, this, [[1, 11]]);
|
|
2194
2272
|
}));
|
|
2195
2273
|
|
|
2196
|
-
return function (
|
|
2197
|
-
return
|
|
2274
|
+
return function (_x20) {
|
|
2275
|
+
return _ref69.apply(this, arguments);
|
|
2198
2276
|
};
|
|
2199
2277
|
}();
|
|
2200
2278
|
/**
|
|
@@ -2210,52 +2288,52 @@ exports.ClaimStatus = /*#__PURE__*/function () {
|
|
|
2210
2288
|
|
|
2211
2289
|
|
|
2212
2290
|
exports.PackOpenStatus = /*#__PURE__*/function () {
|
|
2213
|
-
var
|
|
2291
|
+
var _ref71 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(_ref70) {
|
|
2214
2292
|
var contractAddress, tokenId, tenantConfig, statuses;
|
|
2215
|
-
return _regeneratorRuntime.wrap(function
|
|
2293
|
+
return _regeneratorRuntime.wrap(function _callee36$(_context36) {
|
|
2216
2294
|
while (1) {
|
|
2217
|
-
switch (
|
|
2295
|
+
switch (_context36.prev = _context36.next) {
|
|
2218
2296
|
case 0:
|
|
2219
|
-
contractAddress =
|
|
2220
|
-
|
|
2221
|
-
|
|
2297
|
+
contractAddress = _ref70.contractAddress, tokenId = _ref70.tokenId;
|
|
2298
|
+
_context36.prev = 1;
|
|
2299
|
+
_context36.next = 4;
|
|
2222
2300
|
return this.TenantConfiguration({
|
|
2223
2301
|
contractAddress: contractAddress
|
|
2224
2302
|
});
|
|
2225
2303
|
|
|
2226
2304
|
case 4:
|
|
2227
|
-
tenantConfig =
|
|
2228
|
-
|
|
2305
|
+
tenantConfig = _context36.sent;
|
|
2306
|
+
_context36.next = 7;
|
|
2229
2307
|
return this.MintingStatus({
|
|
2230
2308
|
tenantId: tenantConfig.tenant
|
|
2231
2309
|
});
|
|
2232
2310
|
|
|
2233
2311
|
case 7:
|
|
2234
|
-
statuses =
|
|
2235
|
-
return
|
|
2312
|
+
statuses = _context36.sent;
|
|
2313
|
+
return _context36.abrupt("return", statuses.find(function (status) {
|
|
2236
2314
|
return status.op === "nft-open" && Utils.EqualAddress(contractAddress, status.address) && status.tokenId === tokenId;
|
|
2237
2315
|
}) || {
|
|
2238
2316
|
status: "none"
|
|
2239
2317
|
});
|
|
2240
2318
|
|
|
2241
2319
|
case 11:
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
this.Log(
|
|
2245
|
-
return
|
|
2320
|
+
_context36.prev = 11;
|
|
2321
|
+
_context36.t0 = _context36["catch"](1);
|
|
2322
|
+
this.Log(_context36.t0, true);
|
|
2323
|
+
return _context36.abrupt("return", {
|
|
2246
2324
|
status: "unknown"
|
|
2247
2325
|
});
|
|
2248
2326
|
|
|
2249
2327
|
case 15:
|
|
2250
2328
|
case "end":
|
|
2251
|
-
return
|
|
2329
|
+
return _context36.stop();
|
|
2252
2330
|
}
|
|
2253
2331
|
}
|
|
2254
|
-
},
|
|
2332
|
+
}, _callee36, this, [[1, 11]]);
|
|
2255
2333
|
}));
|
|
2256
2334
|
|
|
2257
|
-
return function (
|
|
2258
|
-
return
|
|
2335
|
+
return function (_x21) {
|
|
2336
|
+
return _ref71.apply(this, arguments);
|
|
2259
2337
|
};
|
|
2260
2338
|
}();
|
|
2261
2339
|
/**
|
|
@@ -2271,60 +2349,60 @@ exports.PackOpenStatus = /*#__PURE__*/function () {
|
|
|
2271
2349
|
|
|
2272
2350
|
|
|
2273
2351
|
exports.CollectionRedemptionStatus = /*#__PURE__*/function () {
|
|
2274
|
-
var
|
|
2352
|
+
var _ref73 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(_ref72) {
|
|
2275
2353
|
var marketplaceParams, confirmationId, statuses;
|
|
2276
|
-
return _regeneratorRuntime.wrap(function
|
|
2354
|
+
return _regeneratorRuntime.wrap(function _callee37$(_context37) {
|
|
2277
2355
|
while (1) {
|
|
2278
|
-
switch (
|
|
2356
|
+
switch (_context37.prev = _context37.next) {
|
|
2279
2357
|
case 0:
|
|
2280
|
-
marketplaceParams =
|
|
2281
|
-
|
|
2282
|
-
|
|
2358
|
+
marketplaceParams = _ref72.marketplaceParams, confirmationId = _ref72.confirmationId;
|
|
2359
|
+
_context37.prev = 1;
|
|
2360
|
+
_context37.next = 4;
|
|
2283
2361
|
return this.MintingStatus({
|
|
2284
2362
|
marketplaceParams: marketplaceParams
|
|
2285
2363
|
});
|
|
2286
2364
|
|
|
2287
2365
|
case 4:
|
|
2288
|
-
statuses =
|
|
2289
|
-
return
|
|
2366
|
+
statuses = _context37.sent;
|
|
2367
|
+
return _context37.abrupt("return", statuses.find(function (status) {
|
|
2290
2368
|
return status.op === "nft-redeem" && status.confirmationId === confirmationId;
|
|
2291
2369
|
}) || {
|
|
2292
2370
|
status: "none"
|
|
2293
2371
|
});
|
|
2294
2372
|
|
|
2295
2373
|
case 8:
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
this.Log(
|
|
2299
|
-
return
|
|
2374
|
+
_context37.prev = 8;
|
|
2375
|
+
_context37.t0 = _context37["catch"](1);
|
|
2376
|
+
this.Log(_context37.t0, true);
|
|
2377
|
+
return _context37.abrupt("return", {
|
|
2300
2378
|
status: "unknown"
|
|
2301
2379
|
});
|
|
2302
2380
|
|
|
2303
2381
|
case 12:
|
|
2304
2382
|
case "end":
|
|
2305
|
-
return
|
|
2383
|
+
return _context37.stop();
|
|
2306
2384
|
}
|
|
2307
2385
|
}
|
|
2308
|
-
},
|
|
2386
|
+
}, _callee37, this, [[1, 8]]);
|
|
2309
2387
|
}));
|
|
2310
2388
|
|
|
2311
|
-
return function (
|
|
2312
|
-
return
|
|
2389
|
+
return function (_x22) {
|
|
2390
|
+
return _ref73.apply(this, arguments);
|
|
2313
2391
|
};
|
|
2314
2392
|
}();
|
|
2315
2393
|
/* EVENTS */
|
|
2316
2394
|
|
|
2317
2395
|
|
|
2318
2396
|
exports.LoadDrop = /*#__PURE__*/function () {
|
|
2319
|
-
var
|
|
2397
|
+
var _ref75 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(_ref74) {
|
|
2320
2398
|
var _this2 = this;
|
|
2321
2399
|
|
|
2322
2400
|
var tenantSlug, eventSlug, dropId, mainSiteHash, event, eventId;
|
|
2323
|
-
return _regeneratorRuntime.wrap(function
|
|
2401
|
+
return _regeneratorRuntime.wrap(function _callee38$(_context38) {
|
|
2324
2402
|
while (1) {
|
|
2325
|
-
switch (
|
|
2403
|
+
switch (_context38.prev = _context38.next) {
|
|
2326
2404
|
case 0:
|
|
2327
|
-
tenantSlug =
|
|
2405
|
+
tenantSlug = _ref74.tenantSlug, eventSlug = _ref74.eventSlug, dropId = _ref74.dropId;
|
|
2328
2406
|
|
|
2329
2407
|
if (!this.drops) {
|
|
2330
2408
|
this.drops = {};
|
|
@@ -2339,18 +2417,18 @@ exports.LoadDrop = /*#__PURE__*/function () {
|
|
|
2339
2417
|
}
|
|
2340
2418
|
|
|
2341
2419
|
if (this.drops[tenantSlug][eventSlug][dropId]) {
|
|
2342
|
-
|
|
2420
|
+
_context38.next = 16;
|
|
2343
2421
|
break;
|
|
2344
2422
|
}
|
|
2345
2423
|
|
|
2346
|
-
|
|
2424
|
+
_context38.next = 7;
|
|
2347
2425
|
return this.client.LatestVersionHash({
|
|
2348
2426
|
objectId: this.mainSiteId
|
|
2349
2427
|
});
|
|
2350
2428
|
|
|
2351
2429
|
case 7:
|
|
2352
|
-
mainSiteHash =
|
|
2353
|
-
|
|
2430
|
+
mainSiteHash = _context38.sent;
|
|
2431
|
+
_context38.next = 10;
|
|
2354
2432
|
return this.client.ContentObjectMetadata({
|
|
2355
2433
|
versionHash: mainSiteHash,
|
|
2356
2434
|
metadataSubtree: UrlJoin("public", "asset_metadata", "tenants", tenantSlug, "sites", eventSlug, "info"),
|
|
@@ -2363,17 +2441,17 @@ exports.LoadDrop = /*#__PURE__*/function () {
|
|
|
2363
2441
|
});
|
|
2364
2442
|
|
|
2365
2443
|
case 10:
|
|
2366
|
-
|
|
2444
|
+
_context38.t0 = _context38.sent;
|
|
2367
2445
|
|
|
2368
|
-
if (
|
|
2369
|
-
|
|
2446
|
+
if (_context38.t0) {
|
|
2447
|
+
_context38.next = 13;
|
|
2370
2448
|
break;
|
|
2371
2449
|
}
|
|
2372
2450
|
|
|
2373
|
-
|
|
2451
|
+
_context38.t0 = [];
|
|
2374
2452
|
|
|
2375
2453
|
case 13:
|
|
2376
|
-
event =
|
|
2454
|
+
event = _context38.t0;
|
|
2377
2455
|
eventId = Utils.DecodeVersionHash(event["."].source).objectId;
|
|
2378
2456
|
event.drops.forEach(function (drop) {
|
|
2379
2457
|
drop = _objectSpread(_objectSpread({}, drop), {}, {
|
|
@@ -2384,37 +2462,37 @@ exports.LoadDrop = /*#__PURE__*/function () {
|
|
|
2384
2462
|
});
|
|
2385
2463
|
|
|
2386
2464
|
case 16:
|
|
2387
|
-
return
|
|
2465
|
+
return _context38.abrupt("return", this.drops[dropId]);
|
|
2388
2466
|
|
|
2389
2467
|
case 17:
|
|
2390
2468
|
case "end":
|
|
2391
|
-
return
|
|
2469
|
+
return _context38.stop();
|
|
2392
2470
|
}
|
|
2393
2471
|
}
|
|
2394
|
-
},
|
|
2472
|
+
}, _callee38, this);
|
|
2395
2473
|
}));
|
|
2396
2474
|
|
|
2397
|
-
return function (
|
|
2398
|
-
return
|
|
2475
|
+
return function (_x23) {
|
|
2476
|
+
return _ref75.apply(this, arguments);
|
|
2399
2477
|
};
|
|
2400
2478
|
}();
|
|
2401
2479
|
|
|
2402
2480
|
exports.SubmitDropVote = /*#__PURE__*/function () {
|
|
2403
|
-
var
|
|
2481
|
+
var _ref77 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(_ref76) {
|
|
2404
2482
|
var marketplaceParams, eventId, dropId, sku, marketplaceInfo;
|
|
2405
|
-
return _regeneratorRuntime.wrap(function
|
|
2483
|
+
return _regeneratorRuntime.wrap(function _callee39$(_context39) {
|
|
2406
2484
|
while (1) {
|
|
2407
|
-
switch (
|
|
2485
|
+
switch (_context39.prev = _context39.next) {
|
|
2408
2486
|
case 0:
|
|
2409
|
-
marketplaceParams =
|
|
2410
|
-
|
|
2487
|
+
marketplaceParams = _ref76.marketplaceParams, eventId = _ref76.eventId, dropId = _ref76.dropId, sku = _ref76.sku;
|
|
2488
|
+
_context39.next = 3;
|
|
2411
2489
|
return this.MarketplaceInfo({
|
|
2412
2490
|
marketplaceParams: marketplaceParams
|
|
2413
2491
|
});
|
|
2414
2492
|
|
|
2415
2493
|
case 3:
|
|
2416
|
-
marketplaceInfo =
|
|
2417
|
-
|
|
2494
|
+
marketplaceInfo = _context39.sent;
|
|
2495
|
+
_context39.next = 6;
|
|
2418
2496
|
return this.client.authClient.MakeAuthServiceRequest({
|
|
2419
2497
|
path: UrlJoin("as", "wlt", "act", marketplaceInfo.tenant_id),
|
|
2420
2498
|
method: "POST",
|
|
@@ -2431,27 +2509,27 @@ exports.SubmitDropVote = /*#__PURE__*/function () {
|
|
|
2431
2509
|
|
|
2432
2510
|
case 6:
|
|
2433
2511
|
case "end":
|
|
2434
|
-
return
|
|
2512
|
+
return _context39.stop();
|
|
2435
2513
|
}
|
|
2436
2514
|
}
|
|
2437
|
-
},
|
|
2515
|
+
}, _callee39, this);
|
|
2438
2516
|
}));
|
|
2439
2517
|
|
|
2440
|
-
return function (
|
|
2441
|
-
return
|
|
2518
|
+
return function (_x24) {
|
|
2519
|
+
return _ref77.apply(this, arguments);
|
|
2442
2520
|
};
|
|
2443
2521
|
}();
|
|
2444
2522
|
|
|
2445
2523
|
exports.DropStatus = /*#__PURE__*/function () {
|
|
2446
|
-
var
|
|
2524
|
+
var _ref79 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(_ref78) {
|
|
2447
2525
|
var marketplace, eventId, dropId, response;
|
|
2448
|
-
return _regeneratorRuntime.wrap(function
|
|
2526
|
+
return _regeneratorRuntime.wrap(function _callee40$(_context40) {
|
|
2449
2527
|
while (1) {
|
|
2450
|
-
switch (
|
|
2528
|
+
switch (_context40.prev = _context40.next) {
|
|
2451
2529
|
case 0:
|
|
2452
|
-
marketplace =
|
|
2453
|
-
|
|
2454
|
-
|
|
2530
|
+
marketplace = _ref78.marketplace, eventId = _ref78.eventId, dropId = _ref78.dropId;
|
|
2531
|
+
_context40.prev = 1;
|
|
2532
|
+
_context40.next = 4;
|
|
2455
2533
|
return Utils.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({
|
|
2456
2534
|
path: UrlJoin("as", "wlt", "act", marketplace.tenant_id, eventId, dropId),
|
|
2457
2535
|
method: "GET",
|
|
@@ -2461,28 +2539,28 @@ exports.DropStatus = /*#__PURE__*/function () {
|
|
|
2461
2539
|
}));
|
|
2462
2540
|
|
|
2463
2541
|
case 4:
|
|
2464
|
-
response =
|
|
2465
|
-
return
|
|
2542
|
+
response = _context40.sent;
|
|
2543
|
+
return _context40.abrupt("return", response.sort(function (a, b) {
|
|
2466
2544
|
return a.ts > b.ts ? 1 : -1;
|
|
2467
2545
|
})[0] || {
|
|
2468
2546
|
status: "none"
|
|
2469
2547
|
});
|
|
2470
2548
|
|
|
2471
2549
|
case 8:
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
this.Log(
|
|
2475
|
-
return
|
|
2550
|
+
_context40.prev = 8;
|
|
2551
|
+
_context40.t0 = _context40["catch"](1);
|
|
2552
|
+
this.Log(_context40.t0, true);
|
|
2553
|
+
return _context40.abrupt("return", "");
|
|
2476
2554
|
|
|
2477
2555
|
case 12:
|
|
2478
2556
|
case "end":
|
|
2479
|
-
return
|
|
2557
|
+
return _context40.stop();
|
|
2480
2558
|
}
|
|
2481
2559
|
}
|
|
2482
|
-
},
|
|
2560
|
+
}, _callee40, this, [[1, 8]]);
|
|
2483
2561
|
}));
|
|
2484
2562
|
|
|
2485
|
-
return function (
|
|
2486
|
-
return
|
|
2563
|
+
return function (_x25) {
|
|
2564
|
+
return _ref79.apply(this, arguments);
|
|
2487
2565
|
};
|
|
2488
2566
|
}();
|