<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>MultiChain Developer Q&amp;A - Recent questions tagged encoding</title>
<link>https://www.multichain.com/qa/tag/encoding</link>
<description>Powered by Question2Answer</description>
<item>
<title>importprivkey encoding error after upgrading version</title>
<link>https://www.multichain.com/qa/9604/importprivkey-encoding-error-after-upgrading-version</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I attempted to upgrade from version 1.0.2 to 1.0.4. As part of the process I want to restore&amp;nbsp;some of the addresses I had generated in version 1.0.2.&amp;nbsp;I did this using the dumpprivkey and importprivkey commands. However when attempting to import on version 1.0.4 I got an error for invalid encoding.&lt;/p&gt;&lt;p&gt;I had a look at the release notes and couldn't see anything that suggested this changed. Below is a snippet of the commands I attempted with a new throwaway address for demo purposes:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;MultiChain 1.0.2 RPC client&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;chain: getaddresses&lt;/p&gt;&lt;p&gt;{&quot;method&quot;:&quot;getaddresses&quot;,&quot;params&quot;:[],&quot;id&quot;:1,&quot;chain_name&quot;:&quot;chain&quot;}&lt;/p&gt;&lt;p&gt;[&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &quot;16JLPZwAWwVYkcVxXxtZGBsDLern484DXYEBY6&quot;&lt;/p&gt;&lt;p&gt;]&lt;/p&gt;&lt;p&gt;chain: &lt;strong&gt;importprivkey VExNnWvTx9Ukhn7SP1MFXm3DwfnY6wkXGkx3edps3Li76JJQNMP7XE4a&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;{&quot;method&quot;:&quot;importprivkey&quot;,&quot;params&quot;:[&quot;VExNnWvTx9Ukhn7SP1MFXm3DwfnY6wkXGkx3edps3Li76JJQNMP7XE4a&quot;],&quot;id&quot;:1,&quot;chain_name&quot;:&quot;chain&quot;}&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;chain: getaddresses&lt;/p&gt;&lt;p&gt;{&quot;method&quot;:&quot;getaddresses&quot;,&quot;params&quot;:[],&quot;id&quot;:1,&quot;chain_name&quot;:&quot;chain&quot;}&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;[&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &quot;16JLPZwAWwVYkcVxXxtZGBsDLern484DXYEBY6&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &quot;1Ma3NdCE55aNaG3ha5vC5qxMJqmVMTyruN5W51&quot;&lt;/p&gt;&lt;p&gt;]&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;MultiChain 1.0.4 RPC client&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;chain: getaddresses&lt;/p&gt;&lt;p&gt;{&quot;method&quot;:&quot;getaddresses&quot;,&quot;params&quot;:[],&quot;id&quot;:1,&quot;chain_name&quot;:&quot;chain&quot;}&lt;/p&gt;&lt;p&gt;[&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &quot;1Uo2R6Fcjx6MsiM5Kj3tgdf6UfdfjipXP6z1W8&quot;&lt;/p&gt;&lt;p&gt;]&lt;/p&gt;&lt;p&gt;chain: &lt;strong&gt;importprivkey VExNnWvTx9Ukhn7SP1MFXm3DwfnY6wkXGkx3edps3Li76JJQNMP7XE4a&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;{&quot;method&quot;:&quot;importprivkey&quot;,&quot;params&quot;:[&quot;VExNnWvTx9Ukhn7SP1MFXm3DwfnY6wkXGkx3edps3Li76JJQNMP7XE4a&quot;],&quot;id&quot;:1,&quot;chain_name&quot;:&quot;chain&quot;}&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;error code: -5&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;error message:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Invalid private key encoding&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Could you offer any advice? For now I can postpone upgrading, no major rush on a response.&lt;/p&gt;&lt;p&gt;I tried quoting the value and also base64 encoding it.&lt;/p&gt;&lt;p&gt;Kind regards,&lt;/p&gt;&lt;p&gt;John&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/9604/importprivkey-encoding-error-after-upgrading-version</guid>
<pubDate>Fri, 11 May 2018 17:01:05 +0000</pubDate>
</item>
</channel>
</rss>