sdk

package module
v0.0.0-...-79c6f9a Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2018 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.LoadTestnetConfig("http://localhost:3000")

Or using the Mainnet network

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

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, resp, 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, resp, 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