aepp-sdk-go

command module
v8.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: ISC Imports: 1 Imported by: 0

README

aepp-sdk-go

Go Report Card GoDoc

golang sdk for aeternity blockchain

Setup

go get github.com/aeternity/aepp-sdk-go

If your project uses Go Modules (go.mod, go.sum files), you must include the major version in the import line like this: import github.com/aepp-sdk-go/v8/aeternity

If your project won't use Go Modules (no go.mod, go.sum files), ensure your $GOPATH/src/github.com/aeternity/aepp-sdk-go is on the correct branch. Then your import should be: import github.com/aepp-sdk-go/aeternity

Contextual Knowledge

Every transaction submitted to a node needs a nonce (to ensure its uniqueness), a TTL (how long, in blocks, should the transaction stay in the mempool). Signing a transaction includes the NetworkID as well, so a transaction meant for ae_uat (testnet) won't make it onto ae_mainnet (mainnet). The SDK communicates with the node and/or Sophia compiler over a HTTP REST API to find the current account nonce/current height/broadcast the transaction etc.

In short, creating a transaction always follows this pattern:

  1. Find the account nonce, get the transaction TTL (in blocks)
  2. Make the transaction
  3. Sign the transaction with a given network ID
  4. Broadcast it to a node of your choosing

Where to find examples

All examples are in godoc.org, except the integration tests. General workflow code examples are in package aeternity, or check out the integration tests in package integration_test Account, HD wallet management in package account etc.

Where to ask for help

aeternity forum rocketchat

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package account contains code for managing account keypairs, generating a HD wallet as well as saving them securely to disk.
Package account contains code for managing account keypairs, generating a HD wallet as well as saving them securely to disk.
Package aeternity is the SDK user-facing code, e.g.
Package aeternity is the SDK user-facing code, e.g.
Package binary contains hashing/base encoding code shared throughout the codebase.
Package binary contains hashing/base encoding code shared throughout the codebase.
Package models holds Go-native structs that are not Transactions.
Package models holds Go-native structs that are not Transactions.
Package naet represents a connection to a Node or Compiler.
Package naet represents a connection to a Node or Compiler.
swagguard
Package transactions contains Go-native Tx structs and related code around Transactions.
Package transactions contains Go-native Tx structs and related code around Transactions.

Jump to

Keyboard shortcuts

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