@eluvio/elv-client-js 4.0.143 → 4.0.145
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 +15 -14
- package/dist/ElvClient-node-min.js +14 -13
- package/dist/ElvFrameClient-min.js +10 -10
- package/dist/ElvPermissionsClient-min.js +9 -9
- package/dist/ElvWalletClient-min.js +15 -14
- package/dist/ElvWalletClient-node-min.js +14 -13
- package/dist/src/AuthorizationClient.js +11 -14
- 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 +532 -401
- package/dist/src/ElvWallet.js +7 -5
- package/dist/src/EthClient.js +9 -10
- package/dist/src/FrameClient.js +10 -11
- package/dist/src/HttpClient.js +5 -5
- package/dist/src/Id.js +1 -2
- package/dist/src/PermissionsClient.js +31 -19
- package/dist/src/RemoteSigner.js +10 -11
- package/dist/src/UserProfileClient.js +35 -20
- package/dist/src/Utils.js +2 -3
- package/dist/src/Validation.js +10 -2
- package/dist/src/client/ABRPublishing.js +438 -238
- package/dist/src/client/AccessGroups.js +2 -2
- package/dist/src/client/ContentAccess.js +281 -344
- package/dist/src/client/ContentManagement.js +100 -84
- package/dist/src/client/Contracts.js +430 -2
- package/dist/src/client/Files.js +2 -2
- package/dist/src/client/LiveConf.js +43 -26
- package/dist/src/client/LiveStream.js +65 -63
- package/dist/src/client/NFT.js +2 -2
- package/dist/src/client/Shares.js +47 -24
- 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 +359 -280
- package/package.json +2 -2
- package/src/FrameClient.js +1 -0
- package/src/Validation.js +9 -3
- package/src/client/ABRPublishing.js +176 -160
- package/src/client/Contracts.js +258 -0
- package/src/walletClient/index.js +13 -0
|
@@ -3,9 +3,8 @@ 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
|
-
var
|
|
7
|
-
function
|
|
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; }
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
8
|
var HttpClient = require("./HttpClient");
|
|
10
9
|
var Ethers = require("ethers");
|
|
11
10
|
var Utils = require("./Utils");
|
|
@@ -38,8 +37,8 @@ var ACCESS_TYPES = {
|
|
|
38
37
|
OTHER: "other"
|
|
39
38
|
};
|
|
40
39
|
var CONTRACTS = {
|
|
41
|
-
v2: (
|
|
42
|
-
v3: (
|
|
40
|
+
v2: _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ACCESS_TYPES.SPACE, require("./contracts/v2/BaseContentSpace")), ACCESS_TYPES.LIBRARY, require("./contracts/v2/BaseLibrary")), ACCESS_TYPES.TYPE, require("./contracts/v2/BaseContentType")), ACCESS_TYPES.OBJECT, require("./contracts/v2/BaseContent")), ACCESS_TYPES.WALLET, require("./contracts/v2/BaseAccessWallet")), ACCESS_TYPES.GROUP, require("./contracts/v2/BaseAccessControlGroup")), ACCESS_TYPES.ACCESSIBLE, require("./contracts/v2/Accessible")), ACCESS_TYPES.EDITABLE, require("./contracts/v2/Editable")),
|
|
41
|
+
v3: _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ACCESS_TYPES.SPACE, require("./contracts/v3/BaseContentSpace")), ACCESS_TYPES.LIBRARY, require("./contracts/v3/BaseLibrary")), ACCESS_TYPES.TYPE, require("./contracts/v3/BaseContentType")), ACCESS_TYPES.OBJECT, require("./contracts/v3/BaseContent")), ACCESS_TYPES.WALLET, require("./contracts/v3/BaseAccessWallet")), ACCESS_TYPES.GROUP, require("./contracts/v3/BaseAccessControlGroup")), ACCESS_TYPES.ACCESSIBLE, require("./contracts/v3/Accessible")), ACCESS_TYPES.EDITABLE, require("./contracts/v3/Editable")), ACCESS_TYPES.TENANT, require("./contracts/v3/BaseTenantSpace")),
|
|
43
42
|
v3b: _defineProperty({}, ACCESS_TYPES.GROUP, require("./contracts/v3b/BaseAccessControlGroup"))
|
|
44
43
|
};
|
|
45
44
|
var AuthorizationClient = /*#__PURE__*/function () {
|
|
@@ -77,7 +76,7 @@ var AuthorizationClient = /*#__PURE__*/function () {
|
|
|
77
76
|
}
|
|
78
77
|
|
|
79
78
|
// Return authorization token in appropriate headers
|
|
80
|
-
_createClass(AuthorizationClient, [{
|
|
79
|
+
return _createClass(AuthorizationClient, [{
|
|
81
80
|
key: "Log",
|
|
82
81
|
value: function Log(message) {
|
|
83
82
|
var error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
@@ -125,7 +124,7 @@ var AuthorizationClient = /*#__PURE__*/function () {
|
|
|
125
124
|
if (versionHash) {
|
|
126
125
|
objectId = this.client.utils.DecodeVersionHash(versionHash).objectId;
|
|
127
126
|
}
|
|
128
|
-
_context2.t0 = objectId && this.client.signer;
|
|
127
|
+
_context2.t0 = objectId && this.client.signer && !this.client.signer.anonymous;
|
|
129
128
|
if (!_context2.t0) {
|
|
130
129
|
_context2.next = 10;
|
|
131
130
|
break;
|
|
@@ -1032,7 +1031,6 @@ var AuthorizationClient = /*#__PURE__*/function () {
|
|
|
1032
1031
|
}
|
|
1033
1032
|
}
|
|
1034
1033
|
}
|
|
1035
|
-
|
|
1036
1034
|
if (isV3 && (!args || args.length === 0)) {
|
|
1037
1035
|
args = [[],
|
|
1038
1036
|
// customValues
|
|
@@ -1179,7 +1177,7 @@ var AuthorizationClient = /*#__PURE__*/function () {
|
|
|
1179
1177
|
}() /* Utility methods */
|
|
1180
1178
|
}, {
|
|
1181
1179
|
key: "ContractInfo",
|
|
1182
|
-
value: function () {
|
|
1180
|
+
value: (function () {
|
|
1183
1181
|
var _ContractInfo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(_ref14) {
|
|
1184
1182
|
var id, address, isV3, contractName, accessType, v3Version, version;
|
|
1185
1183
|
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
@@ -1230,7 +1228,7 @@ var AuthorizationClient = /*#__PURE__*/function () {
|
|
|
1230
1228
|
return _ContractInfo.apply(this, arguments);
|
|
1231
1229
|
}
|
|
1232
1230
|
return ContractInfo;
|
|
1233
|
-
}()
|
|
1231
|
+
}())
|
|
1234
1232
|
}, {
|
|
1235
1233
|
key: "GetAccessCharge",
|
|
1236
1234
|
value: function () {
|
|
@@ -1642,7 +1640,7 @@ var AuthorizationClient = /*#__PURE__*/function () {
|
|
|
1642
1640
|
this.Log("Making KMS request:\n URL: ".concat(KMSUrls[i], "\n Method: ").concat(methodName, "\n Params: ").concat(params.join(", ")));
|
|
1643
1641
|
kmsUrl = KMSUrls[i];
|
|
1644
1642
|
if (!this.providers[kmsUrl]) {
|
|
1645
|
-
this.providers[kmsUrl] = new Ethers.providers.
|
|
1643
|
+
this.providers[kmsUrl] = new Ethers.providers.StaticJsonRpcProvider(kmsUrl, this.client.networkId);
|
|
1646
1644
|
}
|
|
1647
1645
|
_context22.next = 29;
|
|
1648
1646
|
return this.providers[kmsUrl].send(methodName, params);
|
|
@@ -2032,7 +2030,7 @@ var AuthorizationClient = /*#__PURE__*/function () {
|
|
|
2032
2030
|
}() /* Creation methods */
|
|
2033
2031
|
}, {
|
|
2034
2032
|
key: "CreateAccessGroup",
|
|
2035
|
-
value: function () {
|
|
2033
|
+
value: (function () {
|
|
2036
2034
|
var _CreateAccessGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30() {
|
|
2037
2035
|
var _yield$this$client$et, contractAddress, transactionHash;
|
|
2038
2036
|
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
@@ -2061,7 +2059,7 @@ var AuthorizationClient = /*#__PURE__*/function () {
|
|
|
2061
2059
|
return _CreateAccessGroup.apply(this, arguments);
|
|
2062
2060
|
}
|
|
2063
2061
|
return CreateAccessGroup;
|
|
2064
|
-
}()
|
|
2062
|
+
}())
|
|
2065
2063
|
}, {
|
|
2066
2064
|
key: "CreateContentType",
|
|
2067
2065
|
value: function () {
|
|
@@ -2170,6 +2168,5 @@ var AuthorizationClient = /*#__PURE__*/function () {
|
|
|
2170
2168
|
this.channelContentTokens = {};
|
|
2171
2169
|
}
|
|
2172
2170
|
}]);
|
|
2173
|
-
return AuthorizationClient;
|
|
2174
2171
|
}();
|
|
2175
2172
|
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(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, 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 o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
5
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
6
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
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(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, 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 o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
4
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
5
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
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(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
5
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
6
6
|
if (typeof globalThis.Buffer === "undefined") {
|
|
7
7
|
globalThis.Buffer = require("buffer/").Buffer;
|
|
8
8
|
}
|