wao 0.36.3 → 0.36.6

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/cjs/hb.js CHANGED
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports["default"] = void 0;
8
8
  var _aoconnect = require("@permaweb/aoconnect");
9
- var _hbsig = require("hbsig");
10
9
  var _ramda = require("ramda");
11
10
  var _utils = require("./utils.js");
11
+ var _hbsig = require("hbsig");
12
12
  var _hyperAos = _interopRequireDefault(require("./hyper-aos.js"));
13
13
  var _aos_wamr = _interopRequireDefault(require("./aos_wamr.js"));
14
14
  var _httpsigUtils = require("./httpsig-utils.js");
@@ -674,52 +674,79 @@ var HB = /*#__PURE__*/function () {
674
674
  return scheduleNP;
675
675
  }()
676
676
  }, {
677
- key: "post104",
677
+ key: "send104",
678
678
  value: function () {
679
- var _post = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee19(_ref9) {
680
- var _ref9$path, path, _ref9$tags, tags, _ref9$data, data, target, _tags, signer, di, res;
679
+ var _send3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee19(_ref9) {
680
+ var _ref9$path, path, item, res;
681
681
  return _regeneratorRuntime().wrap(function _callee19$(_context19) {
682
682
  while (1) switch (_context19.prev = _context19.next) {
683
683
  case 0:
684
- _ref9$path = _ref9.path, path = _ref9$path === void 0 ? "/~process@1.0/schedule" : _ref9$path, _ref9$tags = _ref9.tags, tags = _ref9$tags === void 0 ? {} : _ref9$tags, _ref9$data = _ref9.data, data = _ref9$data === void 0 ? "1984" : _ref9$data, target = _ref9.target;
685
- _tags = (0, _utils.buildTags)((0, _ramda.mergeLeft)(tags, {
686
- signingFormat: "ANS-104"
687
- }));
688
- signer = new _sdk.ArweaveSigner(this.jwk);
689
- di = (0, _arbundles.createData)(data, signer, {
690
- tags: _tags,
691
- target: target
692
- });
693
- _context19.next = 6;
694
- return di.sign(signer);
695
- case 6:
696
- _context19.next = 8;
684
+ _ref9$path = _ref9.path, path = _ref9$path === void 0 ? "/~process@1.0/schedule" : _ref9$path, item = _ref9.item;
685
+ _context19.next = 3;
697
686
  return fetch("".concat(this.url).concat(path), {
698
687
  method: "POST",
699
688
  headers: {
700
689
  "codec-device": "ans104@1.0",
701
690
  "Content-Type": "application/ans104"
702
691
  },
703
- body: di.binary
692
+ body: item.binary
704
693
  });
705
- case 8:
694
+ case 3:
706
695
  res = _context19.sent;
707
696
  _context19.t0 = _hbsig.structured_to;
708
697
  _context19.t1 = _hbsig.httpsig_from;
709
- _context19.next = 13;
698
+ _context19.next = 8;
710
699
  return toMsg(res);
711
- case 13:
700
+ case 8:
712
701
  _context19.t2 = _context19.sent;
713
702
  _context19.t3 = (0, _context19.t1)(_context19.t2);
714
703
  res.out = (0, _context19.t0)(_context19.t3);
715
704
  return _context19.abrupt("return", res);
716
- case 17:
705
+ case 12:
717
706
  case "end":
718
707
  return _context19.stop();
719
708
  }
720
709
  }, _callee19, this);
721
710
  }));
722
- function post104(_x15) {
711
+ function send104(_x15) {
712
+ return _send3.apply(this, arguments);
713
+ }
714
+ return send104;
715
+ }()
716
+ }, {
717
+ key: "post104",
718
+ value: function () {
719
+ var _post = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee20(_ref10) {
720
+ var _ref10$path, path, _ref10$tags, tags, _ref10$data, data, target, _tags, signer, item;
721
+ return _regeneratorRuntime().wrap(function _callee20$(_context20) {
722
+ while (1) switch (_context20.prev = _context20.next) {
723
+ case 0:
724
+ _ref10$path = _ref10.path, path = _ref10$path === void 0 ? "/~process@1.0/schedule" : _ref10$path, _ref10$tags = _ref10.tags, tags = _ref10$tags === void 0 ? {} : _ref10$tags, _ref10$data = _ref10.data, data = _ref10$data === void 0 ? "1984" : _ref10$data, target = _ref10.target;
725
+ _tags = (0, _utils.buildTags)((0, _ramda.mergeLeft)(tags, {
726
+ signingFormat: "ANS-104"
727
+ }));
728
+ signer = new _sdk.ArweaveSigner(this.jwk);
729
+ item = (0, _arbundles.createData)(data, signer, {
730
+ tags: _tags,
731
+ target: target
732
+ });
733
+ _context20.next = 6;
734
+ return item.sign(signer);
735
+ case 6:
736
+ _context20.next = 8;
737
+ return this.send104({
738
+ path: path,
739
+ item: item
740
+ });
741
+ case 8:
742
+ return _context20.abrupt("return", _context20.sent);
743
+ case 9:
744
+ case "end":
745
+ return _context20.stop();
746
+ }
747
+ }, _callee20, this);
748
+ }));
749
+ function post104(_x16) {
723
750
  return _post.apply(this, arguments);
724
751
  }
725
752
  return post104;
