@solana/web3.js 1.69.0 → 1.70.0-pr-29130
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/README.md +0 -13
- package/lib/index.browser.cjs.js +11 -4
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +11 -4
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +2632 -62
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +8 -0
- package/lib/index.esm.js +2625 -60
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +11 -4
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +1 -1
- package/lib/index.iife.min.js.map +1 -1
- package/lib/index.native.js +11 -4
- package/lib/index.native.js.map +1 -1
- package/package.json +3 -2
- package/src/connection.ts +53 -7
- package/src/agent-manager.ts +0 -44
package/lib/index.iife.js
CHANGED
|
@@ -17514,8 +17514,15 @@ var solanaWeb3 = (function (exports) {
|
|
|
17514
17514
|
* A performance sample
|
|
17515
17515
|
*/
|
|
17516
17516
|
|
|
17517
|
-
function createRpcClient(url, httpHeaders, customFetch, fetchMiddleware, disableRetryOnRateLimit) {
|
|
17517
|
+
function createRpcClient(url, httpHeaders, customFetch, fetchMiddleware, disableRetryOnRateLimit, httpAgent) {
|
|
17518
17518
|
const fetch = customFetch ? customFetch : fetchImpl;
|
|
17519
|
+
let agent;
|
|
17520
|
+
|
|
17521
|
+
{
|
|
17522
|
+
if (httpAgent != null) {
|
|
17523
|
+
console.warn('You have supplied an `httpAgent` when creating a `Connection` in a browser environment.' + 'It has been ignored; `httpAgent` is only used in Node environments.');
|
|
17524
|
+
}
|
|
17525
|
+
}
|
|
17519
17526
|
|
|
17520
17527
|
let fetchWithMiddleware;
|
|
17521
17528
|
|
|
@@ -17533,7 +17540,6 @@ var solanaWeb3 = (function (exports) {
|
|
|
17533
17540
|
}
|
|
17534
17541
|
|
|
17535
17542
|
const clientBrowser = new RpcClient(async (request, callback) => {
|
|
17536
|
-
const agent = undefined;
|
|
17537
17543
|
const options = {
|
|
17538
17544
|
method: 'POST',
|
|
17539
17545
|
body: request,
|
|
@@ -17585,7 +17591,6 @@ var solanaWeb3 = (function (exports) {
|
|
|
17585
17591
|
}
|
|
17586
17592
|
} catch (err) {
|
|
17587
17593
|
if (err instanceof Error) callback(err);
|
|
17588
|
-
} finally {
|
|
17589
17594
|
}
|
|
17590
17595
|
}, {});
|
|
17591
17596
|
return clientBrowser;
|
|
@@ -18423,6 +18428,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
18423
18428
|
let fetch;
|
|
18424
18429
|
let fetchMiddleware;
|
|
18425
18430
|
let disableRetryOnRateLimit;
|
|
18431
|
+
let httpAgent;
|
|
18426
18432
|
|
|
18427
18433
|
if (commitmentOrConfig && typeof commitmentOrConfig === 'string') {
|
|
18428
18434
|
this._commitment = commitmentOrConfig;
|
|
@@ -18434,11 +18440,12 @@ var solanaWeb3 = (function (exports) {
|
|
|
18434
18440
|
fetch = commitmentOrConfig.fetch;
|
|
18435
18441
|
fetchMiddleware = commitmentOrConfig.fetchMiddleware;
|
|
18436
18442
|
disableRetryOnRateLimit = commitmentOrConfig.disableRetryOnRateLimit;
|
|
18443
|
+
httpAgent = commitmentOrConfig.httpAgent;
|
|
18437
18444
|
}
|
|
18438
18445
|
|
|
18439
18446
|
this._rpcEndpoint = assertEndpointUrl(endpoint);
|
|
18440
18447
|
this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint);
|
|
18441
|
-
this._rpcClient = createRpcClient(endpoint, httpHeaders, fetch, fetchMiddleware, disableRetryOnRateLimit);
|
|
18448
|
+
this._rpcClient = createRpcClient(endpoint, httpHeaders, fetch, fetchMiddleware, disableRetryOnRateLimit, httpAgent);
|
|
18442
18449
|
this._rpcRequest = createRpcRequest(this._rpcClient);
|
|
18443
18450
|
this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);
|
|
18444
18451
|
this._rpcWebSocket = new Client_1(this._rpcWsEndpoint, {
|