Giter Site home page Giter Site logo

go-client's Introduction

Ark Go - Client

A simple Go API client for the Ark Blockchain.

Build Status Codecov Latest Version License: MIT

Lead Maintainer: Brian Faust

Documentation

You can find installation instructions and detailed instructions on how to use this package at the dedicated documentation site.

Security

If you discover a security vulnerability within this package, please send an e-mail to [email protected]. All security vulnerabilities will be promptly addressed.

Credits

This project exists thanks to all the people who contribute.

License

MIT ยฉ ARK Ecosystem

go-client's People

Contributors

alexbarnsley avatar ciband avatar dated avatar faustbrian avatar highjhacker avatar kaiserkarel avatar vmunich avatar vulet avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-client's Issues

[Weekly Digest] Sep 23, 2019 - Sep 29, 2019

Here's the Weekly Digest from Mon, Sep 23, 2019 12:00 AM to Sun, Sep 29, 2019 11:59 PM for ArkEcosystem/go-client.

Issues

Last week there were no issues.

Pull Requests

Last week, 2 pull-requests were opened, closed or merged.

Merged

Last week, 2 pull-requests were merged.

@faustbrian

Releases

Last week there were no releases.

Contributors

Last week there was 1 contributor.

@faustbrian

Thank you for your contribution! ๐ŸŽ‰

Star Gazers

Last week there were no stargazers.


That's all activities since Mon, Sep 23, 2019 12:00 AM, please Watch and Star the repository ArkEcosystem/go-client to receive upcoming weekly updates.

You can also view all Weekly Digests by clicking here.

unclear what id means

often in the client code, parameters are referred to as Id. It is not directly clear what Id refers to. For example in client.Delegate.Get(ctx, id) id could refer to username, address or public key. If all three are accepted, the doc comment should explain this, while if only one of them is accepted, it would be nicer to have the parameter be renamed to the actual value, instead of a generic ID.

Even looking at the test case, the noun "dummy" is used as ID. It would be nice to change this to an actual valid ID where possible, as tests are a good way for new people to get acquainted with the code.

[Weekly Digest] Feb 18, 2019 - Feb 24, 2019

Here's the Weekly Digest from Mon, Feb 18, 2019 12:00 AM to Sun, Feb 24, 2019 11:59 PM for ArkEcosystem/go-client.

Issues

Last week there was 1 issue. It is still open.

Opened

@ArkEcosystemBot

Pull Requests

Last week, no pull-requests were opened, closed or merged.

Releases

Last week there were no releases.

Contributors

Last week there were no contributors.

Star Gazers

Last week there were no stargazers.


That's all activities since Mon, Feb 18, 2019 12:00 AM, please Watch and Star the repository ArkEcosystem/go-client to receive upcoming weekly updates.

You can also view all Weekly Digests by clicking here.

[Weekly Digest] Jul 22, 2019 - Jul 28, 2019

Here's the Weekly Digest from Mon, Jul 22, 2019 12:00 AM to Sun, Jul 28, 2019 11:59 PM for ArkEcosystem/go-client.

Issues

Last week there were no issues.

Pull Requests

Last week, 3 pull-requests were opened, closed or merged.

Merged

Last week, 3 pull-requests were merged.

@faustbrian

Releases

Last week there were no releases.

Contributors

Last week there was 1 contributor.

@faustbrian

Thank you for your contribution! ๐ŸŽ‰

Star Gazers

Last week there were no stargazers.


That's all activities since Mon, Jul 22, 2019 12:00 AM, please Watch and Star the repository ArkEcosystem/go-client to receive upcoming weekly updates.

You can also view all Weekly Digests by clicking here.

[Weekly Digest] Aug 19, 2019 - Aug 25, 2019

Here's the Weekly Digest from Mon, Aug 19, 2019 12:00 AM to Sun, Aug 25, 2019 11:59 PM for ArkEcosystem/go-client.

Issues

Last week there were no issues.

Pull Requests

Last week, 1 pull-request was opened, closed or merged.

Closed

Last week, 1 pull-request was closed.

@alexbarnsley

Releases

Last week there were no releases.

Contributors

Last week there were no contributors.

Star Gazers