@@ -727,10 +754,10 @@ var HB = /*#__PURE__*/function () {
727
754
  }, {
728
755
  key: "schedule",
729
756
  value: function () {
730
- var _schedule = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
731
- var _ref10,
757
+ var _schedule = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
758
+ var _ref11,
732
759
  pid,
733
- _ref10$tags,
760
+ _ref11$tags,
734
761
  tags,
735
762
  data,
736
763
  res,
@@ -738,20 +765,20 @@ var HB = /*#__PURE__*/function () {
738
765
  _tags2,
739
766
  body,
740
767
  signed,
741
- _args21 = arguments;
742
- return _regeneratorRuntime().wrap(function _callee20$(_context20) {
743
- while (1) switch (_context20.prev = _context20.next) {
768
+ _args22 = arguments;
769
+ return _regeneratorRuntime().wrap(function _callee21$(_context21) {
770
+ while (1) switch (_context21.prev = _context21.next) {
744
771
  case 0:
745
- _ref10 = _args21.length > 0 && _args21[0] !== undefined ? _args21[0] : {}, pid = _ref10.pid, _ref10$tags = _ref10.tags, tags = _ref10$tags === void 0 ? {} : _ref10$tags, data = _ref10.data;
772
+ _ref11 = _args22.length > 0 && _args22[0] !== undefined ? _args22[0] : {}, pid = _ref11.pid, _ref11$tags = _ref11.tags, tags = _ref11$tags === void 0 ? {} : _ref11$tags, data = _ref11.data;
746
773
  res = null;
747
774
  if (!(this.format === "ans104")) {
748
- _context20.next = 9;
775
+ _context21.next = 9;
749
776
  break;
750
777
  }
751
778
  _tags = (0, _ramda.mergeLeft)(tags, {
752
779
  Type: "Message"
753
780
  });
754
- _context20.next = 6;
781
+ _context21.next = 6;
755
782
  return this.post104({
756
783
  target: pid,
757
784
  path: "/".concat(pid, "/schedule"),
@@ -759,8 +786,8 @@ var HB = /*#__PURE__*/function () {
759
786
  data: data !== null && data !== void 0 ? data : "1984"
760
787
  });
761
788
  case 6:
762
- res = _context20.sent;
763
- _context20.next = 20;
789
+ res = _context21.sent;
790
+ _context21.next = 20;
764
791
  break;
765
792
  case 9:
766
793
  _tags2 = (0, _ramda.mergeLeft)(tags, {
@@ -768,34 +795,34 @@ var HB = /*#__PURE__*/function () {
768
795
  target: pid
769
796
  });
770
797
  if (data) _tags2.data = data;
771
- _context20.next = 13;
798
+ _context21.next = 13;
772
799
  return this.commit(_tags2, {
773
800
  path: false
774
801
  });
775
802
  case 13:
776
- body = _context20.sent;
777
- _context20.next = 16;
803
+ body = _context21.sent;
804
+ _context21.next = 16;
778
805
  return this.sign({
779
806
  path: "/".concat(pid, "/schedule"),
780
807
  body: body
781
808
  });
782
809
  case 16:
783
- signed = _context20.sent;
784
- _context20.next = 19;
810
+ signed = _context21.sent;
811
+ _context21.next = 19;
785
812
  return this.send(signed);
786
813
  case 19:
787
- res = _context20.sent;
814
+ res = _context21.sent;
788
815
  case 20:
789
- return _context20.abrupt("return", {
816
+ return _context21.abrupt("return", {
790
817
  slot: res.out.slot,
791
818
  res: res,
792
819
  pid: pid
793
820
  });
794
821
  case 21:
795
822
  case "end":
796
- return _context20.stop();
823
+ return _context21.stop();
797
824
  }
798
- }, _callee20, this);
825
+ }, _callee21, this);
799
826
  }));
800
827
  function schedule() {
801
828
  return _schedule.apply(this, arguments);
@@ -805,26 +832,26 @@ var HB = /*#__PURE__*/function () {
805
832
  }, {
806
833
  key: "scheduleLua",
807
834
  value: function () {
808
- var _scheduleLua = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee21(_ref11) {
809
- var _ref11$action, action, _ref11$tags, tags, rest;
810
- return _regeneratorRuntime().wrap(function _callee21$(_context21) {
811
- while (1) switch (_context21.prev = _context21.next) {
835
+ var _scheduleLua = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee22(_ref12) {
836
+ var _ref12$action, action, _ref12$tags, tags, rest;
837
+ return _regeneratorRuntime().wrap(function _callee22$(_context22) {
838
+ while (1) switch (_context22.prev = _context22.next) {
812
839
  case 0:
813
- _ref11$action = _ref11.action, action = _ref11$action === void 0 ? "Eval" : _ref11$action, _ref11$tags = _ref11.tags, tags = _ref11$tags === void 0 ? {} : _ref11$tags, rest = _objectWithoutProperties(_ref11, _excluded2);
840
+ _ref12$action = _ref12.action, action = _ref12$action === void 0 ? "Eval" : _ref12$action, _ref12$tags = _ref12.tags, tags = _ref12$tags === void 0 ? {} : _ref12$tags, rest = _objectWithoutProperties(_ref12, _excluded2);
814
841
  if (action) tags.Action = action;
815
- _context21.next = 4;
842
+ _context22.next = 4;
816
843
  return this.schedule(_objectSpread({
817
844
  tags: tags
818
845
  }, rest));
819
846
  case 4:
820
- return _context21.abrupt("return", _context21.sent);
847
+ return _context22.abrupt("return", _context22.sent);
821
848
  case 5:
822
849
  case "end":
823
- return _context21.stop();
850
+ return _context22.stop();
824
851
  }
825
- }, _callee21, this);
852
+ }, _callee22, this);
826
853
  }));
827
- function scheduleLua(_x16) {
854
+ function scheduleLua(_x17) {
828
855
  return _scheduleLua.apply(this, arguments);
829
856
  }
830
857
  return scheduleLua;
@@ -832,47 +859,47 @@ var HB = /*#__PURE__*/function () {
832
859
  }, {
833
860
  key: "spawnLua",
834
861
  value: function () {
835
- var _spawnLua = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee22(lua) {
862
+ var _spawnLua = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee23(lua) {
836
863
  var _this$lua2;
837
864
  var tags;
838
- return _regeneratorRuntime().wrap(function _callee22$(_context22) {
839
- while (1) switch (_context22.prev = _context22.next) {
865
+ return _regeneratorRuntime().wrap(function _callee23$(_context23) {
866
+ while (1) switch (_context23.prev = _context23.next) {
840
867
  case 0:
841
- _context22.next = 2;
868
+ _context23.next = 2;
842
869
  return this.setInfo();
843
870
  case 2:
844
- _context22.t0 = this.operator;
871
+ _context23.t0 = this.operator;
845
872
  if (!((_this$lua2 = this.lua) !== null && _this$lua2 !== void 0)) {
846
- _context22.next = 7;
873
+ _context23.next = 7;
847
874
  break;
848
875
  }
849
- _context22.t1 = _this$lua2;
850
- _context22.next = 10;
876
+ _context23.t1 = _this$lua2;
877
+ _context23.next = 10;
851
878
  break;
852
879
  case 7:
853
- _context22.next = 9;
880
+ _context23.next = 9;
854
881
  return this.getLua();
855
882
  case 9:
856
- _context22.t1 = _context22.sent;
883
+ _context23.t1 = _context23.sent;
857
884
  case 10:
858
- _context22.t2 = _context22.t1;
885
+ _context23.t2 = _context23.t1;
859
886
  tags = {
860
887
  "Data-Protocol": "ao",
861
888
  Variant: "ao.N.1",
862
- Authority: _context22.t0,
863
- module: _context22.t2,
889
+ Authority: _context23.t0,
890
+ module: _context23.t2,
864
891
  "execution-device": "lua@5.3a",
865
892
  "push-device": "push@1.0",
866
893
  "patch-from": "/results/outbox"
867
894
  };
868
- return _context22.abrupt("return", this.spawn(tags));
895
+ return _context23.abrupt("return", this.spawn(tags));
869
896
  case 13:
870
897
  case "end":
871
- return _context22.stop();
898
+ return _context23.stop();
872
899
  }
873
- }, _callee22, this);
900
+ }, _callee23, this);
874
901
  }));
875
- function spawnLua(_x17) {
902
+ function spawnLua(_x18) {
876
903
  return _spawnLua.apply(this, arguments);
877
904
  }
878
905
  return spawnLua;
@@ -880,38 +907,38 @@ var HB = /*#__PURE__*/function () {
880
907
  }, {
881
908
  key: "now",
882
909
  value: function () {
883
- var _now = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee23(_ref12) {
884
- var pid, _ref12$path, path, res;
885
- return _regeneratorRuntime().wrap(function _callee23$(_context23) {
886
- while (1) switch (_context23.prev = _context23.next) {
910
+ var _now = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee24(_ref13) {
911
+ var pid, _ref13$path, path, res;
912
+ return _regeneratorRuntime().wrap(function _callee24$(_context24) {
913
+ while (1) switch (_context24.prev = _context24.next) {
887
914
  case 0:
888
- pid = _ref12.pid, _ref12$path = _ref12.path, path = _ref12$path === void 0 ? "" : _ref12$path;
915
+ pid = _ref13.pid, _ref13$path = _ref13.path, path = _ref13$path === void 0 ? "" : _ref13$path;
889
916
  if (path && !/^\//.test(path)) path = "/" + path;
890
917
  if (!(this.format === "ans104")) {
891
- _context23.next = 9;
918
+ _context24.next = 9;
892
919
  break;
893
920
  }
894
- _context23.next = 5;
921
+ _context24.next = 5;
895
922
  return this.get({
896
923
  path: "/".concat(pid, "/now").concat(path)
897
924
  });
898
925
  case 5:
899
- res = _context23.sent;
900
- return _context23.abrupt("return", res.out);
926
+ res = _context24.sent;
927
+ return _context24.abrupt("return", res.out);
901
928
  case 9:
902
- _context23.next = 11;
929
+ _context24.next = 11;
903
930
  return this.getJSON({
904
931
  path: "/".concat(pid, "/now").concat(path)
905
932
  });
906
933
  case 11:
907
- return _context23.abrupt("return", _context23.sent);
934
+ return _context24.abrupt("return", _context24.sent);
908
935
  case 12:
909
936
  case "end":
910
- return _context23.stop();
937
+ return _context24.stop();
911
938
  }
912
- }, _callee23, this);
939
+ }, _callee24, this);
913
940
  }));
914
- function now(_x18) {
941
+ function now(_x19) {
915
942
  return _now.apply(this, arguments);
916
943
  }
917
944
  return now;
@@ -919,38 +946,38 @@ var HB = /*#__PURE__*/function () {
919
946
  }, {
920
947
  key: "slot",
921
948
  value: function () {
922
- var _slot = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee24(_ref13) {
923
- var pid, _ref13$path, path, res;
924
- return _regeneratorRuntime().wrap(function _callee24$(_context24) {
925
- while (1) switch (_context24.prev = _context24.next) {
949
+ var _slot = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee25(_ref14) {
950
+ var pid, _ref14$path, path, res;
951
+ return _regeneratorRuntime().wrap(function _callee25$(_context25) {
952
+ while (1) switch (_context25.prev = _context25.next) {
926
953
  case 0:
927
- pid = _ref13.pid, _ref13$path = _ref13.path, path = _ref13$path === void 0 ? "" : _ref13$path;
954
+ pid = _ref14.pid, _ref14$path = _ref14.path, path = _ref14$path === void 0 ? "" : _ref14$path;
928
955
  if (path && !/^\//.test(path)) path = "/" + path;
929
956
  if (!(this.format === "ans104")) {
930
- _context24.next = 9;
957
+ _context25.next = 9;
931
958
  break;
932
959
  }
933
- _context24.next = 5;
960
+ _context25.next = 5;
934
961
  return this.get({
935
962
  path: "/".concat(pid, "/slot").concat(path)
936
963
  });
937
964
  case 5:
938
- res = _context24.sent;
939
- return _context24.abrupt("return", res.out);
965
+ res = _context25.sent;
966
+ return _context25.abrupt("return", res.out);
940
967
  case 9:
941
- _context24.next = 11;
968
+ _context25.next = 11;
942
969
  return this.getJSON({
943
970
  path: "/".concat(pid, "/slot").concat(path)
944
971
  });
945
972
  case 11:
946
- return _context24.abrupt("return", _context24.sent);
973
+ return _context25.abrupt("return", _context25.sent);
947
974
  case 12:
948
975
  case "end":
949
- return _context24.stop();
976
+ return _context25.stop();
950
977
  }
951
- }, _callee24, this);
978
+ }, _callee25, this);
952
979
  }));
953
- function slot(_x19) {
980
+ function slot(_x20) {
954
981
  return _slot.apply(this, arguments);
955
982
  }
956
983
  return slot;
@@ -958,57 +985,57 @@ var HB = /*#__PURE__*/function () {
958
985
  }, {
959
986
  key: "messages",
960
987
  value: function () {
961
- var _messages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee26() {
988
+ var _messages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee27() {
962
989
  var _this = this;
963
- var _ref14,
990
+ var _ref15,
964
991
  pid,
965
992
  from,
966
993
  to,
967
994
  params,
968
995
  res,
969
- _args27 = arguments;
970
- return _regeneratorRuntime().wrap(function _callee26$(_context26) {
971
- while (1) switch (_context26.prev = _context26.next) {
996
+ _args28 = arguments;
997
+ return _regeneratorRuntime().wrap(function _callee27$(_context27) {
998
+ while (1) switch (_context27.prev = _context27.next) {
972
999
  case 0:
973
- _ref14 = _args27.length > 0 && _args27[0] !== undefined ? _args27[0] : {}, pid = _ref14.pid, from = _ref14.from, to = _ref14.to;
1000
+ _ref15 = _args28.length > 0 && _args28[0] !== undefined ? _args28[0] : {}, pid = _ref15.pid, from = _ref15.from, to = _ref15.to;
974
1001
  params = "target=".concat(pid);
975
1002
  if ((0, _ramda.isNotNil)(from)) params += "&from=".concat(from);
976
1003
  if ((0, _ramda.isNotNil)(to)) params += "&to=".concat(to);
977
1004
  params += "&accept=application/aos-2";
978
- _context26.next = 7;
1005
+ _context27.next = 7;
979
1006
  return fetch("".concat(this.url, "/~scheduler@1.0/schedule?").concat(params)).then(function (r) {
980
1007
  return r.json();
981
1008
  });
982
1009
  case 7:
983
- res = _context26.sent;
1010
+ res = _context27.sent;
984
1011
  if (res.page_info.has_next_page) {
985
- res.next = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee25() {
1012
+ res.next = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee26() {
986
1013
  var from2;
987
- return _regeneratorRuntime().wrap(function _callee25$(_context25) {
988
- while (1) switch (_context25.prev = _context25.next) {
1014
+ return _regeneratorRuntime().wrap(function _callee26$(_context26) {
1015
+ while (1) switch (_context26.prev = _context26.next) {
989
1016
  case 0:
990
1017
  from2 = (0, _ramda.last)(res.edges).cursor + 1;
991
- _context25.next = 3;
1018
+ _context26.next = 3;
992
1019
  return _this.messages({
993
1020
  pid: pid,
994
1021
  from: from2,
995
1022
  to: to
996
1023
  });
997
1024
  case 3:
998
- return _context25.abrupt("return", _context25.sent);
1025
+ return _context26.abrupt("return", _context26.sent);
999
1026
  case 4:
1000
1027
  case "end":
1001
- return _context25.stop();
1028
+ return _context26.stop();
1002
1029
  }
1003
- }, _callee25);
1030
+ }, _callee26);
1004
1031
  }));
1005
1032
  }
1006
- return _context26.abrupt("return", res);
1033
+ return _context27.abrupt("return", res);
1007
1034
  case 10:
1008
1035
  case "end":
1009
- return _context26.stop();
1036
+ return _context27.stop();
1010
1037
  }
1011
- }, _callee26, this);
1038
+ }, _callee27, this);
1012
1039
  }));
1013
1040
  function messages() {
1014
1041
  return _messages.apply(this, arguments);
@@ -1018,23 +1045,23 @@ var HB = /*#__PURE__*/function () {
1018
1045
  }, {
1019
1046
  key: "spawn",
1020
1047
  value: function () {
1021
- var _spawn = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee27() {
1048
+ var _spawn = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee28() {
1022
1049
  var tags,
1023
1050
  res,
1024
- _args28 = arguments;
1025
- return _regeneratorRuntime().wrap(function _callee27$(_context27) {
1026
- while (1) switch (_context27.prev = _context27.next) {
1051
+ _args29 = arguments;
1052
+ return _regeneratorRuntime().wrap(function _callee28$(_context28) {
1053
+ while (1) switch (_context28.prev = _context28.next) {
1027
1054
  case 0:
1028
- tags = _args28.length > 0 && _args28[0] !== undefined ? _args28[0] : {};
1029
- _context27.next = 3;
1055
+ tags = _args29.length > 0 && _args29[0] !== undefined ? _args29[0] : {};
1056
+ _context28.next = 3;
1030
1057
  return this.setInfo();
1031
1058
  case 3:
1032
1059
  res = null;
1033
1060
  if (!(this.format === "ans104")) {
1034
- _context27.next = 10;
1061
+ _context28.next = 10;
1035
1062
  break;
1036
1063
  }
1037
- _context27.next = 7;
1064
+ _context28.next = 7;
1038
1065
  return this.post104({
1039
1066
  tags: (0, _ramda.mergeLeft)(tags, {
1040
1067
  "codec-device": "ans104@1.0",
@@ -1046,12 +1073,12 @@ var HB = /*#__PURE__*/function () {
1046
1073
  })
1047
1074
  });
1048
1075
  case 7:
1049
- res = _context27.sent;
1050
- _context27.next = 19;
1076
+ res = _context28.sent;
1077
+ _context28.next = 19;
1051
1078
  break;
1052
1079
  case 10:
1053
- _context27.t0 = this;
1054
- _context27.next = 13;
1080
+ _context28.t0 = this;
1081
+ _context28.next = 13;
1055
1082
  return this.commit((0, _ramda.mergeLeft)(tags, {
1056
1083
  "random-seed": (0, _utils.seed)(16),
1057
1084
  Type: "Process",
@@ -1062,27 +1089,27 @@ var HB = /*#__PURE__*/function () {
1062
1089
  path: false
1063
1090
  });
1064
1091
  case 13:
1065
- _context27.t1 = _context27.sent;
1066
- _context27.t2 = this.operator;
1067
- _context27.t3 = {
1092
+ _context28.t1 = _context28.sent;
1093
+ _context28.t2 = this.operator;
1094
+ _context28.t3 = {
1068
1095
  path: "/~process@1.0/schedule",
1069
- body: _context27.t1,
1070
- Scheduler: _context27.t2
1096
+ body: _context28.t1,
1097
+ Scheduler: _context28.t2
1071
1098
  };
1072
- _context27.next = 18;
1073
- return _context27.t0.post.call(_context27.t0, _context27.t3);
1099
+ _context28.next = 18;
1100
+ return _context28.t0.post.call(_context28.t0, _context28.t3);
1074
1101
  case 18:
1075
- res = _context27.sent;
1102
+ res = _context28.sent;
1076
1103
  case 19:
1077
- return _context27.abrupt("return", {
1104
+ return _context28.abrupt("return", {
1078
1105
  res: res,
1079
1106
  pid: res.out.process
1080
1107
  });
1081
1108
  case 20:
1082
1109
  case "end":
1083
- return _context27.stop();
1110
+ return _context28.stop();
1084
1111
  }
1085
- }, _callee27, this);
1112
+ }, _callee28, this);
1086
1113
  }));
1087
1114
  function spawn() {
1088
1115
  return _spawn.apply(this, arguments);
@@ -1092,19 +1119,19 @@ var HB = /*#__PURE__*/function () {
1092
1119
  }, {
1093
1120
  key: "spawnLegacy",
1094
1121
  value: function () {
1095
- var _spawnLegacy = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee28() {
1096
- var _ref16,
1122
+ var _spawnLegacy = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee29() {
1123
+ var _ref17,
1097
1124
  module,
1098
- _ref16$tags,
1125
+ _ref17$tags,
1099
1126
  tags,
1100
1127
  data,
1101
1128
  t,
1102
- _args29 = arguments;
1103
- return _regeneratorRuntime().wrap(function _callee28$(_context28) {
1104
- while (1) switch (_context28.prev = _context28.next) {
1129
+ _args30 = arguments;
1130
+ return _regeneratorRuntime().wrap(function _callee29$(_context29) {
1131
+ while (1) switch (_context29.prev = _context29.next) {
1105
1132
  case 0:
1106
- _ref16 = _args29.length > 0 && _args29[0] !== undefined ? _args29[0] : {}, module = _ref16.module, _ref16$tags = _ref16.tags, tags = _ref16$tags === void 0 ? {} : _ref16$tags, data = _ref16.data;
1107
- _context28.next = 3;
1133
+ _ref17 = _args30.length > 0 && _args30[0] !== undefined ? _args30[0] : {}, module = _ref17.module, _ref17$tags = _ref17.tags, tags = _ref17$tags === void 0 ? {} : _ref17$tags, data = _ref17.data;
1134
+ _context29.next = 3;
1108
1135
  return this.setInfo();
1109
1136
  case 3:
1110
1137
  t = (0, _ramda.mergeLeft)(tags, {
@@ -1119,15 +1146,15 @@ var HB = /*#__PURE__*/function () {
1119
1146
  "patch-from": "/results/outbox"
1120
1147
  });
1121
1148
  if (data) t.data = data;
1122
- _context28.next = 7;
1149
+ _context29.next = 7;
1123
1150
  return this.spawn(t);
1124
1151
  case 7:
1125
- return _context28.abrupt("return", _context28.sent);
1152
+ return _context29.abrupt("return", _context29.sent);
1126
1153
  case 8:
1127
1154
  case "end":
1128
- return _context28.stop();
1155
+ return _context29.stop();
1129
1156
  }
1130
- }, _callee28, this);
1157
+ }, _callee29, this);
1131
1158
  }));
1132
1159
  function spawnLegacy() {
1133
1160
  return _spawnLegacy.apply(this, arguments);
@@ -1137,30 +1164,30 @@ var HB = /*#__PURE__*/function () {
1137
1164
  }, {
1138
1165
  key: "scheduleLegacy",
1139
1166
  value: function () {
1140
- var _scheduleLegacy = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee29() {
1141
- var _ref17,
1142
- _ref17$action,
1167
+ var _scheduleLegacy = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee30() {
1168
+ var _ref18,
1169
+ _ref18$action,
1143
1170
  action,
1144
- _ref17$tags,
1171
+ _ref18$tags,
1145
1172
  tags,
1146
1173
  rest,
1147
- _args30 = arguments;
1148
- return _regeneratorRuntime().wrap(function _callee29$(_context29) {
1149
- while (1) switch (_context29.prev = _context29.next) {
1174
+ _args31 = arguments;
1175
+ return _regeneratorRuntime().wrap(function _callee30$(_context30) {
1176
+ while (1) switch (_context30.prev = _context30.next) {
1150
1177
  case 0:
1151
- _ref17 = _args30.length > 0 && _args30[0] !== undefined ? _args30[0] : {}, _ref17$action = _ref17.action, action = _ref17$action === void 0 ? "Eval" : _ref17$action, _ref17$tags = _ref17.tags, tags = _ref17$tags === void 0 ? {} : _ref17$tags, rest = _objectWithoutProperties(_ref17, _excluded3);
1178
+ _ref18 = _args31.length > 0 && _args31[0] !== undefined ? _args31[0] : {}, _ref18$action = _ref18.action, action = _ref18$action === void 0 ? "Eval" : _ref18$action, _ref18$tags = _ref18.tags, tags = _ref18$tags === void 0 ? {} : _ref18$tags, rest = _objectWithoutProperties(_ref18, _excluded3);
1152
1179
  if (action) tags.Action = action;
1153
- _context29.next = 4;
1180
+ _context30.next = 4;
1154
1181
  return this.schedule(_objectSpread({
1155
1182
  tags: tags
1156
1183
  }, rest));
1157
1184
  case 4:
1158
- return _context29.abrupt("return", _context29.sent);
1185
+ return _context30.abrupt("return", _context30.sent);
1159
1186
  case 5:
1160
1187
  case "end":
1161
- return _context29.stop();
1188
+ return _context30.stop();
1162
1189
  }
1163
- }, _callee29, this);
1190
+ }, _callee30, this);
1164
1191
  }));
1165
1192
  function scheduleLegacy() {
1166
1193
  return _scheduleLegacy.apply(this, arguments);
@@ -1170,22 +1197,22 @@ var HB = /*#__PURE__*/function () {
1170
1197
  }, {
1171
1198
  key: "results",
1172
1199
  value: function () {
1173
- var _results = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee30() {
1174
- var _ref18,
1200
+ var _results = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee31() {
1201
+ var _ref19,
1175
1202
  process,
1176
1203
  limit,
1177
- _ref18$sort,
1204
+ _ref19$sort,
1178
1205
  sort,
1179
1206
  from,
1180
1207
  to,
1181
1208
  params,
1182
1209
  addParam,
1183
1210
  res,
1184
- _args31 = arguments;
1185
- return _regeneratorRuntime().wrap(function _callee30$(_context30) {
1186
- while (1) switch (_context30.prev = _context30.next) {
1211
+ _args32 = arguments;
1212
+ return _regeneratorRuntime().wrap(function _callee31$(_context31) {
1213
+ while (1) switch (_context31.prev = _context31.next) {
1187
1214
  case 0:
1188
- _ref18 = _args31.length > 0 && _args31[0] !== undefined ? _args31[0] : {}, process = _ref18.process, limit = _ref18.limit, _ref18$sort = _ref18.sort, sort = _ref18$sort === void 0 ? "DESC" : _ref18$sort, from = _ref18.from, to = _ref18.to;
1215
+ _ref19 = _args32.length > 0 && _args32[0] !== undefined ? _args32[0] : {}, process = _ref19.process, limit = _ref19.limit, _ref19$sort = _ref19.sort, sort = _ref19$sort === void 0 ? "DESC" : _ref19$sort, from = _ref19.from, to = _ref19.to;
1189
1216
  params = "";
1190
1217
  addParam = function addParam(key, val) {
1191
1218
  params += params === "" ? "?" : "&";
@@ -1195,7 +1222,7 @@ var HB = /*#__PURE__*/function () {
1195
1222
  if (sort) addParam("sort", sort);
1196
1223
  if (from) addParam("from", from);
1197
1224
  if (to) addParam("to", to);
1198
- _context30.next = 9;
1225
+ _context31.next = 9;
1199
1226
  return this.post({
1200
1227
  path: "/~relay@1.0/call",
1201
1228
  method: "GET",
@@ -1203,13 +1230,13 @@ var HB = /*#__PURE__*/function () {
1203
1230
  "Content-Type": "application/json"
1204
1231
  });
1205
1232
  case 9:
1206
- res = _context30.sent;
1207
- return _context30.abrupt("return", JSON.parse(res.body));
1233
+ res = _context31.sent;
1234
+ return _context31.abrupt("return", JSON.parse(res.body));
1208
1235
  case 11:
1209
1236
  case "end":
1210
- return _context30.stop();
1237
+ return _context31.stop();
1211
1238
  }
1212
- }, _callee30, this);
1239
+ }, _callee31, this);
1213
1240
  }));
1214
1241
  function results() {
1215
1242
  return _results.apply(this, arguments);
@@ -1219,27 +1246,27 @@ var HB = /*#__PURE__*/function () {
1219
1246
  }, {
1220
1247
  key: "dryrun",
1221
1248
  value: function () {
1222
- var _dryrun = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee31() {
1223
- var _ref19,
1224
- _ref19$tags,
1249
+ var _dryrun = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee32() {
1250
+ var _ref20,
1251
+ _ref20$tags,
1225
1252
  tags,
1226
1253
  pid,
1227
1254
  action,
1228
1255
  data,
1229
1256
  json,
1230
1257
  res,
1231
- _args32 = arguments;
1232
- return _regeneratorRuntime().wrap(function _callee31$(_context31) {
1233
- while (1) switch (_context31.prev = _context31.next) {
1258
+ _args33 = arguments;
1259
+ return _regeneratorRuntime().wrap(function _callee32$(_context32) {
1260
+ while (1) switch (_context32.prev = _context32.next) {
1234
1261
  case 0:
1235
- _ref19 = _args32.length > 0 && _args32[0] !== undefined ? _args32[0] : {}, _ref19$tags = _ref19.tags, tags = _ref19$tags === void 0 ? {} : _ref19$tags, pid = _ref19.pid, action = _ref19.action, data = _ref19.data;
1262
+ _ref20 = _args33.length > 0 && _args33[0] !== undefined ? _args33[0] : {}, _ref20$tags = _ref20.tags, tags = _ref20$tags === void 0 ? {} : _ref20$tags, pid = _ref20.pid, action = _ref20.action, data = _ref20.data;
1236
1263
  if (typeof action === "string") tags.Action = action;
1237
1264
  json = {
1238
1265
  Tags: (0, _utils.buildTags)(_objectSpread({}, tags)),
1239
1266
  Owner: this.addr
1240
1267
  };
1241
1268
  if (data) json.Data = data;
1242
- _context31.next = 6;
1269
+ _context32.next = 6;
1243
1270
  return this.post({
1244
1271
  path: "/~relay@1.0/call",
1245
1272
  method: "POST",
@@ -1248,13 +1275,13 @@ var HB = /*#__PURE__*/function () {
1248
1275
  "relay-body": JSON.stringify(json)
1249
1276
  });
1250
1277
  case 6:
1251
- res = _context31.sent;
1252
- return _context31.abrupt("return", JSON.parse(res.body));
1278
+ res = _context32.sent;
1279
+ return _context32.abrupt("return", JSON.parse(res.body));
1253
1280
  case 8:
1254
1281
  case "end":
1255
- return _context31.stop();
1282
+ return _context32.stop();
1256
1283
  }
1257
- }, _callee31, this);
1284
+ }, _callee32, this);
1258
1285
  }));
1259
1286
  function dryrun() {
1260
1287
  return _dryrun.apply(this, arguments);
@@ -1264,23 +1291,23 @@ var HB = /*#__PURE__*/function () {
1264
1291
  }, {
1265
1292
  key: "commit",
1266
1293
  value: function () {
1267
- var _commit2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee32(obj, opts) {
1268
- return _regeneratorRuntime().wrap(function _callee32$(_context32) {
1269
- while (1) switch (_context32.prev = _context32.next) {
1294
+ var _commit2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee33(obj, opts) {
1295
+ return _regeneratorRuntime().wrap(function _callee33$(_context33) {
1296
+ while (1) switch (_context33.prev = _context33.next) {
1270
1297
  case 0:
1271
- _context32.next = 2;
1298
+ _context33.next = 2;
1272
1299
  return (0, _hbsig.commit)(obj, _objectSpread(_objectSpread({}, opts), {}, {
1273
1300
  signer: this.sign
1274
1301
  }));
1275
1302
  case 2:
1276
- return _context32.abrupt("return", _context32.sent);
1303
+ return _context33.abrupt("return", _context33.sent);
1277
1304
  case 3:
1278
1305
  case "end":
1279
- return _context32.stop();
1306
+ return _context33.stop();
1280
1307
  }
1281
- }, _callee32, this);
1308
+ }, _callee33, this);
1282
1309
  }));
1283
- function commit(_x20, _x21) {
1310
+ function commit(_x21, _x22) {
1284
1311
  return _commit2.apply(this, arguments);
1285
1312
  }
1286
1313
  return commit;
@@ -1288,69 +1315,69 @@ var HB = /*#__PURE__*/function () {
1288
1315
  }, {
1289
1316
  key: "p",
1290
1317
  value: function () {
1291
- var _p = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee33(path) {
1318
+ var _p = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee34(path) {
1292
1319
  var _, _args$_, _args$, _args$$path, _yield$this$post$out, _yield$this$post;
1293
1320
  var _len,
1294
1321
  args,
1295
1322
  _key,
1296
1323
  _args,
1297
- _args34 = arguments;
1298
- return _regeneratorRuntime().wrap(function _callee33$(_context33) {
1299
- while (1) switch (_context33.prev = _context33.next) {
1324
+ _args35 = arguments;
1325
+ return _regeneratorRuntime().wrap(function _callee34$(_context34) {
1326
+ while (1) switch (_context34.prev = _context34.next) {
1300
1327
  case 0:
1301
- for (_len = _args34.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1302
- args[_key - 1] = _args34[_key];
1328
+ for (_len = _args35.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1329
+ args[_key - 1] = _args35[_key];
1303
1330
  }
1304
1331
  _args = (0, _ramda.clone)(args);
1305
1332
  (_args$_ = _args[_ = 0]) !== null && _args$_ !== void 0 ? _args$_ : _args[_] = {};
1306
1333
  (_args$$path = (_args$ = _args[0]).path) !== null && _args$$path !== void 0 ? _args$$path : _args$.path = path;
1307
- _context33.next = 6;
1334
+ _context34.next = 6;
1308
1335
  return this.post.apply(this, _toConsumableArray(_args));
1309
1336
  case 6:
1310
- _context33.t2 = _yield$this$post = _context33.sent;
1311
- _context33.t1 = _context33.t2 === null;
1312
- if (_context33.t1) {
1313
- _context33.next = 10;
1337
+ _context34.t2 = _yield$this$post = _context34.sent;
1338
+ _context34.t1 = _context34.t2 === null;
1339
+ if (_context34.t1) {
1340
+ _context34.next = 10;
1314
1341
  break;
1315
1342
  }
1316
- _context33.t1 = _yield$this$post === void 0;
1343
+ _context34.t1 = _yield$this$post === void 0;
1317
1344
  case 10:
1318
- if (!_context33.t1) {
1319
- _context33.next = 14;
1345
+ if (!_context34.t1) {
1346
+ _context34.next = 14;
1320
1347
  break;
1321
1348
  }
1322
- _context33.t3 = void 0;
1323
- _context33.next = 15;
1349
+ _context34.t3 = void 0;
1350
+ _context34.next = 15;
1324
1351
  break;
1325
1352
  case 14:
1326
- _context33.t3 = _yield$this$post.out;
1353
+ _context34.t3 = _yield$this$post.out;
1327
1354
  case 15:
1328
- _context33.t4 = _yield$this$post$out = _context33.t3;
1329
- _context33.t0 = _context33.t4 !== null;
1330
- if (!_context33.t0) {
1331
- _context33.next = 19;
1355
+ _context34.t4 = _yield$this$post$out = _context34.t3;
1356
+ _context34.t0 = _context34.t4 !== null;
1357
+ if (!_context34.t0) {
1358
+ _context34.next = 19;
1332
1359
  break;
1333
1360
  }
1334
- _context33.t0 = _yield$this$post$out !== void 0;
1361
+ _context34.t0 = _yield$this$post$out !== void 0;
1335
1362
  case 19:
1336
- if (!_context33.t0) {
1337
- _context33.next = 23;
1363
+ if (!_context34.t0) {
1364
+ _context34.next = 23;
1338
1365
  break;
1339
1366
  }
1340
- _context33.t5 = _yield$this$post$out;
1341
- _context33.next = 24;
1367
+ _context34.t5 = _yield$this$post$out;
1368
+ _context34.next = 24;
1342
1369
  break;
1343
1370
  case 23:
1344
- _context33.t5 = null;
1371
+ _context34.t5 = null;
1345
1372
  case 24:
1346
- return _context33.abrupt("return", _context33.t5);
1373
+ return _context34.abrupt("return", _context34.t5);
1347
1374
  case 25:
1348
1375
  case "end":
1349
- return _context33.stop();
1376
+ return _context34.stop();
1350
1377
  }
1351
- }, _callee33, this);
1378
+ }, _callee34, this);
1352
1379
  }));
1353
- function p(_x22) {
1380
+ function p(_x23) {
1354
1381
  return _p.apply(this, arguments);
1355
1382
  }
1356
1383
  return p;
@@ -1358,32 +1385,32 @@ var HB = /*#__PURE__*/function () {
1358
1385
  }, {
1359
1386
  key: "post",
1360
1387
  value: function () {
1361
- var _post2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee34(obj) {
1388
+ var _post2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee35(obj) {
1362
1389
  var opt,
1363
1390
  _json,
1364
1391
  signed,
1365
- _args35 = arguments;
1366
- return _regeneratorRuntime().wrap(function _callee34$(_context34) {
1367
- while (1) switch (_context34.prev = _context34.next) {
1392
+ _args36 = arguments;
1393
+ return _regeneratorRuntime().wrap(function _callee35$(_context35) {
1394
+ while (1) switch (_context35.prev = _context35.next) {
1368
1395
  case 0:
1369
- opt = _args35.length > 1 && _args35[1] !== undefined ? _args35[1] : {};
1396
+ opt = _args36.length > 1 && _args36[1] !== undefined ? _args36[1] : {};
1370
1397
  _json = opt.json ? "/~json@1.0/serialize" : "";
1371
1398
  obj.path += _json;
1372
- _context34.next = 5;
1399
+ _context35.next = 5;
1373
1400
  return this.sign(obj, opt);
1374
1401
  case 5:
1375
- signed = _context34.sent;
1376
- _context34.next = 8;
1402
+ signed = _context35.sent;
1403
+ _context35.next = 8;
1377
1404
  return this.send(signed);
1378
1405
  case 8:
1379
- return _context34.abrupt("return", _context34.sent);
1406
+ return _context35.abrupt("return", _context35.sent);
1380
1407
  case 9:
1381
1408
  case "end":
1382
- return _context34.stop();
1409
+ return _context35.stop();
1383
1410
  }
1384
- }, _callee34, this);
1411
+ }, _callee35, this);
1385
1412
  }));
1386
- function post(_x23) {
1413
+ function post(_x24) {
1387
1414
  return _post2.apply(this, arguments);
1388
1415
  }
1389
1416
  return post;
@@ -1391,69 +1418,69 @@ var HB = /*#__PURE__*/function () {
1391
1418
  }, {
1392
1419
  key: "g",
1393
1420
  value: function () {
1394
- var _g = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee35(path) {
1421
+ var _g = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee36(path) {
1395
1422
  var _2, _args$_2, _args$2, _args$2$path, _yield$this$get$out, _yield$this$get;
1396
1423
  var _len2,
1397
1424
  args,
1398
1425
  _key2,
1399
1426
  _args,
1400
- _args36 = arguments;
1401
- return _regeneratorRuntime().wrap(function _callee35$(_context35) {
1402
- while (1) switch (_context35.prev = _context35.next) {
1427
+ _args37 = arguments;
1428
+ return _regeneratorRuntime().wrap(function _callee36$(_context36) {
1429
+ while (1) switch (_context36.prev = _context36.next) {
1403
1430
  case 0:
1404
- for (_len2 = _args36.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
1405
- args[_key2 - 1] = _args36[_key2];
1431
+ for (_len2 = _args37.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
1432
+ args[_key2 - 1] = _args37[_key2];
1406
1433
  }
1407
1434
  _args = (0, _ramda.clone)(args);
1408
1435
  (_args$_2 = _args[_2 = 0]) !== null && _args$_2 !== void 0 ? _args$_2 : _args[_2] = {};
1409
1436
  (_args$2$path = (_args$2 = _args[0]).path) !== null && _args$2$path !== void 0 ? _args$2$path : _args$2.path = path;
1410
- _context35.next = 6;
1437
+ _context36.next = 6;
1411
1438
  return this.get.apply(this, _toConsumableArray(_args));
1412
1439
  case 6:
1413
- _context35.t2 = _yield$this$get = _context35.sent;
1414
- _context35.t1 = _context35.t2 === null;
1415
- if (_context35.t1) {
1416
- _context35.next = 10;
1440
+ _context36.t2 = _yield$this$get = _context36.sent;
1441
+ _context36.t1 = _context36.t2 === null;
1442
+ if (_context36.t1) {
1443
+ _context36.next = 10;
1417
1444
  break;
1418
1445
  }
1419
- _context35.t1 = _yield$this$get === void 0;
1446
+ _context36.t1 = _yield$this$get === void 0;
1420
1447
  case 10:
1421
- if (!_context35.t1) {
1422
- _context35.next = 14;
1448
+ if (!_context36.t1) {
1449
+ _context36.next = 14;
1423
1450
  break;
1424
1451
  }
1425
- _context35.t3 = void 0;
1426
- _context35.next = 15;
1452
+ _context36.t3 = void 0;
1453
+ _context36.next = 15;
1427
1454
  break;
1428
1455
  case 14:
1429
- _context35.t3 = _yield$this$get.out;
1456
+ _context36.t3 = _yield$this$get.out;
1430
1457
  case 15:
1431
- _context35.t4 = _yield$this$get$out = _context35.t3;
1432
- _context35.t0 = _context35.t4 !== null;
1433
- if (!_context35.t0) {
1434
- _context35.next = 19;
1458
+ _context36.t4 = _yield$this$get$out = _context36.t3;
1459
+ _context36.t0 = _context36.t4 !== null;
1460
+ if (!_context36.t0) {
1461
+ _context36.next = 19;
1435
1462
  break;
1436
1463
  }
1437
- _context35.t0 = _yield$this$get$out !== void 0;
1464
+ _context36.t0 = _yield$this$get$out !== void 0;
1438
1465
  case 19:
1439
- if (!_context35.t0) {
1440
- _context35.next = 23;
1466
+ if (!_context36.t0) {
1467
+ _context36.next = 23;
1441
1468
  break;
1442
1469
  }
1443
- _context35.t5 = _yield$this$get$out;
1444
- _context35.next = 24;
1470
+ _context36.t5 = _yield$this$get$out;
1471
+ _context36.next = 24;
1445
1472
  break;
1446
1473
  case 23:
1447
- _context35.t5 = null;
1474
+ _context36.t5 = null;
1448
1475
  case 24:
1449
- return _context35.abrupt("return", _context35.t5);
1476
+ return _context36.abrupt("return", _context36.t5);
1450
1477
  case 25:
1451
1478
  case "end":
1452
- return _context35.stop();
1479
+ return _context36.stop();
1453
1480
  }
1454
- }, _callee35, this);
1481
+ }, _callee36, this);
1455
1482
  }));
1456
- function g(_x24) {
1483
+ function g(_x25) {
1457
1484
  return _g.apply(this, arguments);
1458
1485
  }
1459
1486
  return g;
@@ -1461,7 +1488,7 @@ var HB = /*#__PURE__*/function () {
1461
1488
  }, {
1462
1489
  key: "get",
1463
1490
  value: function () {
1464
- var _get = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee36(_ref20) {
1491
+ var _get = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee37(_ref21) {
1465
1492
  var _path;
1466
1493
  var path,
1467
1494
  params,
@@ -1473,12 +1500,12 @@ var HB = /*#__PURE__*/function () {
1473
1500
  response,
1474
1501
  headers,
1475
1502
  http,
1476
- _args37 = arguments;
1477
- return _regeneratorRuntime().wrap(function _callee36$(_context36) {
1478
- while (1) switch (_context36.prev = _context36.next) {
1503
+ _args38 = arguments;
1504
+ return _regeneratorRuntime().wrap(function _callee37$(_context37) {
1505
+ while (1) switch (_context37.prev = _context37.next) {
1479
1506
  case 0:
1480
- path = _ref20.path, params = _objectWithoutProperties(_ref20, _excluded4);
1481
- opt = _args37.length > 1 && _args37[1] !== undefined ? _args37[1] : {};
1507
+ path = _ref21.path, params = _objectWithoutProperties(_ref21, _excluded4);
1508
+ opt = _args38.length > 1 && _args38[1] !== undefined ? _args38[1] : {};
1482
1509
  _json = opt.json ? "/~json@1.0/serialize" : "";
1483
1510
  (_path = path) !== null && _path !== void 0 ? _path : path = "/~message@1.0";
1484
1511
  if (!/^\//.test(path)) path = "/" + path;
@@ -1490,33 +1517,33 @@ var HB = /*#__PURE__*/function () {
1490
1517
  i++;
1491
1518
  }
1492
1519
  }
1493
- _context36.next = 9;
1520
+ _context37.next = 9;
1494
1521
  return fetch("".concat(this.url).concat(path).concat(_json).concat(_params));
1495
1522
  case 9:
1496
- response = _context36.sent;
1523
+ response = _context37.sent;
1497
1524
  headers = {};
1498
1525
  response.headers.forEach(function (v, k) {
1499
1526
  return headers[k] = v;
1500
1527
  });
1501
- _context36.t0 = headers;
1502
- _context36.next = 15;
1528
+ _context37.t0 = headers;
1529
+ _context37.next = 15;
1503
1530
  return response.text();
1504
1531
  case 15:
1505
- _context36.t1 = _context36.sent;
1506
- _context36.t2 = response.status;
1532
+ _context37.t1 = _context37.sent;
1533
+ _context37.t2 = response.status;
1507
1534
  http = {
1508
- headers: _context36.t0,
1509
- body: _context36.t1,
1510
- status: _context36.t2
1535
+ headers: _context37.t0,
1536
+ body: _context37.t1,
1537
+ status: _context37.t2
1511
1538
  };
1512
- return _context36.abrupt("return", _objectSpread(_objectSpread({}, (0, _httpsigUtils.from)(http)), http));
1539
+ return _context37.abrupt("return", _objectSpread(_objectSpread({}, (0, _httpsigUtils.from)(http)), http));
1513
1540
  case 19:
1514
1541
  case "end":
1515
- return _context36.stop();
1542
+ return _context37.stop();
1516
1543
  }
1517
- }, _callee36, this);
1544
+ }, _callee37, this);
1518
1545
  }));
1519
- function get(_x25) {
1546
+ function get(_x26) {
1520
1547
  return _get.apply(this, arguments);
1521
1548
  }
1522
1549
  return get;
@@ -1524,28 +1551,28 @@ var HB = /*#__PURE__*/function () {
1524
1551
  }, {
1525
1552
  key: "postJSON",
1526
1553
  value: function () {
1527
- var _postJSON = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee37(args) {
1554
+ var _postJSON = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee38(args) {
1528
1555
  var opt,
1529
1556
  res,
1530
- _args38 = arguments;
1531
- return _regeneratorRuntime().wrap(function _callee37$(_context37) {
1532
- while (1) switch (_context37.prev = _context37.next) {
1557
+ _args39 = arguments;
1558
+ return _regeneratorRuntime().wrap(function _callee38$(_context38) {
1559
+ while (1) switch (_context38.prev = _context38.next) {
1533
1560
  case 0:
1534
- opt = _args38.length > 1 && _args38[1] !== undefined ? _args38[1] : {};
1535
- _context37.next = 3;
1561
+ opt = _args39.length > 1 && _args39[1] !== undefined ? _args39[1] : {};
1562
+ _context38.next = 3;
1536
1563
  return this.post(args, _objectSpread(_objectSpread({}, opt), {}, {
1537
1564
  json: true
1538
1565
  }));
1539
1566
  case 3:
1540
- res = _context37.sent;
1541
- return _context37.abrupt("return", JSON.parse(res.body));
1567
+ res = _context38.sent;
1568
+ return _context38.abrupt("return", JSON.parse(res.body));
1542
1569
  case 5:
1543
1570
  case "end":
1544
- return _context37.stop();
1571
+ return _context38.stop();
1545
1572
  }
1546
- }, _callee37, this);
1573
+ }, _callee38, this);
1547
1574
  }));
1548
- function postJSON(_x26) {
1575
+ function postJSON(_x27) {
1549
1576
  return _postJSON.apply(this, arguments);
1550
1577
  }
1551
1578
  return postJSON;
@@ -1553,28 +1580,28 @@ var HB = /*#__PURE__*/function () {
1553
1580
  }, {
1554
1581
  key: "getJSON",
1555
1582
  value: function () {
1556
- var _getJSON = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee38(args) {
1583
+ var _getJSON = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee39(args) {
1557
1584
  var opt,
1558
1585
  res,
1559
- _args39 = arguments;
1560
- return _regeneratorRuntime().wrap(function _callee38$(_context38) {
1561
- while (1) switch (_context38.prev = _context38.next) {
1586
+ _args40 = arguments;
1587
+ return _regeneratorRuntime().wrap(function _callee39$(_context39) {
1588
+ while (1) switch (_context39.prev = _context39.next) {
1562
1589
  case 0:
1563
- opt = _args39.length > 1 && _args39[1] !== undefined ? _args39[1] : {};
1564
- _context38.next = 3;
1590
+ opt = _args40.length > 1 && _args40[1] !== undefined ? _args40[1] : {};
1591
+ _context39.next = 3;
1565
1592
  return this.get(args, _objectSpread(_objectSpread({}, opt), {}, {
1566
1593
  json: true
1567
1594
  }));
1568
1595
  case 3:
1569
- res = _context38.sent;
1570
- return _context38.abrupt("return", JSON.parse(res.body));
1596
+ res = _context39.sent;
1597
+ return _context39.abrupt("return", JSON.parse(res.body));
1571
1598
  case 5:
1572
1599
  case "end":
1573
- return _context38.stop();
1600
+ return _context39.stop();
1574
1601
  }
1575
- }, _callee38, this);
1602
+ }, _callee39, this);
1576
1603
  }));
1577
- function getJSON(_x27) {
1604
+ function getJSON(_x28) {
1578
1605
  return _getJSON.apply(this, arguments);
1579
1606
  }
1580
1607
  return getJSON;
@@ -1582,37 +1609,37 @@ var HB = /*#__PURE__*/function () {
1582
1609
  }, {
1583
1610
  key: "spawnAOS",
1584
1611
  value: function () {
1585
- var _spawnAOS = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee39(image) {
1612
+ var _spawnAOS = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee40(image) {
1586
1613
  var _image, _this$image2;
1587
1614
  var tags;
1588
- return _regeneratorRuntime().wrap(function _callee39$(_context39) {
1589
- while (1) switch (_context39.prev = _context39.next) {
1615
+ return _regeneratorRuntime().wrap(function _callee40$(_context40) {
1616
+ while (1) switch (_context40.prev = _context40.next) {
1590
1617
  case 0:
1591
- _context39.next = 2;
1618
+ _context40.next = 2;
1592
1619
  return this.setInfo();
1593
1620
  case 2:
1594
1621
  if (!((_image = image) !== null && _image !== void 0)) {
1595
- _context39.next = 6;
1622
+ _context40.next = 6;
1596
1623
  break;
1597
1624
  }
1598
1625
  _image;
1599
- _context39.next = 14;
1626
+ _context40.next = 14;
1600
1627
  break;
1601
1628
  case 6:
1602
1629
  if (!((_this$image2 = this.image) !== null && _this$image2 !== void 0)) {
1603
- _context39.next = 10;
1630
+ _context40.next = 10;
1604
1631
  break;
1605
1632
  }
1606
- _context39.t0 = _this$image2;
1607
- _context39.next = 13;
1633
+ _context40.t0 = _this$image2;
1634
+ _context40.next = 13;
1608
1635
  break;
1609
1636
  case 10:
1610
- _context39.next = 12;
1637
+ _context40.next = 12;
1611
1638
  return this.getImage();
1612
1639
  case 12:
1613
- _context39.t0 = _context39.sent;
1640
+ _context40.t0 = _context40.sent;
1614
1641
  case 13:
1615
- image = _context39.t0;
1642
+ image = _context40.t0;
1616
1643
  case 14:
1617
1644
  tags = {
1618
1645
  "Data-Protocol": "ao",
@@ -1627,17 +1654,17 @@ var HB = /*#__PURE__*/function () {
1627
1654
  "patch-mode": "patches",
1628
1655
  passes: 2
1629
1656
  };
1630
- _context39.next = 17;
1657
+ _context40.next = 17;
1631
1658
  return this.spawn(tags);
1632
1659
  case 17:
1633
- return _context39.abrupt("return", _context39.sent);
1660
+ return _context40.abrupt("return", _context40.sent);
1634
1661
  case 18:
1635
1662
  case "end":
1636
- return _context39.stop();
1663
+ return _context40.stop();
1637
1664
  }
1638
- }, _callee39, this);
1665
+ }, _callee40, this);
1639
1666
  }));
1640
- function spawnAOS(_x28) {
1667
+ function spawnAOS(_x29) {
1641
1668
  return _spawnAOS.apply(this, arguments);
1642
1669
  }
1643
1670
  return spawnAOS;
@@ -1645,26 +1672,26 @@ var HB = /*#__PURE__*/function () {
1645
1672
  }, {
1646
1673
  key: "scheduleAOS",
1647
1674
  value: function () {
1648
- var _scheduleAOS = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee40(_ref21) {
1649
- var _ref21$action, action, _ref21$tags, tags, rest;
1650
- return _regeneratorRuntime().wrap(function _callee40$(_context40) {
1651
- while (1) switch (_context40.prev = _context40.next) {
1675
+ var _scheduleAOS = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee41(_ref22) {
1676
+ var _ref22$action, action, _ref22$tags, tags, rest;
1677
+ return _regeneratorRuntime().wrap(function _callee41$(_context41) {
1678
+ while (1) switch (_context41.prev = _context41.next) {
1652
1679
  case 0:
1653
- _ref21$action = _ref21.action, action = _ref21$action === void 0 ? "Eval" : _ref21$action, _ref21$tags = _ref21.tags, tags = _ref21$tags === void 0 ? {} : _ref21$tags, rest = _objectWithoutProperties(_ref21, _excluded5);
1680
+ _ref22$action = _ref22.action, action = _ref22$action === void 0 ? "Eval" : _ref22$action, _ref22$tags = _ref22.tags, tags = _ref22$tags === void 0 ? {} : _ref22$tags, rest = _objectWithoutProperties(_ref22, _excluded5);
1654
1681
  if (action) tags.Action = action;
1655
- _context40.next = 4;
1682
+ _context41.next = 4;
1656
1683
  return this.schedule(_objectSpread({
1657
1684
  tags: tags
1658
1685
  }, rest));
1659
1686
  case 4:
1660
- return _context40.abrupt("return", _context40.sent);
1687
+ return _context41.abrupt("return", _context41.sent);
1661
1688
  case 5:
1662
1689
  case "end":
1663
- return _context40.stop();
1690
+ return _context41.stop();
1664
1691
  }
1665
- }, _callee40, this);
1692
+ }, _callee41, this);
1666
1693
  }));
1667
- function scheduleAOS(_x29) {
1694
+ function scheduleAOS(_x30) {
1668
1695
  return _scheduleAOS.apply(this, arguments);
1669
1696
  }
1670
1697
  return scheduleAOS;