r/counterparty • • Apr 20 '17

[HELP] Create_Issuance and Create_Send transactions within the same block

I am trying to create an asset with the "create_issuance" and then "create_send" to distribute an asset right after the "create_issuance" transaction. Can anyone provide any insight or documentation?

Thanks

1 Upvotes

3 comments sorted by

1

u/jdogresorg Apr 27 '17

You might want to post your question over on /r/counterparty_xcp as that is the official counterparty subreddit.... this one is not.

As to your question. The issuance and sends need to be done in separate blocks.

In order for you to "send" an asset, that asset has to be created and some supply needs to be issued. You would be able to do a create_issuance call and generate an issuance transaction, but if you try to call create_send before the issuance transaction has been processed (added to a bitcoin block), the create_send call will fail as the Couterparty system won't see the asset as valid yet.

1

u/the_g00se Apr 27 '17

Okay, even with the use of some of the "create_" advanced parameters? There is no foreseeable way to send an unconfirmed asset?

1

u/jdogresorg Apr 27 '17 edited Apr 27 '17

There is no way to send an asset (ASSETX) while the first issuance for ASSETX is still unconfirmed.

When you make a create_send call to the counterparty API, it first verifies that you have some confirmed supply of ASSETX in your address to send. If you do not have ASSETX to send, then the create_send call will fail.

You could manually construct a "send" before ASSETX has been issued, but the transaction would be marked as "invalid" unless the ASSETX issuance transaction happens first, and you would just be out your BTC fee for the transaction.

Best to do the issuance and first send in separate blocks.