Sei sulla pagina 1di 6

Blockchain Programming

in C#

Authored by Nicolas Dorier

Contributor for NBitcoin,

The .NET Bitcoin Framework

Co-authored With Bill Strait

Founder of Billd Labs


Blockchain Programming
in C#

Authored by Nicolas Dorier

Contributor for NBitcoin,

The .NET Bitcoin Framework

Co-authored With Bill Strait

Founder of Billd Labs

T able of Contents
I.
Introduction ......................................................................
.............................................
1.
Foreword .....................................................................
..........................................
2. Why Blockchain Programming and not Bitcoin
Programming? .................................................. 5
3. Why
C#? ...............................................................................
..................................
4. Pre-
requisites ....................................................................
......................................
a.
Skills ...........................................................................
.......................................
b.
Tools ..........................................................................
.......................................
5. Crowdfunding this
book .............................................................................
..................
6. Complementary
Reading ...........................................................................
.....................
7.
Diagrams ..........................................................................
..........................................
8. License: CC (ASA
3U) ...............................................................................
.....................
9. Project
Setup ............................................................................
...............................
II. Bitcoin
transfer ..........................................................................
..................................
1. Bitcoin
Address ...........................................................................
...............................
2.
Transaction ...................................................................
..........................................
3.
Blockchain.........................................................................
..........................................
4. “The Blockchain is more than just
Bitcoin” .........................................................................
5. Spend your
coin ..............................................................................
..........................
6. Proof of ownership as an authentication
method ....................................................................
III. Key Storage and
Generation.........................................................................
.....................
1. Is it random
enough?............................................................................
..........................
c. Key Derivation
Function .........................................................................
....................
2. Key
Encryption ........................................................................
...................................
3. Key
Generation ........................................................................
...................................
a. Like the good ol’
days .............................................................................
................
a. BIP38 (part
2) ................................................................................
........................
b. HD Wallet (BIP
32) ...............................................................................
....................
c. Mnemonic Code for HD Keys
(BIP39) ...........................................................................
....
d. Dark
Wallet ............................................................................
...............................
IV. Other types of
ownership .........................................................................
.......................
1. P2PK[H] (Pay to Public Key
[Hash])............................................................................
.........
2. Multi
Sig ...............................................................................
.................................
3. P2SH (Pay To Script
Hash) ............................................................................
.................
4.
Arbitrary ......................................................................
..........................................
5. Using the
TransactionBuilder ..............................................................
............................

2
Nicolas Dorier & Bill Strait

CC (ASA 3U)

T able of Contents
I.
Introduction ......................................................................
.............................................
1.
Foreword .....................................................................
..........................................
2. Why Blockchain Programming and not Bitcoin
Programming? .................................................. 5
3. Why
C#? ...............................................................................
..................................
4. Pre-
requisites ....................................................................
......................................
a.
Skills ...........................................................................
.......................................
b.
Tools ..........................................................................
.......................................
5. Crowdfunding this
book .............................................................................
..................
6. Complementary
Reading ...........................................................................
.....................
7.
Diagrams ..........................................................................
..........................................
8. License: CC (ASA
3U) ...............................................................................
.....................
9. Project
Setup ............................................................................
...............................
II. Bitcoin
transfer ..........................................................................
..................................
1. Bitcoin
Address ...........................................................................
...............................
2.
Transaction ...................................................................
..........................................
3.
Blockchain.........................................................................
..........................................
4. “The Blockchain is more than just
Bitcoin” .........................................................................
5. Spend your
coin ..............................................................................
..........................
6. Proof of ownership as an authentication
method ....................................................................
III. Key Storage and
Generation.........................................................................
.....................
1. Is it random
enough?............................................................................
..........................
c. Key Derivation
Function .........................................................................
....................
2. Key
Encryption ........................................................................
...................................
3. Key
Generation ........................................................................
...................................
a. Like the good ol’
days .............................................................................
................
a. BIP38 (part
2) ................................................................................
........................
b. HD Wallet (BIP
32) ...............................................................................
....................
c. Mnemonic Code for HD Keys
(BIP39) ...........................................................................
....
d. Dark
Wallet ............................................................................
...............................
IV. Other types of
ownership .........................................................................
.......................
1. P2PK[H] (Pay to Public Key
[Hash])............................................................................
.........
2. Multi
Sig ...............................................................................
.................................
3. P2SH (Pay To Script
Hash) ............................................................................
.................
4.
Arbitrary ......................................................................
..........................................
5. Using the
TransactionBuilder ..............................................................
............................

2
Nicolas Dorier & Bill Strait

CC (ASA 3U)

V. Other types of
asset ............................................................................
........................
1. Colored
Coins..............................................................................
..............................
2. Issuing an
Asset ............................................................................
............................
a.
Objective..........................................................................
.......................................
b. Issuance
Coin ..............................................................................
...........................
3. Transfer an
Asset .............................................................................
..........................
4. Unit
tests .............................................................................
..................................
5. Ricardian
contracts .........................................................................
.......