Created
February 7, 2019 13:55
-
-
Save donma/132dd314e5599563ae2577751f131407 to your computer and use it in GitHub Desktop.
Create Bitcoin Wallet By NBitcoin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Key1 = new NBitcoin.Key(); | |
var bitcoinPrivateKey = Key1.GetWif(NBitcoin.Network.TestNet); | |
NBitcoin.BitcoinEncryptedSecret encryptedBitcoinPrivateKey = bitcoinPrivateKey.Encrypt("your_pass_word"); | |
Console.WriteLine("Your Address : " + bitcoinPrivateKey.GetAddress()); | |
Console.WriteLine("Encrypted PrivateKey : " + bitcoinPrivateKey.ScriptPubKey.ToString()); | |
//Result : | |
//Wallet A | |
//Your Address : mvJh993ZpnVFgX4Bs9jacjFLsKPhXj3nkj | |
//Encrypted PrivateKey: 6PYQBZhumqnrhETBXNvqW61XHpwYVefbTmZtM2BZcekPjunUbPgUPGe8H2 | |
//Wallet B | |
//Your Address : mshr22VWpq7XTTA3EhAoqoizPuqRAvZfvi | |
//Encrypted PrivateKey: 6PYTsdNrmWyNTBJVMd7LqXnAM7ApFkTtG1GMA5RdqczYW8kuAaTwbvJENw |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment