Giter Club home page Giter Club logo

neo-go-sdk's Introduction

neo-go-sdk

Golang SDK for the NEO blockchain.

What?

  • Client for interacting with a node on the NEO blockchain.
  • Retrieve data and send actions.
  • Fully tested Golang package.
  • Aimed to help other developers build applications for the NEO ecosystem.
  • Written using the standard library, without 3rd party packages.

Quick Start

go get github.com/CityOfZion/neo-go-sdk
package main

import (
  "log"

  "github.com/CityOfZion/neo-go-sdk/neo"
)

func main() {
  nodeURI := "http://test1.cityofzion.io:8880"
  client := neo.NewClient(nodeURI)

  ok := client.Ping()
  if !ok {
    log.Fatal("Unable to connect to NEO node")
  }

  block, err := client.GetBlockByHash(
    "3f0b498c0d57f73c674a1e28045f5e9a0991f9dac214076fadb5e6bafd546170",
  )
  if err != nil {
    log.Fatal(err)
  }

  log.Printf("Block found, index is: %d", block.Index)
}

Examples

See GoDoc for full documentation.

CLI

https://res.cloudinary.com/vidsy/image/upload/v1506873093/Oct-01-2017_16-50-54_j4j3hp.gif

Debugging a NEO public and private key pair is a common task when interacting with the blockchain. Make use of the neo-go-sdk CLI to help with this process:

./neo-go-sdk --wif KxQREAjBL6Ga8dw9rPN45pwoZ5dxhAQacEajQke6qmpB7DW6nAWE

This will output the full details about the key pair. See releases to download the CLI.

Help

  • Open a new issue if you encountered a problem.
  • Or ping @revett on the NEO Slack.
  • Submitting PRs to the project is always welcome! ๐ŸŽ‰
  • Check the Changelog for recent changes.

License

neo-go-sdk's People

Contributors

alexanderbez avatar canesin avatar eramus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neo-go-sdk's Issues

Reverse byte array from GetStorage RPC

Problem

GetStorage RPC call returns a hex encoded string which has been reversed.

Solution

Reverse the string before returning it.

Then let the consuming application decode the hex string to the desired format (decimal, string etc).

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.