photon-sdk / photon-lib

A high level library for building bitcoin wallets with react native
https://docs.photonsdk.org
MIT License
53 stars 12 forks source link

Question: Interoperability with bitcoin lightning wallets #5

Open bitcoinuser opened 4 years ago

bitcoinuser commented 4 years ago

Hi,

Is it possible with this technology someone create an app that just store a seed encrypted with 2fa on Google Drive or ICloud and this app can have interoperability with other bitcoin lightning wallets? So for example: I install this "app", then I install Phoenix bitcoin lightning wallet, so on Phoenix when I click to restore or import wallet, will ask me permission to read my Google Drive account to see if exist any file of bitcoin lightning that can be used.

The app to store the seed on Google Drive will be a (Identity app) that could be used to "restore" lightning wallets and could be used too to login on sites with Lnurl technology.

Obs, maybe could have problems of the two apps be running on the same time and force close channels, but maybe already exist a feature on Mobile OS that automatically close an app when we try to open another one?

tanx commented 4 years ago

Hey @bitcoinuser, thanks for reaching out.

Is it possible with this technology someone create an app that just store a seed encrypted with 2fa on Google Drive or ICloud and this app can have interoperability with other bitcoin lightning wallets? So for example: I install this "app", then I install Phoenix bitcoin lightning wallet, so on Phoenix when I click to restore or import wallet, will ask me permission to read my Google Drive account to see if exist any file of bitcoin lightning that can be used.

That's actually a great idea that I haven't thought of. We could standardize the data format in a bip and enable cross wallet backup this way.

The app to store the seed on Google Drive will be a (Identity app) that could be used to "restore" lightning wallets and could be used too to login on sites with Lnurl technology.

Not sure I completely understand this use case yet. The lightning wallet would be used as an identity provider?

Obs, maybe could have problems of the two apps be running on the same time and force close channels, but maybe already exist a feature on Mobile OS that automatically close an app when we try to open another one?

If channel state were synced between devices, there would have to be some type of locking mechanism or mutex to give only one wallet write access at a time. This wouldn't be trivial but seems possible to standardize in a bip too.

bitcoinuser commented 4 years ago

Not sure I completely understand this use case yet. The lightning wallet would be used as an identity provider?

I mean just an idea of an app that it's not a lightning wallet because some people could want to use the Lnurl-auth just to login on sites, for example https://lnmarkets.com/. So the data stored on Google drive from this "Identity app" could be used on lightning wallets too.

That's actually a great idea that I haven't thought of. We could standardize the data format in a bip and enable cross wallet backup this way.

Amazing if this happen

If channel state were synced between devices, there would have to be some type of locking mechanism or mutex to give only one wallet write access at a time. This wouldn't be trivial but seems possible to standardize in a bip too.

Great.

bitcoinuser commented 4 years ago

`That's actually a great idea that I haven't thought of. We could standardize the data format in a bip and enable cross wallet backup this way.

Do you think this is secure? some people say an app backup on google drive should never be able to be accessed by other apps. Maybe google drive has an API to when other app try to access a backup created by original app, a message on original app appear to deny or allow the other app to access the backup?

bitcoinuser commented 4 years ago

One thing that I think will gain popularity is login on sites using LNURL-AUTH. Phoenix wallet is already implementing this as you can see here: https://github.com/ACINQ/phoenix/pull/74. I think people will want to use the same identity on different wallets, so I think have interoperability to this is very important.