signrawtransaction fail with error -8

+1 vote
Hello,

I'm trying to sign a raw transaction following your tutorial here https://www.multichain.com/developers/external-key-management/

when I'm on the signrawtransaction steps I receive this error:

error code: -8
error message:
argument 1 must be hexadecimal string (not '[0100000001c89e205f2af53658e54ce1620ac77ebe0f75b4bd9040f030a337d7c70d4e62010000000000ffffffff0200000000000000003776a914e1dca8651085319899ad83c15f23b89e9f48faac88ac1c73706b710f75b4bd9040f030a337d7c70d4e620114000000000000007500000000000000001976a9140d5f7fae45493ebada770dc87f74a1494f7680f088ac00000000]')

Below the full steps I had followed:

multichain-cli idem createrawsendfrom 12oqCKpM9kW9wCCpJ1ZJxQBNANq3nyo7qBGdPN '{"1XXXXXXX8JXXXXXXiRXXXXXXZvXXXXXXXXu1oG":{"DRLMB":20}}'
{"method":"createrawsendfrom","params":["12oqCKpM9kW9wCCpJ1ZJxQBNANq3nyo7qBGdPN",{"1XXXXXXX8JXXXXXXiRXXXXXXZvXXXXXXXXu1oG":{"DRLMB":20}}],"id":1,"chain_name":"idem"}

0100000001c89e205f2af53658e54ce1620ac77ebe0f75b4bd9040f030a337d7c70d4e62010000000000ffffffff0200000000000000003776a914e1dca8651085319899ad83c15f23b89e9f48faac88ac1c73706b710f75b4bd9040f030a337d7c70d4e620114000000000000007500000000000000001976a9140d5f7fae45493ebada770dc87f74a1494f7680f088ac00000000

 

 

multichain-cli idem signrawtransaction [0100000001c89e205f2af53658e54ce1620ac77ebe0f75b4bd9040f030a337d7c70d4e62010000000000ffffffff0200000000000000003776a914e1dca8651085319899ad83c15f23b89e9f48faac88ac1c73706b710f75b4bd9040f030a337d7c70d4e620114000000000000007500000000000000001976a9140d5f7fae45493ebada770dc87f74a1494f7680f088ac00000000] '[]' '["<my private key>"]'
{"method":"signrawtransaction","params":["[0100000001c89e205f2af53658e54ce1620ac77ebe0f75b4bd9040f030a337d7c70d4e62010000000000ffffffff0200000000000000003776a914e1dca8651085319899ad83c15f23b89e9f48faac88ac1c73706b710f75b4bd9040f030a337d7c70d4e620114000000000000007500000000000000001976a9140d5f7fae45493ebada770dc87f74a1494f7680f088ac00000000]",[],["<my private key>"]],"id":1,"chain_name":"idem"}

error code: -8
error message:
argument 1 must be hexadecimal string (not '[0100000001c89e205f2af53658e54ce1620ac77ebe0f75b4bd9040f030a337d7c70d4e62010000000000ffffffff0200000000000000003776a914e1dca8651085319899ad83c15f23b89e9f48faac88ac1c73706b710f75b4bd9040f030a337d7c70d4e620114000000000000007500000000000000001976a9140d5f7fae45493ebada770dc87f74a1494f7680f088ac00000000]')

Can you point me on where I'm wrong?

Thanks a lot
asked Jul 26, 2018 by robertocaramia

1 Answer

+1 vote
You should not have the square brackets around the first parameter, instead just pass the pure hexadecimal string.
answered Jul 27, 2018 by MultiChain
Thanks a lot for your quick answer it solve my problem, I think that I have misunderstood the tutorial here:

signrawtransaction [paste-hex-blob] '[]' '["V..."]'

thanks again
...