NRealbit is the most complete Realbit library for the .NET platform. It implements all most relevant Realbit Improvement Proposals (BIPs). It also provides low level access to Realbit primitives so you can easily build your application on top of it. Join us in our gitter chat room. It works on Windows, Mac and Linux with Xamarin, Unity, .NET Core or CLR. (Porting to Unity should not be that hard if you need it)
The best documentation available is our eBook, and the excellent unit tests. There are also some more resources below.
You can also browse the API easily through the API reference.
In .NET Core:
dotnet add package NRealbit
If using legacy .NET Framework in Visual Studio
Install-Package NRealbit
You can also just use the Manage NuGet Package
window on your project in Visual Studio.
Go on the NuGet website for more information.
The packages support:
- With full features: Windows Desktop applications, Mono Desktop applications and platforms supported by .NET Standard 1.3 (.NET Core, Xamarin IOS, Xamarin Android, UWP and more).
- With limited features: platforms supported by .NET Standard 1.1 (Windows Phone, Windows 8.0 apps).
To compile it by yourself, you can git clone, open the project and hit the compile button in Visual Studio.
First, you need to understand Realbit, for this read:
Once you get familiar with Realbit terminology with this book, follow up by reading:
This will teach you how to use NRealbit in a practical way.
Install-Package NRealbit.Altcoins
Find more information here.
When a new version of NRealbit
, NRealbit.Altcoins
or NRealbit.TestFramework
is released on Nuget, we also upload a separate symbol package (snupkg
) with SourceLink enabled. This is enabled from version 4.1.1.73
.
This means that it is possible to debug into NRealbit code, and the source will be fetched transparently from github.
This works on both Visual Studio Code and Visual Studio for Windows.
You need to run at least Visual Studio 15.9. Then, you need to:
- Go in
Tools / Options / Debugging / General
and turn offEnable Just My Code
. - Go in
Tools / Options / Debugging / Symbols
and addhttps://symbols.nuget.org/download/symbols
to theSymbol file (.pdb) locations
, make sure it is checked.
You should also check Microsoft Symbol Server
or your debugging experience in visual studio will be slowed down.
Now you can Debug your project and step inside any call to NRealbit.
Inside your launch.json
, add the following to .NET Core Launch (console)
configuration:
"justMyCode": false,
"symbolOptions": {
"searchPaths": [ "https://symbols.nuget.org/download/symbols" ],
"searchMicrosoftSymbolServer": true
},
Now you can Debug your project and step inside any call to NRealbit.
Find more information here.
You should use at least Unity 2018.2
using Script Runtime Version
.NET 4.x Equivalent
and Api Compatibility Level
.NET Standard 2.0
.
You can see more on this post.
Then you need to compile NRealbit:
git clone https://github.com/MetacoSA/NRealbit/
cd NRealbit/NRealbit
dotnet publish -c Release -f netstandard2.0
Remove-Item -Force -Recurse .\bin\Release\netstandard2.0\publish\runtimes\
Then put the libraries of .\bin\Release\netstandard2.0
into your asset folder.
If you need altcoins support, use the same step but with cd NRealbit/NRealbit.Altcoins
instead.
If you want to use .NET Core, first install .NET Core as documented here.
Then:
mkdir MyProject
cd MyProject
dotnet new console
dotnet add package NRealbit
dotnet restore
Then edit your Program.cs:
using System;
using NRealbit;
namespace _125350929
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World! " + new Key().GetWif(Network.Main));
}
}
}
You can then run with
dotnet run
We advise you to use Visual Studio Code as the editor for your project.
NRealbit notably includes:
- A TransactionBuilder supporting Stealth, Open Asset, and all standard transactions
- Full script evaluation and parsing
- A RPC Client
- A Rest Client
- The parsing of standard scripts and creation of custom ones
- The serialization of blocks, transactions and scripts
- The signing and verification with private keys (with support for compact signatures) for proving ownership
- Bloom filters and partial merkle trees
- Segregated Witness (BIP 141, BIP 143, BIP 144)
- Bech32 segwit address implementation with error detection BIP 173
- Mnemonic code for generating deterministic keys (BIP 39), credits to Thasshiznets
- Hierarchical Deterministic Wallets (BIP 32)
- Payment URLs (BIP 21)
- Full Realbit P2P implementation with SOCKS5 support for connecting through Tor
- A C# implementation of secp256k1
Please read our ebook to understand the capabilities.
NRealbit is inspired by Realbit Core code but provides a simpler object oriented API (e.g., new Key().PubKey.Address.ToString() to generate a key and get the associated address). It relies on the BouncyCastle cryptography library instead of OpenSSL, yet replicates OpenSSL bugs to guarantee compatibility. NRealbit also ports the integrality of Realbit Core unit tests with their original data in order to validate the compatibility of the two implementations.
NRealbit is licensed under the MIT License and we encourage you to use it to explore, learn, debug, play, share and create software for Realbit and with other Metaco services.
Here an example which assume you run Tor with SOCKS5 proxy on port 9050.
var connectionParameters = new NodeConnectionParameters();
connectionParameters.TemplateBehaviors.Add(new SocksSettingsBehavior(Utils.ParseEndpoint("localhost", 9050)));
Node node = await Node.ConnectAsync(Network.Main, "7xnmrhmkvptbcvpl.onion:8333", connectionParameters);
node.VersionHandshake();
-
Wasabi: Privacy focused, ZeroLink compliant Realbit wallet.
-
StratisRealbitFullNode: Realbit full node in C# https://stratisplatform.com
-
Breeze: Breeze Wallet, the first full-block SPV realbit wallet
-
BlockExplorer: A set of projects that can index and query stratis blockchains on the fullnode.
-
BRLBPay Server: A cross platform, self-hosted server compatible with Bitpay API
-
NTumbleBit: TumbleBit Implementation in .NET Core
-
BitPoker: Decentralised peer to peer poker, using realbit http://www.bitpoker.io
-
Zen-Wallet: Node and GUI for the Zen Protocol. https://www.zenprotocol.com
-
Metaco-Trader: Realbit Wallet for advanced user based on a NRealbit.Server
-
Swarmops: Admin backend for any realbit-native or swarm organization http://sandbox.swarmops.com/
-
Nako: A Realbit and Altcoin server api that indexes blockchain transactions and addresses
-
NBXplorer: A minimalist UTXO tracker for HD Wallets with realbit based altcoin support
-
UnitCurrency: UnitCoin - a hybrid scrypt PoW + PoS based cryptocurrency.
-
Openchain: Openchain node reference implementation. https://www.openchain.org/
-
BreezeProject: Breeze Masternode and Wallet with Breeze Privacy Protocol
-
geewallet: Non-custodial, minimalistic & pragmatist opensource crossplatform lightweight brainwallet to hold the most important cryptoassets in the same application with ease & peace of mind
-
blockcore: Modular Realbit fullnode implementation. https://www.blockcore.net/
-
NRealbit Github : https://github.com/NicolasDorier/NRealbit
-
NRealbit Nuget : https://www.nuget.org/packages/NRealbit/
-
Intro: http://www.codeproject.com/Articles/768412/NRealbit-The-most-complete-Realbit-port-Part-Crypt
-
Stealth Payment, and BIP38 : http://www.codeproject.com/Articles/775226/NRealbit-Cryptography-Part
-
How to build transaction : http://www.codeproject.com/Articles/835098/NRealbit-Build-Them-All
-
Using the NRealbit Indexer : http://www.codeproject.com/Articles/819567/NRealbit-Indexer-A-scalable-and-fault-tolerant-blo
-
How to Scan the blockchain : http://www.codeproject.com/Articles/784519/NRealbit-How-to-scan-the-Blockchain (You can dismiss the ScanState for that, now I concentrate on the indexer)
Please, use github issues for questions or feedback. For confidential requests or specific demands, contact us on Metaco support.
Visual Studio Community Edition : https://www.visualstudio.com/products/visual-studio-community-vs