@@ -211,7 +211,7 @@ public RequestResult<ResponseValue<ulong>> GetBalance(string pubKey,
211
211
public async Task < RequestResult < BlockInfo > > GetBlockAsync ( ulong slot ,
212
212
Commitment commitment = Commitment . Finalized ,
213
213
TransactionDetailsFilterType transactionDetails = TransactionDetailsFilterType . Full ,
214
- bool blockRewards = false )
214
+ bool blockRewards = false , int maxSupportedTransactionVersion = 0 )
215
215
{
216
216
if ( commitment == Commitment . Processed )
217
217
{
@@ -221,6 +221,7 @@ public async Task<RequestResult<BlockInfo>> GetBlockAsync(ulong slot,
221
221
return await SendRequestAsync < BlockInfo > ( "getBlock" ,
222
222
Parameters . Create ( slot , ConfigObject . Create (
223
223
KeyValue . Create ( "encoding" , "json" ) ,
224
+ KeyValue . Create ( "maxSupportedTransactionVersion" , maxSupportedTransactionVersion ) ,
224
225
HandleTransactionDetails ( transactionDetails ) ,
225
226
KeyValue . Create ( "rewards" , blockRewards ? blockRewards : null ) ,
226
227
HandleCommitment ( commitment ) ) ) ) ;
@@ -229,8 +230,8 @@ public async Task<RequestResult<BlockInfo>> GetBlockAsync(ulong slot,
229
230
/// <inheritdoc cref="IRpcClient.GetBlock"/>
230
231
public RequestResult < BlockInfo > GetBlock ( ulong slot , Commitment commitment = Commitment . Finalized ,
231
232
TransactionDetailsFilterType transactionDetails = TransactionDetailsFilterType . Full ,
232
- bool blockRewards = false )
233
- => GetBlockAsync ( slot , commitment , transactionDetails , blockRewards ) . Result ;
233
+ bool blockRewards = false , int maxSupportedTransactionVersion = 0 )
234
+ => GetBlockAsync ( slot , commitment , transactionDetails , blockRewards , maxSupportedTransactionVersion ) . Result ;
234
235
235
236
236
237
/// <inheritdoc cref="IRpcClient.GetBlocksAsync"/>
@@ -251,7 +252,7 @@ public async Task<RequestResult<List<ulong>>> GetBlocksAsync(ulong startSlot, ul
251
252
public async Task < RequestResult < BlockInfo > > GetConfirmedBlockAsync ( ulong slot ,
252
253
Commitment commitment = Commitment . Finalized ,
253
254
TransactionDetailsFilterType transactionDetails = TransactionDetailsFilterType . Full ,
254
- bool blockRewards = false )
255
+ bool blockRewards = false , int maxSupportedTransactionVersion = 0 )
255
256
{
256
257
if ( commitment == Commitment . Processed )
257
258
{
@@ -261,6 +262,7 @@ public async Task<RequestResult<BlockInfo>> GetConfirmedBlockAsync(ulong slot,
261
262
return await SendRequestAsync < BlockInfo > ( "getConfirmedBlock" ,
262
263
Parameters . Create ( slot , ConfigObject . Create (
263
264
KeyValue . Create ( "encoding" , "json" ) ,
265
+ KeyValue . Create ( "maxSupportedTransactionVersion" , maxSupportedTransactionVersion ) ,
264
266
HandleTransactionDetails ( transactionDetails ) ,
265
267
KeyValue . Create ( "rewards" , blockRewards ? blockRewards : null ) ,
266
268
HandleCommitment ( commitment ) ) ) ) ;
@@ -269,7 +271,7 @@ public async Task<RequestResult<BlockInfo>> GetConfirmedBlockAsync(ulong slot,
269
271
/// <inheritdoc cref="IRpcClient.GetConfirmedBlock"/>
270
272
public RequestResult < BlockInfo > GetConfirmedBlock ( ulong slot , Commitment commitment = Commitment . Finalized ,
271
273
TransactionDetailsFilterType transactionDetails = TransactionDetailsFilterType . Full ,
272
- bool blockRewards = false )
274
+ bool blockRewards = false , int maxSupportedTransactionVersion = 0 )
273
275
=> GetConfirmedBlockAsync ( slot , commitment , transactionDetails , blockRewards ) . Result ;
274
276
275
277
@@ -425,31 +427,31 @@ public async Task<RequestResult<Dictionary<string, List<ulong>>>> GetLeaderSched
425
427
426
428
/// <inheritdoc cref="IRpcClient.GetTransactionAsync"/>
427
429
public async Task < RequestResult < TransactionMetaSlotInfo > > GetTransactionAsync ( string signature ,
428
- Commitment commitment = Commitment . Finalized )
430
+ Commitment commitment = Commitment . Finalized , int maxSupportedTransactionVersion = 0 )
429
431
{
430
432
return await SendRequestAsync < TransactionMetaSlotInfo > ( "getTransaction" ,
431
433
Parameters . Create ( signature ,
432
- ConfigObject . Create ( KeyValue . Create ( "encoding" , "json" ) , HandleCommitment ( commitment ) ) ) ) ;
434
+ ConfigObject . Create ( KeyValue . Create ( "encoding" , "json" ) , HandleCommitment ( commitment ) , KeyValue . Create ( "maxSupportedTransactionVersion" , maxSupportedTransactionVersion ) ) ) ) ;
433
435
}
434
436
435
- /// <inheritdoc cref="IRpcClient.GetConfirmedTransactionAsync(string, Commitment)"/>
437
+ /// <inheritdoc cref="IRpcClient.GetConfirmedTransactionAsync(string, Commitment, int )"/>
436
438
public async Task < RequestResult < TransactionMetaSlotInfo > > GetConfirmedTransactionAsync ( string signature ,
437
- Commitment commitment = Commitment . Finalized )
439
+ Commitment commitment = Commitment . Finalized , int maxSupportedTransactionVersion = 0 )
438
440
{
439
441
return await SendRequestAsync < TransactionMetaSlotInfo > ( "getConfirmedTransaction" ,
440
442
Parameters . Create ( signature ,
441
- ConfigObject . Create ( KeyValue . Create ( "encoding" , "json" ) , HandleCommitment ( commitment ) ) ) ) ;
443
+ ConfigObject . Create ( KeyValue . Create ( "encoding" , "json" ) , HandleCommitment ( commitment ) , KeyValue . Create ( "maxSupportedTransactionVersion" , maxSupportedTransactionVersion ) ) ) ) ;
442
444
}
443
445
444
446
/// <inheritdoc cref="IRpcClient.GetTransaction"/>
445
447
public RequestResult < TransactionMetaSlotInfo > GetTransaction ( string signature ,
446
- Commitment commitment = Commitment . Finalized )
447
- => GetTransactionAsync ( signature , commitment ) . Result ;
448
+ Commitment commitment = Commitment . Finalized , int maxSupportedTransactionVersion = 0 )
449
+ => GetTransactionAsync ( signature , commitment , maxSupportedTransactionVersion ) . Result ;
448
450
449
- /// <inheritdoc cref="IRpcClient.GetConfirmedTransaction(string, Commitment)"/>
451
+ /// <inheritdoc cref="IRpcClient.GetConfirmedTransaction(string, Commitment, int )"/>
450
452
public RequestResult < TransactionMetaSlotInfo > GetConfirmedTransaction ( string signature ,
451
- Commitment commitment = Commitment . Finalized ) =>
452
- GetConfirmedTransactionAsync ( signature , commitment ) . Result ;
453
+ Commitment commitment = Commitment . Finalized , int maxSupportedTransactionVersion = 0 ) =>
454
+ GetConfirmedTransactionAsync ( signature , commitment , maxSupportedTransactionVersion ) . Result ;
453
455
454
456
/// <inheritdoc cref="IRpcClient.GetBlockHeightAsync"/>
455
457
public async Task < RequestResult < ulong > > GetBlockHeightAsync ( Commitment commitment = Commitment . Finalized )
0 commit comments