Last week there were no stargazers.


That's all activities since Mon, Aug 19, 2019 12:00 AM, please Watch and Star the repository ArkEcosystem/go-client to receive upcoming weekly updates.

You can also view all Weekly Digests by clicking here.

[Weekly Digest] May 20, 2019 - May 26, 2019

Here's the Weekly Digest from Mon, May 20, 2019 12:00 AM to Sun, May 26, 2019 11:59 PM for ArkEcosystem/go-client.

Issues

Last week there were no issues.

Pull Requests

Last week, 1 pull-request was opened, closed or merged.

Merged

Last week, 1 pull-request was merged.

@vulet

Releases

Last week there were no releases.

Contributors

Last week there was 1 contributor.

@vulet

Thank you for your contribution! ๐ŸŽ‰

Star Gazers

Last week there were no stargazers.


That's all activities since Mon, May 20, 2019 12:00 AM, please Watch and Star the repository ArkEcosystem/go-client to receive upcoming weekly updates.

You can also view all Weekly Digests by clicking here.

[Weekly Digest] Feb 10, 2020 - Feb 16, 2020

Here's the Weekly Digest from Mon, Feb 10, 2020 12:00 AM to Sun, Feb 16, 2020 11:59 PM for ArkEcosystem/go-client.

Issues

Last week there were 2 issues. Of these, 2 issues have been closed and 0 issues are still open.

Closed

@faustbrian

Pull Requests

Last week, 5 pull-requests were opened, closed or merged.

Closed

Last week, 2 pull-requests were closed.

@dated

Merged

Last week, 3 pull-requests were merged.

@dated

@faustbrian

Releases

Last week there was 1 release.

  • 1.1.0 at Tue, Feb 11, 2020 7:17 AM

Contributors

Last week there were 2 contributors.

@dated @faustbrian

Thank you for your contributions! ๐ŸŽ‰

Star Gazers

Last week there were no stargazers.


That's all activities since Mon, Feb 10, 2020 12:00 AM, please Watch and Star the repository ArkEcosystem/go-client to receive upcoming weekly updates.

You can also view all Weekly Digests by clicking here.

Add Visual Studio Code Support

Is your feature request related to a problem? Please describe.
When doing development under Visual Studio Code, the .vscode directory is being picked up by git.

Describe the solution you'd like
I would like the .vscode directory to be added to the .gitignore file.

Describe alternatives you've considered
The only alternative is to always unstage the .vscode directory "changes".

Additional context
N/A

[Weekly Digest] Jun 3, 2019 - Jun 9, 2019

Here's the Weekly Digest from Mon, Jun 3, 2019 12:00 AM to Sun, Jun 9, 2019 11:59 PM for ArkEcosystem/go-client.

Issues

Last week there was 1 issue. It is closed now.

Closed

@ArkEcosystemBot

Pull Requests

Last week, no pull-requests were opened, closed or merged.

Releases

Last week there were no releases.

Contributors

Last week there were no contributors.

Star Gazers

Last week there were no stargazers.


That's all activities since Mon, Jun 3, 2019 12:00 AM, please Watch and Star the repository ArkEcosystem/go-client to receive upcoming weekly updates.

You can also view all Weekly Digests by clicking here.

[Weekly Digest] Feb 11, 2019 - Feb 17, 2019

Here's the Weekly Digest from Mon, Feb 11, 2019 12:00 AM to Sun, Feb 17, 2019 11:59 PM for ArkEcosystem/go-client.

Issues

Last week there were no issues.

Pull Requests

Last week, 1 pull-request was opened, closed or merged.

Merged

Last week, 1 pull-request was merged.

@faustbrian

Releases

Last week there were no releases.

Contributors

Last week there was 1 contributor.

@faustbrian

Thank you for your contribution! ๐ŸŽ‰

Star Gazers

Last week there were no stargazers.


That's all activities since Mon, Feb 11, 2019 12:00 AM, please Watch and Star the repository ArkEcosystem/go-client to receive upcoming weekly updates.

You can also view all Weekly Digests by clicking here.

delegate.Rank is not documented

Describe the bug
DelegateResponses contain a Rank: byte field, however neither the go-client nor https://docs.ark.io defines this field.

