I am getting Invalid amount from multichain issue method

+1 vote

I am using esyBitcoin to call and pass asset information in php

This is my function that is returning invalid amount when i use the function. Please help me

public function addAssets($address,$asset_name){
        $quantity = 1000.0;
        $smallest_unit = 1;
        $native_amount = 0.1;
        $custom_fields = "{'Country','USA'}";

        return $this->bitcoin->issue($address,$asset_name,$quantity,$smallest_unit,$native_amount,$custom_fields);
    }

 
asked May 16, 2018 by krish

1 Answer

0 votes
It's hard for us to know what's going wrong when using this third party library. So please find the part of this PHP library that builds the JSON-RPC request, and output the full request (on the web page or command line as appropriate), then post it here for us to take a look.
answered May 16, 2018 by MultiChain
Thanks Multichain am going to change appropriately.
Please guide me on how i can insert asset using command interface. When i add vative-amount i get "invalid amount", when i dont add it it shows "value is type obj, expected real" for custom fields

multichain-cli chain3 issue 1WeUgwMGQiderGq8DhfD3qbRuzABu2JrFVh9he "asset_name" 100 0.01 "{\"city\":\"kla\",\"co\":\"ciu\"}"

I need a commant to enter any asset with custom fields. Thanks
Are you using Windows?
Yes, I am using windows 10
Sorry for the delay. So in the case of that multichain-cli command, the problem is simple: you are missing the 'native amount' parameter before the JSON object representing the custom fields.
...