-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
20 lines (18 loc) · 724 Bytes
/
Program.cs
File metadata and controls
20 lines (18 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using System;
using NBitcoin;
// ReSharper disable All
namespace BitcoinAddress
{
class Program
{
static void Main()
{
Key privateKey = new Key(); // generate a random private key
var mainNetPrivateKey = privateKey.GetBitcoinSecret(Network.Main); // get our private key for the mainnet
var testNetPrivateKey = privateKey.GetBitcoinSecret(Network.TestNet); // get our private key for the testnet
Console.WriteLine(mainNetPrivateKey); // L5B67zvrndS5c71EjkrTJZ99UaoVbMUAK58GKdQUfYCpAa6jypvn
Console.WriteLine(testNetPrivateKey); // cVY5auviDh8LmYUW8AfafseD6p6uFoZrP7GjS3rzAerpRKE9Wmuz
Console.ReadLine();
}
}
}