@solana/web3.js 1.51.0 → 1.52.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solana/web3.js",
3
- "version": "1.51.0",
3
+ "version": "1.52.0",
4
4
  "description": "Solana Javascript API",
5
5
  "keywords": [
6
6
  "api",
package/src/connection.ts CHANGED
@@ -884,6 +884,8 @@ export type TransactionResponse = {
884
884
 
885
885
  /**
886
886
  * A confirmed transaction on the ledger
887
+ *
888
+ * @deprecated Deprecated since Solana v1.8.0.
887
889
  */
888
890
  export type ConfirmedTransaction = {
889
891
  /** The slot during which the transaction was processed */
@@ -1013,7 +1015,9 @@ export type BlockResponse = {
1013
1015
  };
1014
1016
 
1015
1017
  /**
1016
- * A ConfirmedBlock on the ledger
1018
+ * A confirmed block on the ledger
1019
+ *
1020
+ * @deprecated Deprecated since Solana v1.8.0.
1017
1021
  */
1018
1022
  export type ConfirmedBlock = {
1019
1023
  /** Blockhash of this block */
@@ -2867,14 +2871,17 @@ export class Connection {
2867
2871
  */
2868
2872
  async getParsedAccountInfo(
2869
2873
  publicKey: PublicKey,
2870
- commitment?: Commitment,
2874
+ commitmentOrConfig?: Commitment | GetAccountInfoConfig,
2871
2875
  ): Promise<
2872
2876
  RpcResponseAndContext<AccountInfo<Buffer | ParsedAccountData> | null>
2873
2877
  > {
2878
+ const {commitment, config} =
2879
+ extractCommitmentFromConfig(commitmentOrConfig);
2874
2880
  const args = this._buildArgs(
2875
2881
  [publicKey.toBase58()],
2876
2882
  commitment,
2877
2883
  'jsonParsed',
2884
+ config,
2878
2885
  );
2879
2886
  const unsafeRes = await this._rpcRequest('getAccountInfo', args);
2880
2887
  const res = create(
@@ -9,6 +9,8 @@ export const FeeCalculatorLayout = BufferLayout.nu64('lamportsPerSignature');
9
9
 
10
10
  /**
11
11
  * Calculator for transaction fees.
12
+ *
13
+ * @deprecated Deprecated since Solana v1.8.0.
12
14
  */
13
15
  export interface FeeCalculator {
14
16
  /** Cost in lamports to validate a signature. */