@solana/web3.js 1.48.0 → 1.49.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.
@@ -7011,8 +7011,15 @@ class Connection {
7011
7011
  */
7012
7012
 
7013
7013
 
7014
- async getBlock(slot, opts) {
7015
- const args = this._buildArgsAtLeastConfirmed([slot], opts && opts.commitment);
7014
+ async getBlock(slot, rawConfig) {
7015
+ const {
7016
+ commitment,
7017
+ config
7018
+ } = extractCommitmentFromConfig(rawConfig);
7019
+
7020
+ const args = this._buildArgsAtLeastConfirmed([slot], commitment, undefined
7021
+ /* encoding */
7022
+ , config);
7016
7023
 
7017
7024
  const unsafeRes = await this._rpcRequest('getBlock', args);
7018
7025
  const res = superstruct.create(unsafeRes, GetBlockRpcResult);
@@ -7098,8 +7105,15 @@ class Connection {
7098
7105
  */
7099
7106
 
7100
7107
 
7101
- async getTransaction(signature, opts) {
7102
- const args = this._buildArgsAtLeastConfirmed([signature], opts && opts.commitment);
7108
+ async getTransaction(signature, rawConfig) {
7109
+ const {
7110
+ commitment,
7111
+ config
7112
+ } = extractCommitmentFromConfig(rawConfig);
7113
+
7114
+ const args = this._buildArgsAtLeastConfirmed([signature], commitment, undefined
7115
+ /* encoding */
7116
+ , config);
7103
7117
 
7104
7118
  const unsafeRes = await this._rpcRequest('getTransaction', args);
7105
7119
  const res = superstruct.create(unsafeRes, GetTransactionRpcResult);