mirror of
https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line.git
synced 2026-04-12 16:12:55 +00:00
Update 03_7_Receiving_a_Transaction.md
This commit is contained in:
parent
eb37d01a49
commit
37f3704e9e
@ -1,14 +1,14 @@
|
||||
# 3.4: Receiving a Transaction
|
||||
# 3.6: Receiving a Transaction
|
||||
|
||||
You're now ready to receive some money at the new address you set up.
|
||||
You're now ready to receive some money at an address you created.
|
||||
|
||||
## Get Some Money
|
||||
|
||||
To do anything more, you need to get some money. On signet this is done through faucets. Since the money is all pretend, you just go to a faucet, request some money, and it will be sent over to you. We suggest using the faucet at [https://signetfaucet.com/](https://signetfaucet.com/) or [https://signet257.bublina.eu.org/](https://signet257.bublina.eu.org/). If they're not available for some reason, search for "bitcoin signet faucet", and you should find others.
|
||||
|
||||
To use a faucet, you'll usually need to go to a URL and copy and paste in your address. Note that this is one of those cases where you won't be able to use command-line variables, alas. Afterward, a transaction will be created that sends money from the faucet to you.
|
||||
To use a faucet, you'll usually need to go to a URL and copy and paste in your address. Afterward, a transaction will be created that sends money from the faucet to you.
|
||||
|
||||
> :book: ***What is a transaction?*** A transaction is a bitcoin exchange. The owner of some bitcoins uses his private key to access those coins, then locks the transaction using the recipient's public key.
|
||||
> :book: ***What is a transaction?*** A transaction is a bitcoin exchange. The owner of some bitcoins uses his private key to access those coins, then locks the transaction using the recipient's public key, at least for a P2WPKH transaction.
|
||||
|
||||
> :link: **SIGNET vs MAINNET:** Sadly, there are no faucets in real life. If you were playing on the mainnet, you'd need to go and actually buy bitcoins at a bitcoin exchange or ATM, or you'd need to get someone to send them to you. Signet life is much easier.
|
||||
|
||||
@ -25,31 +25,32 @@ Welcome to the world of Bitcoin latency. The problem is that your transaction ha
|
||||
|
||||
> :book: ***What is a block?*** Transactions are transmitted across the network and gathered into blocks by miners. These blocks are secured with a mathematical proof-of-work, which proves that computing power has been expended as part of the block creation. It's that proof-of-work (multiplied over many blocks, each built atop the last) that ultimately keeps Bitcoin secure.
|
||||
|
||||
> :book: ***What is a miner?*** A miner is a participant of the Bitcoin network who works to create blocks. It's a paying job: when a miner successfully creates a block, he is paid a one-time reward plus the fees for the transactions in his block. Mining is big business. Miners tend to run on special hardware, accelerated in ways that make it more likely that they'll be able to create blocks. They also tend to be part of mining pools, where the miners all agree to share out the rewards when one of them successfully creates a block.
|
||||
> :book: ***What is a miner?*** A miner is a participant of the Bitcoin network who works to create blocks. It's a paying job: when a miner successfully creates a block, they are paid a one-time reward plus the fees for the transactions in his block. Mining is big business. Miners tend to run on special hardware, accelerated in ways that make it more likely that they'll be able to create blocks. They also tend to be part of mining pools, where the miners all agree to share out the rewards when one of them successfully creates a block.
|
||||
|
||||
Fortunately, `bitcoin-cli getunconfirmedbalance` should still show your updated balance as long as the initial transaction has been created:
|
||||
You might have to wait patiently for those funds. Some faucets have a waiting queue before they'll distribute funds, and in any case it takes 10 minutes to make every block, even if a faucet sent a transaction immediately, it might take 10 minutes to arrive. Eventually, however, you should see funds:
|
||||
```
|
||||
$ bitcoin-cli getunconfirmedbalance
|
||||
0.01010000
|
||||
$ bitcoin-cli getbalance
|
||||
0.00500090
|
||||
```
|
||||
If that's still showing a zero too, you're probably moving through this tutorial too fast. Wait a second. The coins should show up unconfirmed, then rapidly move to confirmed. Do note that a coin can move from unconfirmedbalance to confirmedbalance almost immediately, so make sure you check both. However, if your `getbalance` and your `getunconfirmedbalance` both still show zero in ten minutes, then there's probably something wrong with the faucet, and you'll need to pick another.
|
||||
|
||||
> :book: **Is Ten Minutes the Rule?** Ten minutes is the average amount of time it should take to generate a Bitcoin block. On Signet, it's pretty close to the rule, because the whole point of Signet is to have a regular, reliable testing environment. On Mainnet, the block time depends on when someone can randomly solve the tough proof-of-work problem that allows them to create a block. Sometimes it might take 30 minutes to generate a block, and then suddenly two more arrive a few minutes later each. Over time, the difficulty of the proof-of-work problem is moved up or down to bring the average back to 10 minutes per block.
|
||||
|
||||
### Gain Confidence in Your Money
|
||||
|
||||
You can use `bitcoin-cli getbalance "*" [n]`, where you replace `[n]` with an integer, to see if a confirmed balance is 'n' blocks deep.
|
||||
|
||||
> :book: ***What is block depth?*** After a block is built and confirmed, another block is built on top of it, and another ... Because this is a stochastic process, there's some chance for reversal when a block is still new. Thus, a block has to be buried several blocks deep in a chain before you can feel totally confident in your funds. Each of those blocks tends to be built in an average of 10 minutes ... so it usually takes about an hour for a confirmed transaction to receive six blocks deep, which is the measure for full confidence in Bitcoin.
|
||||
> :book: ***What is block depth?*** After a block is built and confirmed, another block is built on top of it, and another ... Because this is a stochastic process, there's some chance for reversal when a block is still new. Therefore, a block has to be buried several blocks deep in a chain before you can feel totally confident in your funds. Since each of those blocks tends to be built in an average of 10 minutes, it usually takes about an hour for a confirmed transaction to receive six blocks deep, which is the measure for full confidence in Bitcoin.
|
||||
|
||||
The following shows that our transactions have been confirmed one time, but not twice:
|
||||
```
|
||||
$ bitcoin-cli getbalance "*" 1
|
||||
0.01010000
|
||||
$ bitcoin-cli getbalance "*" 2
|
||||
$ bitcoin-cli getbalance "*" 1
|
||||
0.00500090
|
||||
$ bitcoin-cli getbalance "*" 2
|
||||
0.00000000
|
||||
```
|
||||
Obviously, every ten minutes or so this depth will increase.
|
||||
|
||||
Of course, on the signet, no one is that worried about how reliable your funds are. You'll be able to spend your money as soon as it's confirmed.
|
||||
Of course, on the Signet, no one is that worried about how reliable your funds are. You'll be able to spend your money as soon as it's confirmed.
|
||||
|
||||
## Verify Your Wallet
|
||||
|
||||
@ -59,18 +60,26 @@ $ bitcoin-cli getwalletinfo
|
||||
{
|
||||
"walletname": "",
|
||||
"walletversion": 169900,
|
||||
"balance": 0.01010000,
|
||||
"unconfirmed_balance": 0.00000000,
|
||||
"immature_balance": 0.00000000,
|
||||
"txcount": 2,
|
||||
"keypoololdest": 1592335137,
|
||||
"keypoolsize": 999,
|
||||
"hdseedid": "fdea8e2630f00d29a9d6ff2af7bf5b358d061078",
|
||||
"keypoolsize_hd_internal": 1000,
|
||||
"format": "sqlite",
|
||||
"txcount": 3,
|
||||
"keypoolsize": 3997,
|
||||
"keypoolsize_hd_internal": 4000,
|
||||
"paytxfee": 0.00000000,
|
||||
"private_keys_enabled": true,
|
||||
"avoid_reuse": false,
|
||||
"scanning": false
|
||||
"scanning": false,
|
||||
"descriptors": true,
|
||||
"external_signer": false,
|
||||
"blank": false,
|
||||
"birthtime": 1771543118,
|
||||
"flags": [
|
||||
"last_hardened_xpub_cached",
|
||||
"descriptor_wallet"
|
||||
],
|
||||
"lastprocessedblock": {
|
||||
"hash": "000000012b1a2e0d5df2eeba0aa678f69ced5cf036c67299547f0894afbbdf8a",
|
||||
"height": 292310
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@ -81,110 +90,104 @@ Your money came into your wallet via a transaction. You can discover that transa
|
||||
$ bitcoin-cli listtransactions
|
||||
[
|
||||
{
|
||||
"address": "mi25UrzHnvn3bpEfFCNqJhPWJn5b77a5NE",
|
||||
"category": "receive",
|
||||
"amount": 0.01000000,
|
||||
"label": "",
|
||||
"vout": 1,
|
||||
"confirmations": 1,
|
||||
"blockhash": "00000000000001753b24411d0e4726212f6a53aeda481ceff058ffb49e1cd969",
|
||||
"blockheight": 1772396,
|
||||
"blockindex": 73,
|
||||
"blocktime": 1592600085,
|
||||
"txid": "8e2ab10cabe9ec04ed438086a80b1ac72558cc05bb206e48fc9a18b01b9282e9",
|
||||
"walletconflicts": [
|
||||
"address": "2NAzFNuopaor2YnqVA2QC4KYme6HxWTk7jq",
|
||||
"parent_descs": [
|
||||
"sh(wpkh([1091501a/49h/1h/0h]tpubDCsAfCNPzp1BvrL8u6rdgD693s9MjcPvswzwkdzRT24BBHVc4cRNH13Z9yKTtdEcg4kmZLUa3FxZgwKfr6LVMoPfKB6x5xMz9HietddEcaX/0/*))#0xkvj5k7"
|
||||
],
|
||||
"time": 1592599884,
|
||||
"timereceived": 1592599884,
|
||||
"bip125-replaceable": "no"
|
||||
},
|
||||
{
|
||||
"address": "mi25UrzHnvn3bpEfFCNqJhPWJn5b77a5NE",
|
||||
"category": "receive",
|
||||
"amount": 0.00010000,
|
||||
"amount": 0.00500090,
|
||||
"label": "",
|
||||
"vout": 0,
|
||||
"vout": 48,
|
||||
"abandoned": false,
|
||||
"confirmations": 1,
|
||||
"blockhash": "00000000000001753b24411d0e4726212f6a53aeda481ceff058ffb49e1cd969",
|
||||
"blockheight": 1772396,
|
||||
"blockindex": 72,
|
||||
"blocktime": 1592600085,
|
||||
"txid": "ca4898d8f950df03d6bfaa00578bd0305d041d24788b630d0c4a32debcac9f36",
|
||||
"blockhash": "000000012b1a2e0d5df2eeba0aa678f69ced5cf036c67299547f0894afbbdf8a",
|
||||
"blockheight": 292310,
|
||||
"blockindex": 28,
|
||||
"blocktime": 1771548933,
|
||||
"txid": "8954c067d0d3b47825300effeff9501a584c9644bfd58764a6af08a1f084f67c",
|
||||
"wtxid": "96f40640ad3242b593de502fc47a7633a0be8c7eb5996dd843fb1ad4a0ada46c",
|
||||
"walletconflicts": [
|
||||
"078bfa57116a7a5fbc8119606a054f34fa0dce0d90d15df0b6aebfa817010d94",
|
||||
"a69f25e4bf09ae1eebf3bdae56744f02c2d5a0dfed4f8d078ee99ee3a22571e9"
|
||||
],
|
||||
"time": 1592599938,
|
||||
"timereceived": 1592599938,
|
||||
"mempoolconflicts": [
|
||||
],
|
||||
"time": 1771548914,
|
||||
"timereceived": 1771548914,
|
||||
"bip125-replaceable": "no"
|
||||
}
|
||||
]
|
||||
|
||||
```
|
||||
This shows two transactions (`8e2ab10cabe9ec04ed438086a80b1ac72558cc05bb206e48fc9a18b01b9282e9`) and (`ca4898d8f950df03d6bfaa00578bd0305d041d24788b630d0c4a32debcac9f36`) for a specific amount (`0.01000000` and `0.00010000`), which were both received (`receive`) by the same address in our wallet (`mi25UrzHnvn3bpEfFCNqJhPWJn5b77a5NE`). That's bad key hygeine, by the way: you should use a new address for every single Bitcoin you ever receive. In this case, we got impatient because the first faucet didn't seem to be working.
|
||||
This shows one transaction (`8954c067d0d3b47825300effeff9501a584c9644bfd58764a6af08a1f084f67c`) for a specific ammount (`0.00500090`) which was received by a specific address in your wallet (`2NAzFNuopaor2YnqVA2QC4KYme6HxWTk7jq`).
|
||||
|
||||
You can access similar information with the `bitcoin-cli listunspent` command, but it only shows the transactions for the money that you haven't spent. These are called UTXOs, and will be vitally important when you're sending money back out into the Bitcoin world:
|
||||
```
|
||||
$ bitcoin-cli listunspent
|
||||
[
|
||||
{
|
||||
"txid": "ca4898d8f950df03d6bfaa00578bd0305d041d24788b630d0c4a32debcac9f36",
|
||||
"vout": 0,
|
||||
"address": "mi25UrzHnvn3bpEfFCNqJhPWJn5b77a5NE",
|
||||
"txid": "8954c067d0d3b47825300effeff9501a584c9644bfd58764a6af08a1f084f67c",
|
||||
"vout": 48,
|
||||
"address": "2NAzFNuopaor2YnqVA2QC4KYme6HxWTk7jq",
|
||||
"label": "",
|
||||
"scriptPubKey": "76a9141b72503639a13f190bf79acf6d76255d772360b788ac",
|
||||
"amount": 0.00010000,
|
||||
"confirmations": 1,
|
||||
"redeemScript": "001461a3a217641fdea3b3ff444b4f582763ea949132",
|
||||
"scriptPubKey": "a914c29d2f62bb6593e01719ada872a779f4f2990e7087",
|
||||
"amount": 0.00500090,
|
||||
"confirmations": 2,
|
||||
"spendable": true,
|
||||
"solvable": true,
|
||||
"desc": "pkh([d6043800/0'/0'/1']02fd5740996d853ea51a6904cf03257fc11204b0179f344c49739ec5b20b39c9ba)#62rud39c",
|
||||
"safe": true
|
||||
},
|
||||
{
|
||||
"txid": "8e2ab10cabe9ec04ed438086a80b1ac72558cc05bb206e48fc9a18b01b9282e9",
|
||||
"vout": 1,
|
||||
"address": "mi25UrzHnvn3bpEfFCNqJhPWJn5b77a5NE",
|
||||
"label": "",
|
||||
"scriptPubKey": "76a9141b72503639a13f190bf79acf6d76255d772360b788ac",
|
||||
"amount": 0.01000000,
|
||||
"confirmations": 1,
|
||||
"spendable": true,
|
||||
"solvable": true,
|
||||
"desc": "pkh([d6043800/0'/0'/1']02fd5740996d853ea51a6904cf03257fc11204b0179f344c49739ec5b20b39c9ba)#62rud39c",
|
||||
"desc": "sh(wpkh([1091501a/49h/1h/0h/0/0]038f833378b831969986212fcb557ac18c5e0001e1ae9066423c2376dd9d451513))#a2fumkh9",
|
||||
"parent_descs": [
|
||||
"sh(wpkh([1091501a/49h/1h/0h]tpubDCsAfCNPzp1BvrL8u6rdgD693s9MjcPvswzwkdzRT24BBHVc4cRNH13Z9yKTtdEcg4kmZLUa3FxZgwKfr6LVMoPfKB6x5xMz9HietddEcaX/0/*))#0xkvj5k7"
|
||||
],
|
||||
"safe": true
|
||||
}
|
||||
]
|
||||
```
|
||||
Note that bitcoins are not just a homogeneous mess of cash jammed into your pocket. Each individual transaction that you receive or that you send is placed into the immutable blockchain ledger, in a block. You can see these individual transactions when you look at your unspent money. This means that bitcoin spending isn't quite as anonymous as you'd think. Though the addresses are fairly private, transactions can be examined as they go in and out of addresses. This makes privacy vulnerable to statistical analysis. It also introduces some potential non-fungibility to bitcoins, as you can track back through series of transactions, even if you can't track a specific "bitcoin".
|
||||
|
||||
> :book: ***Why are all of these bitcoin amounts in fractions?*** Bitcoins are produced slowly, and so there are relatively few in circulation. As a result, each bitcoin over on the mainnet is worth quite a bit (~ $9,000 at the time of this writing). This means that people usually work in fractions. In fact, the .0101 in Signet coins would be worth about $9000 if they were on the mainnet. For this reason, names have appeared for smaller amounts of bitcoins, including millibitcoins or mBTCs (one-thousandth of a bitcoin), microbitcoins or bits or μBTCs (one-millionth of a bitcoin), and satoshis (one hundred millionth of a bitcoin).
|
||||
> :book: ***Why are all of these bitcoin amounts in decimals?*** Bitcoins are produced slowly, and so there are relatively few in circulation. As a result, each bitcoin over on the mainnet is worth quite a bit (~ $67,000 at the time of this writing). This means that people usually work in fractional amounts. In fact, the .005 in Signet coins would be worth about $300 if they were on the mainnet. For this reason, names have appeared for smaller amounts of bitcoins, including millibitcoins or mBTCs (one-thousandth of a bitcoin), microbitcoins or bits or μBTCs (one-millionth of a bitcoin), and satoshis (one hundred millionth of a bitcoin).
|
||||
|
||||
## Examine Your Transaction
|
||||
|
||||
You can get more information on a transaction with the `bitcoin-cli gettransaction` command:
|
||||
```
|
||||
$ bitcoin-cli gettransaction "8e2ab10cabe9ec04ed438086a80b1ac72558cc05bb206e48fc9a18b01b9282e9"
|
||||
$ bitcoin-cli gettransaction 8954c067d0d3b47825300effeff9501a584c9644bfd58764a6af08a1f084f67c
|
||||
{
|
||||
"amount": 0.01000000,
|
||||
"amount": 0.00500090,
|
||||
"confirmations": 1,
|
||||
"blockhash": "00000000000001753b24411d0e4726212f6a53aeda481ceff058ffb49e1cd969",
|
||||
"blockheight": 1772396,
|
||||
"blockindex": 73,
|
||||
"blocktime": 1592600085,
|
||||
"txid": "8e2ab10cabe9ec04ed438086a80b1ac72558cc05bb206e48fc9a18b01b9282e9",
|
||||
"blockhash": "000000012b1a2e0d5df2eeba0aa678f69ced5cf036c67299547f0894afbbdf8a",
|
||||
"blockheight": 292310,
|
||||
"blockindex": 28,
|
||||
"blocktime": 1771548933,
|
||||
"txid": "8954c067d0d3b47825300effeff9501a584c9644bfd58764a6af08a1f084f67c",
|
||||
"wtxid": "96f40640ad3242b593de502fc47a7633a0be8c7eb5996dd843fb1ad4a0ada46c",
|
||||
"walletconflicts": [
|
||||
"078bfa57116a7a5fbc8119606a054f34fa0dce0d90d15df0b6aebfa817010d94",
|
||||
"a69f25e4bf09ae1eebf3bdae56744f02c2d5a0dfed4f8d078ee99ee3a22571e9"
|
||||
],
|
||||
"time": 1592599884,
|
||||
"timereceived": 1592599884,
|
||||
"mempoolconflicts": [
|
||||
],
|
||||
"time": 1771548914,
|
||||
"timereceived": 1771548914,
|
||||
"bip125-replaceable": "no",
|
||||
"details": [
|
||||
{
|
||||
"address": "mi25UrzHnvn3bpEfFCNqJhPWJn5b77a5NE",
|
||||
"address": "2NAzFNuopaor2YnqVA2QC4KYme6HxWTk7jq",
|
||||
"parent_descs": [
|
||||
"sh(wpkh([1091501a/49h/1h/0h]tpubDCsAfCNPzp1BvrL8u6rdgD693s9MjcPvswzwkdzRT24BBHVc4cRNH13Z9yKTtdEcg4kmZLUa3FxZgwKfr6LVMoPfKB6x5xMz9HietddEcaX/0/*))#0xkvj5k7"
|
||||
],
|
||||
"category": "receive",
|
||||
"amount": 0.01000000,
|
||||
"amount": 0.00500090,
|
||||
"label": "",
|
||||
"vout": 1
|
||||
"vout": 48,
|
||||
"abandoned": false
|
||||
}
|
||||
],
|
||||
"hex": "0200000000010114d04977d1b0137adbf51dd5d79944b9465a2619f3fa7287eb69a779977bf5800100000017160014e85ba02862dbadabd6d204fcc8bb5d54658c7d4ffeffffff02df690f000000000017a9145c3bfb36b03f279967977ca9d1e35185e39917788740420f00000000001976a9141b72503639a13f190bf79acf6d76255d772360b788ac0247304402201e74bdfc330fc2e093a8eabe95b6c5633c8d6767249fa25baf62541a129359c202204d462bd932ee5c15c7f082ad7a6b5a41c68addc473786a0a9a232093fde8e1330121022897dfbf085ecc6ad7e22fc91593414a845659429a7bbb44e2e536258d2cbc0c270b1b00"
|
||||
"hex": "02000000000101653...733fd5750400",
|
||||
"lastprocessedblock": {
|
||||
"hash": "0000001058c350b95ba1dc2b689ad905a9907091255b28396b6eeb0e9d4ab167",
|
||||
"height": 292311
|
||||
}
|
||||
}
|
||||
```
|
||||
The `gettransaction` command will detail transactions that are in your wallet, such as this one, that was sent to us.
|
||||
@ -198,92 +201,143 @@ Get detailed information about in-wallet transaction <txid>
|
||||
|
||||
Arguments:
|
||||
1. txid (string, required) The transaction id
|
||||
2. include_watchonly (boolean, optional, default=true for watch-only wallets, otherwise false) Whether to include watch-only addresses in balance calculation and details[]
|
||||
2. include_watchonly (boolean, optional, default=false) (DEPRECATED) No longer used
|
||||
3. verbose (boolean, optional, default=false) Whether to include a `decoded` field containing the decoded transaction (equivalent to RPC decoderawtransaction)
|
||||
|
||||
```
|
||||
By setting these two true or false, we can choose to include watch-only addresses in the output (which we don't care about) or look at more verbose output (which we do).
|
||||
|
||||
Here's what this data instead looks at when we set `include_watchonly` to `false` and `verbose` to `true`.
|
||||
```
|
||||
$ bitcoin-cli gettransaction "8e2ab10cabe9ec04ed438086a80b1ac72558cc05bb206e48fc9a18b01b9282e9" false true
|
||||
$ bitcoin-cli gettransaction 8954c067d0d3b47825300effeff9501a584c9644bfd58764a6af08a1f084f67c false true
|
||||
{
|
||||
"amount": 0.01000000,
|
||||
"confirmations": 3,
|
||||
"blockhash": "00000000000001753b24411d0e4726212f6a53aeda481ceff058ffb49e1cd969",
|
||||
"blockheight": 1772396,
|
||||
"blockindex": 73,
|
||||
"blocktime": 1592600085,
|
||||
"txid": "8e2ab10cabe9ec04ed438086a80b1ac72558cc05bb206e48fc9a18b01b9282e9",
|
||||
"amount": 0.00500090,
|
||||
"confirmations": 2,
|
||||
"blockhash": "000000012b1a2e0d5df2eeba0aa678f69ced5cf036c67299547f0894afbbdf8a",
|
||||
"blockheight": 292310,
|
||||
"blockindex": 28,
|
||||
"blocktime": 1771548933,
|
||||
"txid": "8954c067d0d3b47825300effeff9501a584c9644bfd58764a6af08a1f084f67c",
|
||||
"wtxid": "96f40640ad3242b593de502fc47a7633a0be8c7eb5996dd843fb1ad4a0ada46c",
|
||||
"walletconflicts": [
|
||||
"078bfa57116a7a5fbc8119606a054f34fa0dce0d90d15df0b6aebfa817010d94",
|
||||
"a69f25e4bf09ae1eebf3bdae56744f02c2d5a0dfed4f8d078ee99ee3a22571e9"
|
||||
],
|
||||
"time": 1592599884,
|
||||
"timereceived": 1592599884,
|
||||
"mempoolconflicts": [
|
||||
],
|
||||
"time": 1771548914,
|
||||
"timereceived": 1771548914,
|
||||
"bip125-replaceable": "no",
|
||||
"details": [
|
||||
{
|
||||
"address": "mi25UrzHnvn3bpEfFCNqJhPWJn5b77a5NE",
|
||||
"address": "2NAzFNuopaor2YnqVA2QC4KYme6HxWTk7jq",
|
||||
"parent_descs": [
|
||||
"sh(wpkh([1091501a/49h/1h/0h]tpubDCsAfCNPzp1BvrL8u6rdgD693s9MjcPvswzwkdzRT24BBHVc4cRNH13Z9yKTtdEcg4kmZLUa3FxZgwKfr6LVMoPfKB6x5xMz9HietddEcaX/0/*))#0xkvj5k7"
|
||||
],
|
||||
"category": "receive",
|
||||
"amount": 0.01000000,
|
||||
"amount": 0.00500090,
|
||||
"label": "",
|
||||
"vout": 1
|
||||
"vout": 48,
|
||||
"abandoned": false
|
||||
}
|
||||
],
|
||||
"hex": "0200000000010114d04977d1b0137adbf51dd5d79944b9465a2619f3fa7287eb69a779977bf5800100000017160014e85ba02862dbadabd6d204fcc8bb5d54658c7d4ffeffffff02df690f000000000017a9145c3bfb36b03f279967977ca9d1e35185e39917788740420f00000000001976a9141b72503639a13f190bf79acf6d76255d772360b788ac0247304402201e74bdfc330fc2e093a8eabe95b6c5633c8d6767249fa25baf62541a129359c202204d462bd932ee5c15c7f082ad7a6b5a41c68addc473786a0a9a232093fde8e1330121022897dfbf085ecc6ad7e22fc91593414a845659429a7bbb44e2e536258d2cbc0c270b1b00",
|
||||
"hex": "02000000000101653...733fd5750400",
|
||||
"decoded": {
|
||||
"txid": "8e2ab10cabe9ec04ed438086a80b1ac72558cc05bb206e48fc9a18b01b9282e9",
|
||||
"hash": "d4ae2b009c43bfe9eba96dcd16e136ceba2842df3d76a67d689fae5975ce49cb",
|
||||
"txid": "8954c067d0d3b47825300effeff9501a584c9644bfd58764a6af08a1f084f67c",
|
||||
"hash": "96f40640ad3242b593de502fc47a7633a0be8c7eb5996dd843fb1ad4a0ada46c",
|
||||
"version": 2,
|
||||
"size": 249,
|
||||
"vsize": 168,
|
||||
"weight": 669,
|
||||
"locktime": 1772327,
|
||||
"size": 3563,
|
||||
"vsize": 3512,
|
||||
"weight": 14048,
|
||||
"locktime": 292309,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "80f57b9779a769eb8772faf319265a46b94499d7d51df5db7a13b0d17749d014",
|
||||
"vout": 1,
|
||||
"txid": "c550ee29fdc62e1d42c966bd67282e7db922773945344ddeef699db875603c65",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"asm": "0014e85ba02862dbadabd6d204fcc8bb5d54658c7d4f",
|
||||
"hex": "160014e85ba02862dbadabd6d204fcc8bb5d54658c7d4f"
|
||||
"asm": "",
|
||||
"hex": ""
|
||||
},
|
||||
"txinwitness": [
|
||||
"304402201e74bdfc330fc2e093a8eabe95b6c5633c8d6767249fa25baf62541a129359c202204d462bd932ee5c15c7f082ad7a6b5a41c68addc473786a0a9a232093fde8e13301",
|
||||
"022897dfbf085ecc6ad7e22fc91593414a845659429a7bbb44e2e536258d2cbc0c"
|
||||
"f2183e5e3f233bb9e11f33a2c6c1691bea3b4bb2f19a8674cff8dfecdda4685789eba8745609a560e827b8e0eb9909772baa00a76d23c1faac72c40b83bd733f"
|
||||
],
|
||||
"sequence": 4294967294
|
||||
"sequence": 4294967293
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.01010143,
|
||||
"value": 1256.11643555,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"asm": "OP_HASH160 5c3bfb36b03f279967977ca9d1e35185e3991778 OP_EQUAL",
|
||||
"hex": "a9145c3bfb36b03f279967977ca9d1e35185e399177887",
|
||||
"reqSigs": 1,
|
||||
"type": "scripthash",
|
||||
"addresses": [
|
||||
"2N1ev1WKevSsdmAvRqZf7JjvDg223tPrVCm"
|
||||
]
|
||||
"asm": "1 aac35fe91f20d48816b3c83011d117efa35acd2414d36c1e02b0f29fc3106d90",
|
||||
"desc": "rawtr(aac35fe91f20d48816b3c83011d117efa35acd2414d36c1e02b0f29fc3106d90)#au3flvfu",
|
||||
"hex": "5120aac35fe91f20d48816b3c83011d117efa35acd2414d36c1e02b0f29fc3106d90",
|
||||
"address": "tb1p4tp4l6glyr2gs94neqcpr5gha7344nfyznfkc8szkreflscsdkgqsdent4",
|
||||
"type": "witness_v1_taproot"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.01000000,
|
||||
"value": 0.00000000,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"asm": "OP_DUP OP_HASH160 1b72503639a13f190bf79acf6d76255d772360b7 OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"hex": "76a9141b72503639a13f190bf79acf6d76255d772360b788ac",
|
||||
"reqSigs": 1,
|
||||
"type": "pubkeyhash",
|
||||
"addresses": [
|
||||
"mi25UrzHnvn3bpEfFCNqJhPWJn5b77a5NE"
|
||||
]
|
||||
"asm": "OP_RETURN 616c742e7369676e65746661756365742e636f6d207c203930207c205468697320697320612074657374206e6574776f726b2e20436f696e732068617665206e6f2076616c75652e207c2076623962383365",
|
||||
"desc": "raw(6a4c52616c742e7369676e65746661756365742e636f6d207c203930207c205468697320697320612074657374206e6574776f726b2e20436f696e732068617665206e6f2076616c75652e207c2076623962383365)#zz3mwpqc",
|
||||
"hex": "6a4c52616c742e7369676e65746661756365742e636f6d207c203930207c205468697320697320612074657374206e6574776f726b2e20436f696e732068617665206e6f2076616c75652e207c2076623962383365",
|
||||
"type": "nulldata"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"value": 0.00500090,
|
||||
"n": 2,
|
||||
"scriptPubKey": {
|
||||
"asm": "0 02b9d2f57dd3fadbbeb100d49a686e06b2b43ce5",
|
||||
"desc": "addr(tb1qq2ua9ata60adh043qr2f56rwq6etg089xshs0g)#lwpdnyre",
|
||||
"hex": "001402b9d2f57dd3fadbbeb100d49a686e06b2b43ce5",
|
||||
"address": "tb1qq2ua9ata60adh043qr2f56rwq6etg089xshs0g",
|
||||
"type": "witness_v0_keyhash"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.00500090,
|
||||
"n": 3,
|
||||
"scriptPubKey": {
|
||||
"asm": "0 0bec08492d89e0a5ff6947f57e58b10793e1c3f6",
|
||||
"desc": "addr(tb1qp0kqsjfd38s2tlmfgl6huk93q7f7rslkcl50fl)#nkve3qrw",
|
||||
"hex": "00140bec08492d89e0a5ff6947f57e58b10793e1c3f6",
|
||||
"address": "tb1qp0kqsjfd38s2tlmfgl6huk93q7f7rslkcl50fl",
|
||||
"type": "witness_v0_keyhash"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.00500090,
|
||||
"n": 4,
|
||||
"scriptPubKey": {
|
||||
"asm": "0 0c618d8a36ed23cc13e1f92f880f879918aaa815",
|
||||
"desc": "addr(tb1qp3scmz3ka53ucylplyhcsru8nyv242q4ucf9lt)#6lm9vhtp",
|
||||
"hex": "00140c618d8a36ed23cc13e1f92f880f879918aaa815",
|
||||
"address": "tb1qp3scmz3ka53ucylplyhcsru8nyv242q4ucf9lt",
|
||||
"type": "witness_v0_keyhash"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.00500090,
|
||||
"n": 5,
|
||||
"scriptPubKey": {
|
||||
"asm": "0 0ca3037bc9d5dfdbd11aac2055445049c11d569b",
|
||||
"desc": "addr(tb1qpj3sx77f6h0ah5g64ss923zsf8q3645musu6jd)#u9q7ehwz",
|
||||
"hex": "00140ca3037bc9d5dfdbd11aac2055445049c11d569b",
|
||||
"address": "tb1qpj3sx77f6h0ah5g64ss923zsf8q3645musu6jd",
|
||||
"type": "witness_v0_keyhash"
|
||||
}
|
||||
},
|
||||
...
|
||||
"lastprocessedblock": {
|
||||
"hash": "0000001058c350b95ba1dc2b689ad905a9907091255b28396b6eeb0e9d4ab167",
|
||||
"height": 292311
|
||||
}
|
||||
}
|
||||
```
|
||||
Now you can see the full information on the transaction, including all of the inputs ("vin") and all the outputs ("vout). One of the interesting things to note is that although we received .01 BTC in the transaction, another .01010143 was sent to another address. That was probably a change address, a concept that is explored in the next section. It is quite typical for a transaction to have multiple inputs and/or multiple outputs.
|
||||
Now you can see the full information on the transaction, including all of the inputs ("vin") and all the outputs ("vout). One of the interesting things to note is that although we received .00500090 BTC in the transaction, the same amount was sent to dozens of additional addresses (the full list was cut down to just the first several). It is quite typical for a transaction to have multiple inputs and/or multiple outputs.
|
||||
|
||||
There is another command, `getrawtransaction`, which allows you to look at transactions that are not in your wallet. However, it requires you to have an unpruned node and `txindex=1` in your `bitcoin.conf` file. Unless you have a serious need for information not in your wallet, it's probably just better to use a Bitcoin explorer for this sort of thing ...
|
||||
|
||||
@ -295,13 +349,13 @@ Currently, our preferred block explorer is [https://mempool.space/](https://memp
|
||||
|
||||
You can use it to look up transactions for an address:
|
||||
|
||||
[https://mempool.space/signet/address/tb1pffsyra2t3nut94yvdae9evz3feg7tel843pfcv76vt5cwewavtesl3gsph](https://mempool.space/signet/address/tb1pffsyra2t3nut94yvdae9evz3feg7tel843pfcv76vt5cwewavtesl3gsph)
|
||||
[https://mempool.space/signet/address/2NAzFNuopaor2YnqVA2QC4KYme6HxWTk7jq](https://mempool.space/signet/address/2NAzFNuopaor2YnqVA2QC4KYme6HxWTk7jq)
|
||||
|
||||
You can also use it to look at individual transactions:
|
||||
|
||||
[https://mempool.space/signet/tx/e5b8940b2dd5a1bbb032228dedd85cd8c21f0ce5cf4b76c959f71d967de626b3](https://mempool.space/signet/tx/e5b8940b2dd5a1bbb032228dedd85cd8c21f0ce5cf4b76c959f71d967de626b3)
|
||||
[https://mempool.space/signet/tx/8954c067d0d3b47825300effeff9501a584c9644bfd58764a6af08a1f084f67c](https://mempool.space/signet/tx/8954c067d0d3b47825300effeff9501a584c9644bfd58764a6af08a1f084f67c)
|
||||
|
||||
A block explorer doesn't generally provide any more information than a command line look at a raw transaction; it just does a good job of highlighting the important information and putting together the puzzle pieces, including the transaction fees behind a transaction — another concept that we'll be covering in future sections.
|
||||
A block explorer doesn't generally provide any more information than a command line look at a raw transaction; it just does a good job of highlighting the important information and putting together the puzzle pieces, including the transaction fees behind a transaction, another concept that we'll be covering in future sections.
|
||||
|
||||
## Summary: Receiving a Transaction
|
||||
|
||||
@ -309,7 +363,9 @@ Faucets will give you money on the testnet. They come in as raw transactions, wh
|
||||
|
||||
## What's Next?
|
||||
|
||||
For a deep dive into how addresses are described, so that they can be transferred or made into parts of a multi-signature, see [§3.5: Understanding the Descriptor](03_5_Understanding_the_Descriptor.md).
|
||||
For an aside on using command-line variables that will be vital to the rest of this course, read [Interlude: Using Command-Line Variables](03_7a_Interlude_Using_Command-Line_Variables.md).
|
||||
|
||||
If you're already comfortable with them, continue on to [Chapter Four: Sending Bitcoin Transactions](04_0_Sending_Bitcoin_Transactions.md).
|
||||
|
||||
|
||||
But if that's too in-depth, continue on to [Chapter Four: Sending Bitcoin Transactions](04_0_Sending_Bitcoin_Transactions.md).
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user