Working with native assets

+1 vote
As far as I understand, MultiChain is built in order to work with the native assets which can be allocated, sent, received and exchanged. After executing commands from the "Getting Started" tutorial balances on both nodes are changed (getassetbalances), which is great. However I'd like to see particular transactions were made and blocks where the related transactions are held.

(getbalance) method gives me 0.0 and listtransactions gives me list of 0.0 transactions which were made somehow in frame of the 1 block. So as I believe those methods are not related to the "native assets".

- how can I see list of transactions in frame of the native assets?

- how can I work with money (issue and send) in order to see that getbalance non 0.0 result?
asked Sep 7, 2015 by anonymous

1 Answer

+1 vote

If you want to see the transactions in a particular block, use:

multichain-cli [chain-name] getblockhash [block-number]

That gives you the hash of the block in question. Then run:

multichain-cli [chain-name] getblock [block-hash]

Included in the tx field of the output will be a list of transaction IDs inside that block.

If you want to see the information on a particular transaction, use:

multichain-cli chain1 getrawtransaction [txid] 1

By default each node does not enable you to retrieve the information about any transaction on the blockchain - only those which have affected that node's wallet.

If you want to change this behavior, use the txindex=1 runtime parameter, and set it before the chain first connects.

Below are details about where to enter the runtime parameters:

http://www.multichain.com/developers/runtime-parameters/

To obtain the balance for native assets, use the getassetbalances command.

The listtransactions output doesn't give you information about the movement of native assets in transactions, but you can obtain this information using the getrawtransaction command I outlined above. 

answered Sep 7, 2015 by MultiChain
...