Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added experimental Android payment channel support #306

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

w-shackleton
Copy link
Contributor

I've added experimental payment channel support to Bitcoin Wallet.

This works by exposing an Android service that other apps may connect to using the provided AIDL interface. This can be used to create channels in both directions, and for channels that spend Bitcoin wallet's money, dialog boxes are displayed confirming that the user wants to spend that money. I've also included a set of demos that show how such integration might work. In a real-world scenario the app that talks to the service (game, etc) should use a server-side bitcoinj instance and then forward messages from the Bitcoin Wallet service to its remote server, but that's too implementation specific to cover in a demo app.

This feature is disabled by default, and can be enabled in settings.

This code requires the master version of bitcoinj currently (there's code in bitcoinj master not yet in 0.13.5 etc) so there are three commits on the beginning that need to be removed before merge that tell gradle to find bitcoinj-0.14-SNAPSHOT in the maven local repo.

Created interfaces for channels flowing in both directions

Added PaymentChannelService exported service for initiating payment channels

Filled implementation of PaymentChannelServerInstanceBinder

Added base client implementation for payment channel service

Added interface to Android remote service for minimal service communication
…only available when linked with bitcoinj

Added PaymentChannelClientAndroidConnection class that mirrors PaymentChannelClientConnection, but communicates with a wallet over an Android service

Added PaymentChannelServerAndroidConnection, to accept money from a wallet by Android service

Implemented remote server event handler and close semantics across connection
Added UI for creating payment channel from wallet
…dded debug lines to message send / receive

Added required extensions to Wallet for payment channels
Got channel confirm dialog working

Added channel settling

Added payment increment dialogue

Cleaned up incorrect password boundary cases

Fixed a couple of functional issues with channels
Switched payment channel task from looper to queue to avoid thread reuse issues
Improved stability of demos

Improved semantics around double-requesting increments

Removed unused field from demo client
This is fine because this is an entirely new platform - there's no
legacy code that we'll have to interact with.

Got payments working to wallet
@bitcoin-wallet bitcoin-wallet deleted a comment from acong888 Jan 21, 2018
@rafiq33
Copy link

rafiq33 commented Mar 17, 2018

I want to add btc my coinbase

@bitcoin-wallet bitcoin-wallet deleted a comment Jul 31, 2018
@bitcoin-wallet bitcoin-wallet deleted a comment Jul 31, 2018
@bitcoin-wallet bitcoin-wallet deleted a comment from acong888 Aug 14, 2018
@bitcoin-wallet bitcoin-wallet deleted a comment from acong888 Aug 14, 2018
@bitcoin-wallet bitcoin-wallet deleted a comment from Pipat9924 Aug 14, 2018
@bitcoin-wallet bitcoin-wallet locked and limited conversation to collaborators Aug 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants