@eluvio/elv-client-js 4.0.132 → 4.0.133

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.
Files changed (35) hide show
  1. package/dist/ElvClient-min.js +14 -15
  2. package/dist/ElvClient-node-min.js +13 -14
  3. package/dist/ElvFrameClient-min.js +10 -10
  4. package/dist/ElvPermissionsClient-min.js +9 -9
  5. package/dist/ElvWalletClient-min.js +14 -15
  6. package/dist/ElvWalletClient-node-min.js +13 -14
  7. package/dist/src/AuthorizationClient.js +12 -9
  8. package/dist/src/ContentObjectAudit.js +3 -3
  9. package/dist/src/ContentObjectVerification.js +3 -3
  10. package/dist/src/Crypto.js +2 -2
  11. package/dist/src/ElvClient.js +222 -263
  12. package/dist/src/ElvWallet.js +5 -7
  13. package/dist/src/EthClient.js +9 -8
  14. package/dist/src/FrameClient.js +10 -9
  15. package/dist/src/HttpClient.js +5 -5
  16. package/dist/src/Id.js +2 -1
  17. package/dist/src/PermissionsClient.js +19 -31
  18. package/dist/src/RemoteSigner.js +11 -10
  19. package/dist/src/UserProfileClient.js +20 -35
  20. package/dist/src/Utils.js +3 -2
  21. package/dist/src/client/ABRPublishing.js +2 -2
  22. package/dist/src/client/AccessGroups.js +2 -2
  23. package/dist/src/client/ContentAccess.js +12 -8
  24. package/dist/src/client/ContentManagement.js +72 -82
  25. package/dist/src/client/Contracts.js +2 -2
  26. package/dist/src/client/Files.js +2 -2
  27. package/dist/src/client/LiveConf.js +17 -31
  28. package/dist/src/client/LiveStream.js +4 -2
  29. package/dist/src/client/NFT.js +2 -2
  30. package/dist/src/client/Shares.js +24 -47
  31. package/dist/src/walletClient/ClientMethods.js +2 -2
  32. package/dist/src/walletClient/Profile.js +2 -2
  33. package/dist/src/walletClient/Utils.js +2 -2
  34. package/dist/src/walletClient/index.js +48 -63
  35. package/package.json +1 -1
@@ -2,8 +2,8 @@ var _typeof = require("@babel/runtime/helpers/typeof");
2
2
  var _defineProperty = require("@babel/runtime/helpers/defineProperty");
3
3
  var _regeneratorRuntime = require("@babel/runtime/regenerator");
4
4
  var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
5
- 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; }
6
- 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; }
5
+ 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; }
6
+ 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; }
7
7
  /**
8
8
  * Methods for managing content types, libraries and objects
9
9
  *
@@ -421,11 +421,11 @@ exports.CreateContentType = /*#__PURE__*/function () {
421
421
  * @param {string} name - Library name
422
422
  * @param {string=} description - Library description
423
423
  * @param {blob=} image - Image associated with the library
424
- * @param {string=} imageName - Name of the image associated with the library (required if image specified)
424
+ * @param {string=} - imageName - Name of the image associated with the library (required if image specified)
425
425
  * @param {Object=} metadata - Metadata of library object
426
426
  * @param {string=} kmsId - ID of the KMS to use for content in this library. If not specified,
427
427
  * the default KMS will be used.
428
- * @param {string=} tenantContractId - ID of the tenant to use for this library
428
+ * @param {string=} tenantId - ID of the tenant to use for this library
429
429
  *
430
430
  * @returns {Promise<string>} - Library ID of created library
431
431
  */
@@ -657,17 +657,32 @@ exports.SetContentObjectImage = /*#__PURE__*/function () {
657
657
  */
658
658
  exports.DeleteContentLibrary = /*#__PURE__*/function () {
659
659
  var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(_ref14) {
660
- var libraryId;
660
+ var libraryId, path, authorizationHeader;
661
661
  return _regeneratorRuntime.wrap(function _callee8$(_context8) {
662
662
  while (1) switch (_context8.prev = _context8.next) {
663
663
  case 0:
664
664
  libraryId = _ref14.libraryId;
665
- throw Error("Delete library not supported. (".concat(libraryId, ")"));
666
- case 2:
665
+ throw Error("Not supported");
666
+ case 6:
667
+ authorizationHeader = _context8.sent;
668
+ _context8.next = 9;
669
+ return this.CallContractMethodAndWait({
670
+ contractAddress: this.utils.HashToAddress(libraryId),
671
+ methodName: "kill",
672
+ methodArgs: []
673
+ });
674
+ case 9:
675
+ _context8.next = 11;
676
+ return this.HttpClient.Request({
677
+ headers: authorizationHeader,
678
+ method: "DELETE",
679
+ path: path
680
+ });
681
+ case 11:
667
682
  case "end":
668
683
  return _context8.stop();
669
684
  }
670
- }, _callee8);
685
+ }, _callee8, this);
671
686
  }));
672
687
  return function (_x8) {
673
688
  return _ref15.apply(this, arguments);
@@ -813,11 +828,7 @@ exports.RemoveLibraryContentType = /*#__PURE__*/function () {
813
828
  *
814
829
  * meta: Metadata to use for the new object
815
830
  *
816
- * noEncryptionConk: Set to true to prevent creation of an encryption conk for the object
817
- *
818
- * createKMSConk: Set to true to create a KMS conk for object (usually for sharing a playable object) (incompatible with noEncryptionConk: true)
819
- *
820
- * @returns {Promise<Object>} - Response containing the object ID and write token of the draft, as well as the url of the node that created the write token.
831
+ * @returns {Promise<Object>} - Response containing the object ID and write token of the draft
821
832
  */
822
833
  exports.CreateContentObject = /*#__PURE__*/function () {
823
834
  var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(_ref20) {
@@ -831,164 +842,143 @@ exports.CreateContentObject = /*#__PURE__*/function () {
831
842
  ValidateObject(objectId);
832
843
  }
833
844
  this.Log("Creating content object: ".concat(libraryId, " ").concat(objectId || ""));
834
- if (!(options.noEncryptionConk && options.createKMSConk)) {
835
- _context11.next = 6;
836
- break;
837
- }
838
- throw new Error("Incompatible options: noEncryptionConk and createKMSConk both set to true");
839
- case 6:
845
+
846
+ // Look up content type, if specified
840
847
  if (!options.type) {
841
- _context11.next = 28;
848
+ _context11.next = 26;
842
849
  break;
843
850
  }
844
851
  this.Log("Type specified: ".concat(options.type));
845
852
  type = options.type;
846
853
  if (!type.startsWith("hq__")) {
847
- _context11.next = 15;
854
+ _context11.next = 13;
848
855
  break;
849
856
  }
850
- _context11.next = 12;
857
+ _context11.next = 10;
851
858
  return this.ContentType({
852
859
  versionHash: type
853
860
  });
854
- case 12:
861
+ case 10:
855
862
  type = _context11.sent;
856
- _context11.next = 24;
863
+ _context11.next = 22;
857
864
  break;
858
- case 15:
865
+ case 13:
859
866
  if (!type.startsWith("iq__")) {
860
- _context11.next = 21;
867
+ _context11.next = 19;
861
868
  break;
862
869
  }
863
- _context11.next = 18;
870
+ _context11.next = 16;
864
871
  return this.ContentType({
865
872
  typeId: type
866
873
  });
867
- case 18:
874
+ case 16:
868
875
  type = _context11.sent;
869
- _context11.next = 24;
876
+ _context11.next = 22;
870
877
  break;
871
- case 21:
872
- _context11.next = 23;
878
+ case 19:
879
+ _context11.next = 21;
873
880
  return this.ContentType({
874
881
  name: type
875
882
  });
876
- case 23:
883
+ case 21:
877
884
  type = _context11.sent;
878
- case 24:
885
+ case 22:
879
886
  if (type) {
880
- _context11.next = 26;
887
+ _context11.next = 24;
881
888
  break;
882
889
  }
883
890
  throw Error("Unable to find content type '".concat(options.type, "'"));
884
- case 26:
891
+ case 24:
885
892
  typeId = type.id;
886
893
  options.type = type.hash;
887
- case 28:
894
+ case 26:
888
895
  if (objectId) {
889
- _context11.next = 46;
896
+ _context11.next = 44;
890
897
  break;
891
898
  }
892
- _context11.next = 31;
899
+ _context11.next = 29;
893
900
  return this.CurrentAccountAddress();
894
- case 31:
901
+ case 29:
895
902
  currentAccountAddress = _context11.sent;
896
- _context11.next = 34;
903
+ _context11.next = 32;
897
904
  return this.CallContractMethod({
898
905
  contractAddress: this.utils.HashToAddress(libraryId),
899
906
  methodName: "canContribute",
900
907
  methodArgs: [currentAccountAddress]
901
908
  });
902
- case 34:
909
+ case 32:
903
910
  canContribute = _context11.sent;
904
911
  if (canContribute) {
905
- _context11.next = 37;
912
+ _context11.next = 35;
906
913
  break;
907
914
  }
908
915
  throw Error("Current user does not have permission to create content in library ".concat(libraryId));
909
- case 37:
916
+ case 35:
910
917
  this.Log("Deploying contract...");
911
- _context11.next = 40;
918
+ _context11.next = 38;
912
919
  return this.authClient.CreateContentObject({
913
920
  libraryId: libraryId,
914
921
  typeId: typeId
915
922
  });
916
- case 40:
923
+ case 38:
917
924
  _yield$this$authClien3 = _context11.sent;
918
925
  contractAddress = _yield$this$authClien3.contractAddress;
919
926
  objectId = this.utils.AddressToObjectId(contractAddress);
920
927
  this.Log("Contract deployed: ".concat(contractAddress, " ").concat(objectId));
921
- _context11.next = 53;
928
+ _context11.next = 51;
922
929
  break;
923
- case 46:
930
+ case 44:
924
931
  _context11.t0 = this;
925
932
  _context11.t1 = "Contract already deployed for contract type: ";
926
- _context11.next = 50;
933
+ _context11.next = 48;
927
934
  return this.AccessType({
928
935
  id: objectId
929
936
  });
930
- case 50:
937
+ case 48:
931
938
  _context11.t2 = _context11.sent;
932
939
  _context11.t3 = _context11.t1.concat.call(_context11.t1, _context11.t2);
933
940
  _context11.t0.Log.call(_context11.t0, _context11.t3);
934
- case 53:
941
+ case 51:
935
942
  if (!options.visibility) {
936
- _context11.next = 57;
943
+ _context11.next = 55;
937
944
  break;
938
945
  }
939
946
  this.Log("Setting visibility to ".concat(options.visibility));
940
- _context11.next = 57;
947
+ _context11.next = 55;
941
948
  return this.SetVisibility({
942
949
  id: objectId,
943
950
  visibility: options.visibility
944
951
  });
945
- case 57:
952
+ case 55:
946
953
  path = UrlJoin("qid", objectId);
947
954
  _context11.t4 = this.HttpClient;
948
- _context11.next = 61;
955
+ _context11.next = 59;
949
956
  return this.authClient.AuthorizationHeader({
950
957
  libraryId: libraryId,
951
958
  objectId: objectId,
952
959
  update: true
953
960
  });
954
- case 61:
961
+ case 59:
955
962
  _context11.t5 = _context11.sent;
956
963
  _context11.t6 = path;
957
- _context11.t7 = {
958
- // filter out options not recognized by server (noEncryptionConk, createKMSConk)
959
- type: options.type,
960
- meta: options.meta
961
- };
964
+ _context11.t7 = options;
962
965
  _context11.t8 = {
963
966
  headers: _context11.t5,
964
967
  method: "POST",
965
968
  path: _context11.t6,
966
969
  body: _context11.t7
967
970
  };
968
- _context11.next = 67;
971
+ _context11.next = 65;
969
972
  return _context11.t4.Request.call(_context11.t4, _context11.t8);
970
- case 67:
973
+ case 65:
971
974
  rawCreateResponse = _context11.sent;
972
975
  // extract the url for the node that handled the request
973
- // (not strictly needed now that we can quickly look up node URL for a write token,
974
- // but still convenient)
976
+ // TODO: remove/simplify after we start using /nodes API call to get node URLs for write tokens
975
977
  nodeUrl = new URL(rawCreateResponse.url).origin;
976
- _context11.next = 71;
978
+ _context11.next = 69;
977
979
  return this.utils.ResponseToJson(rawCreateResponse, this.HttpClient.debug, this.HttpClient.Log.bind(this.HttpClient));
978
- case 71:
980
+ case 69:
979
981
  createResponse = _context11.sent;
980
- if (options.noEncryptionConk) {
981
- _context11.next = 75;
982
- break;
983
- }
984
- _context11.next = 75;
985
- return this.CreateEncryptionConk({
986
- libraryId: libraryId,
987
- objectId: objectId,
988
- writeToken: createResponse.write_token,
989
- createKMSConk: !!options.createKMSConk // make sure `undefined` gets converted to `false`
990
- });
991
- case 75:
992
982
  // Record the node used in creating this write token
993
983
  this.RecordWriteToken({
994
984
  writeToken: createResponse.write_token,
@@ -998,7 +988,7 @@ exports.CreateContentObject = /*#__PURE__*/function () {
998
988
  createResponse.objectId = createResponse.id;
999
989
  createResponse.nodeUrl = nodeUrl;
1000
990
  return _context11.abrupt("return", createResponse);
1001
- case 80:
991
+ case 75:
1002
992
  case "end":
1003
993
  return _context11.stop();
1004
994
  }
@@ -2313,7 +2303,7 @@ exports.UpdateContentObjectGraph = /*#__PURE__*/function () {
2313
2303
  return _context30.delegateYield(_loop(), "t0", 8);
2314
2304
  case 8:
2315
2305
  _ret = _context30.t0;
2316
- if (!_ret) {
2306
+ if (!(_typeof(_ret) === "object")) {
2317
2307
  _context30.next = 11;
2318
2308
  break;
2319
2309
  }
@@ -2461,12 +2451,12 @@ exports.CreateLinks = /*#__PURE__*/function () {
2461
2451
  return _regeneratorRuntime.wrap(function _callee31$(_context32) {
2462
2452
  while (1) switch (_context32.prev = _context32.next) {
2463
2453
  case 0:
2464
- path = info.path.replace(/^([/.])+/, "");
2454
+ path = info.path.replace(/^(\/|\.)+/, "");
2465
2455
  type = (info.type || "file") === "file" ? "files" : info.type;
2466
2456
  if (type === "metadata") {
2467
2457
  type = "meta";
2468
2458
  }
2469
- target = authTarget = info.target.replace(/^([/.])+/, "");
2459
+ target = authTarget = info.target.replace(/^(\/|\.)+/, "");
2470
2460
  if (info.targetHash) {
2471
2461
  target = "/qfab/".concat(info.targetHash, "/").concat(type, "/").concat(target);
2472
2462
  } else {
@@ -2,8 +2,8 @@ var _defineProperty = require("@babel/runtime/helpers/defineProperty");
2
2
  var _typeof = require("@babel/runtime/helpers/typeof");
3
3
  var _regeneratorRuntime = require("@babel/runtime/regenerator");
4
4
  var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
5
- 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; }
6
- 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; }
5
+ 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; }
6
+ 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; }
7
7
  /**
8
8
  * Methods for deploying and interacting with contracts
9
9
  *
@@ -2,8 +2,8 @@ var _toConsumableArray = require("@babel/runtime/helpers/toConsumableArray");
2
2
  var _defineProperty = require("@babel/runtime/helpers/defineProperty");
3
3
  var _regeneratorRuntime = require("@babel/runtime/regenerator");
4
4
  var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
5
- 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; }
6
- 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; }
5
+ 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; }
6
+ 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; }
7
7
  /**
8
8
  * Methods for accessing and managing access groups
9
9
  *
@@ -1,9 +1,8 @@
1
- var _slicedToArray = require("@babel/runtime/helpers/slicedToArray");
2
1
  var _defineProperty = require("@babel/runtime/helpers/defineProperty");
3
2
  var _classCallCheck = require("@babel/runtime/helpers/classCallCheck");
4
3
  var _createClass = require("@babel/runtime/helpers/createClass");
5
- 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; }
6
- 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; }
4
+ 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; }
5
+ 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; }
7
6
  /* eslint no-console: 0 */
8
7
 
9
8
  var DefaultABRLadder = {
@@ -110,7 +109,7 @@ var LiveConf = /*#__PURE__*/function () {
110
109
  this.overwriteOriginUrl = overwriteOriginUrl;
111
110
  this.syncAudioToVideo = syncAudioToVideo;
112
111
  }
113
- return _createClass(LiveConf, [{
112
+ _createClass(LiveConf, [{
114
113
  key: "probeKind",
115
114
  value: function probeKind() {
116
115
  var fileNameSplit = this.probeData.format.filename.split(":");
@@ -225,6 +224,7 @@ var LiveConf = /*#__PURE__*/function () {
225
224
  } else {
226
225
  seg.audio = 29.76 * 48000; // Other codecs are resampled @48000
227
226
  }
227
+
228
228
  return seg;
229
229
  }
230
230
 
@@ -447,6 +447,18 @@ var LiveConf = /*#__PURE__*/function () {
447
447
  if (this.syncAudioToVideo) {
448
448
  conf.live_recording.recording_config.recording_params.xc_params.sync_audio_to_stream_id = this.syncAudioToStreamIdValue();
449
449
  }
450
+ if (customSettings.edge_write_token) {
451
+ conf.live_recording.fabric_config.edge_write_token = customSettings.edge_write_token;
452
+ }
453
+ if (customSettings.part_ttl) {
454
+ conf.live_recording.recording_config.recording_params.part_ttl = customSettings.part_ttl;
455
+ }
456
+ if (customSettings.connection_timeout) {
457
+ conf.live_recording.recording_config.recording_params.xc_params.connection_timeout = customSettings.connection_timeout;
458
+ }
459
+ if (customSettings.reconnect_timeout) {
460
+ conf.live_recording.recording_config.recording_params.reconnect_timeout = customSettings.reconnect_timeout;
461
+ }
450
462
 
451
463
  // Fill in specifics for protocol
452
464
  switch (this.probeKind()) {
@@ -549,35 +561,9 @@ var LiveConf = /*#__PURE__*/function () {
549
561
  // Global recording bitrate for all audio streams
550
562
  conf.live_recording.recording_config.recording_params.xc_params.audio_bitrate = globalAudioBitrate;
551
563
  conf.live_recording.recording_config.recording_params.xc_params.n_audio = nAudio;
552
-
553
- // Iterate through custom settings (which will override any existing setting)
554
- function SetByPath(_ref6) {
555
- var obj = _ref6.obj,
556
- path = _ref6.path,
557
- value = _ref6.value;
558
- var keys = path.split(".");
559
- var temp = obj;
560
- for (var _i3 = 0; _i3 < keys.length - 1; _i3++) {
561
- if (!temp[keys[_i3]]) {
562
- temp[keys[_i3]] = {};
563
- }
564
- temp = temp[keys[_i3]];
565
- }
566
- temp[keys[keys.length - 1]] = value;
567
- }
568
- var metaPathValues = customSettings.metaPathValues;
569
- for (var _i4 = 0, _Object$entries = Object.entries(metaPathValues || {}); _i4 < _Object$entries.length; _i4++) {
570
- var _Object$entries$_i = _slicedToArray(_Object$entries[_i4], 2),
571
- path = _Object$entries$_i[0],
572
- value = _Object$entries$_i[1];
573
- SetByPath({
574
- obj: conf,
575
- path: path,
576
- value: value
577
- });
578
- }
579
564
  return conf;
580
565
  }
581
566
  }]);
567
+ return LiveConf;
582
568
  }();
583
569
  exports.LiveConf = LiveConf;
@@ -835,6 +835,7 @@ exports.StreamCreate = /*#__PURE__*/function () {
835
835
  edge_write_token: edgeToken,
836
836
  state: "active" // indicates there is an active session (set to 'closed' when done)
837
837
  },
838
+
838
839
  fabric_config: {
839
840
  edge_write_token: edgeToken
840
841
  }
@@ -1477,6 +1478,7 @@ exports.StreamInsertion = /*#__PURE__*/function () {
1477
1478
  insertionInfo = {
1478
1479
  duration_sec: 0 // Minimum of video and audio duration
1479
1480
  };
1481
+
1480
1482
  ["video", "audio"].forEach(function (mt) {
1481
1483
  var stream = offeringMeta.media_struct.streams[mt];
1482
1484
  insertionInfo[mt] = {
@@ -1698,11 +1700,11 @@ exports.StreamInsertion = /*#__PURE__*/function () {
1698
1700
  */
1699
1701
  exports.StreamConfig = /*#__PURE__*/function () {
1700
1702
  var _ref22 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(_ref21) {
1701
- var name, _ref21$customSettings, customSettings, _ref21$customMetaValu, customMetaValues, probeMetadata, writeToken, _ref21$finalize, finalize, objectId, status, libraryId, probe, mainMeta, userConfig, parsedName, hostName, streamUrl, nodes, node, endpoint, probeUrl, lc, liveRecordingConfig, e;
1703
+ var name, _ref21$customSettings, customSettings, probeMetadata, writeToken, _ref21$finalize, finalize, objectId, status, libraryId, probe, mainMeta, userConfig, parsedName, hostName, streamUrl, nodes, node, endpoint, probeUrl, lc, liveRecordingConfig, e;
1702
1704
  return _regeneratorRuntime.wrap(function _callee11$(_context11) {
1703
1705
  while (1) switch (_context11.prev = _context11.next) {
1704
1706
  case 0:
1705
- name = _ref21.name, _ref21$customSettings = _ref21.customSettings, customSettings = _ref21$customSettings === void 0 ? {} : _ref21$customSettings, _ref21$customMetaValu = _ref21.customMetaValues, customMetaValues = _ref21$customMetaValu === void 0 ? {} : _ref21$customMetaValu, probeMetadata = _ref21.probeMetadata, writeToken = _ref21.writeToken, _ref21$finalize = _ref21.finalize, finalize = _ref21$finalize === void 0 ? true : _ref21$finalize;
1707
+ name = _ref21.name, _ref21$customSettings = _ref21.customSettings, customSettings = _ref21$customSettings === void 0 ? {} : _ref21$customSettings, probeMetadata = _ref21.probeMetadata, writeToken = _ref21.writeToken, _ref21$finalize = _ref21.finalize, finalize = _ref21$finalize === void 0 ? true : _ref21$finalize;
1706
1708
  objectId = name;
1707
1709
  status = {
1708
1710
  name: name
@@ -1,8 +1,8 @@
1
1
  var _regeneratorRuntime = require("@babel/runtime/regenerator");
2
2
  var _defineProperty = require("@babel/runtime/helpers/defineProperty");
3
3
  var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
4
- 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; }
5
- 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; }
4
+ 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; }
5
+ 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
6
  /**
7
7
  * Methods for creating and managing NFTs
8
8
  *