@solana/web3.js 1.44.3 → 1.45.0

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
@@ -4644,6 +4644,7 @@ function makeWebsocketUrl(endpoint) {
4644
4644
  return url.toString();
4645
4645
  }
4646
4646
 
4647
+ var _process$env$npm_pack;
4647
4648
  const PublicKeyFromString = coerce(instance(PublicKey), string(), value => new PublicKey(value));
4648
4649
  const RawAccountDataResult = tuple([string(), literal('base64')]);
4649
4650
  const BufferFromRawAccountData = coerce(instance(Buffer), RawAccountDataResult, value => Buffer.from(value[0], 'base64'));
@@ -4859,7 +4860,7 @@ function createRpcClient(url, useHttps, httpHeaders, customFetch, fetchMiddlewar
4859
4860
  agent,
4860
4861
  headers: Object.assign({
4861
4862
  'Content-Type': 'application/json'
4862
- }, httpHeaders || {})
4863
+ }, httpHeaders || {}, COMMON_HTTP_HEADERS)
4863
4864
  };
4864
4865
 
4865
4866
  try {
@@ -5533,9 +5534,14 @@ const LogsNotificationResult = type({
5533
5534
  * Filter for log subscriptions.
5534
5535
  */
5535
5536
 
5537
+ /** @internal */
5538
+ const COMMON_HTTP_HEADERS = {
5539
+ 'solana-client': `js/${(_process$env$npm_pack = "0.0.0-development") !== null && _process$env$npm_pack !== void 0 ? _process$env$npm_pack : 'UNKNOWN'}`
5540
+ };
5536
5541
  /**
5537
5542
  * A connection to a fullnode JSON RPC endpoint
5538
5543
  */
5544
+
5539
5545
  class Connection {
5540
5546
  /** @internal */
5541
5547