code: func handleDecodeRawTransaction(s *rpcServer, cmd interface{}, closeChan <-chan struct{}) (interface{}, error) {
  	c := cmd.(*btcjson.DecodeRawTransactionCmd)
  
  	// Deserialize the transaction.
  	hexStr := c.HexTx
  	if len(hexStr)%2 != 0 {
  		hexStr = "0" + hexStr
  	}
  	serializedTx, err := hex.DecodeString(hexStr)
  	if err != nil {
  		return nil, rpcDecodeHexError(hexStr)
  	}
  	var mtx wire.MsgTx
  	err = mtx.Deserialize(bytes.NewReader(serializedTx))
  	if err != nil {
  		return nil, &btcjson.RPCError{
  			Code:    btcjson.ErrRPCDeserialization,
  			Message: "TX decode failed: " + err.Error(),
  		}
  	}
  
  	// Create and return the result.
  	txReply := btcjson.TxRawDecodeResult{
  		Txid:     mtx.TxHash().String(),
  		Version:  mtx.Version,
  		Locktime: mtx.LockTime,
  		Vin:      createVinList(&mtx),
  		Vout:     createVoutList(&mtx, s.cfg.ChainParams, nil),
  	}
  	return txReply, nil
  }
docs: // handleDecodeRawTransaction handles decoderawtransaction commands.