(It can be converted to the rank by casting it to int, but it is still a bit weird)

[Weekly Digest] Sep 9, 2019 - Sep 15, 2019

Here's the Weekly Digest from Mon, Sep 9, 2019 12:00 AM to Sun, Sep 15, 2019 11:59 PM for ArkEcosystem/go-client.

Issues

Last week there were no issues.

Pull Requests

Last week, 2 pull-requests were opened, closed or merged.

Closed

Last week, 1 pull-request was closed.

@dated

Merged

Last week, 1 pull-request was merged.

@dated

Releases

Last week there were no releases.

Contributors

Last week there was 1 contributor.

@dated

Thank you for your contribution! ๐ŸŽ‰

Star Gazers

Last week there were no stargazers.


That's all activities since Mon, Sep 9, 2019 12:00 AM, please Watch and Star the repository ArkEcosystem/go-client to receive upcoming weekly updates.

You can also view all Weekly Digests by clicking here.

[Weekly Digest] Mar 2, 2020 - Mar 8, 2020

Here's the Weekly Digest from Mon, Mar 2, 2020 12:00 AM to Sun, Mar 8, 2020 11:59 PM for ArkEcosystem/go-client.

Issues

Last week there were no issues.

Pull Requests

Last week, 1 pull-request was opened, closed or merged.

Merged

Last week, 1 pull-request was merged.

@dated

Releases

Last week there were no releases.

Contributors

Last week there was 1 contributor.

@dated

Thank you for your contribution! ๐ŸŽ‰

Star Gazers

Last week there were no stargazers.


That's all activities since Mon, Mar 2, 2020 12:00 AM, please Watch and Star the repository ArkEcosystem/go-client to receive upcoming weekly updates.

You can also view all Weekly Digests by clicking here.

[Weekly Digest] Sep 16, 2019 - Sep 22, 2019

Here's the Weekly Digest from Mon, Sep 16, 2019 12:00 AM to Sun, Sep 22, 2019 11:59 PM for ArkEcosystem/go-client.

Issues

Last week there were no issues.

Pull Requests

Last week, 1 pull-request was opened, closed or merged.

Merged

Last week, 1 pull-request was merged.

@faustbrian

Releases

Last week there were no releases.

Contributors

Last week there was 1 contributor.

@faustbrian

Thank you for your contribution! ๐ŸŽ‰

Star Gazers

Last week there were no stargazers.


That's all activities since Mon, Sep 16, 2019 12:00 AM, please Watch and Star the repository ArkEcosystem/go-client to receive upcoming weekly updates.

You can also view all Weekly Digests by clicking here.

[Weekly Digest] May 27, 2019 - Jun 2, 2019

Here's the Weekly Digest from Mon, May 27, 2019 12:00 AM to Sun, Jun 2, 2019 11:59 PM for ArkEcosystem/go-client.

Issues

Last week there was 1 issue. It is closed now.

Closed

@ArkEcosystemBot

Pull Requests

Last week, 2 pull-requests were opened, closed or merged.

Merged

Last week, 2 pull-requests were merged.

@faustbrian

@vulet

Releases

Last week there were no releases.

Contributors

Last week there were 2 contributors.

@faustbrian @vulet

Thank you for your contributions! ๐ŸŽ‰

Star Gazers

Last week there were no stargazers.


That's all activities since Mon, May 27, 2019 12:00 AM, please Watch and Star the repository ArkEcosystem/go-client to receive upcoming weekly updates.

You can also view all Weekly Digests by clicking here.

[Weekly Digest] Oct 14, 2019 - Oct 20, 2019

Here's the Weekly Digest from Mon, Oct 14, 2019 12:00 AM to Sun, Oct 20, 2019 11:59 PM for ArkEcosystem/go-client.

Issues

Last week there were no issues.

Pull Requests

Last week, 1 pull-request was opened, closed or merged.

Merged

Last week, 1 pull-request was merged.

@dated

Releases

Last week there were no releases.

Contributors

Last week there was 1 contributor.

@dated

Thank you for your contribution! ๐ŸŽ‰

Star Gazers

Last week there were no stargazers.


