Git Product home page Git Product logo

perun-eth-mobile's Introduction

Perun mobile bindings

This project provides Android bindings for go-perun called prnm.
Right now, it supports two-party single-asset ledger payment channels.

Security Disclaimer

The authors take no responsibility for any loss of digital assets or other damage caused by the use of this software.
Do not use this software with real funds.

Getting Started

# Install gomobile, see https://godoc.org/golang.org/x/mobile/cmd/gomobile
go get golang.org/x/mobile/cmd/gomobile
gomobile init
# Get perun-eth-mobile
git clone https://github.com/perun-network/perun-eth-mobile
# Generate the bindings
cd perun-eth-mobile
gomobile bind -o android/app/prnm.aar -target=android

The android/ folder is an Android Studio Project, the only two important files are:

  • android/app/src/main/java/network/perun/app/MainActivity.java contains the Apps logic, exemplifying the use of go-perun.
    The MainActivity uses a Node to propose and accept payment channels. The Node is started with a prnm.Config which contains all needed configuration for the underlying prnm.Client. Its contructor creates a ProposalHandler that accepts all incomming channel proposals and forwards the new channels to Node.accept. Node.accept then starts two threads; one with an UpdateHandler that accepts all updates and one as on-chain watcher that reacts to disputes and settling. To propose a channel, Node.propose can be used.
  • android/app/src/main/AndroidManifest.xml lists the needed App permissions; INTERNET,ACCESS_NETWORK_STATE,WRITE_EXTERNAL_STORAGE,READ_EXTERNAL_STORAGE

After importing the android/ folder in Android Studio, run it in the Emulator or on a real phone.
The opposite party can be either also an App, or a perun-eth-demo-node.

Copyright

Copyright © 2020 Chair of Applied Cryptography, Technische Universität Darmstadt, Germany. All rights reserved. Use of the source code is governed by the Apache 2.0 license that can be found in the LICENSE file.

Contact us at [email protected].

perun-eth-mobile's People

Contributors

ggwpez avatar sebastianst avatar cryptphil avatar niiigoo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.