signTransaction
Signs a transaction with the Kora fee payer if the transaction includes necessary payment to the fee payer without broadcasting it.
JSON-RPC Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "signTransaction",
"params": {
"transaction": "base64EncodedTransaction"
}
}JSON-RPC Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"signature": "base58Signature",
"signed_transaction": "base64EncodedTransaction",
"signer_pubkey": "3Z1Ef7YaxK8oUMoi6exf7wYZjZKWJJsrzJXSt1c3qrDE"
}
}cURL Example
curl -X POST http://localhost:8080 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"signTransaction","params":{"transaction":"base64EncodedTransaction"}}'TypeScript SDK
const result = await client.signTransaction({
transaction: 'base64EncodedTransaction'
});
console.log('Signature:', result.signature);
console.log('Signed tx:', result.signed_transaction);