That's all activities since Mon, Oct 14, 2019 12:00 AM, please Watch and Star the repository ArkEcosystem/go-client to receive upcoming weekly updates.

You can also view all Weekly Digests by clicking here.

add time.Time method to ark.Timestamp

I'm always frustrated when I need to write trivial convertion functions, such as ark timestamp to a golang time.Time object.

A clear and concise description of what you want to happen.
Add a Time() time.Time method to ark.Timestamp doing the convertion for me.

I reckon no alternatives are needed. go time.Time objects are quite rich, with timezone support etc. it would be very convenient to leverage that.

[Weekly Digest] Feb 24, 2020 - Mar 1, 2020

Here's the Weekly Digest from Mon, Feb 24, 2020 12:00 AM to Sun, Mar 1, 2020 11:59 PM for ArkEcosystem/go-client.

Issues

Last week there were no issues.

Pull Requests

Last week, 1 pull-request was opened, closed or merged.

Opened

Last week, 1 pull-request was opened.

@dated

Releases

Last week there were no releases.

Contributors

Last week there was 1 contributor.

@dated

Thank you for your contribution! ๐ŸŽ‰

Star Gazers

Last week there were no stargazers.


That's all activities since Mon, Feb 24, 2020 12:00 AM, please Watch and Star the repository ArkEcosystem/go-client to receive upcoming weekly updates.

You can also view all Weekly Digests by clicking here.

Add support for golang-lint

Is your feature request related to a problem? Please describe.
Automated linters are always a nice thing to have in a project.

Describe the solution you'd like
Adding a linter like golang-lint allows an automated linter to run during CI.

Describe alternatives you've considered
None at this time.

Additional context
None

incorrect implementation of BlockService

BlockService does not actually implement any Search options, as the query param is a simple *Pagination; instead it should accept either a struct or a map[string]interface{} as the search params.

[Weekly Digest] Jul 29, 2019 - Aug 4, 2019

Here's the Weekly Digest from Mon, Jul 29, 2019 12:00 AM to Sun, Aug 4, 2019 11:59 PM for ArkEcosystem/go-client.

Issues

Last week there were 2 issues. Of these, 2 issues have been closed and 0 issues are still open.

Closed

@KaiserKarel

@tsunghan5566

Pull Requests

Last week, no pull-requests were opened, closed or merged.

Releases

Last week there were no releases.

Contributors

Last week there were no contributors.

Star Gazers

Last week there were no stargazers.


That's all activities since Mon, Jul 29, 2019 12:00 AM, please Watch and Star the repository ArkEcosystem/go-client to receive upcoming weekly updates.

You can also view all Weekly Digests by clicking here.

[Weekly Digest] Jan 28, 2019 - Feb 3, 2019

Here's the Weekly Digest from Mon, Jan 28, 2019 12:00 AM to Sun, Feb 3, 2019 11:59 PM for ArkEcosystem/go-client.

Issues

Last week there was 1 issue. It is still open.

Opened

@tsunghan5566

Pull Requests

Last week, no pull-requests were opened, closed or merged.

Releases

Last week there were no releases.

Contributors

Last week there were no contributors.

@

Star Gazers

Last week there were no stargazers.


That's all activities since Mon, Jan 28, 2019 12:00 AM, please Watch and Star the repository ArkEcosystem/go-client to receive upcoming weekly updates.

You can also view all Weekly Digests by clicking here.

Add Microsoft Visual Studio support

Is your feature request related to a problem? Please describe.
When doing development under Microsoft Visual Studio, the .vs directory is being picked up by git.

Describe the solution you'd like
I would like the .vs directory to be added to the .gitignore file.

Describe alternatives you've considered
The only alternative is to always unstage the .vs directory "changes".

Additional context
While the Go compiler is not easily integrated into Microsoft Visual Studio v. VSCode, the text editing and git integration make it worth supporting.

[Weekly Digest] Jun 17, 2019 - Jun 23, 2019

Here's the Weekly Digest from Mon, Jun 17, 2019 12:00 AM to Sun, Jun 23, 2019 11:59 PM for ArkEcosystem/go-client.

Issues

