@eluvio/elv-client-js 4.0.72 → 4.0.74
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 +10 -10
- package/dist/ElvClient-node-min.js +10 -10
- package/dist/ElvFrameClient-min.js +9 -9
- package/dist/ElvPermissionsClient-min.js +10 -10
- package/dist/ElvWalletClient-min.js +10 -10
- package/dist/ElvWalletClient-node-min.js +10 -10
- package/dist/src/AuthorizationClient.js +12 -18
- package/dist/src/Crypto.js +2 -2
- package/dist/src/ElvClient.js +76 -111
- package/dist/src/EthClient.js +2 -2
- package/dist/src/FrameClient.js +4 -4
- package/dist/src/PermissionsClient.js +2 -2
- package/dist/src/Utils.js +5 -6
- package/dist/src/client/ABRPublishing.js +2 -2
- package/dist/src/client/AccessGroups.js +20 -18
- package/dist/src/client/ContentAccess.js +2 -2
- package/dist/src/client/ContentManagement.js +3 -3
- package/dist/src/client/Contracts.js +203 -235
- package/dist/src/client/Files.js +2 -2
- package/dist/src/client/NFT.js +2 -2
- package/dist/src/walletClient/ClientMethods.js +2 -2
- package/dist/src/walletClient/Profile.js +2 -2
- package/dist/src/walletClient/Utils.js +3 -7
- package/dist/src/walletClient/index.js +41 -116
- package/package.json +1 -1
- package/src/client/AccessGroups.js +1 -0
- package/src/walletClient/ClientMethods.js +79 -1
- package/src/walletClient/index.js +15 -4
- package/dist/src/contracts/v3b/BaseAccessControlGroup.js +0 -1704
|
@@ -3,8 +3,9 @@ var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
|
3
3
|
var _classCallCheck = require("@babel/runtime/helpers/classCallCheck");
|
|
4
4
|
var _createClass = require("@babel/runtime/helpers/createClass");
|
|
5
5
|
var _defineProperty = require("@babel/runtime/helpers/defineProperty");
|
|
6
|
-
|
|
7
|
-
function
|
|
6
|
+
var _v, _v2;
|
|
7
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
9
|
var HttpClient = require("./HttpClient");
|
|
9
10
|
var Ethers = require("ethers");
|
|
10
11
|
var Utils = require("./Utils");
|
|
@@ -37,9 +38,8 @@ var ACCESS_TYPES = {
|
|
|
37
38
|
OTHER: "other"
|
|
38
39
|
};
|
|
39
40
|
var CONTRACTS = {
|
|
40
|
-
v2:
|
|
41
|
-
v3:
|
|
42
|
-
v3b: _defineProperty({}, ACCESS_TYPES.GROUP, require("./contracts/v3b/BaseAccessControlGroup"))
|
|
41
|
+
v2: (_v = {}, _defineProperty(_v, ACCESS_TYPES.SPACE, require("./contracts/v2/BaseContentSpace")), _defineProperty(_v, ACCESS_TYPES.LIBRARY, require("./contracts/v2/BaseLibrary")), _defineProperty(_v, ACCESS_TYPES.TYPE, require("./contracts/v2/BaseContentType")), _defineProperty(_v, ACCESS_TYPES.OBJECT, require("./contracts/v2/BaseContent")), _defineProperty(_v, ACCESS_TYPES.WALLET, require("./contracts/v2/BaseAccessWallet")), _defineProperty(_v, ACCESS_TYPES.GROUP, require("./contracts/v2/BaseAccessControlGroup")), _defineProperty(_v, ACCESS_TYPES.ACCESSIBLE, require("./contracts/v2/Accessible")), _defineProperty(_v, ACCESS_TYPES.EDITABLE, require("./contracts/v2/Editable")), _v),
|
|
42
|
+
v3: (_v2 = {}, _defineProperty(_v2, ACCESS_TYPES.SPACE, require("./contracts/v3/BaseContentSpace")), _defineProperty(_v2, ACCESS_TYPES.LIBRARY, require("./contracts/v3/BaseLibrary")), _defineProperty(_v2, ACCESS_TYPES.TYPE, require("./contracts/v3/BaseContentType")), _defineProperty(_v2, ACCESS_TYPES.OBJECT, require("./contracts/v3/BaseContent")), _defineProperty(_v2, ACCESS_TYPES.WALLET, require("./contracts/v3/BaseAccessWallet")), _defineProperty(_v2, ACCESS_TYPES.GROUP, require("./contracts/v3/BaseAccessControlGroup")), _defineProperty(_v2, ACCESS_TYPES.ACCESSIBLE, require("./contracts/v3/Accessible")), _defineProperty(_v2, ACCESS_TYPES.EDITABLE, require("./contracts/v3/Editable")), _defineProperty(_v2, ACCESS_TYPES.TENANT, require("./contracts/v3/BaseTenantSpace")), _v2)
|
|
43
43
|
};
|
|
44
44
|
var AuthorizationClient = /*#__PURE__*/function () {
|
|
45
45
|
"use strict";
|
|
@@ -1162,7 +1162,7 @@ var AuthorizationClient = /*#__PURE__*/function () {
|
|
|
1162
1162
|
key: "ContractInfo",
|
|
1163
1163
|
value: function () {
|
|
1164
1164
|
var _ContractInfo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(_ref15) {
|
|
1165
|
-
var id, address, isV3,
|
|
1165
|
+
var id, address, isV3, version, accessType;
|
|
1166
1166
|
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
1167
1167
|
while (1) switch (_context14.prev = _context14.next) {
|
|
1168
1168
|
case 0:
|
|
@@ -1179,29 +1179,23 @@ var AuthorizationClient = /*#__PURE__*/function () {
|
|
|
1179
1179
|
});
|
|
1180
1180
|
case 5:
|
|
1181
1181
|
isV3 = _context14.sent;
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
case 8:
|
|
1185
|
-
contractName = _context14.sent;
|
|
1186
|
-
_context14.next = 11;
|
|
1182
|
+
version = isV3 ? "v3" : "v2";
|
|
1183
|
+
_context14.next = 9;
|
|
1187
1184
|
return this.AccessType(id);
|
|
1188
|
-
case
|
|
1185
|
+
case 9:
|
|
1189
1186
|
accessType = _context14.sent;
|
|
1190
|
-
// Contract BsAccessCtrlGrp20210809150000PO has an outdated isAdmin method that checks a managersList array instead of managersMap
|
|
1191
|
-
v3Version = contractName === "BsAccessCtrlGrp20210809150000PO" && accessType === this.ACCESS_TYPES.GROUP ? "v3b" : "v3";
|
|
1192
|
-
version = isV3 ? v3Version : "v2";
|
|
1193
1187
|
if (!(accessType === this.ACCESS_TYPES.OTHER)) {
|
|
1194
|
-
_context14.next =
|
|
1188
|
+
_context14.next = 12;
|
|
1195
1189
|
break;
|
|
1196
1190
|
}
|
|
1197
1191
|
return _context14.abrupt("return", {});
|
|
1198
|
-
case
|
|
1192
|
+
case 12:
|
|
1199
1193
|
return _context14.abrupt("return", {
|
|
1200
1194
|
isV3: isV3,
|
|
1201
1195
|
accessType: accessType,
|
|
1202
1196
|
abi: this.CONTRACTS[version][accessType].abi
|
|
1203
1197
|
});
|
|
1204
|
-
case
|
|
1198
|
+
case 13:
|
|
1205
1199
|
case "end":
|
|
1206
1200
|
return _context14.stop();
|
|
1207
1201
|
}
|
package/dist/src/Crypto.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
2
2
|
var _regeneratorRuntime = require("@babel/runtime/regenerator");
|
|
3
3
|
var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
4
|
-
function _getRequireWildcardCache(
|
|
5
|
-
function _interopRequireWildcard(
|
|
4
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
5
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
6
6
|
if (typeof globalThis.Buffer === "undefined") {
|
|
7
7
|
globalThis.Buffer = require("buffer/").Buffer;
|
|
8
8
|
}
|
package/dist/src/ElvClient.js
CHANGED
|
@@ -5,8 +5,8 @@ var _regeneratorRuntime = require("@babel/runtime/regenerator");
|
|
|
5
5
|
var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
6
6
|
var _classCallCheck = require("@babel/runtime/helpers/classCallCheck");
|
|
7
7
|
var _createClass = require("@babel/runtime/helpers/createClass");
|
|
8
|
-
function ownKeys(
|
|
9
|
-
function _objectSpread(
|
|
8
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10
10
|
if (typeof globalThis.Buffer === "undefined") {
|
|
11
11
|
globalThis.Buffer = require("buffer/").Buffer;
|
|
12
12
|
}
|
|
@@ -999,8 +999,6 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
999
999
|
Sign,
|
|
1000
1000
|
_ref17$addEthereumPre,
|
|
1001
1001
|
addEthereumPrefix,
|
|
1002
|
-
_ref17$context,
|
|
1003
|
-
context,
|
|
1004
1002
|
token,
|
|
1005
1003
|
message,
|
|
1006
1004
|
signature,
|
|
@@ -1009,7 +1007,7 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1009
1007
|
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
1010
1008
|
while (1) switch (_context13.prev = _context13.next) {
|
|
1011
1009
|
case 0:
|
|
1012
|
-
_ref17 = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {}, _ref17$duration = _ref17.duration, duration = _ref17$duration === void 0 ? 24 * 60 * 60 * 1000 : _ref17$duration, _ref17$spec = _ref17.spec, spec = _ref17$spec === void 0 ? {} : _ref17$spec, address = _ref17.address, Sign = _ref17.Sign, _ref17$addEthereumPre = _ref17.addEthereumPrefix, addEthereumPrefix = _ref17$addEthereumPre === void 0 ? true : _ref17$addEthereumPre
|
|
1010
|
+
_ref17 = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {}, _ref17$duration = _ref17.duration, duration = _ref17$duration === void 0 ? 24 * 60 * 60 * 1000 : _ref17$duration, _ref17$spec = _ref17.spec, spec = _ref17$spec === void 0 ? {} : _ref17$spec, address = _ref17.address, Sign = _ref17.Sign, _ref17$addEthereumPre = _ref17.addEthereumPrefix, addEthereumPrefix = _ref17$addEthereumPre === void 0 ? true : _ref17$addEthereumPre;
|
|
1013
1011
|
address = address || this.CurrentAccountAddress();
|
|
1014
1012
|
_context13.t0 = _objectSpread;
|
|
1015
1013
|
_context13.t1 = _objectSpread({}, spec);
|
|
@@ -1022,28 +1020,26 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1022
1020
|
_context13.t5 = _context13.sent;
|
|
1023
1021
|
_context13.t6 = Date.now();
|
|
1024
1022
|
_context13.t7 = Date.now() + duration;
|
|
1025
|
-
_context13.t8 =
|
|
1026
|
-
_context13.t9 = {
|
|
1023
|
+
_context13.t8 = {
|
|
1027
1024
|
sub: _context13.t3,
|
|
1028
1025
|
adr: _context13.t4,
|
|
1029
1026
|
spc: _context13.t5,
|
|
1030
1027
|
iat: _context13.t6,
|
|
1031
|
-
exp: _context13.t7
|
|
1032
|
-
ctx: _context13.t8
|
|
1028
|
+
exp: _context13.t7
|
|
1033
1029
|
};
|
|
1034
|
-
token = (0, _context13.t0)(_context13.t1, _context13.t2, _context13.
|
|
1030
|
+
token = (0, _context13.t0)(_context13.t1, _context13.t2, _context13.t8);
|
|
1035
1031
|
message = "Eluvio Content Fabric Access Token 1.0\n".concat(JSON.stringify(token));
|
|
1036
|
-
_context13.next =
|
|
1032
|
+
_context13.next = 17;
|
|
1037
1033
|
return this.PersonalSign({
|
|
1038
1034
|
message: message,
|
|
1039
1035
|
addEthereumPrefix: addEthereumPrefix,
|
|
1040
1036
|
Sign: Sign
|
|
1041
1037
|
});
|
|
1042
|
-
case
|
|
1038
|
+
case 17:
|
|
1043
1039
|
signature = _context13.sent;
|
|
1044
1040
|
compressedToken = Pako.deflateRaw(Buffer.from(JSON.stringify(token), "utf-8"));
|
|
1045
1041
|
return _context13.abrupt("return", "acspjc".concat(this.utils.B58(Buffer.concat([Buffer.from(signature.replace(/^0x/, ""), "hex"), Buffer.from(compressedToken)]))));
|
|
1046
|
-
case
|
|
1042
|
+
case 20:
|
|
1047
1043
|
case "end":
|
|
1048
1044
|
return _context13.stop();
|
|
1049
1045
|
}
|
|
@@ -1539,37 +1535,6 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1539
1535
|
}
|
|
1540
1536
|
return Request;
|
|
1541
1537
|
}()
|
|
1542
|
-
}, {
|
|
1543
|
-
key: "MakeAuthServiceRequest",
|
|
1544
|
-
value: function () {
|
|
1545
|
-
var _MakeAuthServiceRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(_ref26) {
|
|
1546
|
-
var kmsId, objectId, versionHash, _ref26$method, method, path, bodyType, _ref26$body, body, _ref26$queryParams, queryParams, headers;
|
|
1547
|
-
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
1548
|
-
while (1) switch (_context22.prev = _context22.next) {
|
|
1549
|
-
case 0:
|
|
1550
|
-
kmsId = _ref26.kmsId, objectId = _ref26.objectId, versionHash = _ref26.versionHash, _ref26$method = _ref26.method, method = _ref26$method === void 0 ? "GET" : _ref26$method, path = _ref26.path, bodyType = _ref26.bodyType, _ref26$body = _ref26.body, body = _ref26$body === void 0 ? {} : _ref26$body, _ref26$queryParams = _ref26.queryParams, queryParams = _ref26$queryParams === void 0 ? {} : _ref26$queryParams, headers = _ref26.headers;
|
|
1551
|
-
return _context22.abrupt("return", this.authClient.MakeAuthServiceRequest({
|
|
1552
|
-
kmsId: kmsId,
|
|
1553
|
-
objectId: objectId,
|
|
1554
|
-
versionHash: versionHash,
|
|
1555
|
-
method: method,
|
|
1556
|
-
path: path,
|
|
1557
|
-
bodyType: bodyType,
|
|
1558
|
-
body: body,
|
|
1559
|
-
queryParams: queryParams,
|
|
1560
|
-
headers: headers
|
|
1561
|
-
}));
|
|
1562
|
-
case 2:
|
|
1563
|
-
case "end":
|
|
1564
|
-
return _context22.stop();
|
|
1565
|
-
}
|
|
1566
|
-
}, _callee22, this);
|
|
1567
|
-
}));
|
|
1568
|
-
function MakeAuthServiceRequest(_x18) {
|
|
1569
|
-
return _MakeAuthServiceRequest.apply(this, arguments);
|
|
1570
|
-
}
|
|
1571
|
-
return MakeAuthServiceRequest;
|
|
1572
|
-
}()
|
|
1573
1538
|
/* FrameClient related */
|
|
1574
1539
|
// Whitelist of methods allowed to be called using the frame API
|
|
1575
1540
|
}, {
|
|
@@ -1586,17 +1551,17 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1586
1551
|
}, {
|
|
1587
1552
|
key: "CallFromFrameMessage",
|
|
1588
1553
|
value: function () {
|
|
1589
|
-
var _CallFromFrameMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1554
|
+
var _CallFromFrameMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(message, Respond) {
|
|
1590
1555
|
var _this4 = this;
|
|
1591
1556
|
var callback, method, methodResults, responseError;
|
|
1592
|
-
return _regeneratorRuntime.wrap(function
|
|
1593
|
-
while (1) switch (
|
|
1557
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
1558
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
1594
1559
|
case 0:
|
|
1595
1560
|
if (!(message.type !== "ElvFrameRequest")) {
|
|
1596
|
-
|
|
1561
|
+
_context22.next = 2;
|
|
1597
1562
|
break;
|
|
1598
1563
|
}
|
|
1599
|
-
return
|
|
1564
|
+
return _context22.abrupt("return");
|
|
1600
1565
|
case 2:
|
|
1601
1566
|
if (message.callbackId) {
|
|
1602
1567
|
callback = function callback(result) {
|
|
@@ -1608,75 +1573,75 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1608
1573
|
};
|
|
1609
1574
|
message.args.callback = callback;
|
|
1610
1575
|
}
|
|
1611
|
-
|
|
1576
|
+
_context22.prev = 3;
|
|
1612
1577
|
method = message.calledMethod;
|
|
1613
1578
|
if (!(message.module === "walletClient")) {
|
|
1614
|
-
|
|
1579
|
+
_context22.next = 15;
|
|
1615
1580
|
break;
|
|
1616
1581
|
}
|
|
1617
1582
|
if (this.walletClient) {
|
|
1618
|
-
|
|
1583
|
+
_context22.next = 8;
|
|
1619
1584
|
break;
|
|
1620
1585
|
}
|
|
1621
1586
|
throw Error("Wallet client not set");
|
|
1622
1587
|
case 8:
|
|
1623
1588
|
if (!this.walletClient.ForbiddenMethods().includes(method)) {
|
|
1624
|
-
|
|
1589
|
+
_context22.next = 10;
|
|
1625
1590
|
break;
|
|
1626
1591
|
}
|
|
1627
1592
|
throw Error("Invalid user profile method: " + method);
|
|
1628
1593
|
case 10:
|
|
1629
|
-
|
|
1594
|
+
_context22.next = 12;
|
|
1630
1595
|
return this.walletClient[method](message.args);
|
|
1631
1596
|
case 12:
|
|
1632
|
-
methodResults =
|
|
1633
|
-
|
|
1597
|
+
methodResults = _context22.sent;
|
|
1598
|
+
_context22.next = 28;
|
|
1634
1599
|
break;
|
|
1635
1600
|
case 15:
|
|
1636
1601
|
if (!(message.module === "userProfileClient")) {
|
|
1637
|
-
|
|
1602
|
+
_context22.next = 23;
|
|
1638
1603
|
break;
|
|
1639
1604
|
}
|
|
1640
1605
|
if (this.userProfileClient.FrameAllowedMethods().includes(method)) {
|
|
1641
|
-
|
|
1606
|
+
_context22.next = 18;
|
|
1642
1607
|
break;
|
|
1643
1608
|
}
|
|
1644
1609
|
throw Error("Invalid user profile method: " + method);
|
|
1645
1610
|
case 18:
|
|
1646
|
-
|
|
1611
|
+
_context22.next = 20;
|
|
1647
1612
|
return this.userProfileClient[method](message.args);
|
|
1648
1613
|
case 20:
|
|
1649
|
-
methodResults =
|
|
1650
|
-
|
|
1614
|
+
methodResults = _context22.sent;
|
|
1615
|
+
_context22.next = 28;
|
|
1651
1616
|
break;
|
|
1652
1617
|
case 23:
|
|
1653
1618
|
if (this.FrameAllowedMethods().includes(method)) {
|
|
1654
|
-
|
|
1619
|
+
_context22.next = 25;
|
|
1655
1620
|
break;
|
|
1656
1621
|
}
|
|
1657
1622
|
throw Error("Invalid method: " + method);
|
|
1658
1623
|
case 25:
|
|
1659
|
-
|
|
1624
|
+
_context22.next = 27;
|
|
1660
1625
|
return this[method](message.args);
|
|
1661
1626
|
case 27:
|
|
1662
|
-
methodResults =
|
|
1627
|
+
methodResults = _context22.sent;
|
|
1663
1628
|
case 28:
|
|
1664
1629
|
Respond(this.utils.MakeClonable({
|
|
1665
1630
|
type: "ElvFrameResponse",
|
|
1666
1631
|
requestId: message.requestId,
|
|
1667
1632
|
response: methodResults
|
|
1668
1633
|
}));
|
|
1669
|
-
|
|
1634
|
+
_context22.next = 37;
|
|
1670
1635
|
break;
|
|
1671
1636
|
case 31:
|
|
1672
|
-
|
|
1673
|
-
|
|
1637
|
+
_context22.prev = 31;
|
|
1638
|
+
_context22.t0 = _context22["catch"](3);
|
|
1674
1639
|
// eslint-disable-next-line no-console
|
|
1675
|
-
this.Log("Frame Message Error:\n Method: ".concat(message.calledMethod, "\n Arguments: ").concat(JSON.stringify(message.args, null, 2), "\n Error: ").concat(_typeof(
|
|
1640
|
+
this.Log("Frame Message Error:\n Method: ".concat(message.calledMethod, "\n Arguments: ").concat(JSON.stringify(message.args, null, 2), "\n Error: ").concat(_typeof(_context22.t0) === "object" ? JSON.stringify(_context22.t0, null, 2) : _context22.t0), true);
|
|
1676
1641
|
|
|
1677
1642
|
// eslint-disable-next-line no-console
|
|
1678
|
-
console.error(
|
|
1679
|
-
responseError =
|
|
1643
|
+
console.error(_context22.t0);
|
|
1644
|
+
responseError = _context22.t0 instanceof Error ? _context22.t0.message : _context22.t0;
|
|
1680
1645
|
Respond(this.utils.MakeClonable({
|
|
1681
1646
|
type: "ElvFrameResponse",
|
|
1682
1647
|
requestId: message.requestId,
|
|
@@ -1684,11 +1649,11 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1684
1649
|
}));
|
|
1685
1650
|
case 37:
|
|
1686
1651
|
case "end":
|
|
1687
|
-
return
|
|
1652
|
+
return _context22.stop();
|
|
1688
1653
|
}
|
|
1689
|
-
},
|
|
1654
|
+
}, _callee22, this, [[3, 31]]);
|
|
1690
1655
|
}));
|
|
1691
|
-
function CallFromFrameMessage(
|
|
1656
|
+
function CallFromFrameMessage(_x18, _x19) {
|
|
1692
1657
|
return _CallFromFrameMessage.apply(this, arguments);
|
|
1693
1658
|
}
|
|
1694
1659
|
return CallFromFrameMessage;
|
|
@@ -1696,13 +1661,13 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1696
1661
|
}], [{
|
|
1697
1662
|
key: "Configuration",
|
|
1698
1663
|
value: function () {
|
|
1699
|
-
var _Configuration = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1700
|
-
var configUrl,
|
|
1701
|
-
return _regeneratorRuntime.wrap(function
|
|
1702
|
-
while (1) switch (
|
|
1664
|
+
var _Configuration = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(_ref26) {
|
|
1665
|
+
var configUrl, _ref26$kmsUrls, kmsUrls, region, clientIP, uri, fabricInfo, filterHTTPS, fabricURIs, ethereumURIs, authServiceURIs, searchURIs, fabricVersion;
|
|
1666
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
|
1667
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
1703
1668
|
case 0:
|
|
1704
|
-
configUrl =
|
|
1705
|
-
|
|
1669
|
+
configUrl = _ref26.configUrl, _ref26$kmsUrls = _ref26.kmsUrls, kmsUrls = _ref26$kmsUrls === void 0 ? [] : _ref26$kmsUrls, region = _ref26.region, clientIP = _ref26.clientIP;
|
|
1670
|
+
_context23.prev = 1;
|
|
1706
1671
|
uri = new URI(configUrl);
|
|
1707
1672
|
uri.pathname("/config");
|
|
1708
1673
|
if (region) {
|
|
@@ -1711,10 +1676,10 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1711
1676
|
if (clientIP) {
|
|
1712
1677
|
uri.addSearch("client_ip", clientIP);
|
|
1713
1678
|
}
|
|
1714
|
-
|
|
1679
|
+
_context23.next = 8;
|
|
1715
1680
|
return Utils.ResponseToJson(HttpClient.Fetch(uri.toString()));
|
|
1716
1681
|
case 8:
|
|
1717
|
-
fabricInfo =
|
|
1682
|
+
fabricInfo = _context23.sent;
|
|
1718
1683
|
// If any HTTPS urls present, throw away HTTP urls so only HTTPS will be used
|
|
1719
1684
|
filterHTTPS = function filterHTTPS(uri) {
|
|
1720
1685
|
return uri.toLowerCase().startsWith("https");
|
|
@@ -1733,7 +1698,7 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1733
1698
|
}
|
|
1734
1699
|
searchURIs = fabricInfo.network.services.search || [];
|
|
1735
1700
|
fabricVersion = Math.max.apply(Math, _toConsumableArray(fabricInfo.network.api_versions || [2]));
|
|
1736
|
-
return
|
|
1701
|
+
return _context23.abrupt("return", {
|
|
1737
1702
|
nodeId: fabricInfo.node_id,
|
|
1738
1703
|
contentSpaceId: fabricInfo.qspace.id,
|
|
1739
1704
|
networkId: (fabricInfo.qspace.ethereum || {}).network_id,
|
|
@@ -1746,20 +1711,20 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1746
1711
|
fabricVersion: fabricVersion
|
|
1747
1712
|
});
|
|
1748
1713
|
case 21:
|
|
1749
|
-
|
|
1750
|
-
|
|
1714
|
+
_context23.prev = 21;
|
|
1715
|
+
_context23.t0 = _context23["catch"](1);
|
|
1751
1716
|
// eslint-disable-next-line no-console
|
|
1752
1717
|
console.error("Error retrieving fabric configuration:");
|
|
1753
1718
|
// eslint-disable-next-line no-console
|
|
1754
|
-
console.error(
|
|
1755
|
-
throw
|
|
1719
|
+
console.error(_context23.t0);
|
|
1720
|
+
throw _context23.t0;
|
|
1756
1721
|
case 26:
|
|
1757
1722
|
case "end":
|
|
1758
|
-
return
|
|
1723
|
+
return _context23.stop();
|
|
1759
1724
|
}
|
|
1760
|
-
},
|
|
1725
|
+
}, _callee23, null, [[1, 21]]);
|
|
1761
1726
|
}));
|
|
1762
|
-
function Configuration(
|
|
1727
|
+
function Configuration(_x20) {
|
|
1763
1728
|
return _Configuration.apply(this, arguments);
|
|
1764
1729
|
}
|
|
1765
1730
|
return Configuration;
|
|
@@ -1783,20 +1748,20 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1783
1748
|
}, {
|
|
1784
1749
|
key: "FromNetworkName",
|
|
1785
1750
|
value: function () {
|
|
1786
|
-
var _FromNetworkName = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1787
|
-
var networkName, region, clientIP, trustAuthorityId, staticToken,
|
|
1788
|
-
return _regeneratorRuntime.wrap(function
|
|
1789
|
-
while (1) switch (
|
|
1751
|
+
var _FromNetworkName = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(_ref27) {
|
|
1752
|
+
var networkName, region, clientIP, trustAuthorityId, staticToken, _ref27$ethereumContra, ethereumContractTimeout, _ref27$noCache, noCache, _ref27$noAuth, noAuth, assumeV3, configUrl;
|
|
1753
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
|
1754
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
1790
1755
|
case 0:
|
|
1791
|
-
networkName =
|
|
1756
|
+
networkName = _ref27.networkName, region = _ref27.region, clientIP = _ref27.clientIP, trustAuthorityId = _ref27.trustAuthorityId, staticToken = _ref27.staticToken, _ref27$ethereumContra = _ref27.ethereumContractTimeout, ethereumContractTimeout = _ref27$ethereumContra === void 0 ? 10 : _ref27$ethereumContra, _ref27$noCache = _ref27.noCache, noCache = _ref27$noCache === void 0 ? false : _ref27$noCache, _ref27$noAuth = _ref27.noAuth, noAuth = _ref27$noAuth === void 0 ? false : _ref27$noAuth, assumeV3 = _ref27.assumeV3;
|
|
1792
1757
|
configUrl = networks[networkName];
|
|
1793
1758
|
if (configUrl) {
|
|
1794
|
-
|
|
1759
|
+
_context24.next = 4;
|
|
1795
1760
|
break;
|
|
1796
1761
|
}
|
|
1797
1762
|
throw Error("Invalid network name: " + networkName);
|
|
1798
1763
|
case 4:
|
|
1799
|
-
|
|
1764
|
+
_context24.next = 6;
|
|
1800
1765
|
return this.FromConfigurationUrl({
|
|
1801
1766
|
configUrl: configUrl,
|
|
1802
1767
|
region: region,
|
|
@@ -1809,14 +1774,14 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1809
1774
|
assumeV3: assumeV3
|
|
1810
1775
|
});
|
|
1811
1776
|
case 6:
|
|
1812
|
-
return
|
|
1777
|
+
return _context24.abrupt("return", _context24.sent);
|
|
1813
1778
|
case 7:
|
|
1814
1779
|
case "end":
|
|
1815
|
-
return
|
|
1780
|
+
return _context24.stop();
|
|
1816
1781
|
}
|
|
1817
|
-
},
|
|
1782
|
+
}, _callee24, this);
|
|
1818
1783
|
}));
|
|
1819
|
-
function FromNetworkName(
|
|
1784
|
+
function FromNetworkName(_x21) {
|
|
1820
1785
|
return _FromNetworkName.apply(this, arguments);
|
|
1821
1786
|
}
|
|
1822
1787
|
return FromNetworkName;
|
|
@@ -1840,20 +1805,20 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1840
1805
|
}, {
|
|
1841
1806
|
key: "FromConfigurationUrl",
|
|
1842
1807
|
value: function () {
|
|
1843
|
-
var _FromConfigurationUrl = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1844
|
-
var configUrl, region, clientIP, trustAuthorityId, staticToken,
|
|
1845
|
-
return _regeneratorRuntime.wrap(function
|
|
1846
|
-
while (1) switch (
|
|
1808
|
+
var _FromConfigurationUrl = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(_ref28) {
|
|
1809
|
+
var configUrl, region, clientIP, trustAuthorityId, staticToken, _ref28$ethereumContra, ethereumContractTimeout, _ref28$noCache, noCache, _ref28$noAuth, noAuth, _ref28$assumeV, assumeV3, _yield$ElvClient$Conf3, contentSpaceId, networkId, networkName, fabricURIs, ethereumURIs, authServiceURIs, searchURIs, fabricVersion, client;
|
|
1810
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
1811
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
1847
1812
|
case 0:
|
|
1848
|
-
configUrl =
|
|
1849
|
-
|
|
1813
|
+
configUrl = _ref28.configUrl, region = _ref28.region, clientIP = _ref28.clientIP, trustAuthorityId = _ref28.trustAuthorityId, staticToken = _ref28.staticToken, _ref28$ethereumContra = _ref28.ethereumContractTimeout, ethereumContractTimeout = _ref28$ethereumContra === void 0 ? 10 : _ref28$ethereumContra, _ref28$noCache = _ref28.noCache, noCache = _ref28$noCache === void 0 ? false : _ref28$noCache, _ref28$noAuth = _ref28.noAuth, noAuth = _ref28$noAuth === void 0 ? false : _ref28$noAuth, _ref28$assumeV = _ref28.assumeV3, assumeV3 = _ref28$assumeV === void 0 ? false : _ref28$assumeV;
|
|
1814
|
+
_context25.next = 3;
|
|
1850
1815
|
return ElvClient.Configuration({
|
|
1851
1816
|
configUrl: configUrl,
|
|
1852
1817
|
clientIP: clientIP,
|
|
1853
1818
|
region: region
|
|
1854
1819
|
});
|
|
1855
1820
|
case 3:
|
|
1856
|
-
_yield$ElvClient$Conf3 =
|
|
1821
|
+
_yield$ElvClient$Conf3 = _context25.sent;
|
|
1857
1822
|
contentSpaceId = _yield$ElvClient$Conf3.contentSpaceId;
|
|
1858
1823
|
networkId = _yield$ElvClient$Conf3.networkId;
|
|
1859
1824
|
networkName = _yield$ElvClient$Conf3.networkName;
|
|
@@ -1879,14 +1844,14 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1879
1844
|
assumeV3: assumeV3
|
|
1880
1845
|
});
|
|
1881
1846
|
client.configUrl = configUrl;
|
|
1882
|
-
return
|
|
1847
|
+
return _context25.abrupt("return", client);
|
|
1883
1848
|
case 15:
|
|
1884
1849
|
case "end":
|
|
1885
|
-
return
|
|
1850
|
+
return _context25.stop();
|
|
1886
1851
|
}
|
|
1887
|
-
},
|
|
1852
|
+
}, _callee25);
|
|
1888
1853
|
}));
|
|
1889
|
-
function FromConfigurationUrl(
|
|
1854
|
+
function FromConfigurationUrl(_x22) {
|
|
1890
1855
|
return _FromConfigurationUrl.apply(this, arguments);
|
|
1891
1856
|
}
|
|
1892
1857
|
return FromConfigurationUrl;
|
package/dist/src/EthClient.js
CHANGED
|
@@ -8,8 +8,8 @@ var _createClass = require("@babel/runtime/helpers/createClass");
|
|
|
8
8
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
9
9
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
10
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
|
-
function ownKeys(
|
|
12
|
-
function _objectSpread(
|
|
11
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
13
|
// NOTE: Querying Ethereum requires CORS enabled
|
|
14
14
|
// Use --rpccorsdomain "http[s]://hostname:port" or set up proxy
|
|
15
15
|
var Ethers = require("ethers");
|
package/dist/src/FrameClient.js
CHANGED
|
@@ -3,8 +3,8 @@ var _regeneratorRuntime = require("@babel/runtime/regenerator");
|
|
|
3
3
|
var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
4
4
|
var _classCallCheck = require("@babel/runtime/helpers/classCallCheck");
|
|
5
5
|
var _createClass = require("@babel/runtime/helpers/createClass");
|
|
6
|
-
function ownKeys(
|
|
7
|
-
function _objectSpread(
|
|
6
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
8
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
9
9
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
10
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
@@ -449,7 +449,7 @@ var FrameClient = /*#__PURE__*/function () {
|
|
|
449
449
|
}, {
|
|
450
450
|
key: "AllowedMethods",
|
|
451
451
|
value: function AllowedMethods() {
|
|
452
|
-
return ["AccessGroupManagers", "AccessGroupMembers", "AccessGroupOwner", "AccessInfo", "AccessRequest", "AccessType", "AddAccessGroupManager", "AddAccessGroupMember", "AddContentLibraryGroup", "AddContentObjectGroupPermission", "AddLibraryContentType", "AssetMetadata", "AvailableDRMs", "AvailableOfferings", "AwaitPending", "BitmovinPlayoutOptions", "BlockNumber", "CallBitcodeMethod", "CallContractMethod", "CallContractMethodAndWait", "ClearCache", "ClearStaticToken", "Collection", "CollectionTransactions", "ConfigUrl", "ContentLibraries", "ContentLibrary", "ContentLibraryGroupPermissions", "ContentLibraryOwner", "ContentObject", "ContentObjectAccessComplete", "ContentObjectGraph", "ContentObjectGroupPermissions", "ContentObjectImageUrl", "ContentObjectLibraryId", "ContentObjectMetadata", "ContentObjectOwner", "ContentObjectTenantId", "ContentObjectVersions", "ContentObjects", "ContentPart", "ContentParts", "ContentSpaceId", "ContentType", "ContentTypeOwner", "ContentTypes", "ContractAbi", "ContractEvents", "
|
|
452
|
+
return ["AccessGroupManagers", "AccessGroupMembers", "AccessGroupOwner", "AccessInfo", "AccessRequest", "AccessType", "AddAccessGroupManager", "AddAccessGroupMember", "AddContentLibraryGroup", "AddContentObjectGroupPermission", "AddLibraryContentType", "AssetMetadata", "AvailableDRMs", "AvailableOfferings", "AwaitPending", "BitmovinPlayoutOptions", "BlockNumber", "CallBitcodeMethod", "CallContractMethod", "CallContractMethodAndWait", "ClearCache", "ClearStaticToken", "Collection", "CollectionTransactions", "ConfigUrl", "ContentLibraries", "ContentLibrary", "ContentLibraryGroupPermissions", "ContentLibraryOwner", "ContentObject", "ContentObjectAccessComplete", "ContentObjectGraph", "ContentObjectGroupPermissions", "ContentObjectImageUrl", "ContentObjectLibraryId", "ContentObjectMetadata", "ContentObjectOwner", "ContentObjectTenantId", "ContentObjectVersions", "ContentObjects", "ContentPart", "ContentParts", "ContentSpaceId", "ContentType", "ContentTypeOwner", "ContentTypes", "ContractAbi", "ContractEvents", "ContractMetadata", "ContractName", "CopyContentObject", "CreateABRMezzanine", "CreateAccessGroup", "CreateAndFinalizeContentObject", "CreateContentLibrary", "CreateContentObject", "CreateContentType", "CreateEncryptionConk", "CreateFabricToken", "CreateFileDirectories", "CreateFileUploadJob", "CreateLinks", "CreateNTPInstance", "CreateNonOwnerCap", "CreatePart", "CreateProductionMaster", "CreateSignedToken", "CurrentAccountAddress", "CustomContractAddress", "Decrypt", "DecryptECIES", "DefaultKMSAddress", "DeleteAccessGroup", "DeleteContentLibrary", "DeleteContentObject", "DeleteContentVersion", "DeleteFiles", "DeleteMetadata", "DeleteNTPInstance", "DeletePart", "DeployContract", "Download", "DownloadEncrypted", "DownloadFile", "DownloadPart", "EditAndFinalizeContentObject", "EditContentObject", "EmbedUrl", "Encrypt", "EncryptECIES", "EncryptionConk", "Events", "ExtractEventFromLogs", "ExtractValueFromEvent", "FabricUrl", "FileUrl", "FinalizeABRMezzanine", "FinalizeContentObject", "FinalizePart", "FinalizeStateChannelAccess", "FinalizeUploadJob", "FormatContractArguments", "GenerateStateChannelToken", "GenerateSignedLinkToken", "GetBalance", "InitializeAuthPolicy", "IssueNTPCode", "IssueSignedNTPCode", "LatestVersionHash", "LibraryContentTypes", "LinkAccessGroupToOauth", "LinkData", "LinkTarget", "LinkUrl", "ListAccessGroups", "ListFiles", "ListNTPInstances", "LRODraftInfo", "LROStatus", "MergeContractMetadata", "MergeMetadata", "MetadataAuth", "MintNFT", "MoveFiles", "NetworkInfo", "NodeId", "Nodes", "NTPInstance", "Permission", "PlayoutOptions", "PlayoutPathResolution", "ProduceMetadataLinks", "Proofs", "PublicRep", "PublishContentVersion", "QParts", "RecordWriteToken", "RedeemCode", "RemoveAccessGroupManager", "RemoveAccessGroupMember", "RemoveContentObjectGroupPermission", "RemoveContentLibraryGroup", "RemoveLibraryContentType", "Rep", "ReplaceContractMetadata", "ReplaceMetadata", "Request", "ResetRegion", "SendFunds", "SetAccessCharge", "SetAuth", "SetAuthContext", "SetAuthPolicy", "SetContentLibraryImage", "SetContentObjectImage", "SetCustomContentContract", "SetGroupPermission", "SetNodes", "SetOauthToken", "SetPolicyAuthorization", "SetSignerFromOauthToken", "SetStaticToken", "SetVisibility", "SetPermission", "SpaceNodes", "StartABRMezzanineJobs", "StreamConfig", "StreamCreate", "StreamStatus", "StreamStartOrStopOrReset", "SuspendNTPInstance", "UnlinkAccessGroupFromOauth", "UpdateContentObjectGraph", "UpdateNTPInstance", "UploadFileData", "UploadFilesFromS3", "UploadJobStatus", "UploadPart", "UploadPartChunk", "UploadStatus", "UseRegion", "VerifyContentObject", "Visibility"];
|
|
453
453
|
}
|
|
454
454
|
}, {
|
|
455
455
|
key: "AllowedUserProfileMethods",
|
|
@@ -459,7 +459,7 @@ var FrameClient = /*#__PURE__*/function () {
|
|
|
459
459
|
}, {
|
|
460
460
|
key: "AllowedWalletClientMethods",
|
|
461
461
|
value: function AllowedWalletClientMethods() {
|
|
462
|
-
return ["AcceptMarketplaceOffer", "AddNotificationListener", "AvailableMarketplaces", "CanSign", "CastVote", "ClaimItem", "ClaimStatus", "CollectionRedemptionStatus", "CreateListing", "CreateMarketplaceOffer", "
|
|
462
|
+
return ["AcceptMarketplaceOffer", "AddNotificationListener", "AvailableMarketplaces", "CanSign", "CastVote", "ClaimItem", "ClaimStatus", "CollectionRedemptionStatus", "CreateListing", "CreateMarketplaceOffer", "DropStatus", "ExchangeRate", "FilteredQuery", "LatestMarketplaceHash", "Leaderboard", "Listing", "ListingAttributes", "ListingEditionNames", "ListingNames", "ListingPurchaseStatus", "ListingStats", "ListingStatus", "Listings", "LoadAvailableMarketplaces", "LoadDrop", "LoadMarketplace", "Marketplace", "MarketplaceCSS", "MarketplaceInfo", "MarketplaceOffers", "MarketplaceStock", "MintingStatus", "NFT", "NFTContractStats", "Notifications", "PackOpenStatus", "Profile", "ProfileMetadata", "PurchaseStatus", "PushNotification", "RejectMarketplaceOffer", "RemoveListing", "RemoveMarketplaceOffer", "RemoveProfileMetadata", "RevokeVote", "Sales", "SalesNames", "SalesStats", "SetProfileMetadata", "SubmitDropVote", "TenantConfiguration", "TransferNFT", "Transfers", "UserAddress", "UserInfo", "UserItemAttributes", "UserItemEditionNames", "UserItemNames", "UserItems", "UserListings", "UserNameToAddress", "UserSales", "UserTransfers", "UserWalletBalance", "VoteStatus"];
|
|
463
463
|
}
|
|
464
464
|
}], [{
|
|
465
465
|
key: "PromptedMethods",
|
|
@@ -3,8 +3,8 @@ var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
|
3
3
|
var _defineProperty = require("@babel/runtime/helpers/defineProperty");
|
|
4
4
|
var _classCallCheck = require("@babel/runtime/helpers/classCallCheck");
|
|
5
5
|
var _createClass = require("@babel/runtime/helpers/createClass");
|
|
6
|
-
function ownKeys(
|
|
7
|
-
function _objectSpread(
|
|
6
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
8
|
var UrlJoin = require("url-join");
|
|
9
9
|
var _require = require("./Validation"),
|
|
10
10
|
ValidatePresence = _require.ValidatePresence,
|