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?

1 Answer 1

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"
]
3
  • it‘s wrapped. the brackets are just outside the text box. i didn't notice that . sorry
    – WSQN
    Commented Sep 2, 2019 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? Commented Sep 2, 2019 at 3:26
  • Were you able to test this and verify my answer? If it worked for you, please accept the answer given, @WSQN Commented Oct 23, 2019 at 20:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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