Giter Site home page Giter Site logo

alvincrisuy / swiftlightning Goto Github PK

View Code? Open in Web Editor NEW

This project forked from biscottigelato/swiftlightning

0.0 2.0 0.0 8.21 MB

Lightning Network mobile wallet built on top of LND. Written in native Swift for iOS.

Home Page: https://swiftlightning.io

License: GNU General Public License v3.0

Shell 0.05% Ruby 0.06% Swift 99.85% Objective-C 0.03%

swiftlightning's Introduction

Swift Lightning Project Logo

SwiftLightning

A Lightning Network light wallet implementation on native iOS using Swift

SwiftLightning is a work-in-progress codename for a Lightning Network light wallet implementation based on the open sourced LND - Lightning Network Daemon. This project is written in native Swift for iOS. By being an early implementation of a mobile Lighting wallet, it is hoped that SwiftLightning can act as a test harness to help accelerate LND's features and reliability for iOS.

Getting Started

Tools & Pre-requisites

The Go (lang) toolchain, including Go Dep and Gomobile, along with the Google Protocol Buffer Compiler are required. This is in addition to of course the Xcode toolchain on MacOS. You can get these tools respectively at

Go from https://golang.org/

Go Dep from https://github.com/golang/dep

Gomobile from https://github.com/golang/go/wiki/Mobile

Protoc from https://github.com/google/protobuf

Building LND with mobile support

A LND branch with support for direct functional bindings is required to build SwiftLighting. An example of that can be found at https://github.com/biscottigelato/lnd/tree/mobile-tip. Assuming that the Go toolchain is properly installed, here is an example of how one can checkout this particular branch.

First, use 'go get' to retrieve master of LND

$ go get -d github.com/lightningnetwork/lnd

Under your $GOPATH where lnd was retrieved, you can change the remote to point to a particular branch by

$ git remote add biscottigelato https://github.com/biscottigelato/lnd

Finally, checkout the mobile support branch

$ git checkout -b mobile-tip biscottigelato/mobile-tip

You should be able to generate Lndmobile.framework with mobile support branch by just executing

$ ./lnd/mobile/dep ensure
$ ./lnd/mobile/build_mobile.sh

Lndmobile.framework should then be found under /lnd/mobile/build/ios/. Please see the LND Github page for other details regarding LND. Once Lndmobile.framework is generated, copy it to /SwiftLightning/ios/Lndmobile.framework.

Build & Install

Make sure Lndmobile.framework is placed under /SwiftLightning/ios/

Install all Cocoapod dependencies

$ cd ios
$ pod install

Start Xcode!

$ xcode ios/SwiftLightning.xcworkspace

Reconverting LND .proto files into Swift

If there are changes to the LND .proto files, you might need to regenerate the Swift proto bindings.

Install Swift Protobuf

$ brew install swift-protobuf

Install Swift GRPC. The following sometimes doesn't work. So follow the instructions on the Swift GRPC Github for the most accurate instructions

$ git clone https://www.github.com/grpc/grpc-swift
make install

You will need to have LND in your GOPATH for this script to work

$ ./gen_protos.sh

swiftlightning's People

Contributors

biscottigelato avatar sjors avatar

Watchers

Alvin Cris Uy avatar  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.