28 #ifndef __LIBBTC_TX_H__
29 #define __LIBBTC_TX_H__
116 #endif //__LIBBTC_TX_H__
LIBBTC_API void btc_tx_in_free(btc_tx_in *tx_in)
LIBBTC_API void btc_tx_out_free(btc_tx_out *tx_out)
LIBBTC_API void btc_tx_serialize(cstring *s, const btc_tx *tx)
serialize a lbc bitcoin data structure into a p2p serialized buffer
LIBBTC_API int btc_tx_deserialize(const unsigned char *tx_serialized, size_t inlen, btc_tx *tx)
deserialize/parse a p2p serialized bitcoin transaction
LIBBTC_API btc_bool btc_tx_add_p2pkh_out(btc_tx *tx, int64_t amount, const btc_pubkey *pubkey)
LIBBTC_API btc_bool btc_tx_add_p2sh_hash160_out(btc_tx *tx, int64_t amount, uint8_t *hash160)
LIBBTC_API btc_bool btc_tx_sighash(const btc_tx *tx_to, const cstring *fromPubKey, unsigned int in_num, int hashtype, uint8_t *hash)
struct btc_tx_in_ btc_tx_in
LIBBTC_API btc_bool btc_tx_add_address_out(btc_tx *tx, const btc_chain *chain, int64_t amount, const char *address)
LIBBTC_API btc_bool btc_tx_add_p2pkh_hash160_out(btc_tx *tx, int64_t amount, uint8_t *hash160)
LIBBTC_API btc_tx_in * btc_tx_in_new()
create a new tx input
LIBBTC_API void btc_tx_copy(btc_tx *dest, const btc_tx *src)
struct btc_tx_outpoint_ btc_tx_outpoint
struct btc_script_ btc_script
LIBBTC_API btc_tx * btc_tx_new()
create a new tx input
LIBBTC_API void btc_tx_out_copy(btc_tx_out *dest, const btc_tx_out *src)
LIBBTC_API void btc_tx_in_copy(btc_tx_in *dest, const btc_tx_in *src)
LIBBTC_API void btc_tx_hash(const btc_tx *tx, uint8_t *hashout)
struct btc_tx_out_ btc_tx_out
LIBBTC_API btc_tx_out * btc_tx_out_new()
create a new tx output
LIBBTC_API void btc_tx_free(btc_tx *tx)