Updated dist files.

This commit is contained in:
Richard Moore 2020-09-05 23:35:35 -04:00
parent cadb28d6b3
commit 0234cfbbef
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651
60 changed files with 252 additions and 122 deletions

View File

@ -1,7 +1,14 @@
Changelog
=========
This change log is managed by `scripts/cmds/update-versions` but may be manually updated.
This change log is managed by `admin/cmds/update-versions` but may be manually updated.
ethers/v5.0.11 (2020-09-05 23:33)
---------------------------------
- Fixed LedgerSigner sendTransaction. ([#936](https://github.com/ethers-io/ethers.js/issues/936); [cadb28d](https://github.com/ethers-io/ethers.js/commit/cadb28d6b364e68e43a06f7a9b8a31797afbd920))
- Added BrainWallet to experimental exports. ([72385c2](https://github.com/ethers-io/ethers.js/commit/72385c228783a3158511b3cddc5cb4f9ce1dddae))
- More readable server errors. ([201e5ce](https://github.com/ethers-io/ethers.js/commit/201e5ced9c38da2de1dd7518ffbf24284d477e80))
ethers/v5.0.10 (2020-09-05 01:21)
---------------------------------

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -16485,7 +16485,7 @@ function computePublicKey(key, compressed) {
return logger$g.throwArgumentError("invalid public or private key", "key", "[REDACTED]");
}
const version$e = "transactions/5.0.3";
const version$e = "transactions/5.0.4";
"use strict";
const logger$h = new Logger(version$e);
@ -16557,7 +16557,7 @@ function serialize(transaction, signature) {
}
// We have an EIP-155 transaction (chainId was specified and non-zero)
if (chainId !== 0) {
raw.push(hexlify(chainId));
raw.push(hexlify(chainId)); // @TODO: hexValue?
raw.push("0x");
raw.push("0x");
}
@ -19233,7 +19233,7 @@ var browser$2 = /*#__PURE__*/Object.freeze({
encode: encode$1
});
const version$l = "web/5.0.4";
const version$l = "web/5.0.5";
"use strict";
var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
@ -19298,6 +19298,25 @@ function staller(duration) {
setTimeout(resolve, duration);
});
}
function bodyify(value, type) {
if (value == null) {
return null;
}
if (typeof (value) === "string") {
return value;
}
if (isBytesLike(value)) {
if (type && (type.split("/")[0] === "text" || type === "application/json")) {
try {
return toUtf8String(value);
}
catch (error) { }
;
}
return hexlify(value);
}
return value;
}
// This API is still a work in progress; the future changes will likely be:
// - ConnectionInfo => FetchDataRequest<T = any>
// - FetchDataRequest.body? = string | Uint8Array | { contentType: string, data: string | Uint8Array }
@ -19372,7 +19391,7 @@ function _fetchData(connection, body, processFunc) {
}
timer = null;
reject(logger$p.makeError("timeout", Logger.errors.TIMEOUT, {
requestBody: (options.body || null),
requestBody: bodyify(options.body, flatHeaders["content-type"]),
requestMethod: options.method,
timeout: timeout,
url: url
@ -19421,7 +19440,7 @@ function _fetchData(connection, body, processFunc) {
if (response == null) {
runningTimeout.cancel();
logger$p.throwError("missing response", Logger.errors.SERVER_ERROR, {
requestBody: (options.body || null),
requestBody: bodyify(options.body, flatHeaders["content-type"]),
requestMethod: options.method,
serverError: error,
url: url
@ -19437,8 +19456,8 @@ function _fetchData(connection, body, processFunc) {
logger$p.throwError("bad response", Logger.errors.SERVER_ERROR, {
status: response.statusCode,
headers: response.headers,
body: body,
requestBody: (options.body || null),
body: bodyify(body, ((response.headers) ? response.headers["content-type"] : null)),
requestBody: bodyify(options.body, flatHeaders["content-type"]),
requestMethod: options.method,
url: url
});
@ -19465,9 +19484,9 @@ function _fetchData(connection, body, processFunc) {
}
runningTimeout.cancel();
logger$p.throwError("processing response error", Logger.errors.SERVER_ERROR, {
body: body,
body: bodyify(body, ((response.headers) ? response.headers["content-type"] : null)),
error: error,
requestBody: (options.body || null),
requestBody: bodyify(options.body, flatHeaders["content-type"]),
requestMethod: options.method,
url: url
});
@ -19479,7 +19498,7 @@ function _fetchData(connection, body, processFunc) {
return body;
}
return logger$p.throwError("failed response", Logger.errors.SERVER_ERROR, {
requestBody: (options.body || null),
requestBody: bodyify(options.body, flatHeaders["content-type"]),
requestMethod: options.method,
url: url
});
@ -23852,7 +23871,7 @@ var utils$1 = /*#__PURE__*/Object.freeze({
Indexed: Indexed
});
const version$o = "ethers/5.0.10";
const version$o = "ethers/5.0.11";
"use strict";
const logger$E = new Logger(version$o);

File diff suppressed because one or more lines are too long

View File

@ -17802,7 +17802,7 @@
var _version$s = createCommonjsModule(function (module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "transactions/5.0.3";
exports.version = "transactions/5.0.4";
});
@ -17900,7 +17900,7 @@
}
// We have an EIP-155 transaction (chainId was specified and non-zero)
if (chainId !== 0) {
raw.push(lib$1.hexlify(chainId));
raw.push(lib$1.hexlify(chainId)); // @TODO: hexValue?
raw.push("0x");
raw.push("0x");
}
@ -21007,7 +21007,7 @@
var _version$G = createCommonjsModule(function (module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "web/5.0.4";
exports.version = "web/5.0.5";
});
@ -21151,6 +21151,7 @@
var logger = new lib.Logger(_version$G.version);
function staller(duration) {
@ -21158,6 +21159,25 @@
setTimeout(resolve, duration);
});
}
function bodyify(value, type) {
if (value == null) {
return null;
}
if (typeof (value) === "string") {
return value;
}
if (lib$1.isBytesLike(value)) {
if (type && (type.split("/")[0] === "text" || type === "application/json")) {
try {
return lib$8.toUtf8String(value);
}
catch (error) { }
;
}
return lib$1.hexlify(value);
}
return value;
}
// This API is still a work in progress; the future changes will likely be:
// - ConnectionInfo => FetchDataRequest<T = any>
// - FetchDataRequest.body? = string | Uint8Array | { contentType: string, data: string | Uint8Array }
@ -21232,7 +21252,7 @@
}
timer = null;
reject(logger.makeError("timeout", lib.Logger.errors.TIMEOUT, {
requestBody: (options.body || null),
requestBody: bodyify(options.body, flatHeaders["content-type"]),
requestMethod: options.method,
timeout: timeout,
url: url
@ -21296,7 +21316,7 @@
if (response == null) {
runningTimeout.cancel();
logger.throwError("missing response", lib.Logger.errors.SERVER_ERROR, {
requestBody: (options.body || null),
requestBody: bodyify(options.body, flatHeaders["content-type"]),
requestMethod: options.method,
serverError: error_1,
url: url
@ -21313,8 +21333,8 @@
logger.throwError("bad response", lib.Logger.errors.SERVER_ERROR, {
status: response.statusCode,
headers: response.headers,
body: body_1,
requestBody: (options.body || null),
body: bodyify(body_1, ((response.headers) ? response.headers["content-type"] : null)),
requestBody: bodyify(options.body, flatHeaders["content-type"]),
requestMethod: options.method,
url: url
});
@ -21349,9 +21369,9 @@
case 16:
runningTimeout.cancel();
logger.throwError("processing response error", lib.Logger.errors.SERVER_ERROR, {
body: body_1,
body: bodyify(body_1, ((response.headers) ? response.headers["content-type"] : null)),
error: error_2,
requestBody: (options.body || null),
requestBody: bodyify(options.body, flatHeaders["content-type"]),
requestMethod: options.method,
url: url
});
@ -21365,7 +21385,7 @@
attempt++;
return [3 /*break*/, 1];
case 19: return [2 /*return*/, logger.throwError("failed response", lib.Logger.errors.SERVER_ERROR, {
requestBody: (options.body || null),
requestBody: bodyify(options.body, flatHeaders["content-type"]),
requestMethod: options.method,
url: url
})];
@ -27101,7 +27121,7 @@
var _version$M = createCommonjsModule(function (module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "ethers/5.0.10";
exports.version = "ethers/5.0.11";
});

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
export declare const version = "ethers/5.0.10";
export declare const version = "ethers/5.0.11";

View File

@ -1,2 +1,2 @@
export const version = "ethers/5.0.10";
export const version = "ethers/5.0.11";
//# sourceMappingURL=_version.js.map

View File

@ -1 +1 @@
export declare const version = "ethers/5.0.10";
export declare const version = "ethers/5.0.11";

View File

@ -1,4 +1,4 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "ethers/5.0.10";
exports.version = "ethers/5.0.11";
//# sourceMappingURL=_version.js.map

View File

@ -50,7 +50,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"tarballHash": "0x39aac3f26eeafe54471a075fdb03ab9ea83f6c0fb0d672a356ad1705e7982b8e",
"tarballHash": "0x1a2a6a4d32b1a2157504de2038370676ae2df70bbe763c4546d03e17d127116f",
"types": "./lib/index.d.ts",
"version": "5.0.10"
"version": "5.0.11"
}

View File

@ -1 +1 @@
export const version = "ethers/5.0.10";
export const version = "ethers/5.0.11";

View File

@ -1 +1 @@
export declare const version = "experimental/5.0.2";
export declare const version = "experimental/5.0.3";

View File

@ -1,2 +1,2 @@
export const version = "experimental/5.0.2";
export const version = "experimental/5.0.3";
//# sourceMappingURL=_version.js.map

View File

@ -1,2 +1,3 @@
import { BrainWallet } from "./brain-wallet";
import { NonceManager } from "./nonce-manager";
export { NonceManager };
export { BrainWallet, NonceManager };

View File

@ -1,4 +1,5 @@
"use strict";
import { BrainWallet } from "./brain-wallet";
import { NonceManager } from "./nonce-manager";
export { NonceManager };
export { BrainWallet, NonceManager };
//# sourceMappingURL=index.js.map

View File

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EACH,YAAY,EACf,CAAA"}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EACH,WAAW,EACX,YAAY,EACf,CAAA"}

View File

@ -1 +1 @@
export declare const version = "experimental/5.0.2";
export declare const version = "experimental/5.0.3";

View File

@ -1,4 +1,4 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "experimental/5.0.2";
exports.version = "experimental/5.0.3";
//# sourceMappingURL=_version.js.map

View File

@ -1,2 +1,3 @@
import { BrainWallet } from "./brain-wallet";
import { NonceManager } from "./nonce-manager";
export { NonceManager };
export { BrainWallet, NonceManager };

View File

@ -1,5 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var brain_wallet_1 = require("./brain-wallet");
exports.BrainWallet = brain_wallet_1.BrainWallet;
var nonce_manager_1 = require("./nonce-manager");
exports.NonceManager = nonce_manager_1.NonceManager;
//# sourceMappingURL=index.js.map

View File

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,iDAA+C;AAG3C,uBAHK,4BAAY,CAGL"}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,+CAA6C;AAIzC,sBAJK,0BAAW,CAIL;AAHf,iDAA+C;AAI3C,uBAJK,4BAAY,CAIL"}

View File

@ -26,7 +26,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"tarballHash": "0xb85fff99aa7dfe03a7cd5f76ef21fc70992c6d02542cd157c79f7eaf62d26bba",
"tarballHash": "0xc761cb198c017af53b5224e86bcca4be6e96cb4b3b9ce3dd953b5d7fe18a4680",
"types": "./lib/index.d.ts",
"version": "5.0.2"
"version": "5.0.3"
}

View File

@ -1 +1 @@
export const version = "experimental/5.0.2";
export const version = "experimental/5.0.3";

View File

@ -8,7 +8,7 @@ else {
ethers = w._ethers;
}
const version = "hardware-wallets/5.0.4";
const version = "hardware-wallets/5.0.5";
var global$1 = (typeof global !== "undefined" ? global :
typeof self !== "undefined" ? self :
@ -4327,11 +4327,20 @@ class LedgerSigner extends ethers.Signer {
}
signTransaction(transaction) {
return __awaiter(this, void 0, void 0, function* () {
const tx = transaction = yield ethers.utils.resolveProperties(transaction);
const unsignedTx = ethers.utils.serializeTransaction(tx).substring(2);
const tx = yield ethers.utils.resolveProperties(transaction);
const baseTx = {
chainId: (tx.chainId || undefined),
data: (tx.data || undefined),
gasLimit: (tx.gasLimit || undefined),
gasPrice: (tx.gasPrice || undefined),
nonce: (tx.nonce ? ethers.BigNumber.from(tx.nonce).toNumber() : undefined),
to: (tx.to || undefined),
value: (tx.value || undefined),
};
const unsignedTx = ethers.utils.serializeTransaction(baseTx).substring(2);
const sig = yield this._retry((eth) => eth.signTransaction(this.path, unsignedTx));
return ethers.utils.serializeTransaction(tx, {
v: sig.v,
return ethers.utils.serializeTransaction(baseTx, {
v: ethers.BigNumber.from("0x" + sig.v).toNumber(),
r: ("0x" + sig.r),
s: ("0x" + sig.s),
});

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
export declare const version = "hardware-wallets/5.0.4";
export declare const version = "hardware-wallets/5.0.5";

View File

@ -1,2 +1,2 @@
export const version = "hardware-wallets/5.0.4";
export const version = "hardware-wallets/5.0.5";
//# sourceMappingURL=_version.js.map

View File

@ -91,11 +91,20 @@ export class LedgerSigner extends ethers.Signer {
}
signTransaction(transaction) {
return __awaiter(this, void 0, void 0, function* () {
const tx = transaction = yield ethers.utils.resolveProperties(transaction);
const unsignedTx = ethers.utils.serializeTransaction(tx).substring(2);
const tx = yield ethers.utils.resolveProperties(transaction);
const baseTx = {
chainId: (tx.chainId || undefined),
data: (tx.data || undefined),
gasLimit: (tx.gasLimit || undefined),
gasPrice: (tx.gasPrice || undefined),
nonce: (tx.nonce ? ethers.BigNumber.from(tx.nonce).toNumber() : undefined),
to: (tx.to || undefined),
value: (tx.value || undefined),
};
const unsignedTx = ethers.utils.serializeTransaction(baseTx).substring(2);
const sig = yield this._retry((eth) => eth.signTransaction(this.path, unsignedTx));
return ethers.utils.serializeTransaction(tx, {
v: sig.v,
return ethers.utils.serializeTransaction(baseTx, {
v: ethers.BigNumber.from("0x" + sig.v).toNumber(),
r: ("0x" + sig.r),
s: ("0x" + sig.s),
});

View File

@ -1 +1 @@
{"version":3,"file":"ledger.js","sourceRoot":"","sources":["../src.ts/ledger.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAEb,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,KAAK,CA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C,CAAC;YAC1E,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC;YAEnF,OAAO,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,MAAM,EAAE;gBAC7C,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;gBACjD,CAAC,EAAE,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC;gBACjB,CAAC,EAAE,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC;aACpB,CAAC,CAAC;QACP,CAAC;KAAA;IAED,OAAO,CAAC,QAAmC;QACvC,OAAO,IAAI,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC;CACJ"}

View File

@ -1 +1 @@
export declare const version = "hardware-wallets/5.0.4";
export declare const version = "hardware-wallets/5.0.5";

View File

@ -1,4 +1,4 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "hardware-wallets/5.0.4";
exports.version = "hardware-wallets/5.0.5";
//# sourceMappingURL=_version.js.map

View File

@ -174,19 +174,28 @@ var LedgerSigner = /** @class */ (function (_super) {
};
LedgerSigner.prototype.signTransaction = function (transaction) {
return __awaiter(this, void 0, void 0, function () {
var tx, unsignedTx, sig;
var tx, baseTx, unsignedTx, sig;
var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, ethers_1.ethers.utils.resolveProperties(transaction)];
case 1:
tx = transaction = _a.sent();
unsignedTx = ethers_1.ethers.utils.serializeTransaction(tx).substring(2);
tx = _a.sent();
baseTx = {
chainId: (tx.chainId || undefined),
data: (tx.data || undefined),
gasLimit: (tx.gasLimit || undefined),
gasPrice: (tx.gasPrice || undefined),
nonce: (tx.nonce ? ethers_1.ethers.BigNumber.from(tx.nonce).toNumber() : undefined),
to: (tx.to || undefined),
value: (tx.value || undefined),
};
unsignedTx = ethers_1.ethers.utils.serializeTransaction(baseTx).substring(2);
return [4 /*yield*/, this._retry(function (eth) { return eth.signTransaction(_this.path, unsignedTx); })];
case 2:
sig = _a.sent();
return [2 /*return*/, ethers_1.ethers.utils.serializeTransaction(tx, {
v: sig.v,
return [2 /*return*/, ethers_1.ethers.utils.serializeTransaction(baseTx, {
v: ethers_1.ethers.BigNumber.from("0x" + sig.v).toNumber(),
r: ("0x" + sig.r),
s: ("0x" + sig.s),
})];

View File

@ -1 +1 @@
{"version":3,"file":"ledger.js","sourceRoot":"","sources":["../src.ts/ledger.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,iCAAgC;AAEhC,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,KAAK,CAAC,MAAM,CAAC,kBAAO,CAAC,CAAC;AAEhD,oEAAuC;AAEvC,wEAAwE;AACxE,2EAA2E;AAC3E,qCAAqC;AACrC,uDAAgD;AAEhD,IAAM,WAAW,GAAG,kBAAkB,CAAC;AAEvC,SAAS,MAAM,CAAC,QAAgB;IAC7B,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO;QACvB,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;AACN,CAAC;AAED;IAAkC,gCAAa;IAM3C,sBAAY,QAAoC,EAAE,IAAa,EAAE,IAAa;QAA9E,YACI,iBAAO,SAqBV;QApBG,IAAI,IAAI,IAAI,IAAI,EAAE;YAAE,IAAI,GAAG,WAAW,CAAC;SAAE;QACzC,IAAI,IAAI,IAAI,IAAI,EAAE;YAAE,IAAI,GAAG,SAAS,CAAC;SAAE;QAEvC,eAAM,CAAC,KAAK,C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C,IAAI,CAAC,CAAC;IAC5D,CAAC;IACL,mBAAC;AAAD,CAAC,AAlGD,CAAkC,eAAM,CAAC,MAAM,GAkG9C;AAlGY,oCAAY"}

View File

@ -45,7 +45,7 @@
"scripts": {
"test": "exit 1"
},
"tarballHash": "0xcdbf3ef8d6304cbaedae2b6b9274f2f7dbd95bfe498f60055a77d546e153fb6d",
"tarballHash": "0x6c04df768c2be8c46950617e2e0e62022d3df79b1d803fa4c3c8e7c8e93afcca",
"types": "./lib/index.d.ts",
"version": "5.0.4"
"version": "5.0.5"
}

View File

@ -1 +1 @@
export const version = "hardware-wallets/5.0.4";
export const version = "hardware-wallets/5.0.5";

View File

@ -1,6 +1,7 @@
{
"_ethers_nobuild": true,
"author": "Richard Moore <me@ricmoo.com>",
"browser": "./dist/index.min.js",
"description": "Shims required for ethers in constrained environments.",
"devDependencies": {
"browserify": "16.2.3",
@ -26,7 +27,7 @@
"dist": "browserify ./src/index.js -o ./dist/index.js && uglifyjs --compress --mangle --output ./dist/index.min.js -- ./dist/index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"tarballHash": "0x467b15771855ef575183199ea61680632cd68f35f62cdefcbcdf14a4316e8782",
"tarballHash": "0xe67b67d07dc853542e750860c5e34b9f59f5c387c5b5043aa1ff639858668e8f",
"types": "./lib/index.d.ts",
"version": "5.0.4"
"version": "5.0.5"
}

View File

@ -420,22 +420,32 @@ UChar.udata={
unorm.shimApplied = false;
if (!String.prototype.normalize) {
String.prototype.normalize = function(form) {
var str = "" + this;
form = form === undefined ? "NFC" : form;
Object.defineProperty(String.prototype, "normalize", {
enumerable: false,
configurable: true,
writable: true,
value: function normalize (/*form*/) {
var str = "" + this;
var form = arguments[0] === undefined ? "NFC" : arguments[0];
if (form === "NFC") {
return unorm.nfc(str);
} else if (form === "NFD") {
return unorm.nfd(str);
} else if (form === "NFKC") {
return unorm.nfkc(str);
} else if (form === "NFKD") {
return unorm.nfkd(str);
} else {
throw new RangeError("Invalid normalization form: " + form);
if (this === null || this === undefined) {
throw new TypeError("Cannot call method on " + Object.prototype.toString.call(this));
}
if (form === "NFC") {
return unorm.nfc(str);
} else if (form === "NFD") {
return unorm.nfd(str);
} else if (form === "NFKC") {
return unorm.nfkc(str);
} else if (form === "NFKD") {
return unorm.nfkd(str);
} else {
throw new RangeError("Invalid normalization form: " + form);
}
}
};
});
unorm.shimApplied = true;
}

View File

@ -1 +1 @@
export declare const version = "transactions/5.0.3";
export declare const version = "transactions/5.0.4";

View File

@ -1,2 +1,2 @@
export const version = "transactions/5.0.3";
export const version = "transactions/5.0.4";
//# sourceMappingURL=_version.js.map

View File

@ -78,7 +78,7 @@ export function serialize(transaction, signature) {
}
// We have an EIP-155 transaction (chainId was specified and non-zero)
if (chainId !== 0) {
raw.push(hexlify(chainId));
raw.push(hexlify(chainId)); // @TODO: hexValue?
raw.push("0x");
raw.push("0x");
}

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
export declare const version = "transactions/5.0.3";
export declare const version = "transactions/5.0.4";

View File

@ -1,4 +1,4 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "transactions/5.0.3";
exports.version = "transactions/5.0.4";
//# sourceMappingURL=_version.js.map

View File

@ -88,7 +88,7 @@ function serialize(transaction, signature) {
}
// We have an EIP-155 transaction (chainId was specified and non-zero)
if (chainId !== 0) {
raw.push(bytes_1.hexlify(chainId));
raw.push(bytes_1.hexlify(chainId)); // @TODO: hexValue?
raw.push("0x");
raw.push("0x");
}

File diff suppressed because one or more lines are too long

View File

@ -31,7 +31,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"tarballHash": "0x28e9fbfdc5d14eb65721619ad4b1c85825da6291237d653bff3bd0528ab88799",
"tarballHash": "0x19ca05e60c577153cfe14359a406456d09e288360583b149c136347bb085bc47",
"types": "./lib/index.d.ts",
"version": "5.0.3"
"version": "5.0.4"
}

View File

@ -1 +1 @@
export const version = "transactions/5.0.3";
export const version = "transactions/5.0.4";

View File

@ -125,7 +125,7 @@ export function serialize(transaction: UnsignedTransaction, signature?: Signatur
// We have an EIP-155 transaction (chainId was specified and non-zero)
if (chainId !== 0) {
raw.push(hexlify(chainId));
raw.push(hexlify(chainId)); // @TODO: hexValue?
raw.push("0x");
raw.push("0x");
}
@ -164,6 +164,7 @@ export function serialize(transaction: UnsignedTransaction, signature?: Signatur
export function parse(rawTransaction: BytesLike): Transaction {
const transaction = RLP.decode(rawTransaction);
if (transaction.length !== 9 && transaction.length !== 6) {
logger.throwArgumentError("invalid raw transaction", "rawTransaction", rawTransaction);
}

View File

@ -1 +1 @@
export declare const version = "web/5.0.4";
export declare const version = "web/5.0.5";

View File

@ -1,2 +1,2 @@
export const version = "web/5.0.4";
export const version = "web/5.0.5";
//# sourceMappingURL=_version.js.map

View File

@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
import { encode as base64Encode } from "@ethersproject/base64";
import { hexlify, isBytesLike } from "@ethersproject/bytes";
import { shallowCopy } from "@ethersproject/properties";
import { toUtf8Bytes, toUtf8String } from "@ethersproject/strings";
import { Logger } from "@ethersproject/logger";
@ -20,6 +21,25 @@ function staller(duration) {
setTimeout(resolve, duration);
});
}
function bodyify(value, type) {
if (value == null) {
return null;
}
if (typeof (value) === "string") {
return value;
}
if (isBytesLike(value)) {
if (type && (type.split("/")[0] === "text" || type === "application/json")) {
try {
return toUtf8String(value);
}
catch (error) { }
;
}
return hexlify(value);
}
return value;
}
// This API is still a work in progress; the future changes will likely be:
// - ConnectionInfo => FetchDataRequest<T = any>
// - FetchDataRequest.body? = string | Uint8Array | { contentType: string, data: string | Uint8Array }
@ -94,7 +114,7 @@ export function _fetchData(connection, body, processFunc) {
}
timer = null;
reject(logger.makeError("timeout", Logger.errors.TIMEOUT, {
requestBody: (options.body || null),
requestBody: bodyify(options.body, flatHeaders["content-type"]),
requestMethod: options.method,
timeout: timeout,
url: url
@ -143,7 +163,7 @@ export function _fetchData(connection, body, processFunc) {
if (response == null) {
runningTimeout.cancel();
logger.throwError("missing response", Logger.errors.SERVER_ERROR, {
requestBody: (options.body || null),
requestBody: bodyify(options.body, flatHeaders["content-type"]),
requestMethod: options.method,
serverError: error,
url: url
@ -159,8 +179,8 @@ export function _fetchData(connection, body, processFunc) {
logger.throwError("bad response", Logger.errors.SERVER_ERROR, {
status: response.statusCode,
headers: response.headers,
body: body,
requestBody: (options.body || null),
body: bodyify(body, ((response.headers) ? response.headers["content-type"] : null)),
requestBody: bodyify(options.body, flatHeaders["content-type"]),
requestMethod: options.method,
url: url
});
@ -187,9 +207,9 @@ export function _fetchData(connection, body, processFunc) {
}
runningTimeout.cancel();
logger.throwError("processing response error", Logger.errors.SERVER_ERROR, {
body: body,
body: bodyify(body, ((response.headers) ? response.headers["content-type"] : null)),
error: error,
requestBody: (options.body || null),
requestBody: bodyify(options.body, flatHeaders["content-type"]),
requestMethod: options.method,
url: url
});
@ -201,7 +221,7 @@ export function _fetchData(connection, body, processFunc) {
return body;
}
return logger.throwError("failed response", Logger.errors.SERVER_ERROR, {
requestBody: (options.body || null),
requestBody: bodyify(options.body, flatHeaders["content-type"]),
requestMethod: options.method,
url: url
});

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
export declare const version = "web/5.0.4";
export declare const version = "web/5.0.5";

View File

@ -1,4 +1,4 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "web/5.0.4";
exports.version = "web/5.0.5";
//# sourceMappingURL=_version.js.map

View File

@ -37,6 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
};
Object.defineProperty(exports, "__esModule", { value: true });
var base64_1 = require("@ethersproject/base64");
var bytes_1 = require("@ethersproject/bytes");
var properties_1 = require("@ethersproject/properties");
var strings_1 = require("@ethersproject/strings");
var logger_1 = require("@ethersproject/logger");
@ -48,6 +49,25 @@ function staller(duration) {
setTimeout(resolve, duration);
});
}
function bodyify(value, type) {
if (value == null) {
return null;
}
if (typeof (value) === "string") {
return value;
}
if (bytes_1.isBytesLike(value)) {
if (type && (type.split("/")[0] === "text" || type === "application/json")) {
try {
return strings_1.toUtf8String(value);
}
catch (error) { }
;
}
return bytes_1.hexlify(value);
}
return value;
}
// This API is still a work in progress; the future changes will likely be:
// - ConnectionInfo => FetchDataRequest<T = any>
// - FetchDataRequest.body? = string | Uint8Array | { contentType: string, data: string | Uint8Array }
@ -122,7 +142,7 @@ function _fetchData(connection, body, processFunc) {
}
timer = null;
reject(logger.makeError("timeout", logger_1.Logger.errors.TIMEOUT, {
requestBody: (options.body || null),
requestBody: bodyify(options.body, flatHeaders["content-type"]),
requestMethod: options.method,
timeout: timeout,
url: url
@ -186,7 +206,7 @@ function _fetchData(connection, body, processFunc) {
if (response == null) {
runningTimeout.cancel();
logger.throwError("missing response", logger_1.Logger.errors.SERVER_ERROR, {
requestBody: (options.body || null),
requestBody: bodyify(options.body, flatHeaders["content-type"]),
requestMethod: options.method,
serverError: error_1,
url: url
@ -203,8 +223,8 @@ function _fetchData(connection, body, processFunc) {
logger.throwError("bad response", logger_1.Logger.errors.SERVER_ERROR, {
status: response.statusCode,
headers: response.headers,
body: body_1,
requestBody: (options.body || null),
body: bodyify(body_1, ((response.headers) ? response.headers["content-type"] : null)),
requestBody: bodyify(options.body, flatHeaders["content-type"]),
requestMethod: options.method,
url: url
});
@ -239,9 +259,9 @@ function _fetchData(connection, body, processFunc) {
case 16:
runningTimeout.cancel();
logger.throwError("processing response error", logger_1.Logger.errors.SERVER_ERROR, {
body: body_1,
body: bodyify(body_1, ((response.headers) ? response.headers["content-type"] : null)),
error: error_2,
requestBody: (options.body || null),
requestBody: bodyify(options.body, flatHeaders["content-type"]),
requestMethod: options.method,
url: url
});
@ -255,7 +275,7 @@ function _fetchData(connection, body, processFunc) {
attempt++;
return [3 /*break*/, 1];
case 19: return [2 /*return*/, logger.throwError("failed response", logger_1.Logger.errors.SERVER_ERROR, {
requestBody: (options.body || null),
requestBody: bodyify(options.body, flatHeaders["content-type"]),
requestMethod: options.method,
url: url
})];

File diff suppressed because one or more lines are too long

View File

@ -36,7 +36,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"tarballHash": "0x52afee0d86baef8eb43567a2d9ab4ad1f4c90a9dfc48acbb9c4b8285f9e7b2c0",
"tarballHash": "0x88202b25f3f0b7966bdaf7f6eee99ca39a2680b68ac0871a750d349866f17727",
"types": "./lib/index.d.ts",
"version": "5.0.4"
"version": "5.0.5"
}

View File

@ -1 +1 @@
export const version = "web/5.0.4";
export const version = "web/5.0.5";