Last week there were 2 issues. Of these, 2 issues have been closed and 0 issues are still open.

Closed

@ArkEcosystemBot

Pull Requests

Last week, no pull-requests were opened, closed or merged.

Releases

Last week there were no releases.

Contributors

Last week there were no contributors.

Star Gazers

Last week there were no stargazers.


That's all activities since Mon, Jun 17, 2019 12:00 AM, please Watch and Star the repository ArkEcosystem/go-client to receive upcoming weekly updates.

You can also view all Weekly Digests by clicking here.

[Weekly Digest] Oct 28, 2019 - Nov 3, 2019

Here's the Weekly Digest from Mon, Oct 28, 2019 12:00 AM to Sun, Nov 3, 2019 11:59 PM for ArkEcosystem/go-client.

Issues

Last week there were no issues.

Pull Requests

Last week, 3 pull-requests were opened, closed or merged.

Opened

Last week, 2 pull-requests were opened.

@dated

Closed

Last week, 1 pull-request was closed.

@dated

Releases

Last week there were no releases.

Contributors

Last week there was 1 contributor.

@dated

Thank you for your contribution! ๐ŸŽ‰

Star Gazers

Last week there were no stargazers.


That's all activities since Mon, Oct 28, 2019 12:00 AM, please Watch and Star the repository ArkEcosystem/go-client to receive upcoming weekly updates.

You can also view all Weekly Digests by clicking here.

can't marshal block payload.length at height 7211276

Describe the bug
go-client can't marshal blocks at height 7211276, the type payload.length is byte, but the length is 4800

To Reproduce

import arkClient "github.com/ArkEcosystem/go-client/client
type arkAPIRes struct {
	Data []arkClient.Block `json:"data"`
}
        var (
		err      error
		repBlock arkAPIReq
		resBlock arkAPIRes
	)

	repBlock.Height.From = height
	repBlock.Height.To = height

	reqJSON, _ := json.Marshal(repBlock)
	buf := bytes.NewBuffer(reqJSON)

	req, err := http.NewRequest("POST", a.apiEndpoint+"/api/blocks/search", buf)
	if err != nil {
		return nil, err
	}

	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("API-Version", "2")
	fmt.Println(req)
	c := http.DefaultClient
	resp, err := c.Do(req.WithContext(ctx))
	if err != nil {
		return nil, err
	}

	respBody, err := ioutil.ReadAll(resp.Body)
	defer resp.Body.Close()
	if err != nil {
		return nil, err
	}
	fmt.Println(string(respBody))
	err = json.Unmarshal(respBody, &resBlock)
	if err != nil {
		return nil, err
	}
  1. Set height to 7211726, then execute it

Expected behavior
should successfully marshal information into block

Screenshots
2019-01-30 7 08 46

[Weekly Digest] May 6, 2019 - May 12, 2019

Here's the Weekly Digest from Mon, May 6, 2019 12:00 AM to Sun, May 12, 2019 11:59 PM for ArkEcosystem/go-client.

Issues

Last week there were 2 issues. Of these, 2 issues have been closed and 0 issues are still open.

Closed

@ArkEcosystemBot

Pull Requests

Last week, 1 pull-request was opened, closed or merged.

Merged

Last week, 1 pull-request was merged.

@dated

Releases

Last week there were no releases.

Contributors

Last week there was 1 contributor.

@dated

Thank you for your contribution! ๐ŸŽ‰

Star Gazers

Last week there were no stargazers.


That's all activities since Mon, May 6, 2019 12:00 AM, please Watch and Star the repository ArkEcosystem/go-client to receive upcoming weekly updates.

You can also view all Weekly Digests by clicking here.

pagecount panicking while unmarshalling.

Describe the bug
A clear and concise description of what the bug is.
Meta.PageCount overflows when Pagination is set to 1.

To Reproduce
Steps to reproduce the behavior:

  1. run
   blocks, _, err := client.Blocks.List(ctx, &ark.Pagination{Limit: 1})
   fmt.Println(err)

this produces:
"json: cannot unmarshal number 6955186 into Go struct field Meta.PageCount of type uint16"

Pagecount of uint16 seems too low for the current pagination sizes, I reckon we should up it to uint32

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.