Closed patrickdugan closed 4 years ago
Let's make it just getchannel_info like this:
{ channelAddress: 3Q2i3ssGWstW... firstFundingAddress: 1W7xoOPpslLke... secondFundingAddress: 1uTqwe234as firstAddressReserves: [{propertyid: 4, amount:231}] secondAddressReserves: [{propertyid:5, amount:23.1}] }
A note, we may need to add some logic related with the concept of a specific address A and B. If a tx comes first, it's address A, a contract trade can implied to be either a 'buy' to address A buying from address B, or a 'sell' from address A to address B, for tokens it's just the two property ids and the first one is implied to be the trade consideration for address A. Then therefore, to handle commits from new addresses, we don't know who really controls it, maybe it's best if commits from new addresses are invalid tx. Simpler that way.
Closing this as these RPCs are already extand in the higher part of rpc.cpp
Couldn't find in RPC.cpp any functions to make these two calls work. Both should take the channel address as a parameter and return the relevant data.