@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.d.ts CHANGED
@@ -1449,6 +1449,8 @@ declare module '@solana/web3.js' {
1449
1449
  */
1450
1450
  export type HttpHeaders = {
1451
1451
  [header: string]: string;
1452
+ } & {
1453
+ 'solana-client'?: never;
1452
1454
  };
1453
1455
  /**
1454
1456
  * The type of the JavaScript `fetch()` API
package/lib/index.esm.js CHANGED
@@ -4673,6 +4673,7 @@ function makeWebsocketUrl(endpoint) {
4673
4673
  return url.toString();
4674
4674
  }
4675
4675
 
4676
+ var _process$env$npm_pack;
4676
4677
  const PublicKeyFromString = coerce(instance(PublicKey), string(), value => new PublicKey(value));
4677
4678
  const RawAccountDataResult = tuple([string(), literal('base64')]);
4678
4679
  const BufferFromRawAccountData = coerce(instance(Buffer), RawAccountDataResult, value => Buffer.from(value[0], 'base64'));
@@ -4888,7 +4889,7 @@ function createRpcClient(url, useHttps, httpHeaders, customFetch, fetchMiddlewar
4888
4889
  agent,
4889
4890
  headers: Object.assign({
4890
4891
  'Content-Type': 'application/json'
4891
- }, httpHeaders || {})
4892
+ }, httpHeaders || {}, COMMON_HTTP_HEADERS)
4892
4893
  };
4893
4894
 
4894
4895
  try {
@@ -5562,9 +5563,14 @@ const LogsNotificationResult = type({
5562
5563
  * Filter for log subscriptions.
5563
5564
  */
5564
5565
 
5566
+ /** @internal */
5567
+ const COMMON_HTTP_HEADERS = {
5568
+ 'solana-client': `js/${(_process$env$npm_pack = "1.45.1") !== null && _process$env$npm_pack !== void 0 ? _process$env$npm_pack : 'UNKNOWN'}`
5569
+ };
5565
5570
  /**
5566
5571
  * A connection to a fullnode JSON RPC endpoint
5567
5572
  */
5573
+
5568
5574
  class Connection {
5569
5575
  /** @internal */
5570
5576