Invalid private key

+1 vote

I am trying to sign transaction but I got an error and appreciate your support to know the issue here:

chain1: createrawsendfrom "1Ebo8Dos1rKGmZdyZ3Mhy2Dct8KzAPBYDxwJUU" '{"1DuDL9i8gK9AsoufuYWht3bVJAJGL5x3tEz5WT":{"dollar":2}}'                                                                                                                                                                                
{"method":"createrawsendfrom","params":["1Ebo8Dos1rKGmZdyZ3Mhy2Dct8KzAPBYDxwJUU",{"1DuDL9i8gK9AsoufuYWht3bVJAJGL5x3tEz5WT":{"dollar":2}}],"id":1,"chain_name":"chain1"}

0100000001273e245df3d0806fe511a7dd65141d739d5e84669fc88b2eecb4547577ddd8500000000000ffffffff0200000000000000003776a9145f729fa36835fa17be1caf7dab381c514d27313d88ac1c73706b719d5e84669fc88b2eecb4547577ddd85002000000000000007500000000000000003776a914649ff1e0665ab607c2f8a460b0bf15c74f0b0be688ac1c73706b719d5e84669fc88b2eecb4547577ddd85030000000000000007500000000


so the hex blob is generated but I have an error while signing:

chain1: signrawtransaction 0100000001273e245df3d0806fe511a7dd65141d739d5e84669fc88b2eecb4547577ddd8500000000000ffffffff0200000000000000003776a9145f729fa36835fa17be1caf7dab381c514d27313d88ac1c73706b719d5e84669fc88b2eecb4547577ddd85002000000000000007500000000000000003776a914649ff1e0665ab607c2f8a460b0bf15c74f0b0be688ac1c73706b719d5e84669fc88b2eecb4547577ddd85030000000000000007500000000 '[]' '["L5nEhhjBZtCMf6ekEMFcjiB2gqqm4bxobfwzTGzfjR115WNxKatW"]'
{"method":"signrawtransaction","params":["0100000001273e245df3d0806fe511a7dd65141d739d5e84669fc88b2eecb4547577ddd8500000000000ffffffff0200000000000000003776a9145f729fa36835fa17be1caf7dab381c514d27313d88ac1c73706b719d5e84669fc88b2eecb4547577ddd85002000000000000007500000000000000003776a914649ff1e0665ab607c2f8a460b0bf15c74f0b0be688ac1c73706b719d5e84669fc88b2eecb4547577ddd85030000000000000007500000000",[],["L5nEhhjBZtCMf6ekEMFcjiB2gqqm4bxobfwzTGzfjR115WNxKatW"]],"id":1,"chain_name":"chain1"}

error code: -5
error message:
Invalid private key

what is wrong about privkey? and be noted that I used address that generated from validateaddress  0274c09906a88376a85887bc0d3b466dde3998bbca7512fef90eae0484d4bb96ff to import to wallet.

asked Jul 2 by mina
Where did you get this private key from?
From online tool (using JS to generate (offline also))that generate public and private key

1 Answer

+1 vote
 
Best answer

If you generate a private key or address from a tool designed for bitcoin, they will not work on a MultiChain blockchain created with the default parameters. If you want your MultiChain blockchain to support bitcoin-compatible addressing, you need to change these parameters in params.dat to the values shown, before starting the chain:

address-pubkeyhash-version=00
address-scripthash-version=05
private-key-version=80
address-checksum-value=00000000

answered Jul 5 by MultiChain
selected Jul 5 by mina
...