send Transaction
Submits a transaction to the Stellar network.
Unlike Horizon, Soroban RPC does not wait for transaction completion. It validates and enqueues the transaction, then returns immediately. Use getTransaction or pollTransaction to check transaction status.
Example
val response = server.sendTransaction(transaction)
when (response.status) {
SendTransactionStatus.PENDING -> {
// Poll for completion
val result = server.pollTransaction(response.hash!!)
}
SendTransactionStatus.DUPLICATE -> println("Already submitted")
SendTransactionStatus.ERROR -> println("Error: ${response.errorResultXdr}")
}Content copied to clipboard
Return
Submission response with status and transaction hash
Parameters
transaction
The signed transaction to submit
See also
Throws
If the RPC request fails