@solana/web3.js 1.51.1 → 1.52.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
@@ -184,6 +184,8 @@ declare module '@solana/web3.js' {
184
184
 
185
185
  /**
186
186
  * Calculator for transaction fees.
187
+ *
188
+ * @deprecated Deprecated since Solana v1.8.0.
187
189
  */
188
190
  interface FeeCalculator {
189
191
  /** Cost in lamports to validate a signature. */
@@ -794,6 +796,8 @@ declare module '@solana/web3.js' {
794
796
  };
795
797
  /**
796
798
  * A confirmed transaction on the ledger
799
+ *
800
+ * @deprecated Deprecated since Solana v1.8.0.
797
801
  */
798
802
  export type ConfirmedTransaction = {
799
803
  /** The slot during which the transaction was processed */
@@ -914,7 +918,9 @@ declare module '@solana/web3.js' {
914
918
  blockTime: number | null;
915
919
  };
916
920
  /**
917
- * A ConfirmedBlock on the ledger
921
+ * A confirmed block on the ledger
922
+ *
923
+ * @deprecated Deprecated since Solana v1.8.0.
918
924
  */
919
925
  export type ConfirmedBlock = {
920
926
  /** Blockhash of this block */
@@ -1546,7 +1552,7 @@ declare module '@solana/web3.js' {
1546
1552
  */
1547
1553
  getParsedAccountInfo(
1548
1554
  publicKey: PublicKey,
1549
- commitment?: Commitment,
1555
+ commitmentOrConfig?: Commitment | GetAccountInfoConfig,
1550
1556
  ): Promise<
1551
1557
  RpcResponseAndContext<AccountInfo<Buffer | ParsedAccountData> | null>
1552
1558
  >;
package/lib/index.esm.js CHANGED
@@ -2254,6 +2254,8 @@ function decodeData(type, buffer) {
2254
2254
  const FeeCalculatorLayout = BufferLayout.nu64('lamportsPerSignature');
2255
2255
  /**
2256
2256
  * Calculator for transaction fees.
2257
+ *
2258
+ * @deprecated Deprecated since Solana v1.8.0.
2257
2259
  */
2258
2260
 
2259
2261
  /**
@@ -5935,7 +5937,7 @@ const LogsNotificationResult = type({
5935
5937
 
5936
5938
  /** @internal */
5937
5939
  const COMMON_HTTP_HEADERS = {
5938
- 'solana-client': `js/${(_process$env$npm_pack = "1.51.1") !== null && _process$env$npm_pack !== void 0 ? _process$env$npm_pack : 'UNKNOWN'}`
5940
+ 'solana-client': `js/${(_process$env$npm_pack = "1.52.1") !== null && _process$env$npm_pack !== void 0 ? _process$env$npm_pack : 'UNKNOWN'}`
5939
5941
  };
5940
5942
  /**
5941
5943
  * A connection to a fullnode JSON RPC endpoint
@@ -6376,8 +6378,13 @@ class Connection {
6376
6378
  */
6377
6379
 
6378
6380
 
6379
- async getParsedAccountInfo(publicKey, commitment) {
6380
- const args = this._buildArgs([publicKey.toBase58()], commitment, 'jsonParsed');
6381
+ async getParsedAccountInfo(publicKey, commitmentOrConfig) {
6382
+ const {
6383
+ commitment,
6384
+ config
6385
+ } = extractCommitmentFromConfig(commitmentOrConfig);
6386
+
6387
+ const args = this._buildArgs([publicKey.toBase58()], commitment, 'jsonParsed', config);
6381
6388
 
6382
6389
  const unsafeRes = await this._rpcRequest('getAccountInfo', args);
6383
6390
  const res = create(unsafeRes, jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)));