@pioneer-platform/pioneer-react 0.2.47 → 0.2.49
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/index.js +198340 -146844
- package/dist/{index_0e37f5ff.js → index_0652205a.js} +6 -6
- package/dist/{index_f9d1a3bf.js → index_096371b1.js} +3 -1
- package/dist/{index_ae6c3b10.js → index_0a5ed442.js} +3 -3
- package/dist/{index_e233a036.js → index_0a6e5811.js} +1 -1
- package/dist/{index_547d2868.js → index_0b5f5f6a.js} +4 -4
- package/dist/index_10812439.js +25 -0
- package/dist/{index_4a548214.js → index_1093b1b4.js} +8 -8
- package/dist/{index_3a6b0cd3.js → index_169417bf.js} +3 -3
- package/dist/{index_e168f4c0.js → index_1d5f0f00.js} +7 -7
- package/dist/{index_e57ba5a5.js → index_278505c5.js} +3 -3
- package/dist/{index_a4f5a15a.js → index_2845411a.js} +19 -19
- package/dist/{index_003befba.js → index_29be6ff5.js} +1122 -1312
- package/dist/{index_a6b45215.js → index_2dc95f2a.js} +7 -3
- package/dist/{index_6d2a3e5c.js → index_3402bab8.js} +6 -2
- package/dist/{index_310b7772.js → index_3c54e5ec.js} +9 -9
- package/dist/{index_f9d461d1.js → index_423ea09e.js} +3 -3
- package/dist/{index_37894947.js → index_4425b278.js} +3 -3
- package/dist/{index_61a33920.js → index_514c608b.js} +6 -6
- package/dist/index_51b338c1.js +121 -0
- package/dist/{index_0364269a.js → index_5d8426fb.js} +3 -3
- package/dist/index_628b22bc.js +11003 -0
- package/dist/index_63a883f7.js +446 -0
- package/dist/{index_d8e757ba.js → index_654fef3a.js} +3 -3
- package/dist/index_691fd636.js +12913 -0
- package/dist/{index_674ffbfa.js → index_69b0f47b.js} +9 -9
- package/dist/{index_a682c1a8.js → index_6cd7bc1a.js} +3 -1
- package/dist/{index_c8ebd6e3.js → index_6ebe4744.js} +900 -900
- package/dist/{index_7382dec1.js → index_7f735685.js} +5 -5
- package/dist/{index_b3022c1a.js → index_82348f63.js} +5 -5
- package/dist/index_849386d3.js +1115 -0
- package/dist/{index_85b01410.js → index_8610c3c4.js} +6 -6
- package/dist/index_8d6422b9.js +112 -0
- package/dist/{index_167c5f7a.js → index_8fd2c24a.js} +3 -3
- package/dist/{index_1990afbf.js → index_942c3b80.js} +4 -4
- package/dist/index_94b7968d.js +22872 -0
- package/dist/index_94d38802.js +2856 -0
- package/dist/{index_bd7e0d56.js → index_a5ca5cc4.js} +2 -2
- package/dist/{index_f80541a0.js → index_aa71379e.js} +307 -267
- package/dist/{index_354cce52.js → index_aa773d39.js} +3 -3
- package/dist/{index_29e62962.js → index_b022faaa.js} +4 -4
- package/dist/index_b1028d5f.js +65 -0
- package/dist/index_c232ca43.js +25 -0
- package/dist/{index_f19b5fe5.js → index_c9105338.js} +3 -3
- package/dist/{index_7c12bb44.js → index_cebbd50e.js} +1 -1
- package/dist/{index_ca633a1c.js → index_d477606a.js} +7 -7
- package/dist/index_d8a5e2ef.js +116 -0
- package/dist/{index_542dbb9a.js → index_de4af619.js} +4 -4
- package/dist/{index_7a1bb0b1.js → index_df47a9c6.js} +8 -8
- package/dist/{index_8b9255eb.js → index_e0b32f2f.js} +10 -10
- package/dist/{index_b21f58b7.js → index_e2794130.js} +4 -4
- package/dist/{index_2cbf1530.js → index_ecce7b22.js} +6 -6
- package/dist/{index_3891b298.js → index_f2d68730.js} +1 -1
- package/dist/index_f66728ba.js +130 -0
- package/dist/{index_f3922fc1.js → index_f8bc80e1.js} +3 -3
- package/package.json +19 -18
- package/src/lib/context/Pioneer/sdk/connect.ts +11 -11
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { i as inherits_browserExports, e as elliptic, b as bnExports } from "./index_a682c1a8.js";
|
|
4
|
-
import "react";
|
|
5
|
-
import "@chakra-ui/react";
|
|
6
|
-
import "react-dom";
|
|
7
|
-
var src$2 = {};
|
|
8
|
-
var src$1 = {};
|
|
9
|
-
var bip32$1 = {};
|
|
10
|
-
var crypto$4 = {};
|
|
1
|
+
import { k as buffer, n as getAugmentedNamespace, t as events, g as global, p as process, c as commonjsGlobal, f as bech32$3 } from "./index_aa71379e.js";
|
|
2
|
+
import { i as inherits_browserExports, e as elliptic, b as bnExports } from "./index_6cd7bc1a.js";
|
|
11
3
|
var safeBuffer = { exports: {} };
|
|
12
4
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
13
5
|
(function(module, exports2) {
|
|
@@ -67,15 +59,7 @@ var safeBuffer = { exports: {} };
|
|
|
67
59
|
var safeBufferExports = safeBuffer.exports;
|
|
68
60
|
var readableBrowser = { exports: {} };
|
|
69
61
|
const require$$0 = /* @__PURE__ */ getAugmentedNamespace(events);
|
|
70
|
-
var streamBrowser;
|
|
71
|
-
var hasRequiredStreamBrowser;
|
|
72
|
-
function requireStreamBrowser() {
|
|
73
|
-
if (hasRequiredStreamBrowser)
|
|
74
|
-
return streamBrowser;
|
|
75
|
-
hasRequiredStreamBrowser = 1;
|
|
76
|
-
streamBrowser = require$$0.EventEmitter;
|
|
77
|
-
return streamBrowser;
|
|
78
|
-
}
|
|
62
|
+
var streamBrowser = require$$0.EventEmitter;
|
|
79
63
|
var inherits$e;
|
|
80
64
|
if (typeof Object.create === "function") {
|
|
81
65
|
inherits$e = function inherits2(ctor, superCtor) {
|
|
@@ -141,10 +125,10 @@ function format(f) {
|
|
|
141
125
|
}
|
|
142
126
|
return str;
|
|
143
127
|
}
|
|
144
|
-
function deprecate(fn, msg) {
|
|
128
|
+
function deprecate$1(fn, msg) {
|
|
145
129
|
if (isUndefined(global.process)) {
|
|
146
130
|
return function() {
|
|
147
|
-
return deprecate(fn, msg).apply(this, arguments);
|
|
131
|
+
return deprecate$1(fn, msg).apply(this, arguments);
|
|
148
132
|
};
|
|
149
133
|
}
|
|
150
134
|
if (process.noDeprecation === true) {
|
|
@@ -491,8 +475,8 @@ function isPrimitive(arg) {
|
|
|
491
475
|
function isBuffer(maybeBuf) {
|
|
492
476
|
return buffer.Buffer.isBuffer(maybeBuf);
|
|
493
477
|
}
|
|
494
|
-
function objectToString(
|
|
495
|
-
return Object.prototype.toString.call(
|
|
478
|
+
function objectToString(o) {
|
|
479
|
+
return Object.prototype.toString.call(o);
|
|
496
480
|
}
|
|
497
481
|
function pad(n2) {
|
|
498
482
|
return n2 < 10 ? "0" + n2.toString(10) : n2.toString(10);
|
|
@@ -556,7 +540,7 @@ const util = {
|
|
|
556
540
|
isBoolean,
|
|
557
541
|
isArray,
|
|
558
542
|
inspect,
|
|
559
|
-
deprecate,
|
|
543
|
+
deprecate: deprecate$1,
|
|
560
544
|
format,
|
|
561
545
|
debuglog
|
|
562
546
|
};
|
|
@@ -565,7 +549,7 @@ const util$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
|
|
|
565
549
|
_extend,
|
|
566
550
|
debuglog,
|
|
567
551
|
default: util,
|
|
568
|
-
deprecate,
|
|
552
|
+
deprecate: deprecate$1,
|
|
569
553
|
format,
|
|
570
554
|
inherits: inherits$f,
|
|
571
555
|
inspect,
|
|
@@ -725,10 +709,10 @@ function requireBuffer_list() {
|
|
|
725
709
|
value: function join(s) {
|
|
726
710
|
if (this.length === 0)
|
|
727
711
|
return "";
|
|
728
|
-
var
|
|
729
|
-
var ret = "" +
|
|
730
|
-
while (
|
|
731
|
-
ret += s +
|
|
712
|
+
var p = this.head;
|
|
713
|
+
var ret = "" + p.data;
|
|
714
|
+
while (p = p.next)
|
|
715
|
+
ret += s + p.data;
|
|
732
716
|
return ret;
|
|
733
717
|
}
|
|
734
718
|
}, {
|
|
@@ -737,12 +721,12 @@ function requireBuffer_list() {
|
|
|
737
721
|
if (this.length === 0)
|
|
738
722
|
return Buffer2.alloc(0);
|
|
739
723
|
var ret = Buffer2.allocUnsafe(n2 >>> 0);
|
|
740
|
-
var
|
|
724
|
+
var p = this.head;
|
|
741
725
|
var i = 0;
|
|
742
|
-
while (
|
|
743
|
-
copyBuffer(
|
|
744
|
-
i +=
|
|
745
|
-
|
|
726
|
+
while (p) {
|
|
727
|
+
copyBuffer(p.data, ret, i);
|
|
728
|
+
i += p.data.length;
|
|
729
|
+
p = p.next;
|
|
746
730
|
}
|
|
747
731
|
return ret;
|
|
748
732
|
}
|
|
@@ -770,12 +754,12 @@ function requireBuffer_list() {
|
|
|
770
754
|
}, {
|
|
771
755
|
key: "_getString",
|
|
772
756
|
value: function _getString(n2) {
|
|
773
|
-
var
|
|
774
|
-
var
|
|
775
|
-
var ret =
|
|
757
|
+
var p = this.head;
|
|
758
|
+
var c = 1;
|
|
759
|
+
var ret = p.data;
|
|
776
760
|
n2 -= ret.length;
|
|
777
|
-
while (
|
|
778
|
-
var str =
|
|
761
|
+
while (p = p.next) {
|
|
762
|
+
var str = p.data;
|
|
779
763
|
var nb = n2 > str.length ? str.length : n2;
|
|
780
764
|
if (nb === str.length)
|
|
781
765
|
ret += str;
|
|
@@ -784,20 +768,20 @@ function requireBuffer_list() {
|
|
|
784
768
|
n2 -= nb;
|
|
785
769
|
if (n2 === 0) {
|
|
786
770
|
if (nb === str.length) {
|
|
787
|
-
++
|
|
788
|
-
if (
|
|
789
|
-
this.head =
|
|
771
|
+
++c;
|
|
772
|
+
if (p.next)
|
|
773
|
+
this.head = p.next;
|
|
790
774
|
else
|
|
791
775
|
this.head = this.tail = null;
|
|
792
776
|
} else {
|
|
793
|
-
this.head =
|
|
794
|
-
|
|
777
|
+
this.head = p;
|
|
778
|
+
p.data = str.slice(nb);
|
|
795
779
|
}
|
|
796
780
|
break;
|
|
797
781
|
}
|
|
798
|
-
++
|
|
782
|
+
++c;
|
|
799
783
|
}
|
|
800
|
-
this.length -=
|
|
784
|
+
this.length -= c;
|
|
801
785
|
return ret;
|
|
802
786
|
}
|
|
803
787
|
// Consumes a specified amount of bytes from the buffered data.
|
|
@@ -805,31 +789,31 @@ function requireBuffer_list() {
|
|
|
805
789
|
key: "_getBuffer",
|
|
806
790
|
value: function _getBuffer(n2) {
|
|
807
791
|
var ret = Buffer2.allocUnsafe(n2);
|
|
808
|
-
var
|
|
809
|
-
var
|
|
810
|
-
|
|
811
|
-
n2 -=
|
|
812
|
-
while (
|
|
813
|
-
var buf =
|
|
792
|
+
var p = this.head;
|
|
793
|
+
var c = 1;
|
|
794
|
+
p.data.copy(ret);
|
|
795
|
+
n2 -= p.data.length;
|
|
796
|
+
while (p = p.next) {
|
|
797
|
+
var buf = p.data;
|
|
814
798
|
var nb = n2 > buf.length ? buf.length : n2;
|
|
815
799
|
buf.copy(ret, ret.length - n2, 0, nb);
|
|
816
800
|
n2 -= nb;
|
|
817
801
|
if (n2 === 0) {
|
|
818
802
|
if (nb === buf.length) {
|
|
819
|
-
++
|
|
820
|
-
if (
|
|
821
|
-
this.head =
|
|
803
|
+
++c;
|
|
804
|
+
if (p.next)
|
|
805
|
+
this.head = p.next;
|
|
822
806
|
else
|
|
823
807
|
this.head = this.tail = null;
|
|
824
808
|
} else {
|
|
825
|
-
this.head =
|
|
826
|
-
|
|
809
|
+
this.head = p;
|
|
810
|
+
p.data = buf.slice(nb);
|
|
827
811
|
}
|
|
828
812
|
break;
|
|
829
813
|
}
|
|
830
|
-
++
|
|
814
|
+
++c;
|
|
831
815
|
}
|
|
832
|
-
this.length -=
|
|
816
|
+
this.length -= c;
|
|
833
817
|
return ret;
|
|
834
818
|
}
|
|
835
819
|
// Make sure the linked list only shows the minimal necessary information.
|
|
@@ -848,276 +832,245 @@ function requireBuffer_list() {
|
|
|
848
832
|
}();
|
|
849
833
|
return buffer_list;
|
|
850
834
|
}
|
|
851
|
-
|
|
852
|
-
var
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
} else if (err) {
|
|
865
|
-
if (!this._writableState) {
|
|
866
|
-
process.nextTick(emitErrorNT, this, err);
|
|
867
|
-
} else if (!this._writableState.errorEmitted) {
|
|
868
|
-
this._writableState.errorEmitted = true;
|
|
869
|
-
process.nextTick(emitErrorNT, this, err);
|
|
870
|
-
}
|
|
835
|
+
function destroy(err, cb) {
|
|
836
|
+
var _this = this;
|
|
837
|
+
var readableDestroyed = this._readableState && this._readableState.destroyed;
|
|
838
|
+
var writableDestroyed = this._writableState && this._writableState.destroyed;
|
|
839
|
+
if (readableDestroyed || writableDestroyed) {
|
|
840
|
+
if (cb) {
|
|
841
|
+
cb(err);
|
|
842
|
+
} else if (err) {
|
|
843
|
+
if (!this._writableState) {
|
|
844
|
+
process.nextTick(emitErrorNT, this, err);
|
|
845
|
+
} else if (!this._writableState.errorEmitted) {
|
|
846
|
+
this._writableState.errorEmitted = true;
|
|
847
|
+
process.nextTick(emitErrorNT, this, err);
|
|
871
848
|
}
|
|
872
|
-
return this;
|
|
873
|
-
}
|
|
874
|
-
if (this._readableState) {
|
|
875
|
-
this._readableState.destroyed = true;
|
|
876
|
-
}
|
|
877
|
-
if (this._writableState) {
|
|
878
|
-
this._writableState.destroyed = true;
|
|
879
849
|
}
|
|
880
|
-
this._destroy(err || null, function(err2) {
|
|
881
|
-
if (!cb && err2) {
|
|
882
|
-
if (!_this._writableState) {
|
|
883
|
-
process.nextTick(emitErrorAndCloseNT, _this, err2);
|
|
884
|
-
} else if (!_this._writableState.errorEmitted) {
|
|
885
|
-
_this._writableState.errorEmitted = true;
|
|
886
|
-
process.nextTick(emitErrorAndCloseNT, _this, err2);
|
|
887
|
-
} else {
|
|
888
|
-
process.nextTick(emitCloseNT, _this);
|
|
889
|
-
}
|
|
890
|
-
} else if (cb) {
|
|
891
|
-
process.nextTick(emitCloseNT, _this);
|
|
892
|
-
cb(err2);
|
|
893
|
-
} else {
|
|
894
|
-
process.nextTick(emitCloseNT, _this);
|
|
895
|
-
}
|
|
896
|
-
});
|
|
897
850
|
return this;
|
|
898
851
|
}
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
emitCloseNT(self2);
|
|
852
|
+
if (this._readableState) {
|
|
853
|
+
this._readableState.destroyed = true;
|
|
902
854
|
}
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
return;
|
|
906
|
-
if (self2._readableState && !self2._readableState.emitClose)
|
|
907
|
-
return;
|
|
908
|
-
self2.emit("close");
|
|
909
|
-
}
|
|
910
|
-
function undestroy() {
|
|
911
|
-
if (this._readableState) {
|
|
912
|
-
this._readableState.destroyed = false;
|
|
913
|
-
this._readableState.reading = false;
|
|
914
|
-
this._readableState.ended = false;
|
|
915
|
-
this._readableState.endEmitted = false;
|
|
916
|
-
}
|
|
917
|
-
if (this._writableState) {
|
|
918
|
-
this._writableState.destroyed = false;
|
|
919
|
-
this._writableState.ended = false;
|
|
920
|
-
this._writableState.ending = false;
|
|
921
|
-
this._writableState.finalCalled = false;
|
|
922
|
-
this._writableState.prefinished = false;
|
|
923
|
-
this._writableState.finished = false;
|
|
924
|
-
this._writableState.errorEmitted = false;
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
function emitErrorNT(self2, err) {
|
|
928
|
-
self2.emit("error", err);
|
|
929
|
-
}
|
|
930
|
-
function errorOrDestroy(stream, err) {
|
|
931
|
-
var rState = stream._readableState;
|
|
932
|
-
var wState = stream._writableState;
|
|
933
|
-
if (rState && rState.autoDestroy || wState && wState.autoDestroy)
|
|
934
|
-
stream.destroy(err);
|
|
935
|
-
else
|
|
936
|
-
stream.emit("error", err);
|
|
855
|
+
if (this._writableState) {
|
|
856
|
+
this._writableState.destroyed = true;
|
|
937
857
|
}
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
var errorsBrowser = {};
|
|
946
|
-
var hasRequiredErrorsBrowser;
|
|
947
|
-
function requireErrorsBrowser() {
|
|
948
|
-
if (hasRequiredErrorsBrowser)
|
|
949
|
-
return errorsBrowser;
|
|
950
|
-
hasRequiredErrorsBrowser = 1;
|
|
951
|
-
function _inheritsLoose(subClass, superClass) {
|
|
952
|
-
subClass.prototype = Object.create(superClass.prototype);
|
|
953
|
-
subClass.prototype.constructor = subClass;
|
|
954
|
-
subClass.__proto__ = superClass;
|
|
955
|
-
}
|
|
956
|
-
var codes = {};
|
|
957
|
-
function createErrorType(code, message, Base2) {
|
|
958
|
-
if (!Base2) {
|
|
959
|
-
Base2 = Error;
|
|
960
|
-
}
|
|
961
|
-
function getMessage(arg1, arg2, arg3) {
|
|
962
|
-
if (typeof message === "string") {
|
|
963
|
-
return message;
|
|
858
|
+
this._destroy(err || null, function(err2) {
|
|
859
|
+
if (!cb && err2) {
|
|
860
|
+
if (!_this._writableState) {
|
|
861
|
+
process.nextTick(emitErrorAndCloseNT, _this, err2);
|
|
862
|
+
} else if (!_this._writableState.errorEmitted) {
|
|
863
|
+
_this._writableState.errorEmitted = true;
|
|
864
|
+
process.nextTick(emitErrorAndCloseNT, _this, err2);
|
|
964
865
|
} else {
|
|
965
|
-
|
|
966
|
-
}
|
|
967
|
-
}
|
|
968
|
-
var NodeError = /* @__PURE__ */ function(_Base) {
|
|
969
|
-
_inheritsLoose(NodeError2, _Base);
|
|
970
|
-
function NodeError2(arg1, arg2, arg3) {
|
|
971
|
-
return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;
|
|
972
|
-
}
|
|
973
|
-
return NodeError2;
|
|
974
|
-
}(Base2);
|
|
975
|
-
NodeError.prototype.name = Base2.name;
|
|
976
|
-
NodeError.prototype.code = code;
|
|
977
|
-
codes[code] = NodeError;
|
|
978
|
-
}
|
|
979
|
-
function oneOf(expected, thing) {
|
|
980
|
-
if (Array.isArray(expected)) {
|
|
981
|
-
var len = expected.length;
|
|
982
|
-
expected = expected.map(function(i) {
|
|
983
|
-
return String(i);
|
|
984
|
-
});
|
|
985
|
-
if (len > 2) {
|
|
986
|
-
return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(", "), ", or ") + expected[len - 1];
|
|
987
|
-
} else if (len === 2) {
|
|
988
|
-
return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]);
|
|
989
|
-
} else {
|
|
990
|
-
return "of ".concat(thing, " ").concat(expected[0]);
|
|
866
|
+
process.nextTick(emitCloseNT, _this);
|
|
991
867
|
}
|
|
868
|
+
} else if (cb) {
|
|
869
|
+
process.nextTick(emitCloseNT, _this);
|
|
870
|
+
cb(err2);
|
|
992
871
|
} else {
|
|
993
|
-
|
|
872
|
+
process.nextTick(emitCloseNT, _this);
|
|
994
873
|
}
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
874
|
+
});
|
|
875
|
+
return this;
|
|
876
|
+
}
|
|
877
|
+
function emitErrorAndCloseNT(self2, err) {
|
|
878
|
+
emitErrorNT(self2, err);
|
|
879
|
+
emitCloseNT(self2);
|
|
880
|
+
}
|
|
881
|
+
function emitCloseNT(self2) {
|
|
882
|
+
if (self2._writableState && !self2._writableState.emitClose)
|
|
883
|
+
return;
|
|
884
|
+
if (self2._readableState && !self2._readableState.emitClose)
|
|
885
|
+
return;
|
|
886
|
+
self2.emit("close");
|
|
887
|
+
}
|
|
888
|
+
function undestroy() {
|
|
889
|
+
if (this._readableState) {
|
|
890
|
+
this._readableState.destroyed = false;
|
|
891
|
+
this._readableState.reading = false;
|
|
892
|
+
this._readableState.ended = false;
|
|
893
|
+
this._readableState.endEmitted = false;
|
|
894
|
+
}
|
|
895
|
+
if (this._writableState) {
|
|
896
|
+
this._writableState.destroyed = false;
|
|
897
|
+
this._writableState.ended = false;
|
|
898
|
+
this._writableState.ending = false;
|
|
899
|
+
this._writableState.finalCalled = false;
|
|
900
|
+
this._writableState.prefinished = false;
|
|
901
|
+
this._writableState.finished = false;
|
|
902
|
+
this._writableState.errorEmitted = false;
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
function emitErrorNT(self2, err) {
|
|
906
|
+
self2.emit("error", err);
|
|
907
|
+
}
|
|
908
|
+
function errorOrDestroy(stream, err) {
|
|
909
|
+
var rState = stream._readableState;
|
|
910
|
+
var wState = stream._writableState;
|
|
911
|
+
if (rState && rState.autoDestroy || wState && wState.autoDestroy)
|
|
912
|
+
stream.destroy(err);
|
|
913
|
+
else
|
|
914
|
+
stream.emit("error", err);
|
|
915
|
+
}
|
|
916
|
+
var destroy_1 = {
|
|
917
|
+
destroy,
|
|
918
|
+
undestroy,
|
|
919
|
+
errorOrDestroy
|
|
920
|
+
};
|
|
921
|
+
var errorsBrowser = {};
|
|
922
|
+
function _inheritsLoose(subClass, superClass) {
|
|
923
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
924
|
+
subClass.prototype.constructor = subClass;
|
|
925
|
+
subClass.__proto__ = superClass;
|
|
926
|
+
}
|
|
927
|
+
var codes = {};
|
|
928
|
+
function createErrorType(code, message, Base2) {
|
|
929
|
+
if (!Base2) {
|
|
930
|
+
Base2 = Error;
|
|
931
|
+
}
|
|
932
|
+
function getMessage(arg1, arg2, arg3) {
|
|
933
|
+
if (typeof message === "string") {
|
|
934
|
+
return message;
|
|
1011
935
|
} else {
|
|
1012
|
-
return
|
|
936
|
+
return message(arg1, arg2, arg3);
|
|
1013
937
|
}
|
|
1014
938
|
}
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
var determiner;
|
|
1020
|
-
if (typeof expected === "string" && startsWith(expected, "not ")) {
|
|
1021
|
-
determiner = "must not be";
|
|
1022
|
-
expected = expected.replace(/^not /, "");
|
|
1023
|
-
} else {
|
|
1024
|
-
determiner = "must be";
|
|
939
|
+
var NodeError = /* @__PURE__ */ function(_Base) {
|
|
940
|
+
_inheritsLoose(NodeError2, _Base);
|
|
941
|
+
function NodeError2(arg1, arg2, arg3) {
|
|
942
|
+
return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;
|
|
1025
943
|
}
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
944
|
+
return NodeError2;
|
|
945
|
+
}(Base2);
|
|
946
|
+
NodeError.prototype.name = Base2.name;
|
|
947
|
+
NodeError.prototype.code = code;
|
|
948
|
+
codes[code] = NodeError;
|
|
949
|
+
}
|
|
950
|
+
function oneOf(expected, thing) {
|
|
951
|
+
if (Array.isArray(expected)) {
|
|
952
|
+
var len = expected.length;
|
|
953
|
+
expected = expected.map(function(i) {
|
|
954
|
+
return String(i);
|
|
955
|
+
});
|
|
956
|
+
if (len > 2) {
|
|
957
|
+
return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(", "), ", or ") + expected[len - 1];
|
|
958
|
+
} else if (len === 2) {
|
|
959
|
+
return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]);
|
|
1029
960
|
} else {
|
|
1030
|
-
|
|
1031
|
-
msg = 'The "'.concat(name, '" ').concat(type, " ").concat(determiner, " ").concat(oneOf(expected, "type"));
|
|
1032
|
-
}
|
|
1033
|
-
msg += ". Received type ".concat(typeof actual);
|
|
1034
|
-
return msg;
|
|
1035
|
-
}, TypeError);
|
|
1036
|
-
createErrorType("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF");
|
|
1037
|
-
createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(name) {
|
|
1038
|
-
return "The " + name + " method is not implemented";
|
|
1039
|
-
});
|
|
1040
|
-
createErrorType("ERR_STREAM_PREMATURE_CLOSE", "Premature close");
|
|
1041
|
-
createErrorType("ERR_STREAM_DESTROYED", function(name) {
|
|
1042
|
-
return "Cannot call " + name + " after a stream was destroyed";
|
|
1043
|
-
});
|
|
1044
|
-
createErrorType("ERR_MULTIPLE_CALLBACK", "Callback called multiple times");
|
|
1045
|
-
createErrorType("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable");
|
|
1046
|
-
createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end");
|
|
1047
|
-
createErrorType("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError);
|
|
1048
|
-
createErrorType("ERR_UNKNOWN_ENCODING", function(arg) {
|
|
1049
|
-
return "Unknown encoding: " + arg;
|
|
1050
|
-
}, TypeError);
|
|
1051
|
-
createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event");
|
|
1052
|
-
errorsBrowser.codes = codes;
|
|
1053
|
-
return errorsBrowser;
|
|
1054
|
-
}
|
|
1055
|
-
var state;
|
|
1056
|
-
var hasRequiredState;
|
|
1057
|
-
function requireState() {
|
|
1058
|
-
if (hasRequiredState)
|
|
1059
|
-
return state;
|
|
1060
|
-
hasRequiredState = 1;
|
|
1061
|
-
var ERR_INVALID_OPT_VALUE = requireErrorsBrowser().codes.ERR_INVALID_OPT_VALUE;
|
|
1062
|
-
function highWaterMarkFrom(options, isDuplex, duplexKey) {
|
|
1063
|
-
return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;
|
|
1064
|
-
}
|
|
1065
|
-
function getHighWaterMark(state2, options, duplexKey, isDuplex) {
|
|
1066
|
-
var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);
|
|
1067
|
-
if (hwm != null) {
|
|
1068
|
-
if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {
|
|
1069
|
-
var name = isDuplex ? duplexKey : "highWaterMark";
|
|
1070
|
-
throw new ERR_INVALID_OPT_VALUE(name, hwm);
|
|
1071
|
-
}
|
|
1072
|
-
return Math.floor(hwm);
|
|
961
|
+
return "of ".concat(thing, " ").concat(expected[0]);
|
|
1073
962
|
}
|
|
1074
|
-
|
|
963
|
+
} else {
|
|
964
|
+
return "of ".concat(thing, " ").concat(String(expected));
|
|
1075
965
|
}
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
966
|
+
}
|
|
967
|
+
function startsWith(str, search, pos) {
|
|
968
|
+
return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
|
|
969
|
+
}
|
|
970
|
+
function endsWith(str, search, this_len) {
|
|
971
|
+
if (this_len === void 0 || this_len > str.length) {
|
|
972
|
+
this_len = str.length;
|
|
973
|
+
}
|
|
974
|
+
return str.substring(this_len - search.length, this_len) === search;
|
|
975
|
+
}
|
|
976
|
+
function includes(str, search, start) {
|
|
977
|
+
if (typeof start !== "number") {
|
|
978
|
+
start = 0;
|
|
979
|
+
}
|
|
980
|
+
if (start + search.length > str.length) {
|
|
981
|
+
return false;
|
|
982
|
+
} else {
|
|
983
|
+
return str.indexOf(search, start) !== -1;
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
createErrorType("ERR_INVALID_OPT_VALUE", function(name, value3) {
|
|
987
|
+
return 'The value "' + value3 + '" is invalid for option "' + name + '"';
|
|
988
|
+
}, TypeError);
|
|
989
|
+
createErrorType("ERR_INVALID_ARG_TYPE", function(name, expected, actual) {
|
|
990
|
+
var determiner;
|
|
991
|
+
if (typeof expected === "string" && startsWith(expected, "not ")) {
|
|
992
|
+
determiner = "must not be";
|
|
993
|
+
expected = expected.replace(/^not /, "");
|
|
994
|
+
} else {
|
|
995
|
+
determiner = "must be";
|
|
996
|
+
}
|
|
997
|
+
var msg;
|
|
998
|
+
if (endsWith(name, " argument")) {
|
|
999
|
+
msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, "type"));
|
|
1000
|
+
} else {
|
|
1001
|
+
var type = includes(name, ".") ? "property" : "argument";
|
|
1002
|
+
msg = 'The "'.concat(name, '" ').concat(type, " ").concat(determiner, " ").concat(oneOf(expected, "type"));
|
|
1003
|
+
}
|
|
1004
|
+
msg += ". Received type ".concat(typeof actual);
|
|
1005
|
+
return msg;
|
|
1006
|
+
}, TypeError);
|
|
1007
|
+
createErrorType("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF");
|
|
1008
|
+
createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(name) {
|
|
1009
|
+
return "The " + name + " method is not implemented";
|
|
1010
|
+
});
|
|
1011
|
+
createErrorType("ERR_STREAM_PREMATURE_CLOSE", "Premature close");
|
|
1012
|
+
createErrorType("ERR_STREAM_DESTROYED", function(name) {
|
|
1013
|
+
return "Cannot call " + name + " after a stream was destroyed";
|
|
1014
|
+
});
|
|
1015
|
+
createErrorType("ERR_MULTIPLE_CALLBACK", "Callback called multiple times");
|
|
1016
|
+
createErrorType("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable");
|
|
1017
|
+
createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end");
|
|
1018
|
+
createErrorType("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError);
|
|
1019
|
+
createErrorType("ERR_UNKNOWN_ENCODING", function(arg) {
|
|
1020
|
+
return "Unknown encoding: " + arg;
|
|
1021
|
+
}, TypeError);
|
|
1022
|
+
createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event");
|
|
1023
|
+
errorsBrowser.codes = codes;
|
|
1024
|
+
var ERR_INVALID_OPT_VALUE = errorsBrowser.codes.ERR_INVALID_OPT_VALUE;
|
|
1025
|
+
function highWaterMarkFrom(options, isDuplex, duplexKey) {
|
|
1026
|
+
return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;
|
|
1027
|
+
}
|
|
1028
|
+
function getHighWaterMark(state2, options, duplexKey, isDuplex) {
|
|
1029
|
+
var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);
|
|
1030
|
+
if (hwm != null) {
|
|
1031
|
+
if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {
|
|
1032
|
+
var name = isDuplex ? duplexKey : "highWaterMark";
|
|
1033
|
+
throw new ERR_INVALID_OPT_VALUE(name, hwm);
|
|
1034
|
+
}
|
|
1035
|
+
return Math.floor(hwm);
|
|
1036
|
+
}
|
|
1037
|
+
return state2.objectMode ? 16 : 16 * 1024;
|
|
1038
|
+
}
|
|
1039
|
+
var state = {
|
|
1040
|
+
getHighWaterMark
|
|
1041
|
+
};
|
|
1042
|
+
var browser$3 = deprecate;
|
|
1043
|
+
function deprecate(fn, msg) {
|
|
1044
|
+
if (config("noDeprecation")) {
|
|
1045
|
+
return fn;
|
|
1046
|
+
}
|
|
1047
|
+
var warned = false;
|
|
1048
|
+
function deprecated() {
|
|
1049
|
+
if (!warned) {
|
|
1050
|
+
if (config("throwDeprecation")) {
|
|
1051
|
+
throw new Error(msg);
|
|
1052
|
+
} else if (config("traceDeprecation")) {
|
|
1053
|
+
console.trace(msg);
|
|
1054
|
+
} else {
|
|
1055
|
+
console.warn(msg);
|
|
1103
1056
|
}
|
|
1104
|
-
|
|
1057
|
+
warned = true;
|
|
1105
1058
|
}
|
|
1106
|
-
return
|
|
1059
|
+
return fn.apply(this, arguments);
|
|
1107
1060
|
}
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
return false;
|
|
1114
|
-
}
|
|
1115
|
-
var val = commonjsGlobal.localStorage[name];
|
|
1116
|
-
if (null == val)
|
|
1061
|
+
return deprecated;
|
|
1062
|
+
}
|
|
1063
|
+
function config(name) {
|
|
1064
|
+
try {
|
|
1065
|
+
if (!commonjsGlobal.localStorage)
|
|
1117
1066
|
return false;
|
|
1118
|
-
|
|
1067
|
+
} catch (_) {
|
|
1068
|
+
return false;
|
|
1119
1069
|
}
|
|
1120
|
-
|
|
1070
|
+
var val = commonjsGlobal.localStorage[name];
|
|
1071
|
+
if (null == val)
|
|
1072
|
+
return false;
|
|
1073
|
+
return String(val).toLowerCase() === "true";
|
|
1121
1074
|
}
|
|
1122
1075
|
var _stream_writable;
|
|
1123
1076
|
var hasRequired_stream_writable;
|
|
@@ -1134,12 +1087,12 @@ function require_stream_writable() {
|
|
|
1134
1087
|
onCorkedFinish(_this, state2);
|
|
1135
1088
|
};
|
|
1136
1089
|
}
|
|
1137
|
-
var
|
|
1090
|
+
var Duplex2;
|
|
1138
1091
|
Writable.WritableState = WritableState;
|
|
1139
1092
|
var internalUtil = {
|
|
1140
|
-
deprecate:
|
|
1093
|
+
deprecate: browser$3
|
|
1141
1094
|
};
|
|
1142
|
-
var Stream2 =
|
|
1095
|
+
var Stream2 = streamBrowser;
|
|
1143
1096
|
var Buffer2 = buffer.Buffer;
|
|
1144
1097
|
var OurUint8Array = (typeof commonjsGlobal !== "undefined" ? commonjsGlobal : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {
|
|
1145
1098
|
};
|
|
@@ -1149,22 +1102,22 @@ function require_stream_writable() {
|
|
|
1149
1102
|
function _isUint8Array(obj) {
|
|
1150
1103
|
return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
|
|
1151
1104
|
}
|
|
1152
|
-
var destroyImpl =
|
|
1153
|
-
var _require =
|
|
1154
|
-
var _require$
|
|
1155
|
-
var
|
|
1105
|
+
var destroyImpl = destroy_1;
|
|
1106
|
+
var _require = state, getHighWaterMark2 = _require.getHighWaterMark;
|
|
1107
|
+
var _require$codes2 = errorsBrowser.codes, ERR_INVALID_ARG_TYPE = _require$codes2.ERR_INVALID_ARG_TYPE, ERR_METHOD_NOT_IMPLEMENTED2 = _require$codes2.ERR_METHOD_NOT_IMPLEMENTED, ERR_MULTIPLE_CALLBACK2 = _require$codes2.ERR_MULTIPLE_CALLBACK, ERR_STREAM_CANNOT_PIPE = _require$codes2.ERR_STREAM_CANNOT_PIPE, ERR_STREAM_DESTROYED2 = _require$codes2.ERR_STREAM_DESTROYED, ERR_STREAM_NULL_VALUES = _require$codes2.ERR_STREAM_NULL_VALUES, ERR_STREAM_WRITE_AFTER_END = _require$codes2.ERR_STREAM_WRITE_AFTER_END, ERR_UNKNOWN_ENCODING = _require$codes2.ERR_UNKNOWN_ENCODING;
|
|
1108
|
+
var errorOrDestroy2 = destroyImpl.errorOrDestroy;
|
|
1156
1109
|
inherits_browserExports(Writable, Stream2);
|
|
1157
1110
|
function nop() {
|
|
1158
1111
|
}
|
|
1159
1112
|
function WritableState(options, stream, isDuplex) {
|
|
1160
|
-
|
|
1113
|
+
Duplex2 = Duplex2 || require_stream_duplex();
|
|
1161
1114
|
options = options || {};
|
|
1162
1115
|
if (typeof isDuplex !== "boolean")
|
|
1163
|
-
isDuplex = stream instanceof
|
|
1116
|
+
isDuplex = stream instanceof Duplex2;
|
|
1164
1117
|
this.objectMode = !!options.objectMode;
|
|
1165
1118
|
if (isDuplex)
|
|
1166
1119
|
this.objectMode = this.objectMode || !!options.writableObjectMode;
|
|
1167
|
-
this.highWaterMark =
|
|
1120
|
+
this.highWaterMark = getHighWaterMark2(this, options, "writableHighWaterMark", isDuplex);
|
|
1168
1121
|
this.finalCalled = false;
|
|
1169
1122
|
this.needDrain = false;
|
|
1170
1123
|
this.ending = false;
|
|
@@ -1231,8 +1184,8 @@ function require_stream_writable() {
|
|
|
1231
1184
|
};
|
|
1232
1185
|
}
|
|
1233
1186
|
function Writable(options) {
|
|
1234
|
-
|
|
1235
|
-
var isDuplex = this instanceof
|
|
1187
|
+
Duplex2 = Duplex2 || require_stream_duplex();
|
|
1188
|
+
var isDuplex = this instanceof Duplex2;
|
|
1236
1189
|
if (!isDuplex && !realHasInstance.call(Writable, this))
|
|
1237
1190
|
return new Writable(options);
|
|
1238
1191
|
this._writableState = new WritableState(options, this, isDuplex);
|
|
@@ -1250,11 +1203,11 @@ function require_stream_writable() {
|
|
|
1250
1203
|
Stream2.call(this);
|
|
1251
1204
|
}
|
|
1252
1205
|
Writable.prototype.pipe = function() {
|
|
1253
|
-
|
|
1206
|
+
errorOrDestroy2(this, new ERR_STREAM_CANNOT_PIPE());
|
|
1254
1207
|
};
|
|
1255
1208
|
function writeAfterEnd(stream, cb) {
|
|
1256
1209
|
var er = new ERR_STREAM_WRITE_AFTER_END();
|
|
1257
|
-
|
|
1210
|
+
errorOrDestroy2(stream, er);
|
|
1258
1211
|
process.nextTick(cb, er);
|
|
1259
1212
|
}
|
|
1260
1213
|
function validChunk(stream, state2, chunk, cb) {
|
|
@@ -1265,7 +1218,7 @@ function require_stream_writable() {
|
|
|
1265
1218
|
er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer"], chunk);
|
|
1266
1219
|
}
|
|
1267
1220
|
if (er) {
|
|
1268
|
-
|
|
1221
|
+
errorOrDestroy2(stream, er);
|
|
1269
1222
|
process.nextTick(cb, er);
|
|
1270
1223
|
return false;
|
|
1271
1224
|
}
|
|
@@ -1379,7 +1332,7 @@ function require_stream_writable() {
|
|
|
1379
1332
|
state2.writing = true;
|
|
1380
1333
|
state2.sync = true;
|
|
1381
1334
|
if (state2.destroyed)
|
|
1382
|
-
state2.onwrite(new
|
|
1335
|
+
state2.onwrite(new ERR_STREAM_DESTROYED2("write"));
|
|
1383
1336
|
else if (writev)
|
|
1384
1337
|
stream._writev(chunk, state2.onwrite);
|
|
1385
1338
|
else
|
|
@@ -1392,11 +1345,11 @@ function require_stream_writable() {
|
|
|
1392
1345
|
process.nextTick(cb, er);
|
|
1393
1346
|
process.nextTick(finishMaybe, stream, state2);
|
|
1394
1347
|
stream._writableState.errorEmitted = true;
|
|
1395
|
-
|
|
1348
|
+
errorOrDestroy2(stream, er);
|
|
1396
1349
|
} else {
|
|
1397
1350
|
cb(er);
|
|
1398
1351
|
stream._writableState.errorEmitted = true;
|
|
1399
|
-
|
|
1352
|
+
errorOrDestroy2(stream, er);
|
|
1400
1353
|
finishMaybe(stream, state2);
|
|
1401
1354
|
}
|
|
1402
1355
|
}
|
|
@@ -1411,7 +1364,7 @@ function require_stream_writable() {
|
|
|
1411
1364
|
var sync = state2.sync;
|
|
1412
1365
|
var cb = state2.writecb;
|
|
1413
1366
|
if (typeof cb !== "function")
|
|
1414
|
-
throw new
|
|
1367
|
+
throw new ERR_MULTIPLE_CALLBACK2();
|
|
1415
1368
|
onwriteStateUpdate(state2);
|
|
1416
1369
|
if (er)
|
|
1417
1370
|
onwriteError(stream, state2, sync, er, cb);
|
|
@@ -1488,7 +1441,7 @@ function require_stream_writable() {
|
|
|
1488
1441
|
state2.bufferProcessing = false;
|
|
1489
1442
|
}
|
|
1490
1443
|
Writable.prototype._write = function(chunk, encoding, cb) {
|
|
1491
|
-
cb(new
|
|
1444
|
+
cb(new ERR_METHOD_NOT_IMPLEMENTED2("_write()"));
|
|
1492
1445
|
};
|
|
1493
1446
|
Writable.prototype._writev = null;
|
|
1494
1447
|
Writable.prototype.end = function(chunk, encoding, cb) {
|
|
@@ -1527,14 +1480,14 @@ function require_stream_writable() {
|
|
|
1527
1480
|
stream._final(function(err) {
|
|
1528
1481
|
state2.pendingcb--;
|
|
1529
1482
|
if (err) {
|
|
1530
|
-
|
|
1483
|
+
errorOrDestroy2(stream, err);
|
|
1531
1484
|
}
|
|
1532
1485
|
state2.prefinished = true;
|
|
1533
1486
|
stream.emit("prefinish");
|
|
1534
1487
|
finishMaybe(stream, state2);
|
|
1535
1488
|
});
|
|
1536
1489
|
}
|
|
1537
|
-
function
|
|
1490
|
+
function prefinish2(stream, state2) {
|
|
1538
1491
|
if (!state2.prefinished && !state2.finalCalled) {
|
|
1539
1492
|
if (typeof stream._final === "function" && !state2.destroyed) {
|
|
1540
1493
|
state2.pendingcb++;
|
|
@@ -1549,7 +1502,7 @@ function require_stream_writable() {
|
|
|
1549
1502
|
function finishMaybe(stream, state2) {
|
|
1550
1503
|
var need = needFinish(state2);
|
|
1551
1504
|
if (need) {
|
|
1552
|
-
|
|
1505
|
+
prefinish2(stream, state2);
|
|
1553
1506
|
if (state2.pendingcb === 0) {
|
|
1554
1507
|
state2.finished = true;
|
|
1555
1508
|
stream.emit("finish");
|
|
@@ -1623,21 +1576,21 @@ function require_stream_duplex() {
|
|
|
1623
1576
|
keys2.push(key);
|
|
1624
1577
|
return keys2;
|
|
1625
1578
|
};
|
|
1626
|
-
_stream_duplex =
|
|
1579
|
+
_stream_duplex = Duplex2;
|
|
1627
1580
|
var Readable = require_stream_readable();
|
|
1628
1581
|
var Writable = require_stream_writable();
|
|
1629
|
-
inherits_browserExports(
|
|
1582
|
+
inherits_browserExports(Duplex2, Readable);
|
|
1630
1583
|
{
|
|
1631
1584
|
var keys = objectKeys(Writable.prototype);
|
|
1632
1585
|
for (var v = 0; v < keys.length; v++) {
|
|
1633
1586
|
var method = keys[v];
|
|
1634
|
-
if (!
|
|
1635
|
-
|
|
1587
|
+
if (!Duplex2.prototype[method])
|
|
1588
|
+
Duplex2.prototype[method] = Writable.prototype[method];
|
|
1636
1589
|
}
|
|
1637
1590
|
}
|
|
1638
|
-
function
|
|
1639
|
-
if (!(this instanceof
|
|
1640
|
-
return new
|
|
1591
|
+
function Duplex2(options) {
|
|
1592
|
+
if (!(this instanceof Duplex2))
|
|
1593
|
+
return new Duplex2(options);
|
|
1641
1594
|
Readable.call(this, options);
|
|
1642
1595
|
Writable.call(this, options);
|
|
1643
1596
|
this.allowHalfOpen = true;
|
|
@@ -1652,7 +1605,7 @@ function require_stream_duplex() {
|
|
|
1652
1605
|
}
|
|
1653
1606
|
}
|
|
1654
1607
|
}
|
|
1655
|
-
Object.defineProperty(
|
|
1608
|
+
Object.defineProperty(Duplex2.prototype, "writableHighWaterMark", {
|
|
1656
1609
|
// making it explicit this property is not enumerable
|
|
1657
1610
|
// because otherwise some prototype manipulation in
|
|
1658
1611
|
// userland will fail
|
|
@@ -1661,7 +1614,7 @@ function require_stream_duplex() {
|
|
|
1661
1614
|
return this._writableState.highWaterMark;
|
|
1662
1615
|
}
|
|
1663
1616
|
});
|
|
1664
|
-
Object.defineProperty(
|
|
1617
|
+
Object.defineProperty(Duplex2.prototype, "writableBuffer", {
|
|
1665
1618
|
// making it explicit this property is not enumerable
|
|
1666
1619
|
// because otherwise some prototype manipulation in
|
|
1667
1620
|
// userland will fail
|
|
@@ -1670,7 +1623,7 @@ function require_stream_duplex() {
|
|
|
1670
1623
|
return this._writableState && this._writableState.getBuffer();
|
|
1671
1624
|
}
|
|
1672
1625
|
});
|
|
1673
|
-
Object.defineProperty(
|
|
1626
|
+
Object.defineProperty(Duplex2.prototype, "writableLength", {
|
|
1674
1627
|
// making it explicit this property is not enumerable
|
|
1675
1628
|
// because otherwise some prototype manipulation in
|
|
1676
1629
|
// userland will fail
|
|
@@ -1687,7 +1640,7 @@ function require_stream_duplex() {
|
|
|
1687
1640
|
function onEndNT(self2) {
|
|
1688
1641
|
self2.end();
|
|
1689
1642
|
}
|
|
1690
|
-
Object.defineProperty(
|
|
1643
|
+
Object.defineProperty(Duplex2.prototype, "destroyed", {
|
|
1691
1644
|
// making it explicit this property is not enumerable
|
|
1692
1645
|
// because otherwise some prototype manipulation in
|
|
1693
1646
|
// userland will fail
|
|
@@ -1863,7 +1816,7 @@ function utf8CheckIncomplete(self2, buf, i) {
|
|
|
1863
1816
|
}
|
|
1864
1817
|
return 0;
|
|
1865
1818
|
}
|
|
1866
|
-
function utf8CheckExtraBytes(self2, buf,
|
|
1819
|
+
function utf8CheckExtraBytes(self2, buf, p) {
|
|
1867
1820
|
if ((buf[0] & 192) !== 128) {
|
|
1868
1821
|
self2.lastNeed = 0;
|
|
1869
1822
|
return "�";
|
|
@@ -1882,15 +1835,15 @@ function utf8CheckExtraBytes(self2, buf, p2) {
|
|
|
1882
1835
|
}
|
|
1883
1836
|
}
|
|
1884
1837
|
function utf8FillLast(buf) {
|
|
1885
|
-
var
|
|
1838
|
+
var p = this.lastTotal - this.lastNeed;
|
|
1886
1839
|
var r = utf8CheckExtraBytes(this, buf);
|
|
1887
1840
|
if (r !== void 0)
|
|
1888
1841
|
return r;
|
|
1889
1842
|
if (this.lastNeed <= buf.length) {
|
|
1890
|
-
buf.copy(this.lastChar,
|
|
1843
|
+
buf.copy(this.lastChar, p, 0, this.lastNeed);
|
|
1891
1844
|
return this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
|
1892
1845
|
}
|
|
1893
|
-
buf.copy(this.lastChar,
|
|
1846
|
+
buf.copy(this.lastChar, p, 0, buf.length);
|
|
1894
1847
|
this.lastNeed -= buf.length;
|
|
1895
1848
|
}
|
|
1896
1849
|
function utf8Text(buf, i) {
|
|
@@ -1912,8 +1865,8 @@ function utf16Text(buf, i) {
|
|
|
1912
1865
|
if ((buf.length - i) % 2 === 0) {
|
|
1913
1866
|
var r = buf.toString("utf16le", i);
|
|
1914
1867
|
if (r) {
|
|
1915
|
-
var
|
|
1916
|
-
if (
|
|
1868
|
+
var c = r.charCodeAt(r.length - 1);
|
|
1869
|
+
if (c >= 55296 && c <= 56319) {
|
|
1917
1870
|
this.lastNeed = 2;
|
|
1918
1871
|
this.lastTotal = 4;
|
|
1919
1872
|
this.lastChar[0] = buf[buf.length - 2];
|
|
@@ -1962,108 +1915,100 @@ function simpleWrite(buf) {
|
|
|
1962
1915
|
function simpleEnd(buf) {
|
|
1963
1916
|
return buf && buf.length ? this.write(buf) : "";
|
|
1964
1917
|
}
|
|
1965
|
-
var
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
if (!
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
if (
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
stream.
|
|
2046
|
-
stream.
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
stream.removeListener("close", onlegacyfinish);
|
|
2058
|
-
stream.removeListener("finish", onfinish);
|
|
2059
|
-
stream.removeListener("end", onend);
|
|
2060
|
-
stream.removeListener("error", onerror);
|
|
2061
|
-
stream.removeListener("close", onclose);
|
|
2062
|
-
};
|
|
2063
|
-
}
|
|
2064
|
-
endOfStream = eos;
|
|
2065
|
-
return endOfStream;
|
|
1918
|
+
var ERR_STREAM_PREMATURE_CLOSE = errorsBrowser.codes.ERR_STREAM_PREMATURE_CLOSE;
|
|
1919
|
+
function once$1(callback) {
|
|
1920
|
+
var called = false;
|
|
1921
|
+
return function() {
|
|
1922
|
+
if (called)
|
|
1923
|
+
return;
|
|
1924
|
+
called = true;
|
|
1925
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1926
|
+
args[_key] = arguments[_key];
|
|
1927
|
+
}
|
|
1928
|
+
callback.apply(this, args);
|
|
1929
|
+
};
|
|
1930
|
+
}
|
|
1931
|
+
function noop$1() {
|
|
1932
|
+
}
|
|
1933
|
+
function isRequest$1(stream) {
|
|
1934
|
+
return stream.setHeader && typeof stream.abort === "function";
|
|
1935
|
+
}
|
|
1936
|
+
function eos$1(stream, opts, callback) {
|
|
1937
|
+
if (typeof opts === "function")
|
|
1938
|
+
return eos$1(stream, null, opts);
|
|
1939
|
+
if (!opts)
|
|
1940
|
+
opts = {};
|
|
1941
|
+
callback = once$1(callback || noop$1);
|
|
1942
|
+
var readable = opts.readable || opts.readable !== false && stream.readable;
|
|
1943
|
+
var writable = opts.writable || opts.writable !== false && stream.writable;
|
|
1944
|
+
var onlegacyfinish = function onlegacyfinish2() {
|
|
1945
|
+
if (!stream.writable)
|
|
1946
|
+
onfinish();
|
|
1947
|
+
};
|
|
1948
|
+
var writableEnded = stream._writableState && stream._writableState.finished;
|
|
1949
|
+
var onfinish = function onfinish2() {
|
|
1950
|
+
writable = false;
|
|
1951
|
+
writableEnded = true;
|
|
1952
|
+
if (!readable)
|
|
1953
|
+
callback.call(stream);
|
|
1954
|
+
};
|
|
1955
|
+
var readableEnded = stream._readableState && stream._readableState.endEmitted;
|
|
1956
|
+
var onend = function onend2() {
|
|
1957
|
+
readable = false;
|
|
1958
|
+
readableEnded = true;
|
|
1959
|
+
if (!writable)
|
|
1960
|
+
callback.call(stream);
|
|
1961
|
+
};
|
|
1962
|
+
var onerror = function onerror2(err) {
|
|
1963
|
+
callback.call(stream, err);
|
|
1964
|
+
};
|
|
1965
|
+
var onclose = function onclose2() {
|
|
1966
|
+
var err;
|
|
1967
|
+
if (readable && !readableEnded) {
|
|
1968
|
+
if (!stream._readableState || !stream._readableState.ended)
|
|
1969
|
+
err = new ERR_STREAM_PREMATURE_CLOSE();
|
|
1970
|
+
return callback.call(stream, err);
|
|
1971
|
+
}
|
|
1972
|
+
if (writable && !writableEnded) {
|
|
1973
|
+
if (!stream._writableState || !stream._writableState.ended)
|
|
1974
|
+
err = new ERR_STREAM_PREMATURE_CLOSE();
|
|
1975
|
+
return callback.call(stream, err);
|
|
1976
|
+
}
|
|
1977
|
+
};
|
|
1978
|
+
var onrequest = function onrequest2() {
|
|
1979
|
+
stream.req.on("finish", onfinish);
|
|
1980
|
+
};
|
|
1981
|
+
if (isRequest$1(stream)) {
|
|
1982
|
+
stream.on("complete", onfinish);
|
|
1983
|
+
stream.on("abort", onclose);
|
|
1984
|
+
if (stream.req)
|
|
1985
|
+
onrequest();
|
|
1986
|
+
else
|
|
1987
|
+
stream.on("request", onrequest);
|
|
1988
|
+
} else if (writable && !stream._writableState) {
|
|
1989
|
+
stream.on("end", onlegacyfinish);
|
|
1990
|
+
stream.on("close", onlegacyfinish);
|
|
1991
|
+
}
|
|
1992
|
+
stream.on("end", onend);
|
|
1993
|
+
stream.on("finish", onfinish);
|
|
1994
|
+
if (opts.error !== false)
|
|
1995
|
+
stream.on("error", onerror);
|
|
1996
|
+
stream.on("close", onclose);
|
|
1997
|
+
return function() {
|
|
1998
|
+
stream.removeListener("complete", onfinish);
|
|
1999
|
+
stream.removeListener("abort", onclose);
|
|
2000
|
+
stream.removeListener("request", onrequest);
|
|
2001
|
+
if (stream.req)
|
|
2002
|
+
stream.req.removeListener("finish", onfinish);
|
|
2003
|
+
stream.removeListener("end", onlegacyfinish);
|
|
2004
|
+
stream.removeListener("close", onlegacyfinish);
|
|
2005
|
+
stream.removeListener("finish", onfinish);
|
|
2006
|
+
stream.removeListener("end", onend);
|
|
2007
|
+
stream.removeListener("error", onerror);
|
|
2008
|
+
stream.removeListener("close", onclose);
|
|
2009
|
+
};
|
|
2066
2010
|
}
|
|
2011
|
+
var endOfStream = eos$1;
|
|
2067
2012
|
var async_iterator;
|
|
2068
2013
|
var hasRequiredAsync_iterator;
|
|
2069
2014
|
function requireAsync_iterator() {
|
|
@@ -2096,7 +2041,7 @@ function requireAsync_iterator() {
|
|
|
2096
2041
|
}
|
|
2097
2042
|
return (hint === "string" ? String : Number)(input2);
|
|
2098
2043
|
}
|
|
2099
|
-
var finished =
|
|
2044
|
+
var finished = endOfStream;
|
|
2100
2045
|
var kLastResolve = Symbol("lastResolve");
|
|
2101
2046
|
var kLastReject = Symbol("lastReject");
|
|
2102
2047
|
var kError = Symbol("error");
|
|
@@ -2104,10 +2049,10 @@ function requireAsync_iterator() {
|
|
|
2104
2049
|
var kLastPromise = Symbol("lastPromise");
|
|
2105
2050
|
var kHandlePromise = Symbol("handlePromise");
|
|
2106
2051
|
var kStream = Symbol("stream");
|
|
2107
|
-
function createIterResult(value3,
|
|
2052
|
+
function createIterResult(value3, done2) {
|
|
2108
2053
|
return {
|
|
2109
2054
|
value: value3,
|
|
2110
|
-
done
|
|
2055
|
+
done: done2
|
|
2111
2056
|
};
|
|
2112
2057
|
}
|
|
2113
2058
|
function readAndResolve(iter) {
|
|
@@ -2268,13 +2213,13 @@ function require_stream_readable() {
|
|
|
2268
2213
|
return _stream_readable;
|
|
2269
2214
|
hasRequired_stream_readable = 1;
|
|
2270
2215
|
_stream_readable = Readable;
|
|
2271
|
-
var
|
|
2216
|
+
var Duplex2;
|
|
2272
2217
|
Readable.ReadableState = ReadableState;
|
|
2273
2218
|
require$$0.EventEmitter;
|
|
2274
2219
|
var EElistenerCount = function EElistenerCount2(emitter, type) {
|
|
2275
2220
|
return emitter.listeners(type).length;
|
|
2276
2221
|
};
|
|
2277
|
-
var Stream2 =
|
|
2222
|
+
var Stream2 = streamBrowser;
|
|
2278
2223
|
var Buffer2 = buffer.Buffer;
|
|
2279
2224
|
var OurUint8Array = (typeof commonjsGlobal !== "undefined" ? commonjsGlobal : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {
|
|
2280
2225
|
};
|
|
@@ -2293,14 +2238,14 @@ function require_stream_readable() {
|
|
|
2293
2238
|
};
|
|
2294
2239
|
}
|
|
2295
2240
|
var BufferList = requireBuffer_list();
|
|
2296
|
-
var destroyImpl =
|
|
2297
|
-
var _require =
|
|
2298
|
-
var _require$
|
|
2241
|
+
var destroyImpl = destroy_1;
|
|
2242
|
+
var _require = state, getHighWaterMark2 = _require.getHighWaterMark;
|
|
2243
|
+
var _require$codes2 = errorsBrowser.codes, ERR_INVALID_ARG_TYPE = _require$codes2.ERR_INVALID_ARG_TYPE, ERR_STREAM_PUSH_AFTER_EOF = _require$codes2.ERR_STREAM_PUSH_AFTER_EOF, ERR_METHOD_NOT_IMPLEMENTED2 = _require$codes2.ERR_METHOD_NOT_IMPLEMENTED, ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes2.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
|
|
2299
2244
|
var StringDecoder2;
|
|
2300
2245
|
var createReadableStreamAsyncIterator;
|
|
2301
2246
|
var from;
|
|
2302
2247
|
inherits_browserExports(Readable, Stream2);
|
|
2303
|
-
var
|
|
2248
|
+
var errorOrDestroy2 = destroyImpl.errorOrDestroy;
|
|
2304
2249
|
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
|
2305
2250
|
function prependListener(emitter, event, fn) {
|
|
2306
2251
|
if (typeof emitter.prependListener === "function")
|
|
@@ -2313,14 +2258,14 @@ function require_stream_readable() {
|
|
|
2313
2258
|
emitter._events[event] = [fn, emitter._events[event]];
|
|
2314
2259
|
}
|
|
2315
2260
|
function ReadableState(options, stream, isDuplex) {
|
|
2316
|
-
|
|
2261
|
+
Duplex2 = Duplex2 || require_stream_duplex();
|
|
2317
2262
|
options = options || {};
|
|
2318
2263
|
if (typeof isDuplex !== "boolean")
|
|
2319
|
-
isDuplex = stream instanceof
|
|
2264
|
+
isDuplex = stream instanceof Duplex2;
|
|
2320
2265
|
this.objectMode = !!options.objectMode;
|
|
2321
2266
|
if (isDuplex)
|
|
2322
2267
|
this.objectMode = this.objectMode || !!options.readableObjectMode;
|
|
2323
|
-
this.highWaterMark =
|
|
2268
|
+
this.highWaterMark = getHighWaterMark2(this, options, "readableHighWaterMark", isDuplex);
|
|
2324
2269
|
this.buffer = new BufferList();
|
|
2325
2270
|
this.length = 0;
|
|
2326
2271
|
this.pipes = null;
|
|
@@ -2351,10 +2296,10 @@ function require_stream_readable() {
|
|
|
2351
2296
|
}
|
|
2352
2297
|
}
|
|
2353
2298
|
function Readable(options) {
|
|
2354
|
-
|
|
2299
|
+
Duplex2 = Duplex2 || require_stream_duplex();
|
|
2355
2300
|
if (!(this instanceof Readable))
|
|
2356
2301
|
return new Readable(options);
|
|
2357
|
-
var isDuplex = this instanceof
|
|
2302
|
+
var isDuplex = this instanceof Duplex2;
|
|
2358
2303
|
this._readableState = new ReadableState(options, this, isDuplex);
|
|
2359
2304
|
this.readable = true;
|
|
2360
2305
|
if (options) {
|
|
@@ -2419,18 +2364,18 @@ function require_stream_readable() {
|
|
|
2419
2364
|
if (!skipChunkCheck)
|
|
2420
2365
|
er = chunkInvalid(state2, chunk);
|
|
2421
2366
|
if (er) {
|
|
2422
|
-
|
|
2367
|
+
errorOrDestroy2(stream, er);
|
|
2423
2368
|
} else if (state2.objectMode || chunk && chunk.length > 0) {
|
|
2424
2369
|
if (typeof chunk !== "string" && !state2.objectMode && Object.getPrototypeOf(chunk) !== Buffer2.prototype) {
|
|
2425
2370
|
chunk = _uint8ArrayToBuffer(chunk);
|
|
2426
2371
|
}
|
|
2427
2372
|
if (addToFront) {
|
|
2428
2373
|
if (state2.endEmitted)
|
|
2429
|
-
|
|
2374
|
+
errorOrDestroy2(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());
|
|
2430
2375
|
else
|
|
2431
2376
|
addChunk(stream, state2, chunk, true);
|
|
2432
2377
|
} else if (state2.ended) {
|
|
2433
|
-
|
|
2378
|
+
errorOrDestroy2(stream, new ERR_STREAM_PUSH_AFTER_EOF());
|
|
2434
2379
|
} else if (state2.destroyed) {
|
|
2435
2380
|
return false;
|
|
2436
2381
|
} else {
|
|
@@ -2483,11 +2428,11 @@ function require_stream_readable() {
|
|
|
2483
2428
|
var decoder = new StringDecoder2(enc);
|
|
2484
2429
|
this._readableState.decoder = decoder;
|
|
2485
2430
|
this._readableState.encoding = this._readableState.decoder.encoding;
|
|
2486
|
-
var
|
|
2431
|
+
var p = this._readableState.buffer.head;
|
|
2487
2432
|
var content = "";
|
|
2488
|
-
while (
|
|
2489
|
-
content += decoder.write(
|
|
2490
|
-
|
|
2433
|
+
while (p !== null) {
|
|
2434
|
+
content += decoder.write(p.data);
|
|
2435
|
+
p = p.next;
|
|
2491
2436
|
}
|
|
2492
2437
|
this._readableState.buffer.clear();
|
|
2493
2438
|
if (content !== "")
|
|
@@ -2653,7 +2598,7 @@ function require_stream_readable() {
|
|
|
2653
2598
|
state2.readingMore = false;
|
|
2654
2599
|
}
|
|
2655
2600
|
Readable.prototype._read = function(n2) {
|
|
2656
|
-
|
|
2601
|
+
errorOrDestroy2(this, new ERR_METHOD_NOT_IMPLEMENTED2("_read()"));
|
|
2657
2602
|
};
|
|
2658
2603
|
Readable.prototype.pipe = function(dest, pipeOpts) {
|
|
2659
2604
|
var src2 = this;
|
|
@@ -2726,7 +2671,7 @@ function require_stream_readable() {
|
|
|
2726
2671
|
unpipe();
|
|
2727
2672
|
dest.removeListener("error", onerror);
|
|
2728
2673
|
if (EElistenerCount(dest, "error") === 0)
|
|
2729
|
-
|
|
2674
|
+
errorOrDestroy2(dest, er);
|
|
2730
2675
|
}
|
|
2731
2676
|
prependListener(dest, "error", onerror);
|
|
2732
2677
|
function onclose() {
|
|
@@ -3053,238 +2998,214 @@ function require_stream_readable() {
|
|
|
3053
2998
|
}
|
|
3054
2999
|
return _stream_readable;
|
|
3055
3000
|
}
|
|
3056
|
-
var _stream_transform;
|
|
3057
|
-
var
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
var
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3001
|
+
var _stream_transform = Transform$3;
|
|
3002
|
+
var _require$codes$1 = errorsBrowser.codes, ERR_METHOD_NOT_IMPLEMENTED = _require$codes$1.ERR_METHOD_NOT_IMPLEMENTED, ERR_MULTIPLE_CALLBACK = _require$codes$1.ERR_MULTIPLE_CALLBACK, ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes$1.ERR_TRANSFORM_ALREADY_TRANSFORMING, ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes$1.ERR_TRANSFORM_WITH_LENGTH_0;
|
|
3003
|
+
var Duplex = require_stream_duplex();
|
|
3004
|
+
inherits_browserExports(Transform$3, Duplex);
|
|
3005
|
+
function afterTransform(er, data) {
|
|
3006
|
+
var ts = this._transformState;
|
|
3007
|
+
ts.transforming = false;
|
|
3008
|
+
var cb = ts.writecb;
|
|
3009
|
+
if (cb === null) {
|
|
3010
|
+
return this.emit("error", new ERR_MULTIPLE_CALLBACK());
|
|
3011
|
+
}
|
|
3012
|
+
ts.writechunk = null;
|
|
3013
|
+
ts.writecb = null;
|
|
3014
|
+
if (data != null)
|
|
3015
|
+
this.push(data);
|
|
3016
|
+
cb(er);
|
|
3017
|
+
var rs = this._readableState;
|
|
3018
|
+
rs.reading = false;
|
|
3019
|
+
if (rs.needReadable || rs.length < rs.highWaterMark) {
|
|
3020
|
+
this._read(rs.highWaterMark);
|
|
3021
|
+
}
|
|
3022
|
+
}
|
|
3023
|
+
function Transform$3(options) {
|
|
3024
|
+
if (!(this instanceof Transform$3))
|
|
3025
|
+
return new Transform$3(options);
|
|
3026
|
+
Duplex.call(this, options);
|
|
3027
|
+
this._transformState = {
|
|
3028
|
+
afterTransform: afterTransform.bind(this),
|
|
3029
|
+
needTransform: false,
|
|
3030
|
+
transforming: false,
|
|
3031
|
+
writecb: null,
|
|
3032
|
+
writechunk: null,
|
|
3033
|
+
writeencoding: null
|
|
3034
|
+
};
|
|
3035
|
+
this._readableState.needReadable = true;
|
|
3036
|
+
this._readableState.sync = false;
|
|
3037
|
+
if (options) {
|
|
3038
|
+
if (typeof options.transform === "function")
|
|
3039
|
+
this._transform = options.transform;
|
|
3040
|
+
if (typeof options.flush === "function")
|
|
3041
|
+
this._flush = options.flush;
|
|
3042
|
+
}
|
|
3043
|
+
this.on("prefinish", prefinish);
|
|
3044
|
+
}
|
|
3045
|
+
function prefinish() {
|
|
3046
|
+
var _this = this;
|
|
3047
|
+
if (typeof this._flush === "function" && !this._readableState.destroyed) {
|
|
3048
|
+
this._flush(function(er, data) {
|
|
3049
|
+
done(_this, er, data);
|
|
3050
|
+
});
|
|
3051
|
+
} else {
|
|
3052
|
+
done(this, null, null);
|
|
3053
|
+
}
|
|
3054
|
+
}
|
|
3055
|
+
Transform$3.prototype.push = function(chunk, encoding) {
|
|
3056
|
+
this._transformState.needTransform = false;
|
|
3057
|
+
return Duplex.prototype.push.call(this, chunk, encoding);
|
|
3058
|
+
};
|
|
3059
|
+
Transform$3.prototype._transform = function(chunk, encoding, cb) {
|
|
3060
|
+
cb(new ERR_METHOD_NOT_IMPLEMENTED("_transform()"));
|
|
3061
|
+
};
|
|
3062
|
+
Transform$3.prototype._write = function(chunk, encoding, cb) {
|
|
3063
|
+
var ts = this._transformState;
|
|
3064
|
+
ts.writecb = cb;
|
|
3065
|
+
ts.writechunk = chunk;
|
|
3066
|
+
ts.writeencoding = encoding;
|
|
3067
|
+
if (!ts.transforming) {
|
|
3078
3068
|
var rs = this._readableState;
|
|
3079
|
-
rs.
|
|
3080
|
-
if (rs.needReadable || rs.length < rs.highWaterMark) {
|
|
3069
|
+
if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark)
|
|
3081
3070
|
this._read(rs.highWaterMark);
|
|
3082
|
-
}
|
|
3083
3071
|
}
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
writecb: null,
|
|
3093
|
-
writechunk: null,
|
|
3094
|
-
writeencoding: null
|
|
3095
|
-
};
|
|
3096
|
-
this._readableState.needReadable = true;
|
|
3097
|
-
this._readableState.sync = false;
|
|
3098
|
-
if (options) {
|
|
3099
|
-
if (typeof options.transform === "function")
|
|
3100
|
-
this._transform = options.transform;
|
|
3101
|
-
if (typeof options.flush === "function")
|
|
3102
|
-
this._flush = options.flush;
|
|
3103
|
-
}
|
|
3104
|
-
this.on("prefinish", prefinish);
|
|
3105
|
-
}
|
|
3106
|
-
function prefinish() {
|
|
3107
|
-
var _this = this;
|
|
3108
|
-
if (typeof this._flush === "function" && !this._readableState.destroyed) {
|
|
3109
|
-
this._flush(function(er, data) {
|
|
3110
|
-
done(_this, er, data);
|
|
3111
|
-
});
|
|
3112
|
-
} else {
|
|
3113
|
-
done(this, null, null);
|
|
3114
|
-
}
|
|
3072
|
+
};
|
|
3073
|
+
Transform$3.prototype._read = function(n2) {
|
|
3074
|
+
var ts = this._transformState;
|
|
3075
|
+
if (ts.writechunk !== null && !ts.transforming) {
|
|
3076
|
+
ts.transforming = true;
|
|
3077
|
+
this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
|
|
3078
|
+
} else {
|
|
3079
|
+
ts.needTransform = true;
|
|
3115
3080
|
}
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
stream.push(data);
|
|
3153
|
-
if (stream._writableState.length)
|
|
3154
|
-
throw new ERR_TRANSFORM_WITH_LENGTH_0();
|
|
3155
|
-
if (stream._transformState.transforming)
|
|
3156
|
-
throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();
|
|
3157
|
-
return stream.push(null);
|
|
3158
|
-
}
|
|
3159
|
-
return _stream_transform;
|
|
3160
|
-
}
|
|
3161
|
-
var _stream_passthrough;
|
|
3162
|
-
var hasRequired_stream_passthrough;
|
|
3163
|
-
function require_stream_passthrough() {
|
|
3164
|
-
if (hasRequired_stream_passthrough)
|
|
3165
|
-
return _stream_passthrough;
|
|
3166
|
-
hasRequired_stream_passthrough = 1;
|
|
3167
|
-
_stream_passthrough = PassThrough;
|
|
3168
|
-
var Transform2 = require_stream_transform();
|
|
3169
|
-
inherits_browserExports(PassThrough, Transform2);
|
|
3170
|
-
function PassThrough(options) {
|
|
3171
|
-
if (!(this instanceof PassThrough))
|
|
3172
|
-
return new PassThrough(options);
|
|
3173
|
-
Transform2.call(this, options);
|
|
3174
|
-
}
|
|
3175
|
-
PassThrough.prototype._transform = function(chunk, encoding, cb) {
|
|
3176
|
-
cb(null, chunk);
|
|
3081
|
+
};
|
|
3082
|
+
Transform$3.prototype._destroy = function(err, cb) {
|
|
3083
|
+
Duplex.prototype._destroy.call(this, err, function(err2) {
|
|
3084
|
+
cb(err2);
|
|
3085
|
+
});
|
|
3086
|
+
};
|
|
3087
|
+
function done(stream, er, data) {
|
|
3088
|
+
if (er)
|
|
3089
|
+
return stream.emit("error", er);
|
|
3090
|
+
if (data != null)
|
|
3091
|
+
stream.push(data);
|
|
3092
|
+
if (stream._writableState.length)
|
|
3093
|
+
throw new ERR_TRANSFORM_WITH_LENGTH_0();
|
|
3094
|
+
if (stream._transformState.transforming)
|
|
3095
|
+
throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();
|
|
3096
|
+
return stream.push(null);
|
|
3097
|
+
}
|
|
3098
|
+
var _stream_passthrough = PassThrough;
|
|
3099
|
+
var Transform$2 = _stream_transform;
|
|
3100
|
+
inherits_browserExports(PassThrough, Transform$2);
|
|
3101
|
+
function PassThrough(options) {
|
|
3102
|
+
if (!(this instanceof PassThrough))
|
|
3103
|
+
return new PassThrough(options);
|
|
3104
|
+
Transform$2.call(this, options);
|
|
3105
|
+
}
|
|
3106
|
+
PassThrough.prototype._transform = function(chunk, encoding, cb) {
|
|
3107
|
+
cb(null, chunk);
|
|
3108
|
+
};
|
|
3109
|
+
var eos;
|
|
3110
|
+
function once(callback) {
|
|
3111
|
+
var called = false;
|
|
3112
|
+
return function() {
|
|
3113
|
+
if (called)
|
|
3114
|
+
return;
|
|
3115
|
+
called = true;
|
|
3116
|
+
callback.apply(void 0, arguments);
|
|
3177
3117
|
};
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3118
|
+
}
|
|
3119
|
+
var _require$codes = errorsBrowser.codes, ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
|
|
3120
|
+
function noop(err) {
|
|
3121
|
+
if (err)
|
|
3122
|
+
throw err;
|
|
3123
|
+
}
|
|
3124
|
+
function isRequest(stream) {
|
|
3125
|
+
return stream.setHeader && typeof stream.abort === "function";
|
|
3126
|
+
}
|
|
3127
|
+
function destroyer(stream, reading, writing, callback) {
|
|
3128
|
+
callback = once(callback);
|
|
3129
|
+
var closed = false;
|
|
3130
|
+
stream.on("close", function() {
|
|
3131
|
+
closed = true;
|
|
3132
|
+
});
|
|
3133
|
+
if (eos === void 0)
|
|
3134
|
+
eos = endOfStream;
|
|
3135
|
+
eos(stream, {
|
|
3136
|
+
readable: reading,
|
|
3137
|
+
writable: writing
|
|
3138
|
+
}, function(err) {
|
|
3198
3139
|
if (err)
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
function
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
if (
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3140
|
+
return callback(err);
|
|
3141
|
+
closed = true;
|
|
3142
|
+
callback();
|
|
3143
|
+
});
|
|
3144
|
+
var destroyed = false;
|
|
3145
|
+
return function(err) {
|
|
3146
|
+
if (closed)
|
|
3147
|
+
return;
|
|
3148
|
+
if (destroyed)
|
|
3149
|
+
return;
|
|
3150
|
+
destroyed = true;
|
|
3151
|
+
if (isRequest(stream))
|
|
3152
|
+
return stream.abort();
|
|
3153
|
+
if (typeof stream.destroy === "function")
|
|
3154
|
+
return stream.destroy();
|
|
3155
|
+
callback(err || new ERR_STREAM_DESTROYED("pipe"));
|
|
3156
|
+
};
|
|
3157
|
+
}
|
|
3158
|
+
function call(fn) {
|
|
3159
|
+
fn();
|
|
3160
|
+
}
|
|
3161
|
+
function pipe(from, to) {
|
|
3162
|
+
return from.pipe(to);
|
|
3163
|
+
}
|
|
3164
|
+
function popCallback(streams) {
|
|
3165
|
+
if (!streams.length)
|
|
3166
|
+
return noop;
|
|
3167
|
+
if (typeof streams[streams.length - 1] !== "function")
|
|
3168
|
+
return noop;
|
|
3169
|
+
return streams.pop();
|
|
3170
|
+
}
|
|
3171
|
+
function pipeline() {
|
|
3172
|
+
for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3173
|
+
streams[_key] = arguments[_key];
|
|
3174
|
+
}
|
|
3175
|
+
var callback = popCallback(streams);
|
|
3176
|
+
if (Array.isArray(streams[0]))
|
|
3177
|
+
streams = streams[0];
|
|
3178
|
+
if (streams.length < 2) {
|
|
3179
|
+
throw new ERR_MISSING_ARGS("streams");
|
|
3180
|
+
}
|
|
3181
|
+
var error;
|
|
3182
|
+
var destroys = streams.map(function(stream, i) {
|
|
3183
|
+
var reading = i < streams.length - 1;
|
|
3184
|
+
var writing = i > 0;
|
|
3185
|
+
return destroyer(stream, reading, writing, function(err) {
|
|
3186
|
+
if (!error)
|
|
3187
|
+
error = err;
|
|
3216
3188
|
if (err)
|
|
3217
|
-
return callback(err);
|
|
3218
|
-
closed = true;
|
|
3219
|
-
callback();
|
|
3220
|
-
});
|
|
3221
|
-
var destroyed = false;
|
|
3222
|
-
return function(err) {
|
|
3223
|
-
if (closed)
|
|
3224
|
-
return;
|
|
3225
|
-
if (destroyed)
|
|
3226
|
-
return;
|
|
3227
|
-
destroyed = true;
|
|
3228
|
-
if (isRequest(stream))
|
|
3229
|
-
return stream.abort();
|
|
3230
|
-
if (typeof stream.destroy === "function")
|
|
3231
|
-
return stream.destroy();
|
|
3232
|
-
callback(err || new ERR_STREAM_DESTROYED("pipe"));
|
|
3233
|
-
};
|
|
3234
|
-
}
|
|
3235
|
-
function call(fn) {
|
|
3236
|
-
fn();
|
|
3237
|
-
}
|
|
3238
|
-
function pipe(from, to) {
|
|
3239
|
-
return from.pipe(to);
|
|
3240
|
-
}
|
|
3241
|
-
function popCallback(streams) {
|
|
3242
|
-
if (!streams.length)
|
|
3243
|
-
return noop;
|
|
3244
|
-
if (typeof streams[streams.length - 1] !== "function")
|
|
3245
|
-
return noop;
|
|
3246
|
-
return streams.pop();
|
|
3247
|
-
}
|
|
3248
|
-
function pipeline() {
|
|
3249
|
-
for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3250
|
-
streams[_key] = arguments[_key];
|
|
3251
|
-
}
|
|
3252
|
-
var callback = popCallback(streams);
|
|
3253
|
-
if (Array.isArray(streams[0]))
|
|
3254
|
-
streams = streams[0];
|
|
3255
|
-
if (streams.length < 2) {
|
|
3256
|
-
throw new ERR_MISSING_ARGS("streams");
|
|
3257
|
-
}
|
|
3258
|
-
var error;
|
|
3259
|
-
var destroys = streams.map(function(stream, i) {
|
|
3260
|
-
var reading = i < streams.length - 1;
|
|
3261
|
-
var writing = i > 0;
|
|
3262
|
-
return destroyer(stream, reading, writing, function(err) {
|
|
3263
|
-
if (!error)
|
|
3264
|
-
error = err;
|
|
3265
|
-
if (err)
|
|
3266
|
-
destroys.forEach(call);
|
|
3267
|
-
if (reading)
|
|
3268
|
-
return;
|
|
3269
3189
|
destroys.forEach(call);
|
|
3270
|
-
|
|
3271
|
-
|
|
3190
|
+
if (reading)
|
|
3191
|
+
return;
|
|
3192
|
+
destroys.forEach(call);
|
|
3193
|
+
callback(error);
|
|
3272
3194
|
});
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
pipeline_1 = pipeline;
|
|
3276
|
-
return pipeline_1;
|
|
3195
|
+
});
|
|
3196
|
+
return streams.reduce(pipe);
|
|
3277
3197
|
}
|
|
3198
|
+
var pipeline_1 = pipeline;
|
|
3278
3199
|
(function(module, exports2) {
|
|
3279
3200
|
exports2 = module.exports = require_stream_readable();
|
|
3280
3201
|
exports2.Stream = exports2;
|
|
3281
3202
|
exports2.Readable = exports2;
|
|
3282
3203
|
exports2.Writable = require_stream_writable();
|
|
3283
3204
|
exports2.Duplex = require_stream_duplex();
|
|
3284
|
-
exports2.Transform =
|
|
3285
|
-
exports2.PassThrough =
|
|
3286
|
-
exports2.finished =
|
|
3287
|
-
exports2.pipeline =
|
|
3205
|
+
exports2.Transform = _stream_transform;
|
|
3206
|
+
exports2.PassThrough = _stream_passthrough;
|
|
3207
|
+
exports2.finished = endOfStream;
|
|
3208
|
+
exports2.pipeline = pipeline_1;
|
|
3288
3209
|
})(readableBrowser, readableBrowser.exports);
|
|
3289
3210
|
var readableBrowserExports = readableBrowser.exports;
|
|
3290
3211
|
var Buffer$g = safeBufferExports.Buffer;
|
|
@@ -3384,75 +3305,75 @@ MD5$2.prototype._update = function() {
|
|
|
3384
3305
|
M[i] = this._block.readInt32LE(i * 4);
|
|
3385
3306
|
var a = this._a;
|
|
3386
3307
|
var b = this._b;
|
|
3387
|
-
var
|
|
3308
|
+
var c = this._c;
|
|
3388
3309
|
var d = this._d;
|
|
3389
|
-
a = fnF(a, b,
|
|
3390
|
-
d = fnF(d, a, b,
|
|
3391
|
-
|
|
3392
|
-
b = fnF(b,
|
|
3393
|
-
a = fnF(a, b,
|
|
3394
|
-
d = fnF(d, a, b,
|
|
3395
|
-
|
|
3396
|
-
b = fnF(b,
|
|
3397
|
-
a = fnF(a, b,
|
|
3398
|
-
d = fnF(d, a, b,
|
|
3399
|
-
|
|
3400
|
-
b = fnF(b,
|
|
3401
|
-
a = fnF(a, b,
|
|
3402
|
-
d = fnF(d, a, b,
|
|
3403
|
-
|
|
3404
|
-
b = fnF(b,
|
|
3405
|
-
a = fnG(a, b,
|
|
3406
|
-
d = fnG(d, a, b,
|
|
3407
|
-
|
|
3408
|
-
b = fnG(b,
|
|
3409
|
-
a = fnG(a, b,
|
|
3410
|
-
d = fnG(d, a, b,
|
|
3411
|
-
|
|
3412
|
-
b = fnG(b,
|
|
3413
|
-
a = fnG(a, b,
|
|
3414
|
-
d = fnG(d, a, b,
|
|
3415
|
-
|
|
3416
|
-
b = fnG(b,
|
|
3417
|
-
a = fnG(a, b,
|
|
3418
|
-
d = fnG(d, a, b,
|
|
3419
|
-
|
|
3420
|
-
b = fnG(b,
|
|
3421
|
-
a = fnH(a, b,
|
|
3422
|
-
d = fnH(d, a, b,
|
|
3423
|
-
|
|
3424
|
-
b = fnH(b,
|
|
3425
|
-
a = fnH(a, b,
|
|
3426
|
-
d = fnH(d, a, b,
|
|
3427
|
-
|
|
3428
|
-
b = fnH(b,
|
|
3429
|
-
a = fnH(a, b,
|
|
3430
|
-
d = fnH(d, a, b,
|
|
3431
|
-
|
|
3432
|
-
b = fnH(b,
|
|
3433
|
-
a = fnH(a, b,
|
|
3434
|
-
d = fnH(d, a, b,
|
|
3435
|
-
|
|
3436
|
-
b = fnH(b,
|
|
3437
|
-
a = fnI(a, b,
|
|
3438
|
-
d = fnI(d, a, b,
|
|
3439
|
-
|
|
3440
|
-
b = fnI(b,
|
|
3441
|
-
a = fnI(a, b,
|
|
3442
|
-
d = fnI(d, a, b,
|
|
3443
|
-
|
|
3444
|
-
b = fnI(b,
|
|
3445
|
-
a = fnI(a, b,
|
|
3446
|
-
d = fnI(d, a, b,
|
|
3447
|
-
|
|
3448
|
-
b = fnI(b,
|
|
3449
|
-
a = fnI(a, b,
|
|
3450
|
-
d = fnI(d, a, b,
|
|
3451
|
-
|
|
3452
|
-
b = fnI(b,
|
|
3310
|
+
a = fnF(a, b, c, d, M[0], 3614090360, 7);
|
|
3311
|
+
d = fnF(d, a, b, c, M[1], 3905402710, 12);
|
|
3312
|
+
c = fnF(c, d, a, b, M[2], 606105819, 17);
|
|
3313
|
+
b = fnF(b, c, d, a, M[3], 3250441966, 22);
|
|
3314
|
+
a = fnF(a, b, c, d, M[4], 4118548399, 7);
|
|
3315
|
+
d = fnF(d, a, b, c, M[5], 1200080426, 12);
|
|
3316
|
+
c = fnF(c, d, a, b, M[6], 2821735955, 17);
|
|
3317
|
+
b = fnF(b, c, d, a, M[7], 4249261313, 22);
|
|
3318
|
+
a = fnF(a, b, c, d, M[8], 1770035416, 7);
|
|
3319
|
+
d = fnF(d, a, b, c, M[9], 2336552879, 12);
|
|
3320
|
+
c = fnF(c, d, a, b, M[10], 4294925233, 17);
|
|
3321
|
+
b = fnF(b, c, d, a, M[11], 2304563134, 22);
|
|
3322
|
+
a = fnF(a, b, c, d, M[12], 1804603682, 7);
|
|
3323
|
+
d = fnF(d, a, b, c, M[13], 4254626195, 12);
|
|
3324
|
+
c = fnF(c, d, a, b, M[14], 2792965006, 17);
|
|
3325
|
+
b = fnF(b, c, d, a, M[15], 1236535329, 22);
|
|
3326
|
+
a = fnG(a, b, c, d, M[1], 4129170786, 5);
|
|
3327
|
+
d = fnG(d, a, b, c, M[6], 3225465664, 9);
|
|
3328
|
+
c = fnG(c, d, a, b, M[11], 643717713, 14);
|
|
3329
|
+
b = fnG(b, c, d, a, M[0], 3921069994, 20);
|
|
3330
|
+
a = fnG(a, b, c, d, M[5], 3593408605, 5);
|
|
3331
|
+
d = fnG(d, a, b, c, M[10], 38016083, 9);
|
|
3332
|
+
c = fnG(c, d, a, b, M[15], 3634488961, 14);
|
|
3333
|
+
b = fnG(b, c, d, a, M[4], 3889429448, 20);
|
|
3334
|
+
a = fnG(a, b, c, d, M[9], 568446438, 5);
|
|
3335
|
+
d = fnG(d, a, b, c, M[14], 3275163606, 9);
|
|
3336
|
+
c = fnG(c, d, a, b, M[3], 4107603335, 14);
|
|
3337
|
+
b = fnG(b, c, d, a, M[8], 1163531501, 20);
|
|
3338
|
+
a = fnG(a, b, c, d, M[13], 2850285829, 5);
|
|
3339
|
+
d = fnG(d, a, b, c, M[2], 4243563512, 9);
|
|
3340
|
+
c = fnG(c, d, a, b, M[7], 1735328473, 14);
|
|
3341
|
+
b = fnG(b, c, d, a, M[12], 2368359562, 20);
|
|
3342
|
+
a = fnH(a, b, c, d, M[5], 4294588738, 4);
|
|
3343
|
+
d = fnH(d, a, b, c, M[8], 2272392833, 11);
|
|
3344
|
+
c = fnH(c, d, a, b, M[11], 1839030562, 16);
|
|
3345
|
+
b = fnH(b, c, d, a, M[14], 4259657740, 23);
|
|
3346
|
+
a = fnH(a, b, c, d, M[1], 2763975236, 4);
|
|
3347
|
+
d = fnH(d, a, b, c, M[4], 1272893353, 11);
|
|
3348
|
+
c = fnH(c, d, a, b, M[7], 4139469664, 16);
|
|
3349
|
+
b = fnH(b, c, d, a, M[10], 3200236656, 23);
|
|
3350
|
+
a = fnH(a, b, c, d, M[13], 681279174, 4);
|
|
3351
|
+
d = fnH(d, a, b, c, M[0], 3936430074, 11);
|
|
3352
|
+
c = fnH(c, d, a, b, M[3], 3572445317, 16);
|
|
3353
|
+
b = fnH(b, c, d, a, M[6], 76029189, 23);
|
|
3354
|
+
a = fnH(a, b, c, d, M[9], 3654602809, 4);
|
|
3355
|
+
d = fnH(d, a, b, c, M[12], 3873151461, 11);
|
|
3356
|
+
c = fnH(c, d, a, b, M[15], 530742520, 16);
|
|
3357
|
+
b = fnH(b, c, d, a, M[2], 3299628645, 23);
|
|
3358
|
+
a = fnI(a, b, c, d, M[0], 4096336452, 6);
|
|
3359
|
+
d = fnI(d, a, b, c, M[7], 1126891415, 10);
|
|
3360
|
+
c = fnI(c, d, a, b, M[14], 2878612391, 15);
|
|
3361
|
+
b = fnI(b, c, d, a, M[5], 4237533241, 21);
|
|
3362
|
+
a = fnI(a, b, c, d, M[12], 1700485571, 6);
|
|
3363
|
+
d = fnI(d, a, b, c, M[3], 2399980690, 10);
|
|
3364
|
+
c = fnI(c, d, a, b, M[10], 4293915773, 15);
|
|
3365
|
+
b = fnI(b, c, d, a, M[1], 2240044497, 21);
|
|
3366
|
+
a = fnI(a, b, c, d, M[8], 1873313359, 6);
|
|
3367
|
+
d = fnI(d, a, b, c, M[15], 4264355552, 10);
|
|
3368
|
+
c = fnI(c, d, a, b, M[6], 2734768916, 15);
|
|
3369
|
+
b = fnI(b, c, d, a, M[13], 1309151649, 21);
|
|
3370
|
+
a = fnI(a, b, c, d, M[4], 4149444226, 6);
|
|
3371
|
+
d = fnI(d, a, b, c, M[11], 3174756917, 10);
|
|
3372
|
+
c = fnI(c, d, a, b, M[2], 718787259, 15);
|
|
3373
|
+
b = fnI(b, c, d, a, M[9], 3951481745, 21);
|
|
3453
3374
|
this._a = this._a + a | 0;
|
|
3454
3375
|
this._b = this._b + b | 0;
|
|
3455
|
-
this._c = this._c +
|
|
3376
|
+
this._c = this._c + c | 0;
|
|
3456
3377
|
this._d = this._d + d | 0;
|
|
3457
3378
|
};
|
|
3458
3379
|
MD5$2.prototype._digest = function() {
|
|
@@ -3476,17 +3397,17 @@ MD5$2.prototype._digest = function() {
|
|
|
3476
3397
|
function rotl$1(x, n2) {
|
|
3477
3398
|
return x << n2 | x >>> 32 - n2;
|
|
3478
3399
|
}
|
|
3479
|
-
function fnF(a, b,
|
|
3480
|
-
return rotl$1(a + (b &
|
|
3400
|
+
function fnF(a, b, c, d, m, k, s) {
|
|
3401
|
+
return rotl$1(a + (b & c | ~b & d) + m + k | 0, s) + b | 0;
|
|
3481
3402
|
}
|
|
3482
|
-
function fnG(a, b,
|
|
3483
|
-
return rotl$1(a + (b & d |
|
|
3403
|
+
function fnG(a, b, c, d, m, k, s) {
|
|
3404
|
+
return rotl$1(a + (b & d | c & ~d) + m + k | 0, s) + b | 0;
|
|
3484
3405
|
}
|
|
3485
|
-
function fnH(a, b,
|
|
3486
|
-
return rotl$1(a + (b ^
|
|
3406
|
+
function fnH(a, b, c, d, m, k, s) {
|
|
3407
|
+
return rotl$1(a + (b ^ c ^ d) + m + k | 0, s) + b | 0;
|
|
3487
3408
|
}
|
|
3488
|
-
function fnI(a, b,
|
|
3489
|
-
return rotl$1(a + (
|
|
3409
|
+
function fnI(a, b, c, d, m, k, s) {
|
|
3410
|
+
return rotl$1(a + (c ^ (b | ~d)) + m + k | 0, s) + b | 0;
|
|
3490
3411
|
}
|
|
3491
3412
|
var md5_js = MD5$2;
|
|
3492
3413
|
var Buffer$e = buffer.Buffer;
|
|
@@ -3905,20 +3826,20 @@ RIPEMD160$2.prototype._digest = function() {
|
|
|
3905
3826
|
function rotl(x, n2) {
|
|
3906
3827
|
return x << n2 | x >>> 32 - n2;
|
|
3907
3828
|
}
|
|
3908
|
-
function fn1(a, b,
|
|
3909
|
-
return rotl(a + (b ^
|
|
3829
|
+
function fn1(a, b, c, d, e, m, k, s) {
|
|
3830
|
+
return rotl(a + (b ^ c ^ d) + m + k | 0, s) + e | 0;
|
|
3910
3831
|
}
|
|
3911
|
-
function fn2(a, b,
|
|
3912
|
-
return rotl(a + (b &
|
|
3832
|
+
function fn2(a, b, c, d, e, m, k, s) {
|
|
3833
|
+
return rotl(a + (b & c | ~b & d) + m + k | 0, s) + e | 0;
|
|
3913
3834
|
}
|
|
3914
|
-
function fn3(a, b,
|
|
3915
|
-
return rotl(a + ((b | ~
|
|
3835
|
+
function fn3(a, b, c, d, e, m, k, s) {
|
|
3836
|
+
return rotl(a + ((b | ~c) ^ d) + m + k | 0, s) + e | 0;
|
|
3916
3837
|
}
|
|
3917
|
-
function fn4(a, b,
|
|
3918
|
-
return rotl(a + (b & d |
|
|
3838
|
+
function fn4(a, b, c, d, e, m, k, s) {
|
|
3839
|
+
return rotl(a + (b & d | c & ~d) + m + k | 0, s) + e | 0;
|
|
3919
3840
|
}
|
|
3920
|
-
function fn5(a, b,
|
|
3921
|
-
return rotl(a + (b ^ (
|
|
3841
|
+
function fn5(a, b, c, d, e, m, k, s) {
|
|
3842
|
+
return rotl(a + (b ^ (c | ~d)) + m + k | 0, s) + e | 0;
|
|
3922
3843
|
}
|
|
3923
3844
|
var ripemd160$1 = RIPEMD160$2;
|
|
3924
3845
|
var sha_js = { exports: {} };
|
|
@@ -4008,18 +3929,18 @@ function rotl5$1(num) {
|
|
|
4008
3929
|
function rotl30$1(num) {
|
|
4009
3930
|
return num << 30 | num >>> 2;
|
|
4010
3931
|
}
|
|
4011
|
-
function ft$1(s, b,
|
|
3932
|
+
function ft$1(s, b, c, d) {
|
|
4012
3933
|
if (s === 0)
|
|
4013
|
-
return b &
|
|
3934
|
+
return b & c | ~b & d;
|
|
4014
3935
|
if (s === 2)
|
|
4015
|
-
return b &
|
|
4016
|
-
return b ^
|
|
3936
|
+
return b & c | b & d | c & d;
|
|
3937
|
+
return b ^ c ^ d;
|
|
4017
3938
|
}
|
|
4018
3939
|
Sha.prototype._update = function(M) {
|
|
4019
3940
|
var W2 = this._w;
|
|
4020
3941
|
var a = this._a | 0;
|
|
4021
3942
|
var b = this._b | 0;
|
|
4022
|
-
var
|
|
3943
|
+
var c = this._c | 0;
|
|
4023
3944
|
var d = this._d | 0;
|
|
4024
3945
|
var e = this._e | 0;
|
|
4025
3946
|
for (var i = 0; i < 16; ++i)
|
|
@@ -4028,16 +3949,16 @@ Sha.prototype._update = function(M) {
|
|
|
4028
3949
|
W2[i] = W2[i - 3] ^ W2[i - 8] ^ W2[i - 14] ^ W2[i - 16];
|
|
4029
3950
|
for (var j = 0; j < 80; ++j) {
|
|
4030
3951
|
var s = ~~(j / 20);
|
|
4031
|
-
var t = rotl5$1(a) + ft$1(s, b,
|
|
3952
|
+
var t = rotl5$1(a) + ft$1(s, b, c, d) + e + W2[j] + K$3[s] | 0;
|
|
4032
3953
|
e = d;
|
|
4033
|
-
d =
|
|
4034
|
-
|
|
3954
|
+
d = c;
|
|
3955
|
+
c = rotl30$1(b);
|
|
4035
3956
|
b = a;
|
|
4036
3957
|
a = t;
|
|
4037
3958
|
}
|
|
4038
3959
|
this._a = a + this._a | 0;
|
|
4039
3960
|
this._b = b + this._b | 0;
|
|
4040
|
-
this._c =
|
|
3961
|
+
this._c = c + this._c | 0;
|
|
4041
3962
|
this._d = d + this._d | 0;
|
|
4042
3963
|
this._e = e + this._e | 0;
|
|
4043
3964
|
};
|
|
@@ -4084,18 +4005,18 @@ function rotl5(num) {
|
|
|
4084
4005
|
function rotl30(num) {
|
|
4085
4006
|
return num << 30 | num >>> 2;
|
|
4086
4007
|
}
|
|
4087
|
-
function ft(s, b,
|
|
4008
|
+
function ft(s, b, c, d) {
|
|
4088
4009
|
if (s === 0)
|
|
4089
|
-
return b &
|
|
4010
|
+
return b & c | ~b & d;
|
|
4090
4011
|
if (s === 2)
|
|
4091
|
-
return b &
|
|
4092
|
-
return b ^
|
|
4012
|
+
return b & c | b & d | c & d;
|
|
4013
|
+
return b ^ c ^ d;
|
|
4093
4014
|
}
|
|
4094
4015
|
Sha1.prototype._update = function(M) {
|
|
4095
4016
|
var W2 = this._w;
|
|
4096
4017
|
var a = this._a | 0;
|
|
4097
4018
|
var b = this._b | 0;
|
|
4098
|
-
var
|
|
4019
|
+
var c = this._c | 0;
|
|
4099
4020
|
var d = this._d | 0;
|
|
4100
4021
|
var e = this._e | 0;
|
|
4101
4022
|
for (var i = 0; i < 16; ++i)
|
|
@@ -4104,16 +4025,16 @@ Sha1.prototype._update = function(M) {
|
|
|
4104
4025
|
W2[i] = rotl1(W2[i - 3] ^ W2[i - 8] ^ W2[i - 14] ^ W2[i - 16]);
|
|
4105
4026
|
for (var j = 0; j < 80; ++j) {
|
|
4106
4027
|
var s = ~~(j / 20);
|
|
4107
|
-
var t = rotl5(a) + ft(s, b,
|
|
4028
|
+
var t = rotl5(a) + ft(s, b, c, d) + e + W2[j] + K$2[s] | 0;
|
|
4108
4029
|
e = d;
|
|
4109
|
-
d =
|
|
4110
|
-
|
|
4030
|
+
d = c;
|
|
4031
|
+
c = rotl30(b);
|
|
4111
4032
|
b = a;
|
|
4112
4033
|
a = t;
|
|
4113
4034
|
}
|
|
4114
4035
|
this._a = a + this._a | 0;
|
|
4115
4036
|
this._b = b + this._b | 0;
|
|
4116
|
-
this._c =
|
|
4037
|
+
this._c = c + this._c | 0;
|
|
4117
4038
|
this._d = d + this._d | 0;
|
|
4118
4039
|
this._e = e + this._e | 0;
|
|
4119
4040
|
};
|
|
@@ -4236,36 +4157,36 @@ Sha256$1.prototype._update = function(M) {
|
|
|
4236
4157
|
var W2 = this._w;
|
|
4237
4158
|
var a = this._a | 0;
|
|
4238
4159
|
var b = this._b | 0;
|
|
4239
|
-
var
|
|
4160
|
+
var c = this._c | 0;
|
|
4240
4161
|
var d = this._d | 0;
|
|
4241
4162
|
var e = this._e | 0;
|
|
4242
4163
|
var f = this._f | 0;
|
|
4243
|
-
var
|
|
4244
|
-
var
|
|
4164
|
+
var g = this._g | 0;
|
|
4165
|
+
var h = this._h | 0;
|
|
4245
4166
|
for (var i = 0; i < 16; ++i)
|
|
4246
4167
|
W2[i] = M.readInt32BE(i * 4);
|
|
4247
4168
|
for (; i < 64; ++i)
|
|
4248
4169
|
W2[i] = gamma1(W2[i - 2]) + W2[i - 7] + gamma0(W2[i - 15]) + W2[i - 16] | 0;
|
|
4249
4170
|
for (var j = 0; j < 64; ++j) {
|
|
4250
|
-
var T1 =
|
|
4251
|
-
var T2 = sigma0$1(a) + maj$1(a, b,
|
|
4252
|
-
|
|
4253
|
-
|
|
4171
|
+
var T1 = h + sigma1$1(e) + ch(e, f, g) + K$1[j] + W2[j] | 0;
|
|
4172
|
+
var T2 = sigma0$1(a) + maj$1(a, b, c) | 0;
|
|
4173
|
+
h = g;
|
|
4174
|
+
g = f;
|
|
4254
4175
|
f = e;
|
|
4255
4176
|
e = d + T1 | 0;
|
|
4256
|
-
d =
|
|
4257
|
-
|
|
4177
|
+
d = c;
|
|
4178
|
+
c = b;
|
|
4258
4179
|
b = a;
|
|
4259
4180
|
a = T1 + T2 | 0;
|
|
4260
4181
|
}
|
|
4261
4182
|
this._a = a + this._a | 0;
|
|
4262
4183
|
this._b = b + this._b | 0;
|
|
4263
|
-
this._c =
|
|
4184
|
+
this._c = c + this._c | 0;
|
|
4264
4185
|
this._d = d + this._d | 0;
|
|
4265
4186
|
this._e = e + this._e | 0;
|
|
4266
4187
|
this._f = f + this._f | 0;
|
|
4267
|
-
this._g =
|
|
4268
|
-
this._h =
|
|
4188
|
+
this._g = g + this._g | 0;
|
|
4189
|
+
this._h = h + this._h | 0;
|
|
4269
4190
|
};
|
|
4270
4191
|
Sha256$1.prototype._hash = function() {
|
|
4271
4192
|
var H = Buffer$a.allocUnsafe(32);
|
|
@@ -4635,8 +4556,8 @@ Sha512.prototype._update = function(M) {
|
|
|
4635
4556
|
};
|
|
4636
4557
|
Sha512.prototype._hash = function() {
|
|
4637
4558
|
var H = Buffer$8.allocUnsafe(64);
|
|
4638
|
-
function writeInt64BE(
|
|
4639
|
-
H.writeInt32BE(
|
|
4559
|
+
function writeInt64BE(h, l, offset) {
|
|
4560
|
+
H.writeInt32BE(h, offset);
|
|
4640
4561
|
H.writeInt32BE(l, offset + 4);
|
|
4641
4562
|
}
|
|
4642
4563
|
writeInt64BE(this._ah, this._al, 0);
|
|
@@ -4682,8 +4603,8 @@ Sha384.prototype.init = function() {
|
|
|
4682
4603
|
};
|
|
4683
4604
|
Sha384.prototype._hash = function() {
|
|
4684
4605
|
var H = Buffer$7.allocUnsafe(48);
|
|
4685
|
-
function writeInt64BE(
|
|
4686
|
-
H.writeInt32BE(
|
|
4606
|
+
function writeInt64BE(h, l, offset) {
|
|
4607
|
+
H.writeInt32BE(h, offset);
|
|
4687
4608
|
H.writeInt32BE(l, offset + 4);
|
|
4688
4609
|
}
|
|
4689
4610
|
writeInt64BE(this._ah, this._al, 0);
|
|
@@ -4716,10 +4637,10 @@ inherits$4(Stream, EE);
|
|
|
4716
4637
|
Stream.Readable = require_stream_readable();
|
|
4717
4638
|
Stream.Writable = require_stream_writable();
|
|
4718
4639
|
Stream.Duplex = require_stream_duplex();
|
|
4719
|
-
Stream.Transform =
|
|
4720
|
-
Stream.PassThrough =
|
|
4721
|
-
Stream.finished =
|
|
4722
|
-
Stream.pipeline =
|
|
4640
|
+
Stream.Transform = _stream_transform;
|
|
4641
|
+
Stream.PassThrough = _stream_passthrough;
|
|
4642
|
+
Stream.finished = endOfStream;
|
|
4643
|
+
Stream.pipeline = pipeline_1;
|
|
4723
4644
|
Stream.Stream = Stream;
|
|
4724
4645
|
function Stream() {
|
|
4725
4646
|
EE.call(this);
|
|
@@ -4840,14 +4761,14 @@ CipherBase.prototype._transform = function(data, _, next) {
|
|
|
4840
4761
|
next(err);
|
|
4841
4762
|
}
|
|
4842
4763
|
};
|
|
4843
|
-
CipherBase.prototype._flush = function(
|
|
4764
|
+
CipherBase.prototype._flush = function(done2) {
|
|
4844
4765
|
var err;
|
|
4845
4766
|
try {
|
|
4846
4767
|
this.push(this.__final());
|
|
4847
4768
|
} catch (e) {
|
|
4848
4769
|
err = e;
|
|
4849
4770
|
}
|
|
4850
|
-
|
|
4771
|
+
done2(err);
|
|
4851
4772
|
};
|
|
4852
4773
|
CipherBase.prototype._finalOrDigest = function(outputEnc) {
|
|
4853
4774
|
var outData = this.__final() || Buffer$6.alloc(0);
|
|
@@ -4894,110 +4815,6 @@ var browser$2 = function createHash(alg) {
|
|
|
4894
4815
|
return new RIPEMD160$1();
|
|
4895
4816
|
return new Hash(sha$1(alg));
|
|
4896
4817
|
};
|
|
4897
|
-
var inherits$1 = inherits_browserExports;
|
|
4898
|
-
var Buffer$5 = safeBufferExports.Buffer;
|
|
4899
|
-
var Base$1 = cipherBase;
|
|
4900
|
-
var ZEROS$1 = Buffer$5.alloc(128);
|
|
4901
|
-
var blocksize = 64;
|
|
4902
|
-
function Hmac$1(alg, key) {
|
|
4903
|
-
Base$1.call(this, "digest");
|
|
4904
|
-
if (typeof key === "string") {
|
|
4905
|
-
key = Buffer$5.from(key);
|
|
4906
|
-
}
|
|
4907
|
-
this._alg = alg;
|
|
4908
|
-
this._key = key;
|
|
4909
|
-
if (key.length > blocksize) {
|
|
4910
|
-
key = alg(key);
|
|
4911
|
-
} else if (key.length < blocksize) {
|
|
4912
|
-
key = Buffer$5.concat([key, ZEROS$1], blocksize);
|
|
4913
|
-
}
|
|
4914
|
-
var ipad = this._ipad = Buffer$5.allocUnsafe(blocksize);
|
|
4915
|
-
var opad = this._opad = Buffer$5.allocUnsafe(blocksize);
|
|
4916
|
-
for (var i = 0; i < blocksize; i++) {
|
|
4917
|
-
ipad[i] = key[i] ^ 54;
|
|
4918
|
-
opad[i] = key[i] ^ 92;
|
|
4919
|
-
}
|
|
4920
|
-
this._hash = [ipad];
|
|
4921
|
-
}
|
|
4922
|
-
inherits$1(Hmac$1, Base$1);
|
|
4923
|
-
Hmac$1.prototype._update = function(data) {
|
|
4924
|
-
this._hash.push(data);
|
|
4925
|
-
};
|
|
4926
|
-
Hmac$1.prototype._final = function() {
|
|
4927
|
-
var h2 = this._alg(Buffer$5.concat(this._hash));
|
|
4928
|
-
return this._alg(Buffer$5.concat([this._opad, h2]));
|
|
4929
|
-
};
|
|
4930
|
-
var legacy = Hmac$1;
|
|
4931
|
-
var MD5 = md5_js;
|
|
4932
|
-
var md5$1 = function(buffer2) {
|
|
4933
|
-
return new MD5().update(buffer2).digest();
|
|
4934
|
-
};
|
|
4935
|
-
var inherits = inherits_browserExports;
|
|
4936
|
-
var Legacy = legacy;
|
|
4937
|
-
var Base = cipherBase;
|
|
4938
|
-
var Buffer$4 = safeBufferExports.Buffer;
|
|
4939
|
-
var md5 = md5$1;
|
|
4940
|
-
var RIPEMD160 = ripemd160$1;
|
|
4941
|
-
var sha = sha_jsExports;
|
|
4942
|
-
var ZEROS = Buffer$4.alloc(128);
|
|
4943
|
-
function Hmac(alg, key) {
|
|
4944
|
-
Base.call(this, "digest");
|
|
4945
|
-
if (typeof key === "string") {
|
|
4946
|
-
key = Buffer$4.from(key);
|
|
4947
|
-
}
|
|
4948
|
-
var blocksize2 = alg === "sha512" || alg === "sha384" ? 128 : 64;
|
|
4949
|
-
this._alg = alg;
|
|
4950
|
-
this._key = key;
|
|
4951
|
-
if (key.length > blocksize2) {
|
|
4952
|
-
var hash2 = alg === "rmd160" ? new RIPEMD160() : sha(alg);
|
|
4953
|
-
key = hash2.update(key).digest();
|
|
4954
|
-
} else if (key.length < blocksize2) {
|
|
4955
|
-
key = Buffer$4.concat([key, ZEROS], blocksize2);
|
|
4956
|
-
}
|
|
4957
|
-
var ipad = this._ipad = Buffer$4.allocUnsafe(blocksize2);
|
|
4958
|
-
var opad = this._opad = Buffer$4.allocUnsafe(blocksize2);
|
|
4959
|
-
for (var i = 0; i < blocksize2; i++) {
|
|
4960
|
-
ipad[i] = key[i] ^ 54;
|
|
4961
|
-
opad[i] = key[i] ^ 92;
|
|
4962
|
-
}
|
|
4963
|
-
this._hash = alg === "rmd160" ? new RIPEMD160() : sha(alg);
|
|
4964
|
-
this._hash.update(ipad);
|
|
4965
|
-
}
|
|
4966
|
-
inherits(Hmac, Base);
|
|
4967
|
-
Hmac.prototype._update = function(data) {
|
|
4968
|
-
this._hash.update(data);
|
|
4969
|
-
};
|
|
4970
|
-
Hmac.prototype._final = function() {
|
|
4971
|
-
var h2 = this._hash.digest();
|
|
4972
|
-
var hash2 = this._alg === "rmd160" ? new RIPEMD160() : sha(this._alg);
|
|
4973
|
-
return hash2.update(this._opad).update(h2).digest();
|
|
4974
|
-
};
|
|
4975
|
-
var browser$1 = function createHmac(alg, key) {
|
|
4976
|
-
alg = alg.toLowerCase();
|
|
4977
|
-
if (alg === "rmd160" || alg === "ripemd160") {
|
|
4978
|
-
return new Hmac("rmd160", key);
|
|
4979
|
-
}
|
|
4980
|
-
if (alg === "md5") {
|
|
4981
|
-
return new Legacy(md5, key);
|
|
4982
|
-
}
|
|
4983
|
-
return new Hmac(alg, key);
|
|
4984
|
-
};
|
|
4985
|
-
Object.defineProperty(crypto$4, "__esModule", { value: true });
|
|
4986
|
-
const createHash$2 = browser$2;
|
|
4987
|
-
const createHmac$1 = browser$1;
|
|
4988
|
-
function hash160$1(buffer2) {
|
|
4989
|
-
const sha256Hash = createHash$2("sha256").update(buffer2).digest();
|
|
4990
|
-
try {
|
|
4991
|
-
return createHash$2("rmd160").update(sha256Hash).digest();
|
|
4992
|
-
} catch (err) {
|
|
4993
|
-
return createHash$2("ripemd160").update(sha256Hash).digest();
|
|
4994
|
-
}
|
|
4995
|
-
}
|
|
4996
|
-
crypto$4.hash160 = hash160$1;
|
|
4997
|
-
function hmacSHA512(key, data) {
|
|
4998
|
-
return createHmac$1("sha512", key).update(data).digest();
|
|
4999
|
-
}
|
|
5000
|
-
crypto$4.hmacSHA512 = hmacSHA512;
|
|
5001
4818
|
var _Buffer = safeBufferExports.Buffer;
|
|
5002
4819
|
function base$1(ALPHABET2) {
|
|
5003
4820
|
if (ALPHABET2.length >= 255) {
|
|
@@ -5121,16 +4938,16 @@ function base$1(ALPHABET2) {
|
|
|
5121
4938
|
decode: decode2
|
|
5122
4939
|
};
|
|
5123
4940
|
}
|
|
5124
|
-
var src = base$1;
|
|
5125
|
-
var basex = src;
|
|
4941
|
+
var src$2 = base$1;
|
|
4942
|
+
var basex = src$2;
|
|
5126
4943
|
var ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
5127
4944
|
var bs58 = basex(ALPHABET);
|
|
5128
4945
|
var base58 = bs58;
|
|
5129
|
-
var Buffer$
|
|
4946
|
+
var Buffer$5 = safeBufferExports.Buffer;
|
|
5130
4947
|
var base = function(checksumFn) {
|
|
5131
4948
|
function encode2(payload) {
|
|
5132
4949
|
var checksum = checksumFn(payload);
|
|
5133
|
-
return base58.encode(Buffer$
|
|
4950
|
+
return base58.encode(Buffer$5.concat([
|
|
5134
4951
|
payload,
|
|
5135
4952
|
checksum
|
|
5136
4953
|
], payload.length + 4));
|
|
@@ -5162,13 +4979,121 @@ var base = function(checksumFn) {
|
|
|
5162
4979
|
decodeUnsafe
|
|
5163
4980
|
};
|
|
5164
4981
|
};
|
|
5165
|
-
var createHash$
|
|
4982
|
+
var createHash$2 = browser$2;
|
|
5166
4983
|
var bs58checkBase = base;
|
|
5167
4984
|
function sha256x2(buffer2) {
|
|
5168
|
-
var tmp = createHash$
|
|
5169
|
-
return createHash$
|
|
4985
|
+
var tmp = createHash$2("sha256").update(buffer2).digest();
|
|
4986
|
+
return createHash$2("sha256").update(tmp).digest();
|
|
5170
4987
|
}
|
|
5171
4988
|
var bs58check$5 = bs58checkBase(sha256x2);
|
|
4989
|
+
var src$1 = {};
|
|
4990
|
+
var src = {};
|
|
4991
|
+
var bip32$1 = {};
|
|
4992
|
+
var crypto$4 = {};
|
|
4993
|
+
var inherits$1 = inherits_browserExports;
|
|
4994
|
+
var Buffer$4 = safeBufferExports.Buffer;
|
|
4995
|
+
var Base$1 = cipherBase;
|
|
4996
|
+
var ZEROS$1 = Buffer$4.alloc(128);
|
|
4997
|
+
var blocksize = 64;
|
|
4998
|
+
function Hmac$1(alg, key) {
|
|
4999
|
+
Base$1.call(this, "digest");
|
|
5000
|
+
if (typeof key === "string") {
|
|
5001
|
+
key = Buffer$4.from(key);
|
|
5002
|
+
}
|
|
5003
|
+
this._alg = alg;
|
|
5004
|
+
this._key = key;
|
|
5005
|
+
if (key.length > blocksize) {
|
|
5006
|
+
key = alg(key);
|
|
5007
|
+
} else if (key.length < blocksize) {
|
|
5008
|
+
key = Buffer$4.concat([key, ZEROS$1], blocksize);
|
|
5009
|
+
}
|
|
5010
|
+
var ipad = this._ipad = Buffer$4.allocUnsafe(blocksize);
|
|
5011
|
+
var opad = this._opad = Buffer$4.allocUnsafe(blocksize);
|
|
5012
|
+
for (var i = 0; i < blocksize; i++) {
|
|
5013
|
+
ipad[i] = key[i] ^ 54;
|
|
5014
|
+
opad[i] = key[i] ^ 92;
|
|
5015
|
+
}
|
|
5016
|
+
this._hash = [ipad];
|
|
5017
|
+
}
|
|
5018
|
+
inherits$1(Hmac$1, Base$1);
|
|
5019
|
+
Hmac$1.prototype._update = function(data) {
|
|
5020
|
+
this._hash.push(data);
|
|
5021
|
+
};
|
|
5022
|
+
Hmac$1.prototype._final = function() {
|
|
5023
|
+
var h = this._alg(Buffer$4.concat(this._hash));
|
|
5024
|
+
return this._alg(Buffer$4.concat([this._opad, h]));
|
|
5025
|
+
};
|
|
5026
|
+
var legacy = Hmac$1;
|
|
5027
|
+
var MD5 = md5_js;
|
|
5028
|
+
var md5$1 = function(buffer2) {
|
|
5029
|
+
return new MD5().update(buffer2).digest();
|
|
5030
|
+
};
|
|
5031
|
+
var inherits = inherits_browserExports;
|
|
5032
|
+
var Legacy = legacy;
|
|
5033
|
+
var Base = cipherBase;
|
|
5034
|
+
var Buffer$3 = safeBufferExports.Buffer;
|
|
5035
|
+
var md5 = md5$1;
|
|
5036
|
+
var RIPEMD160 = ripemd160$1;
|
|
5037
|
+
var sha = sha_jsExports;
|
|
5038
|
+
var ZEROS = Buffer$3.alloc(128);
|
|
5039
|
+
function Hmac(alg, key) {
|
|
5040
|
+
Base.call(this, "digest");
|
|
5041
|
+
if (typeof key === "string") {
|
|
5042
|
+
key = Buffer$3.from(key);
|
|
5043
|
+
}
|
|
5044
|
+
var blocksize2 = alg === "sha512" || alg === "sha384" ? 128 : 64;
|
|
5045
|
+
this._alg = alg;
|
|
5046
|
+
this._key = key;
|
|
5047
|
+
if (key.length > blocksize2) {
|
|
5048
|
+
var hash2 = alg === "rmd160" ? new RIPEMD160() : sha(alg);
|
|
5049
|
+
key = hash2.update(key).digest();
|
|
5050
|
+
} else if (key.length < blocksize2) {
|
|
5051
|
+
key = Buffer$3.concat([key, ZEROS], blocksize2);
|
|
5052
|
+
}
|
|
5053
|
+
var ipad = this._ipad = Buffer$3.allocUnsafe(blocksize2);
|
|
5054
|
+
var opad = this._opad = Buffer$3.allocUnsafe(blocksize2);
|
|
5055
|
+
for (var i = 0; i < blocksize2; i++) {
|
|
5056
|
+
ipad[i] = key[i] ^ 54;
|
|
5057
|
+
opad[i] = key[i] ^ 92;
|
|
5058
|
+
}
|
|
5059
|
+
this._hash = alg === "rmd160" ? new RIPEMD160() : sha(alg);
|
|
5060
|
+
this._hash.update(ipad);
|
|
5061
|
+
}
|
|
5062
|
+
inherits(Hmac, Base);
|
|
5063
|
+
Hmac.prototype._update = function(data) {
|
|
5064
|
+
this._hash.update(data);
|
|
5065
|
+
};
|
|
5066
|
+
Hmac.prototype._final = function() {
|
|
5067
|
+
var h = this._hash.digest();
|
|
5068
|
+
var hash2 = this._alg === "rmd160" ? new RIPEMD160() : sha(this._alg);
|
|
5069
|
+
return hash2.update(this._opad).update(h).digest();
|
|
5070
|
+
};
|
|
5071
|
+
var browser$1 = function createHmac(alg, key) {
|
|
5072
|
+
alg = alg.toLowerCase();
|
|
5073
|
+
if (alg === "rmd160" || alg === "ripemd160") {
|
|
5074
|
+
return new Hmac("rmd160", key);
|
|
5075
|
+
}
|
|
5076
|
+
if (alg === "md5") {
|
|
5077
|
+
return new Legacy(md5, key);
|
|
5078
|
+
}
|
|
5079
|
+
return new Hmac(alg, key);
|
|
5080
|
+
};
|
|
5081
|
+
Object.defineProperty(crypto$4, "__esModule", { value: true });
|
|
5082
|
+
const createHash$1 = browser$2;
|
|
5083
|
+
const createHmac$1 = browser$1;
|
|
5084
|
+
function hash160$1(buffer2) {
|
|
5085
|
+
const sha256Hash = createHash$1("sha256").update(buffer2).digest();
|
|
5086
|
+
try {
|
|
5087
|
+
return createHash$1("rmd160").update(sha256Hash).digest();
|
|
5088
|
+
} catch (err) {
|
|
5089
|
+
return createHash$1("ripemd160").update(sha256Hash).digest();
|
|
5090
|
+
}
|
|
5091
|
+
}
|
|
5092
|
+
crypto$4.hash160 = hash160$1;
|
|
5093
|
+
function hmacSHA512(key, data) {
|
|
5094
|
+
return createHmac$1("sha512", key).update(data).digest();
|
|
5095
|
+
}
|
|
5096
|
+
crypto$4.hmacSHA512 = hmacSHA512;
|
|
5172
5097
|
const createHmac2 = browser$1;
|
|
5173
5098
|
const ONE1 = buffer.Buffer.alloc(1, 1);
|
|
5174
5099
|
const ZERO1 = buffer.Buffer.alloc(1, 0);
|
|
@@ -5197,8 +5122,8 @@ const deterministicGenerateK = rfc6979;
|
|
|
5197
5122
|
const ZERO32 = buffer.Buffer.alloc(32, 0);
|
|
5198
5123
|
const EC_GROUP_ORDER = buffer.Buffer.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141", "hex");
|
|
5199
5124
|
const EC_P = buffer.Buffer.from("fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f", "hex");
|
|
5200
|
-
const n
|
|
5201
|
-
const nDiv2 = n
|
|
5125
|
+
const n = secp256k1.curve.n;
|
|
5126
|
+
const nDiv2 = n.shrn(1);
|
|
5202
5127
|
const G = secp256k1.curve.g;
|
|
5203
5128
|
const THROW_BAD_PRIVATE = "Expected Private";
|
|
5204
5129
|
const THROW_BAD_POINT = "Expected Point";
|
|
@@ -5214,41 +5139,41 @@ function isOrderScalar(x) {
|
|
|
5214
5139
|
return false;
|
|
5215
5140
|
return x.compare(EC_GROUP_ORDER) < 0;
|
|
5216
5141
|
}
|
|
5217
|
-
function isPoint(
|
|
5218
|
-
if (!buffer.Buffer.isBuffer(
|
|
5142
|
+
function isPoint(p) {
|
|
5143
|
+
if (!buffer.Buffer.isBuffer(p))
|
|
5219
5144
|
return false;
|
|
5220
|
-
if (
|
|
5145
|
+
if (p.length < 33)
|
|
5221
5146
|
return false;
|
|
5222
|
-
const t =
|
|
5223
|
-
const x =
|
|
5147
|
+
const t = p[0];
|
|
5148
|
+
const x = p.slice(1, 33);
|
|
5224
5149
|
if (x.compare(ZERO32) === 0)
|
|
5225
5150
|
return false;
|
|
5226
5151
|
if (x.compare(EC_P) >= 0)
|
|
5227
5152
|
return false;
|
|
5228
|
-
if ((t === 2 || t === 3) &&
|
|
5153
|
+
if ((t === 2 || t === 3) && p.length === 33) {
|
|
5229
5154
|
try {
|
|
5230
|
-
decodeFrom(
|
|
5155
|
+
decodeFrom(p);
|
|
5231
5156
|
} catch (e) {
|
|
5232
5157
|
return false;
|
|
5233
5158
|
}
|
|
5234
5159
|
return true;
|
|
5235
5160
|
}
|
|
5236
|
-
const y =
|
|
5161
|
+
const y = p.slice(33);
|
|
5237
5162
|
if (y.compare(ZERO32) === 0)
|
|
5238
5163
|
return false;
|
|
5239
5164
|
if (y.compare(EC_P) >= 0)
|
|
5240
5165
|
return false;
|
|
5241
|
-
if (t === 4 &&
|
|
5166
|
+
if (t === 4 && p.length === 65)
|
|
5242
5167
|
return true;
|
|
5243
5168
|
return false;
|
|
5244
5169
|
}
|
|
5245
|
-
function __isPointCompressed(
|
|
5246
|
-
return
|
|
5170
|
+
function __isPointCompressed(p) {
|
|
5171
|
+
return p[0] !== 4;
|
|
5247
5172
|
}
|
|
5248
|
-
function isPointCompressed(
|
|
5249
|
-
if (!isPoint(
|
|
5173
|
+
function isPointCompressed(p) {
|
|
5174
|
+
if (!isPoint(p))
|
|
5250
5175
|
return false;
|
|
5251
|
-
return __isPointCompressed(
|
|
5176
|
+
return __isPointCompressed(p);
|
|
5252
5177
|
}
|
|
5253
5178
|
function isPrivate(x) {
|
|
5254
5179
|
if (!isScalar(x))
|
|
@@ -5293,13 +5218,13 @@ function pointAdd(pA, pB, __compressed) {
|
|
|
5293
5218
|
const compressed = assumeCompression(__compressed, pA);
|
|
5294
5219
|
return getEncoded(pp, compressed);
|
|
5295
5220
|
}
|
|
5296
|
-
function pointAddScalar(
|
|
5297
|
-
if (!isPoint(
|
|
5221
|
+
function pointAddScalar(p, tweak, __compressed) {
|
|
5222
|
+
if (!isPoint(p))
|
|
5298
5223
|
throw new TypeError(THROW_BAD_POINT);
|
|
5299
5224
|
if (!isOrderScalar(tweak))
|
|
5300
5225
|
throw new TypeError(THROW_BAD_TWEAK);
|
|
5301
|
-
const compressed = assumeCompression(__compressed,
|
|
5302
|
-
const pp = decodeFrom(
|
|
5226
|
+
const compressed = assumeCompression(__compressed, p);
|
|
5227
|
+
const pp = decodeFrom(p);
|
|
5303
5228
|
if (tweak.compare(ZERO32) === 0)
|
|
5304
5229
|
return getEncoded(pp, compressed);
|
|
5305
5230
|
const tt = fromBuffer$1(tweak);
|
|
@@ -5309,13 +5234,13 @@ function pointAddScalar(p2, tweak, __compressed) {
|
|
|
5309
5234
|
return null;
|
|
5310
5235
|
return getEncoded(uu, compressed);
|
|
5311
5236
|
}
|
|
5312
|
-
function pointCompress(
|
|
5313
|
-
if (!isPoint(
|
|
5237
|
+
function pointCompress(p, __compressed) {
|
|
5238
|
+
if (!isPoint(p))
|
|
5314
5239
|
throw new TypeError(THROW_BAD_POINT);
|
|
5315
|
-
const pp = decodeFrom(
|
|
5240
|
+
const pp = decodeFrom(p);
|
|
5316
5241
|
if (pp.isInfinity())
|
|
5317
5242
|
throw new TypeError(THROW_BAD_POINT);
|
|
5318
|
-
const compressed = assumeCompression(__compressed,
|
|
5243
|
+
const compressed = assumeCompression(__compressed, p);
|
|
5319
5244
|
return getEncoded(pp, compressed);
|
|
5320
5245
|
}
|
|
5321
5246
|
function pointFromScalar(d, __compressed) {
|
|
@@ -5328,13 +5253,13 @@ function pointFromScalar(d, __compressed) {
|
|
|
5328
5253
|
const compressed = assumeCompression(__compressed);
|
|
5329
5254
|
return getEncoded(pp, compressed);
|
|
5330
5255
|
}
|
|
5331
|
-
function pointMultiply(
|
|
5332
|
-
if (!isPoint(
|
|
5256
|
+
function pointMultiply(p, tweak, __compressed) {
|
|
5257
|
+
if (!isPoint(p))
|
|
5333
5258
|
throw new TypeError(THROW_BAD_POINT);
|
|
5334
5259
|
if (!isOrderScalar(tweak))
|
|
5335
5260
|
throw new TypeError(THROW_BAD_TWEAK);
|
|
5336
|
-
const compressed = assumeCompression(__compressed,
|
|
5337
|
-
const pp = decodeFrom(
|
|
5261
|
+
const compressed = assumeCompression(__compressed, p);
|
|
5262
|
+
const pp = decodeFrom(p);
|
|
5338
5263
|
const tt = fromBuffer$1(tweak);
|
|
5339
5264
|
const qq = pp.mul(tt);
|
|
5340
5265
|
if (qq.isInfinity())
|
|
@@ -5348,7 +5273,7 @@ function privateAdd(d, tweak) {
|
|
|
5348
5273
|
throw new TypeError(THROW_BAD_TWEAK);
|
|
5349
5274
|
const dd = fromBuffer$1(d);
|
|
5350
5275
|
const tt = fromBuffer$1(tweak);
|
|
5351
|
-
const dt = toBuffer$1(dd.add(tt).umod(n
|
|
5276
|
+
const dt = toBuffer$1(dd.add(tt).umod(n));
|
|
5352
5277
|
if (!isPrivate(dt))
|
|
5353
5278
|
return null;
|
|
5354
5279
|
return dt;
|
|
@@ -5360,7 +5285,7 @@ function privateSub(d, tweak) {
|
|
|
5360
5285
|
throw new TypeError(THROW_BAD_TWEAK);
|
|
5361
5286
|
const dd = fromBuffer$1(d);
|
|
5362
5287
|
const tt = fromBuffer$1(tweak);
|
|
5363
|
-
const dt = toBuffer$1(dd.sub(tt).umod(n
|
|
5288
|
+
const dt = toBuffer$1(dd.sub(tt).umod(n));
|
|
5364
5289
|
if (!isPrivate(dt))
|
|
5365
5290
|
return null;
|
|
5366
5291
|
return dt;
|
|
@@ -5386,17 +5311,17 @@ function __sign(hash2, x, addData) {
|
|
|
5386
5311
|
const Q = G.mul(kI);
|
|
5387
5312
|
if (Q.isInfinity())
|
|
5388
5313
|
return false;
|
|
5389
|
-
r = Q.x.umod(n
|
|
5314
|
+
r = Q.x.umod(n);
|
|
5390
5315
|
if (r.isZero() === 0)
|
|
5391
5316
|
return false;
|
|
5392
|
-
s = kI.invm(n
|
|
5317
|
+
s = kI.invm(n).mul(e.add(d.mul(r))).umod(n);
|
|
5393
5318
|
if (s.isZero() === 0)
|
|
5394
5319
|
return false;
|
|
5395
5320
|
return true;
|
|
5396
5321
|
};
|
|
5397
5322
|
deterministicGenerateK(hash2, x, checkSig, isPrivate, addData);
|
|
5398
5323
|
if (s.cmp(nDiv2) > 0) {
|
|
5399
|
-
s = n
|
|
5324
|
+
s = n.sub(s);
|
|
5400
5325
|
}
|
|
5401
5326
|
const buffer$1 = buffer.Buffer.allocUnsafe(64);
|
|
5402
5327
|
toBuffer$1(r).copy(buffer$1, 0);
|
|
@@ -5421,14 +5346,14 @@ function verify(hash2, q, signature, strict) {
|
|
|
5421
5346
|
if (s.gtn(0) <= 0)
|
|
5422
5347
|
return false;
|
|
5423
5348
|
const e = fromBuffer$1(hash2);
|
|
5424
|
-
const sInv = s.invm(n
|
|
5425
|
-
const u1 = e.mul(sInv).umod(n
|
|
5426
|
-
const u2 = r.mul(sInv).umod(n
|
|
5427
|
-
const
|
|
5428
|
-
if (
|
|
5349
|
+
const sInv = s.invm(n);
|
|
5350
|
+
const u1 = e.mul(sInv).umod(n);
|
|
5351
|
+
const u2 = r.mul(sInv).umod(n);
|
|
5352
|
+
const R = G.mulAdd(u1, Q, u2);
|
|
5353
|
+
if (R.isInfinity())
|
|
5429
5354
|
return false;
|
|
5430
|
-
const xR =
|
|
5431
|
-
const v = xR.umod(n
|
|
5355
|
+
const xR = R.x;
|
|
5356
|
+
const v = xR.umod(n);
|
|
5432
5357
|
return v.eq(r);
|
|
5433
5358
|
}
|
|
5434
5359
|
var js = {
|
|
@@ -6212,12 +6137,12 @@ function fromSeed(seed, network) {
|
|
|
6212
6137
|
return fromPrivateKey$1(IL, IR, network);
|
|
6213
6138
|
}
|
|
6214
6139
|
bip32$1.fromSeed = fromSeed;
|
|
6215
|
-
Object.defineProperty(src
|
|
6140
|
+
Object.defineProperty(src, "__esModule", { value: true });
|
|
6216
6141
|
var bip32_1 = bip32$1;
|
|
6217
|
-
src
|
|
6218
|
-
src
|
|
6219
|
-
src
|
|
6220
|
-
src
|
|
6142
|
+
src.fromSeed = bip32_1.fromSeed;
|
|
6143
|
+
src.fromBase58 = bip32_1.fromBase58;
|
|
6144
|
+
src.fromPublicKey = bip32_1.fromPublicKey;
|
|
6145
|
+
src.fromPrivateKey = bip32_1.fromPrivateKey;
|
|
6221
6146
|
var address$1 = {};
|
|
6222
6147
|
var networks$3 = {};
|
|
6223
6148
|
Object.defineProperty(networks$3, "__esModule", { value: true });
|
|
@@ -7021,7 +6946,7 @@ function value2(f) {
|
|
|
7021
6946
|
}
|
|
7022
6947
|
lazy$7.value = value2;
|
|
7023
6948
|
Object.defineProperty(embed, "__esModule", { value: true });
|
|
7024
|
-
const networks_1$
|
|
6949
|
+
const networks_1$8 = networks$3;
|
|
7025
6950
|
const bscript$o = script$1;
|
|
7026
6951
|
const lazy$6 = lazy$7;
|
|
7027
6952
|
const typef$6 = typeforce_1;
|
|
@@ -7045,14 +6970,14 @@ function p2data(a, opts) {
|
|
|
7045
6970
|
},
|
|
7046
6971
|
a
|
|
7047
6972
|
);
|
|
7048
|
-
const network = a.network || networks_1$
|
|
7049
|
-
const
|
|
7050
|
-
lazy$6.prop(
|
|
6973
|
+
const network = a.network || networks_1$8.bitcoin;
|
|
6974
|
+
const o = { name: "embed", network };
|
|
6975
|
+
lazy$6.prop(o, "output", () => {
|
|
7051
6976
|
if (!a.data)
|
|
7052
6977
|
return;
|
|
7053
6978
|
return bscript$o.compile([OPS$7.OP_RETURN].concat(a.data));
|
|
7054
6979
|
});
|
|
7055
|
-
lazy$6.prop(
|
|
6980
|
+
lazy$6.prop(o, "data", () => {
|
|
7056
6981
|
if (!a.output)
|
|
7057
6982
|
return;
|
|
7058
6983
|
return bscript$o.decompile(a.output).slice(1);
|
|
@@ -7064,16 +6989,16 @@ function p2data(a, opts) {
|
|
|
7064
6989
|
throw new TypeError("Output is invalid");
|
|
7065
6990
|
if (!chunks.slice(1).every(typef$6.Buffer))
|
|
7066
6991
|
throw new TypeError("Output is invalid");
|
|
7067
|
-
if (a.data && !stacksEqual$3(a.data,
|
|
6992
|
+
if (a.data && !stacksEqual$3(a.data, o.data))
|
|
7068
6993
|
throw new TypeError("Data mismatch");
|
|
7069
6994
|
}
|
|
7070
6995
|
}
|
|
7071
|
-
return Object.assign(
|
|
6996
|
+
return Object.assign(o, a);
|
|
7072
6997
|
}
|
|
7073
6998
|
embed.p2data = p2data;
|
|
7074
6999
|
var p2ms$3 = {};
|
|
7075
7000
|
Object.defineProperty(p2ms$3, "__esModule", { value: true });
|
|
7076
|
-
const networks_1$
|
|
7001
|
+
const networks_1$7 = networks$3;
|
|
7077
7002
|
const bscript$n = script$1;
|
|
7078
7003
|
const lazy$5 = lazy$7;
|
|
7079
7004
|
const OPS$6 = bscript$n.OPS;
|
|
@@ -7106,8 +7031,8 @@ function p2ms$2(a, opts) {
|
|
|
7106
7031
|
},
|
|
7107
7032
|
a
|
|
7108
7033
|
);
|
|
7109
|
-
const network = a.network || networks_1$
|
|
7110
|
-
const
|
|
7034
|
+
const network = a.network || networks_1$7.bitcoin;
|
|
7035
|
+
const o = { network };
|
|
7111
7036
|
let chunks = [];
|
|
7112
7037
|
let decoded = false;
|
|
7113
7038
|
function decode2(output2) {
|
|
@@ -7115,14 +7040,14 @@ function p2ms$2(a, opts) {
|
|
|
7115
7040
|
return;
|
|
7116
7041
|
decoded = true;
|
|
7117
7042
|
chunks = bscript$n.decompile(output2);
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
|
|
7043
|
+
o.m = chunks[0] - OP_INT_BASE$1;
|
|
7044
|
+
o.n = chunks[chunks.length - 2] - OP_INT_BASE$1;
|
|
7045
|
+
o.pubkeys = chunks.slice(1, -2);
|
|
7121
7046
|
}
|
|
7122
|
-
lazy$5.prop(
|
|
7047
|
+
lazy$5.prop(o, "output", () => {
|
|
7123
7048
|
if (!a.m)
|
|
7124
7049
|
return;
|
|
7125
|
-
if (!
|
|
7050
|
+
if (!o.n)
|
|
7126
7051
|
return;
|
|
7127
7052
|
if (!a.pubkeys)
|
|
7128
7053
|
return;
|
|
@@ -7130,47 +7055,47 @@ function p2ms$2(a, opts) {
|
|
|
7130
7055
|
[].concat(
|
|
7131
7056
|
OP_INT_BASE$1 + a.m,
|
|
7132
7057
|
a.pubkeys,
|
|
7133
|
-
OP_INT_BASE$1 +
|
|
7058
|
+
OP_INT_BASE$1 + o.n,
|
|
7134
7059
|
OPS$6.OP_CHECKMULTISIG
|
|
7135
7060
|
)
|
|
7136
7061
|
);
|
|
7137
7062
|
});
|
|
7138
|
-
lazy$5.prop(
|
|
7139
|
-
if (!
|
|
7063
|
+
lazy$5.prop(o, "m", () => {
|
|
7064
|
+
if (!o.output)
|
|
7140
7065
|
return;
|
|
7141
|
-
decode2(
|
|
7142
|
-
return
|
|
7066
|
+
decode2(o.output);
|
|
7067
|
+
return o.m;
|
|
7143
7068
|
});
|
|
7144
|
-
lazy$5.prop(
|
|
7145
|
-
if (!
|
|
7069
|
+
lazy$5.prop(o, "n", () => {
|
|
7070
|
+
if (!o.pubkeys)
|
|
7146
7071
|
return;
|
|
7147
|
-
return
|
|
7072
|
+
return o.pubkeys.length;
|
|
7148
7073
|
});
|
|
7149
|
-
lazy$5.prop(
|
|
7074
|
+
lazy$5.prop(o, "pubkeys", () => {
|
|
7150
7075
|
if (!a.output)
|
|
7151
7076
|
return;
|
|
7152
7077
|
decode2(a.output);
|
|
7153
|
-
return
|
|
7078
|
+
return o.pubkeys;
|
|
7154
7079
|
});
|
|
7155
|
-
lazy$5.prop(
|
|
7080
|
+
lazy$5.prop(o, "signatures", () => {
|
|
7156
7081
|
if (!a.input)
|
|
7157
7082
|
return;
|
|
7158
7083
|
return bscript$n.decompile(a.input).slice(1);
|
|
7159
7084
|
});
|
|
7160
|
-
lazy$5.prop(
|
|
7085
|
+
lazy$5.prop(o, "input", () => {
|
|
7161
7086
|
if (!a.signatures)
|
|
7162
7087
|
return;
|
|
7163
7088
|
return bscript$n.compile([OPS$6.OP_0].concat(a.signatures));
|
|
7164
7089
|
});
|
|
7165
|
-
lazy$5.prop(
|
|
7166
|
-
if (!
|
|
7090
|
+
lazy$5.prop(o, "witness", () => {
|
|
7091
|
+
if (!o.input)
|
|
7167
7092
|
return;
|
|
7168
7093
|
return [];
|
|
7169
7094
|
});
|
|
7170
|
-
lazy$5.prop(
|
|
7171
|
-
if (!
|
|
7095
|
+
lazy$5.prop(o, "name", () => {
|
|
7096
|
+
if (!o.m || !o.n)
|
|
7172
7097
|
return;
|
|
7173
|
-
return `p2ms(${
|
|
7098
|
+
return `p2ms(${o.m} of ${o.n})`;
|
|
7174
7099
|
});
|
|
7175
7100
|
if (opts.validate) {
|
|
7176
7101
|
if (a.output) {
|
|
@@ -7181,47 +7106,47 @@ function p2ms$2(a, opts) {
|
|
|
7181
7106
|
throw new TypeError("Output is invalid");
|
|
7182
7107
|
if (chunks[chunks.length - 1] !== OPS$6.OP_CHECKMULTISIG)
|
|
7183
7108
|
throw new TypeError("Output is invalid");
|
|
7184
|
-
if (
|
|
7109
|
+
if (o.m <= 0 || o.n > 16 || o.m > o.n || o.n !== chunks.length - 3)
|
|
7185
7110
|
throw new TypeError("Output is invalid");
|
|
7186
|
-
if (!
|
|
7111
|
+
if (!o.pubkeys.every((x) => ecc$5.isPoint(x)))
|
|
7187
7112
|
throw new TypeError("Output is invalid");
|
|
7188
|
-
if (a.m !== void 0 && a.m !==
|
|
7113
|
+
if (a.m !== void 0 && a.m !== o.m)
|
|
7189
7114
|
throw new TypeError("m mismatch");
|
|
7190
|
-
if (a.n !== void 0 && a.n !==
|
|
7115
|
+
if (a.n !== void 0 && a.n !== o.n)
|
|
7191
7116
|
throw new TypeError("n mismatch");
|
|
7192
|
-
if (a.pubkeys && !stacksEqual$2(a.pubkeys,
|
|
7117
|
+
if (a.pubkeys && !stacksEqual$2(a.pubkeys, o.pubkeys))
|
|
7193
7118
|
throw new TypeError("Pubkeys mismatch");
|
|
7194
7119
|
}
|
|
7195
7120
|
if (a.pubkeys) {
|
|
7196
7121
|
if (a.n !== void 0 && a.n !== a.pubkeys.length)
|
|
7197
7122
|
throw new TypeError("Pubkey count mismatch");
|
|
7198
|
-
|
|
7199
|
-
if (
|
|
7123
|
+
o.n = a.pubkeys.length;
|
|
7124
|
+
if (o.n < o.m)
|
|
7200
7125
|
throw new TypeError("Pubkey count cannot be less than m");
|
|
7201
7126
|
}
|
|
7202
7127
|
if (a.signatures) {
|
|
7203
|
-
if (a.signatures.length <
|
|
7128
|
+
if (a.signatures.length < o.m)
|
|
7204
7129
|
throw new TypeError("Not enough signatures provided");
|
|
7205
|
-
if (a.signatures.length >
|
|
7130
|
+
if (a.signatures.length > o.m)
|
|
7206
7131
|
throw new TypeError("Too many signatures provided");
|
|
7207
7132
|
}
|
|
7208
7133
|
if (a.input) {
|
|
7209
7134
|
if (a.input[0] !== OPS$6.OP_0)
|
|
7210
7135
|
throw new TypeError("Input is invalid");
|
|
7211
|
-
if (
|
|
7136
|
+
if (o.signatures.length === 0 || !o.signatures.every(isAcceptableSignature))
|
|
7212
7137
|
throw new TypeError("Input has invalid signature(s)");
|
|
7213
|
-
if (a.signatures && !stacksEqual$2(a.signatures,
|
|
7138
|
+
if (a.signatures && !stacksEqual$2(a.signatures, o.signatures))
|
|
7214
7139
|
throw new TypeError("Signature mismatch");
|
|
7215
7140
|
if (a.m !== void 0 && a.m !== a.signatures.length)
|
|
7216
7141
|
throw new TypeError("Signature count mismatch");
|
|
7217
7142
|
}
|
|
7218
7143
|
}
|
|
7219
|
-
return Object.assign(
|
|
7144
|
+
return Object.assign(o, a);
|
|
7220
7145
|
}
|
|
7221
7146
|
p2ms$3.p2ms = p2ms$2;
|
|
7222
7147
|
var p2pk$3 = {};
|
|
7223
7148
|
Object.defineProperty(p2pk$3, "__esModule", { value: true });
|
|
7224
|
-
const networks_1$
|
|
7149
|
+
const networks_1$6 = networks$3;
|
|
7225
7150
|
const bscript$m = script$1;
|
|
7226
7151
|
const lazy$4 = lazy$7;
|
|
7227
7152
|
const typef$4 = typeforce_1;
|
|
@@ -7244,30 +7169,30 @@ function p2pk$2(a, opts) {
|
|
|
7244
7169
|
const _chunks = lazy$4.value(() => {
|
|
7245
7170
|
return bscript$m.decompile(a.input);
|
|
7246
7171
|
});
|
|
7247
|
-
const network = a.network || networks_1$
|
|
7248
|
-
const
|
|
7249
|
-
lazy$4.prop(
|
|
7172
|
+
const network = a.network || networks_1$6.bitcoin;
|
|
7173
|
+
const o = { name: "p2pk", network };
|
|
7174
|
+
lazy$4.prop(o, "output", () => {
|
|
7250
7175
|
if (!a.pubkey)
|
|
7251
7176
|
return;
|
|
7252
7177
|
return bscript$m.compile([a.pubkey, OPS$5.OP_CHECKSIG]);
|
|
7253
7178
|
});
|
|
7254
|
-
lazy$4.prop(
|
|
7179
|
+
lazy$4.prop(o, "pubkey", () => {
|
|
7255
7180
|
if (!a.output)
|
|
7256
7181
|
return;
|
|
7257
7182
|
return a.output.slice(1, -1);
|
|
7258
7183
|
});
|
|
7259
|
-
lazy$4.prop(
|
|
7184
|
+
lazy$4.prop(o, "signature", () => {
|
|
7260
7185
|
if (!a.input)
|
|
7261
7186
|
return;
|
|
7262
7187
|
return _chunks()[0];
|
|
7263
7188
|
});
|
|
7264
|
-
lazy$4.prop(
|
|
7189
|
+
lazy$4.prop(o, "input", () => {
|
|
7265
7190
|
if (!a.signature)
|
|
7266
7191
|
return;
|
|
7267
7192
|
return bscript$m.compile([a.signature]);
|
|
7268
7193
|
});
|
|
7269
|
-
lazy$4.prop(
|
|
7270
|
-
if (!
|
|
7194
|
+
lazy$4.prop(o, "witness", () => {
|
|
7195
|
+
if (!o.input)
|
|
7271
7196
|
return;
|
|
7272
7197
|
return [];
|
|
7273
7198
|
});
|
|
@@ -7275,23 +7200,23 @@ function p2pk$2(a, opts) {
|
|
|
7275
7200
|
if (a.output) {
|
|
7276
7201
|
if (a.output[a.output.length - 1] !== OPS$5.OP_CHECKSIG)
|
|
7277
7202
|
throw new TypeError("Output is invalid");
|
|
7278
|
-
if (!ecc$4.isPoint(
|
|
7203
|
+
if (!ecc$4.isPoint(o.pubkey))
|
|
7279
7204
|
throw new TypeError("Output pubkey is invalid");
|
|
7280
|
-
if (a.pubkey && !a.pubkey.equals(
|
|
7205
|
+
if (a.pubkey && !a.pubkey.equals(o.pubkey))
|
|
7281
7206
|
throw new TypeError("Pubkey mismatch");
|
|
7282
7207
|
}
|
|
7283
7208
|
if (a.signature) {
|
|
7284
|
-
if (a.input && !a.input.equals(
|
|
7209
|
+
if (a.input && !a.input.equals(o.input))
|
|
7285
7210
|
throw new TypeError("Signature mismatch");
|
|
7286
7211
|
}
|
|
7287
7212
|
if (a.input) {
|
|
7288
7213
|
if (_chunks().length !== 1)
|
|
7289
7214
|
throw new TypeError("Input is invalid");
|
|
7290
|
-
if (!bscript$m.isCanonicalScriptSignature(
|
|
7215
|
+
if (!bscript$m.isCanonicalScriptSignature(o.signature))
|
|
7291
7216
|
throw new TypeError("Input has invalid signature");
|
|
7292
7217
|
}
|
|
7293
7218
|
}
|
|
7294
|
-
return Object.assign(
|
|
7219
|
+
return Object.assign(o, a);
|
|
7295
7220
|
}
|
|
7296
7221
|
p2pk$3.p2pk = p2pk$2;
|
|
7297
7222
|
var p2pkh$3 = {};
|
|
@@ -7324,7 +7249,7 @@ function hash256(buffer2) {
|
|
|
7324
7249
|
crypto$2.hash256 = hash256;
|
|
7325
7250
|
Object.defineProperty(p2pkh$3, "__esModule", { value: true });
|
|
7326
7251
|
const bcrypto$6 = crypto$2;
|
|
7327
|
-
const networks_1$
|
|
7252
|
+
const networks_1$5 = networks$3;
|
|
7328
7253
|
const bscript$l = script$1;
|
|
7329
7254
|
const lazy$3 = lazy$7;
|
|
7330
7255
|
const typef$3 = typeforce_1;
|
|
@@ -7356,54 +7281,54 @@ function p2pkh$2(a, opts) {
|
|
|
7356
7281
|
const _chunks = lazy$3.value(() => {
|
|
7357
7282
|
return bscript$l.decompile(a.input);
|
|
7358
7283
|
});
|
|
7359
|
-
const network = a.network || networks_1$
|
|
7360
|
-
const
|
|
7361
|
-
lazy$3.prop(
|
|
7362
|
-
if (!
|
|
7284
|
+
const network = a.network || networks_1$5.bitcoin;
|
|
7285
|
+
const o = { name: "p2pkh", network };
|
|
7286
|
+
lazy$3.prop(o, "address", () => {
|
|
7287
|
+
if (!o.hash)
|
|
7363
7288
|
return;
|
|
7364
7289
|
const payload = buffer.Buffer.allocUnsafe(21);
|
|
7365
7290
|
payload.writeUInt8(network.pubKeyHash, 0);
|
|
7366
|
-
|
|
7291
|
+
o.hash.copy(payload, 1);
|
|
7367
7292
|
return bs58check$2.encode(payload);
|
|
7368
7293
|
});
|
|
7369
|
-
lazy$3.prop(
|
|
7294
|
+
lazy$3.prop(o, "hash", () => {
|
|
7370
7295
|
if (a.output)
|
|
7371
7296
|
return a.output.slice(3, 23);
|
|
7372
7297
|
if (a.address)
|
|
7373
7298
|
return _address().hash;
|
|
7374
|
-
if (a.pubkey ||
|
|
7375
|
-
return bcrypto$6.hash160(a.pubkey ||
|
|
7299
|
+
if (a.pubkey || o.pubkey)
|
|
7300
|
+
return bcrypto$6.hash160(a.pubkey || o.pubkey);
|
|
7376
7301
|
});
|
|
7377
|
-
lazy$3.prop(
|
|
7378
|
-
if (!
|
|
7302
|
+
lazy$3.prop(o, "output", () => {
|
|
7303
|
+
if (!o.hash)
|
|
7379
7304
|
return;
|
|
7380
7305
|
return bscript$l.compile([
|
|
7381
7306
|
OPS$4.OP_DUP,
|
|
7382
7307
|
OPS$4.OP_HASH160,
|
|
7383
|
-
|
|
7308
|
+
o.hash,
|
|
7384
7309
|
OPS$4.OP_EQUALVERIFY,
|
|
7385
7310
|
OPS$4.OP_CHECKSIG
|
|
7386
7311
|
]);
|
|
7387
7312
|
});
|
|
7388
|
-
lazy$3.prop(
|
|
7313
|
+
lazy$3.prop(o, "pubkey", () => {
|
|
7389
7314
|
if (!a.input)
|
|
7390
7315
|
return;
|
|
7391
7316
|
return _chunks()[1];
|
|
7392
7317
|
});
|
|
7393
|
-
lazy$3.prop(
|
|
7318
|
+
lazy$3.prop(o, "signature", () => {
|
|
7394
7319
|
if (!a.input)
|
|
7395
7320
|
return;
|
|
7396
7321
|
return _chunks()[0];
|
|
7397
7322
|
});
|
|
7398
|
-
lazy$3.prop(
|
|
7323
|
+
lazy$3.prop(o, "input", () => {
|
|
7399
7324
|
if (!a.pubkey)
|
|
7400
7325
|
return;
|
|
7401
7326
|
if (!a.signature)
|
|
7402
7327
|
return;
|
|
7403
7328
|
return bscript$l.compile([a.signature, a.pubkey]);
|
|
7404
7329
|
});
|
|
7405
|
-
lazy$3.prop(
|
|
7406
|
-
if (!
|
|
7330
|
+
lazy$3.prop(o, "witness", () => {
|
|
7331
|
+
if (!o.input)
|
|
7407
7332
|
return;
|
|
7408
7333
|
return [];
|
|
7409
7334
|
});
|
|
@@ -7455,13 +7380,13 @@ function p2pkh$2(a, opts) {
|
|
|
7455
7380
|
throw new TypeError("Hash mismatch");
|
|
7456
7381
|
}
|
|
7457
7382
|
}
|
|
7458
|
-
return Object.assign(
|
|
7383
|
+
return Object.assign(o, a);
|
|
7459
7384
|
}
|
|
7460
7385
|
p2pkh$3.p2pkh = p2pkh$2;
|
|
7461
7386
|
var p2sh$1 = {};
|
|
7462
7387
|
Object.defineProperty(p2sh$1, "__esModule", { value: true });
|
|
7463
7388
|
const bcrypto$5 = crypto$2;
|
|
7464
|
-
const networks_1$
|
|
7389
|
+
const networks_1$4 = networks$3;
|
|
7465
7390
|
const bscript$k = script$1;
|
|
7466
7391
|
const lazy$2 = lazy$7;
|
|
7467
7392
|
const typef$2 = typeforce_1;
|
|
@@ -7497,9 +7422,9 @@ function p2sh(a, opts) {
|
|
|
7497
7422
|
);
|
|
7498
7423
|
let network = a.network;
|
|
7499
7424
|
if (!network) {
|
|
7500
|
-
network = a.redeem && a.redeem.network || networks_1$
|
|
7425
|
+
network = a.redeem && a.redeem.network || networks_1$4.bitcoin;
|
|
7501
7426
|
}
|
|
7502
|
-
const
|
|
7427
|
+
const o = { network };
|
|
7503
7428
|
const _address = lazy$2.value(() => {
|
|
7504
7429
|
const payload = bs58check$1.decode(a.address);
|
|
7505
7430
|
const version = payload.readUInt8(0);
|
|
@@ -7518,49 +7443,49 @@ function p2sh(a, opts) {
|
|
|
7518
7443
|
witness: a.witness || []
|
|
7519
7444
|
};
|
|
7520
7445
|
});
|
|
7521
|
-
lazy$2.prop(
|
|
7522
|
-
if (!
|
|
7446
|
+
lazy$2.prop(o, "address", () => {
|
|
7447
|
+
if (!o.hash)
|
|
7523
7448
|
return;
|
|
7524
7449
|
const payload = buffer.Buffer.allocUnsafe(21);
|
|
7525
|
-
payload.writeUInt8(
|
|
7526
|
-
|
|
7450
|
+
payload.writeUInt8(o.network.scriptHash, 0);
|
|
7451
|
+
o.hash.copy(payload, 1);
|
|
7527
7452
|
return bs58check$1.encode(payload);
|
|
7528
7453
|
});
|
|
7529
|
-
lazy$2.prop(
|
|
7454
|
+
lazy$2.prop(o, "hash", () => {
|
|
7530
7455
|
if (a.output)
|
|
7531
7456
|
return a.output.slice(2, 22);
|
|
7532
7457
|
if (a.address)
|
|
7533
7458
|
return _address().hash;
|
|
7534
|
-
if (
|
|
7535
|
-
return bcrypto$5.hash160(
|
|
7459
|
+
if (o.redeem && o.redeem.output)
|
|
7460
|
+
return bcrypto$5.hash160(o.redeem.output);
|
|
7536
7461
|
});
|
|
7537
|
-
lazy$2.prop(
|
|
7538
|
-
if (!
|
|
7462
|
+
lazy$2.prop(o, "output", () => {
|
|
7463
|
+
if (!o.hash)
|
|
7539
7464
|
return;
|
|
7540
|
-
return bscript$k.compile([OPS$3.OP_HASH160,
|
|
7465
|
+
return bscript$k.compile([OPS$3.OP_HASH160, o.hash, OPS$3.OP_EQUAL]);
|
|
7541
7466
|
});
|
|
7542
|
-
lazy$2.prop(
|
|
7467
|
+
lazy$2.prop(o, "redeem", () => {
|
|
7543
7468
|
if (!a.input)
|
|
7544
7469
|
return;
|
|
7545
7470
|
return _redeem();
|
|
7546
7471
|
});
|
|
7547
|
-
lazy$2.prop(
|
|
7472
|
+
lazy$2.prop(o, "input", () => {
|
|
7548
7473
|
if (!a.redeem || !a.redeem.input || !a.redeem.output)
|
|
7549
7474
|
return;
|
|
7550
7475
|
return bscript$k.compile(
|
|
7551
7476
|
[].concat(bscript$k.decompile(a.redeem.input), a.redeem.output)
|
|
7552
7477
|
);
|
|
7553
7478
|
});
|
|
7554
|
-
lazy$2.prop(
|
|
7555
|
-
if (
|
|
7556
|
-
return
|
|
7557
|
-
if (
|
|
7479
|
+
lazy$2.prop(o, "witness", () => {
|
|
7480
|
+
if (o.redeem && o.redeem.witness)
|
|
7481
|
+
return o.redeem.witness;
|
|
7482
|
+
if (o.input)
|
|
7558
7483
|
return [];
|
|
7559
7484
|
});
|
|
7560
|
-
lazy$2.prop(
|
|
7485
|
+
lazy$2.prop(o, "name", () => {
|
|
7561
7486
|
const nameParts = ["p2sh"];
|
|
7562
|
-
if (
|
|
7563
|
-
nameParts.push(
|
|
7487
|
+
if (o.redeem !== void 0)
|
|
7488
|
+
nameParts.push(o.redeem.name);
|
|
7564
7489
|
return nameParts.join("-");
|
|
7565
7490
|
});
|
|
7566
7491
|
if (opts.validate) {
|
|
@@ -7637,13 +7562,13 @@ function p2sh(a, opts) {
|
|
|
7637
7562
|
throw new TypeError("Witness and redeem.witness mismatch");
|
|
7638
7563
|
}
|
|
7639
7564
|
}
|
|
7640
|
-
return Object.assign(
|
|
7565
|
+
return Object.assign(o, a);
|
|
7641
7566
|
}
|
|
7642
7567
|
p2sh$1.p2sh = p2sh;
|
|
7643
7568
|
var p2wpkh$1 = {};
|
|
7644
7569
|
Object.defineProperty(p2wpkh$1, "__esModule", { value: true });
|
|
7645
7570
|
const bcrypto$4 = crypto$2;
|
|
7646
|
-
const networks_1$
|
|
7571
|
+
const networks_1$3 = networks$3;
|
|
7647
7572
|
const bscript$j = script$1;
|
|
7648
7573
|
const lazy$1 = lazy$7;
|
|
7649
7574
|
const typef$1 = typeforce_1;
|
|
@@ -7678,46 +7603,46 @@ function p2wpkh(a, opts) {
|
|
|
7678
7603
|
data: buffer.Buffer.from(data)
|
|
7679
7604
|
};
|
|
7680
7605
|
});
|
|
7681
|
-
const network = a.network || networks_1$
|
|
7682
|
-
const
|
|
7683
|
-
lazy$1.prop(
|
|
7684
|
-
if (!
|
|
7606
|
+
const network = a.network || networks_1$3.bitcoin;
|
|
7607
|
+
const o = { name: "p2wpkh", network };
|
|
7608
|
+
lazy$1.prop(o, "address", () => {
|
|
7609
|
+
if (!o.hash)
|
|
7685
7610
|
return;
|
|
7686
|
-
const words = bech32$2.toWords(
|
|
7611
|
+
const words = bech32$2.toWords(o.hash);
|
|
7687
7612
|
words.unshift(0);
|
|
7688
7613
|
return bech32$2.encode(network.bech32, words);
|
|
7689
7614
|
});
|
|
7690
|
-
lazy$1.prop(
|
|
7615
|
+
lazy$1.prop(o, "hash", () => {
|
|
7691
7616
|
if (a.output)
|
|
7692
7617
|
return a.output.slice(2, 22);
|
|
7693
7618
|
if (a.address)
|
|
7694
7619
|
return _address().data;
|
|
7695
|
-
if (a.pubkey ||
|
|
7696
|
-
return bcrypto$4.hash160(a.pubkey ||
|
|
7620
|
+
if (a.pubkey || o.pubkey)
|
|
7621
|
+
return bcrypto$4.hash160(a.pubkey || o.pubkey);
|
|
7697
7622
|
});
|
|
7698
|
-
lazy$1.prop(
|
|
7699
|
-
if (!
|
|
7623
|
+
lazy$1.prop(o, "output", () => {
|
|
7624
|
+
if (!o.hash)
|
|
7700
7625
|
return;
|
|
7701
|
-
return bscript$j.compile([OPS$2.OP_0,
|
|
7626
|
+
return bscript$j.compile([OPS$2.OP_0, o.hash]);
|
|
7702
7627
|
});
|
|
7703
|
-
lazy$1.prop(
|
|
7628
|
+
lazy$1.prop(o, "pubkey", () => {
|
|
7704
7629
|
if (a.pubkey)
|
|
7705
7630
|
return a.pubkey;
|
|
7706
7631
|
if (!a.witness)
|
|
7707
7632
|
return;
|
|
7708
7633
|
return a.witness[1];
|
|
7709
7634
|
});
|
|
7710
|
-
lazy$1.prop(
|
|
7635
|
+
lazy$1.prop(o, "signature", () => {
|
|
7711
7636
|
if (!a.witness)
|
|
7712
7637
|
return;
|
|
7713
7638
|
return a.witness[0];
|
|
7714
7639
|
});
|
|
7715
|
-
lazy$1.prop(
|
|
7716
|
-
if (!
|
|
7640
|
+
lazy$1.prop(o, "input", () => {
|
|
7641
|
+
if (!o.witness)
|
|
7717
7642
|
return;
|
|
7718
7643
|
return EMPTY_BUFFER$1;
|
|
7719
7644
|
});
|
|
7720
|
-
lazy$1.prop(
|
|
7645
|
+
lazy$1.prop(o, "witness", () => {
|
|
7721
7646
|
if (!a.pubkey)
|
|
7722
7647
|
return;
|
|
7723
7648
|
if (!a.signature)
|
|
@@ -7774,13 +7699,13 @@ function p2wpkh(a, opts) {
|
|
|
7774
7699
|
throw new TypeError("Hash mismatch");
|
|
7775
7700
|
}
|
|
7776
7701
|
}
|
|
7777
|
-
return Object.assign(
|
|
7702
|
+
return Object.assign(o, a);
|
|
7778
7703
|
}
|
|
7779
7704
|
p2wpkh$1.p2wpkh = p2wpkh;
|
|
7780
7705
|
var p2wsh$1 = {};
|
|
7781
7706
|
Object.defineProperty(p2wsh$1, "__esModule", { value: true });
|
|
7782
7707
|
const bcrypto$3 = crypto$2;
|
|
7783
|
-
const networks_1$
|
|
7708
|
+
const networks_1$2 = networks$3;
|
|
7784
7709
|
const bscript$i = script$1;
|
|
7785
7710
|
const lazy = lazy$7;
|
|
7786
7711
|
const typef = typeforce_1;
|
|
@@ -7838,30 +7763,30 @@ function p2wsh(a, opts) {
|
|
|
7838
7763
|
});
|
|
7839
7764
|
let network = a.network;
|
|
7840
7765
|
if (!network) {
|
|
7841
|
-
network = a.redeem && a.redeem.network || networks_1$
|
|
7766
|
+
network = a.redeem && a.redeem.network || networks_1$2.bitcoin;
|
|
7842
7767
|
}
|
|
7843
|
-
const
|
|
7844
|
-
lazy.prop(
|
|
7845
|
-
if (!
|
|
7768
|
+
const o = { network };
|
|
7769
|
+
lazy.prop(o, "address", () => {
|
|
7770
|
+
if (!o.hash)
|
|
7846
7771
|
return;
|
|
7847
|
-
const words = bech32$1.toWords(
|
|
7772
|
+
const words = bech32$1.toWords(o.hash);
|
|
7848
7773
|
words.unshift(0);
|
|
7849
7774
|
return bech32$1.encode(network.bech32, words);
|
|
7850
7775
|
});
|
|
7851
|
-
lazy.prop(
|
|
7776
|
+
lazy.prop(o, "hash", () => {
|
|
7852
7777
|
if (a.output)
|
|
7853
7778
|
return a.output.slice(2);
|
|
7854
7779
|
if (a.address)
|
|
7855
7780
|
return _address().data;
|
|
7856
|
-
if (
|
|
7857
|
-
return bcrypto$3.sha256(
|
|
7781
|
+
if (o.redeem && o.redeem.output)
|
|
7782
|
+
return bcrypto$3.sha256(o.redeem.output);
|
|
7858
7783
|
});
|
|
7859
|
-
lazy.prop(
|
|
7860
|
-
if (!
|
|
7784
|
+
lazy.prop(o, "output", () => {
|
|
7785
|
+
if (!o.hash)
|
|
7861
7786
|
return;
|
|
7862
|
-
return bscript$i.compile([OPS$1.OP_0,
|
|
7787
|
+
return bscript$i.compile([OPS$1.OP_0, o.hash]);
|
|
7863
7788
|
});
|
|
7864
|
-
lazy.prop(
|
|
7789
|
+
lazy.prop(o, "redeem", () => {
|
|
7865
7790
|
if (!a.witness)
|
|
7866
7791
|
return;
|
|
7867
7792
|
return {
|
|
@@ -7870,16 +7795,16 @@ function p2wsh(a, opts) {
|
|
|
7870
7795
|
witness: a.witness.slice(0, -1)
|
|
7871
7796
|
};
|
|
7872
7797
|
});
|
|
7873
|
-
lazy.prop(
|
|
7874
|
-
if (!
|
|
7798
|
+
lazy.prop(o, "input", () => {
|
|
7799
|
+
if (!o.witness)
|
|
7875
7800
|
return;
|
|
7876
7801
|
return EMPTY_BUFFER;
|
|
7877
7802
|
});
|
|
7878
|
-
lazy.prop(
|
|
7803
|
+
lazy.prop(o, "witness", () => {
|
|
7879
7804
|
if (a.redeem && a.redeem.input && a.redeem.input.length > 0 && a.redeem.output && a.redeem.output.length > 0) {
|
|
7880
7805
|
const stack = bscript$i.toStack(_rchunks());
|
|
7881
|
-
|
|
7882
|
-
|
|
7806
|
+
o.redeem = Object.assign({ witness: stack }, a.redeem);
|
|
7807
|
+
o.redeem.input = EMPTY_BUFFER;
|
|
7883
7808
|
return [].concat(stack, a.redeem.output);
|
|
7884
7809
|
}
|
|
7885
7810
|
if (!a.redeem)
|
|
@@ -7890,10 +7815,10 @@ function p2wsh(a, opts) {
|
|
|
7890
7815
|
return;
|
|
7891
7816
|
return [].concat(a.redeem.witness, a.redeem.output);
|
|
7892
7817
|
});
|
|
7893
|
-
lazy.prop(
|
|
7818
|
+
lazy.prop(o, "name", () => {
|
|
7894
7819
|
const nameParts = ["p2wsh"];
|
|
7895
|
-
if (
|
|
7896
|
-
nameParts.push(
|
|
7820
|
+
if (o.redeem !== void 0)
|
|
7821
|
+
nameParts.push(o.redeem.name);
|
|
7897
7822
|
return nameParts.join("-");
|
|
7898
7823
|
});
|
|
7899
7824
|
if (opts.validate) {
|
|
@@ -7956,7 +7881,7 @@ function p2wsh(a, opts) {
|
|
|
7956
7881
|
throw new TypeError("Witness contains uncompressed pubkey");
|
|
7957
7882
|
}
|
|
7958
7883
|
}
|
|
7959
|
-
return Object.assign(
|
|
7884
|
+
return Object.assign(o, a);
|
|
7960
7885
|
}
|
|
7961
7886
|
p2wsh$1.p2wsh = p2wsh;
|
|
7962
7887
|
Object.defineProperty(payments$4, "__esModule", { value: true });
|
|
@@ -8452,7 +8377,7 @@ const BLANK_OUTPUT = {
|
|
|
8452
8377
|
function isOutput(out) {
|
|
8453
8378
|
return out.value !== void 0;
|
|
8454
8379
|
}
|
|
8455
|
-
class Transaction {
|
|
8380
|
+
let Transaction$1 = class Transaction {
|
|
8456
8381
|
constructor() {
|
|
8457
8382
|
this.version = 1;
|
|
8458
8383
|
this.locktime = 0;
|
|
@@ -8771,15 +8696,15 @@ class Transaction {
|
|
|
8771
8696
|
return buffer$1.slice(initialOffset, bufferWriter.offset);
|
|
8772
8697
|
return buffer$1;
|
|
8773
8698
|
}
|
|
8774
|
-
}
|
|
8775
|
-
Transaction.DEFAULT_SEQUENCE = 4294967295;
|
|
8776
|
-
Transaction.SIGHASH_ALL = 1;
|
|
8777
|
-
Transaction.SIGHASH_NONE = 2;
|
|
8778
|
-
Transaction.SIGHASH_SINGLE = 3;
|
|
8779
|
-
Transaction.SIGHASH_ANYONECANPAY = 128;
|
|
8780
|
-
Transaction.ADVANCED_TRANSACTION_MARKER = 0;
|
|
8781
|
-
Transaction.ADVANCED_TRANSACTION_FLAG = 1;
|
|
8782
|
-
transaction.Transaction = Transaction;
|
|
8699
|
+
};
|
|
8700
|
+
Transaction$1.DEFAULT_SEQUENCE = 4294967295;
|
|
8701
|
+
Transaction$1.SIGHASH_ALL = 1;
|
|
8702
|
+
Transaction$1.SIGHASH_NONE = 2;
|
|
8703
|
+
Transaction$1.SIGHASH_SINGLE = 3;
|
|
8704
|
+
Transaction$1.SIGHASH_ANYONECANPAY = 128;
|
|
8705
|
+
Transaction$1.ADVANCED_TRANSACTION_MARKER = 0;
|
|
8706
|
+
Transaction$1.ADVANCED_TRANSACTION_FLAG = 1;
|
|
8707
|
+
transaction.Transaction = Transaction$1;
|
|
8783
8708
|
var fastRoot = function fastRoot2(values, digestFn) {
|
|
8784
8709
|
if (!Array.isArray(values))
|
|
8785
8710
|
throw TypeError("Expected values Array");
|
|
@@ -9115,8 +9040,8 @@ globalXpub$1.expected = "{ masterFingerprint: Buffer; extendedPubkey: Buffer; pa
|
|
|
9115
9040
|
function check$q(data) {
|
|
9116
9041
|
const epk = data.extendedPubkey;
|
|
9117
9042
|
const mfp = data.masterFingerprint;
|
|
9118
|
-
const
|
|
9119
|
-
return buffer.Buffer.isBuffer(epk) && epk.length === 78 && [2, 3].indexOf(epk[45]) > -1 && buffer.Buffer.isBuffer(mfp) && mfp.length === 4 && typeof
|
|
9043
|
+
const p = data.path;
|
|
9044
|
+
return buffer.Buffer.isBuffer(epk) && epk.length === 78 && [2, 3].indexOf(epk[45]) > -1 && buffer.Buffer.isBuffer(mfp) && mfp.length === 4 && typeof p === "string" && !!p.match(/^m(\/\d+'?)*$/);
|
|
9120
9045
|
}
|
|
9121
9046
|
globalXpub$1.check = check$q;
|
|
9122
9047
|
function canAddToArray$3(array, item, dupeSet) {
|
|
@@ -10487,15 +10412,15 @@ function psbtToKeyVals({ globalMap, inputs: inputs2, outputs: outputs2 }) {
|
|
|
10487
10412
|
return {
|
|
10488
10413
|
globalKeyVals: keyValsFromMap(globalMap, convert.globals),
|
|
10489
10414
|
inputKeyVals: inputs2.map((i) => keyValsFromMap(i, convert.inputs)),
|
|
10490
|
-
outputKeyVals: outputs2.map((
|
|
10415
|
+
outputKeyVals: outputs2.map((o) => keyValsFromMap(o, convert.outputs))
|
|
10491
10416
|
};
|
|
10492
10417
|
}
|
|
10493
10418
|
toBuffer.psbtToKeyVals = psbtToKeyVals;
|
|
10494
10419
|
(function(exports2) {
|
|
10495
|
-
function __export(
|
|
10496
|
-
for (var
|
|
10497
|
-
if (!exports2.hasOwnProperty(
|
|
10498
|
-
exports2[
|
|
10420
|
+
function __export(m) {
|
|
10421
|
+
for (var p in m)
|
|
10422
|
+
if (!exports2.hasOwnProperty(p))
|
|
10423
|
+
exports2[p] = m[p];
|
|
10499
10424
|
}
|
|
10500
10425
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
10501
10426
|
__export(fromBuffer);
|
|
@@ -10863,9 +10788,9 @@ const varuint = varint;
|
|
|
10863
10788
|
const utils_1 = utils;
|
|
10864
10789
|
const address_1 = address$1;
|
|
10865
10790
|
const bufferutils_1$1 = bufferutils;
|
|
10866
|
-
const crypto_1 = crypto$2;
|
|
10791
|
+
const crypto_1$1 = crypto$2;
|
|
10867
10792
|
const ecpair_1 = ecpair;
|
|
10868
|
-
const networks_1 = networks$3;
|
|
10793
|
+
const networks_1$1 = networks$3;
|
|
10869
10794
|
const payments$2 = payments$4;
|
|
10870
10795
|
const bscript$f = script$1;
|
|
10871
10796
|
const transaction_1$2 = transaction;
|
|
@@ -10874,7 +10799,7 @@ const DEFAULT_OPTS = {
|
|
|
10874
10799
|
* A bitcoinjs Network object. This is only used if you pass an `address`
|
|
10875
10800
|
* parameter to addOutput. Otherwise it is not needed and can be left default.
|
|
10876
10801
|
*/
|
|
10877
|
-
network: networks_1.bitcoin,
|
|
10802
|
+
network: networks_1$1.bitcoin,
|
|
10878
10803
|
/**
|
|
10879
10804
|
* When extractTransaction is called, the fee rate is checked.
|
|
10880
10805
|
* THIS IS NOT TO BE RELIED ON.
|
|
@@ -10960,7 +10885,7 @@ let Psbt$1 = class Psbt2 {
|
|
|
10960
10885
|
});
|
|
10961
10886
|
}
|
|
10962
10887
|
combine(...those) {
|
|
10963
|
-
this.data.combine(...those.map((
|
|
10888
|
+
this.data.combine(...those.map((o) => o.data));
|
|
10964
10889
|
return this;
|
|
10965
10890
|
}
|
|
10966
10891
|
clone() {
|
|
@@ -10975,28 +10900,28 @@ let Psbt$1 = class Psbt2 {
|
|
|
10975
10900
|
setVersion(version) {
|
|
10976
10901
|
check32Bit(version);
|
|
10977
10902
|
checkInputsForPartialSig(this.data.inputs, "setVersion");
|
|
10978
|
-
const
|
|
10979
|
-
|
|
10980
|
-
|
|
10903
|
+
const c = this.__CACHE;
|
|
10904
|
+
c.__TX.version = version;
|
|
10905
|
+
c.__EXTRACTED_TX = void 0;
|
|
10981
10906
|
return this;
|
|
10982
10907
|
}
|
|
10983
10908
|
setLocktime(locktime) {
|
|
10984
10909
|
check32Bit(locktime);
|
|
10985
10910
|
checkInputsForPartialSig(this.data.inputs, "setLocktime");
|
|
10986
|
-
const
|
|
10987
|
-
|
|
10988
|
-
|
|
10911
|
+
const c = this.__CACHE;
|
|
10912
|
+
c.__TX.locktime = locktime;
|
|
10913
|
+
c.__EXTRACTED_TX = void 0;
|
|
10989
10914
|
return this;
|
|
10990
10915
|
}
|
|
10991
10916
|
setInputSequence(inputIndex, sequence) {
|
|
10992
10917
|
check32Bit(sequence);
|
|
10993
10918
|
checkInputsForPartialSig(this.data.inputs, "setInputSequence");
|
|
10994
|
-
const
|
|
10995
|
-
if (
|
|
10919
|
+
const c = this.__CACHE;
|
|
10920
|
+
if (c.__TX.ins.length <= inputIndex) {
|
|
10996
10921
|
throw new Error("Input index too high");
|
|
10997
10922
|
}
|
|
10998
|
-
|
|
10999
|
-
|
|
10923
|
+
c.__TX.ins[inputIndex].sequence = sequence;
|
|
10924
|
+
c.__EXTRACTED_TX = void 0;
|
|
11000
10925
|
return this;
|
|
11001
10926
|
}
|
|
11002
10927
|
addInputs(inputDatas) {
|
|
@@ -11012,18 +10937,18 @@ let Psbt$1 = class Psbt2 {
|
|
|
11012
10937
|
checkInputsForPartialSig(this.data.inputs, "addInput");
|
|
11013
10938
|
if (inputData.witnessScript)
|
|
11014
10939
|
checkInvalidP2WSH(inputData.witnessScript);
|
|
11015
|
-
const
|
|
10940
|
+
const c = this.__CACHE;
|
|
11016
10941
|
this.data.addInput(inputData);
|
|
11017
|
-
const txIn =
|
|
11018
|
-
checkTxInputCache(
|
|
10942
|
+
const txIn = c.__TX.ins[c.__TX.ins.length - 1];
|
|
10943
|
+
checkTxInputCache(c, txIn);
|
|
11019
10944
|
const inputIndex = this.data.inputs.length - 1;
|
|
11020
10945
|
const input2 = this.data.inputs[inputIndex];
|
|
11021
10946
|
if (input2.nonWitnessUtxo) {
|
|
11022
10947
|
addNonWitnessTxCache(this.__CACHE, input2, inputIndex);
|
|
11023
10948
|
}
|
|
11024
|
-
|
|
11025
|
-
|
|
11026
|
-
|
|
10949
|
+
c.__FEE = void 0;
|
|
10950
|
+
c.__FEE_RATE = void 0;
|
|
10951
|
+
c.__EXTRACTED_TX = void 0;
|
|
11027
10952
|
return this;
|
|
11028
10953
|
}
|
|
11029
10954
|
addOutputs(outputDatas) {
|
|
@@ -11043,24 +10968,24 @@ let Psbt$1 = class Psbt2 {
|
|
|
11043
10968
|
const script2 = address_1.toOutputScript(address2, network);
|
|
11044
10969
|
outputData = Object.assign(outputData, { script: script2 });
|
|
11045
10970
|
}
|
|
11046
|
-
const
|
|
10971
|
+
const c = this.__CACHE;
|
|
11047
10972
|
this.data.addOutput(outputData);
|
|
11048
|
-
|
|
11049
|
-
|
|
11050
|
-
|
|
10973
|
+
c.__FEE = void 0;
|
|
10974
|
+
c.__FEE_RATE = void 0;
|
|
10975
|
+
c.__EXTRACTED_TX = void 0;
|
|
11051
10976
|
return this;
|
|
11052
10977
|
}
|
|
11053
10978
|
extractTransaction(disableFeeCheck) {
|
|
11054
10979
|
if (!this.data.inputs.every(isFinalized))
|
|
11055
10980
|
throw new Error("Not finalized");
|
|
11056
|
-
const
|
|
10981
|
+
const c = this.__CACHE;
|
|
11057
10982
|
if (!disableFeeCheck) {
|
|
11058
|
-
checkFees(this,
|
|
10983
|
+
checkFees(this, c, this.opts);
|
|
11059
10984
|
}
|
|
11060
|
-
if (
|
|
11061
|
-
return
|
|
11062
|
-
const tx =
|
|
11063
|
-
inputFinalizeGetAmts(this.data.inputs, tx,
|
|
10985
|
+
if (c.__EXTRACTED_TX)
|
|
10986
|
+
return c.__EXTRACTED_TX;
|
|
10987
|
+
const tx = c.__TX.clone();
|
|
10988
|
+
inputFinalizeGetAmts(this.data.inputs, tx, c, true);
|
|
11064
10989
|
return tx;
|
|
11065
10990
|
}
|
|
11066
10991
|
getFeeRate() {
|
|
@@ -11576,26 +11501,26 @@ const checkWitnessScript = scriptCheckerFactory(
|
|
|
11576
11501
|
payments$2.p2wsh,
|
|
11577
11502
|
"Witness script"
|
|
11578
11503
|
);
|
|
11579
|
-
function getTxCacheValue(key, name, inputs2,
|
|
11504
|
+
function getTxCacheValue(key, name, inputs2, c) {
|
|
11580
11505
|
if (!inputs2.every(isFinalized))
|
|
11581
11506
|
throw new Error(`PSBT must be finalized to calculate ${name}`);
|
|
11582
|
-
if (key === "__FEE_RATE" &&
|
|
11583
|
-
return
|
|
11584
|
-
if (key === "__FEE" &&
|
|
11585
|
-
return
|
|
11507
|
+
if (key === "__FEE_RATE" && c.__FEE_RATE)
|
|
11508
|
+
return c.__FEE_RATE;
|
|
11509
|
+
if (key === "__FEE" && c.__FEE)
|
|
11510
|
+
return c.__FEE;
|
|
11586
11511
|
let tx;
|
|
11587
11512
|
let mustFinalize = true;
|
|
11588
|
-
if (
|
|
11589
|
-
tx =
|
|
11513
|
+
if (c.__EXTRACTED_TX) {
|
|
11514
|
+
tx = c.__EXTRACTED_TX;
|
|
11590
11515
|
mustFinalize = false;
|
|
11591
11516
|
} else {
|
|
11592
|
-
tx =
|
|
11517
|
+
tx = c.__TX.clone();
|
|
11593
11518
|
}
|
|
11594
|
-
inputFinalizeGetAmts(inputs2, tx,
|
|
11519
|
+
inputFinalizeGetAmts(inputs2, tx, c, mustFinalize);
|
|
11595
11520
|
if (key === "__FEE_RATE")
|
|
11596
|
-
return
|
|
11521
|
+
return c.__FEE_RATE;
|
|
11597
11522
|
else if (key === "__FEE")
|
|
11598
|
-
return
|
|
11523
|
+
return c.__FEE;
|
|
11599
11524
|
}
|
|
11600
11525
|
function getFinalScripts(inputIndex, input2, script2, isSegwit, isP2SH, isP2WSH) {
|
|
11601
11526
|
const scriptType = classifyScript(script2);
|
|
@@ -11937,7 +11862,7 @@ function inputFinalizeGetAmts(inputs2, tx, cache, mustFinalize) {
|
|
|
11937
11862
|
inputAmount += out.value;
|
|
11938
11863
|
}
|
|
11939
11864
|
});
|
|
11940
|
-
const outputAmount = tx.outs.reduce((total,
|
|
11865
|
+
const outputAmount = tx.outs.reduce((total, o) => total + o.value, 0);
|
|
11941
11866
|
const fee = inputAmount - outputAmount;
|
|
11942
11867
|
if (fee < 0) {
|
|
11943
11868
|
throw new Error("Outputs are spending more than Inputs");
|
|
@@ -11948,11 +11873,11 @@ function inputFinalizeGetAmts(inputs2, tx, cache, mustFinalize) {
|
|
|
11948
11873
|
cache.__FEE_RATE = Math.floor(fee / bytes);
|
|
11949
11874
|
}
|
|
11950
11875
|
function nonWitnessUtxoTxFromCache(cache, input2, inputIndex) {
|
|
11951
|
-
const
|
|
11952
|
-
if (!
|
|
11876
|
+
const c = cache.__NON_WITNESS_UTXO_TX_CACHE;
|
|
11877
|
+
if (!c[inputIndex]) {
|
|
11953
11878
|
addNonWitnessTxCache(cache, input2, inputIndex);
|
|
11954
11879
|
}
|
|
11955
|
-
return
|
|
11880
|
+
return c[inputIndex];
|
|
11956
11881
|
}
|
|
11957
11882
|
function getScriptFromUtxo(inputIndex, input2, cache) {
|
|
11958
11883
|
if (input2.witnessUtxo !== void 0) {
|
|
@@ -12059,7 +11984,7 @@ function checkInvalidP2WSH(script2) {
|
|
|
12059
11984
|
}
|
|
12060
11985
|
}
|
|
12061
11986
|
function pubkeyInScript(pubkey2, script2) {
|
|
12062
|
-
const pubkeyHash = crypto_1.hash160(pubkey2);
|
|
11987
|
+
const pubkeyHash = crypto_1$1.hash160(pubkey2);
|
|
12063
11988
|
const decompiled = bscript$f.decompile(script2);
|
|
12064
11989
|
if (decompiled === null)
|
|
12065
11990
|
throw new Error("Unknown script error");
|
|
@@ -12124,13 +12049,13 @@ function check$c(script2, allowIncomplete) {
|
|
|
12124
12049
|
return false;
|
|
12125
12050
|
if (!types$3.Number(chunks[chunks.length - 2]))
|
|
12126
12051
|
return false;
|
|
12127
|
-
const
|
|
12052
|
+
const m = chunks[0] - OP_INT_BASE;
|
|
12128
12053
|
const n2 = chunks[chunks.length - 2] - OP_INT_BASE;
|
|
12129
|
-
if (
|
|
12054
|
+
if (m <= 0)
|
|
12130
12055
|
return false;
|
|
12131
12056
|
if (n2 > 16)
|
|
12132
12057
|
return false;
|
|
12133
|
-
if (
|
|
12058
|
+
if (m > n2)
|
|
12134
12059
|
return false;
|
|
12135
12060
|
if (n2 !== chunks.length - 3)
|
|
12136
12061
|
return false;
|
|
@@ -12782,7 +12707,7 @@ function expandInput(scriptSig, witnessStack, type, scriptPubKey) {
|
|
|
12782
12707
|
};
|
|
12783
12708
|
}
|
|
12784
12709
|
case SCRIPT_TYPES.P2MS: {
|
|
12785
|
-
const { m
|
|
12710
|
+
const { m, pubkeys, signatures } = payments$1.p2ms(
|
|
12786
12711
|
{
|
|
12787
12712
|
input: scriptSig,
|
|
12788
12713
|
output: scriptPubKey
|
|
@@ -12793,7 +12718,7 @@ function expandInput(scriptSig, witnessStack, type, scriptPubKey) {
|
|
|
12793
12718
|
prevOutType: SCRIPT_TYPES.P2MS,
|
|
12794
12719
|
pubkeys,
|
|
12795
12720
|
signatures,
|
|
12796
|
-
maxSignatures:
|
|
12721
|
+
maxSignatures: m
|
|
12797
12722
|
};
|
|
12798
12723
|
}
|
|
12799
12724
|
}
|
|
@@ -13109,15 +13034,15 @@ function build(type, input2, allowIncomplete) {
|
|
|
13109
13034
|
return payments$1.p2pk({ signature: signatures[0] });
|
|
13110
13035
|
}
|
|
13111
13036
|
case SCRIPT_TYPES.P2MS: {
|
|
13112
|
-
const
|
|
13037
|
+
const m = input2.maxSignatures;
|
|
13113
13038
|
if (allowIncomplete) {
|
|
13114
13039
|
signatures = signatures.map((x) => x || script_1$1.OPS.OP_0);
|
|
13115
13040
|
} else {
|
|
13116
13041
|
signatures = signatures.filter((x) => x);
|
|
13117
13042
|
}
|
|
13118
|
-
const validate = !allowIncomplete ||
|
|
13043
|
+
const validate = !allowIncomplete || m === signatures.length;
|
|
13119
13044
|
return payments$1.p2ms(
|
|
13120
|
-
{ m
|
|
13045
|
+
{ m, pubkeys, signatures },
|
|
13121
13046
|
{ allowIncomplete, validate }
|
|
13122
13047
|
);
|
|
13123
13048
|
}
|
|
@@ -13463,151 +13388,36 @@ function getSigningData(network, inputs2, needsOutputs, tx, signParams, keyPair,
|
|
|
13463
13388
|
useLowR: !!useLowR
|
|
13464
13389
|
};
|
|
13465
13390
|
}
|
|
13466
|
-
Object.defineProperty(src$
|
|
13467
|
-
const bip32 = src
|
|
13468
|
-
src$
|
|
13391
|
+
Object.defineProperty(src$1, "__esModule", { value: true });
|
|
13392
|
+
const bip32 = src;
|
|
13393
|
+
src$1.bip32 = bip32;
|
|
13469
13394
|
const address = address$1;
|
|
13470
|
-
src$
|
|
13395
|
+
src$1.address = address;
|
|
13471
13396
|
const crypto = crypto$2;
|
|
13472
|
-
src$
|
|
13397
|
+
var crypto_1 = src$1.crypto = crypto;
|
|
13473
13398
|
const ECPair2 = ecpair;
|
|
13474
|
-
src$
|
|
13399
|
+
src$1.ECPair = ECPair2;
|
|
13475
13400
|
const networks = networks$3;
|
|
13476
|
-
src$
|
|
13401
|
+
var networks_1 = src$1.networks = networks;
|
|
13477
13402
|
const payments = payments$4;
|
|
13478
|
-
src$
|
|
13403
|
+
src$1.payments = payments;
|
|
13479
13404
|
const script = script$1;
|
|
13480
|
-
src$
|
|
13405
|
+
src$1.script = script;
|
|
13481
13406
|
var block_1 = block;
|
|
13482
|
-
src$
|
|
13407
|
+
src$1.Block = block_1.Block;
|
|
13483
13408
|
var psbt_1 = psbt$1;
|
|
13484
|
-
var Psbt3 = src$
|
|
13409
|
+
var Psbt3 = src$1.Psbt = psbt_1.Psbt;
|
|
13485
13410
|
var script_1 = script$1;
|
|
13486
|
-
src$
|
|
13411
|
+
src$1.opcodes = script_1.OPS;
|
|
13487
13412
|
var transaction_1 = transaction;
|
|
13488
|
-
src$
|
|
13413
|
+
var Transaction2 = src$1.Transaction = transaction_1.Transaction;
|
|
13489
13414
|
var transaction_builder_1 = transaction_builder;
|
|
13490
|
-
src$
|
|
13491
|
-
var n = /* @__PURE__ */ ((t) => (t.INVALID_INPUT_PARAMETERS = "1000", t.UNKNOWN_PROVIDERS = "1001", t.CANNOT_FIND_INBOUND_ADDRESS = "1002", t.NO_INBOUND_ADDRESSES = "1003", t.CHAIN_HALTED_OR_UNSUPPORTED = "1004", t.MISSING_INPUT_PARAMETER = "1005", t.INVALID_TYPE_GENERIC = "1100", t.INVALID_NUMBER_STRING = "1101", t.INVALID_NUMBER = "1102", t.INVALID_BOOLEAN = "1103", t.INVALID_OBJECT = "1104", t.INVALID_ARRAY = "1105", t.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2000", t.SELL_BUY_ASSETS_ARE_THE_SAME = "2001", t.MISSING_SOURCE_ADDRESS_FOR_SYNTH = "2002", t.AFF_ADDRESS_AND_BPS_OR_NEITHER = "2003", t.AFF_ADDRESS_TOO_LONG = "2004", t.AFF_BPS_INTEGER_0_100 = "2005", t.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN = "2006", t.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN = "2007", t.PREFERRED_PROFVIDER_NOT_SUPPORTED = "2008", t.DESTINATION_ADDRESS_SMART_CONTRACT = "2009", t.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2010", t.SOURCE_ADDRESS_SMART_CONTRACT = "2011", t.INVALID_PROVIDER = "2100", t.MISSING_CROSS_CHAIN_PROVIDER = "2101", t.MISSING_AVAX_PROVIDER = "2102", t.MISSING_BSC_PROVIDER = "2103", t.MISSING_ETH_PROVIDER = "2104", t.INVALID_PROVIDER_FOR_SWAP_OUT = "2105", t.MISSING_ARB_PROVIDER = "2106", t.INVALID_CHAIN = "2200", t.INVALID_ASSET = "2201", t.INVALID_ASSET_IDENTIFIER = "2202", t.UNSUPPORTED_CHAIN = "2204", t.UNSUPPORTED_ASSET = "2203", t.UNSUPPORTED_ASSET_FOR_SWAPOUT = "2205", t.INVALID_SOURCE_ADDRESS = "2300", t.INVALID_DESTINATION_ADDRESS = "2301", t.THORNODE_QUOTE_GENERIC_ERROR = "3000", t.NOT_ENOUGH_SYNTH_BALANCE = "3001", t.SYNTH_MINTING_CAP_REACHED = "3002", t.INVALID_QUOTE_MODE = "4000", t.NO_QUOTES = "4001", t.SERVICE_UNAVAILABLE_GENERIC = "5000", t.MISSING_GAS_DATA_GENERIC = "5100", t.MISSING_TOKEN_INFO_GENERIC = "5200", t.CANT_FIND_TOKEN_LIST = "5201", t.NO_PRICE = "5202", t.PRICE_IS_STALE = "5203", t.ADDRESS_NOT_WHITELISTED = "6000", t.ADDRESS_ALREADY_CLAIMED = "6001", t.TEMPORARY_ERROR = "9999", t))(n || {});
|
|
13492
|
-
n.INVALID_INPUT_PARAMETERS + "", n.UNKNOWN_PROVIDERS + "", n.CANNOT_FIND_INBOUND_ADDRESS + "", n.NO_INBOUND_ADDRESSES + "", n.CHAIN_HALTED_OR_UNSUPPORTED + "", n.MISSING_INPUT_PARAMETER + "", n.INVALID_TYPE_GENERIC + "", n.INVALID_NUMBER_STRING + "", n.INVALID_NUMBER + "", n.INVALID_BOOLEAN + "", n.INVALID_OBJECT + "", n.INVALID_ARRAY + "", n.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER + "", n.SELL_BUY_ASSETS_ARE_THE_SAME + "", n.MISSING_SOURCE_ADDRESS_FOR_SYNTH + "", n.AFF_ADDRESS_AND_BPS_OR_NEITHER + "", n.AFF_ADDRESS_TOO_LONG + "", n.AFF_BPS_INTEGER_0_100 + "", n.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN + "", n.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN + "", n.PREFERRED_PROFVIDER_NOT_SUPPORTED + "", n.DESTINATION_ADDRESS_SMART_CONTRACT + "", n.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER + "", n.INVALID_PROVIDER + "", n.MISSING_CROSS_CHAIN_PROVIDER + "", n.MISSING_AVAX_PROVIDER + "", n.MISSING_BSC_PROVIDER + "", n.MISSING_ETH_PROVIDER + "", n.MISSING_ARB_PROVIDER + "", n.INVALID_PROVIDER_FOR_SWAP_OUT + "", n.INVALID_CHAIN + "", n.INVALID_ASSET + "", n.UNSUPPORTED_CHAIN + "", n.UNSUPPORTED_ASSET + "", n.UNSUPPORTED_ASSET_FOR_SWAPOUT + "", n.THORNODE_QUOTE_GENERIC_ERROR + "", n.INVALID_SOURCE_ADDRESS + "", n.INVALID_DESTINATION_ADDRESS + "", n.NOT_ENOUGH_SYNTH_BALANCE + "", n.SYNTH_MINTING_CAP_REACHED + "", n.INVALID_QUOTE_MODE + "", n.NO_QUOTES + "", n.SERVICE_UNAVAILABLE_GENERIC + "", n.MISSING_GAS_DATA_GENERIC + "", n.MISSING_TOKEN_INFO_GENERIC + "", n.CANT_FIND_TOKEN_LIST + "", n.NO_PRICE + "", n.PRICE_IS_STALE + "", n.ADDRESS_NOT_WHITELISTED + "", n.ADDRESS_ALREADY_CLAIMED + "";
|
|
13493
|
-
var o = /* @__PURE__ */ ((t) => (t.Arbitrum = "ARB", t.Avalanche = "AVAX", t.Binance = "BNB", t.BinanceSmartChain = "BSC", t.Bitcoin = "BTC", t.BitcoinCash = "BCH", t.Cosmos = "GAIA", t.Dogecoin = "DOGE", t.Ethereum = "ETH", t.Kujira = "KUJI", t.Litecoin = "LTC", t.Maya = "MAYA", t.Optimism = "OP", t.Polygon = "MATIC", t.THORChain = "THOR", t))(o || {}), C = /* @__PURE__ */ ((t) => (t[t.ARB = 18] = "ARB", t[t.AVAX = 18] = "AVAX", t[t.BCH = 8] = "BCH", t[t.BNB = 8] = "BNB", t[t.BSC = 18] = "BSC", t[t.BTC = 8] = "BTC", t[t.DASH = 8] = "DASH", t[t.DOGE = 8] = "DOGE", t[t.ETH = 18] = "ETH", t[t.GAIA = 6] = "GAIA", t[t.KUJI = 6] = "KUJI", t[t.LTC = 8] = "LTC", t[t.MATIC = 18] = "MATIC", t[t.MAYA = 10] = "MAYA", t[t.OP = 18] = "OP", t[t.THOR = 8] = "THOR", t))(C || {}), R = /* @__PURE__ */ ((t) => (t.Arbitrum = "42161", t.ArbitrumHex = "0xa4b1", t.Avalanche = "43114", t.AvalancheHex = "0xa86a", t.Binance = "Binance-Chain-Tigris", t.BinanceSmartChain = "56", t.BinanceSmartChainHex = "0x38", t.Bitcoin = "bitcoin", t.BitcoinCash = "bitcoincash", t.Cosmos = "cosmoshub-4", t.Dogecoin = "dogecoin", t.Kujira = "kaiyo-1", t.Ethereum = "1", t.EthereumHex = "0x1", t.Litecoin = "litecoin", t.Maya = "mayachain-mainnet-v1", t.MayaStagenet = "mayachain-stagenet-v1", t.Optimism = "10", t.OptimismHex = "0xa", t.Polygon = "137", t.PolygonHex = "0x89", t.THORChain = "thorchain-mainnet-v1", t.THORChainStagenet = "thorchain-stagenet-v2", t))(R || {}), m = /* @__PURE__ */ ((t) => (t.Arbitrum = "https://arb1.arbitrum.io/rpc", t.Avalanche = "https://node-router.thorswap.net/avalanche-c", t.Binance = "", t.BinanceSmartChain = "https://bsc-dataseed.binance.org", t.Bitcoin = "https://node-router.thorswap.net/bitcoin", t.BitcoinCash = "https://node-router.thorswap.net/bitcoin-cash", t.Cosmos = "https://node-router.thorswap.net/cosmos/rpc", t.Kujira = "https://rpc-kujira.synergynodes.com/", t.Dogecoin = "https://node-router.thorswap.net/dogecoin", t.Ethereum = "https://node-router.thorswap.net/ethereum", t.Litecoin = "https://node-router.thorswap.net/litecoin", t.Maya = "https://tendermint.mayachain.info", t.MayaStagenet = "https://stagenet.tendermint.mayachain.info", t.Optimism = "https://mainnet.optimism.io", t.Polygon = "https://polygon-rpc.com", t.THORChain = "https://rpc.thorswap.net", t.THORChainStagenet = "https://stagenet-rpc.ninerealms.com", t))(m || {});
|
|
13494
|
-
const c = Object.values(o), p = Object.keys(o), D = c.reduce(
|
|
13495
|
-
(t, a) => {
|
|
13496
|
-
const i = p.find((_) => o[_] === a);
|
|
13497
|
-
return i && (t[a] = i), t;
|
|
13498
|
-
},
|
|
13499
|
-
{}
|
|
13500
|
-
);
|
|
13501
|
-
c.reduce(
|
|
13502
|
-
(t, a) => (t[a] = R[D[a]], t),
|
|
13503
|
-
{}
|
|
13504
|
-
);
|
|
13505
|
-
c.reduce(
|
|
13506
|
-
(t, a) => (t[a] = m[D[a]], t),
|
|
13507
|
-
{}
|
|
13508
|
-
);
|
|
13509
|
-
c.reduce(
|
|
13510
|
-
(t, a) => {
|
|
13511
|
-
const i = `${D[a]}Hex`;
|
|
13512
|
-
return t[a] = R[i], t;
|
|
13513
|
-
},
|
|
13514
|
-
{}
|
|
13515
|
-
);
|
|
13516
|
-
var h = /* @__PURE__ */ ((t) => (t.KEYSTORE = "KEYSTORE", t.KEEPKEY = "KEEPKEY", t.XDEFI = "XDEFI", t.METAMASK = "METAMASK", t.COINBASE_WEB = "COINBASE_WEB", t.TREZOR = "TREZOR", t.TRUSTWALLET_WEB = "TRUSTWALLET_WEB", t.LEDGER = "LEDGER", t.KEPLR = "KEPLR", t.OKX = "OKX", t.BRAVE = "BRAVE", t.WALLETCONNECT = "WALLETCONNECT", t))(h || {});
|
|
13517
|
-
const L = (t) => async ({ from: a, recipient: i, amount: _, asset: I, memo: T }) => {
|
|
13518
|
-
var E;
|
|
13519
|
-
const A2 = (E = window.okxwallet) == null ? void 0 : E.keplr, S = A2 == null ? void 0 : A2.getOfflineSignerOnlyAmino(R.Cosmos);
|
|
13520
|
-
if (!S)
|
|
13521
|
-
throw new Error("No cosmos okxwallet found");
|
|
13522
|
-
const { createCosmJS: N } = await import("./index_37894947.js"), s = await N({ offlineSigner: S, rpcUrl: t }), e = [
|
|
13523
|
-
{ denom: (I == null ? void 0 : I.symbol) === "MUON" ? "umuon" : "uatom", amount: _.amount().toString() }
|
|
13524
|
-
], { transactionHash: r } = await s.sendTokens(a, i, e, 1.6, T);
|
|
13525
|
-
return r;
|
|
13526
|
-
}, w = async ({
|
|
13527
|
-
chain: t,
|
|
13528
|
-
ethplorerApiKey: a,
|
|
13529
|
-
covalentApiKey: i,
|
|
13530
|
-
utxoApiKey: _,
|
|
13531
|
-
rpcUrl: I,
|
|
13532
|
-
api: T
|
|
13533
|
-
}) => {
|
|
13534
|
-
var A$1, S, N;
|
|
13535
|
-
switch (t) {
|
|
13536
|
-
case o.Ethereum:
|
|
13537
|
-
case o.Avalanche:
|
|
13538
|
-
case o.BinanceSmartChain: {
|
|
13539
|
-
if (!((A$1 = window.okxwallet) != null && A$1.send))
|
|
13540
|
-
throw new Error("No okxwallet found");
|
|
13541
|
-
const { getWeb3WalletMethods: s, getProvider: e } = await import("./index_3a6b0cd3.js"), r = await s({
|
|
13542
|
-
chain: t,
|
|
13543
|
-
ethplorerApiKey: a,
|
|
13544
|
-
covalentApiKey: i,
|
|
13545
|
-
ethereumWindowProvider: window.okxwallet
|
|
13546
|
-
}), E = await window.okxwallet.send("eth_requestAccounts", []);
|
|
13547
|
-
return { ...r, getAddress: () => E, getBalance: async () => {
|
|
13548
|
-
const l = await r.getBalance(E), O = await e(t).getBalance(E);
|
|
13549
|
-
return [
|
|
13550
|
-
new A({
|
|
13551
|
-
chain: t,
|
|
13552
|
-
symbol: t,
|
|
13553
|
-
value: O.toString(),
|
|
13554
|
-
decimal: C[t]
|
|
13555
|
-
}),
|
|
13556
|
-
...l.slice(1)
|
|
13557
|
-
];
|
|
13558
|
-
} };
|
|
13559
|
-
}
|
|
13560
|
-
case o.Bitcoin: {
|
|
13561
|
-
if (!((S = window.okxwallet) != null && S.bitcoin))
|
|
13562
|
-
throw new Error("No bitcoin okxwallet found");
|
|
13563
|
-
if (!_)
|
|
13564
|
-
throw new Error("No utxoApiKey provided");
|
|
13565
|
-
const { BTCToolbox: s } = await import("./index_167c5f7a.js"), e = window.okxwallet.bitcoin, r = (await e.connect()).address, E = s({ rpcUrl: I, apiKey: _, apiClient: T }), d = async (O) => {
|
|
13566
|
-
const u = await e.signPsbt(O.toHex(), { from: r, type: "list" });
|
|
13567
|
-
return Psbt3.fromHex(u);
|
|
13568
|
-
};
|
|
13569
|
-
return { ...E, transfer: (O) => E.transfer({
|
|
13570
|
-
...O,
|
|
13571
|
-
signTransaction: d
|
|
13572
|
-
}), getAddress: () => r };
|
|
13573
|
-
}
|
|
13574
|
-
case o.Cosmos: {
|
|
13575
|
-
if (!((N = window.okxwallet) != null && N.keplr))
|
|
13576
|
-
throw new Error("No cosmos okxwallet found");
|
|
13577
|
-
const s = window.okxwallet.keplr;
|
|
13578
|
-
await s.enable(R.Cosmos);
|
|
13579
|
-
const [{ address: e }] = await s.getOfflineSignerOnlyAmino(R.Cosmos).getAccounts(), { GaiaToolbox: r } = await import("./index_37894947.js");
|
|
13580
|
-
return {
|
|
13581
|
-
...r({ server: T }),
|
|
13582
|
-
transfer: L(I),
|
|
13583
|
-
getAddress: () => e
|
|
13584
|
-
};
|
|
13585
|
-
}
|
|
13586
|
-
default:
|
|
13587
|
-
throw new Error(`No wallet for chain ${t}`);
|
|
13588
|
-
}
|
|
13589
|
-
};
|
|
13590
|
-
o.Avalanche, o.BinanceSmartChain, o.Bitcoin, o.Ethereum, o.Cosmos;
|
|
13591
|
-
const U = ({
|
|
13592
|
-
addChain: t,
|
|
13593
|
-
config: { covalentApiKey: a, ethplorerApiKey: i, utxoApiKey: _ }
|
|
13594
|
-
}) => async (I) => (await I.reduce(async (A2, S) => {
|
|
13595
|
-
await A2;
|
|
13596
|
-
const N = await w({
|
|
13597
|
-
chain: S,
|
|
13598
|
-
covalentApiKey: a,
|
|
13599
|
-
ethplorerApiKey: i,
|
|
13600
|
-
utxoApiKey: _
|
|
13601
|
-
}), s = await N.getAddress();
|
|
13602
|
-
t({
|
|
13603
|
-
chain: S,
|
|
13604
|
-
walletMethods: { ...N, getAddress: () => s },
|
|
13605
|
-
wallet: { address: s, balance: [], walletType: h.OKX }
|
|
13606
|
-
});
|
|
13607
|
-
}, Promise.resolve()), true), g = {
|
|
13608
|
-
connectMethodName: "connectOkx",
|
|
13609
|
-
connect: U
|
|
13610
|
-
};
|
|
13415
|
+
src$1.TransactionBuilder = transaction_builder_1.TransactionBuilder;
|
|
13611
13416
|
export {
|
|
13612
|
-
|
|
13417
|
+
Psbt3 as P,
|
|
13418
|
+
Transaction2 as T,
|
|
13419
|
+
bs58check$5 as b,
|
|
13420
|
+
crypto_1 as c,
|
|
13421
|
+
networks_1 as n,
|
|
13422
|
+
safeBufferExports as s
|
|
13613
13423
|
};
|