es/account/index.js
async function signTransaction (tx) {
  const networkId = this.getNetworkId()
  const rlpBinaryTx = Crypto.decodeBase64Check(Crypto.assertedType(tx, 'tx'))
  // Prepend `NETWORK_ID` to begin of data binary
  const txWithNetworkId = Buffer.concat([Buffer.from(networkId), rlpBinaryTx])

  const signatures = [await this.sign(txWithNetworkId)]
  return buildTx({ encodedTx: rlpBinaryTx, signatures }, TX_TYPE.signed).tx
}
async function signTransaction (tx) {
  const networkId = this.getNetworkId()
  const rlpBinaryTx = Crypto.decodeBase64Check(Crypto.assertedType(tx, 'tx'))
  // Prepend `NETWORK_ID` to begin of data binary
  const txWithNetworkId = Buffer.concat([Buffer.from(networkId), rlpBinaryTx])

  const signatures = [await this.sign(txWithNetworkId)]
  return buildTx({ encodedTx: rlpBinaryTx, signatures }, TX_TYPE.signed).tx
}
async function signTransaction ( tx ) { const networkId = this . getNetworkId ( ) const rlpBinaryTx = Crypto . decodeBase64Check ( Crypto . assertedType ( tx , 'tx' ) ) // Prepend `NETWORK_ID` to begin of data binary const txWithNetworkId = Buffer . concat ( [ Buffer . from ( networkId ) , rlpBinaryTx ] ) const signatures = [ await this . sign ( txWithNetworkId ) ] return buildTx ( { encodedTx : rlpBinaryTx , signatures } , TX_TYPE . signed ) . tx }
Sign encoded transaction
@instance
@category async
@rtype (tx: String) => tx: Promise[String], throws: Error
@param {String} tx - Transaction to sign
@return {String} Signed transaction
Sign encoded transaction