@solana/web3.js 1.44.4 → 1.45.1
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 +7 -1
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +7 -1
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +7 -1
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.esm.js +7 -1
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +7 -1
- 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/package.json +3 -3
- package/src/connection.ts +12 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solana/web3.js",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.45.1",
|
|
4
4
|
"description": "Solana Javascript API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"jayson": "^3.4.4",
|
|
49
49
|
"js-sha3": "^0.8.0",
|
|
50
50
|
"node-fetch": "2",
|
|
51
|
-
"rpc-websockets": "^7.
|
|
51
|
+
"rpc-websockets": "^7.5.0",
|
|
52
52
|
"secp256k1": "^4.0.2",
|
|
53
53
|
"superstruct": "^0.14.2",
|
|
54
54
|
"tweetnacl": "^1.0.0"
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"pretty": "prettier --check '{,{src,test}/**/}*.{j,t}s'",
|
|
135
135
|
"pretty:fix": "prettier --write '{,{src,test}/**/}*.{j,t}s'",
|
|
136
136
|
"re": "semantic-release --repository-url git@github.com:solana-labs/solana-web3.js.git",
|
|
137
|
-
"test": "cross-env TS_NODE_COMPILER_OPTIONS='{ \"module\": \"commonjs\" }' ts-mocha --require esm './test/**/*.test.ts'",
|
|
137
|
+
"test": "cross-env TS_NODE_COMPILER_OPTIONS='{ \"module\": \"commonjs\", \"target\": \"es2019\" }' ts-mocha --require esm './test/**/*.test.ts'",
|
|
138
138
|
"test:cover": "nyc --reporter=lcov npm run test",
|
|
139
139
|
"test:live": "TEST_LIVE=1 npm run test",
|
|
140
140
|
"test:live-with-test-validator": "start-server-and-test 'solana-test-validator --reset --quiet' http://localhost:8899/health test:live"
|
package/src/connection.ts
CHANGED
|
@@ -995,6 +995,7 @@ function createRpcClient(
|
|
|
995
995
|
'Content-Type': 'application/json',
|
|
996
996
|
},
|
|
997
997
|
httpHeaders || {},
|
|
998
|
+
COMMON_HTTP_HEADERS,
|
|
998
999
|
),
|
|
999
1000
|
};
|
|
1000
1001
|
|
|
@@ -2158,7 +2159,12 @@ export type ConfirmedSignatureInfo = {
|
|
|
2158
2159
|
/**
|
|
2159
2160
|
* An object defining headers to be passed to the RPC server
|
|
2160
2161
|
*/
|
|
2161
|
-
export type HttpHeaders = {
|
|
2162
|
+
export type HttpHeaders = {
|
|
2163
|
+
[header: string]: string;
|
|
2164
|
+
} & {
|
|
2165
|
+
// Prohibited headers; for internal use only.
|
|
2166
|
+
'solana-client'?: never;
|
|
2167
|
+
};
|
|
2162
2168
|
|
|
2163
2169
|
/**
|
|
2164
2170
|
* The type of the JavaScript `fetch()` API
|
|
@@ -2194,6 +2200,11 @@ export type ConnectionConfig = {
|
|
|
2194
2200
|
confirmTransactionInitialTimeout?: number;
|
|
2195
2201
|
};
|
|
2196
2202
|
|
|
2203
|
+
/** @internal */
|
|
2204
|
+
const COMMON_HTTP_HEADERS = {
|
|
2205
|
+
'solana-client': `js/${process.env.npm_package_version ?? 'UNKNOWN'}`,
|
|
2206
|
+
};
|
|
2207
|
+
|
|
2197
2208
|
/**
|
|
2198
2209
|
* A connection to a fullnode JSON RPC endpoint
|
|
2199
2210
|
*/
|