can we limit the time and who be able the address we wanted to do Atomic exchange with ?

+2 votes
Is it possible to set the time limit for atomic exchange in multichain ? e.g during creating raw tx, specify the duration of expiration time for an exchange, if the other party is not showing up, the  fund should go back to owner or the exchange is become disable.

Also can we limit the address (or set permission for each atomic exchange, like a rule who can do exchange from whom address) that can do the atomic exchange with during creating the raw transaction ? e.g when we create raw tx, can we specify the address who be able to do the exchange with only.

 

if not possible is there any way to achieve such thing ?

Thank you.
asked Dec 19, 2017 by veyhong

1 Answer

0 votes

It's not currently possible to offer an exchange with a fixed time limit. However the offering party can cancel the exchange offer at any time (if it has not yet been accepted) using the disablerawtransaction API. This performs a double-spend against one of the exchange inputs, rendering it unusable.

It is possible to specify that the exchange is performed with a particular party, if you go via the raw transaction route. You would use createrawtransaction to create a transaction that spends the output created by preparelockunspent, and add two outputs – one going to the other party with the offered assets, and one going back to you with the desired assets. Then sign this transaction with ALL|ANYONECANPAY in the last parameter of signrawtransaction, which locks the outputs but allows another input to be added.

This transaction is then passed to the other side, and they would verify its contents using decoderawtransaction, add their input only using appendrawtransaction (containing the assets asked for), then sign the whole thing with signrawtransaction and broadcast it using sendrawtransaction.

answered Dec 19, 2017 by MultiChain
Option  ALL | ANYONECANPAY will enable anyone can pay ?
Yes, if used with signrawtransaction.
But I wanted to limited only specific address. is it possible?
Yes, that is already explained in the answer above.
Okay Thank you, BTW, is multichain team have slack or telegram or any communication channel that I can seek support instantly ?
No I'm afraid we don't have that.
...