Starting out: a sample project #10
bbrtj
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If you'd like to give these libraries a try but don't have an idea what you can do with them, here's are some tasks you can complete without much Bitcoin knowledge:
Basic - key manipulation
Bitcoin::Crypto
from CPAN. Generate a new wallet mnemonic phrase usinggenerate_mnemonic
fromBitcoin::Crypto::Util
- this is the private master key, don't share it with anyone.from_mnemonic
fromBitcoin::Crypto::Key::ExtPrivate
. Set the network of the key object tobitcoin_testnet
usingset_network
.derive_key_bip44
method, derive a key with a standard derivation path. Turn extended key into a regular private key (get_basic_key
), private key into a public key (get_public_key
), and public key into an address (get_address
).purpose => Bitcoin::Crypto::Constants::bip44_segwit_purpose
. Verify whether you got it correct using tools like https://iancoleman.io/bip39/.Advanced - transactions
[email protected]
. I will send some testnet coins to your address. Wait for the transactions to be confirmed on the blockchain. Use https://mempool.space/testnet to check your address.extract
method fromBitcoin::Crypto::Transaction::UTXO
. You should be able to useget
method from that class to obtain the UTXO object for the transaction.Bitcoin::Crypto::Manual::Transactions
. There are also some transaction examples you can follow to make things easier. You should add at least one output to the transaction with the address which sent you the coins. Bonus points if you also add a NULLDATA output with text"Perl Rocks"
. You can keep some of the coins if you want to continue testing, by adding your own address as an output to the transaction.Next steps
Beta Was this translation helpful? Give feedback.
All reactions