@solana/web3.js 1.91.7 → 1.91.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solana/web3.js",
3
- "version": "1.91.7",
3
+ "version": "1.91.9",
4
4
  "description": "Solana Javascript API",
5
5
  "keywords": [
6
6
  "api",
@@ -52,12 +52,12 @@
52
52
  "test:prettier": "prettier --check '{,{src,test}/**/}*.{j,t}s'",
53
53
  "test:prettier:fix": "pnpm prettier --write '{,{src,test}/**/}*.{j,t}s'",
54
54
  "test:typecheck": "tsc --noEmit",
55
- "test:unit:node": "cross-env NODE_ENV=test TS_NODE_COMPILER_OPTIONS='{ \"module\": \"commonjs\", \"target\": \"es2019\" }' ts-mocha --require esm './test/**/*.test.ts'"
55
+ "test:unit:node": "cross-env NODE_ENV=test NODE_OPTIONS='--import tsx' mocha './test/**/*.test.ts'"
56
56
  },
57
57
  "dependencies": {
58
- "@babel/runtime": "^7.23.4",
58
+ "@babel/runtime": "^7.24.6",
59
59
  "@noble/curves": "^1.4.0",
60
- "@noble/hashes": "^1.3.3",
60
+ "@noble/hashes": "^1.4.0",
61
61
  "@solana/buffer-layout": "^4.0.1",
62
62
  "agentkeepalive": "^4.5.0",
63
63
  "bigint-buffer": "^1.1.5",
@@ -68,7 +68,7 @@
68
68
  "fast-stable-stringify": "^1.0.0",
69
69
  "jayson": "^4.1.0",
70
70
  "node-fetch": "^2.7.0",
71
- "rpc-websockets": "^7.5.1",
72
- "superstruct": "^0.14.2"
71
+ "rpc-websockets": "^7.11.1",
72
+ "superstruct": "^1.0.4"
73
73
  }
74
74
  }
@@ -1 +1 @@
1
- export {default} from 'rpc-websockets/dist/lib/client/websocket.browser';
1
+ export {default} from 'rpc-websockets/dist/lib/client/websocket.browser.cjs';
@@ -1 +1 @@
1
- export {default} from 'rpc-websockets/dist/lib/client/websocket.browser';
1
+ export {default} from 'rpc-websockets/dist/lib/client/websocket.browser.cjs';
@@ -1,4 +1,4 @@
1
- import {ICommonWebSocketFactory} from 'rpc-websockets/dist/lib/client/client.types';
2
- import WebsocketFactory from 'rpc-websockets/dist/lib/client/websocket';
1
+ import {ICommonWebSocketFactory} from 'rpc-websockets/dist/lib/client/client.types.cjs';
2
+ import WebsocketFactory from 'rpc-websockets/dist/lib/client/websocket.cjs';
3
3
 
4
4
  export default WebsocketFactory as ICommonWebSocketFactory;
@@ -1,11 +1,11 @@
1
- import RpcWebSocketCommonClient from 'rpc-websockets/dist/lib/client';
2
- import RpcWebSocketBrowserFactory from 'rpc-websockets/dist/lib/client/websocket.browser';
1
+ import RpcWebSocketCommonClient from 'rpc-websockets/dist/lib/client.cjs';
2
+ import WebSocketBrowserImpl from 'rpc-websockets/dist/lib/client/websocket.cjs';
3
3
  import {
4
4
  ICommonWebSocket,
5
5
  IWSClientAdditionalOptions,
6
6
  NodeWebSocketType,
7
7
  NodeWebSocketTypeOptions,
8
- } from 'rpc-websockets/dist/lib/client/client.types';
8
+ } from 'rpc-websockets/dist/lib/client/client.types.cjs';
9
9
 
10
10
  import createRpc from './rpc-websocket-factory';
11
11
 
@@ -32,9 +32,9 @@ export default class RpcWebSocketClient extends RpcWebSocketCommonClient {
32
32
  ...options,
33
33
  });
34
34
  if ('socket' in rpc) {
35
- this.underlyingSocket = (
36
- rpc as ReturnType<typeof RpcWebSocketBrowserFactory>
37
- ).socket;
35
+ this.underlyingSocket = rpc.socket as ReturnType<
36
+ typeof WebSocketBrowserImpl
37
+ >;
38
38
  } else {
39
39
  this.underlyingSocket = rpc as NodeWebSocketType;
40
40
  }
@@ -17,7 +17,7 @@ export function makeWebsocketUrl(endpoint: string) {
17
17
  const websocketPort =
18
18
  // Only shift the port by +1 as a convention for ws(s) only if given endpoint
19
19
  // is explicitly specifying the endpoint port (HTTP-based RPC), assuming
20
- // we're directly trying to connect to solana-validator's ws listening port.
20
+ // we're directly trying to connect to agave-validator's ws listening port.
21
21
  // When the endpoint omits the port, we're connecting to the protocol
22
22
  // default ports: http(80) or https(443) and it's assumed we're behind a reverse
23
23
  // proxy which manages WebSocket upgrade and backend port redirection.