klay_signTransaction

Constructs a transaction with given parameters and signs the transaction with a sender's private key.

Parameters

The required parameters depend on the transaction type. Check the proper parameters in Klaytn Docs.

Return Value

TypeDescription

raw

Signed raw transaction

tx

Transaction object including the sender's signature

Example

// Request
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0", "method":"klay_signTransaction", "params":[{"from":"0x77982323172e5b6182539d3522d5a33a944206d4", "to":"0xcd6bfdb523a4d030890d28bf1eb6ef36307c9aaa", "value":"0x10000", "gas":"0x1000000", "nonce":"0x2", "gasprice":"0x25000000000"}],"id":73}' http://klaytn.blockpi.network/v1/rpc/your-api-key