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