Briscoooe / ark-net

Ark Client for .NET

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

alt text

GitHub issues GitHub forks GitHub stars GitHub license

Why Ark.NET

Ark.NET is the ARK Ecosystem library for the .NET platform. It implements all most relevant ARK functionalities to help you develop efficient .NET applications built upon ARK platform. It provides also low level access to ARK so you can easily build your application on top of it.

The package supports:

  • With full features, Windows Desktop applications, Mono Desktop applications, and platform supported at .NET Standard Library. Should work will all .NET solutions with framework > 4.5.2.
  • It's a work in progress so mobile platform testing are still to follow.

Source Browser

How to install?

With nuget:

nuget

Install-Package ark.net Go on the nuget website for more information.

From source:

To compile it by yourself, you can git clone, open the project and hit the compile button on visual studio. In command prompt:

git clone https://github.com/kristjank/ark-net
cd ark-net

How to get started?

All ark-node services have available reponses have their object representations in the form of ValueObjects. You can use service classes under service folder. Responses are IEnumerable or IQueryable (depends if the class and functionality).

It's best to let the code do the speaking. For more examples look at the ARK.NET Tests, where all tests are written and you can see the api usage. Some code snippets are below.

Ark.Net Client init

First call should be network selection, so all settings can initialize before going into action.

  ArkNetApi.Instance.Start(NetworkType.MainNet); //Other types are TestNet and DevNet

For additional settings please see settings file. To modify settings, just add settings.conf file to root folder. File can only include changed settings (not all).

Account/Wallet layer

var accCtnrl = new AccountController("top secret pass");
//Send ARK
var result = accCtnrl.SendArk(100, "AUgTuukcKeE4XFdzaK6rEHMD5FLmVBSmHk", "Akr.Net test trans from Account",
                "pass phrase");
//Vote 4 Delegate                
var result = accCtnrl.VoteForDelegate( votes, "top secret pass");

Service layer

For a full list of available api calls please look at the ARK.NET Test project

//PeerService
var peers = PeerService.GetAll();
var peersOK = peers.Where(x => x.Status.Equals("OK"));

//TransactionService
var trans = TransactionService.GetAll();
...

Core Layer

Layer is used for core Ark blockchain communication (transaction, crypto...). It is wrapped by api libraries that are called from the service and Account layer.

TransactionApi tx = TransactionApi.CreateTransaction(recepient, amount, description, passphrase);
Peer peer = Network.Mainnet.GetRandomPeer();
var result = peer.PostTransaction(tx);          

More information about ARK Ecosystem and etc

Please, use github issues for questions or feedback. For confidential requests or specific demands, contact us on our public channels.

Useful link for a free IDE :

Visual Studio Community Edition : https://www.visualstudio.com/products/visual-studio-community-vs

Authors

Chris (kristjan.kosic@gmail.com), with a lot of help from FX Thoorens fx@ark.io and ARK Community

Support this project

alt text Ark address:AUgTuukcKeE4XFdzaK6rEHMD5FLmVBSmHk

License

License: MIT

Copyright (c) 2017 ARK

About

Ark Client for .NET

License:MIT License


Languages

Language:C# 66.6%Language:PowerShell 33.1%Language:Batchfile 0.3%