Author [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: wallet_asset_issue_to_addresses - anyone know the json it expects?  (Read 242 times)

0 Members and 1 Guest are viewing this topic.

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

Offline vikram

Re: wallet_asset_issue_to_addresses - anyone know the json it expects?
« Reply #1 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.

Offline monsterer

Re: wallet_asset_issue_to_addresses - anyone know the json it expects?
« Reply #2 on: March 31, 2015, 08:04:11 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.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline toast

Re: wallet_asset_issue_to_addresses - anyone know the json it expects?
« Reply #3 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
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

Re: wallet_asset_issue_to_addresses - anyone know the json it expects?
« Reply #4 on: April 01, 2015, 06:59:06 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:

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 xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12076
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BTS: xeroc
  • GitHub: xeroc
Re: wallet_asset_issue_to_addresses - anyone know the json it expects?
« Reply #5 on: April 01, 2015, 07:10:15 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:

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" :)
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline monsterer

Re: wallet_asset_issue_to_addresses - anyone know the json it expects?
« Reply #6 on: April 01, 2015, 07:32:17 AM »
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

 

Google+