-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Bitcoin::Crypto::Manual with moved main docs
- Loading branch information
Showing
3 changed files
with
137 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
=head1 NAME | ||
|
||
Bitcoin::Crypto::Manual - Module overview | ||
|
||
=head1 DESCRIPTION | ||
|
||
This module allows you to perform low-level tasks for Bitcoin such as: | ||
|
||
=over | ||
|
||
=item * creating extended keys and utilizing bip32 key derivation | ||
|
||
=item * creating private key / public key pairs | ||
|
||
=item * address generation (in legacy, compatibility and segwit formats) | ||
|
||
=item * importing / exporting using popular mediums (WIF, mnemonic, hex) | ||
|
||
=item * building, serializing and running transaction scripts | ||
|
||
=item * serializing, signing and verifying transactions | ||
|
||
=back | ||
|
||
This module won't help you with: | ||
|
||
=over | ||
|
||
=item * handling Bitcoin blocks and the blockchain | ||
|
||
=item * using any Bitcoin CLI tools / clients | ||
|
||
=item * connecting to Bitcoin network | ||
|
||
=back | ||
|
||
=head1 WHERE TO START? | ||
|
||
Documentation and examples in this module assume you're already familiar with | ||
the basics of Bitcoin protocol and asymmetric cryptography. If that's not the | ||
case, start with reading about those topics. | ||
|
||
If you like to learn by example, dive right into the examples directory. | ||
|
||
There are many goals which you may want to achieve with this module. Common | ||
topics include: | ||
|
||
=over | ||
|
||
=item * create a key pair for signature or address generation | ||
|
||
Start with L<Bitcoin::Crypto::Key::Private> if you already have some data you | ||
want to use as a private key entropy (like Bitcoin's C<WIF> format or hex | ||
data). If you'd like to generate list of words (a mnemonic) instead, see | ||
L<Bitcoin::Crypto::Util/generate_mnemonic> and | ||
L<Bitcoin::Crypto::Key::ExtPrivate/from_mnemonic>. | ||
|
||
=item * generate many keys at once | ||
|
||
L<Bitcoin::Crypto::Key::ExtPrivate> allows you to derive multiple keys from a | ||
master key, so you don't have to store multiple private keys. | ||
L<Bitcoin::Crypto::Key::ExtPublic> can be then used to derive public keys | ||
lazily. I<(Note: storing extended public keys together with private keys in a | ||
hot storage will put your extended private key at risk!)> | ||
|
||
=item * create a transaction object from scratch or from serialized transaction data | ||
|
||
See L<Bitcoin::Crypto::Manual::Transactions>. | ||
|
||
=item * utilize Bitcoin Script | ||
|
||
L<Bitcoin::Crypto::Script> will help you build, de/serialize and run a script. | ||
L<Bitcoin::Crypto::Script::Runner> gives you more control over script execution, | ||
including running the script step by step, stopping after each opcode. | ||
|
||
=item * work with Bitcoin-related encodings | ||
|
||
See L<Bitcoin::Crypto::Base58> and L<Bitcoin::Crypto::Bech32>. | ||
|
||
=item * work with other cryptocurrencies | ||
|
||
You can work with any cryptocurrency as long as it is based on the same | ||
fundamentals as Bitcoin. You have to register a network in | ||
L<Bitcoin::Crypto::Network> first, with the protocol data valid for your | ||
cryptocurrency. | ||
|
||
=back | ||
|
||
=head1 HOW TO READ THE DOCUMENTATION? | ||
|
||
Most functions in this documentation have a code line showcasing the arguments | ||
used by the function. These lines are not meant to be valid perl. They're there | ||
for you to understand what arguments the function expects. | ||
|
||
Most packages in this module have the types of their thrown exceptions | ||
documented near the bottom of the document. The exceptions section may be | ||
useful to understand which types of exceptions can be thrown when using | ||
functions or methods from the package and what they mean. It is not meant to be | ||
a full list of exceptions a function can throw and unblessed errors may still | ||
be raised. | ||
|
||
=head1 DISCLAIMER | ||
|
||
Although the module was written with an extra care and appropriate tests are in | ||
place asserting compatibility with many Bitcoin standards, due to complexity of | ||
the subject some bugs may still be present. In the world of digital money, a | ||
single bug may lead to losing funds. I encourage anyone to test the module | ||
themselves, review the test cases and use the module with care. Suggestions for | ||
improvements and more edge cases to test will be gladly accepted, but there is | ||
B<no warranty on your funds being manipulated by this module>. | ||
|
||
=head1 TODO | ||
|
||
I will gladly accept help working on these: | ||
|
||
=over 2 | ||
|
||
=item * All listed in L<Bitcoin::Crypto::Manual::Transactions/Current known problems with transactions> | ||
|
||
=item * Taproot compatibility | ||
|
||
=item * Better error checking (edge cases etc.) | ||
|
||
=item * Better test coverage | ||
|
||
=back | ||
|
||
=cut | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
__END__ | ||
=head1 NAME | ||
|
||
Bitcoin::Crypto::Manual::Transactions - Transaction support details | ||
|