Author Topic: wallet_asset_issue_to_addresses - anyone know the json it expects?  (Read 1805 times)

0 Members and 1 Guest are viewing this topic.

Offline 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.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
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:

Code: [Select]
[{\"BTSD4ZtTqHcoYDFvaAL5QwXvfN2mTkMMVbA1\":\"0.997\"}]
This is a list of pairs as an array.
have you tried:
Code: [Select]
[
 ["BTSD4ZtTqHcoYDFvaAL5QwXvfN2mTkMMVbA1", 0.997],
 ["BTSxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", 100],
 ["BTSxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", 100]
]
Not sure if this should be called "list of tuples" :)

Offline monsterer

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:

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

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
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.

Offline monsterer

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.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline 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.

Offline monsterer

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

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

Code: [Select]
message = "Bad Cast (7)\nInvalid cast from object_type to Array\n"
Code: [Select]
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.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads