mrtnetwork / bitcoin_base

A versatile library for Bitcoin, Dogecoin, Litecoin, Dash, BSV and Bitcoin Cash. Supports P2PK, P2PKH, P2SH, P2WPKH, P2WSH, Taproot, with advanced creation, signing, and spending capabilities.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

More detailed tests

ivofernandes opened this issue · comments

Is it possible for you to add a test that picks a seedphrase and some transaction to generate and hexadecimal?

I found this tests very complicated to follow as they pick private key wif, then addresses and seems like all was pre generated
https://github.com/mrtnetwork/bitcoin_base/blob/main/test/p2kh_tr_test.dart

Not sure if is clear what I mean, I can try to create a test if it's easier

Is it possible for you to add a test that picks a seedphrase and some transaction to generate and hexadecimal?

I found this tests very complicated to follow as they pick private key wif, then addresses and seems like all was pre generated https://github.com/mrtnetwork/bitcoin_base/blob/main/test/p2kh_tr_test.dart

Not sure if is clear what I mean, I can try to create a test if it's easier

Hi, please look at https://github.com/mrtnetwork/bitcoin_base/tree/main/example/spending_with_scripts and https://github.com/mrtnetwork/bitcoin_base/tree/main/example/spending_with_transaction_builder to see how it works.

I believe this example will assist you in creating transactions and gaining a better understanding of the process. If you prefer a scripted approach, I recommend exploring the TransactionBuilder code for a more streamlined experience

Thanks :)

That transaction builder test is really amazing, thanks for your amazing work