-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature-BIT-181
- Loading branch information
Showing
16 changed files
with
499 additions
and
634 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
[submodule "bitprim-cs"] | ||
path = bitprim-cs | ||
url = https://github.com/bitprim/bitprim-cs | ||
branch = master |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,11 +22,9 @@ build: off | |
branches: | ||
only: | ||
- master | ||
- dev | ||
- /^v\d+\.\d+\.\d+$/ | ||
- /^release-\d+\.\d+\.\d+$/ | ||
- /^feature-ci-.+$/ | ||
- /^feature_ci_.+$/ | ||
|
||
|
||
skip_branch_with_pr: true | ||
|
||
platform: | ||
- x64 | ||
|
@@ -35,8 +33,6 @@ configuration: | |
- Release | ||
|
||
environment: | ||
access_token: | ||
secure: ErUbaWTVjfp8LLH3y6Zh+20sXGFrmIyIb2xMPDsRwtPDSoTCCmFmD6zEJ1b2R6NE | ||
|
||
VS150COMNTOOLS: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Common7\\Tools\\" | ||
|
||
|
@@ -46,15 +42,21 @@ environment: | |
|
||
install: | ||
- git submodule init | ||
- git submodule update | ||
- git submodule update --remote | ||
- cinst docfx | ||
|
||
build_script: | ||
- docfx | ||
|
||
on_success: | ||
- git clone "https://%GIT_ACCESS_TOKEN%@github.com/bitprim/bitprim.github.io.git" | ||
- git config --global user.email "[email protected]" | ||
- git config --global user.name "bitprim-ci" | ||
- cd _site | ||
- xcopy *.* C:\projects\bitprim-docs\bitprim.github.io\docfx\ /s /e /y | ||
- cd ../bitprim.github.io | ||
- git add . | ||
- git commit -m "Updated documentation site" | ||
- git push | ||
|
||
- ps: | | ||
./deploy.ps1 | ||
test: off |
Submodule bitprim-cs
updated
from a91c29 to 577bee
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Installation | ||
|
||
## Prerequisites | ||
|
||
* 64-bit machine. | ||
* Conan package manager, version 1.1.0 or newer. See [Conan Installation](http://docs.conan.io/en/latest/installation.html#install-with-pip-recommended). | ||
|
||
In case there are no pre-built binaries for your platform, conan will automatically try to build from source code. In such a scenario, the following requirements must be added to the previous ones: | ||
|
||
* C++11 Conforming Compiler. | ||
* CMake building tool, version 3.4 or newer. | ||
|
||
## Installation | ||
|
||
You can install the Bitprim C# binding via Nuget. | ||
|
||
There are two packages available: | ||
|
||
For Bitcoin Cash (BCH) you need to use https://www.nuget.org/packages/bitprim-bch/ | ||
and for Bitcoin Legacy (BTC) you need to use https://www.nuget.org/packages/bitprim-btc/ | ||
|
||
If you use Visual Studio, you can use the UI or the Package Manager. | ||
|
||
### UI | ||
|
||
* Right click on your project | ||
* Select *Manage Nuget Packages* | ||
* Search for bitprim-bch or bitprim-btc | ||
* Click Install | ||
|
||
### Package Manager | ||
|
||
* Open Package Manager | ||
* Run the following command | ||
|
||
``` | ||
Install-Package bitprim-bch | ||
or | ||
Install-Package bitprim-btc | ||
``` | ||
|
||
If you are using dotnet cli: | ||
|
||
``` | ||
dotnet add package bitprim-bch | ||
or | ||
dotnet add package bitprim-btc | ||
``` | ||
|
||
## Building from source | ||
|
||
If you want to build from source, you need the following prerequisites: | ||
|
||
* .Net Framework 4.6.1 | ||
* .Net Core 2.0 | ||
* Powershell (Windows only) | ||
|
||
Run the following commands: | ||
|
||
``` | ||
git clone https://github.com/bitprim/bitprim-cs.git | ||
cd bitprim-cs | ||
if you are on Windows, run: | ||
powershell ./build.ps1 | ||
if you are in Linux or osx : | ||
chmod +x build.sh | ||
./build.sh | ||
``` | ||
|
||
If you have problems running build.ps1 please check this link | ||
[https://cakebuild.net/docs/tutorials/powershell-security](https://cakebuild.net/docs/tutorials/powershell-security) |
This file contains 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
57 changes: 57 additions & 0 deletions
57
content/developer_guide/dotnet/tutorials/how_to_generate_addresses.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#How to create addresses | ||
|
||
If you want to receive coins you need to generate an address. | ||
|
||
In this tutorial you will learn: | ||
|
||
* How to generate a seed | ||
* How to generare a private key | ||
* How to generate a public key | ||
* How to generate an address | ||
|
||
|
||
## Generate Seed | ||
|
||
First you need a seed to generate the private key. The seed must be a random string with a high degree of entropy. | ||
For this, we use the following method. | ||
|
||
```c# | ||
|
||
``` | ||
|
||
## Generate Private key | ||
|
||
Now we can generate the private key. The private key has 256 bits in length. And can be encoded in different formats: | ||
|
||
* Raw | ||
* Hex | ||
* WIF | ||
* WIF-Compressed | ||
|
||
```c# | ||
|
||
``` | ||
|
||
|
||
## Generate Public key | ||
|
||
The public key is derived from the private key using elliptic curve calculations. The public key can be compressed or uncompressed. | ||
|
||
```c# | ||
``` | ||
|
||
|
||
|
||
## Generate Address | ||
|
||
Now we can generate our public address to share with anyone. | ||
If K is the public key, the resulting address A is: | ||
|
||
``` | ||
A = Base58Check(RIPEMD160(SHA256(K))) | ||
``` | ||
|
||
|
||
```c# | ||
``` | ||
|
Oops, something went wrong.