@eluvio/elv-client-js 4.2.30 → 4.2.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ElvClient-min.js +1 -1
- package/dist/ElvClient-node-min.js +1 -1
- package/dist/ElvFrameClient-min.js +1 -1
- package/dist/ElvPermissionsClient-min.js +1 -1
- package/dist/ElvWalletClient-min.js +1 -1
- package/dist/ElvWalletClient-node-min.js +1 -1
- package/dist/src/ContentObjectVerification.js +281 -0
- package/dist/src/ElvClient.js +275 -355
- package/dist/src/EthClient.js +2 -3
- package/dist/src/FrameClient.js +1 -1
- package/dist/src/client/ABRPublishing.js +60 -71
- package/dist/src/client/ContentAccess.js +204 -298
- package/dist/src/client/Files.js +844 -1400
- package/dist/src/client/LiveConf.js +37 -54
- package/dist/src/client/LiveStream.js +81 -123
- package/package.json +1 -1
- package/src/AuthorizationClient.js +5 -0
- package/src/ElvClient.js +28 -5
- package/src/FrameClient.js +16 -0
- package/src/client/ContentAccess.js +192 -0
- package/src/client/ContentManagement.js +366 -9
- package/src/client/LiveStream.js +148 -0
- package/testScripts/Test.js +14 -2
- package/utilities/ObjectInfo.js +99 -0
- package/utilities/TenantContent.js +136 -0
package/dist/src/ElvClient.js
CHANGED
|
@@ -1001,145 +1001,65 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1001
1001
|
PAYLOAD 85b json-compressed
|
|
1002
1002
|
json 79b {"adr":"VVf4DQU357tDnZGYQeDrntRJ5rs=","spc":"ispc3ANoVSzNA3P6t7abLR69ho5YPPZU"}
|
|
1003
1003
|
*/
|
|
1004
|
-
/*
|
|
1005
|
-
PLAIN TOKEN PREFIX + BODY | aplsjcJf1HYcDDUuCdXcSZtU86nYK162YmYJeuqwMczEBJVkD5D5EvsBvVwYDRsf4hzDvBWMoe9piBpqx...
|
|
1006
|
-
PREFIX 6b aplsjc | apl=plain s=ES256K jc=json-compressed
|
|
1007
|
-
BODY base58(SIGNATURE + PAYLOAD)
|
|
1008
|
-
SIGNATURE 65b ES256K signature
|
|
1009
|
-
PAYLOAD raw-deflate JSON
|
|
1010
|
-
json {"adr":"VVf4DQU357tDnZGYQeDrntRJ5rs=","spc":"ispc3ANoVSzNA3P6t7abLR69ho5YPPZU"}
|
|
1011
|
-
*/
|
|
1012
|
-
/**
|
|
1013
|
-
* Create a signed "plain" authorization token (`aplsjc...`).
|
|
1014
|
-
*
|
|
1015
|
-
* Plain tokens are largely the same as client-signed access tokens - they do not contain a b/c transaction
|
|
1016
|
-
* and authorization is determined from the rights of the current signer's address.
|
|
1017
|
-
* Currently needed for tenant content query /tenant/:tid/q/query
|
|
1018
|
-
* This token will be deprecated in the future in favor of client-signed access tokens.
|
|
1019
|
-
*
|
|
1020
|
-
* @methodGroup Authorization
|
|
1021
|
-
* @namedParams
|
|
1022
|
-
* @param {string=} libraryId - Optional library ID to scope the token. If omitted, the token is space-wide.
|
|
1023
|
-
* @returns {Promise<string>} - The signed Plain auth token
|
|
1024
|
-
*/
|
|
1025
|
-
}, {
|
|
1026
|
-
key: "CreatePlainToken",
|
|
1027
|
-
value: function () {
|
|
1028
|
-
var _CreatePlainToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11() {
|
|
1029
|
-
var _ref15,
|
|
1030
|
-
libraryId,
|
|
1031
|
-
address,
|
|
1032
|
-
token,
|
|
1033
|
-
compressedToken,
|
|
1034
|
-
signature,
|
|
1035
|
-
signatureBytes,
|
|
1036
|
-
_args11 = arguments;
|
|
1037
|
-
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
1038
|
-
while (1) switch (_context11.prev = _context11.next) {
|
|
1039
|
-
case 0:
|
|
1040
|
-
_ref15 = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {}, libraryId = _ref15.libraryId;
|
|
1041
|
-
address = this.CurrentAccountAddress();
|
|
1042
|
-
if (address) {
|
|
1043
|
-
_context11.next = 4;
|
|
1044
|
-
break;
|
|
1045
|
-
}
|
|
1046
|
-
throw Error("Unable to create plain token: No signer is configured");
|
|
1047
|
-
case 4:
|
|
1048
|
-
_context11.t0 = Buffer.from(address.replace(/^0x/, ""), "hex").toString("base64");
|
|
1049
|
-
_context11.next = 7;
|
|
1050
|
-
return this.ContentSpaceId();
|
|
1051
|
-
case 7:
|
|
1052
|
-
_context11.t1 = _context11.sent;
|
|
1053
|
-
token = {
|
|
1054
|
-
adr: _context11.t0,
|
|
1055
|
-
spc: _context11.t1
|
|
1056
|
-
};
|
|
1057
|
-
if (libraryId) {
|
|
1058
|
-
token.lib = libraryId;
|
|
1059
|
-
}
|
|
1060
|
-
compressedToken = Pako.deflateRaw(Buffer.from(JSON.stringify(token), "utf-8"));
|
|
1061
|
-
_context11.next = 13;
|
|
1062
|
-
return this.authClient.Sign(Ethers.utils.keccak256(compressedToken));
|
|
1063
|
-
case 13:
|
|
1064
|
-
signature = _context11.sent;
|
|
1065
|
-
signatureBytes = Buffer.from(signature.replace(/^0x/, ""), "hex");
|
|
1066
|
-
if (!(signatureBytes.length !== 65)) {
|
|
1067
|
-
_context11.next = 17;
|
|
1068
|
-
break;
|
|
1069
|
-
}
|
|
1070
|
-
throw Error("Unable to create plain token: Expected a 65-byte ES256K signature");
|
|
1071
|
-
case 17:
|
|
1072
|
-
return _context11.abrupt("return", "aplsjc".concat(this.utils.B58(Buffer.concat([signatureBytes, Buffer.from(compressedToken)]))));
|
|
1073
|
-
case 18:
|
|
1074
|
-
case "end":
|
|
1075
|
-
return _context11.stop();
|
|
1076
|
-
}
|
|
1077
|
-
}, _callee11, this);
|
|
1078
|
-
}));
|
|
1079
|
-
function CreatePlainToken() {
|
|
1080
|
-
return _CreatePlainToken.apply(this, arguments);
|
|
1081
|
-
}
|
|
1082
|
-
return CreatePlainToken;
|
|
1083
|
-
}()
|
|
1084
1004
|
}, {
|
|
1085
1005
|
key: "PersonalSign",
|
|
1086
1006
|
value: function () {
|
|
1087
|
-
var _PersonalSign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1007
|
+
var _PersonalSign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(_ref15) {
|
|
1088
1008
|
var _this2 = this;
|
|
1089
1009
|
var message, addEthereumPrefix, Sign;
|
|
1090
|
-
return _regeneratorRuntime.wrap(function
|
|
1091
|
-
while (1) switch (
|
|
1010
|
+
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
1011
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
1092
1012
|
case 0:
|
|
1093
|
-
message =
|
|
1013
|
+
message = _ref15.message, addEthereumPrefix = _ref15.addEthereumPrefix, Sign = _ref15.Sign;
|
|
1094
1014
|
if (!Sign) {
|
|
1095
1015
|
// Same as authClient.Sign, but authClient may not yet be initialized
|
|
1096
1016
|
Sign = /*#__PURE__*/function () {
|
|
1097
|
-
var
|
|
1098
|
-
return _regeneratorRuntime.wrap(function
|
|
1099
|
-
while (1) switch (
|
|
1017
|
+
var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(message) {
|
|
1018
|
+
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
1019
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
1100
1020
|
case 0:
|
|
1101
|
-
|
|
1021
|
+
_context11.t0 = Ethers.utils;
|
|
1102
1022
|
if (!_this2.signer.signDigest) {
|
|
1103
|
-
|
|
1023
|
+
_context11.next = 7;
|
|
1104
1024
|
break;
|
|
1105
1025
|
}
|
|
1106
|
-
|
|
1026
|
+
_context11.next = 4;
|
|
1107
1027
|
return _this2.signer.signDigest(message);
|
|
1108
1028
|
case 4:
|
|
1109
|
-
|
|
1110
|
-
|
|
1029
|
+
_context11.t1 = _context11.sent;
|
|
1030
|
+
_context11.next = 10;
|
|
1111
1031
|
break;
|
|
1112
1032
|
case 7:
|
|
1113
|
-
|
|
1033
|
+
_context11.next = 9;
|
|
1114
1034
|
return _this2.signer._signingKey().signDigest(message);
|
|
1115
1035
|
case 9:
|
|
1116
|
-
|
|
1036
|
+
_context11.t1 = _context11.sent;
|
|
1117
1037
|
case 10:
|
|
1118
|
-
|
|
1119
|
-
return
|
|
1038
|
+
_context11.t2 = _context11.t1;
|
|
1039
|
+
return _context11.abrupt("return", _context11.t0.joinSignature.call(_context11.t0, _context11.t2));
|
|
1120
1040
|
case 12:
|
|
1121
1041
|
case "end":
|
|
1122
|
-
return
|
|
1042
|
+
return _context11.stop();
|
|
1123
1043
|
}
|
|
1124
|
-
},
|
|
1044
|
+
}, _callee11);
|
|
1125
1045
|
}));
|
|
1126
1046
|
return function Sign(_x8) {
|
|
1127
|
-
return
|
|
1047
|
+
return _ref16.apply(this, arguments);
|
|
1128
1048
|
};
|
|
1129
1049
|
}();
|
|
1130
1050
|
}
|
|
1131
1051
|
if (addEthereumPrefix) {
|
|
1132
1052
|
message = Ethers.utils.keccak256(Buffer.from("\x19Ethereum Signed Message:\n".concat(message.length).concat(message), "utf-8"));
|
|
1133
1053
|
}
|
|
1134
|
-
|
|
1054
|
+
_context12.next = 5;
|
|
1135
1055
|
return Sign(message);
|
|
1136
1056
|
case 5:
|
|
1137
|
-
return
|
|
1057
|
+
return _context12.abrupt("return", _context12.sent);
|
|
1138
1058
|
case 6:
|
|
1139
1059
|
case "end":
|
|
1140
|
-
return
|
|
1060
|
+
return _context12.stop();
|
|
1141
1061
|
}
|
|
1142
|
-
},
|
|
1062
|
+
}, _callee12);
|
|
1143
1063
|
}));
|
|
1144
1064
|
function PersonalSign(_x7) {
|
|
1145
1065
|
return _PersonalSign.apply(this, arguments);
|
|
@@ -1160,65 +1080,65 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1160
1080
|
}, {
|
|
1161
1081
|
key: "CreateFabricToken",
|
|
1162
1082
|
value: function () {
|
|
1163
|
-
var _CreateFabricToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1164
|
-
var
|
|
1165
|
-
|
|
1083
|
+
var _CreateFabricToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13() {
|
|
1084
|
+
var _ref17,
|
|
1085
|
+
_ref17$duration,
|
|
1166
1086
|
duration,
|
|
1167
|
-
|
|
1087
|
+
_ref17$spec,
|
|
1168
1088
|
spec,
|
|
1169
1089
|
address,
|
|
1170
1090
|
Sign,
|
|
1171
|
-
|
|
1091
|
+
_ref17$addEthereumPre,
|
|
1172
1092
|
addEthereumPrefix,
|
|
1173
|
-
|
|
1093
|
+
_ref17$context,
|
|
1174
1094
|
context,
|
|
1175
1095
|
token,
|
|
1176
1096
|
message,
|
|
1177
1097
|
signature,
|
|
1178
1098
|
compressedToken,
|
|
1179
|
-
|
|
1180
|
-
return _regeneratorRuntime.wrap(function
|
|
1181
|
-
while (1) switch (
|
|
1099
|
+
_args13 = arguments;
|
|
1100
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
1101
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
1182
1102
|
case 0:
|
|
1183
|
-
|
|
1103
|
+
_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, _ref17$context = _ref17.context, context = _ref17$context === void 0 ? {} : _ref17$context;
|
|
1184
1104
|
address = address || this.CurrentAccountAddress();
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1105
|
+
_context13.t0 = _objectSpread;
|
|
1106
|
+
_context13.t1 = _objectSpread({}, spec);
|
|
1107
|
+
_context13.t2 = {};
|
|
1108
|
+
_context13.t3 = "iusr".concat(Utils.AddressToHash(address));
|
|
1109
|
+
_context13.t4 = Buffer.from(address.replace(/^0x/, ""), "hex").toString("base64");
|
|
1110
|
+
_context13.next = 9;
|
|
1191
1111
|
return this.ContentSpaceId();
|
|
1192
1112
|
case 9:
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
sub:
|
|
1199
|
-
adr:
|
|
1200
|
-
spc:
|
|
1201
|
-
iat:
|
|
1202
|
-
exp:
|
|
1203
|
-
ctx:
|
|
1113
|
+
_context13.t5 = _context13.sent;
|
|
1114
|
+
_context13.t6 = Date.now();
|
|
1115
|
+
_context13.t7 = Date.now() + duration;
|
|
1116
|
+
_context13.t8 = context;
|
|
1117
|
+
_context13.t9 = {
|
|
1118
|
+
sub: _context13.t3,
|
|
1119
|
+
adr: _context13.t4,
|
|
1120
|
+
spc: _context13.t5,
|
|
1121
|
+
iat: _context13.t6,
|
|
1122
|
+
exp: _context13.t7,
|
|
1123
|
+
ctx: _context13.t8
|
|
1204
1124
|
};
|
|
1205
|
-
token = (0,
|
|
1125
|
+
token = (0, _context13.t0)(_context13.t1, _context13.t2, _context13.t9);
|
|
1206
1126
|
message = "Eluvio Content Fabric Access Token 1.0\n".concat(JSON.stringify(token));
|
|
1207
|
-
|
|
1127
|
+
_context13.next = 18;
|
|
1208
1128
|
return this.PersonalSign({
|
|
1209
1129
|
message: message,
|
|
1210
1130
|
addEthereumPrefix: addEthereumPrefix,
|
|
1211
1131
|
Sign: Sign
|
|
1212
1132
|
});
|
|
1213
1133
|
case 18:
|
|
1214
|
-
signature =
|
|
1134
|
+
signature = _context13.sent;
|
|
1215
1135
|
compressedToken = Pako.deflateRaw(Buffer.from(JSON.stringify(token), "utf-8"));
|
|
1216
|
-
return
|
|
1136
|
+
return _context13.abrupt("return", "acspjc".concat(this.utils.B58(Buffer.concat([Buffer.from(signature.replace(/^0x/, ""), "hex"), Buffer.from(compressedToken)]))));
|
|
1217
1137
|
case 21:
|
|
1218
1138
|
case "end":
|
|
1219
|
-
return
|
|
1139
|
+
return _context13.stop();
|
|
1220
1140
|
}
|
|
1221
|
-
},
|
|
1141
|
+
}, _callee13, this);
|
|
1222
1142
|
}));
|
|
1223
1143
|
function CreateFabricToken() {
|
|
1224
1144
|
return _CreateFabricToken.apply(this, arguments);
|
|
@@ -1246,99 +1166,99 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1246
1166
|
}, {
|
|
1247
1167
|
key: "CreateSignedToken",
|
|
1248
1168
|
value: function () {
|
|
1249
|
-
var _CreateSignedToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1250
|
-
var libraryId, objectId, versionHash, policyId, subject,
|
|
1251
|
-
return _regeneratorRuntime.wrap(function
|
|
1252
|
-
while (1) switch (
|
|
1169
|
+
var _CreateSignedToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(_ref18) {
|
|
1170
|
+
var libraryId, objectId, versionHash, policyId, subject, _ref18$grantType, grantType, _ref18$allowDecryptio, allowDecryption, duration, _ref18$context, context, issueTime, expirationTime, issueDateTime, token, cap, compressedToken, signature;
|
|
1171
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
1172
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
1253
1173
|
case 0:
|
|
1254
|
-
libraryId =
|
|
1174
|
+
libraryId = _ref18.libraryId, objectId = _ref18.objectId, versionHash = _ref18.versionHash, policyId = _ref18.policyId, subject = _ref18.subject, _ref18$grantType = _ref18.grantType, grantType = _ref18$grantType === void 0 ? "read" : _ref18$grantType, _ref18$allowDecryptio = _ref18.allowDecryption, allowDecryption = _ref18$allowDecryptio === void 0 ? false : _ref18$allowDecryptio, duration = _ref18.duration, _ref18$context = _ref18.context, context = _ref18$context === void 0 ? {} : _ref18$context, issueTime = _ref18.issueTime, expirationTime = _ref18.expirationTime;
|
|
1255
1175
|
if (subject) {
|
|
1256
|
-
|
|
1176
|
+
_context14.next = 9;
|
|
1257
1177
|
break;
|
|
1258
1178
|
}
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1179
|
+
_context14.t0 = "iusr";
|
|
1180
|
+
_context14.t1 = this.utils;
|
|
1181
|
+
_context14.next = 6;
|
|
1262
1182
|
return this.CurrentAccountAddress();
|
|
1263
1183
|
case 6:
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
subject =
|
|
1184
|
+
_context14.t2 = _context14.sent;
|
|
1185
|
+
_context14.t3 = _context14.t1.AddressToHash.call(_context14.t1, _context14.t2);
|
|
1186
|
+
subject = _context14.t0.concat.call(_context14.t0, _context14.t3);
|
|
1267
1187
|
case 9:
|
|
1268
1188
|
if (policyId) {
|
|
1269
1189
|
context["elv:delegation-id"] = policyId;
|
|
1270
1190
|
}
|
|
1271
1191
|
issueDateTime = issueTime || Date.now();
|
|
1272
|
-
|
|
1273
|
-
|
|
1192
|
+
_context14.t4 = Buffer;
|
|
1193
|
+
_context14.next = 14;
|
|
1274
1194
|
return this.CurrentAccountAddress().replace(/^0x/, "");
|
|
1275
1195
|
case 14:
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1196
|
+
_context14.t5 = _context14.sent;
|
|
1197
|
+
_context14.t6 = _context14.t4.from.call(_context14.t4, _context14.t5, "hex").toString("base64");
|
|
1198
|
+
_context14.t7 = subject;
|
|
1199
|
+
_context14.next = 19;
|
|
1280
1200
|
return this.ContentSpaceId();
|
|
1281
1201
|
case 19:
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1202
|
+
_context14.t8 = _context14.sent;
|
|
1203
|
+
_context14.t9 = issueDateTime;
|
|
1204
|
+
_context14.t10 = expirationTime || issueDateTime + duration;
|
|
1205
|
+
_context14.t11 = grantType;
|
|
1206
|
+
_context14.t12 = context;
|
|
1287
1207
|
token = {
|
|
1288
|
-
adr:
|
|
1289
|
-
sub:
|
|
1290
|
-
spc:
|
|
1291
|
-
iat:
|
|
1292
|
-
exp:
|
|
1293
|
-
gra:
|
|
1294
|
-
ctx:
|
|
1208
|
+
adr: _context14.t6,
|
|
1209
|
+
sub: _context14.t7,
|
|
1210
|
+
spc: _context14.t8,
|
|
1211
|
+
iat: _context14.t9,
|
|
1212
|
+
exp: _context14.t10,
|
|
1213
|
+
gra: _context14.t11,
|
|
1214
|
+
ctx: _context14.t12
|
|
1295
1215
|
};
|
|
1296
1216
|
if (versionHash) {
|
|
1297
1217
|
objectId = this.utils.DecodeVersionHash(versionHash).objectId;
|
|
1298
1218
|
}
|
|
1299
1219
|
if (!objectId) {
|
|
1300
|
-
|
|
1220
|
+
_context14.next = 32;
|
|
1301
1221
|
break;
|
|
1302
1222
|
}
|
|
1303
1223
|
token.qid = objectId;
|
|
1304
1224
|
if (libraryId) {
|
|
1305
|
-
|
|
1225
|
+
_context14.next = 32;
|
|
1306
1226
|
break;
|
|
1307
1227
|
}
|
|
1308
|
-
|
|
1228
|
+
_context14.next = 31;
|
|
1309
1229
|
return this.ContentObjectLibraryId({
|
|
1310
1230
|
objectId: objectId
|
|
1311
1231
|
});
|
|
1312
1232
|
case 31:
|
|
1313
|
-
libraryId =
|
|
1233
|
+
libraryId = _context14.sent;
|
|
1314
1234
|
case 32:
|
|
1315
1235
|
if (libraryId) {
|
|
1316
1236
|
token.lib = libraryId;
|
|
1317
1237
|
}
|
|
1318
1238
|
if (!allowDecryption) {
|
|
1319
|
-
|
|
1239
|
+
_context14.next = 38;
|
|
1320
1240
|
break;
|
|
1321
1241
|
}
|
|
1322
|
-
|
|
1242
|
+
_context14.next = 36;
|
|
1323
1243
|
return this.authClient.ReEncryptionConk({
|
|
1324
1244
|
libraryId: libraryId,
|
|
1325
1245
|
objectId: objectId
|
|
1326
1246
|
});
|
|
1327
1247
|
case 36:
|
|
1328
|
-
cap =
|
|
1248
|
+
cap = _context14.sent;
|
|
1329
1249
|
token.apk = cap.public_key;
|
|
1330
1250
|
case 38:
|
|
1331
1251
|
compressedToken = Pako.deflateRaw(Buffer.from(JSON.stringify(token), "utf-8"));
|
|
1332
|
-
|
|
1252
|
+
_context14.next = 41;
|
|
1333
1253
|
return this.authClient.Sign(Ethers.utils.keccak256(compressedToken));
|
|
1334
1254
|
case 41:
|
|
1335
|
-
signature =
|
|
1336
|
-
return
|
|
1255
|
+
signature = _context14.sent;
|
|
1256
|
+
return _context14.abrupt("return", "aessjc".concat(this.utils.B58(Buffer.concat([Buffer.from(signature.replace(/^0x/, ""), "hex"), Buffer.from(compressedToken)]))));
|
|
1337
1257
|
case 43:
|
|
1338
1258
|
case "end":
|
|
1339
|
-
return
|
|
1259
|
+
return _context14.stop();
|
|
1340
1260
|
}
|
|
1341
|
-
},
|
|
1261
|
+
}, _callee14, this);
|
|
1342
1262
|
}));
|
|
1343
1263
|
function CreateSignedToken(_x9) {
|
|
1344
1264
|
return _CreateSignedToken.apply(this, arguments);
|
|
@@ -1348,19 +1268,19 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1348
1268
|
}, {
|
|
1349
1269
|
key: "CreateAuthorizationToken",
|
|
1350
1270
|
value: function () {
|
|
1351
|
-
var _CreateAuthorizationToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1352
|
-
return _regeneratorRuntime.wrap(function
|
|
1353
|
-
while (1) switch (
|
|
1271
|
+
var _CreateAuthorizationToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(args) {
|
|
1272
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
1273
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
1354
1274
|
case 0:
|
|
1355
|
-
|
|
1275
|
+
_context15.next = 2;
|
|
1356
1276
|
return this.authClient.AuthorizationToken(args);
|
|
1357
1277
|
case 2:
|
|
1358
|
-
return
|
|
1278
|
+
return _context15.abrupt("return", _context15.sent);
|
|
1359
1279
|
case 3:
|
|
1360
1280
|
case "end":
|
|
1361
|
-
return
|
|
1281
|
+
return _context15.stop();
|
|
1362
1282
|
}
|
|
1363
|
-
},
|
|
1283
|
+
}, _callee15, this);
|
|
1364
1284
|
}));
|
|
1365
1285
|
function CreateAuthorizationToken(_x10) {
|
|
1366
1286
|
return _CreateAuthorizationToken.apply(this, arguments);
|
|
@@ -1384,28 +1304,28 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1384
1304
|
}, {
|
|
1385
1305
|
key: "CreateSignedMessageJSON",
|
|
1386
1306
|
value: function () {
|
|
1387
|
-
var _CreateSignedMessageJSON = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1307
|
+
var _CreateSignedMessageJSON = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(_ref19) {
|
|
1388
1308
|
var message, type, msg, signature;
|
|
1389
|
-
return _regeneratorRuntime.wrap(function
|
|
1390
|
-
while (1) switch (
|
|
1309
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
1310
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
1391
1311
|
case 0:
|
|
1392
|
-
message =
|
|
1312
|
+
message = _ref19.message;
|
|
1393
1313
|
// Only one kind of signature supported currently
|
|
1394
1314
|
type = "mje_"; // JSON message, EIP192 signature
|
|
1395
1315
|
msg = JSON.stringify(message);
|
|
1396
|
-
|
|
1316
|
+
_context16.next = 5;
|
|
1397
1317
|
return this.PersonalSign({
|
|
1398
1318
|
message: msg,
|
|
1399
1319
|
addEthereumPrefix: true
|
|
1400
1320
|
});
|
|
1401
1321
|
case 5:
|
|
1402
|
-
signature =
|
|
1403
|
-
return
|
|
1322
|
+
signature = _context16.sent;
|
|
1323
|
+
return _context16.abrupt("return", "".concat(type).concat(Utils.B58(Buffer.concat([Buffer.from(signature.replace(/^0x/, ""), "hex"), Buffer.from(msg)]))));
|
|
1404
1324
|
case 7:
|
|
1405
1325
|
case "end":
|
|
1406
|
-
return
|
|
1326
|
+
return _context16.stop();
|
|
1407
1327
|
}
|
|
1408
|
-
},
|
|
1328
|
+
}, _callee16, this);
|
|
1409
1329
|
}));
|
|
1410
1330
|
function CreateSignedMessageJSON(_x11) {
|
|
1411
1331
|
return _CreateSignedMessageJSON.apply(this, arguments);
|
|
@@ -1423,15 +1343,15 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1423
1343
|
}, {
|
|
1424
1344
|
key: "DecodeSignedMessageJSON",
|
|
1425
1345
|
value: function () {
|
|
1426
|
-
var _DecodeSignedMessageJSON = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1346
|
+
var _DecodeSignedMessageJSON = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(_ref20) {
|
|
1427
1347
|
var signedMessage, type, msgBytes, signature, msg, obj, prefixedMsgHash, signerAddr;
|
|
1428
|
-
return _regeneratorRuntime.wrap(function
|
|
1429
|
-
while (1) switch (
|
|
1348
|
+
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
1349
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
1430
1350
|
case 0:
|
|
1431
|
-
signedMessage =
|
|
1351
|
+
signedMessage = _ref20.signedMessage;
|
|
1432
1352
|
type = signedMessage.slice(0, 4);
|
|
1433
|
-
|
|
1434
|
-
|
|
1353
|
+
_context17.t0 = type;
|
|
1354
|
+
_context17.next = _context17.t0 === "mje_" ? 5 : 12;
|
|
1435
1355
|
break;
|
|
1436
1356
|
case 5:
|
|
1437
1357
|
msgBytes = Utils.FromB58(signedMessage.slice(4));
|
|
@@ -1440,7 +1360,7 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1440
1360
|
obj = JSON.parse(msg);
|
|
1441
1361
|
prefixedMsgHash = Ethers.utils.keccak256(Buffer.from("\x19Ethereum Signed Message:\n".concat(msg.length).concat(msg), "utf-8"));
|
|
1442
1362
|
signerAddr = Ethers.utils.recoverAddress(prefixedMsgHash, signature);
|
|
1443
|
-
return
|
|
1363
|
+
return _context17.abrupt("return", {
|
|
1444
1364
|
type: type,
|
|
1445
1365
|
message: obj,
|
|
1446
1366
|
signerAddress: signerAddr,
|
|
@@ -1450,9 +1370,9 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1450
1370
|
throw new Error("Bad message type: ".concat(type));
|
|
1451
1371
|
case 13:
|
|
1452
1372
|
case "end":
|
|
1453
|
-
return
|
|
1373
|
+
return _context17.stop();
|
|
1454
1374
|
}
|
|
1455
|
-
},
|
|
1375
|
+
}, _callee17);
|
|
1456
1376
|
}));
|
|
1457
1377
|
function DecodeSignedMessageJSON(_x12) {
|
|
1458
1378
|
return _DecodeSignedMessageJSON.apply(this, arguments);
|
|
@@ -1481,12 +1401,12 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1481
1401
|
}, {
|
|
1482
1402
|
key: "SetOauthToken",
|
|
1483
1403
|
value: function () {
|
|
1484
|
-
var _SetOauthToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1404
|
+
var _SetOauthToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18(_ref21) {
|
|
1485
1405
|
var token, wallet, signer;
|
|
1486
|
-
return _regeneratorRuntime.wrap(function
|
|
1487
|
-
while (1) switch (
|
|
1406
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
1407
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
1488
1408
|
case 0:
|
|
1489
|
-
token =
|
|
1409
|
+
token = _ref21.token;
|
|
1490
1410
|
this.oauthToken = token;
|
|
1491
1411
|
wallet = this.GenerateWallet();
|
|
1492
1412
|
signer = wallet.AddAccountFromMnemonic({
|
|
@@ -1497,9 +1417,9 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1497
1417
|
});
|
|
1498
1418
|
case 5:
|
|
1499
1419
|
case "end":
|
|
1500
|
-
return
|
|
1420
|
+
return _context18.stop();
|
|
1501
1421
|
}
|
|
1502
|
-
},
|
|
1422
|
+
}, _callee18, this);
|
|
1503
1423
|
}));
|
|
1504
1424
|
function SetOauthToken(_x13) {
|
|
1505
1425
|
return _SetOauthToken.apply(this, arguments);
|
|
@@ -1519,44 +1439,44 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1519
1439
|
}, {
|
|
1520
1440
|
key: "SetSignerFromOauthToken",
|
|
1521
1441
|
value: function () {
|
|
1522
|
-
var _SetSignerFromOauthToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1442
|
+
var _SetSignerFromOauthToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(_ref22) {
|
|
1523
1443
|
var token, wallet, client, _yield$client$authCli, urls, path, httpClient, response, privateKey;
|
|
1524
|
-
return _regeneratorRuntime.wrap(function
|
|
1525
|
-
while (1) switch (
|
|
1444
|
+
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
|
1445
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
1526
1446
|
case 0:
|
|
1527
|
-
token =
|
|
1447
|
+
token = _ref22.token;
|
|
1528
1448
|
if (this.trustAuthorityId) {
|
|
1529
|
-
|
|
1449
|
+
_context19.next = 3;
|
|
1530
1450
|
break;
|
|
1531
1451
|
}
|
|
1532
1452
|
throw Error("Unable to authorize with OAuth token: No trust authority ID set");
|
|
1533
1453
|
case 3:
|
|
1534
1454
|
wallet = this.GenerateWallet();
|
|
1535
|
-
|
|
1455
|
+
_context19.prev = 4;
|
|
1536
1456
|
if (this.kmsURIs) {
|
|
1537
|
-
|
|
1457
|
+
_context19.next = 17;
|
|
1538
1458
|
break;
|
|
1539
1459
|
}
|
|
1540
|
-
|
|
1460
|
+
_context19.next = 8;
|
|
1541
1461
|
return ElvClient.FromConfigurationUrl({
|
|
1542
1462
|
configUrl: this.configUrl
|
|
1543
1463
|
});
|
|
1544
1464
|
case 8:
|
|
1545
|
-
client =
|
|
1465
|
+
client = _context19.sent;
|
|
1546
1466
|
client.SetSigner({
|
|
1547
1467
|
signer: wallet.AddAccount({
|
|
1548
1468
|
privateKey: this.defaultKey
|
|
1549
1469
|
})
|
|
1550
1470
|
});
|
|
1551
|
-
|
|
1471
|
+
_context19.next = 12;
|
|
1552
1472
|
return client.authClient.KMSInfo({
|
|
1553
1473
|
kmsId: this.trustAuthorityId
|
|
1554
1474
|
});
|
|
1555
1475
|
case 12:
|
|
1556
|
-
_yield$client$authCli =
|
|
1476
|
+
_yield$client$authCli = _context19.sent;
|
|
1557
1477
|
urls = _yield$client$authCli.urls;
|
|
1558
1478
|
if (!(!urls || urls.length === 0)) {
|
|
1559
|
-
|
|
1479
|
+
_context19.next = 16;
|
|
1560
1480
|
break;
|
|
1561
1481
|
}
|
|
1562
1482
|
throw Error("Unable to authorize with OAuth token: No KMS URLs set");
|
|
@@ -1570,7 +1490,7 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1570
1490
|
networkName: this.networkName,
|
|
1571
1491
|
debug: this.debug
|
|
1572
1492
|
});
|
|
1573
|
-
|
|
1493
|
+
_context19.next = 22;
|
|
1574
1494
|
return this.utils.ResponseToJson(httpClient.Request({
|
|
1575
1495
|
headers: {
|
|
1576
1496
|
Authorization: "Bearer ".concat(token)
|
|
@@ -1580,7 +1500,7 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1580
1500
|
forceFailover: true
|
|
1581
1501
|
}));
|
|
1582
1502
|
case 22:
|
|
1583
|
-
response =
|
|
1503
|
+
response = _context19.sent;
|
|
1584
1504
|
privateKey = response["UserSKHex"];
|
|
1585
1505
|
this.SetSigner({
|
|
1586
1506
|
signer: wallet.AddAccount({
|
|
@@ -1589,25 +1509,25 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1589
1509
|
});
|
|
1590
1510
|
|
|
1591
1511
|
// Ensure wallet is initialized
|
|
1592
|
-
|
|
1512
|
+
_context19.next = 27;
|
|
1593
1513
|
return this.userProfileClient.WalletAddress();
|
|
1594
1514
|
case 27:
|
|
1595
|
-
|
|
1515
|
+
_context19.next = 36;
|
|
1596
1516
|
break;
|
|
1597
1517
|
case 29:
|
|
1598
|
-
|
|
1599
|
-
|
|
1518
|
+
_context19.prev = 29;
|
|
1519
|
+
_context19.t0 = _context19["catch"](4);
|
|
1600
1520
|
this.Log("Failed to set signer from OAuth token:", true);
|
|
1601
|
-
this.Log(
|
|
1602
|
-
|
|
1521
|
+
this.Log(_context19.t0, true);
|
|
1522
|
+
_context19.next = 35;
|
|
1603
1523
|
return this.ClearSigner();
|
|
1604
1524
|
case 35:
|
|
1605
|
-
throw
|
|
1525
|
+
throw _context19.t0;
|
|
1606
1526
|
case 36:
|
|
1607
1527
|
case "end":
|
|
1608
|
-
return
|
|
1528
|
+
return _context19.stop();
|
|
1609
1529
|
}
|
|
1610
|
-
},
|
|
1530
|
+
}, _callee19, this, [[4, 29]]);
|
|
1611
1531
|
}));
|
|
1612
1532
|
function SetSignerFromOauthToken(_x14) {
|
|
1613
1533
|
return _SetSignerFromOauthToken.apply(this, arguments);
|
|
@@ -1625,8 +1545,8 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1625
1545
|
*/
|
|
1626
1546
|
}, {
|
|
1627
1547
|
key: "CreateStaticToken",
|
|
1628
|
-
value: function CreateStaticToken(
|
|
1629
|
-
var libraryId =
|
|
1548
|
+
value: function CreateStaticToken(_ref23) {
|
|
1549
|
+
var libraryId = _ref23.libraryId;
|
|
1630
1550
|
var token = {
|
|
1631
1551
|
qspace_id: this.contentSpaceId
|
|
1632
1552
|
};
|
|
@@ -1647,10 +1567,10 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1647
1567
|
}, {
|
|
1648
1568
|
key: "SetStaticToken",
|
|
1649
1569
|
value: function SetStaticToken() {
|
|
1650
|
-
var
|
|
1651
|
-
token =
|
|
1652
|
-
|
|
1653
|
-
update =
|
|
1570
|
+
var _ref24 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
1571
|
+
token = _ref24.token,
|
|
1572
|
+
_ref24$update = _ref24.update,
|
|
1573
|
+
update = _ref24$update === void 0 ? false : _ref24$update;
|
|
1654
1574
|
if (token) {
|
|
1655
1575
|
this.staticToken = token;
|
|
1656
1576
|
} else {
|
|
@@ -1682,28 +1602,28 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1682
1602
|
}, {
|
|
1683
1603
|
key: "SetPolicyAuthorization",
|
|
1684
1604
|
value: function () {
|
|
1685
|
-
var _SetPolicyAuthorization = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1605
|
+
var _SetPolicyAuthorization = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20(_ref25) {
|
|
1686
1606
|
var objectId;
|
|
1687
|
-
return _regeneratorRuntime.wrap(function
|
|
1688
|
-
while (1) switch (
|
|
1607
|
+
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
|
1608
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
1689
1609
|
case 0:
|
|
1690
|
-
objectId =
|
|
1691
|
-
|
|
1692
|
-
|
|
1610
|
+
objectId = _ref25.objectId;
|
|
1611
|
+
_context20.t0 = this;
|
|
1612
|
+
_context20.next = 4;
|
|
1693
1613
|
return this.GenerateStateChannelToken({
|
|
1694
1614
|
objectId: objectId
|
|
1695
1615
|
});
|
|
1696
1616
|
case 4:
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
token:
|
|
1617
|
+
_context20.t1 = _context20.sent;
|
|
1618
|
+
_context20.t2 = {
|
|
1619
|
+
token: _context20.t1
|
|
1700
1620
|
};
|
|
1701
|
-
|
|
1621
|
+
_context20.t0.SetStaticToken.call(_context20.t0, _context20.t2);
|
|
1702
1622
|
case 7:
|
|
1703
1623
|
case "end":
|
|
1704
|
-
return
|
|
1624
|
+
return _context20.stop();
|
|
1705
1625
|
}
|
|
1706
|
-
},
|
|
1626
|
+
}, _callee20, this);
|
|
1707
1627
|
}));
|
|
1708
1628
|
function SetPolicyAuthorization(_x15) {
|
|
1709
1629
|
return _SetPolicyAuthorization.apply(this, arguments);
|
|
@@ -1719,21 +1639,21 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1719
1639
|
}, {
|
|
1720
1640
|
key: "Sign",
|
|
1721
1641
|
value: function () {
|
|
1722
|
-
var _Sign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1642
|
+
var _Sign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(string) {
|
|
1723
1643
|
var signature;
|
|
1724
|
-
return _regeneratorRuntime.wrap(function
|
|
1725
|
-
while (1) switch (
|
|
1644
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
1645
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
1726
1646
|
case 0:
|
|
1727
|
-
|
|
1647
|
+
_context21.next = 2;
|
|
1728
1648
|
return this.authClient.Sign(Ethers.utils.keccak256(Ethers.utils.toUtf8Bytes(string)));
|
|
1729
1649
|
case 2:
|
|
1730
|
-
signature =
|
|
1731
|
-
return
|
|
1650
|
+
signature = _context21.sent;
|
|
1651
|
+
return _context21.abrupt("return", this.utils.FormatSignature(signature));
|
|
1732
1652
|
case 4:
|
|
1733
1653
|
case "end":
|
|
1734
|
-
return
|
|
1654
|
+
return _context21.stop();
|
|
1735
1655
|
}
|
|
1736
|
-
},
|
|
1656
|
+
}, _callee21, this);
|
|
1737
1657
|
}));
|
|
1738
1658
|
function Sign(_x16) {
|
|
1739
1659
|
return _Sign.apply(this, arguments);
|
|
@@ -1752,28 +1672,28 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1752
1672
|
}, {
|
|
1753
1673
|
key: "EncryptECIES",
|
|
1754
1674
|
value: function () {
|
|
1755
|
-
var _EncryptECIES = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1675
|
+
var _EncryptECIES = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(_ref26) {
|
|
1756
1676
|
var message, publicKey;
|
|
1757
|
-
return _regeneratorRuntime.wrap(function
|
|
1758
|
-
while (1) switch (
|
|
1677
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
1678
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
1759
1679
|
case 0:
|
|
1760
|
-
message =
|
|
1680
|
+
message = _ref26.message, publicKey = _ref26.publicKey;
|
|
1761
1681
|
if (this.signer) {
|
|
1762
|
-
|
|
1682
|
+
_context22.next = 3;
|
|
1763
1683
|
break;
|
|
1764
1684
|
}
|
|
1765
1685
|
throw "Signer not set";
|
|
1766
1686
|
case 3:
|
|
1767
1687
|
ValidatePresence("message", message);
|
|
1768
|
-
|
|
1688
|
+
_context22.next = 6;
|
|
1769
1689
|
return this.Crypto.EncryptConk(message, publicKey || this.signer._signingKey().publicKey);
|
|
1770
1690
|
case 6:
|
|
1771
|
-
return
|
|
1691
|
+
return _context22.abrupt("return", _context22.sent);
|
|
1772
1692
|
case 7:
|
|
1773
1693
|
case "end":
|
|
1774
|
-
return
|
|
1694
|
+
return _context22.stop();
|
|
1775
1695
|
}
|
|
1776
|
-
},
|
|
1696
|
+
}, _callee22, this);
|
|
1777
1697
|
}));
|
|
1778
1698
|
function EncryptECIES(_x17) {
|
|
1779
1699
|
return _EncryptECIES.apply(this, arguments);
|
|
@@ -1791,28 +1711,28 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1791
1711
|
}, {
|
|
1792
1712
|
key: "DecryptECIES",
|
|
1793
1713
|
value: function () {
|
|
1794
|
-
var _DecryptECIES = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1714
|
+
var _DecryptECIES = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(_ref27) {
|
|
1795
1715
|
var message;
|
|
1796
|
-
return _regeneratorRuntime.wrap(function
|
|
1797
|
-
while (1) switch (
|
|
1716
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
|
1717
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
1798
1718
|
case 0:
|
|
1799
|
-
message =
|
|
1719
|
+
message = _ref27.message;
|
|
1800
1720
|
if (this.signer) {
|
|
1801
|
-
|
|
1721
|
+
_context23.next = 3;
|
|
1802
1722
|
break;
|
|
1803
1723
|
}
|
|
1804
1724
|
throw "Signer not set";
|
|
1805
1725
|
case 3:
|
|
1806
1726
|
ValidatePresence("message", message);
|
|
1807
|
-
|
|
1727
|
+
_context23.next = 6;
|
|
1808
1728
|
return this.Crypto.DecryptCap(message, this.signer);
|
|
1809
1729
|
case 6:
|
|
1810
|
-
return
|
|
1730
|
+
return _context23.abrupt("return", _context23.sent);
|
|
1811
1731
|
case 7:
|
|
1812
1732
|
case "end":
|
|
1813
|
-
return
|
|
1733
|
+
return _context23.stop();
|
|
1814
1734
|
}
|
|
1815
|
-
},
|
|
1735
|
+
}, _callee23, this);
|
|
1816
1736
|
}));
|
|
1817
1737
|
function DecryptECIES(_x18) {
|
|
1818
1738
|
return _DecryptECIES.apply(this, arguments);
|
|
@@ -1833,22 +1753,22 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1833
1753
|
}, {
|
|
1834
1754
|
key: "Request",
|
|
1835
1755
|
value: function () {
|
|
1836
|
-
var _Request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1837
|
-
var url,
|
|
1838
|
-
return _regeneratorRuntime.wrap(function
|
|
1839
|
-
while (1) switch (
|
|
1756
|
+
var _Request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(_ref28) {
|
|
1757
|
+
var url, _ref28$format, format, _ref28$method, method, _ref28$headers, headers, body;
|
|
1758
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
|
1759
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
1840
1760
|
case 0:
|
|
1841
|
-
url =
|
|
1842
|
-
return
|
|
1761
|
+
url = _ref28.url, _ref28$format = _ref28.format, format = _ref28$format === void 0 ? "json" : _ref28$format, _ref28$method = _ref28.method, method = _ref28$method === void 0 ? "GET" : _ref28$method, _ref28$headers = _ref28.headers, headers = _ref28$headers === void 0 ? {} : _ref28$headers, body = _ref28.body;
|
|
1762
|
+
return _context24.abrupt("return", this.utils.ResponseToFormat(format, HttpClient.Fetch(url, {
|
|
1843
1763
|
method: method,
|
|
1844
1764
|
headers: headers,
|
|
1845
1765
|
body: body
|
|
1846
1766
|
})));
|
|
1847
1767
|
case 2:
|
|
1848
1768
|
case "end":
|
|
1849
|
-
return
|
|
1769
|
+
return _context24.stop();
|
|
1850
1770
|
}
|
|
1851
|
-
},
|
|
1771
|
+
}, _callee24, this);
|
|
1852
1772
|
}));
|
|
1853
1773
|
function Request(_x19) {
|
|
1854
1774
|
return _Request.apply(this, arguments);
|
|
@@ -1858,12 +1778,12 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1858
1778
|
}, {
|
|
1859
1779
|
key: "MakeAuthServiceRequest",
|
|
1860
1780
|
value: function () {
|
|
1861
|
-
var _MakeAuthServiceRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1862
|
-
var kmsId, objectId, versionHash,
|
|
1863
|
-
return _regeneratorRuntime.wrap(function
|
|
1864
|
-
while (1) switch (
|
|
1781
|
+
var _MakeAuthServiceRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(_ref29) {
|
|
1782
|
+
var kmsId, objectId, versionHash, _ref29$method, method, path, bodyType, _ref29$body, body, _ref29$queryParams, queryParams, headers, format, response;
|
|
1783
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
1784
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
1865
1785
|
case 0:
|
|
1866
|
-
kmsId =
|
|
1786
|
+
kmsId = _ref29.kmsId, objectId = _ref29.objectId, versionHash = _ref29.versionHash, _ref29$method = _ref29.method, method = _ref29$method === void 0 ? "GET" : _ref29$method, path = _ref29.path, bodyType = _ref29.bodyType, _ref29$body = _ref29.body, body = _ref29$body === void 0 ? {} : _ref29$body, _ref29$queryParams = _ref29.queryParams, queryParams = _ref29$queryParams === void 0 ? {} : _ref29$queryParams, headers = _ref29.headers, format = _ref29.format;
|
|
1867
1787
|
response = this.authClient.MakeAuthServiceRequest({
|
|
1868
1788
|
kmsId: kmsId,
|
|
1869
1789
|
objectId: objectId,
|
|
@@ -1875,12 +1795,12 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1875
1795
|
queryParams: queryParams,
|
|
1876
1796
|
headers: headers
|
|
1877
1797
|
});
|
|
1878
|
-
return
|
|
1798
|
+
return _context25.abrupt("return", !format ? response : this.utils.ResponseToFormat(format, response));
|
|
1879
1799
|
case 3:
|
|
1880
1800
|
case "end":
|
|
1881
|
-
return
|
|
1801
|
+
return _context25.stop();
|
|
1882
1802
|
}
|
|
1883
|
-
},
|
|
1803
|
+
}, _callee25, this);
|
|
1884
1804
|
}));
|
|
1885
1805
|
function MakeAuthServiceRequest(_x20) {
|
|
1886
1806
|
return _MakeAuthServiceRequest.apply(this, arguments);
|
|
@@ -1903,17 +1823,17 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1903
1823
|
}, {
|
|
1904
1824
|
key: "CallFromFrameMessage",
|
|
1905
1825
|
value: function () {
|
|
1906
|
-
var _CallFromFrameMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
1826
|
+
var _CallFromFrameMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(message, Respond) {
|
|
1907
1827
|
var _this4 = this;
|
|
1908
1828
|
var callback, method, methodResults, responseError;
|
|
1909
|
-
return _regeneratorRuntime.wrap(function
|
|
1910
|
-
while (1) switch (
|
|
1829
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
1830
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
1911
1831
|
case 0:
|
|
1912
1832
|
if (!(message.type !== "ElvFrameRequest")) {
|
|
1913
|
-
|
|
1833
|
+
_context26.next = 2;
|
|
1914
1834
|
break;
|
|
1915
1835
|
}
|
|
1916
|
-
return
|
|
1836
|
+
return _context26.abrupt("return");
|
|
1917
1837
|
case 2:
|
|
1918
1838
|
if (message.callbackId) {
|
|
1919
1839
|
callback = function callback(result) {
|
|
@@ -1925,77 +1845,77 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
1925
1845
|
};
|
|
1926
1846
|
message.args.callback = callback;
|
|
1927
1847
|
}
|
|
1928
|
-
|
|
1848
|
+
_context26.prev = 3;
|
|
1929
1849
|
method = message.calledMethod;
|
|
1930
1850
|
if (!(message.module === "walletClient")) {
|
|
1931
|
-
|
|
1851
|
+
_context26.next = 15;
|
|
1932
1852
|
break;
|
|
1933
1853
|
}
|
|
1934
1854
|
if (this.walletClient) {
|
|
1935
|
-
|
|
1855
|
+
_context26.next = 8;
|
|
1936
1856
|
break;
|
|
1937
1857
|
}
|
|
1938
1858
|
throw Error("Wallet client not set");
|
|
1939
1859
|
case 8:
|
|
1940
1860
|
if (!this.walletClient.ForbiddenMethods().includes(method)) {
|
|
1941
|
-
|
|
1861
|
+
_context26.next = 10;
|
|
1942
1862
|
break;
|
|
1943
1863
|
}
|
|
1944
1864
|
throw Error("Invalid user profile method: " + method);
|
|
1945
1865
|
case 10:
|
|
1946
|
-
|
|
1866
|
+
_context26.next = 12;
|
|
1947
1867
|
return this.walletClient[method](message.args);
|
|
1948
1868
|
case 12:
|
|
1949
|
-
methodResults =
|
|
1950
|
-
|
|
1869
|
+
methodResults = _context26.sent;
|
|
1870
|
+
_context26.next = 28;
|
|
1951
1871
|
break;
|
|
1952
1872
|
case 15:
|
|
1953
1873
|
if (!(message.module === "userProfileClient")) {
|
|
1954
|
-
|
|
1874
|
+
_context26.next = 23;
|
|
1955
1875
|
break;
|
|
1956
1876
|
}
|
|
1957
1877
|
if (this.userProfileClient.FrameAllowedMethods().includes(method)) {
|
|
1958
|
-
|
|
1878
|
+
_context26.next = 18;
|
|
1959
1879
|
break;
|
|
1960
1880
|
}
|
|
1961
1881
|
throw Error("Invalid user profile method: " + method);
|
|
1962
1882
|
case 18:
|
|
1963
|
-
|
|
1883
|
+
_context26.next = 20;
|
|
1964
1884
|
return this.userProfileClient[method](message.args);
|
|
1965
1885
|
case 20:
|
|
1966
|
-
methodResults =
|
|
1967
|
-
|
|
1886
|
+
methodResults = _context26.sent;
|
|
1887
|
+
_context26.next = 28;
|
|
1968
1888
|
break;
|
|
1969
1889
|
case 23:
|
|
1970
1890
|
if (this.FrameAllowedMethods().includes(method)) {
|
|
1971
|
-
|
|
1891
|
+
_context26.next = 25;
|
|
1972
1892
|
break;
|
|
1973
1893
|
}
|
|
1974
1894
|
throw Error("Invalid method: " + method);
|
|
1975
1895
|
case 25:
|
|
1976
|
-
|
|
1896
|
+
_context26.next = 27;
|
|
1977
1897
|
return this[method](message.args);
|
|
1978
1898
|
case 27:
|
|
1979
|
-
methodResults =
|
|
1899
|
+
methodResults = _context26.sent;
|
|
1980
1900
|
case 28:
|
|
1981
1901
|
Respond(this.utils.MakeClonable({
|
|
1982
1902
|
type: "ElvFrameResponse",
|
|
1983
1903
|
requestId: message.requestId,
|
|
1984
1904
|
response: methodResults
|
|
1985
1905
|
}));
|
|
1986
|
-
|
|
1906
|
+
_context26.next = 38;
|
|
1987
1907
|
break;
|
|
1988
1908
|
case 31:
|
|
1989
|
-
|
|
1990
|
-
|
|
1909
|
+
_context26.prev = 31;
|
|
1910
|
+
_context26.t0 = _context26["catch"](3);
|
|
1991
1911
|
// eslint-disable-next-line no-console
|
|
1992
|
-
this.Log("Frame Message Error:\n Method: ".concat(message.calledMethod, "\n Arguments: ").concat(JSON.stringify(message.args, null, 2), "\n Error: ").concat(_typeof(
|
|
1912
|
+
this.Log("Frame Message Error:\n Method: ".concat(message.calledMethod, "\n Arguments: ").concat(JSON.stringify(message.args, null, 2), "\n Error: ").concat(_typeof(_context26.t0) === "object" ? JSON.stringify(_context26.t0, null, 2) : _context26.t0), true);
|
|
1993
1913
|
|
|
1994
1914
|
// eslint-disable-next-line no-console
|
|
1995
1915
|
console.error(message);
|
|
1996
1916
|
// eslint-disable-next-line no-console
|
|
1997
|
-
console.error(
|
|
1998
|
-
responseError =
|
|
1917
|
+
console.error(_context26.t0);
|
|
1918
|
+
responseError = _context26.t0 instanceof Error ? _context26.t0.message : _context26.t0;
|
|
1999
1919
|
Respond(this.utils.MakeClonable({
|
|
2000
1920
|
type: "ElvFrameResponse",
|
|
2001
1921
|
requestId: message.requestId,
|
|
@@ -2003,9 +1923,9 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
2003
1923
|
}));
|
|
2004
1924
|
case 38:
|
|
2005
1925
|
case "end":
|
|
2006
|
-
return
|
|
1926
|
+
return _context26.stop();
|
|
2007
1927
|
}
|
|
2008
|
-
},
|
|
1928
|
+
}, _callee26, this, [[3, 31]]);
|
|
2009
1929
|
}));
|
|
2010
1930
|
function CallFromFrameMessage(_x21, _x22) {
|
|
2011
1931
|
return _CallFromFrameMessage.apply(this, arguments);
|
|
@@ -2015,13 +1935,13 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
2015
1935
|
}], [{
|
|
2016
1936
|
key: "Configuration",
|
|
2017
1937
|
value: function () {
|
|
2018
|
-
var _Configuration = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2019
|
-
var configUrl,
|
|
2020
|
-
return _regeneratorRuntime.wrap(function
|
|
2021
|
-
while (1) switch (
|
|
1938
|
+
var _Configuration = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(_ref30) {
|
|
1939
|
+
var configUrl, _ref30$kmsUrls, kmsUrls, region, clientIP, uri, fabricInfo, filterHTTPS, fabricURIs, ethereumURIs, authServiceURIs, fileServiceURIs, searchURIs, fabricVersion;
|
|
1940
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
1941
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
2022
1942
|
case 0:
|
|
2023
|
-
configUrl =
|
|
2024
|
-
|
|
1943
|
+
configUrl = _ref30.configUrl, _ref30$kmsUrls = _ref30.kmsUrls, kmsUrls = _ref30$kmsUrls === void 0 ? [] : _ref30$kmsUrls, region = _ref30.region, clientIP = _ref30.clientIP;
|
|
1944
|
+
_context27.prev = 1;
|
|
2025
1945
|
uri = new URI(configUrl);
|
|
2026
1946
|
uri.pathname("/config");
|
|
2027
1947
|
if (region) {
|
|
@@ -2030,10 +1950,10 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
2030
1950
|
if (clientIP) {
|
|
2031
1951
|
uri.addSearch("client_ip", clientIP);
|
|
2032
1952
|
}
|
|
2033
|
-
|
|
1953
|
+
_context27.next = 8;
|
|
2034
1954
|
return Utils.ResponseToJson(HttpClient.Fetch(uri.toString()));
|
|
2035
1955
|
case 8:
|
|
2036
|
-
fabricInfo =
|
|
1956
|
+
fabricInfo = _context27.sent;
|
|
2037
1957
|
// If any HTTPS urls present, throw away HTTP urls so only HTTPS will be used
|
|
2038
1958
|
filterHTTPS = function filterHTTPS(uri) {
|
|
2039
1959
|
return uri.toLowerCase().startsWith("https");
|
|
@@ -2056,7 +1976,7 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
2056
1976
|
}
|
|
2057
1977
|
searchURIs = fabricInfo.network.services.search || [];
|
|
2058
1978
|
fabricVersion = Math.max.apply(Math, _toConsumableArray(fabricInfo.network.api_versions || [2]));
|
|
2059
|
-
return
|
|
1979
|
+
return _context27.abrupt("return", {
|
|
2060
1980
|
nodeId: fabricInfo.node_id,
|
|
2061
1981
|
contentSpaceId: fabricInfo.qspace.id,
|
|
2062
1982
|
networkId: (fabricInfo.qspace.ethereum || {}).network_id,
|
|
@@ -2070,18 +1990,18 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
2070
1990
|
fabricVersion: fabricVersion
|
|
2071
1991
|
});
|
|
2072
1992
|
case 23:
|
|
2073
|
-
|
|
2074
|
-
|
|
1993
|
+
_context27.prev = 23;
|
|
1994
|
+
_context27.t0 = _context27["catch"](1);
|
|
2075
1995
|
// eslint-disable-next-line no-console
|
|
2076
1996
|
console.error("Error retrieving fabric configuration:");
|
|
2077
1997
|
// eslint-disable-next-line no-console
|
|
2078
|
-
console.error(
|
|
2079
|
-
throw
|
|
1998
|
+
console.error(_context27.t0);
|
|
1999
|
+
throw _context27.t0;
|
|
2080
2000
|
case 28:
|
|
2081
2001
|
case "end":
|
|
2082
|
-
return
|
|
2002
|
+
return _context27.stop();
|
|
2083
2003
|
}
|
|
2084
|
-
},
|
|
2004
|
+
}, _callee27, null, [[1, 23]]);
|
|
2085
2005
|
}));
|
|
2086
2006
|
function Configuration(_x23) {
|
|
2087
2007
|
return _Configuration.apply(this, arguments);
|
|
@@ -2120,20 +2040,20 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
2120
2040
|
}, {
|
|
2121
2041
|
key: "FromNetworkName",
|
|
2122
2042
|
value: function () {
|
|
2123
|
-
var _FromNetworkName = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2124
|
-
var networkName, region, clientIP, trustAuthorityId, staticToken,
|
|
2125
|
-
return _regeneratorRuntime.wrap(function
|
|
2126
|
-
while (1) switch (
|
|
2043
|
+
var _FromNetworkName = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(_ref31) {
|
|
2044
|
+
var networkName, region, clientIP, trustAuthorityId, staticToken, _ref31$ethereumContra, ethereumContractTimeout, _ref31$noCache, noCache, _ref31$noAuth, noAuth, assumeV3, configUrl;
|
|
2045
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
2046
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
2127
2047
|
case 0:
|
|
2128
|
-
networkName =
|
|
2048
|
+
networkName = _ref31.networkName, region = _ref31.region, clientIP = _ref31.clientIP, trustAuthorityId = _ref31.trustAuthorityId, staticToken = _ref31.staticToken, _ref31$ethereumContra = _ref31.ethereumContractTimeout, ethereumContractTimeout = _ref31$ethereumContra === void 0 ? 10 : _ref31$ethereumContra, _ref31$noCache = _ref31.noCache, noCache = _ref31$noCache === void 0 ? false : _ref31$noCache, _ref31$noAuth = _ref31.noAuth, noAuth = _ref31$noAuth === void 0 ? false : _ref31$noAuth, assumeV3 = _ref31.assumeV3;
|
|
2129
2049
|
configUrl = this.Networks()[networkName];
|
|
2130
2050
|
if (configUrl) {
|
|
2131
|
-
|
|
2051
|
+
_context28.next = 4;
|
|
2132
2052
|
break;
|
|
2133
2053
|
}
|
|
2134
2054
|
throw Error("Invalid network name: " + networkName);
|
|
2135
2055
|
case 4:
|
|
2136
|
-
|
|
2056
|
+
_context28.next = 6;
|
|
2137
2057
|
return this.FromConfigurationUrl({
|
|
2138
2058
|
configUrl: configUrl,
|
|
2139
2059
|
region: region,
|
|
@@ -2146,12 +2066,12 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
2146
2066
|
assumeV3: assumeV3
|
|
2147
2067
|
});
|
|
2148
2068
|
case 6:
|
|
2149
|
-
return
|
|
2069
|
+
return _context28.abrupt("return", _context28.sent);
|
|
2150
2070
|
case 7:
|
|
2151
2071
|
case "end":
|
|
2152
|
-
return
|
|
2072
|
+
return _context28.stop();
|
|
2153
2073
|
}
|
|
2154
|
-
},
|
|
2074
|
+
}, _callee28, this);
|
|
2155
2075
|
}));
|
|
2156
2076
|
function FromNetworkName(_x24) {
|
|
2157
2077
|
return _FromNetworkName.apply(this, arguments);
|
|
@@ -2177,20 +2097,20 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
2177
2097
|
}, {
|
|
2178
2098
|
key: "FromConfigurationUrl",
|
|
2179
2099
|
value: function () {
|
|
2180
|
-
var _FromConfigurationUrl = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2181
|
-
var configUrl, region, clientIP, trustAuthorityId, staticToken,
|
|
2182
|
-
return _regeneratorRuntime.wrap(function
|
|
2183
|
-
while (1) switch (
|
|
2100
|
+
var _FromConfigurationUrl = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(_ref32) {
|
|
2101
|
+
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;
|
|
2102
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
2103
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
2184
2104
|
case 0:
|
|
2185
|
-
configUrl =
|
|
2186
|
-
|
|
2105
|
+
configUrl = _ref32.configUrl, region = _ref32.region, clientIP = _ref32.clientIP, trustAuthorityId = _ref32.trustAuthorityId, staticToken = _ref32.staticToken, _ref32$ethereumContra = _ref32.ethereumContractTimeout, ethereumContractTimeout = _ref32$ethereumContra === void 0 ? 10 : _ref32$ethereumContra, _ref32$noCache = _ref32.noCache, noCache = _ref32$noCache === void 0 ? false : _ref32$noCache, _ref32$noAuth = _ref32.noAuth, noAuth = _ref32$noAuth === void 0 ? false : _ref32$noAuth, _ref32$assumeV = _ref32.assumeV3, assumeV3 = _ref32$assumeV === void 0 ? false : _ref32$assumeV;
|
|
2106
|
+
_context29.next = 3;
|
|
2187
2107
|
return ElvClient.Configuration({
|
|
2188
2108
|
configUrl: configUrl,
|
|
2189
2109
|
clientIP: clientIP,
|
|
2190
2110
|
region: region
|
|
2191
2111
|
});
|
|
2192
2112
|
case 3:
|
|
2193
|
-
_yield$ElvClient$Conf3 =
|
|
2113
|
+
_yield$ElvClient$Conf3 = _context29.sent;
|
|
2194
2114
|
contentSpaceId = _yield$ElvClient$Conf3.contentSpaceId;
|
|
2195
2115
|
networkId = _yield$ElvClient$Conf3.networkId;
|
|
2196
2116
|
networkName = _yield$ElvClient$Conf3.networkName;
|
|
@@ -2220,12 +2140,12 @@ var ElvClient = /*#__PURE__*/function () {
|
|
|
2220
2140
|
client.configUrl = configUrl;
|
|
2221
2141
|
client.region = region;
|
|
2222
2142
|
client.clientIP = clientIP;
|
|
2223
|
-
return
|
|
2143
|
+
return _context29.abrupt("return", client);
|
|
2224
2144
|
case 18:
|
|
2225
2145
|
case "end":
|
|
2226
|
-
return
|
|
2146
|
+
return _context29.stop();
|
|
2227
2147
|
}
|
|
2228
|
-
},
|
|
2148
|
+
}, _callee29);
|
|
2229
2149
|
}));
|
|
2230
2150
|
function FromConfigurationUrl(_x25) {
|
|
2231
2151
|
return _FromConfigurationUrl.apply(this, arguments);
|