0

I'm using the jungle test chain jungle.eoscafeblock.com:8888 endpoint and import the private key to my local wallet, but when trying to get signature throuth local keosd api /v1/wallet/sign_signature ,it always return

["code"] => int(500)

["message"] => string(22) "Internal Service Error"

["error"] => array(4) {

["code"] => int(7)
["name"] => string(18) "bad_cast_exception"
["what"] => string(8) "Bad Cast"
["details"] => array(1) {
  [0] => array(4) {
    ["message"] => string(38) "Invalid cast from object_type to Array"
    ["file"] => string(11) "variant.cpp"
    ["line_number"] => int(545)
    ["method"] => string(9) "get_array"
  }
}

}

here is my request params

[{

    "expiration": "2019-08-30T08:04:31.500",
    "ref_block_num": 47006097,
    "ref_block_prefix": 727977150,
    "context_free_actions": [],
    "actions": {
        "account": "eosio.token",
        "name": "transfer",
        "authorization": {
            "actor": "morehandsome",
            "permission": "active"
        },
        "data": "a024c5699aa62e95a0229bfa4d37a98b010000000000000001454f5300000000086c75636b20677579"
    },
    "signatures": []
},
["EOS7r3k9iE5XtqWzxZwsNaXJ4pJjV84ksbVWBpBymfjn931R9kEEq"], "e70aaab8997e1dfce58fbfac80cbbb8fecec7b99cf982a9444273cbc64c41473"

]

is some where wrong?

0

It appears your actions are not wrapped in an array. Actions parameter needs to be an array of objects (actions).

Try the adjusted format below.

[{

        "expiration": "2019-08-30T08:04:31.500",
        "ref_block_num": 47006097,
        "ref_block_prefix": 727977150,
        "context_free_actions": [],
        "actions": [{
            "account": "eosio.token",
            "name": "transfer",
            "authorization": {
                "actor": "morehandsome",
                "permission": "active"
            },
            "data": "a024c5699aa62e95a0229bfa4d37a98b010000000000000001454f5300000000086c75636b20677579"
        }],
        "signatures": []
    },
    ["EOS7r3k9iE5XtqWzxZwsNaXJ4pJjV84ksbVWBpBymfjn931R9kEEq"], "e70aaab8997e1dfce58fbfac80cbbb8fecec7b99cf982a9444273cbc64c41473"
]
|improve this answer|||||
  • it‘s wrapped. the brackets are just outside the text box. i didn't notice that . sorry – WSQN Sep 2 '19 at 3:04
  • I don't mean the entire thing, I mean specifically the actions. Your code does not have an array for the actions parameter. My example does. If you test my example does it work? – netuoso - EOS Titan Sep 2 '19 at 3:26
  • Were you able to test this and verify my answer? If it worked for you, please accept the answer given, @WSQN – netuoso - EOS Titan Oct 23 '19 at 20:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.