iotex-antenna-go

module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2019 License: Apache-2.0

README

iotex-antenna-go

CircleCI Go version LICENSE

Welcome to the official Go implementation of IoTeX Golang SDK! IoTeX is building the next generation of the decentralized network for IoT powered by scalability- and privacy-centric blockchains. Please refer to IoTeX whitepaper for details.

Get started

Minimum requirements
Components Version Description
Golang ≥ 1.11.5 Go programming language
Dep ≥ 0.5.0 Dependency management tool, required only when you update dependencies
Add to your project
// dep
dep ensure -add github.com/iotexproject/iotex-antenna-go

// go mod
go get github.com/iotexproject/iotex-antenna-go
Sample
package main

import (
	"log"

	"github.com/iotexproject/iotex-antenna-go/antenna"
)

const (
	host = "api.testnet.iotex.one:80"
)

func main() {
	antenna, err := antenna.NewAntenna(host)

	if err != nil {
		log.Fatalf("New antenna error: %v", err)
	}

	// Add account by private key
	antenna.Iotx.Accounts.PrivateKeyToAccount("...")

	// transfer
	antenna.Iotx.SendTransfer(...)

	// deploy contract
	antenna.Iotx.DeployContract(...)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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