Libbtc is a very portable C library for creating and manipulating bitcoin data structures and interacting with the p2p network.