edgecase
Author: StJohn Piano
This page is subject to change at any time. It is not signed by its author or by Edgecase Datafeed.
788 words - 242 lines - 7 pages




Summary


While creating a transaction, you will need access to various services, which are listed here: Transaction services


To create a standard Bitcoin transaction, browse to How to create and sign a standard Bitcoin transaction.


To create a nonstandard Bitcoin transaction, browse to How to create and sign a nonstandard Bitcoin transaction.






Contents


- Summary
- Contents
- Introduction
- Standard transactions
- Nonstandard transactions
- More information






Introduction


A transaction is a signed note that describes the transfer of bitcoin from one or more input addresses to one or more output addresses. It must be digitally signed by the private key for each input address.

Transactions can be thought of as digitally signed patches that alter the state of the Bitcoin public ledger.






Standard transactions


Edgecase's working definition of a standard transaction:
- It has at least one input and at least one output.
- All input and output addresses are Pay-To-Public-Key-Hash (P2PKH).
- All input scriptSigs contain uncompressed public keys.

Example standard P2PKH Bitcoin address (34 characters):
1AGygbyEFYduWkkmZbbvirgS9kuBBMLJCP


Edgecase recommends that you store your bitcoin in standard addresses and use standard transactions to transfer bitcoin between them or to send bitcoin to another person.

To create a standard Bitcoin transaction, browse to How to create and sign a standard Bitcoin transaction.






Nonstandard transactions


Edgecase's working definition of a nonstandard transaction:
- It has at least one input and at least one output.
- At least one input or output address is not a standard Pay-To-Public-Key-Hash (P2PKH) address.

Nonstandard Pay-To-Script-Hash (P2SH) addresses begin with the character '3'. Example P2SH address:
The address
328cTqexYnQRbN5Dgs12D89sYiPPvtWVbF


Some Bitcoin exchanges will give you a P2SH address at which you can receive a payment to your exchange account. In order to transfer bitcoin from long-term storage to one of these exchanges, you will need to construct a nonstandard transaction that sends bitcoin to your P2SH receiving address.

To create a nonstandard Bitcoin transaction, browse to How to create and sign a nonstandard Bitcoin transaction.






More information


Strictly speaking, an address does not hold a particular bitcoin value. It holds one or more "unspent outputs", which are outputs from previous transactions that were sent to the address. These outputs hold particular values. The sum of these values is the amount of bitcoin held in the address. These values are actually stored in satoshi, which is the smallest unit of currency in the Bitcoin system. 10^8 satoshi are equivalent to 1 bitcoin.

Each input can only ever be spent once and must be spent completely. You can choose to spend only a portion of an input by sending some of its bitcoin value to an address that you control, known as a "change address". The change address could be the original address, if you wish.

You may need to send an amount of bitcoin to an output address that is greater than the amount stored in any single available input. If so, you will need to use multiple available inputs, which must sum to at least the desired amount. Any change can be sent to a change address.

For more information concerning Bitcoin transactions:

- Browse to the article Reading and verifying a standard raw bitcoin transaction. Read the Thoughts section.

- Browse to the article Reading and verifying a standard raw bitcoin transaction. Read the Notes / Discoveries section.

- Browse to the article Creating and signing a standard raw Bitcoin transaction. Go to the Notes / Discoveries section. Read the following parts:
-- Standard transaction - raw format
-- Standard transaction-in-signable-form - raw format
-- Gathering data in order to construct a new transaction
-- Algorithm for signing a standard transaction
-- Transaction Malleability
-- BIP 62 - Dealing with malleability
-- High and low S values in Bitcoin transaction signatures
-- Further information concerning ECDSA signatures and S values
-- Transactions constructed and signed in this project
-- Transaction identifier (txid) construction and endianness
-- Endianness
-- Proposal for a unique transaction identifier (utxid)

- Browse to the article Creating and signing a standard raw Bitcoin transaction. Read the Further Work section.

- Browse to the article Creating and signing a standard raw Bitcoin transaction: Iteration #2. Go to the Notes section. Read the following parts:
-- Definitions and acryonyms
-- Gathering data in order to construct a new transaction using the scripts created in this project

- Browse to the article Creating and signing a standard raw Bitcoin transaction: Iteration #2. Read the Further Work section.