I just read bitcoinJ's working with contracts tutorial and I am puzzled as:

  1. it seems to me that n-m addresses are implemented in Bitcoinj using plain multisig (as defined in this bit of the developer's guide, and discussed here)

  2. I looked for implementations of addresses controlled by more than one private key with pybitcointools (tutorial on that here) and on libbitcoin's wiki. It seems to me that these two libraries use P2SH.

Most libraries seem to use P2SH, but bitcoinJ chose the other way it seems (or is it?)...

In an implementation of micropayment channel with bitcoinJ on one side and, say, libbitcoin on the other ; will the two sides be able to interoperate?

(edit: I m talking here only about unidirectional payment channels)


1 Answer 1


Not necessarily interoperable.

Firstly, libraries have to agree on what kind of parameters to exchange and how they are exchanged. There's no guarantee that the parameters required by bitcoinj and libbitcoin are the same.

Secondly, it is now considered standard practice to create P2SH transactions regardless of what kind of transaction you're setting up, unless it is P2PKH. In the case of P2SH transactions, you then have to assert that the payment channel protocol would also be able to parse/recognise/understand the redeem script provided by service provider of the payment channel (assuming that you're talking about a single-direction payment channel).

  • Thx for this answer. With regard to your bit on the parameters required by each library...: is it correct to say that there is a standard in terms of the transaction protocol itself (viz. what on bitcoin.org) but not for its implementation into APIs by libraries? Isn't it a significant issue for a p2p network like Bitcoin where nodes cannot be expected to use the same clients?
    – hartmut
    Jul 12, 2016 at 19:43
  • To my knowledge, I am not aware of a standard for payment channels. I do recall however seeing an attempt in the bitcoin-dev email to formalise a standard for payment channels, but I've yet see it written in the form of a BIP yet. On top of that, Payment Channels is more of an application layer protocol on top of Bitcoin, therefore it is not consensus critical.
    – rny
    Jul 12, 2016 at 21:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.