Skip to content

Commit 9fd9d41

Browse files
committed
admin: updated dist files
1 parent 1405d74 commit 9fd9d41

22 files changed

+149
-62
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ Change Log
33

44
This change log is maintained by `src.ts/_admin/update-changelog.ts` but may also be manually updated.
55

6+
ethers/v6.15.0 (2025-07-01 11:24)
7+
---------------------------------
8+
9+
- Allow non-canonical S values in Signatures moving errors to access-time ([#5013](https://github.com/ethers-io/ethers.js/issues/5013); [9944ec9](https://github.com/ethers-io/ethers.js/commit/9944ec94b154b4f8fdfeefb81a1e47b28fd907bc)).
10+
611
ethers/v6.14.4 (2025-06-12 23:16)
712
---------------------------------
813

dist/ethers.js

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
33
/**
44
* The current version of Ethers.
55
*/
6-
const version = "6.14.4";
6+
const version = "6.15.0";
77

88
/**
99
* Property helper functions.
@@ -6662,12 +6662,28 @@ class Signature {
66626662
/**
66636663
* The ``s`` value for a signature.
66646664
*/
6665-
get s() { return this.#s; }
6665+
get s() {
6666+
assertArgument(parseInt(this.#s.substring(0, 3)) < 8, "non-canonical s; use ._s", "s", this.#s);
6667+
return this.#s;
6668+
}
66666669
set s(_value) {
66676670
assertArgument(dataLength(_value) === 32, "invalid s", "value", _value);
6668-
const value = hexlify(_value);
6669-
assertArgument(parseInt(value.substring(0, 3)) < 8, "non-canonical s", "value", value);
6670-
this.#s = value;
6671+
this.#s = hexlify(_value);
6672+
}
6673+
/**
6674+
* Return the s value, unchecked for EIP-2 compliance.
6675+
*
6676+
* This should generally not be used and is for situations where
6677+
* a non-canonical S value might be relevant, such as Frontier blocks
6678+
* that were mined prior to EIP-2 or invalid Authorization List
6679+
* signatures.
6680+
*/
6681+
get _s() { return this.#s; }
6682+
/**
6683+
* Returns true if the Signature is valid for [[link-eip-2]] signatures.
6684+
*/
6685+
isValid() {
6686+
return (parseInt(this.#s.substring(0, 3)) < 8);
66716687
}
66726688
/**
66736689
* The ``v`` value for a signature.
@@ -6744,13 +6760,13 @@ class Signature {
67446760
this.#networkV = null;
67456761
}
67466762
[Symbol.for('nodejs.util.inspect.custom')]() {
6747-
return `Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`;
6763+
return `Signature { r: "${this.r}", s: "${this._s}"${this.isValid() ? "" : ', valid: "false"'}, yParity: ${this.yParity}, networkV: ${this.networkV} }`;
67486764
}
67496765
/**
67506766
* Returns a new identical [[Signature]].
67516767
*/
67526768
clone() {
6753-
const clone = new Signature(_guard$3, this.r, this.s, this.v);
6769+
const clone = new Signature(_guard$3, this.r, this._s, this.v);
67546770
if (this.networkV) {
67556771
clone.#networkV = this.networkV;
67566772
}
@@ -6764,7 +6780,7 @@ class Signature {
67646780
return {
67656781
_type: "signature",
67666782
networkV: ((networkV != null) ? networkV.toString() : null),
6767-
r: this.r, s: this.s, v: this.v,
6783+
r: this.r, s: this._s, v: this.v,
67686784
};
67696785
}
67706786
/**
@@ -6863,10 +6879,9 @@ class Signature {
68636879
}
68646880
if (bytes.length === 65) {
68656881
const r = hexlify(bytes.slice(0, 32));
6866-
const s = bytes.slice(32, 64);
6867-
assertError((s[0] & 0x80) === 0, "non-canonical s");
6882+
const s = hexlify(bytes.slice(32, 64));
68686883
const v = Signature.getNormalizedV(bytes[64]);
6869-
return new Signature(_guard$3, r, hexlify(s), v);
6884+
return new Signature(_guard$3, r, s, v);
68706885
}
68716886
assertError(false, "invalid raw signature length");
68726887
}
@@ -6890,7 +6905,6 @@ class Signature {
68906905
}
68916906
assertError(false, "missing s");
68926907
})(sig.s, sig.yParityAndS);
6893-
assertError((getBytes(s)[0] & 0x80) == 0, "non-canonical s");
68946908
// Get v; by any means necessary (we check consistency below)
68956909
const { networkV, v } = (function (_v, yParityAndS, yParity) {
68966910
if (_v != null) {

dist/ethers.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ethers.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ethers.umd.js

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
99
/**
1010
* The current version of Ethers.
1111
*/
12-
const version = "6.14.4";
12+
const version = "6.15.0";
1313

1414
/**
1515
* Property helper functions.
@@ -6668,12 +6668,28 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
66686668
/**
66696669
* The ``s`` value for a signature.
66706670
*/
6671-
get s() { return this.#s; }
6671+
get s() {
6672+
assertArgument(parseInt(this.#s.substring(0, 3)) < 8, "non-canonical s; use ._s", "s", this.#s);
6673+
return this.#s;
6674+
}
66726675
set s(_value) {
66736676
assertArgument(dataLength(_value) === 32, "invalid s", "value", _value);
6674-
const value = hexlify(_value);
6675-
assertArgument(parseInt(value.substring(0, 3)) < 8, "non-canonical s", "value", value);
6676-
this.#s = value;
6677+
this.#s = hexlify(_value);
6678+
}
6679+
/**
6680+
* Return the s value, unchecked for EIP-2 compliance.
6681+
*
6682+
* This should generally not be used and is for situations where
6683+
* a non-canonical S value might be relevant, such as Frontier blocks
6684+
* that were mined prior to EIP-2 or invalid Authorization List
6685+
* signatures.
6686+
*/
6687+
get _s() { return this.#s; }
6688+
/**
6689+
* Returns true if the Signature is valid for [[link-eip-2]] signatures.
6690+
*/
6691+
isValid() {
6692+
return (parseInt(this.#s.substring(0, 3)) < 8);
66776693
}
66786694
/**
66796695
* The ``v`` value for a signature.
@@ -6750,13 +6766,13 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
67506766
this.#networkV = null;
67516767
}
67526768
[Symbol.for('nodejs.util.inspect.custom')]() {
6753-
return `Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`;
6769+
return `Signature { r: "${this.r}", s: "${this._s}"${this.isValid() ? "" : ', valid: "false"'}, yParity: ${this.yParity}, networkV: ${this.networkV} }`;
67546770
}
67556771
/**
67566772
* Returns a new identical [[Signature]].
67576773
*/
67586774
clone() {
6759-
const clone = new Signature(_guard$3, this.r, this.s, this.v);
6775+
const clone = new Signature(_guard$3, this.r, this._s, this.v);
67606776
if (this.networkV) {
67616777
clone.#networkV = this.networkV;
67626778
}
@@ -6770,7 +6786,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
67706786
return {
67716787
_type: "signature",
67726788
networkV: ((networkV != null) ? networkV.toString() : null),
6773-
r: this.r, s: this.s, v: this.v,
6789+
r: this.r, s: this._s, v: this.v,
67746790
};
67756791
}
67766792
/**
@@ -6869,10 +6885,9 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
68696885
}
68706886
if (bytes.length === 65) {
68716887
const r = hexlify(bytes.slice(0, 32));
6872-
const s = bytes.slice(32, 64);
6873-
assertError((s[0] & 0x80) === 0, "non-canonical s");
6888+
const s = hexlify(bytes.slice(32, 64));
68746889
const v = Signature.getNormalizedV(bytes[64]);
6875-
return new Signature(_guard$3, r, hexlify(s), v);
6890+
return new Signature(_guard$3, r, s, v);
68766891
}
68776892
assertError(false, "invalid raw signature length");
68786893
}
@@ -6896,7 +6911,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
68966911
}
68976912
assertError(false, "missing s");
68986913
})(sig.s, sig.yParityAndS);
6899-
assertError((getBytes(s)[0] & 0x80) == 0, "non-canonical s");
69006914
// Get v; by any means necessary (we check consistency below)
69016915
const { networkV, v } = (function (_v, yParityAndS, yParity) {
69026916
if (_v != null) {

dist/ethers.umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ethers.umd.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/wordlists-extra.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/wordlists-extra.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/wordlists-extra.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)