sdk

package module
v0.0.0-...-f3b97d8 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2019 License: Apache-2.0 Imports: 0 Imported by: 0

README

nem2-sdk-go

nem2-sdk-go is a Golang client library for Catapult API

Usage

import "github.com/proximax-storage/nem2-sdk-go/sdk"

Create a Catapult network configuration

Using the Testnet network

conf, err := sdk.NewConfig("http://localhost:3000",sdk.Testnet)

Or using the Mainnet network

conf, err := sdk.NewConfig("http://localhost:3000",sdk.Mainnet)

Construct a new Catapult client

client := sdk.NewClient(nil, conf)

Using the client to call a method from a Service API

// Get the chain height
chainHeight, err := client.Blockchain.GetChainHeight(context.Background())

Context

A Context type is the first argument in any service method for specifying deadlines, cancelation signals, and other request-scoped values

// Get the chain height
chainHeight, err := client.Blockchain.GetChainHeight(context.Background())

Wiki / Examples

Examples are in the examples folder

For more examples, go to our wiki

Core Contributors

Contribution

We'd love to get more people involved in the project. Please feel free to raise any issues or PR and we'll review your contribution.

Copyright (c) 2018 ProximaX Limited

Documentation

Overview

Package sdk is the Catapult SDK created by the ProximaX team for the Go Programming Language

Directories

Path Synopsis
examples
Package sdk provides a client library for the Catapult REST API.
Package sdk provides a client library for the Catapult REST API.

Jump to

Keyboard shortcuts

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