Giter Club home page Giter Club logo

ark-go's Introduction

ARK-Go

GitHub issues GitHub forks GitHub stars GitHub license

Overview

A short intro about the different directories within this repository:

  • /arkcoin - Coin configuration and helper functions
  • /core - API to use the Ark blockchain out of Golang
  • /cmd/arkgopool - Client for delegate profit sharing pools
  • /cmd/arkgoserver - Server for delgates profit sharing pools
  • /raw - Images and other raw files

You can find more information about the different functionalities in their folder.

Why Ark-GO

GoLang is an open source programming language developed by Google and designed for building fast, simple and reliable software. It is not about theoretical concepts such as monads and virtual inheritance, but more about hands-on experience.

Ark-GO is the ARK Ecosystem library client implemented in GOLANG programming language. It implements all most relevant ARK functionalities to help you develop efficient, fast and scalable GOLANG applications built upon ARK platform. It provides also low level access to ARK so you can easily build your application on top of it.

A library demo app: ARKGO-GUI

A demo client app was developed to test the goark library package dependencies. More about the demo gui client: /cmd/arkgopool. It targets delegate and basic account functionalites, plus silent mode - to be able to run automated reward payments.

See the demo console app shell recording here: https://asciinema.org/a/5yndxl794ncfpmjoqftuaiodm?t=8.

How to install?

$> go get github.com/kristjank/ark-go

How to get dependencies?

$> go get ./...

How to get started?

All ark-node services have available reponses have their struct representations. It's best to let the code do the speaking. Every class implementation has it's own test class. So it's best to start learning by looking at actual test code.

Ark-GO Client Usage

First call should be network selection, so all settings can initialize from the peers before going into action. By default MAINNET is active.

Init

GoDoc documentation available on this link

import "github.com/kristjank/ark-go/core"
var arkclient = core.NewArkClient(nil)

Communication

Queries to the blockchain are done with the Query struct parameters:

params := TransactionQueryParams{Limit: 10, SenderID: senderID}

... and the results - reponse is also parametrized.

transResponse, _, err := arkapi.ListTransaction(params)
if transResponse.Success {
		log.Println(t.Name(), "Success, returned", transResponse.Count, "transactions")
	} else {
		t.Error(err.Error())
	}

Other call samples

//usage samples
deleResp, _, _ := arkclient.GetDelegate(params)

//switch networks
arkclient = arkclient.SetActiveConfiguration(core.DEVNET) //or core.MAINNET
//create and send tx
arkapi := NewArkClient(nil)
recepient := "address"
passphrase := "pass"

tx := CreateTransaction(recepient,1,"ARK-GOLang is saying whoop whooop",passphrase, "",0)
payload.Transactions = append(payload.Transactions, tx)
res, httpresponse, err := arkapi.PostTransaction(payload)

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.

Authors

Chris ([email protected]), with a lot of help from FX Thoorens [email protected] and ARK Community

Jarunik ([email protected]), with a lot of help from Chris

Support this project

Ark Logo Ark address:AUgTuukcKeE4XFdzaK6rEHMD5FLmVBSmHk

License

License: MIT

Copyright (c) 2017 ARK, chris

ark-go's People

Contributors

ciband avatar dafty avatar fix avatar jarunik avatar kristjank avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.