wallet_asset_issue_to_addresses - anyone know the json it expects?

Started by monsterer, March 31, 2015, 06:51:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

monsterer

Ahhh, you are correct xeroc, its an array of arrays this call requires, rather than an array of objects :)

Ok, this is working now, thanks!
My opinions do not represent those of metaexchange unless explicitly stated.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

xeroc

Quote from: monsterer on April 01, 2015, 06:59:06 AM
Quote from: toast on April 01, 2015, 01:09:49 AM
Try a list of pairs (as lists) instead of a json object. I think it should work on the latest bitshares

That's what I was trying above:

[{\"BTSD4ZtTqHcoYDFvaAL5QwXvfN2mTkMMVbA1\":\"0.997\"}]

This is a list of pairs as an array.
have you tried:

[
["BTSD4ZtTqHcoYDFvaAL5QwXvfN2mTkMMVbA1", 0.997],
["BTSxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", 100],
["BTSxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", 100]
]

Not sure if this should be called "list of tuples" :)

monsterer

Quote from: toast on April 01, 2015, 01:09:49 AM
Try a list of pairs (as lists) instead of a json object. I think it should work on the latest bitshares

That's what I was trying above:

[{\"BTSD4ZtTqHcoYDFvaAL5QwXvfN2mTkMMVbA1\":\"0.997\"}]

This is a list of pairs as an array.
My opinions do not represent those of metaexchange unless explicitly stated.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

toast

Try a list of pairs (as lists) instead of a json object. I think it should work on the latest bitshares
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

monsterer

Quote from: vikram on March 31, 2015, 07:44:45 PM
Ask Toast--I think he made this command for NOTE distribution. It's possible that current version does not work and needs custom patch.

Oh dear. Does that mean there may be no current way to issue an asset to an address?
My opinions do not represent those of metaexchange unless explicitly stated.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

vikram

Ask Toast--I think he made this command for NOTE distribution. It's possible that current version does not work and needs custom patch.

monsterer

I'm trying to use the wallet_asset_issue_to_addresses RPC call, but passing the follow parameters leads to an assert:

{\"jsonrpc\":\"2\",\"id\":1,\"method\":\"wallet_asset_issue_to_addresses\",\"params\":[\"ABCDEF\",[{\"BTSD4ZtTqHcoYDFvaAL5QwXvfN2mTkMMVbA1\":\"0.997\"}]]}


message = "Bad Cast (7)\nInvalid cast from object_type to Array\n"

detail = "7 bad_cast_exception: Bad Cast\nInvalid cast from object_type to Array\n    {\"type\":\"object_type\"}\n    th_a  variant.cpp:530 fc::variant::get_array"

Anyone know the correct form?
My opinions do not represent those of metaexchange unless explicitly stated.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads