@eluvio/elv-client-js 4.0.66 → 4.0.68
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/ElvWalletClient-min.js +2 -2
- package/dist/ElvWalletClient-node-min.js +2 -2
- package/dist/src/walletClient/Utils.js +1 -5
- package/dist/src/walletClient/index.js +7 -9
- package/package.json +1 -1
- package/src/ElvClient.js +4 -0
- package/src/FrameClient.js +4 -1
- package/src/client/Contracts.js +14 -0
|
@@ -95,14 +95,10 @@ var FormatNFTDetails = function FormatNFTDetails(entry) {
|
|
|
95
95
|
} else {
|
|
96
96
|
details.Offers = info.offers || [];
|
|
97
97
|
}
|
|
98
|
-
|
|
98
|
+
return {
|
|
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;
|
|
106
102
|
};
|
|
107
103
|
exports.FormatNFTDetails = FormatNFTDetails;
|
|
108
104
|
var FormatNFTMetadata = function FormatNFTMetadata(walletClient, nft) {
|
|
@@ -1412,7 +1412,6 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
1412
1412
|
_ref21,
|
|
1413
1413
|
contents,
|
|
1414
1414
|
paging,
|
|
1415
|
-
modesToFormat,
|
|
1416
1415
|
_args20 = arguments;
|
|
1417
1416
|
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
|
1418
1417
|
while (1) switch (_context20.prev = _context20.next) {
|
|
@@ -1633,7 +1632,6 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
1633
1632
|
_ref21 = _context20.t1;
|
|
1634
1633
|
contents = _ref21.contents;
|
|
1635
1634
|
paging = _ref21.paging;
|
|
1636
|
-
modesToFormat = ["owned", "listings", "owned-full-meta"];
|
|
1637
1635
|
return _context20.abrupt("return", {
|
|
1638
1636
|
paging: {
|
|
1639
1637
|
start: params.start,
|
|
@@ -1642,14 +1640,14 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
1642
1640
|
more: paging.total > start + limit
|
|
1643
1641
|
},
|
|
1644
1642
|
results: (contents || []).map(function (item) {
|
|
1645
|
-
return
|
|
1643
|
+
return ["owned", "listings"].includes(mode) ? FormatNFT(_this6, item) : item;
|
|
1646
1644
|
})
|
|
1647
1645
|
});
|
|
1648
|
-
case
|
|
1649
|
-
_context20.prev =
|
|
1646
|
+
case 71:
|
|
1647
|
+
_context20.prev = 71;
|
|
1650
1648
|
_context20.t4 = _context20["catch"](14);
|
|
1651
1649
|
if (!(_context20.t4.status && _context20.t4.status.toString() === "404")) {
|
|
1652
|
-
_context20.next =
|
|
1650
|
+
_context20.next = 75;
|
|
1653
1651
|
break;
|
|
1654
1652
|
}
|
|
1655
1653
|
return _context20.abrupt("return", {
|
|
@@ -1661,13 +1659,13 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
1661
1659
|
},
|
|
1662
1660
|
results: []
|
|
1663
1661
|
});
|
|
1664
|
-
case
|
|
1662
|
+
case 75:
|
|
1665
1663
|
throw _context20.t4;
|
|
1666
|
-
case
|
|
1664
|
+
case 76:
|
|
1667
1665
|
case "end":
|
|
1668
1666
|
return _context20.stop();
|
|
1669
1667
|
}
|
|
1670
|
-
}, _callee20, this, [[14,
|
|
1668
|
+
}, _callee20, this, [[14, 71]]);
|
|
1671
1669
|
}));
|
|
1672
1670
|
function FilteredQuery() {
|
|
1673
1671
|
return _FilteredQuery.apply(this, arguments);
|
package/package.json
CHANGED
package/src/ElvClient.js
CHANGED
|
@@ -1175,6 +1175,10 @@ class ElvClient {
|
|
|
1175
1175
|
);
|
|
1176
1176
|
}
|
|
1177
1177
|
|
|
1178
|
+
async MakeAuthServiceRequest({kmsId, objectId, versionHash, method="GET", path, bodyType, body={}, queryParams={}, headers}) {
|
|
1179
|
+
return this.authClient.MakeAuthServiceRequest({kmsId, objectId, versionHash, method, path, bodyType, body, queryParams, headers});
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1178
1182
|
/* FrameClient related */
|
|
1179
1183
|
|
|
1180
1184
|
// Whitelist of methods allowed to be called using the frame API
|
package/src/FrameClient.js
CHANGED
|
@@ -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",
|
|
@@ -425,6 +426,7 @@ class FrameClient {
|
|
|
425
426
|
"ListNTPInstances",
|
|
426
427
|
"LRODraftInfo",
|
|
427
428
|
"LROStatus",
|
|
429
|
+
"MakeAuthServiceRequest",
|
|
428
430
|
"MergeContractMetadata",
|
|
429
431
|
"MergeMetadata",
|
|
430
432
|
"MetadataAuth",
|
|
@@ -488,7 +490,8 @@ class FrameClient {
|
|
|
488
490
|
"UploadStatus",
|
|
489
491
|
"UseRegion",
|
|
490
492
|
"VerifyContentObject",
|
|
491
|
-
"Visibility"
|
|
493
|
+
"Visibility",
|
|
494
|
+
"WriteTokenNodeUrl"
|
|
492
495
|
];
|
|
493
496
|
}
|
|
494
497
|
|
package/src/client/Contracts.js
CHANGED
|
@@ -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
|
*
|