Does anyone know of a good api or library that can be used to derive all addresses from an xpub key?
I suspect you can do this using the bx
tool.
The linked page describes how to create hd public keys and convert those to addresses.
bx seed > seed
bx hd-new < seed > master
bx hd-private --hard < master > account
bx hd-public --index 0 < account | bx hd-to-ec | bx ec-to-address
bx hd-public --index 1 < account | bx hd-to-ec | bx ec-to-address
bx hd-public --index 2 < account | bx hd-to-ec | bx ec-to-address
The above seems to work for me.
Since bx
is supplied as part of libbitcoin
, I imagine that library can be used to produce addresses.
The libbitcoin toolkit is a set of cross platform C++ libraries for building bitcoin applications. The toolkit consists of several libraries, most of which depend on the foundational libbitcoin library. Each library's repository can be cloned and built using common Automake instructions.