neo-go-sdk

command module
v0.0.0-...-3f353b6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2018 License: MIT Imports: 4 Imported by: 0

README

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

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
neo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL