phonon-client

module
v0.1.0-testnet Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: MPL-2.0

README

Phonon Logo Mozilla Public 2.0 License Go Programming Language

Come see us

Reddit Twitter

DiscordDiscord

Phonon-client Alpha

phonon-client is a library, user interface, and set of utilities for interacting with phonon cards and the phonon network as a whole. This library can be cloned and used directly, or prebuilt binaries are available for the latest master under the releases page.

Usage

This client can be used in multiple ways depending on your goals.

For general interactive use the repl (Read Eval Print Loop) is the most user friendly and fleshed out interface. It can be opened like so

go run main/phonon.go repl
help

Calling help will provide the complete list of available commands

For quickly testing changes or performing simple one off operations the cmd interface is preferable. Available commands can be brought up by running the below.

go run main/phonon.go

Commands are then called like so:

go run main/phonon.go init

For users interested in integrating phonon library code into applications, building new user interfaces, or generally interfacing with phonon cards programmatically, the primary interface to be concerned with is PhononCard in model/card.go. This describes the full set of commands which the phonon javacard applet is capable of processing. The actual card implementation is under card/phononCommandSet.go. There is a mostly complete mock implementation of the javacard applet which can be used in testing under card/mockCard.go

Initialization

A new phonon card must have a certificate installed and a pin initialized in order to be able to perform most functions. A new development phonon card can be set up after the applet is installed by running the following two commands. These are available from within the repl as well if preferred.

go run main/phonon.go installCardCert -d
go run main/phonon.go init

Building

Requirements:

  • a go compiler
  • a c compiler for whatever architecture you are compiling for
  • the go stringer tool

Dependencies

A recent version of golang, up to date requirement given in the go.mod file. (1.16 as of this writing.)

The go stringer tool, which generates human readable strings based on constant variable names for display and data exchange purposes. Install with:

go install golang.org/x/tools/cmd/stringer@latest

Ensure that your go/bin folder is set in your system's $PATH variable

export PATH=$PATH:`go env GOPATH`/bin

It's recommended to set this variable in your shell profile to make this value persist in new sessions.

Process

Build for your local machine architecture

make build

Build for windows x86

make build-windows

note: for windows compilation from mac or linux, you will need to install mingw-64 from your favorite package manager

License

The source code files in this repository are license under the terms of the Mozilla Public License 2.0

Directories

Path Synopsis
remote
v1

Jump to

Keyboard shortcuts

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