Hi team,
I’m encountering a persistent issue when using prepareSendingNativeSOL from SolanaSwift 5.0.0.
Everything works until the prepareSendingNativeSOL step, where I get this error:
❌ Fehler bei prepareTransaction: responseError(SolanaSwift.ResponseError(code: Optional(-32601), message: Optional("Method not found"), data: nil))
This happens even though:
- Devnet endpoint is healthy (
getHealth returns ok)
getBalance works
- KeyPair is valid and works
- The transaction amount is low and fee is estimated correctly
- The wallet has more than enough lamports
Here is my relevant code for sendSOL:
let endpoint = APIEndPoint(address: "https://api.devnet.solana.com", network: .devnet)
let apiClient = JSONRPCAPIClient(endpoint: endpoint)
let blockchainClient = BlockchainClient(apiClient: apiClient)
let prepared = try await blockchainClient.prepareSendingNativeSOL(
from: account,
to: address,
amount: lamports
)
The error returned is:
The operation couldn’t be completed. (SolanaSwift.APIClientError error 0.)
I have checked the endpoint health and version:
curl https://api.devnet.solana.com
-X POST -H "Content-Type: application/json"
-d '{"jsonrpc":"2.0","id":1,"method":"getHealth","params":[]}'
→ { "result": "ok" }
curl https://api.devnet.solana.com
-X POST -H "Content-Type: application/json"
-d '{"jsonrpc":"2.0","id":1,"method":"getVersion","params":[]}'
→ solana-core: 2.3.5
What’s the correct RPC method called by prepareSendingNativeSOL under the hood, and is it deprecated or missing on this node?
Any guidance or fixes would be appreciated. Let me know if you need a repro project.
Thanks in advance!
Rafael Reverberi
MyCode.txt
Hi team,
I’m encountering a persistent issue when using
prepareSendingNativeSOLfromSolanaSwift 5.0.0.Everything works until the
prepareSendingNativeSOLstep, where I get this error:❌ Fehler bei prepareTransaction: responseError(SolanaSwift.ResponseError(code: Optional(-32601), message: Optional("Method not found"), data: nil))
This happens even though:
getHealthreturnsok)getBalanceworksHere is my relevant code for
sendSOL:let endpoint = APIEndPoint(address: "https://api.devnet.solana.com", network: .devnet)
let apiClient = JSONRPCAPIClient(endpoint: endpoint)
let blockchainClient = BlockchainClient(apiClient: apiClient)
let prepared = try await blockchainClient.prepareSendingNativeSOL(
from: account,
to: address,
amount: lamports
)
The error returned is:
The operation couldn’t be completed. (SolanaSwift.APIClientError error 0.)
I have checked the endpoint health and version:
curl https://api.devnet.solana.com
-X POST -H "Content-Type: application/json"
-d '{"jsonrpc":"2.0","id":1,"method":"getHealth","params":[]}'
→ { "result": "ok" }
curl https://api.devnet.solana.com
-X POST -H "Content-Type: application/json"
-d '{"jsonrpc":"2.0","id":1,"method":"getVersion","params":[]}'
→ solana-core: 2.3.5
What’s the correct RPC method called by prepareSendingNativeSOL under the hood, and is it deprecated or missing on this node?
Any guidance or fixes would be appreciated. Let me know if you need a repro project.
Thanks in advance!
Rafael Reverberi
MyCode.txt