@solana/web3.js 1.48.1 → 1.49.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
@@ -480,6 +480,15 @@ declare module '@solana/web3.js' {
480
480
  /** The minimum slot that the request can be evaluated at */
481
481
  minContextSlot?: number;
482
482
  };
483
+ /**
484
+ * Configuration object for changing `getBlock` query behavior
485
+ */
486
+ export type GetBlockConfig = {
487
+ /** The level of finality desired */
488
+ commitment?: Finality;
489
+ /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */
490
+ maxSupportedTransactionVersion?: number;
491
+ };
483
492
  /**
484
493
  * Configuration object for changing `getBlockHeight` query behavior
485
494
  */
@@ -536,6 +545,15 @@ declare module '@solana/web3.js' {
536
545
  /** The minimum slot that the request can be evaluated at */
537
546
  minContextSlot?: number;
538
547
  };
548
+ /**
549
+ * Configuration object for changing `getTransaction` query behavior
550
+ */
551
+ export type GetTransactionConfig = {
552
+ /** The level of finality desired */
553
+ commitment?: Finality;
554
+ /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */
555
+ maxSupportedTransactionVersion?: number;
556
+ };
539
557
  /**
540
558
  * Configuration object for changing `getLargestAccounts` query behavior
541
559
  */
@@ -1738,9 +1756,7 @@ declare module '@solana/web3.js' {
1738
1756
  */
1739
1757
  getBlock(
1740
1758
  slot: number,
1741
- opts?: {
1742
- commitment?: Finality;
1743
- },
1759
+ rawConfig?: GetBlockConfig,
1744
1760
  ): Promise<BlockResponse | null>;
1745
1761
  getBlockHeight(
1746
1762
  commitmentOrConfig?: Commitment | GetBlockHeightConfig,
@@ -1753,9 +1769,7 @@ declare module '@solana/web3.js' {
1753
1769
  */
1754
1770
  getTransaction(
1755
1771
  signature: string,
1756
- opts?: {
1757
- commitment?: Finality;
1758
- },
1772
+ rawConfig?: GetTransactionConfig,
1759
1773
  ): Promise<TransactionResponse | null>;
1760
1774
  /**
1761
1775
  * Fetch parsed transaction details for a confirmed or finalized transaction