question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for payment codes (bip47)

See original GitHub issue

@cculianu and I had a short conversation and I promised to put the details here.

Related:

Basically it allows creation of a private channel between two seeds with one notification transaction that happens in the clear (but does not reveal the identity of the sending party). The way the standard is written is to bolt the bip47 features onto any bip44 wallet by deriving a parallel bip32 branch from the same seed. Then if a wallet adds support for payment codes, you basically get payment code functionality for free on all of your bip44 wallets. It can also apply to non-bip44 wallets although it would require some custom alignment between the two.

This is one idea of how it could be incorporated if EC decides payment codes are a good idea.

(note: In my opinion, the multi-wallet changes required below would be a higher priority than the payment code)

Concept

  • EC notices a wallet is bip44, maybe by assuming that m/44'/x'/i' wallets are bip44
  • EC watches the parallel bip47 branch for notification transactions (one notification transaction is required to setup the secret channel).
  • The secret wallet becomes available as a separate element in EC, perhaps a new tab for secret wallets. The secret wallet is defined by the pair of payment codes so that would be its unique identity (see below for UX features that would make it user friendly).
  • The separate wallet is only for sending to the counterparty so I guess it would need a somewhat different interface for transactions.
  • Because this is privacy focused, a lot of care needs to be taken to follow the protocol when working on the 47' path. Probably other places too.

UX bonuses

  • EC checks with a cashaccount indexer to see if this account already has a payment code registered. If so, it picks that up and uses it as the identity for the users’s side of any secret channels. (it could have several for a given payment code, so maybe let the user choose an identity for each payment code).
  • If there is not already an identity, EC offers to go register one for the user. Provide a name and it gets registered on the next block. Having the parallel bip47 branch is what allows EC to make the payment code.
  • If EC picks up any notification transactions on the payment code, it does the lookup for the other side’s identity. The receiver can know the other side’s payment code / identity through the notification transaction, but the world cannot. Neat.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
imaginaryusernamecommented, Apr 9, 2022

I don’t exactly oppose BIP47 if progress on RPA is deemed too sluggish to continue - I like RPA more and think it solves a few more problems BIP47 doesn’t (I wrote the specs, duh), but am not gonna stand in way of progress of some form of reusable address. I guess since @fyookball is spearheading the implementation it’s up to him to assess the prospects of RPA in the near future.

1reaction
cculianucommented, Jan 30, 2019

Thanks for putting this together.

I like this idea but the real implementation will of course be extensive. It would require Electron Cash to do what no wallet has done before: fully implement BIP47 derivation paths… and monitor something on an alternate path. Would be cool to have, for sure. 😃

We’ll leave this open and on the table, of course.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reusable Payment Codes For Bitcoin Privacy
The beauty of the BDK team adding BIP47 support is that it should make it easier for a number of wallets to implement...
Read more >
BIP47: Reusable Payment Codes for Hierarchical ... - Medium
The key thing to remember is that these payment codes can be reused for every transaction without harming privacy, as the coins are...
Read more >
BIP 0047 - Bitcoin Wiki
Payment codes add identity information to transactions which is useful in a merchant-customer interaction while protecting the privacy of users.
Read more >
BIP47 payment codes for private donations (PayNym ... - GitHub
The goal of a reusable donation address is great, but BIP47 is a bad way to do it. Recommend against implementing.
Read more >
PayNyms 101 - Bitcoiner Guide | Articles
What are PayNyms? 'PayNym' is the Samourai Wallet implementation of BIP47 defined 'Reusable Payment Codes' by Justus Ranvier. A reusable payment code is ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found