From cb284eb8cbe477af33266754342e901bc034e176 Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:49:56 +0100 Subject: [PATCH 01/11] fix typos --- docs/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 7ad63787..d4a617ad 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,7 +6,7 @@ Welcome to Bitcoinlib's documentation! ====================================== -Bitcoin cryptocurrency Library writen in Python. +Bitcoin cryptocurrency Library written in Python. Allows you to create a fully functional wallet with a single line of code. Use this library to create and manage transactions, addresses/keys, wallets, mnemonic password phrases and blocks with @@ -194,7 +194,7 @@ http://bitcoinlib.readthedocs.io/en/latest/_static/manuals.command-line-wallet.h Service providers ----------------- -Communicates with pools of bitcoin service providers to retreive transaction, address, blockchain information. +Communicates with pools of bitcoin service providers to retrieve transaction, address, blockchain information. To push a transaction to the network. To determine optimal service fee for a transaction. Or to update your wallet's balance. From 75e337a613f07c18997435d12c1e79bb47507dc2 Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:53:06 +0100 Subject: [PATCH 02/11] fix typos --- docs/_static/script-types-overview.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_static/script-types-overview.rst b/docs/_static/script-types-overview.rst index 7fca8774..b541a1f1 100644 --- a/docs/_static/script-types-overview.rst +++ b/docs/_static/script-types-overview.rst @@ -59,5 +59,5 @@ Bitcoinlib script support The 'pubkey' lockscript and 'signature' unlocking script are ancient and not supported by BitcoinLib at the moment. -Using different encodings for addresses then the one listed in the Locking Script table is possible but -not adviced: It is not standard and not sufficiently tested. +Using different encodings for addresses than the one listed in the Locking Script table is possible but +not advised: It is not standard and not sufficiently tested. From 0dcae78e568d92e51bdc5ffd929bb450e3ac87ac Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:54:16 +0100 Subject: [PATCH 03/11] fix typos --- docs/_static/manuals.sqlcipher.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/_static/manuals.sqlcipher.rst b/docs/_static/manuals.sqlcipher.rst index 30341480..b89ce199 100644 --- a/docs/_static/manuals.sqlcipher.rst +++ b/docs/_static/manuals.sqlcipher.rst @@ -1,10 +1,10 @@ Encrypt Database or Private Keys ================================ -If you database contains private keys it is a good idea to encrypt your data. This will not be done automatically. At the moment you have 2 options: +If your database contains private keys it is a good idea to encrypt your data. This will not be done automatically. At the moment you have 2 options: - Encrypt the database with SQLCipher. The database is fully encrypted and you need to provide the password in the Database URI when opening the database. -- Use a normal database but all private key data will be stored AES encrypted in the database. A key to encrypt and decrypt need to be provided in the Environment. +- Use a normal database but all private key data will be stored AES encrypted in the database. A key to encrypt and decrypt needs to be provided in the Environment. Encrypt database with SQLCipher ------------------------------- @@ -35,7 +35,7 @@ Now you can simply create and use an encrypted database by supplying a password **Encrypt using Database URI** -You can also use a SQLCipher database URI to create and query a encrypted database: +You can also use a SQLCipher database URI to create and query an encrypted database: .. code-block:: python @@ -75,7 +75,7 @@ You can provide an encryption key directly or use a password to create a key: >>> Key().private_hex() '2414966ea9f2de189a61953c333f61013505dfbf8e383b5ed6cb1981d5ec2620' -This key needs to be stored in the environment when creating or accessing a wallet. No extra arguments have to be provided to the Wallet class, the data is encrypted an decrypted at database level. +This key needs to be stored in the environment when creating or accessing a wallet. No extra arguments have to be provided to the Wallet class, the data is encrypted and decrypted at database level. 2. You can also just provide a password, and let Bitcoinlib create a key for you. You will need to pass the DB_FIELD_ENCRYPTION_PASSWORD environment variable. @@ -99,4 +99,4 @@ Or in Windows: Environment variables can also be stored in an .env key, in a virtual environment or in Python code itself. However anyone with access to the key can decrypt your private keys. -Please make sure to remember and backup your encryption key or password, if you loose your key the private keys can not be recovered! \ No newline at end of file +Please make sure to remember and backup your encryption key or password, if you lose your key the private keys can not be recovered! From f902200b873e69e1962896ad96b07617093a1f27 Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:56:09 +0100 Subject: [PATCH 04/11] fix typos --- docs/_static/manuals.setup-bitcoind-connection.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/_static/manuals.setup-bitcoind-connection.rst b/docs/_static/manuals.setup-bitcoind-connection.rst index d3193f86..656aec62 100644 --- a/docs/_static/manuals.setup-bitcoind-connection.rst +++ b/docs/_static/manuals.setup-bitcoind-connection.rst @@ -1,15 +1,15 @@ How to connect bitcoinlib to a Bitcoin node =========================================== -This manual explains how to connect to a bitcoind server on your localhost or an a remote server. +This manual explains how to connect to a bitcoind server on your localhost or a remote server. Running your own bitcoin node allows you to create a large number of requests, faster response times, -and more control, privacy and independence. However you need to install and maintain it and it used +and more control, privacy and independence. However you need to install and maintain it and it uses a lot of resources. .. warning:: With a standard Bitcoin node you can only retrieve block and transaction information. You can not - query the node for information about specific addresses. So it not suitable to run in combination with a Bitcoinlib + query the node for information about specific addresses. So it is not suitable to run in combination with a Bitcoinlib wallet. If you would like to use Bitcoinlib wallets and not be dependent on external providers you should use a `Bcoin node `_ instead. @@ -77,7 +77,7 @@ Example: Connect using base_url argument ------------------------------- -You can also directly pass connection string wit the 'base_url' argument in the BitcoindClient object. +You can also directly pass connection string with the 'base_url' argument in the BitcoindClient object. This provides more flexibility but also the responsibility to store user and password information in a secure way. @@ -115,4 +115,4 @@ Using RPC over a public network is unsafe, so since bitcoind version 0.18 remote are disabled. The rpcallowip option cannot be used to listen on all network interfaces and rpcbind has to be used to define specific IP addresses to listen on. See https://bitcoin.org/en/release/v0.18.0#configuration-option-changes -You could setup a openvpn or ssh tunnel to connect to a remote server to avoid this issues. +You could setup an openvpn or ssh tunnel to connect to a remote server to avoid this issues. From 93db293fc026aef483ac23e37f13e7330ae7632c Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:56:57 +0100 Subject: [PATCH 05/11] fix typo --- docs/_static/manuals.setup-bcoin.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_static/manuals.setup-bcoin.rst b/docs/_static/manuals.setup-bcoin.rst index 498841cd..1ed581df 100644 --- a/docs/_static/manuals.setup-bcoin.rst +++ b/docs/_static/manuals.setup-bcoin.rst @@ -4,7 +4,7 @@ How to connect Bitcoinlib to a Bcoin node Bcoin is a full bitcoin node implementation, which can be used to parse the blockchain, send transactions and run a wallet. With a Bcoin node you can retrieve transaction and utxo information for specific addresses, this is not easily possible with a `Bitcoind `_ node. So if you want to use Bitcoinlib with a -wallet and not be dependant on external providers the best option is to run a local Bcoin node. +wallet and not be dependent on external providers the best option is to run a local Bcoin node. Install Bcoin node From 784052a1bfd9a71ebe4c3467d0d80b0850c32510 Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:58:26 +0100 Subject: [PATCH 06/11] fix typos --- docs/_static/manuals.security.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/_static/manuals.security.rst b/docs/_static/manuals.security.rst index 4b5a02b1..7c547b28 100644 --- a/docs/_static/manuals.security.rst +++ b/docs/_static/manuals.security.rst @@ -8,7 +8,7 @@ Ten tips for more privacy and security when using Bitcoin and Bitcoinlib: This not only increases your privacy, but also makes your application much faster and more reliable. And as extra bonus you support the Bitcoin network. 2. Use multi-signature wallets. So you are able to store your private keys in separate (offline) locations. -3. Use a minimal amount of inputs when creating a transaction. This is default behavior the Bitcoinlib Wallet +3. Use a minimal amount of inputs when creating a transaction. This is default behavior of the Bitcoinlib Wallet object. You can set a hard limit when sending from a wallet with the max_utxos=1 attribute. 4. Use a random number of change outputs and shuffle order of inputs and outputs. This way it is not visible which output is the change output. In the Wallet object you can set the number_of_change_outputs to zero to @@ -16,9 +16,9 @@ Ten tips for more privacy and security when using Bitcoin and Bitcoinlib: 5. `Encrypt your database or private keys `_ with SQLCipher or AES. 6. Use password protected private keys. For instance use a password when `creating wallets `_. -7. Backup private keys and passwords! I have no proof but I assume more bitcoins are lost because of lost private keys then there are lost due to hacking... +7. Backup private keys and passwords! I have no proof but I assume more bitcoins are lost because of lost private keys than there are lost due to hacking... 8. When using Bitcoinlib wallets the private keys are stored in a database. Make sure the database is in a safe location and check encryption, access rights, etc. Also check tip 2 and 5 again and see how you can minimize risks. 9. Test, try, review. Before working with any real value carefully test your applications using the testnet or small value transactions. -10. Read this tips, read some more about `Security `_ and `Privacy `_ - and then think thorough about the best wallet setup, which is always a tradeoff between security, privacy and usability. +10. Read these tips, read some more about `Security `_ and `Privacy `_ + and then think thoroughly about the best wallet setup, which is always a tradeoff between security, privacy and usability. From 51b701da6e9fd3dae4b4aadfb180e023dc7a011e Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:59:55 +0100 Subject: [PATCH 07/11] fix typos --- docs/_static/manuals.faq.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/_static/manuals.faq.rst b/docs/_static/manuals.faq.rst index b93d4fe8..14ed4a5b 100644 --- a/docs/_static/manuals.faq.rst +++ b/docs/_static/manuals.faq.rst @@ -15,7 +15,7 @@ I run into an error 'x' when installing Bitcoinlib 2. Install the required packages one-by-one using pip install, and see if you get any specific errors. 3. Check for help in `Github Discussions `_. 4. See if you find any known `issue `_. -5. If it doesn't work out, do not hesitate to ask you question in the github discussions or post an issue! +5. If it doesn't work out, do not hesitate to ask your question in the github discussions or post an issue! Does Bitcoinlib support 'x'-coin -------------------------------- @@ -36,7 +36,7 @@ Most likely cause is a problem with a specific service provider. Please set log level to 'debug' and check the logs in bitcoinlib.log to see if you can pin down the specific error. You could then disable the provider and post the `issue `_. -To avoid these kind of errors it is adviced to run your local `Bcoin node `_. +To avoid these kinds of errors it is advised to run your local `Bcoin node `_. With a local Bcoin node you do not depend on external Service providers which increases reliability, security, speed and privacy. @@ -58,7 +58,7 @@ I have another question Maybe your question already has an answer om `Github Discussions `_. Or search for an answer is this `documentation `_. -If that does not answer your question, please post your question on on the +If that does not answer your question, please post your question on the `Github Discussions Q&A `_. From 69d09f7cf82626413e60dfa28d3dce5ef72e5fe1 Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Mon, 11 Nov 2024 11:00:38 +0100 Subject: [PATCH 08/11] fix typo --- docs/_static/manuals.databases.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_static/manuals.databases.rst b/docs/_static/manuals.databases.rst index 06df201b..d540de2f 100644 --- a/docs/_static/manuals.databases.rst +++ b/docs/_static/manuals.databases.rst @@ -1,7 +1,7 @@ Using MySQL or PostgreSQL databases =================================== -Bitcoinlib uses the SQLite database by default, because it easy to use and requires no installation. +Bitcoinlib uses the SQLite database by default, because it is easy to use and requires no installation. But you can also use other databases. At this moment Bitcoinlib is tested with MySQL and PostgreSQL. @@ -16,7 +16,7 @@ We assume you have a MySQL server at localhost. Unlike with the SQLite database mysql> create database bitcoinlib; -Now create a user for your application and grant this user access. And off course replace the password 'secret' with +Now create a user for your application and grant this user access. And of course replace the password 'secret' with a better password. .. code-block:: mysql From a94fe736e7dbde0a01b3bc12b6895b88673dda4e Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Mon, 11 Nov 2024 11:03:07 +0100 Subject: [PATCH 09/11] fix typos --- docs/_static/manuals.command-line-wallet.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/_static/manuals.command-line-wallet.rst b/docs/_static/manuals.command-line-wallet.rst index 86644cc1..3ee84370 100644 --- a/docs/_static/manuals.command-line-wallet.rst +++ b/docs/_static/manuals.command-line-wallet.rst @@ -7,7 +7,7 @@ The Command Line wallet Script can be found in the tools directory. If you call arguments it will show all available wallets. Specify a wallet name or wallet ID to show more information about a wallet. If you specify a wallet -which doesn't exists the script will ask you if you want to create a new wallet. +which doesn't exist the script will ask you if you want to create a new wallet. Create wallet @@ -99,7 +99,7 @@ Encrypt private key fields -------------------------- Bitcoinlib has build in functionality to encrypt private key fields in the database. If you provide a password in -the runtime environment the data is encrypted at low level in de database module. You can provide a 32 byte key +the runtime environment the data is encrypted at low level in the database module. You can provide a 32 byte key in the DB_FIELD_ENCRYPTION_KEY variable or a password in the DB_FIELD_ENCRYPTION_PASSWORD variable. .. code-block:: bash @@ -285,7 +285,7 @@ We now have some utxo's in our wallet so we can create a transaction Copy the contents of the dictionary and save it as 3b96f493d189667565271041abbc0efbd8631bb54d76decb90e144bb145fa613.tx The transaction has been created, but cannot be verified because the wallet contains only 1 private key. So we need to -create another wallet with the other private key, in real life situations this would be on another (offiline) machine. +create another wallet with the other private key, in real life situations this would be on another (offline) machine. Below we create a new wallet, generate a receive address and update the utxo's. Finally we can import the transaction dictionary which we be signed once imported. And as you can see the transaction has been verified now! @@ -355,7 +355,7 @@ options: --witness-type WITNESS_TYPE, -j WITNESS_TYPE Witness type of wallet: legacy, p2sh-segwit or segwit (default) --yes, -y Non-interactive mode, does not prompt for confirmation - --quiet, -q Quiet mode, no output writen to console + --quiet, -q Quiet mode, no output written to console Wallet Actions: --wallet-remove Name or ID of wallet to remove, all keys and transactions will be deleted @@ -367,7 +367,7 @@ Wallet Actions: empty wallet again to restore your wallet. --receive, -r Show unused address to receive funds. --cosigner-id COSIGNER_ID, -o COSIGNER_ID - Set this if wallet contains only public keys, more then one private key or if you would like to create keys for other cosigners. + Set this if wallet contains only public keys, more than one private key or if you would like to create keys for other cosigners. --export-private, -e Export private key for this wallet and exit --import-private IMPORT_PRIVATE, -v IMPORT_PRIVATE Import private key in this wallet @@ -422,6 +422,6 @@ options: URI of the database to use --receive, -r Show unused address to receive funds. --yes, -y Non-interactive mode, does not prompt for confirmation - --quiet, -q Quiet mode, no output writen to console + --quiet, -q Quiet mode, no output written to console From 5c8aae5504bf86e7d2482bdabbf21693a238daa9 Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Mon, 11 Nov 2024 11:04:32 +0100 Subject: [PATCH 10/11] fix typos --- docs/_static/manuals.caching.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/_static/manuals.caching.rst b/docs/_static/manuals.caching.rst index e43bc73a..3b250e32 100644 --- a/docs/_static/manuals.caching.rst +++ b/docs/_static/manuals.caching.rst @@ -1,7 +1,7 @@ Caching ======= -Results from queries to service providers are store in a cache database. Once transactions are confirmed and stored +Results from queries to service providers are stored in a cache database. Once transactions are confirmed and stored on the blockchain they are immutable, so they can be stored in a local cache for an indefinite time. What is cached? @@ -43,12 +43,12 @@ Nothing is cached, what is the problem? - If the min_providers parameter is set to 2 or more caching will be disabled. - If a service providers returns an incomplete result no cache will be stored. - If the after_txid parameter is used in gettransactions() or getutxos() no cache will be stored if this - the 'after_txid' transaction is not found in the cache. Because the transaction cache has to start from the first + 'after_txid' transaction is not found in the cache. Because the transaction cache has to start from the first transaction for a certain address and no gaps can occur. I get incomplete or incorrect results! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- Please post an issues in the Github issue-tracker so we can take a look. +- Please post an issue in the Github issue-tracker so we can take a look. - You can delete the database in ~/.bitcoinlib/databases/bitcoinlib_cache.sqlite for an easy fix, or disable caching - if that really doesn't work out. \ No newline at end of file + if that really doesn't work out. From 96f58fbfef2de9e5ebf0df5c7bd9244b9f7bd75f Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Mon, 11 Nov 2024 11:05:26 +0100 Subject: [PATCH 11/11] fix typos --- docs/_static/manuals.add-provider.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_static/manuals.add-provider.rst b/docs/_static/manuals.add-provider.rst index 6b8c6061..bf6fd5e1 100644 --- a/docs/_static/manuals.add-provider.rst +++ b/docs/_static/manuals.add-provider.rst @@ -1,7 +1,7 @@ Add a new Service Provider ========================== -The Service class connects to providers such as Blockchain.info or Blockchair.com to retreive transaction, +The Service class connects to providers such as Blockchain.info or Blockchair.com to retrieve transaction, network, block, address information, etc The Service class automatically selects a provider which has requested method available and selects another @@ -70,7 +70,7 @@ Example: * Remove install.log file in bitcoinlib's log directory, this will copy all provider settings next time you run the bitcoin library. See 'initialize_lib' method in main.py -* Specify new provider and create service class object to test your new class and it's method +* Specify new provider and create service class object to test your new class and its method .. code-block:: python