@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.
package/lib/index.cjs.js CHANGED
@@ -7096,8 +7096,15 @@ class Connection {
7096
7096
  */
7097
7097
 
7098
7098
 
7099
- async getBlock(slot, opts) {
7100
- const args = this._buildArgsAtLeastConfirmed([slot], opts && opts.commitment);
7099
+ async getBlock(slot, rawConfig) {
7100
+ const {
7101
+ commitment,
7102
+ config
7103
+ } = extractCommitmentFromConfig(rawConfig);
7104
+
7105
+ const args = this._buildArgsAtLeastConfirmed([slot], commitment, undefined
7106
+ /* encoding */
7107
+ , config);
7101
7108
 
7102
7109
  const unsafeRes = await this._rpcRequest('getBlock', args);
7103
7110
  const res = superstruct.create(unsafeRes, GetBlockRpcResult);
@@ -7183,8 +7190,15 @@ class Connection {
7183
7190
  */
7184
7191
 
7185
7192
 
7186
- async getTransaction(signature, opts) {
7187
- const args = this._buildArgsAtLeastConfirmed([signature], opts && opts.commitment);
7193
+ async getTransaction(signature, rawConfig) {
7194
+ const {
7195
+ commitment,
7196
+ config
7197
+ } = extractCommitmentFromConfig(rawConfig);
7198
+
7199
+ const args = this._buildArgsAtLeastConfirmed([signature], commitment, undefined
7200
+ /* encoding */
7201
+ , config);
7188
7202
 
7189
7203
  const unsafeRes = await this._rpcRequest('getTransaction', args);
7190
7204
  const res = superstruct.create(unsafeRes, GetTransactionRpcResult);