@appliedblockchain/silentdatarollup-ethers-provider-fireblocks 1.0.1 → 1.0.2
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 +84 -42
- package/dist/index.mjs +84 -42
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -10698,12 +10698,12 @@ var require_form_data = __commonJS({
|
|
|
10698
10698
|
var parseUrl = require("url").parse;
|
|
10699
10699
|
var fs = require("fs");
|
|
10700
10700
|
var Stream = require("stream").Stream;
|
|
10701
|
+
var crypto4 = require("crypto");
|
|
10701
10702
|
var mime = require_mime_types();
|
|
10702
10703
|
var asynckit = require_asynckit();
|
|
10703
10704
|
var setToStringTag = require_es_set_tostringtag();
|
|
10705
|
+
var hasOwn = require_hasown();
|
|
10704
10706
|
var populate = require_populate();
|
|
10705
|
-
module2.exports = FormData2;
|
|
10706
|
-
util.inherits(FormData2, CombinedStream);
|
|
10707
10707
|
function FormData2(options) {
|
|
10708
10708
|
if (!(this instanceof FormData2)) {
|
|
10709
10709
|
return new FormData2(options);
|
|
@@ -10717,16 +10717,17 @@ var require_form_data = __commonJS({
|
|
|
10717
10717
|
this[option] = options[option];
|
|
10718
10718
|
}
|
|
10719
10719
|
}
|
|
10720
|
+
util.inherits(FormData2, CombinedStream);
|
|
10720
10721
|
FormData2.LINE_BREAK = "\r\n";
|
|
10721
10722
|
FormData2.DEFAULT_CONTENT_TYPE = "application/octet-stream";
|
|
10722
10723
|
FormData2.prototype.append = function(field, value, options) {
|
|
10723
10724
|
options = options || {};
|
|
10724
|
-
if (typeof options
|
|
10725
|
+
if (typeof options === "string") {
|
|
10725
10726
|
options = { filename: options };
|
|
10726
10727
|
}
|
|
10727
10728
|
var append = CombinedStream.prototype.append.bind(this);
|
|
10728
|
-
if (typeof value
|
|
10729
|
-
value =
|
|
10729
|
+
if (typeof value === "number" || value == null) {
|
|
10730
|
+
value = String(value);
|
|
10730
10731
|
}
|
|
10731
10732
|
if (Array.isArray(value)) {
|
|
10732
10733
|
this._error(new Error("Arrays are not supported."));
|
|
@@ -10742,7 +10743,7 @@ var require_form_data = __commonJS({
|
|
|
10742
10743
|
FormData2.prototype._trackLength = function(header, value, options) {
|
|
10743
10744
|
var valueLength = 0;
|
|
10744
10745
|
if (options.knownLength != null) {
|
|
10745
|
-
valueLength +=
|
|
10746
|
+
valueLength += Number(options.knownLength);
|
|
10746
10747
|
} else if (Buffer.isBuffer(value)) {
|
|
10747
10748
|
valueLength = value.length;
|
|
10748
10749
|
} else if (typeof value === "string") {
|
|
@@ -10750,7 +10751,7 @@ var require_form_data = __commonJS({
|
|
|
10750
10751
|
}
|
|
10751
10752
|
this._valueLength += valueLength;
|
|
10752
10753
|
this._overheadLength += Buffer.byteLength(header) + FormData2.LINE_BREAK.length;
|
|
10753
|
-
if (!value || !value.path && !(value.readable &&
|
|
10754
|
+
if (!value || !value.path && !(value.readable && hasOwn(value, "httpVersion")) && !(value instanceof Stream)) {
|
|
10754
10755
|
return;
|
|
10755
10756
|
}
|
|
10756
10757
|
if (!options.knownLength) {
|
|
@@ -10758,26 +10759,25 @@ var require_form_data = __commonJS({
|
|
|
10758
10759
|
}
|
|
10759
10760
|
};
|
|
10760
10761
|
FormData2.prototype._lengthRetriever = function(value, callback) {
|
|
10761
|
-
if (
|
|
10762
|
+
if (hasOwn(value, "fd")) {
|
|
10762
10763
|
if (value.end != void 0 && value.end != Infinity && value.start != void 0) {
|
|
10763
10764
|
callback(null, value.end + 1 - (value.start ? value.start : 0));
|
|
10764
10765
|
} else {
|
|
10765
10766
|
fs.stat(value.path, function(err, stat) {
|
|
10766
|
-
var fileSize;
|
|
10767
10767
|
if (err) {
|
|
10768
10768
|
callback(err);
|
|
10769
10769
|
return;
|
|
10770
10770
|
}
|
|
10771
|
-
fileSize = stat.size - (value.start ? value.start : 0);
|
|
10771
|
+
var fileSize = stat.size - (value.start ? value.start : 0);
|
|
10772
10772
|
callback(null, fileSize);
|
|
10773
10773
|
});
|
|
10774
10774
|
}
|
|
10775
|
-
} else if (
|
|
10776
|
-
callback(null,
|
|
10777
|
-
} else if (
|
|
10775
|
+
} else if (hasOwn(value, "httpVersion")) {
|
|
10776
|
+
callback(null, Number(value.headers["content-length"]));
|
|
10777
|
+
} else if (hasOwn(value, "httpModule")) {
|
|
10778
10778
|
value.on("response", function(response) {
|
|
10779
10779
|
value.pause();
|
|
10780
|
-
callback(null,
|
|
10780
|
+
callback(null, Number(response.headers["content-length"]));
|
|
10781
10781
|
});
|
|
10782
10782
|
value.resume();
|
|
10783
10783
|
} else {
|
|
@@ -10785,7 +10785,7 @@ var require_form_data = __commonJS({
|
|
|
10785
10785
|
}
|
|
10786
10786
|
};
|
|
10787
10787
|
FormData2.prototype._multiPartHeader = function(field, value, options) {
|
|
10788
|
-
if (typeof options.header
|
|
10788
|
+
if (typeof options.header === "string") {
|
|
10789
10789
|
return options.header;
|
|
10790
10790
|
}
|
|
10791
10791
|
var contentDisposition = this._getContentDisposition(value, options);
|
|
@@ -10797,12 +10797,12 @@ var require_form_data = __commonJS({
|
|
|
10797
10797
|
// if no content type. allow it to be empty array
|
|
10798
10798
|
"Content-Type": [].concat(contentType || [])
|
|
10799
10799
|
};
|
|
10800
|
-
if (typeof options.header
|
|
10800
|
+
if (typeof options.header === "object") {
|
|
10801
10801
|
populate(headers, options.header);
|
|
10802
10802
|
}
|
|
10803
10803
|
var header;
|
|
10804
10804
|
for (var prop in headers) {
|
|
10805
|
-
if (
|
|
10805
|
+
if (hasOwn(headers, prop)) {
|
|
10806
10806
|
header = headers[prop];
|
|
10807
10807
|
if (header == null) {
|
|
10808
10808
|
continue;
|
|
@@ -10818,34 +10818,33 @@ var require_form_data = __commonJS({
|
|
|
10818
10818
|
return "--" + this.getBoundary() + FormData2.LINE_BREAK + contents + FormData2.LINE_BREAK;
|
|
10819
10819
|
};
|
|
10820
10820
|
FormData2.prototype._getContentDisposition = function(value, options) {
|
|
10821
|
-
var filename
|
|
10821
|
+
var filename;
|
|
10822
10822
|
if (typeof options.filepath === "string") {
|
|
10823
10823
|
filename = path.normalize(options.filepath).replace(/\\/g, "/");
|
|
10824
|
-
} else if (options.filename || value.name || value.path) {
|
|
10825
|
-
filename = path.basename(options.filename || value.name || value.path);
|
|
10826
|
-
} else if (value.readable &&
|
|
10824
|
+
} else if (options.filename || value && (value.name || value.path)) {
|
|
10825
|
+
filename = path.basename(options.filename || value && (value.name || value.path));
|
|
10826
|
+
} else if (value && value.readable && hasOwn(value, "httpVersion")) {
|
|
10827
10827
|
filename = path.basename(value.client._httpMessage.path || "");
|
|
10828
10828
|
}
|
|
10829
10829
|
if (filename) {
|
|
10830
|
-
|
|
10830
|
+
return 'filename="' + filename + '"';
|
|
10831
10831
|
}
|
|
10832
|
-
return contentDisposition;
|
|
10833
10832
|
};
|
|
10834
10833
|
FormData2.prototype._getContentType = function(value, options) {
|
|
10835
10834
|
var contentType = options.contentType;
|
|
10836
|
-
if (!contentType && value.name) {
|
|
10835
|
+
if (!contentType && value && value.name) {
|
|
10837
10836
|
contentType = mime.lookup(value.name);
|
|
10838
10837
|
}
|
|
10839
|
-
if (!contentType && value.path) {
|
|
10838
|
+
if (!contentType && value && value.path) {
|
|
10840
10839
|
contentType = mime.lookup(value.path);
|
|
10841
10840
|
}
|
|
10842
|
-
if (!contentType && value.readable &&
|
|
10841
|
+
if (!contentType && value && value.readable && hasOwn(value, "httpVersion")) {
|
|
10843
10842
|
contentType = value.headers["content-type"];
|
|
10844
10843
|
}
|
|
10845
10844
|
if (!contentType && (options.filepath || options.filename)) {
|
|
10846
10845
|
contentType = mime.lookup(options.filepath || options.filename);
|
|
10847
10846
|
}
|
|
10848
|
-
if (!contentType && typeof value
|
|
10847
|
+
if (!contentType && value && typeof value === "object") {
|
|
10849
10848
|
contentType = FormData2.DEFAULT_CONTENT_TYPE;
|
|
10850
10849
|
}
|
|
10851
10850
|
return contentType;
|
|
@@ -10869,13 +10868,16 @@ var require_form_data = __commonJS({
|
|
|
10869
10868
|
"content-type": "multipart/form-data; boundary=" + this.getBoundary()
|
|
10870
10869
|
};
|
|
10871
10870
|
for (header in userHeaders) {
|
|
10872
|
-
if (
|
|
10871
|
+
if (hasOwn(userHeaders, header)) {
|
|
10873
10872
|
formHeaders[header.toLowerCase()] = userHeaders[header];
|
|
10874
10873
|
}
|
|
10875
10874
|
}
|
|
10876
10875
|
return formHeaders;
|
|
10877
10876
|
};
|
|
10878
10877
|
FormData2.prototype.setBoundary = function(boundary) {
|
|
10878
|
+
if (typeof boundary !== "string") {
|
|
10879
|
+
throw new TypeError("FormData boundary must be a string");
|
|
10880
|
+
}
|
|
10879
10881
|
this._boundary = boundary;
|
|
10880
10882
|
};
|
|
10881
10883
|
FormData2.prototype.getBoundary = function() {
|
|
@@ -10902,11 +10904,7 @@ var require_form_data = __commonJS({
|
|
|
10902
10904
|
return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]);
|
|
10903
10905
|
};
|
|
10904
10906
|
FormData2.prototype._generateBoundary = function() {
|
|
10905
|
-
|
|
10906
|
-
for (var i = 0; i < 24; i++) {
|
|
10907
|
-
boundary += Math.floor(Math.random() * 10).toString(16);
|
|
10908
|
-
}
|
|
10909
|
-
this._boundary = boundary;
|
|
10907
|
+
this._boundary = "--------------------------" + crypto4.randomBytes(12).toString("hex");
|
|
10910
10908
|
};
|
|
10911
10909
|
FormData2.prototype.getLengthSync = function() {
|
|
10912
10910
|
var knownLength = this._overheadLength + this._valueLength;
|
|
@@ -10946,8 +10944,10 @@ var require_form_data = __commonJS({
|
|
|
10946
10944
|
});
|
|
10947
10945
|
};
|
|
10948
10946
|
FormData2.prototype.submit = function(params, cb) {
|
|
10949
|
-
var request
|
|
10950
|
-
|
|
10947
|
+
var request;
|
|
10948
|
+
var options;
|
|
10949
|
+
var defaults = { method: "post" };
|
|
10950
|
+
if (typeof params === "string") {
|
|
10951
10951
|
params = parseUrl(params);
|
|
10952
10952
|
options = populate({
|
|
10953
10953
|
port: params.port,
|
|
@@ -10958,11 +10958,11 @@ var require_form_data = __commonJS({
|
|
|
10958
10958
|
} else {
|
|
10959
10959
|
options = populate(params, defaults);
|
|
10960
10960
|
if (!options.port) {
|
|
10961
|
-
options.port = options.protocol
|
|
10961
|
+
options.port = options.protocol === "https:" ? 443 : 80;
|
|
10962
10962
|
}
|
|
10963
10963
|
}
|
|
10964
10964
|
options.headers = this.getHeaders(params.headers);
|
|
10965
|
-
if (options.protocol
|
|
10965
|
+
if (options.protocol === "https:") {
|
|
10966
10966
|
request = https.request(options);
|
|
10967
10967
|
} else {
|
|
10968
10968
|
request = http.request(options);
|
|
@@ -11001,6 +11001,7 @@ var require_form_data = __commonJS({
|
|
|
11001
11001
|
return "[object FormData]";
|
|
11002
11002
|
};
|
|
11003
11003
|
setToStringTag(FormData2, "FormData");
|
|
11004
|
+
module2.exports = FormData2;
|
|
11004
11005
|
}
|
|
11005
11006
|
});
|
|
11006
11007
|
|
|
@@ -31063,10 +31064,16 @@ var require_lib2 = __commonJS({
|
|
|
31063
31064
|
"../../node_modules/@scure/base/lib/index.js"(exports2) {
|
|
31064
31065
|
"use strict";
|
|
31065
31066
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
31066
|
-
exports2.bytes = exports2.stringToBytes = exports2.str = exports2.bytesToString = exports2.hex = exports2.utf8 = exports2.bech32m = exports2.bech32 = exports2.base58check = exports2.createBase58check = exports2.base58xmr = exports2.base58xrp = exports2.base58flickr = exports2.base58 = exports2.base64urlnopad = exports2.base64url = exports2.base64nopad = exports2.base64 = exports2.base32crockford = exports2.base32hexnopad = exports2.base32hex = exports2.base32nopad = exports2.base32 = exports2.base16 = exports2.utils =
|
|
31067
|
+
exports2.bytes = exports2.stringToBytes = exports2.str = exports2.bytesToString = exports2.hex = exports2.utf8 = exports2.bech32m = exports2.bech32 = exports2.base58check = exports2.createBase58check = exports2.base58xmr = exports2.base58xrp = exports2.base58flickr = exports2.base58 = exports2.base64urlnopad = exports2.base64url = exports2.base64nopad = exports2.base64 = exports2.base32crockford = exports2.base32hexnopad = exports2.base32hex = exports2.base32nopad = exports2.base32 = exports2.base16 = exports2.utils = void 0;
|
|
31067
31068
|
function isBytes2(a) {
|
|
31068
31069
|
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
|
|
31069
31070
|
}
|
|
31071
|
+
function abytes(b, ...lengths) {
|
|
31072
|
+
if (!isBytes2(b))
|
|
31073
|
+
throw new Error("Uint8Array expected");
|
|
31074
|
+
if (lengths.length > 0 && !lengths.includes(b.length))
|
|
31075
|
+
throw new Error("Uint8Array expected of length " + lengths + ", got length=" + b.length);
|
|
31076
|
+
}
|
|
31070
31077
|
function isArrayOf(isString, arr) {
|
|
31071
31078
|
if (!Array.isArray(arr))
|
|
31072
31079
|
return false;
|
|
@@ -31092,7 +31099,6 @@ var require_lib2 = __commonJS({
|
|
|
31092
31099
|
if (!Number.isSafeInteger(n))
|
|
31093
31100
|
throw new Error(`invalid integer: ${n}`);
|
|
31094
31101
|
}
|
|
31095
|
-
exports2.assertNumber = anumber;
|
|
31096
31102
|
function aArr(input) {
|
|
31097
31103
|
if (!Array.isArray(input))
|
|
31098
31104
|
throw new Error("array expected");
|
|
@@ -31366,9 +31372,34 @@ var require_lib2 = __commonJS({
|
|
|
31366
31372
|
exports2.base32hex = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(5), /* @__PURE__ */ alphabet("0123456789ABCDEFGHIJKLMNOPQRSTUV"), /* @__PURE__ */ padding(5), /* @__PURE__ */ join(""));
|
|
31367
31373
|
exports2.base32hexnopad = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(5), /* @__PURE__ */ alphabet("0123456789ABCDEFGHIJKLMNOPQRSTUV"), /* @__PURE__ */ join(""));
|
|
31368
31374
|
exports2.base32crockford = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(5), /* @__PURE__ */ alphabet("0123456789ABCDEFGHJKMNPQRSTVWXYZ"), /* @__PURE__ */ join(""), /* @__PURE__ */ normalize((s) => s.toUpperCase().replace(/O/g, "0").replace(/[IL]/g, "1")));
|
|
31369
|
-
|
|
31375
|
+
var hasBase64Builtin = /* @__PURE__ */ (() => typeof Uint8Array.from([]).toBase64 === "function" && typeof Uint8Array.fromBase64 === "function")();
|
|
31376
|
+
var decodeBase64Builtin = (s, isUrl) => {
|
|
31377
|
+
astr("base64", s);
|
|
31378
|
+
const re = isUrl ? /^[A-Za-z0-9=_-]+$/ : /^[A-Za-z0-9=+/]+$/;
|
|
31379
|
+
const alphabet2 = isUrl ? "base64url" : "base64";
|
|
31380
|
+
if (s.length > 0 && !re.test(s))
|
|
31381
|
+
throw new Error("invalid base64");
|
|
31382
|
+
return Uint8Array.fromBase64(s, { alphabet: alphabet2, lastChunkHandling: "strict" });
|
|
31383
|
+
};
|
|
31384
|
+
exports2.base64 = hasBase64Builtin ? {
|
|
31385
|
+
encode(b) {
|
|
31386
|
+
abytes(b);
|
|
31387
|
+
return b.toBase64();
|
|
31388
|
+
},
|
|
31389
|
+
decode(s) {
|
|
31390
|
+
return decodeBase64Builtin(s, false);
|
|
31391
|
+
}
|
|
31392
|
+
} : /* @__PURE__ */ chain(/* @__PURE__ */ radix2(6), /* @__PURE__ */ alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"), /* @__PURE__ */ padding(6), /* @__PURE__ */ join(""));
|
|
31370
31393
|
exports2.base64nopad = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(6), /* @__PURE__ */ alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"), /* @__PURE__ */ join(""));
|
|
31371
|
-
exports2.base64url =
|
|
31394
|
+
exports2.base64url = hasBase64Builtin ? {
|
|
31395
|
+
encode(b) {
|
|
31396
|
+
abytes(b);
|
|
31397
|
+
return b.toBase64({ alphabet: "base64url" });
|
|
31398
|
+
},
|
|
31399
|
+
decode(s) {
|
|
31400
|
+
return decodeBase64Builtin(s, true);
|
|
31401
|
+
}
|
|
31402
|
+
} : /* @__PURE__ */ chain(/* @__PURE__ */ radix2(6), /* @__PURE__ */ alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"), /* @__PURE__ */ padding(6), /* @__PURE__ */ join(""));
|
|
31372
31403
|
exports2.base64urlnopad = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(6), /* @__PURE__ */ alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"), /* @__PURE__ */ join(""));
|
|
31373
31404
|
var genBase58 = /* @__NO_SIDE_EFFECTS__ */ (abc) => /* @__PURE__ */ chain(/* @__PURE__ */ radix(58), /* @__PURE__ */ alphabet(abc), /* @__PURE__ */ join(""));
|
|
31374
31405
|
exports2.base58 = /* @__PURE__ */ genBase58("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");
|
|
@@ -31500,7 +31531,18 @@ var require_lib2 = __commonJS({
|
|
|
31500
31531
|
encode: (data) => new TextDecoder().decode(data),
|
|
31501
31532
|
decode: (str) => new TextEncoder().encode(str)
|
|
31502
31533
|
};
|
|
31503
|
-
|
|
31534
|
+
var hasHexBuiltin = /* @__PURE__ */ (() => typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function")();
|
|
31535
|
+
var hexBuiltin = {
|
|
31536
|
+
encode(data) {
|
|
31537
|
+
abytes(data);
|
|
31538
|
+
return data.toHex();
|
|
31539
|
+
},
|
|
31540
|
+
decode(s) {
|
|
31541
|
+
astr("hex", s);
|
|
31542
|
+
return Uint8Array.fromHex(s);
|
|
31543
|
+
}
|
|
31544
|
+
};
|
|
31545
|
+
exports2.hex = hasHexBuiltin ? hexBuiltin : /* @__PURE__ */ chain(/* @__PURE__ */ radix2(4), /* @__PURE__ */ alphabet("0123456789abcdef"), /* @__PURE__ */ join(""), /* @__PURE__ */ normalize((s) => {
|
|
31504
31546
|
if (typeof s !== "string" || s.length % 2 !== 0)
|
|
31505
31547
|
throw new TypeError(`hex.decode: expected string, got ${typeof s} with length ${s.length}`);
|
|
31506
31548
|
return s.toLowerCase();
|
package/dist/index.mjs
CHANGED
|
@@ -10703,12 +10703,12 @@ var require_form_data = __commonJS({
|
|
|
10703
10703
|
var parseUrl = __require("url").parse;
|
|
10704
10704
|
var fs = __require("fs");
|
|
10705
10705
|
var Stream = __require("stream").Stream;
|
|
10706
|
+
var crypto4 = __require("crypto");
|
|
10706
10707
|
var mime = require_mime_types();
|
|
10707
10708
|
var asynckit = require_asynckit();
|
|
10708
10709
|
var setToStringTag = require_es_set_tostringtag();
|
|
10710
|
+
var hasOwn = require_hasown();
|
|
10709
10711
|
var populate = require_populate();
|
|
10710
|
-
module.exports = FormData2;
|
|
10711
|
-
util.inherits(FormData2, CombinedStream);
|
|
10712
10712
|
function FormData2(options) {
|
|
10713
10713
|
if (!(this instanceof FormData2)) {
|
|
10714
10714
|
return new FormData2(options);
|
|
@@ -10722,16 +10722,17 @@ var require_form_data = __commonJS({
|
|
|
10722
10722
|
this[option] = options[option];
|
|
10723
10723
|
}
|
|
10724
10724
|
}
|
|
10725
|
+
util.inherits(FormData2, CombinedStream);
|
|
10725
10726
|
FormData2.LINE_BREAK = "\r\n";
|
|
10726
10727
|
FormData2.DEFAULT_CONTENT_TYPE = "application/octet-stream";
|
|
10727
10728
|
FormData2.prototype.append = function(field, value, options) {
|
|
10728
10729
|
options = options || {};
|
|
10729
|
-
if (typeof options
|
|
10730
|
+
if (typeof options === "string") {
|
|
10730
10731
|
options = { filename: options };
|
|
10731
10732
|
}
|
|
10732
10733
|
var append = CombinedStream.prototype.append.bind(this);
|
|
10733
|
-
if (typeof value
|
|
10734
|
-
value =
|
|
10734
|
+
if (typeof value === "number" || value == null) {
|
|
10735
|
+
value = String(value);
|
|
10735
10736
|
}
|
|
10736
10737
|
if (Array.isArray(value)) {
|
|
10737
10738
|
this._error(new Error("Arrays are not supported."));
|
|
@@ -10747,7 +10748,7 @@ var require_form_data = __commonJS({
|
|
|
10747
10748
|
FormData2.prototype._trackLength = function(header, value, options) {
|
|
10748
10749
|
var valueLength = 0;
|
|
10749
10750
|
if (options.knownLength != null) {
|
|
10750
|
-
valueLength +=
|
|
10751
|
+
valueLength += Number(options.knownLength);
|
|
10751
10752
|
} else if (Buffer.isBuffer(value)) {
|
|
10752
10753
|
valueLength = value.length;
|
|
10753
10754
|
} else if (typeof value === "string") {
|
|
@@ -10755,7 +10756,7 @@ var require_form_data = __commonJS({
|
|
|
10755
10756
|
}
|
|
10756
10757
|
this._valueLength += valueLength;
|
|
10757
10758
|
this._overheadLength += Buffer.byteLength(header) + FormData2.LINE_BREAK.length;
|
|
10758
|
-
if (!value || !value.path && !(value.readable &&
|
|
10759
|
+
if (!value || !value.path && !(value.readable && hasOwn(value, "httpVersion")) && !(value instanceof Stream)) {
|
|
10759
10760
|
return;
|
|
10760
10761
|
}
|
|
10761
10762
|
if (!options.knownLength) {
|
|
@@ -10763,26 +10764,25 @@ var require_form_data = __commonJS({
|
|
|
10763
10764
|
}
|
|
10764
10765
|
};
|
|
10765
10766
|
FormData2.prototype._lengthRetriever = function(value, callback) {
|
|
10766
|
-
if (
|
|
10767
|
+
if (hasOwn(value, "fd")) {
|
|
10767
10768
|
if (value.end != void 0 && value.end != Infinity && value.start != void 0) {
|
|
10768
10769
|
callback(null, value.end + 1 - (value.start ? value.start : 0));
|
|
10769
10770
|
} else {
|
|
10770
10771
|
fs.stat(value.path, function(err, stat) {
|
|
10771
|
-
var fileSize;
|
|
10772
10772
|
if (err) {
|
|
10773
10773
|
callback(err);
|
|
10774
10774
|
return;
|
|
10775
10775
|
}
|
|
10776
|
-
fileSize = stat.size - (value.start ? value.start : 0);
|
|
10776
|
+
var fileSize = stat.size - (value.start ? value.start : 0);
|
|
10777
10777
|
callback(null, fileSize);
|
|
10778
10778
|
});
|
|
10779
10779
|
}
|
|
10780
|
-
} else if (
|
|
10781
|
-
callback(null,
|
|
10782
|
-
} else if (
|
|
10780
|
+
} else if (hasOwn(value, "httpVersion")) {
|
|
10781
|
+
callback(null, Number(value.headers["content-length"]));
|
|
10782
|
+
} else if (hasOwn(value, "httpModule")) {
|
|
10783
10783
|
value.on("response", function(response) {
|
|
10784
10784
|
value.pause();
|
|
10785
|
-
callback(null,
|
|
10785
|
+
callback(null, Number(response.headers["content-length"]));
|
|
10786
10786
|
});
|
|
10787
10787
|
value.resume();
|
|
10788
10788
|
} else {
|
|
@@ -10790,7 +10790,7 @@ var require_form_data = __commonJS({
|
|
|
10790
10790
|
}
|
|
10791
10791
|
};
|
|
10792
10792
|
FormData2.prototype._multiPartHeader = function(field, value, options) {
|
|
10793
|
-
if (typeof options.header
|
|
10793
|
+
if (typeof options.header === "string") {
|
|
10794
10794
|
return options.header;
|
|
10795
10795
|
}
|
|
10796
10796
|
var contentDisposition = this._getContentDisposition(value, options);
|
|
@@ -10802,12 +10802,12 @@ var require_form_data = __commonJS({
|
|
|
10802
10802
|
// if no content type. allow it to be empty array
|
|
10803
10803
|
"Content-Type": [].concat(contentType || [])
|
|
10804
10804
|
};
|
|
10805
|
-
if (typeof options.header
|
|
10805
|
+
if (typeof options.header === "object") {
|
|
10806
10806
|
populate(headers, options.header);
|
|
10807
10807
|
}
|
|
10808
10808
|
var header;
|
|
10809
10809
|
for (var prop in headers) {
|
|
10810
|
-
if (
|
|
10810
|
+
if (hasOwn(headers, prop)) {
|
|
10811
10811
|
header = headers[prop];
|
|
10812
10812
|
if (header == null) {
|
|
10813
10813
|
continue;
|
|
@@ -10823,34 +10823,33 @@ var require_form_data = __commonJS({
|
|
|
10823
10823
|
return "--" + this.getBoundary() + FormData2.LINE_BREAK + contents + FormData2.LINE_BREAK;
|
|
10824
10824
|
};
|
|
10825
10825
|
FormData2.prototype._getContentDisposition = function(value, options) {
|
|
10826
|
-
var filename
|
|
10826
|
+
var filename;
|
|
10827
10827
|
if (typeof options.filepath === "string") {
|
|
10828
10828
|
filename = path.normalize(options.filepath).replace(/\\/g, "/");
|
|
10829
|
-
} else if (options.filename || value.name || value.path) {
|
|
10830
|
-
filename = path.basename(options.filename || value.name || value.path);
|
|
10831
|
-
} else if (value.readable &&
|
|
10829
|
+
} else if (options.filename || value && (value.name || value.path)) {
|
|
10830
|
+
filename = path.basename(options.filename || value && (value.name || value.path));
|
|
10831
|
+
} else if (value && value.readable && hasOwn(value, "httpVersion")) {
|
|
10832
10832
|
filename = path.basename(value.client._httpMessage.path || "");
|
|
10833
10833
|
}
|
|
10834
10834
|
if (filename) {
|
|
10835
|
-
|
|
10835
|
+
return 'filename="' + filename + '"';
|
|
10836
10836
|
}
|
|
10837
|
-
return contentDisposition;
|
|
10838
10837
|
};
|
|
10839
10838
|
FormData2.prototype._getContentType = function(value, options) {
|
|
10840
10839
|
var contentType = options.contentType;
|
|
10841
|
-
if (!contentType && value.name) {
|
|
10840
|
+
if (!contentType && value && value.name) {
|
|
10842
10841
|
contentType = mime.lookup(value.name);
|
|
10843
10842
|
}
|
|
10844
|
-
if (!contentType && value.path) {
|
|
10843
|
+
if (!contentType && value && value.path) {
|
|
10845
10844
|
contentType = mime.lookup(value.path);
|
|
10846
10845
|
}
|
|
10847
|
-
if (!contentType && value.readable &&
|
|
10846
|
+
if (!contentType && value && value.readable && hasOwn(value, "httpVersion")) {
|
|
10848
10847
|
contentType = value.headers["content-type"];
|
|
10849
10848
|
}
|
|
10850
10849
|
if (!contentType && (options.filepath || options.filename)) {
|
|
10851
10850
|
contentType = mime.lookup(options.filepath || options.filename);
|
|
10852
10851
|
}
|
|
10853
|
-
if (!contentType && typeof value
|
|
10852
|
+
if (!contentType && value && typeof value === "object") {
|
|
10854
10853
|
contentType = FormData2.DEFAULT_CONTENT_TYPE;
|
|
10855
10854
|
}
|
|
10856
10855
|
return contentType;
|
|
@@ -10874,13 +10873,16 @@ var require_form_data = __commonJS({
|
|
|
10874
10873
|
"content-type": "multipart/form-data; boundary=" + this.getBoundary()
|
|
10875
10874
|
};
|
|
10876
10875
|
for (header in userHeaders) {
|
|
10877
|
-
if (
|
|
10876
|
+
if (hasOwn(userHeaders, header)) {
|
|
10878
10877
|
formHeaders[header.toLowerCase()] = userHeaders[header];
|
|
10879
10878
|
}
|
|
10880
10879
|
}
|
|
10881
10880
|
return formHeaders;
|
|
10882
10881
|
};
|
|
10883
10882
|
FormData2.prototype.setBoundary = function(boundary) {
|
|
10883
|
+
if (typeof boundary !== "string") {
|
|
10884
|
+
throw new TypeError("FormData boundary must be a string");
|
|
10885
|
+
}
|
|
10884
10886
|
this._boundary = boundary;
|
|
10885
10887
|
};
|
|
10886
10888
|
FormData2.prototype.getBoundary = function() {
|
|
@@ -10907,11 +10909,7 @@ var require_form_data = __commonJS({
|
|
|
10907
10909
|
return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]);
|
|
10908
10910
|
};
|
|
10909
10911
|
FormData2.prototype._generateBoundary = function() {
|
|
10910
|
-
|
|
10911
|
-
for (var i = 0; i < 24; i++) {
|
|
10912
|
-
boundary += Math.floor(Math.random() * 10).toString(16);
|
|
10913
|
-
}
|
|
10914
|
-
this._boundary = boundary;
|
|
10912
|
+
this._boundary = "--------------------------" + crypto4.randomBytes(12).toString("hex");
|
|
10915
10913
|
};
|
|
10916
10914
|
FormData2.prototype.getLengthSync = function() {
|
|
10917
10915
|
var knownLength = this._overheadLength + this._valueLength;
|
|
@@ -10951,8 +10949,10 @@ var require_form_data = __commonJS({
|
|
|
10951
10949
|
});
|
|
10952
10950
|
};
|
|
10953
10951
|
FormData2.prototype.submit = function(params, cb) {
|
|
10954
|
-
var request
|
|
10955
|
-
|
|
10952
|
+
var request;
|
|
10953
|
+
var options;
|
|
10954
|
+
var defaults = { method: "post" };
|
|
10955
|
+
if (typeof params === "string") {
|
|
10956
10956
|
params = parseUrl(params);
|
|
10957
10957
|
options = populate({
|
|
10958
10958
|
port: params.port,
|
|
@@ -10963,11 +10963,11 @@ var require_form_data = __commonJS({
|
|
|
10963
10963
|
} else {
|
|
10964
10964
|
options = populate(params, defaults);
|
|
10965
10965
|
if (!options.port) {
|
|
10966
|
-
options.port = options.protocol
|
|
10966
|
+
options.port = options.protocol === "https:" ? 443 : 80;
|
|
10967
10967
|
}
|
|
10968
10968
|
}
|
|
10969
10969
|
options.headers = this.getHeaders(params.headers);
|
|
10970
|
-
if (options.protocol
|
|
10970
|
+
if (options.protocol === "https:") {
|
|
10971
10971
|
request = https.request(options);
|
|
10972
10972
|
} else {
|
|
10973
10973
|
request = http.request(options);
|
|
@@ -11006,6 +11006,7 @@ var require_form_data = __commonJS({
|
|
|
11006
11006
|
return "[object FormData]";
|
|
11007
11007
|
};
|
|
11008
11008
|
setToStringTag(FormData2, "FormData");
|
|
11009
|
+
module.exports = FormData2;
|
|
11009
11010
|
}
|
|
11010
11011
|
});
|
|
11011
11012
|
|
|
@@ -31068,10 +31069,16 @@ var require_lib2 = __commonJS({
|
|
|
31068
31069
|
"../../node_modules/@scure/base/lib/index.js"(exports) {
|
|
31069
31070
|
"use strict";
|
|
31070
31071
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31071
|
-
exports.bytes = exports.stringToBytes = exports.str = exports.bytesToString = exports.hex = exports.utf8 = exports.bech32m = exports.bech32 = exports.base58check = exports.createBase58check = exports.base58xmr = exports.base58xrp = exports.base58flickr = exports.base58 = exports.base64urlnopad = exports.base64url = exports.base64nopad = exports.base64 = exports.base32crockford = exports.base32hexnopad = exports.base32hex = exports.base32nopad = exports.base32 = exports.base16 = exports.utils =
|
|
31072
|
+
exports.bytes = exports.stringToBytes = exports.str = exports.bytesToString = exports.hex = exports.utf8 = exports.bech32m = exports.bech32 = exports.base58check = exports.createBase58check = exports.base58xmr = exports.base58xrp = exports.base58flickr = exports.base58 = exports.base64urlnopad = exports.base64url = exports.base64nopad = exports.base64 = exports.base32crockford = exports.base32hexnopad = exports.base32hex = exports.base32nopad = exports.base32 = exports.base16 = exports.utils = void 0;
|
|
31072
31073
|
function isBytes2(a) {
|
|
31073
31074
|
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
|
|
31074
31075
|
}
|
|
31076
|
+
function abytes(b, ...lengths) {
|
|
31077
|
+
if (!isBytes2(b))
|
|
31078
|
+
throw new Error("Uint8Array expected");
|
|
31079
|
+
if (lengths.length > 0 && !lengths.includes(b.length))
|
|
31080
|
+
throw new Error("Uint8Array expected of length " + lengths + ", got length=" + b.length);
|
|
31081
|
+
}
|
|
31075
31082
|
function isArrayOf(isString, arr) {
|
|
31076
31083
|
if (!Array.isArray(arr))
|
|
31077
31084
|
return false;
|
|
@@ -31097,7 +31104,6 @@ var require_lib2 = __commonJS({
|
|
|
31097
31104
|
if (!Number.isSafeInteger(n))
|
|
31098
31105
|
throw new Error(`invalid integer: ${n}`);
|
|
31099
31106
|
}
|
|
31100
|
-
exports.assertNumber = anumber;
|
|
31101
31107
|
function aArr(input) {
|
|
31102
31108
|
if (!Array.isArray(input))
|
|
31103
31109
|
throw new Error("array expected");
|
|
@@ -31371,9 +31377,34 @@ var require_lib2 = __commonJS({
|
|
|
31371
31377
|
exports.base32hex = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(5), /* @__PURE__ */ alphabet("0123456789ABCDEFGHIJKLMNOPQRSTUV"), /* @__PURE__ */ padding(5), /* @__PURE__ */ join(""));
|
|
31372
31378
|
exports.base32hexnopad = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(5), /* @__PURE__ */ alphabet("0123456789ABCDEFGHIJKLMNOPQRSTUV"), /* @__PURE__ */ join(""));
|
|
31373
31379
|
exports.base32crockford = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(5), /* @__PURE__ */ alphabet("0123456789ABCDEFGHJKMNPQRSTVWXYZ"), /* @__PURE__ */ join(""), /* @__PURE__ */ normalize((s) => s.toUpperCase().replace(/O/g, "0").replace(/[IL]/g, "1")));
|
|
31374
|
-
|
|
31380
|
+
var hasBase64Builtin = /* @__PURE__ */ (() => typeof Uint8Array.from([]).toBase64 === "function" && typeof Uint8Array.fromBase64 === "function")();
|
|
31381
|
+
var decodeBase64Builtin = (s, isUrl) => {
|
|
31382
|
+
astr("base64", s);
|
|
31383
|
+
const re = isUrl ? /^[A-Za-z0-9=_-]+$/ : /^[A-Za-z0-9=+/]+$/;
|
|
31384
|
+
const alphabet2 = isUrl ? "base64url" : "base64";
|
|
31385
|
+
if (s.length > 0 && !re.test(s))
|
|
31386
|
+
throw new Error("invalid base64");
|
|
31387
|
+
return Uint8Array.fromBase64(s, { alphabet: alphabet2, lastChunkHandling: "strict" });
|
|
31388
|
+
};
|
|
31389
|
+
exports.base64 = hasBase64Builtin ? {
|
|
31390
|
+
encode(b) {
|
|
31391
|
+
abytes(b);
|
|
31392
|
+
return b.toBase64();
|
|
31393
|
+
},
|
|
31394
|
+
decode(s) {
|
|
31395
|
+
return decodeBase64Builtin(s, false);
|
|
31396
|
+
}
|
|
31397
|
+
} : /* @__PURE__ */ chain(/* @__PURE__ */ radix2(6), /* @__PURE__ */ alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"), /* @__PURE__ */ padding(6), /* @__PURE__ */ join(""));
|
|
31375
31398
|
exports.base64nopad = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(6), /* @__PURE__ */ alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"), /* @__PURE__ */ join(""));
|
|
31376
|
-
exports.base64url =
|
|
31399
|
+
exports.base64url = hasBase64Builtin ? {
|
|
31400
|
+
encode(b) {
|
|
31401
|
+
abytes(b);
|
|
31402
|
+
return b.toBase64({ alphabet: "base64url" });
|
|
31403
|
+
},
|
|
31404
|
+
decode(s) {
|
|
31405
|
+
return decodeBase64Builtin(s, true);
|
|
31406
|
+
}
|
|
31407
|
+
} : /* @__PURE__ */ chain(/* @__PURE__ */ radix2(6), /* @__PURE__ */ alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"), /* @__PURE__ */ padding(6), /* @__PURE__ */ join(""));
|
|
31377
31408
|
exports.base64urlnopad = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(6), /* @__PURE__ */ alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"), /* @__PURE__ */ join(""));
|
|
31378
31409
|
var genBase58 = /* @__NO_SIDE_EFFECTS__ */ (abc) => /* @__PURE__ */ chain(/* @__PURE__ */ radix(58), /* @__PURE__ */ alphabet(abc), /* @__PURE__ */ join(""));
|
|
31379
31410
|
exports.base58 = /* @__PURE__ */ genBase58("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");
|
|
@@ -31505,7 +31536,18 @@ var require_lib2 = __commonJS({
|
|
|
31505
31536
|
encode: (data) => new TextDecoder().decode(data),
|
|
31506
31537
|
decode: (str) => new TextEncoder().encode(str)
|
|
31507
31538
|
};
|
|
31508
|
-
|
|
31539
|
+
var hasHexBuiltin = /* @__PURE__ */ (() => typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function")();
|
|
31540
|
+
var hexBuiltin = {
|
|
31541
|
+
encode(data) {
|
|
31542
|
+
abytes(data);
|
|
31543
|
+
return data.toHex();
|
|
31544
|
+
},
|
|
31545
|
+
decode(s) {
|
|
31546
|
+
astr("hex", s);
|
|
31547
|
+
return Uint8Array.fromHex(s);
|
|
31548
|
+
}
|
|
31549
|
+
};
|
|
31550
|
+
exports.hex = hasHexBuiltin ? hexBuiltin : /* @__PURE__ */ chain(/* @__PURE__ */ radix2(4), /* @__PURE__ */ alphabet("0123456789abcdef"), /* @__PURE__ */ join(""), /* @__PURE__ */ normalize((s) => {
|
|
31509
31551
|
if (typeof s !== "string" || s.length % 2 !== 0)
|
|
31510
31552
|
throw new TypeError(`hex.decode: expected string, got ${typeof s} with length ${s.length}`);
|
|
31511
31553
|
return s.toLowerCase();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appliedblockchain/silentdatarollup-ethers-provider-fireblocks",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Ethers.js provider for Silent Data [Rollup] with Fireblocks integration",
|
|
5
5
|
"author": "Applied Blockchain",
|
|
6
6
|
"homepage": "https://github.com/appliedblockchain/silent-data-rollup-providers#readme",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"prepack": "npm run build"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@appliedblockchain/silentdatarollup-core": "1.0.
|
|
35
|
+
"@appliedblockchain/silentdatarollup-core": "1.0.2",
|
|
36
36
|
"@fireblocks/fireblocks-web3-provider": "1.3.8",
|
|
37
37
|
"debug": "4.3.4",
|
|
38
38
|
"ethers": "6.13.2"
|