@solana/web3.js 1.91.3 → 1.91.5
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/lib/index.browser.cjs.js +74 -79
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +74 -79
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +6 -79
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.esm.js +5 -79
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +98 -100
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +2 -2
- package/lib/index.iife.min.js.map +1 -1
- package/lib/index.native.js +74 -79
- package/lib/index.native.js.map +1 -1
- package/package.json +2 -2
- package/src/connection.ts +5 -7
package/lib/index.iife.js
CHANGED
|
@@ -2659,11 +2659,10 @@ var solanaWeb3 = (function (exports) {
|
|
|
2659
2659
|
rotlSH: rotlSH$1, rotlSL: rotlSL$1, rotlBH: rotlBH$1, rotlBL: rotlBL$1,
|
|
2660
2660
|
add, add3L, add3H, add4L, add4H, add5H, add5L,
|
|
2661
2661
|
};
|
|
2662
|
-
var u64$2 = u64$1;
|
|
2663
2662
|
|
|
2664
2663
|
// Round contants (first 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409):
|
|
2665
2664
|
// prettier-ignore
|
|
2666
|
-
const [SHA512_Kh, SHA512_Kl] = /* @__PURE__ */ (() => u64$
|
|
2665
|
+
const [SHA512_Kh, SHA512_Kl] = /* @__PURE__ */ (() => u64$1.split([
|
|
2667
2666
|
'0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',
|
|
2668
2667
|
'0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',
|
|
2669
2668
|
'0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',
|
|
@@ -2746,16 +2745,16 @@ var solanaWeb3 = (function (exports) {
|
|
|
2746
2745
|
// s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)
|
|
2747
2746
|
const W15h = SHA512_W_H[i - 15] | 0;
|
|
2748
2747
|
const W15l = SHA512_W_L[i - 15] | 0;
|
|
2749
|
-
const s0h = u64$
|
|
2750
|
-
const s0l = u64$
|
|
2748
|
+
const s0h = u64$1.rotrSH(W15h, W15l, 1) ^ u64$1.rotrSH(W15h, W15l, 8) ^ u64$1.shrSH(W15h, W15l, 7);
|
|
2749
|
+
const s0l = u64$1.rotrSL(W15h, W15l, 1) ^ u64$1.rotrSL(W15h, W15l, 8) ^ u64$1.shrSL(W15h, W15l, 7);
|
|
2751
2750
|
// s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)
|
|
2752
2751
|
const W2h = SHA512_W_H[i - 2] | 0;
|
|
2753
2752
|
const W2l = SHA512_W_L[i - 2] | 0;
|
|
2754
|
-
const s1h = u64$
|
|
2755
|
-
const s1l = u64$
|
|
2753
|
+
const s1h = u64$1.rotrSH(W2h, W2l, 19) ^ u64$1.rotrBH(W2h, W2l, 61) ^ u64$1.shrSH(W2h, W2l, 6);
|
|
2754
|
+
const s1l = u64$1.rotrSL(W2h, W2l, 19) ^ u64$1.rotrBL(W2h, W2l, 61) ^ u64$1.shrSL(W2h, W2l, 6);
|
|
2756
2755
|
// SHA256_W[i] = s0 + s1 + SHA256_W[i - 7] + SHA256_W[i - 16];
|
|
2757
|
-
const SUMl = u64$
|
|
2758
|
-
const SUMh = u64$
|
|
2756
|
+
const SUMl = u64$1.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);
|
|
2757
|
+
const SUMh = u64$1.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);
|
|
2759
2758
|
SHA512_W_H[i] = SUMh | 0;
|
|
2760
2759
|
SHA512_W_L[i] = SUMl | 0;
|
|
2761
2760
|
}
|
|
@@ -2763,19 +2762,19 @@ var solanaWeb3 = (function (exports) {
|
|
|
2763
2762
|
// Compression function main loop, 80 rounds
|
|
2764
2763
|
for (let i = 0; i < 80; i++) {
|
|
2765
2764
|
// S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)
|
|
2766
|
-
const sigma1h = u64$
|
|
2767
|
-
const sigma1l = u64$
|
|
2765
|
+
const sigma1h = u64$1.rotrSH(Eh, El, 14) ^ u64$1.rotrSH(Eh, El, 18) ^ u64$1.rotrBH(Eh, El, 41);
|
|
2766
|
+
const sigma1l = u64$1.rotrSL(Eh, El, 14) ^ u64$1.rotrSL(Eh, El, 18) ^ u64$1.rotrBL(Eh, El, 41);
|
|
2768
2767
|
//const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;
|
|
2769
2768
|
const CHIh = (Eh & Fh) ^ (~Eh & Gh);
|
|
2770
2769
|
const CHIl = (El & Fl) ^ (~El & Gl);
|
|
2771
2770
|
// T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]
|
|
2772
2771
|
// prettier-ignore
|
|
2773
|
-
const T1ll = u64$
|
|
2774
|
-
const T1h = u64$
|
|
2772
|
+
const T1ll = u64$1.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);
|
|
2773
|
+
const T1h = u64$1.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);
|
|
2775
2774
|
const T1l = T1ll | 0;
|
|
2776
2775
|
// S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)
|
|
2777
|
-
const sigma0h = u64$
|
|
2778
|
-
const sigma0l = u64$
|
|
2776
|
+
const sigma0h = u64$1.rotrSH(Ah, Al, 28) ^ u64$1.rotrBH(Ah, Al, 34) ^ u64$1.rotrBH(Ah, Al, 39);
|
|
2777
|
+
const sigma0l = u64$1.rotrSL(Ah, Al, 28) ^ u64$1.rotrBL(Ah, Al, 34) ^ u64$1.rotrBL(Ah, Al, 39);
|
|
2779
2778
|
const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);
|
|
2780
2779
|
const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);
|
|
2781
2780
|
Hh = Gh | 0;
|
|
@@ -2784,26 +2783,26 @@ var solanaWeb3 = (function (exports) {
|
|
|
2784
2783
|
Gl = Fl | 0;
|
|
2785
2784
|
Fh = Eh | 0;
|
|
2786
2785
|
Fl = El | 0;
|
|
2787
|
-
({ h: Eh, l: El } = u64$
|
|
2786
|
+
({ h: Eh, l: El } = u64$1.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));
|
|
2788
2787
|
Dh = Ch | 0;
|
|
2789
2788
|
Dl = Cl | 0;
|
|
2790
2789
|
Ch = Bh | 0;
|
|
2791
2790
|
Cl = Bl | 0;
|
|
2792
2791
|
Bh = Ah | 0;
|
|
2793
2792
|
Bl = Al | 0;
|
|
2794
|
-
const All = u64$
|
|
2795
|
-
Ah = u64$
|
|
2793
|
+
const All = u64$1.add3L(T1l, sigma0l, MAJl);
|
|
2794
|
+
Ah = u64$1.add3H(All, T1h, sigma0h, MAJh);
|
|
2796
2795
|
Al = All | 0;
|
|
2797
2796
|
}
|
|
2798
2797
|
// Add the compressed chunk to the current hash value
|
|
2799
|
-
({ h: Ah, l: Al } = u64$
|
|
2800
|
-
({ h: Bh, l: Bl } = u64$
|
|
2801
|
-
({ h: Ch, l: Cl } = u64$
|
|
2802
|
-
({ h: Dh, l: Dl } = u64$
|
|
2803
|
-
({ h: Eh, l: El } = u64$
|
|
2804
|
-
({ h: Fh, l: Fl } = u64$
|
|
2805
|
-
({ h: Gh, l: Gl } = u64$
|
|
2806
|
-
({ h: Hh, l: Hl } = u64$
|
|
2798
|
+
({ h: Ah, l: Al } = u64$1.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));
|
|
2799
|
+
({ h: Bh, l: Bl } = u64$1.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));
|
|
2800
|
+
({ h: Ch, l: Cl } = u64$1.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));
|
|
2801
|
+
({ h: Dh, l: Dl } = u64$1.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));
|
|
2802
|
+
({ h: Eh, l: El } = u64$1.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));
|
|
2803
|
+
({ h: Fh, l: Fl } = u64$1.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));
|
|
2804
|
+
({ h: Gh, l: Gl } = u64$1.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));
|
|
2805
|
+
({ h: Hh, l: Hl } = u64$1.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));
|
|
2807
2806
|
this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);
|
|
2808
2807
|
}
|
|
2809
2808
|
roundClean() {
|
|
@@ -14715,81 +14714,79 @@ var solanaWeb3 = (function (exports) {
|
|
|
14715
14714
|
}
|
|
14716
14715
|
}
|
|
14717
14716
|
|
|
14717
|
+
// src/index.ts
|
|
14718
14718
|
var objToString = Object.prototype.toString;
|
|
14719
|
-
var objKeys = Object.keys || function(obj) {
|
|
14720
|
-
|
|
14721
|
-
|
|
14722
|
-
|
|
14723
|
-
|
|
14724
|
-
|
|
14725
|
-
|
|
14726
|
-
|
|
14719
|
+
var objKeys = Object.keys || function (obj) {
|
|
14720
|
+
const keys = [];
|
|
14721
|
+
for (const name in obj) {
|
|
14722
|
+
keys.push(name);
|
|
14723
|
+
}
|
|
14724
|
+
return keys;
|
|
14725
|
+
};
|
|
14727
14726
|
function stringify$1(val, isArrayProp) {
|
|
14728
|
-
|
|
14729
|
-
|
|
14730
|
-
|
|
14731
|
-
|
|
14732
|
-
|
|
14733
|
-
|
|
14734
|
-
|
|
14735
|
-
|
|
14736
|
-
|
|
14737
|
-
|
|
14738
|
-
|
|
14739
|
-
|
|
14740
|
-
|
|
14741
|
-
|
|
14742
|
-
|
|
14743
|
-
|
|
14744
|
-
|
|
14745
|
-
|
|
14746
|
-
|
|
14747
|
-
|
|
14748
|
-
|
|
14749
|
-
|
|
14750
|
-
|
|
14751
|
-
|
|
14752
|
-
|
|
14753
|
-
|
|
14754
|
-
|
|
14755
|
-
|
|
14756
|
-
|
|
14757
|
-
|
|
14758
|
-
|
|
14759
|
-
|
|
14760
|
-
|
|
14761
|
-
|
|
14762
|
-
|
|
14763
|
-
|
|
14764
|
-
|
|
14765
|
-
|
|
14766
|
-
|
|
14767
|
-
|
|
14768
|
-
|
|
14769
|
-
|
|
14770
|
-
|
|
14771
|
-
|
|
14772
|
-
|
|
14773
|
-
|
|
14774
|
-
|
|
14775
|
-
|
|
14776
|
-
|
|
14777
|
-
|
|
14778
|
-
|
|
14779
|
-
|
|
14780
|
-
|
|
14781
|
-
|
|
14782
|
-
|
|
14727
|
+
let i, max, str, keys, key, propVal, toStr;
|
|
14728
|
+
if (val === true) {
|
|
14729
|
+
return "true";
|
|
14730
|
+
}
|
|
14731
|
+
if (val === false) {
|
|
14732
|
+
return "false";
|
|
14733
|
+
}
|
|
14734
|
+
switch (typeof val) {
|
|
14735
|
+
case "object":
|
|
14736
|
+
if (val === null) {
|
|
14737
|
+
return null;
|
|
14738
|
+
} else if ("toJSON" in val && typeof val.toJSON === "function") {
|
|
14739
|
+
return stringify$1(val.toJSON(), isArrayProp);
|
|
14740
|
+
} else {
|
|
14741
|
+
toStr = objToString.call(val);
|
|
14742
|
+
if (toStr === "[object Array]") {
|
|
14743
|
+
str = "[";
|
|
14744
|
+
max = val.length - 1;
|
|
14745
|
+
for (i = 0; i < max; i++) {
|
|
14746
|
+
str += stringify$1(val[i], true) + ",";
|
|
14747
|
+
}
|
|
14748
|
+
if (max > -1) {
|
|
14749
|
+
str += stringify$1(val[i], true);
|
|
14750
|
+
}
|
|
14751
|
+
return str + "]";
|
|
14752
|
+
} else if (toStr === "[object Object]") {
|
|
14753
|
+
keys = objKeys(val).sort();
|
|
14754
|
+
max = keys.length;
|
|
14755
|
+
str = "";
|
|
14756
|
+
i = 0;
|
|
14757
|
+
while (i < max) {
|
|
14758
|
+
key = keys[i];
|
|
14759
|
+
propVal = stringify$1(val[key], false);
|
|
14760
|
+
if (propVal !== void 0) {
|
|
14761
|
+
if (str) {
|
|
14762
|
+
str += ",";
|
|
14763
|
+
}
|
|
14764
|
+
str += JSON.stringify(key) + ":" + propVal;
|
|
14765
|
+
}
|
|
14766
|
+
i++;
|
|
14767
|
+
}
|
|
14768
|
+
return "{" + str + "}";
|
|
14769
|
+
} else {
|
|
14770
|
+
return JSON.stringify(val);
|
|
14771
|
+
}
|
|
14772
|
+
}
|
|
14773
|
+
case "function":
|
|
14774
|
+
case "undefined":
|
|
14775
|
+
return isArrayProp ? null : void 0;
|
|
14776
|
+
case "bigint":
|
|
14777
|
+
return JSON.stringify(val.toString() + "n");
|
|
14778
|
+
case "string":
|
|
14779
|
+
return JSON.stringify(val);
|
|
14780
|
+
default:
|
|
14781
|
+
return isFinite(val) ? val : null;
|
|
14782
|
+
}
|
|
14783
|
+
}
|
|
14784
|
+
function src_default(val) {
|
|
14785
|
+
const returnVal = stringify$1(val, false);
|
|
14786
|
+
if (returnVal !== void 0) {
|
|
14787
|
+
return "" + returnVal;
|
|
14788
|
+
}
|
|
14783
14789
|
}
|
|
14784
|
-
|
|
14785
|
-
var fastStableStringify = function(val) {
|
|
14786
|
-
var returnVal = stringify$1(val, false);
|
|
14787
|
-
if (returnVal !== undefined) {
|
|
14788
|
-
return ''+ returnVal;
|
|
14789
|
-
}
|
|
14790
|
-
};
|
|
14791
|
-
|
|
14792
|
-
var fastStableStringify$1 = /*@__PURE__*/getDefaultExportFromCjs(fastStableStringify);
|
|
14793
14790
|
|
|
14794
14791
|
/**
|
|
14795
14792
|
* A `StructFailure` represents a single specific failure in validation.
|
|
@@ -19681,7 +19678,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
19681
19678
|
config
|
|
19682
19679
|
} = extractCommitmentFromConfig(commitmentOrConfig);
|
|
19683
19680
|
const args = this._buildArgs([], commitment, undefined /* encoding */, config);
|
|
19684
|
-
const requestHash =
|
|
19681
|
+
const requestHash = src_default(args);
|
|
19685
19682
|
requestPromises[requestHash] = requestPromises[requestHash] ?? (async () => {
|
|
19686
19683
|
try {
|
|
19687
19684
|
const unsafeRes = await this._rpcRequest('getBlockHeight', args);
|
|
@@ -21772,7 +21769,8 @@ var solanaWeb3 = (function (exports) {
|
|
|
21772
21769
|
encoding: 'base64'
|
|
21773
21770
|
};
|
|
21774
21771
|
const skipPreflight = options && options.skipPreflight;
|
|
21775
|
-
const preflightCommitment =
|
|
21772
|
+
const preflightCommitment = skipPreflight === true ? 'processed' // FIXME Remove when https://github.com/anza-xyz/agave/pull/483 is deployed.
|
|
21773
|
+
: options && options.preflightCommitment || this.commitment;
|
|
21776
21774
|
if (options && options.maxRetries != null) {
|
|
21777
21775
|
config.maxRetries = options.maxRetries;
|
|
21778
21776
|
}
|
|
@@ -22116,7 +22114,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
22116
22114
|
*/
|
|
22117
22115
|
args) {
|
|
22118
22116
|
const clientSubscriptionId = this._nextClientSubscriptionId++;
|
|
22119
|
-
const hash =
|
|
22117
|
+
const hash = src_default([subscriptionConfig.method, args]);
|
|
22120
22118
|
const existingSubscription = this._subscriptionsByHash[hash];
|
|
22121
22119
|
if (existingSubscription === undefined) {
|
|
22122
22120
|
this._subscriptionsByHash[hash] = {
|