dvotemobile

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

README

Mobile bindings

Native bindings for iOS and Android.

This repo currently relies on GO PATH. This may change as soon as gomobile and gobind implement support for GO MODULES.

A few dependencies can't rely on the canonical implementation of go-ethereum, since some of its components rely on MacOS-only libraries that will not compile for iOS.

Such dependencies are replicated on the vendor folder and belong to the dvotemobile_vendor package.

Get started

Install gomobile and gobind on your $GOPATH or run make init

See makefile:

$ make
Available actions:

  $ make           Runs 'make info' by default
  $ make info      Shows this text
  $ make init      Install the dependencies

  $ make ios       Generate the iOS library
  $ make android   Generate the Android library
  $ make all       Generate iOS and Android libraries
  $ make export    Package the libraries

Manual generation

iOS
$ gomobile bind -target ios github.com/vocdoni/go-dvote-mobile
$ ls build/Dvote.framework
Android
$ gomobile bind -target android github.com/vocdoni/go-dvote-mobile
$ ls build/dvote.aar

Documentation

Overview

Package dvotemobile allows iOS and Android apps to interact with the DVote ecosystem

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateMnemonic

func GenerateMnemonic(size int) (string, error)

GenerateMnemonic generates a random BIP39 mnemonic of the given size (128-256)

func MnemonicToAddress

func MnemonicToAddress(mnemonic string, hdPath string) (string, error)

MnemonicToAddress computes the address for the given mnemonic and HD path

func MnemonicToPrivateKey

func MnemonicToPrivateKey(mnemonic string, hdPath string) (string, error)

MnemonicToPrivateKey computes the private key for the given mnemonic and HD path

func MnemonicToPublicKey

func MnemonicToPublicKey(mnemonic string, hdPath string) (string, error)

MnemonicToPublicKey computes the public key for the given mnemonic and HD path

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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