Unless you are an ISP, then you do not own an IP address and are not entitled to sell it.
IP addresses are allocated in blocks by the Internet Authorities to the various ISPs around the world. The ISPs then assign IP addresses to their customers from the blocks they have been assigned. For business customers, they will probably assign a fixed IP that you will keep generally for as long as you remain with the ISP. You will pay extra for a static (fixed) address. Home customers normally receive a dynamic (changeable) IP that may change every few hours or days.
However, I suspect you are talking about IPR (Intellectual Property Rights) and not IP (Internet Protocol [address]). That's the problem with using abbreviations, and in particular the wrong abbreviation.
If you are talking about IPR, then you need to investigate the copyright and/or patent situation. Copyright protects the actual code, while a patent protects the ideas and concepts on which the code is built.
There are many ways to encrypt code to prevent reverse engineering. This will depend on the type of code you have got. Generally, you do not need to involve anyone else when you encrypt code or embed licence mechanisms. All third parties can do is help protect against direct copying of your code or writing similar code based on the concepts you have used. These are through copyright and patents respectively.
I hope this helps.