how to issue more asset when exchange?

+2 votes
I want to issue more asset in exchange transaction.

But i didn't know how can do it by exchange api (eg. preparelockunspentfrom, createrawexchange, appendrawexchange), or i should write a custom api?

If I should write a custom api, how can I start?
asked Oct 14, 2017 by woei

1 Answer

+1 vote
 
Best answer

The way to do this depends on the scenario, so some questions:

  1. Is the asset being issued by one side in addition to providing an existing asset?
  2. Who is issuing the asset – the offering side or the accepting side?
  3. Is the issuance a condition of the exchange or just added on top?

In general you have a couple of approaches:

  • Either use appendrawtransaction to add the issuance into the transaction after the exchange is balanced (using appendrawexchange rather that completerawexchange).
  • Or include the asset units to be issued inside the offer/ask itself.
answered Oct 16, 2017 by MultiChain
selected Oct 17, 2017 by woei
ok! I get it.
Thank you!
...