@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.
@@ -6980,8 +6980,15 @@ class Connection {
6980
6980
  */
6981
6981
 
6982
6982
 
6983
- async getBlock(slot, opts) {
6984
- const args = this._buildArgsAtLeastConfirmed([slot], opts && opts.commitment);
6983
+ async getBlock(slot, rawConfig) {
6984
+ const {
6985
+ commitment,
6986
+ config
6987
+ } = extractCommitmentFromConfig(rawConfig);
6988
+
6989
+ const args = this._buildArgsAtLeastConfirmed([slot], commitment, undefined
6990
+ /* encoding */
6991
+ , config);
6985
6992
 
6986
6993
  const unsafeRes = await this._rpcRequest('getBlock', args);
6987
6994
  const res = create(unsafeRes, GetBlockRpcResult);
@@ -7067,8 +7074,15 @@ class Connection {
7067
7074
  */
7068
7075
 
7069
7076
 
7070
- async getTransaction(signature, opts) {
7071
- const args = this._buildArgsAtLeastConfirmed([signature], opts && opts.commitment);
7077
+ async getTransaction(signature, rawConfig) {
7078
+ const {
7079
+ commitment,
7080
+ config
7081
+ } = extractCommitmentFromConfig(rawConfig);
7082
+
7083
+ const args = this._buildArgsAtLeastConfirmed([signature], commitment, undefined
7084
+ /* encoding */
7085
+ , config);
7072
7086
 
7073
7087
  const unsafeRes = await this._rpcRequest('getTransaction', args);
7074
7088
  const res = create(unsafeRes, GetTransactionRpcResult);