Output
A batch of bitcoins created in a transaction.
Outputs are packages of bitcoins created in a bitcoin transaction.
Each output has a lock, which means that they can only be used as an inputs in a future transaction by people who can unlock them.
Structure
01000000017967a5185e907a25225574544c31f7b059c1a191d65b53dcc1554d339c4f9efc010000006a47304402206a2eb16b7b92051d0fa38c133e67684ed064effada1d7f925c842da401d4f22702201f196b10e6e4b4a9fff948e5c5d71ec5da53e90529c8dbd122bff2b1d21dc8a90121039b7bcd0824b9a9164f7ba098408e63e5b7e3cf90835cceb19868f54f8961a825ffffffff014baf2100000000001976a914db4d1141d0048b1ed15839d0b7a4c488cd368b0e88ac00000000
Transaction: c1b4e695098210a31fe02abffe9005cffc051bbe86ff33e173155bcbdc5821e3
Fields
Field | Data | Size | Description |
---|---|---|---|
Value |
4baf210000000000 ⟲
|
8 bytes | The value of the output in satoshis. |
ScriptPubKey Size |
19
|
Variable | Indicates the upcoming size of the locking code. |
ScriptPubKey |
76a9…88ac
|
A script that locks the output. |
If you want to decode the value
of an output, you just need to swap the byte order, then convert from hexadecimal to decimal. That will give you the value in satoshis.
How do Outputs work?
After selecting Input(s) to spend, you can create as many Outputs from them as you like.
For each output you just:
- Give it a value.
- Give it a lock.
1. Value
Every output has a value. This value is given in satoshis:
2. Lock
You also place locks on outputs when you create them them. These locking scripts prevent other people from using these outputs as inputs in another transaction (i.e. spending them).
This locking code is called a ScriptPubKey
.
Notes
I think of outputs as being variously-sized packages of bitcoins:
An output can have a value of 0
, if you like.
Examples: