Lets say I have a transaction like below:
var tx = { transaction_id:
'111ee28e5deca69e54dadf751eba8fae181f0ceafc601dcab92700f5200abef8',
broadcast: false,
transaction:
{ compression: 'none',
transaction:
{ expiration: '2018-05-09T13:00:16',
region: 0,
ref_block_num: 19637,
ref_block_prefix: 1895049749,
max_net_usage_words: 0,
max_kcpu_usage: 0,
delay_sec: 0,
context_free_actions: [],
actions: [Array] },
signatures: [] } }
Let's say const privateKey = 5KBwtUpu6qMKysaUXswjQr1b3Rhdza2EftAUFQPi6wZpUdkcY13
What is the specific process for signing this transaction? How are the fields encoded and what data is included in the transaction signature?