@eluvio/elv-client-js 4.0.145 → 4.0.147
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 +14 -15
- package/dist/ElvClient-node-min.js +13 -14
- package/dist/ElvFrameClient-min.js +10 -10
- package/dist/ElvPermissionsClient-min.js +9 -9
- package/dist/ElvWalletClient-min.js +14 -15
- package/dist/ElvWalletClient-node-min.js +13 -14
- package/dist/src/AuthorizationClient.js +12 -9
- package/dist/src/ContentObjectAudit.js +3 -3
- package/dist/src/ContentObjectVerification.js +3 -3
- package/dist/src/Crypto.js +2 -2
- package/dist/src/ElvClient.js +30 -49
- package/dist/src/ElvWallet.js +5 -7
- package/dist/src/EthClient.js +9 -8
- package/dist/src/FrameClient.js +9 -8
- package/dist/src/HttpClient.js +2 -1
- package/dist/src/Id.js +2 -1
- package/dist/src/PermissionsClient.js +19 -31
- package/dist/src/RemoteSigner.js +8 -6
- package/dist/src/UserProfileClient.js +20 -35
- package/dist/src/Utils.js +3 -2
- package/dist/src/Validation.js +2 -10
- package/dist/src/client/ABRPublishing.js +252 -307
- package/dist/src/client/AccessGroups.js +2 -2
- package/dist/src/client/ContentAccess.js +3 -2
- package/dist/src/client/ContentManagement.js +3 -3
- package/dist/src/client/Contracts.js +12 -11
- package/dist/src/client/Files.js +2 -2
- package/dist/src/client/LiveConf.js +5 -3
- package/dist/src/client/LiveStream.js +2 -0
- package/dist/src/client/NFT.js +2 -2
- package/dist/src/client/Shares.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 +2 -2
- package/dist/src/walletClient/index.js +14 -17
- package/package.json +1 -1
- package/src/ElvClient.js +1 -0
- package/src/FrameClient.js +12 -0
- package/src/client/ABRPublishing.js +2 -1
- package/src/client/ContentAccess.js +44 -71
|
@@ -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,8 +38,8 @@ var ACCESS_TYPES = {
|
|
|
37
38
|
OTHER: "other"
|
|
38
39
|
};
|
|
39
40
|
var CONTRACTS = {
|
|
40
|
-
v2:
|
|
41
|
-
v3:
|
|
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),
|
|
42
43
|
v3b: _defineProperty({}, ACCESS_TYPES.GROUP, require("./contracts/v3b/BaseAccessControlGroup"))
|
|
43
44
|
};
|
|
44
45
|
var AuthorizationClient = /*#__PURE__*/function () {
|
|
@@ -76,7 +77,7 @@ var AuthorizationClient = /*#__PURE__*/function () {
|
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
// Return authorization token in appropriate headers
|
|
79
|
-
|
|
80
|
+
_createClass(AuthorizationClient, [{
|
|
80
81
|
key: "Log",
|
|
81
82
|
value: function Log(message) {
|
|
82
83
|
var error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
@@ -1031,6 +1032,7 @@ var AuthorizationClient = /*#__PURE__*/function () {
|
|
|
1031
1032
|
}
|
|
1032
1033
|
}
|
|
1033
1034
|
}
|
|
1035
|
+
|
|
1034
1036
|
if (isV3 && (!args || args.length === 0)) {
|
|
1035
1037
|
args = [[],
|
|
1036
1038
|
// customValues
|
|
@@ -1177,7 +1179,7 @@ var AuthorizationClient = /*#__PURE__*/function () {
|
|
|
1177
1179
|
}() /* Utility methods */
|
|
1178
1180
|
}, {
|
|
1179
1181
|
key: "ContractInfo",
|
|
1180
|
-
value:
|
|
1182
|
+
value: function () {
|
|
1181
1183
|
var _ContractInfo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(_ref14) {
|
|
1182
1184
|
var id, address, isV3, contractName, accessType, v3Version, version;
|
|
1183
1185
|
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
@@ -1228,7 +1230,7 @@ var AuthorizationClient = /*#__PURE__*/function () {
|
|
|
1228
1230
|
return _ContractInfo.apply(this, arguments);
|
|
1229
1231
|
}
|
|
1230
1232
|
return ContractInfo;
|
|
1231
|
-
}()
|
|
1233
|
+
}()
|
|
1232
1234
|
}, {
|
|
1233
1235
|
key: "GetAccessCharge",
|
|
1234
1236
|
value: function () {
|
|
@@ -2030,7 +2032,7 @@ var AuthorizationClient = /*#__PURE__*/function () {
|
|
|
2030
2032
|
}() /* Creation methods */
|
|
2031
2033
|
}, {
|
|
2032
2034
|
key: "CreateAccessGroup",
|
|
2033
|
-
value:
|
|
2035
|
+
value: function () {
|
|
2034
2036
|
var _CreateAccessGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30() {
|
|
2035
2037
|
var _yield$this$client$et, contractAddress, transactionHash;
|
|
2036
2038
|
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
@@ -2059,7 +2061,7 @@ var AuthorizationClient = /*#__PURE__*/function () {
|
|
|
2059
2061
|
return _CreateAccessGroup.apply(this, arguments);
|
|
2060
2062
|
}
|
|
2061
2063
|
return CreateAccessGroup;
|
|
2062
|
-
}()
|
|
2064
|
+
}()
|
|
2063
2065
|
}, {
|
|
2064
2066
|
key: "CreateContentType",
|
|
2065
2067
|
value: function () {
|
|
@@ -2168,5 +2170,6 @@ var AuthorizationClient = /*#__PURE__*/function () {
|
|
|
2168
2170
|
this.channelContentTokens = {};
|
|
2169
2171
|
}
|
|
2170
2172
|
}]);
|
|
2173
|
+
return AuthorizationClient;
|
|
2171
2174
|
}();
|
|
2172
2175
|
module.exports = AuthorizationClient;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var _regeneratorRuntime = require("@babel/runtime/regenerator");
|
|
2
2
|
var _toConsumableArray = require("@babel/runtime/helpers/toConsumableArray");
|
|
3
3
|
var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
4
|
-
function _createForOfIteratorHelper(
|
|
5
|
-
function _unsupportedIterableToArray(
|
|
6
|
-
function _arrayLikeToArray(
|
|
4
|
+
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; } } }; }
|
|
5
|
+
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); }
|
|
6
|
+
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; }
|
|
7
7
|
var UrlJoin = require("url-join");
|
|
8
8
|
var HttpClient = require("./HttpClient");
|
|
9
9
|
var UUID = require("uuid").v4;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var _regeneratorRuntime = require("@babel/runtime/regenerator");
|
|
2
2
|
var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
3
|
-
function _createForOfIteratorHelper(
|
|
4
|
-
function _unsupportedIterableToArray(
|
|
5
|
-
function _arrayLikeToArray(
|
|
3
|
+
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; } } }; }
|
|
4
|
+
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); }
|
|
5
|
+
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; }
|
|
6
6
|
var CBOR = require("cbor");
|
|
7
7
|
var SJCL = require("sjcl");
|
|
8
8
|
var MultiHash = require("multihashes");
|
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
|
}
|
|
@@ -147,7 +147,7 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
147
147
|
* @param {string=} clientIP - IP address to use in determining the region to use
|
|
148
148
|
* @return {Promise<Object>} - Object containing content space ID and fabric and ethereum URLs
|
|
149
149
|
*/
|
|
150
|
-
|
|
150
|
+
_createClass(ElvClient, [{
|
|
151
151
|
key: "Log",
|
|
152
152
|
value: function Log(message) {
|
|
153
153
|
var error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
@@ -347,7 +347,7 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
347
347
|
*/
|
|
348
348
|
}, {
|
|
349
349
|
key: "UseRegion",
|
|
350
|
-
value:
|
|
350
|
+
value: function () {
|
|
351
351
|
var _UseRegion = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref4) {
|
|
352
352
|
var region, _yield$ElvClient$Conf, fabricURIs, ethereumURIs, authServiceURIs, fileServiceURIs, searchURIs;
|
|
353
353
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
@@ -407,10 +407,9 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
407
407
|
*
|
|
408
408
|
* @return {Promise<Object>} - An object containing the updated fabric and ethereum URLs in order of preference
|
|
409
409
|
*/
|
|
410
|
-
)
|
|
411
410
|
}, {
|
|
412
411
|
key: "ResetRegion",
|
|
413
|
-
value:
|
|
412
|
+
value: function () {
|
|
414
413
|
var _ResetRegion = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
|
415
414
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
416
415
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -450,10 +449,9 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
450
449
|
*
|
|
451
450
|
* @return {Promise<string>} - The node ID reported by the fabric
|
|
452
451
|
*/
|
|
453
|
-
)
|
|
454
452
|
}, {
|
|
455
453
|
key: "NodeId",
|
|
456
|
-
value:
|
|
454
|
+
value: function () {
|
|
457
455
|
var _NodeId = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(_ref5) {
|
|
458
456
|
var region, _yield$ElvClient$Conf2, nodeId;
|
|
459
457
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
@@ -487,7 +485,6 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
487
485
|
*
|
|
488
486
|
* @return {Promise<Object>} - An object containing the lists of fabric, ethereum, auth service, and search urls in use by the client
|
|
489
487
|
*/
|
|
490
|
-
)
|
|
491
488
|
}, {
|
|
492
489
|
key: "Nodes",
|
|
493
490
|
value: function Nodes() {
|
|
@@ -560,7 +557,7 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
560
557
|
*/
|
|
561
558
|
}, {
|
|
562
559
|
key: "SpaceNodes",
|
|
563
|
-
value:
|
|
560
|
+
value: function () {
|
|
564
561
|
var _SpaceNodes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
|
|
565
562
|
var _this = this;
|
|
566
563
|
var _ref7,
|
|
@@ -672,7 +669,6 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
672
669
|
* @methodGroup Nodes
|
|
673
670
|
* @returns {Object} - The name, ID and configuration URL of the network
|
|
674
671
|
*/
|
|
675
|
-
)
|
|
676
672
|
}, {
|
|
677
673
|
key: "NetworkInfo",
|
|
678
674
|
value: function NetworkInfo() {
|
|
@@ -694,7 +690,7 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
694
690
|
*/
|
|
695
691
|
}, {
|
|
696
692
|
key: "WriteTokenNodeUrlNetwork",
|
|
697
|
-
value:
|
|
693
|
+
value: function () {
|
|
698
694
|
var _WriteTokenNodeUrlNetwork = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(_ref8) {
|
|
699
695
|
var writeToken, nodes, nodeUrl;
|
|
700
696
|
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
@@ -738,7 +734,6 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
738
734
|
*
|
|
739
735
|
* @returns {string} - The node url for a write token
|
|
740
736
|
*/
|
|
741
|
-
)
|
|
742
737
|
}, {
|
|
743
738
|
key: "WriteTokenNodeUrlLocal",
|
|
744
739
|
value: function WriteTokenNodeUrlLocal(_ref9) {
|
|
@@ -828,7 +823,7 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
828
823
|
*/
|
|
829
824
|
}, {
|
|
830
825
|
key: "SetRemoteSigner",
|
|
831
|
-
value:
|
|
826
|
+
value: function () {
|
|
832
827
|
var _SetRemoteSigner = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(_ref12) {
|
|
833
828
|
var idToken, authToken, tenantId, extraData, signerURIs, unsignedPublicAuth, signer;
|
|
834
829
|
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
@@ -883,10 +878,9 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
883
878
|
* @namedParams
|
|
884
879
|
* @param {object} provider - The web3 provider object
|
|
885
880
|
*/
|
|
886
|
-
)
|
|
887
881
|
}, {
|
|
888
882
|
key: "SetSignerFromWeb3Provider",
|
|
889
|
-
value:
|
|
883
|
+
value: function () {
|
|
890
884
|
var _SetSignerFromWeb3Provider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(_ref13) {
|
|
891
885
|
var provider, ethProvider;
|
|
892
886
|
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
@@ -929,10 +923,9 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
929
923
|
*
|
|
930
924
|
* @return {string} - The address of the user
|
|
931
925
|
*/
|
|
932
|
-
)
|
|
933
926
|
}, {
|
|
934
927
|
key: "CreateAccount",
|
|
935
|
-
value:
|
|
928
|
+
value: function () {
|
|
936
929
|
var _CreateAccount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(_ref14) {
|
|
937
930
|
var tenantId, fundingToken, _ref14$funds, funds, groupToken, wallet, signer;
|
|
938
931
|
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
@@ -1007,10 +1000,9 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1007
1000
|
PAYLOAD 85b json-compressed
|
|
1008
1001
|
json 79b {"adr":"VVf4DQU357tDnZGYQeDrntRJ5rs=","spc":"ispc3ANoVSzNA3P6t7abLR69ho5YPPZU"}
|
|
1009
1002
|
*/
|
|
1010
|
-
)
|
|
1011
1003
|
}, {
|
|
1012
1004
|
key: "PersonalSign",
|
|
1013
|
-
value:
|
|
1005
|
+
value: function () {
|
|
1014
1006
|
var _PersonalSign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(_ref15) {
|
|
1015
1007
|
var _this2 = this;
|
|
1016
1008
|
var message, addEthereumPrefix, Sign;
|
|
@@ -1084,10 +1076,9 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1084
1076
|
* @param {function=} Sign - If specified, this function will be used to produce the signature instead of the client's current signer
|
|
1085
1077
|
* @param {boolean=} addEthereumPrefix=true - If specified, the 'Ethereum Signed Message' prefixed hash format will be performed. Disable this if the provided Sign method already does this (e.g. Metamask)
|
|
1086
1078
|
*/
|
|
1087
|
-
)
|
|
1088
1079
|
}, {
|
|
1089
1080
|
key: "CreateFabricToken",
|
|
1090
|
-
value:
|
|
1081
|
+
value: function () {
|
|
1091
1082
|
var _CreateFabricToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13() {
|
|
1092
1083
|
var _ref17,
|
|
1093
1084
|
_ref17$duration,
|
|
@@ -1171,10 +1162,9 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1171
1162
|
* @param {number=} issueTime - Issue Time in milliseconds
|
|
1172
1163
|
* @param {number=} expirationTime - Expiration Time in milliseconds
|
|
1173
1164
|
*/
|
|
1174
|
-
)
|
|
1175
1165
|
}, {
|
|
1176
1166
|
key: "CreateSignedToken",
|
|
1177
|
-
value:
|
|
1167
|
+
value: function () {
|
|
1178
1168
|
var _CreateSignedToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(_ref18) {
|
|
1179
1169
|
var libraryId, objectId, versionHash, policyId, subject, _ref18$grantType, grantType, _ref18$allowDecryptio, allowDecryption, duration, _ref18$context, context, issueTime, expirationTime, issueDateTime, token, cap, compressedToken, signature;
|
|
1180
1170
|
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
@@ -1273,7 +1263,7 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1273
1263
|
return _CreateSignedToken.apply(this, arguments);
|
|
1274
1264
|
}
|
|
1275
1265
|
return CreateSignedToken;
|
|
1276
|
-
}()
|
|
1266
|
+
}()
|
|
1277
1267
|
}, {
|
|
1278
1268
|
key: "CreateAuthorizationToken",
|
|
1279
1269
|
value: function () {
|
|
@@ -1312,7 +1302,7 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1312
1302
|
*/
|
|
1313
1303
|
}, {
|
|
1314
1304
|
key: "CreateSignedMessageJSON",
|
|
1315
|
-
value:
|
|
1305
|
+
value: function () {
|
|
1316
1306
|
var _CreateSignedMessageJSON = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(_ref19) {
|
|
1317
1307
|
var message, type, msg, signature;
|
|
1318
1308
|
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
@@ -1349,10 +1339,9 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1349
1339
|
* @param {string} signedMessage - a signed message as created by CreateSignedMessageJSON
|
|
1350
1340
|
* @returns {Promise<Object>} - The decoded message, signer address, signature and signature type
|
|
1351
1341
|
*/
|
|
1352
|
-
)
|
|
1353
1342
|
}, {
|
|
1354
1343
|
key: "DecodeSignedMessageJSON",
|
|
1355
|
-
value:
|
|
1344
|
+
value: function () {
|
|
1356
1345
|
var _DecodeSignedMessageJSON = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(_ref20) {
|
|
1357
1346
|
var signedMessage, type, msgBytes, signature, msg, obj, prefixedMsgHash, signerAddr;
|
|
1358
1347
|
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
@@ -1395,7 +1384,6 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1395
1384
|
* @methodGroup Signers
|
|
1396
1385
|
* @returns {string} - The address of the current signer
|
|
1397
1386
|
*/
|
|
1398
|
-
)
|
|
1399
1387
|
}, {
|
|
1400
1388
|
key: "CurrentAccountAddress",
|
|
1401
1389
|
value: function CurrentAccountAddress() {
|
|
@@ -1411,7 +1399,7 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1411
1399
|
*/
|
|
1412
1400
|
}, {
|
|
1413
1401
|
key: "SetOauthToken",
|
|
1414
|
-
value:
|
|
1402
|
+
value: function () {
|
|
1415
1403
|
var _SetOauthToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18(_ref21) {
|
|
1416
1404
|
var token, wallet, signer;
|
|
1417
1405
|
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
@@ -1447,10 +1435,9 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1447
1435
|
* @namedParams
|
|
1448
1436
|
* @param {string} token - The OAuth ID
|
|
1449
1437
|
*/
|
|
1450
|
-
)
|
|
1451
1438
|
}, {
|
|
1452
1439
|
key: "SetSignerFromOauthToken",
|
|
1453
|
-
value:
|
|
1440
|
+
value: function () {
|
|
1454
1441
|
var _SetSignerFromOauthToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(_ref22) {
|
|
1455
1442
|
var token, wallet, client, _yield$client$authCli, urls, path, httpClient, response, privateKey;
|
|
1456
1443
|
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
|
@@ -1554,7 +1541,6 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1554
1541
|
*
|
|
1555
1542
|
* @return {string} - The created static token
|
|
1556
1543
|
*/
|
|
1557
|
-
)
|
|
1558
1544
|
}, {
|
|
1559
1545
|
key: "CreateStaticToken",
|
|
1560
1546
|
value: function CreateStaticToken(_ref23) {
|
|
@@ -1613,7 +1599,7 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1613
1599
|
*/
|
|
1614
1600
|
}, {
|
|
1615
1601
|
key: "SetPolicyAuthorization",
|
|
1616
|
-
value:
|
|
1602
|
+
value: function () {
|
|
1617
1603
|
var _SetPolicyAuthorization = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20(_ref25) {
|
|
1618
1604
|
var objectId;
|
|
1619
1605
|
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
|
@@ -1648,10 +1634,9 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1648
1634
|
* @param {string} string - The string to sign
|
|
1649
1635
|
* @return {Promise<string>} - The signed string
|
|
1650
1636
|
*/
|
|
1651
|
-
)
|
|
1652
1637
|
}, {
|
|
1653
1638
|
key: "Sign",
|
|
1654
|
-
value:
|
|
1639
|
+
value: function () {
|
|
1655
1640
|
var _Sign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(string) {
|
|
1656
1641
|
var signature;
|
|
1657
1642
|
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
@@ -1682,10 +1667,9 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1682
1667
|
*
|
|
1683
1668
|
* @return {Promise<string>} - The encrypted message
|
|
1684
1669
|
*/
|
|
1685
|
-
)
|
|
1686
1670
|
}, {
|
|
1687
1671
|
key: "EncryptECIES",
|
|
1688
|
-
value:
|
|
1672
|
+
value: function () {
|
|
1689
1673
|
var _EncryptECIES = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(_ref26) {
|
|
1690
1674
|
var message, publicKey;
|
|
1691
1675
|
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
@@ -1722,10 +1706,9 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1722
1706
|
*
|
|
1723
1707
|
* @return {Promise<string | Object>} - The decrypted string or object
|
|
1724
1708
|
*/
|
|
1725
|
-
)
|
|
1726
1709
|
}, {
|
|
1727
1710
|
key: "DecryptECIES",
|
|
1728
|
-
value:
|
|
1711
|
+
value: function () {
|
|
1729
1712
|
var _DecryptECIES = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(_ref27) {
|
|
1730
1713
|
var message;
|
|
1731
1714
|
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
|
@@ -1765,10 +1748,9 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1765
1748
|
*
|
|
1766
1749
|
* @return {Promise<*>} - Response in the specified format
|
|
1767
1750
|
*/
|
|
1768
|
-
)
|
|
1769
1751
|
}, {
|
|
1770
1752
|
key: "Request",
|
|
1771
|
-
value:
|
|
1753
|
+
value: function () {
|
|
1772
1754
|
var _Request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(_ref28) {
|
|
1773
1755
|
var url, _ref28$format, format, _ref28$method, method, _ref28$headers, headers, body;
|
|
1774
1756
|
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
|
@@ -1790,7 +1772,7 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1790
1772
|
return _Request.apply(this, arguments);
|
|
1791
1773
|
}
|
|
1792
1774
|
return Request;
|
|
1793
|
-
}()
|
|
1775
|
+
}()
|
|
1794
1776
|
}, {
|
|
1795
1777
|
key: "MakeAuthServiceRequest",
|
|
1796
1778
|
value: function () {
|
|
@@ -1950,7 +1932,7 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1950
1932
|
}()
|
|
1951
1933
|
}], [{
|
|
1952
1934
|
key: "Configuration",
|
|
1953
|
-
value:
|
|
1935
|
+
value: function () {
|
|
1954
1936
|
var _Configuration = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(_ref30) {
|
|
1955
1937
|
var configUrl, _ref30$kmsUrls, kmsUrls, region, clientIP, uri, fabricInfo, filterHTTPS, fabricURIs, ethereumURIs, authServiceURIs, fileServiceURIs, searchURIs, fabricVersion;
|
|
1956
1938
|
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
@@ -2031,7 +2013,6 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
2031
2013
|
*
|
|
2032
2014
|
* @return {Object} - An object using network names as keys and configuration URLs as values.
|
|
2033
2015
|
*/
|
|
2034
|
-
)
|
|
2035
2016
|
}, {
|
|
2036
2017
|
key: "Networks",
|
|
2037
2018
|
value: function Networks() {
|
|
@@ -2056,7 +2037,7 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
2056
2037
|
*/
|
|
2057
2038
|
}, {
|
|
2058
2039
|
key: "FromNetworkName",
|
|
2059
|
-
value:
|
|
2040
|
+
value: function () {
|
|
2060
2041
|
var _FromNetworkName = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(_ref31) {
|
|
2061
2042
|
var networkName, region, clientIP, trustAuthorityId, staticToken, _ref31$ethereumContra, ethereumContractTimeout, _ref31$noCache, noCache, _ref31$noAuth, noAuth, assumeV3, configUrl;
|
|
2062
2043
|
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
@@ -2111,10 +2092,9 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
2111
2092
|
*
|
|
2112
2093
|
* @return {Promise<ElvClient>} - New ElvClient connected to the specified content fabric and blockchain
|
|
2113
2094
|
*/
|
|
2114
|
-
)
|
|
2115
2095
|
}, {
|
|
2116
2096
|
key: "FromConfigurationUrl",
|
|
2117
|
-
value:
|
|
2097
|
+
value: function () {
|
|
2118
2098
|
var _FromConfigurationUrl = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(_ref32) {
|
|
2119
2099
|
var configUrl, region, clientIP, trustAuthorityId, staticToken, _ref32$ethereumContra, ethereumContractTimeout, _ref32$noCache, noCache, _ref32$noAuth, noAuth, _ref32$assumeV, assumeV3, _yield$ElvClient$Conf3, contentSpaceId, networkId, networkName, fabricURIs, ethereumURIs, authServiceURIs, fileServiceURIs, searchURIs, fabricVersion, client;
|
|
2120
2100
|
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
@@ -2169,8 +2149,9 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
2169
2149
|
return _FromConfigurationUrl.apply(this, arguments);
|
|
2170
2150
|
}
|
|
2171
2151
|
return FromConfigurationUrl;
|
|
2172
|
-
}()
|
|
2152
|
+
}()
|
|
2173
2153
|
}]);
|
|
2154
|
+
return ElvClient;
|
|
2174
2155
|
}();
|
|
2175
2156
|
Object.assign(ElvClient.prototype, require("./client/AccessGroups"));
|
|
2176
2157
|
Object.assign(ElvClient.prototype, require("./client/ContentAccess"));
|
package/dist/src/ElvWallet.js
CHANGED
|
@@ -25,7 +25,7 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
25
25
|
*
|
|
26
26
|
* @returns {string} - Space-separated list of random words
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
_createClass(ElvWallet, [{
|
|
29
29
|
key: "GenerateMnemonic",
|
|
30
30
|
value: function GenerateMnemonic() {
|
|
31
31
|
return Ethers.Wallet.createRandom().mnemonic.phrase;
|
|
@@ -64,7 +64,7 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
64
64
|
*/
|
|
65
65
|
}, {
|
|
66
66
|
key: "AddAccountFromEncryptedPK",
|
|
67
|
-
value:
|
|
67
|
+
value: function () {
|
|
68
68
|
var _AddAccountFromEncryptedPK = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref2) {
|
|
69
69
|
var accountName, encryptedPrivateKey, password, signer;
|
|
70
70
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -102,7 +102,6 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
102
102
|
*
|
|
103
103
|
* @returns {Signer} - Signer with the private key, connected to the provider
|
|
104
104
|
*/
|
|
105
|
-
)
|
|
106
105
|
}, {
|
|
107
106
|
key: "AddAccount",
|
|
108
107
|
value: function AddAccount(_ref3) {
|
|
@@ -134,7 +133,7 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
134
133
|
*/
|
|
135
134
|
}, {
|
|
136
135
|
key: "GetAccountBalance",
|
|
137
|
-
value:
|
|
136
|
+
value: function () {
|
|
138
137
|
var _GetAccountBalance = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref4) {
|
|
139
138
|
var accountName, signer, accountSigner;
|
|
140
139
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
@@ -181,10 +180,9 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
181
180
|
*
|
|
182
181
|
* @returns {Promise<string>} - The encrypted private key (in Ethereum keystore format)
|
|
183
182
|
*/
|
|
184
|
-
)
|
|
185
183
|
}, {
|
|
186
184
|
key: "GenerateEncryptedPrivateKey",
|
|
187
|
-
value:
|
|
185
|
+
value: function () {
|
|
188
186
|
var _GenerateEncryptedPrivateKey = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref5) {
|
|
189
187
|
var accountName, signer, password, options, accountSigner;
|
|
190
188
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
@@ -222,7 +220,6 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
222
220
|
* @param {string} accountName - Name of the account
|
|
223
221
|
* @returns {(Signer|undefined)} - Signer of the saved account, if it exists
|
|
224
222
|
*/
|
|
225
|
-
)
|
|
226
223
|
}, {
|
|
227
224
|
key: "GetAccount",
|
|
228
225
|
value: function GetAccount(_ref6) {
|
|
@@ -243,5 +240,6 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
243
240
|
delete this.signers[accountName];
|
|
244
241
|
}
|
|
245
242
|
}]);
|
|
243
|
+
return ElvWallet;
|
|
246
244
|
}();
|
|
247
245
|
module.exports = ElvWallet;
|
package/dist/src/EthClient.js
CHANGED
|
@@ -5,11 +5,11 @@ 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 _createForOfIteratorHelper(
|
|
9
|
-
function _unsupportedIterableToArray(
|
|
10
|
-
function _arrayLikeToArray(
|
|
11
|
-
function ownKeys(
|
|
12
|
-
function _objectSpread(
|
|
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
|
+
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
|
+
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(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");
|
|
@@ -57,7 +57,7 @@ var EthClient = /*#__PURE__*/function () {
|
|
|
57
57
|
|
|
58
58
|
//Ethers.errors.setLogLevel("error");
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
_createClass(EthClient, [{
|
|
61
61
|
key: "Log",
|
|
62
62
|
value: function Log(message) {
|
|
63
63
|
var error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
@@ -701,7 +701,7 @@ var EthClient = /*#__PURE__*/function () {
|
|
|
701
701
|
}() /* Specific contract management */
|
|
702
702
|
}, {
|
|
703
703
|
key: "DeployAccessGroupContract",
|
|
704
|
-
value:
|
|
704
|
+
value: function () {
|
|
705
705
|
var _DeployAccessGroupContract = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(_ref14) {
|
|
706
706
|
var contentSpaceAddress;
|
|
707
707
|
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
@@ -725,7 +725,7 @@ var EthClient = /*#__PURE__*/function () {
|
|
|
725
725
|
return _DeployAccessGroupContract.apply(this, arguments);
|
|
726
726
|
}
|
|
727
727
|
return DeployAccessGroupContract;
|
|
728
|
-
}()
|
|
728
|
+
}()
|
|
729
729
|
}, {
|
|
730
730
|
key: "DeployTypeContract",
|
|
731
731
|
value: function () {
|
|
@@ -1149,5 +1149,6 @@ var EthClient = /*#__PURE__*/function () {
|
|
|
1149
1149
|
return Events;
|
|
1150
1150
|
}()
|
|
1151
1151
|
}]);
|
|
1152
|
+
return EthClient;
|
|
1152
1153
|
}();
|
|
1153
1154
|
module.exports = EthClient;
|