On Node A I'm running:
multichain-util create my_chain
Then I'm going into ~/.multichain/my_chain/params.dat and setting `anyone-can-connect`,`anyone-can-send`,`anyone-can-receive` to `true`
Then I'm running:
multichaind my_chain -autosubscribe=assets,streams -daemon
multichain-cli my_chain getnewaddress (returns my_first_address)
multichain-cli my_chain issue my_first_address my_asset 100
multichain-cli my_chain getnewaddress` (returns my_second_address)
multichain-cli my_chain sendassetfrom my_first_address my_second_address my_asset 10
multichain-cli my_chain listassettransactions my_asset
Example output:
{"method":"listassettransactions","params":["my_asset"],"id":1,"chain_name":"my_chain"}
[
{
"addresses" : {
"my_first_address" : 100.00000000
},
"items" : [
],
"data" : [
],
"confirmations" : 74,
"blockhash" : "00305922c480879d0b717c718aa6864263fc185d889d88047a11df9a56cef63b",
"blockindex" : 2,
"blocktime" : 1501181580,
"txid" : "735abecf0968e03f628d54a5af6dd4aa0a947fe04ebff1d801ed48ae448069c0",
"valid" : true,
"time" : 1501181578,
"timereceived" : 1501181578
},
{
"addresses" : {
"my_first_address" : -10.00000000,
"my_second_address" : 10.00000000
},
"items" : [
],
"data" : [
],
"confirmations" : 72,
"blockhash" : "0091df49257c9c1cb95004612a7050341d86c7d5112fb9d4d7f98e7c74e30d86",
"blockindex" : 1,
"blocktime" : 1501181614,
"txid" : "3022686165213d821670cc711857a85b17bd49e0b9e02b99d1fd51c3a1adfd82",
"valid" : true,
"time" : 1501181607,
"timereceived" : 1501181607
}
]`
Perfect, just what I want.
Then, on Node B I run:
multichaind my_chain@node1host:node1port -autosubscribe=assets,streams -daemon
multichain-cli my_chain importaddress my_first_address
multichain-cli my_chain listassettransactions my_asset
{"method":"listassettransactions","params":["my_asset"],"id":1,"chain_name":"my_chain"}
[
{
"addresses" : {
"my_first_address" : 100.00000000
},
"items" : [
],
"data" : [
],
"confirmations" : 74,
"blockhash" : "00305922c480879d0b717c718aa6864263fc185d889d88047a11df9a5 6cef63b",
"blockindex" : 2,
"blocktime" : 1501181580,
"txid" : "735abecf0968e03f628d54a5af6dd4aa0a947fe04ebff1d801ed48ae448069 c0",
"valid" : true,
"time" : 1501181580,
"timereceived" : 1501182972
}
]
Everything works if I remove the importaddress line, but if I run that (because I want to access watch only addresses from a function in my app) the listassettransactions command changes it's behavior. I'm not entirely sure what's happening.