Hi Solana-Swift Team,
I noticed that the JSONRPCAPIClient.getRecentBlockhash method in this library still uses the getRecentBlockhash RPC method:
public func getRecentBlockhash(commitment: Commitment? = nil) async throws -> String { let result: Rpc<Fee> = try await get(method: "getRecentBlockhash", params: [RequestConfiguration(commitment: commitment)]) guard let blockhash = result.value.blockhash else { throw APIClientError.blockhashNotFound } return blockhash }
However, according to the Solana official documentation:
The getRecentBlockhash RPC method is only available for solana-core v1.8 and below. For solana-core v1.9 and later, please use getLatestBlockhash.
This means that projects using newer Solana nodes may encounter deprecated RPC calls or unexpected failures.
It would be great if the library could:
Update the method to use getLatestBlockhash for Solana v1.9+ nodes.
Optionally provide backward compatibility for v1.8 and below, perhaps via a fallback mechanism.
This will ensure the library works correctly with the current Solana versions and prevents deprecation issues.
Thanks for your attention and for maintaining this library!
Hi Solana-Swift Team,
I noticed that the JSONRPCAPIClient.getRecentBlockhash method in this library still uses the getRecentBlockhash RPC method:
public func getRecentBlockhash(commitment: Commitment? = nil) async throws -> String { let result: Rpc<Fee> = try await get(method: "getRecentBlockhash", params: [RequestConfiguration(commitment: commitment)]) guard let blockhash = result.value.blockhash else { throw APIClientError.blockhashNotFound } return blockhash }However, according to the Solana official documentation:
The getRecentBlockhash RPC method is only available for solana-core v1.8 and below. For solana-core v1.9 and later, please use getLatestBlockhash.
This means that projects using newer Solana nodes may encounter deprecated RPC calls or unexpected failures.
It would be great if the library could:
Update the method to use getLatestBlockhash for Solana v1.9+ nodes.
Optionally provide backward compatibility for v1.8 and below, perhaps via a fallback mechanism.
This will ensure the library works correctly with the current Solana versions and prevents deprecation issues.
Thanks for your attention and for maintaining this library!