<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.bitcoin.it/w/index.php?action=history&amp;feed=atom&amp;title=Sweepprivkey_proposal</id>
	<title>Sweepprivkey proposal - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://en.bitcoin.it/w/index.php?action=history&amp;feed=atom&amp;title=Sweepprivkey_proposal"/>
	<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Sweepprivkey_proposal&amp;action=history"/>
	<updated>2026-05-01T08:51:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Sweepprivkey_proposal&amp;diff=68026&amp;oldid=prev</id>
		<title>Furunodo at 12:55, 27 June 2020</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Sweepprivkey_proposal&amp;diff=68026&amp;oldid=prev"/>
		<updated>2020-06-27T12:55:17Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:55, 27 June 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l24&quot;&gt;Line 24:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Proposed flowchart==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Proposed flowchart==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &#039;&#039;sweepprivkey&#039;&#039; function depends on the ability to quickly find transactions in the UTXO set controlled by a given private key; simply, a UTXO index on scriptPubKey.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &#039;&#039;sweepprivkey&#039;&#039; function depends on the ability to quickly find transactions in the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[&lt;/ins&gt;UTXO&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]] &lt;/ins&gt;set controlled by a given private key; simply, a UTXO index on scriptPubKey.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;When the &amp;#039;&amp;#039;sweepprivkey&amp;#039;&amp;#039; command is run, bitcoind will:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;When the &amp;#039;&amp;#039;sweepprivkey&amp;#039;&amp;#039; command is run, bitcoind will:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Furunodo</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Sweepprivkey_proposal&amp;diff=46933&amp;oldid=prev</id>
		<title>Luke-jr: Current status</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Sweepprivkey_proposal&amp;diff=46933&amp;oldid=prev"/>
		<updated>2014-05-01T21:03:23Z</updated>

		<summary type="html">&lt;p&gt;Current status&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:03, 1 May 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;sweepprivkey&amp;#039;&amp;#039;&amp;#039; is a PROPOSED Bitcoin RPC command that, given a Bitcoin private key, allows sweeping of some or all of the funds to another address.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;sweepprivkey&amp;#039;&amp;#039;&amp;#039; is a PROPOSED Bitcoin RPC command that, given a Bitcoin private key, allows sweeping of some or all of the funds to another address.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Despite this specification, this proposal has never been implemented, and cannot be considered for inclusion until it is.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This function is useful for merchants who wish to accept typed or scanned Bitcoin private keys as payments, without imposing any specific methodology on how the payments must be processed.  &amp;#039;&amp;#039;sweepprivkey&amp;#039;&amp;#039; has no direct effect on anything in the local wallet or transaction history -- the function simply generates a transaction in real-time to sweep the funds to another address, and broadcasts it.  That destination address may or may not be in the local wallet.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This function is useful for merchants who wish to accept typed or scanned Bitcoin private keys as payments, without imposing any specific methodology on how the payments must be processed.  &amp;#039;&amp;#039;sweepprivkey&amp;#039;&amp;#039; has no direct effect on anything in the local wallet or transaction history -- the function simply generates a transaction in real-time to sweep the funds to another address, and broadcasts it.  That destination address may or may not be in the local wallet.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Luke-jr</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Sweepprivkey_proposal&amp;diff=46932&amp;oldid=prev</id>
		<title>Luke-jr: /* Proposed flowchart */ Only the UTXO set needs to be searched; keypairs are not addresses</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Sweepprivkey_proposal&amp;diff=46932&amp;oldid=prev"/>
		<updated>2014-05-01T21:02:31Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Proposed flowchart: &lt;/span&gt; Only the UTXO set needs to be searched; keypairs are not addresses&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:02, 1 May 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l23&quot;&gt;Line 23:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Proposed flowchart==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Proposed flowchart==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &#039;&#039;sweepprivkey&#039;&#039; function depends on the ability to quickly find transactions in the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;block chain belonging to &lt;/del&gt;a given &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;address.  It relies on an in-memory hashtable that is built the first time it is needed&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;and is maintained in memory until bitcoind is shut down.  As &lt;/del&gt;a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;result, the first time &#039;&#039;sweepprivkey&#039;&#039; is used, a delay of a few minutes can be expected.  This delay can be avoided by starting bitcoind with the --(whatever) command line switch. &#039;&#039;(ideally this should be persistable to disk, as this delay only gets longer as the blockchain grows).&#039;&#039;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &#039;&#039;sweepprivkey&#039;&#039; function depends on the ability to quickly find transactions in the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UTXO set controlled by &lt;/ins&gt;a given &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;private key; simply&lt;/ins&gt;, a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UTXO index on scriptPubKey&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;To conserve resources, the hash table is simple.  It associates the first 32 bits of the Bitcoin address (in hash160 form) with a list of the blocks that reference addresses with that prefix.  The hashtable is created upon first use, and updated each time a block is received.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;sweepprivkey&#039;&#039; will also scan the in-memory transaction pool and incorporate unconfirmed transactions when the &#039;&#039;minconfirms&#039;&#039; parameter is zero&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;When the &amp;#039;&amp;#039;sweepprivkey&amp;#039;&amp;#039; command is run, bitcoind will:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;When the &amp;#039;&amp;#039;sweepprivkey&amp;#039;&amp;#039; command is run, bitcoind will:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Ensure the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;address hash table &lt;/del&gt;is being maintained &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;in memory&lt;/del&gt;.  If not, it will be built before continuing.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Ensure the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;necessary UTXO index &lt;/ins&gt;is being maintained.  If not, it will be built before continuing.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Scan all of &lt;/del&gt;the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;blocks that might contain unspent transactions belonging &lt;/del&gt;to the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;address.  If minconfirms=0&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;then scan &lt;/del&gt;the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;in-memory transaction pool as well, to create a list &lt;/del&gt;of &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;such transactions&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Find &lt;/ins&gt;the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UTXO which is assigned &lt;/ins&gt;to &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a standard scriptPubKey redeemable with only &lt;/ins&gt;the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;given private key&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;and ensure it is buried under enough blocks to satisfy &lt;/ins&gt;the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;desired level &lt;/ins&gt;of &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;minconfirms&#039;&#039;&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Confirm that &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;there is a non-zero balance available&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;and that (&lt;/del&gt;if &#039;&#039;amount&#039;&#039; is specified&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;that &lt;/del&gt;the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;balance &lt;/del&gt;is equal to or greater than it.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Confirm that, if &#039;&#039;amount&#039;&#039; is specified, the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;amount received &lt;/ins&gt;is equal to or greater than it.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Do getnewaddress if a wallet account was specified.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Do getnewaddress if a wallet account was specified.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# If &#039;&#039;amount&#039;&#039; is specified, eliminate all transactions from the list from largest to smallest that will not be needed to satisfy the amount.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Construct a new transaction in memory that &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;spends &lt;/ins&gt;funds from the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;found UTXO &lt;/ins&gt;to the destination address and, if necessary&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, the change address&lt;/ins&gt;.  Sign the transaction with &#039;&#039;privkey&#039;&#039;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Construct a new transaction in memory that &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sends &lt;/del&gt;funds from the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Bitcoin address represented by &#039;&#039;privkey&#039;&#039; &lt;/del&gt;to the destination address and &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;change address&lt;/del&gt;, if necessary.  Sign the transaction with &#039;&#039;privkey&#039;&#039;.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Treat the signed transaction the same as if it had come from a peer, including relaying it to all connected peers.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Treat the signed transaction the same as if it had come from a peer, including relaying it to all connected peers.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Return success with the txid and (if applicable) the new address that was gathered via &amp;#039;&amp;#039;getnewaddress&amp;#039;&amp;#039;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Return success with the txid and (if applicable) the new address that was gathered via &amp;#039;&amp;#039;getnewaddress&amp;#039;&amp;#039;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Luke-jr</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Sweepprivkey_proposal&amp;diff=46931&amp;oldid=prev</id>
		<title>Luke-jr: Put amount and changeaddress together; change should never reuse an address, and it doesn&#039;t make sense to generate a change address for the current wallet here</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Sweepprivkey_proposal&amp;diff=46931&amp;oldid=prev"/>
		<updated>2014-05-01T20:55:13Z</updated>

		<summary type="html">&lt;p&gt;Put amount and changeaddress together; change should never reuse an address, and it doesn&amp;#039;t make sense to generate a change address for the current wallet here&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:55, 1 May 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l13&quot;&gt;Line 13:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 13:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The syntax of &amp;#039;&amp;#039;sweepprivkey&amp;#039;&amp;#039; is as follows:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The syntax of &amp;#039;&amp;#039;sweepprivkey&amp;#039;&amp;#039; is as follows:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  sweepprivkey &amp;lt;privkey&amp;gt; &amp;lt;minconfirms&amp;gt; [&amp;lt;destinationtype&amp;gt; &amp;lt;destination&amp;gt;] [&amp;lt;fee&amp;gt;] [&amp;lt;amount&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;] [&lt;/del&gt;&amp;lt;changeaddress&amp;gt;]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  sweepprivkey &amp;lt;privkey&amp;gt; &amp;lt;minconfirms&amp;gt; [&amp;lt;destinationtype&amp;gt; &amp;lt;destination&amp;gt;] [&amp;lt;fee&amp;gt;] [&amp;lt;amount&amp;gt; &amp;lt;changeaddress&amp;gt;]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;privkey&amp;#039;&amp;#039; is required.  It can be in any private key format normally accepted for wallet imports with the [[importprivkey]] function.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;privkey&amp;#039;&amp;#039; is required.  It can be in any private key format normally accepted for wallet imports with the [[importprivkey]] function.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l20&quot;&gt;Line 20:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;destination&amp;#039;&amp;#039; is either a Bitcoin address (if &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039;), or is an account name (if &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039;).  Funds are sent here.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;destination&amp;#039;&amp;#039; is either a Bitcoin address (if &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039;), or is an account name (if &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039;).  Funds are sent here.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;fee&amp;#039;&amp;#039; is optional, but must be provided if &amp;#039;&amp;#039;amount&amp;#039;&amp;#039; is provided (so that the command knows which parameter is which).  This determines how much of a transaction fee to pay.  This can be either an amount, or the word &amp;#039;&amp;#039;&amp;quot;default&amp;quot;&amp;#039;&amp;#039;, or the word &amp;#039;&amp;#039;&amp;quot;minimum&amp;quot;&amp;#039;&amp;#039;.  &amp;#039;&amp;#039;Default&amp;#039;&amp;#039; means to pay the transaction fee configured in the bitcoin client, and is the choice assumed if omitted.  &amp;#039;&amp;#039;Minimum&amp;#039;&amp;#039; means to pay the minimum fee that the client believes will be required to ensure that the transaction is relayed by the network (which is based on the transaction&amp;#039;s age, size, and other factors - see [[GetMinFee]]).  In many cases, the fee may be zero.  If you specify an amount but it is below the minimum, or the private key doesn&amp;#039;t have a balance large enough to meet the minimum, the command reports failure.  Fees are always paid from the funds held by the swept private key, not the wallet.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;fee&amp;#039;&amp;#039; is optional, but must be provided if &amp;#039;&amp;#039;amount&amp;#039;&amp;#039; is provided (so that the command knows which parameter is which).  This determines how much of a transaction fee to pay.  This can be either an amount, or the word &amp;#039;&amp;#039;&amp;quot;default&amp;quot;&amp;#039;&amp;#039;, or the word &amp;#039;&amp;#039;&amp;quot;minimum&amp;quot;&amp;#039;&amp;#039;.  &amp;#039;&amp;#039;Default&amp;#039;&amp;#039; means to pay the transaction fee configured in the bitcoin client, and is the choice assumed if omitted.  &amp;#039;&amp;#039;Minimum&amp;#039;&amp;#039; means to pay the minimum fee that the client believes will be required to ensure that the transaction is relayed by the network (which is based on the transaction&amp;#039;s age, size, and other factors - see [[GetMinFee]]).  In many cases, the fee may be zero.  If you specify an amount but it is below the minimum, or the private key doesn&amp;#039;t have a balance large enough to meet the minimum, the command reports failure.  Fees are always paid from the funds held by the swept private key, not the wallet.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&#039;&#039;amount&#039;&#039; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;is &lt;/del&gt;optional.  When not present &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(or entered as &quot;all&quot;)&lt;/del&gt;, the command will attempt to sweep all funds available via the private key to the extent those funds have enough confirmations to satisfy &#039;&#039;minconfirms&#039;&#039;.  If an amount is present, the command will only sweep that amount, reporting a failure if amount (plus fee) is greater than the funds available.  If the private key contains funds that satisfy &#039;&#039;minconfirms&#039;&#039; as well as funds that do not, only the sufficiently confirmed funds are swept.  If a specific amount is requested and a transaction fee must be paid, it will be deducted out of the change rather than the requested transfer amount.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&#039;&#039;amount&#039;&#039; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;and &#039;&#039;changeaddress&#039;&#039; are &lt;/ins&gt;optional.  When not present, the command will attempt to sweep all funds available via the private key to the extent those funds have enough confirmations to satisfy &#039;&#039;minconfirms&#039;&#039;.  If an amount is present, the command will only sweep that amount, reporting a failure if amount (plus fee) is greater than the funds available.  If the private key contains funds that satisfy &#039;&#039;minconfirms&#039;&#039; as well as funds that do not, only the sufficiently confirmed funds are swept.  If a specific amount is requested and a transaction fee must be paid, it will be deducted out of the change rather than the requested transfer amount &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(FIXME: this seems irrational)&lt;/ins&gt;. &#039;&#039;changeaddress&#039;&#039; address specifies a destination for any leftover change that may be the result of sweeping a partial amount.  Not all partial-balance transactions will generate change, particularly if the private key&#039;s &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;received amount satisfies exactly &lt;/ins&gt;the sweep amount.  If there is no change, the change address is ignored.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*&lt;/del&gt;&#039;&#039;changeaddress&#039;&#039; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;is optional and must only be provided in conjunction with &#039;&#039;amount&#039;&#039; and &#039;&#039;fee&#039;&#039;.  This &lt;/del&gt;address specifies a destination for any leftover change that may be the result of sweeping a partial amount&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.  If &#039;&#039;changeaddress&#039;&#039; is not provided, change is sent back to the original Bitcoin address corresponding to &#039;&#039;privkey&#039;&#039;&lt;/del&gt;.  Not all partial-balance transactions will generate change, particularly if the private key&#039;s &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;balance arrived in separate smaller transactions that can be used individually to satisfy &lt;/del&gt;the sweep amount.  If there is no change, the change address is ignored.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Proposed flowchart==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Proposed flowchart==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Luke-jr</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Sweepprivkey_proposal&amp;diff=17523&amp;oldid=prev</id>
		<title>Casascius: /* Usage */</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Sweepprivkey_proposal&amp;diff=17523&amp;oldid=prev"/>
		<updated>2011-09-30T03:45:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Usage&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:45, 30 September 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l19&quot;&gt;Line 19:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 19:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is either the word &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039;, and indicates what &amp;#039;&amp;#039;destination&amp;#039;&amp;#039; is.  &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039; means sweep funds to another Bitcoin address, and &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039; will perform a &amp;#039;&amp;#039;[[getnewaddress]]&amp;#039;&amp;#039; operation to get an address on the local wallet and sweep the funds there.  &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; and &amp;#039;&amp;#039;destination&amp;#039;&amp;#039; are optional, but must both be present together when used.  If these are absent, the command is treated as a simple query which returns the total funds available to the private key.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is either the word &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039;, and indicates what &amp;#039;&amp;#039;destination&amp;#039;&amp;#039; is.  &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039; means sweep funds to another Bitcoin address, and &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039; will perform a &amp;#039;&amp;#039;[[getnewaddress]]&amp;#039;&amp;#039; operation to get an address on the local wallet and sweep the funds there.  &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; and &amp;#039;&amp;#039;destination&amp;#039;&amp;#039; are optional, but must both be present together when used.  If these are absent, the command is treated as a simple query which returns the total funds available to the private key.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;destination&amp;#039;&amp;#039; is either a Bitcoin address (if &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039;), or is an account name (if &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039;).  Funds are sent here.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;destination&amp;#039;&amp;#039; is either a Bitcoin address (if &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039;), or is an account name (if &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039;).  Funds are sent here.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&#039;&#039;fee&#039;&#039; is optional, but must be provided if &#039;&#039;amount&#039;&#039; is provided (so that the command knows which parameter is which).  This determines how much of a transaction fee to pay.  This can be either an amount, or the word &#039;&#039;&quot;default&quot;&#039;&#039;, or the word &#039;&#039;&quot;minimum&quot;&#039;&#039;.  &#039;&#039;Default&#039;&#039; means to pay the transaction fee configured in the bitcoin client, and is the choice assumed if omitted.  &#039;&#039;Minimum&#039;&#039; means to pay the minimum fee that the client believes will be required to ensure that the transaction is relayed by the network (which is based on the transaction&#039;s age, size, and other factors - see [[GetMinFee]]).  In many cases, the fee may be zero.  If you specify an amount but it is below the minimum, or the private key doesn&#039;t have a balance large enough to meet the minimum, the command reports failure.  Fees are always paid &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;out of &lt;/del&gt;the swept &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;balance&lt;/del&gt;, not the wallet.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&#039;&#039;fee&#039;&#039; is optional, but must be provided if &#039;&#039;amount&#039;&#039; is provided (so that the command knows which parameter is which).  This determines how much of a transaction fee to pay.  This can be either an amount, or the word &#039;&#039;&quot;default&quot;&#039;&#039;, or the word &#039;&#039;&quot;minimum&quot;&#039;&#039;.  &#039;&#039;Default&#039;&#039; means to pay the transaction fee configured in the bitcoin client, and is the choice assumed if omitted.  &#039;&#039;Minimum&#039;&#039; means to pay the minimum fee that the client believes will be required to ensure that the transaction is relayed by the network (which is based on the transaction&#039;s age, size, and other factors - see [[GetMinFee]]).  In many cases, the fee may be zero.  If you specify an amount but it is below the minimum, or the private key doesn&#039;t have a balance large enough to meet the minimum, the command reports failure.  Fees are always paid &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;from the funds held by &lt;/ins&gt;the swept &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;private key&lt;/ins&gt;, not the wallet.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;amount&amp;#039;&amp;#039; is optional.  When not present (or entered as &amp;quot;all&amp;quot;), the command will attempt to sweep all funds available via the private key to the extent those funds have enough confirmations to satisfy &amp;#039;&amp;#039;minconfirms&amp;#039;&amp;#039;.  If an amount is present, the command will only sweep that amount, reporting a failure if amount (plus fee) is greater than the funds available.  If the private key contains funds that satisfy &amp;#039;&amp;#039;minconfirms&amp;#039;&amp;#039; as well as funds that do not, only the sufficiently confirmed funds are swept.  If a specific amount is requested and a transaction fee must be paid, it will be deducted out of the change rather than the requested transfer amount.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;amount&amp;#039;&amp;#039; is optional.  When not present (or entered as &amp;quot;all&amp;quot;), the command will attempt to sweep all funds available via the private key to the extent those funds have enough confirmations to satisfy &amp;#039;&amp;#039;minconfirms&amp;#039;&amp;#039;.  If an amount is present, the command will only sweep that amount, reporting a failure if amount (plus fee) is greater than the funds available.  If the private key contains funds that satisfy &amp;#039;&amp;#039;minconfirms&amp;#039;&amp;#039; as well as funds that do not, only the sufficiently confirmed funds are swept.  If a specific amount is requested and a transaction fee must be paid, it will be deducted out of the change rather than the requested transfer amount.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;changeaddress&amp;#039;&amp;#039; is optional and must only be provided in conjunction with &amp;#039;&amp;#039;amount&amp;#039;&amp;#039; and &amp;#039;&amp;#039;fee&amp;#039;&amp;#039;.  This address specifies a destination for any leftover change that may be the result of sweeping a partial amount.  If &amp;#039;&amp;#039;changeaddress&amp;#039;&amp;#039; is not provided, change is sent back to the original Bitcoin address corresponding to &amp;#039;&amp;#039;privkey&amp;#039;&amp;#039;.  Not all partial-balance transactions will generate change, particularly if the private key&amp;#039;s balance arrived in separate smaller transactions that can be used individually to satisfy the sweep amount.  If there is no change, the change address is ignored.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;changeaddress&amp;#039;&amp;#039; is optional and must only be provided in conjunction with &amp;#039;&amp;#039;amount&amp;#039;&amp;#039; and &amp;#039;&amp;#039;fee&amp;#039;&amp;#039;.  This address specifies a destination for any leftover change that may be the result of sweeping a partial amount.  If &amp;#039;&amp;#039;changeaddress&amp;#039;&amp;#039; is not provided, change is sent back to the original Bitcoin address corresponding to &amp;#039;&amp;#039;privkey&amp;#039;&amp;#039;.  Not all partial-balance transactions will generate change, particularly if the private key&amp;#039;s balance arrived in separate smaller transactions that can be used individually to satisfy the sweep amount.  If there is no change, the change address is ignored.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Casascius</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Sweepprivkey_proposal&amp;diff=17522&amp;oldid=prev</id>
		<title>Casascius: /* Usage */ swapped positions, because amount is more optional than fee</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Sweepprivkey_proposal&amp;diff=17522&amp;oldid=prev"/>
		<updated>2011-09-30T03:43:54Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Usage: &lt;/span&gt; swapped positions, because amount is more optional than fee&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:43, 30 September 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l13&quot;&gt;Line 13:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 13:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The syntax of &amp;#039;&amp;#039;sweepprivkey&amp;#039;&amp;#039; is as follows:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The syntax of &amp;#039;&amp;#039;sweepprivkey&amp;#039;&amp;#039; is as follows:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  sweepprivkey &amp;lt;privkey&amp;gt; &amp;lt;minconfirms&amp;gt; [&amp;lt;destinationtype&amp;gt; &amp;lt;destination&amp;gt;] [&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;amount&lt;/del&gt;&amp;gt;] [&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;fee&lt;/del&gt;&amp;gt;] [&amp;lt;changeaddress&amp;gt;]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  sweepprivkey &amp;lt;privkey&amp;gt; &amp;lt;minconfirms&amp;gt; [&amp;lt;destinationtype&amp;gt; &amp;lt;destination&amp;gt;] [&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;fee&lt;/ins&gt;&amp;gt;] [&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;amount&lt;/ins&gt;&amp;gt;] [&amp;lt;changeaddress&amp;gt;]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;privkey&amp;#039;&amp;#039; is required.  It can be in any private key format normally accepted for wallet imports with the [[importprivkey]] function.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;privkey&amp;#039;&amp;#039; is required.  It can be in any private key format normally accepted for wallet imports with the [[importprivkey]] function.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l19&quot;&gt;Line 19:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 19:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is either the word &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039;, and indicates what &amp;#039;&amp;#039;destination&amp;#039;&amp;#039; is.  &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039; means sweep funds to another Bitcoin address, and &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039; will perform a &amp;#039;&amp;#039;[[getnewaddress]]&amp;#039;&amp;#039; operation to get an address on the local wallet and sweep the funds there.  &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; and &amp;#039;&amp;#039;destination&amp;#039;&amp;#039; are optional, but must both be present together when used.  If these are absent, the command is treated as a simple query which returns the total funds available to the private key.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is either the word &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039;, and indicates what &amp;#039;&amp;#039;destination&amp;#039;&amp;#039; is.  &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039; means sweep funds to another Bitcoin address, and &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039; will perform a &amp;#039;&amp;#039;[[getnewaddress]]&amp;#039;&amp;#039; operation to get an address on the local wallet and sweep the funds there.  &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; and &amp;#039;&amp;#039;destination&amp;#039;&amp;#039; are optional, but must both be present together when used.  If these are absent, the command is treated as a simple query which returns the total funds available to the private key.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;destination&amp;#039;&amp;#039; is either a Bitcoin address (if &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039;), or is an account name (if &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039;).  Funds are sent here.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;destination&amp;#039;&amp;#039; is either a Bitcoin address (if &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039;), or is an account name (if &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039;).  Funds are sent here.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*&#039;&#039;amount&#039;&#039; is optional.  When not present, the command will attempt to sweep all funds available via the private key to the extent those funds have enough confirmations to satisfy &#039;&#039;minconfirms&#039;&#039;.  If an amount is present, the command will only sweep that amount, reporting a failure if amount is greater than the funds available.  If the private key contains funds that satisfy &#039;&#039;minconfirms&#039;&#039; as well as funds that do not, only the sufficiently confirmed funds are swept.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&#039;&#039;fee&#039;&#039; is optional, but must be provided if &#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;amount&lt;/ins&gt;&#039;&#039; is provided &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(so that the command knows which parameter is which)&lt;/ins&gt;.  This determines how much of a transaction fee to pay.  This can be either an amount, or the word &#039;&#039;&quot;default&quot;&#039;&#039;, or the word &#039;&#039;&quot;minimum&quot;&#039;&#039;.  &#039;&#039;Default&#039;&#039; means to pay the transaction fee configured in the bitcoin client&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, and is the choice assumed if omitted&lt;/ins&gt;.  &#039;&#039;Minimum&#039;&#039; means to pay the minimum fee that the client believes will be required to ensure that the transaction is relayed by the network (which is based on the transaction&#039;s age, size, and other factors - see [[GetMinFee]]).  In many cases, the fee may be zero.  If you specify an amount but it is below the minimum, or the private key doesn&#039;t have a balance large enough to meet the minimum, the command reports failure.  Fees are always paid out of the swept balance, not the wallet&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&#039;&#039;fee&#039;&#039; is optional, but must be provided if &#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;changeaddress&lt;/del&gt;&#039;&#039; is provided.  This determines how much of a transaction fee to pay.  This can be either an amount, or the word &#039;&#039;&quot;default&quot;&#039;&#039;, or the word &#039;&#039;&quot;minimum&quot;&#039;&#039;.  &#039;&#039;Default&#039;&#039; means to pay the transaction fee configured in the bitcoin client.  &#039;&#039;Minimum&#039;&#039; means to pay the minimum fee that the client believes will be required to ensure that the transaction is relayed by the network (which is based on the transaction&#039;s age, size, and other factors - see [[GetMinFee]]).  In many cases, the fee may be zero.  If you specify an amount but it is below the minimum, or the private key doesn&#039;t have a balance large enough to meet the minimum, the command reports failure.  Fees are always paid out of the swept balance, not the wallet.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*&#039;&#039;amount&#039;&#039; is optional.  When not present (or entered as &quot;all&quot;), the command will attempt to sweep all funds available via the private key to the extent those funds have enough confirmations to satisfy &#039;&#039;minconfirms&#039;&#039;.  If an amount is present, the command will only sweep that amount, reporting a failure if amount (plus fee) is greater than the funds available.  If the private key contains funds that satisfy &#039;&#039;minconfirms&#039;&#039; as well as funds that do not, only the sufficiently confirmed funds are swept.  If a specific amount is requested and a transaction fee must be paid, it will be deducted out of the change rather than the requested transfer amount&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&#039;&#039;changeaddress&#039;&#039; is optional and must only be provided in conjunction with &#039;&#039;amount&#039;&#039; and &#039;&#039;fee&#039;&#039;.  This address specifies a destination for any leftover change that may be the result of sweeping a partial amount.  If &#039;&#039;changeaddress&#039;&#039; is not provided, change is sent back to the original Bitcoin address corresponding to &#039;&#039;privkey&#039;&#039;.  Not all partial-balance transactions will generate change, particularly if the private key&#039;s balance arrived in separate smaller transactions that can be used individually to satisfy the sweep amount.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&#039;&#039;changeaddress&#039;&#039; is optional and must only be provided in conjunction with &#039;&#039;amount&#039;&#039; and &#039;&#039;fee&#039;&#039;.  This address specifies a destination for any leftover change that may be the result of sweeping a partial amount.  If &#039;&#039;changeaddress&#039;&#039; is not provided, change is sent back to the original Bitcoin address corresponding to &#039;&#039;privkey&#039;&#039;.  Not all partial-balance transactions will generate change, particularly if the private key&#039;s balance arrived in separate smaller transactions that can be used individually to satisfy the sweep amount&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.  If there is no change, the change address is ignored&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Proposed flowchart==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Proposed flowchart==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Casascius</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Sweepprivkey_proposal&amp;diff=17519&amp;oldid=prev</id>
		<title>Casascius: /* Usage */</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Sweepprivkey_proposal&amp;diff=17519&amp;oldid=prev"/>
		<updated>2011-09-30T02:37:50Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Usage&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:37, 30 September 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l13&quot;&gt;Line 13:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 13:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The syntax of &amp;#039;&amp;#039;sweepprivkey&amp;#039;&amp;#039; is as follows:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The syntax of &amp;#039;&amp;#039;sweepprivkey&amp;#039;&amp;#039; is as follows:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  sweepprivkey &amp;lt;privkey&amp;gt; &amp;lt;minconfirms&amp;gt; [&amp;lt;destinationtype&amp;gt; &amp;lt;destination&amp;gt;] [&amp;lt;amount&amp;gt;] [&amp;lt;changeaddress&amp;gt;]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  sweepprivkey &amp;lt;privkey&amp;gt; &amp;lt;minconfirms&amp;gt; [&amp;lt;destinationtype&amp;gt; &amp;lt;destination&amp;gt;] [&amp;lt;amount&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt;] [&amp;lt;fee&lt;/ins&gt;&amp;gt;] [&amp;lt;changeaddress&amp;gt;]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;privkey&amp;#039;&amp;#039; is required.  It can be in any private key format normally accepted for wallet imports with the [[importprivkey]] function.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;privkey&amp;#039;&amp;#039; is required.  It can be in any private key format normally accepted for wallet imports with the [[importprivkey]] function.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l20&quot;&gt;Line 20:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;destination&amp;#039;&amp;#039; is either a Bitcoin address (if &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039;), or is an account name (if &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039;).  Funds are sent here.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;destination&amp;#039;&amp;#039; is either a Bitcoin address (if &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039;), or is an account name (if &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039;).  Funds are sent here.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;amount&amp;#039;&amp;#039; is optional.  When not present, the command will attempt to sweep all funds available via the private key to the extent those funds have enough confirmations to satisfy &amp;#039;&amp;#039;minconfirms&amp;#039;&amp;#039;.  If an amount is present, the command will only sweep that amount, reporting a failure if amount is greater than the funds available.  If the private key contains funds that satisfy &amp;#039;&amp;#039;minconfirms&amp;#039;&amp;#039; as well as funds that do not, only the sufficiently confirmed funds are swept.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;amount&amp;#039;&amp;#039; is optional.  When not present, the command will attempt to sweep all funds available via the private key to the extent those funds have enough confirmations to satisfy &amp;#039;&amp;#039;minconfirms&amp;#039;&amp;#039;.  If an amount is present, the command will only sweep that amount, reporting a failure if amount is greater than the funds available.  If the private key contains funds that satisfy &amp;#039;&amp;#039;minconfirms&amp;#039;&amp;#039; as well as funds that do not, only the sufficiently confirmed funds are swept.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&#039;&#039;changeaddress&#039;&#039; is optional and must only be provided in conjunction with &#039;&#039;amount&#039;&#039;.  This address specifies a destination for any leftover change that may be the result of sweeping a partial amount.  If &#039;&#039;changeaddress&#039;&#039; is not provided, change is sent back to the original Bitcoin address corresponding to &#039;&#039;privkey&#039;&#039;.  Not all partial-balance transactions will generate change, particularly if the private key&#039;s balance arrived in separate smaller transactions that can be used individually to satisfy the sweep amount.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*&#039;&#039;fee&#039;&#039; is optional, but must be provided if &#039;&#039;changeaddress&#039;&#039; is provided.  This determines how much of a transaction fee to pay.  This can be either an amount, or the word &#039;&#039;&quot;default&quot;&#039;&#039;, or the word &#039;&#039;&quot;minimum&quot;&#039;&#039;.  &#039;&#039;Default&#039;&#039; means to pay the transaction fee configured in the bitcoin client.  &#039;&#039;Minimum&#039;&#039; means to pay the minimum fee that the client believes will be required to ensure that the transaction is relayed by the network (which is based on the transaction&#039;s age, size, and other factors - see [[GetMinFee]]).  In many cases, the fee may be zero.  If you specify an amount but it is below the minimum, or the private key doesn&#039;t have a balance large enough to meet the minimum, the command reports failure.  Fees are always paid out of the swept balance, not the wallet.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&#039;&#039;changeaddress&#039;&#039; is optional and must only be provided in conjunction with &#039;&#039;amount&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039; and &#039;&#039;fee&lt;/ins&gt;&#039;&#039;.  This address specifies a destination for any leftover change that may be the result of sweeping a partial amount.  If &#039;&#039;changeaddress&#039;&#039; is not provided, change is sent back to the original Bitcoin address corresponding to &#039;&#039;privkey&#039;&#039;.  Not all partial-balance transactions will generate change, particularly if the private key&#039;s balance arrived in separate smaller transactions that can be used individually to satisfy the sweep amount.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Proposed flowchart==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Proposed flowchart==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Casascius</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Sweepprivkey_proposal&amp;diff=17274&amp;oldid=prev</id>
		<title>Casascius at 18:52, 24 September 2011</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Sweepprivkey_proposal&amp;diff=17274&amp;oldid=prev"/>
		<updated>2011-09-24T18:52:38Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:52, 24 September 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The &lt;/del&gt;&#039;&#039;&#039;sweepprivkey&#039;&#039;&#039; is a PROPOSED Bitcoin RPC command that, given a Bitcoin private key, allows sweeping of some or all of the funds to another address.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;&#039;sweepprivkey&#039;&#039;&#039; is a PROPOSED Bitcoin RPC command that, given a Bitcoin private key, allows sweeping of some or all of the funds to another address.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This function is useful for merchants who wish to accept typed or scanned Bitcoin private keys as payments, without imposing any specific methodology on how the payments must be processed.  &amp;#039;&amp;#039;sweepprivkey&amp;#039;&amp;#039; has no direct effect on anything in the local wallet or transaction history -- the function simply generates a transaction in real-time to sweep the funds to another address, and broadcasts it.  That destination address may or may not be in the local wallet.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This function is useful for merchants who wish to accept typed or scanned Bitcoin private keys as payments, without imposing any specific methodology on how the payments must be processed.  &amp;#039;&amp;#039;sweepprivkey&amp;#039;&amp;#039; has no direct effect on anything in the local wallet or transaction history -- the function simply generates a transaction in real-time to sweep the funds to another address, and broadcasts it.  That destination address may or may not be in the local wallet.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Casascius</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Sweepprivkey_proposal&amp;diff=17273&amp;oldid=prev</id>
		<title>Casascius: /* Usage */</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Sweepprivkey_proposal&amp;diff=17273&amp;oldid=prev"/>
		<updated>2011-09-24T18:47:20Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Usage&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:47, 24 September 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l19&quot;&gt;Line 19:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 19:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is either the word &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039;, and indicates what &amp;#039;&amp;#039;destination&amp;#039;&amp;#039; is.  &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039; means sweep funds to another Bitcoin address, and &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039; will perform a &amp;#039;&amp;#039;[[getnewaddress]]&amp;#039;&amp;#039; operation to get an address on the local wallet and sweep the funds there.  &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; and &amp;#039;&amp;#039;destination&amp;#039;&amp;#039; are optional, but must both be present together when used.  If these are absent, the command is treated as a simple query which returns the total funds available to the private key.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is either the word &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039;, and indicates what &amp;#039;&amp;#039;destination&amp;#039;&amp;#039; is.  &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039; means sweep funds to another Bitcoin address, and &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039; will perform a &amp;#039;&amp;#039;[[getnewaddress]]&amp;#039;&amp;#039; operation to get an address on the local wallet and sweep the funds there.  &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; and &amp;#039;&amp;#039;destination&amp;#039;&amp;#039; are optional, but must both be present together when used.  If these are absent, the command is treated as a simple query which returns the total funds available to the private key.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;destination&amp;#039;&amp;#039; is either a Bitcoin address (if &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039;), or is an account name (if &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039;).  Funds are sent here.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;destination&amp;#039;&amp;#039; is either a Bitcoin address (if &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;quot;address&amp;quot;&amp;#039;&amp;#039;), or is an account name (if &amp;#039;&amp;#039;destinationtype&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;quot;account&amp;quot;&amp;#039;&amp;#039;).  Funds are sent here.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&#039;&#039;amount&#039;&#039; is optional.  &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If &lt;/del&gt;not present, the command will attempt to sweep all funds available &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;to &lt;/del&gt;the private key.  If present, the command will only sweep that amount, reporting a failure if amount is greater than the funds available.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&#039;&#039;amount&#039;&#039; is optional.  &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;When &lt;/ins&gt;not present, the command will attempt to sweep all funds available &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;via &lt;/ins&gt;the private key &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;to the extent those funds have enough confirmations to satisfy &#039;&#039;minconfirms&#039;&#039;&lt;/ins&gt;.  If &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;an amount is &lt;/ins&gt;present, the command will only sweep that amount, reporting a failure if amount is greater than the funds available&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.  If the private key contains funds that satisfy &#039;&#039;minconfirms&#039;&#039; as well as funds that do not, only the sufficiently confirmed funds are swept&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&#039;&#039;changeaddress&#039;&#039; is optional and must only be provided in conjunction with &#039;&#039;amount&#039;&#039;.  This address specifies a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;specific &lt;/del&gt;destination for any leftover change that may be the result of sweeping a partial amount.  Not all partial-balance transactions generate change, particularly if the private key&#039;s balance arrived &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;as &lt;/del&gt;smaller transactions that can be used &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;separately &lt;/del&gt;to satisfy the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;transfer request.  If &#039;&#039;changeaddress&#039;&#039; is not provided, change is sent back to the original Bitcoin address corresponding to &#039;&#039;privkey&#039;&#039;&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&#039;&#039;changeaddress&#039;&#039; is optional and must only be provided in conjunction with &#039;&#039;amount&#039;&#039;.  This address specifies a destination for any leftover change that may be the result of sweeping a partial amount&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.  If &#039;&#039;changeaddress&#039;&#039; is not provided, change is sent back to the original Bitcoin address corresponding to &#039;&#039;privkey&#039;&#039;&lt;/ins&gt;.  Not all partial-balance transactions &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;will &lt;/ins&gt;generate change, particularly if the private key&#039;s balance arrived &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;in separate &lt;/ins&gt;smaller transactions that can be used &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;individually &lt;/ins&gt;to satisfy the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sweep amount&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Proposed flowchart==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Proposed flowchart==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Casascius</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Sweepprivkey_proposal&amp;diff=17272&amp;oldid=prev</id>
		<title>Casascius: /* Proposed flowchart */</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Sweepprivkey_proposal&amp;diff=17272&amp;oldid=prev"/>
		<updated>2011-09-24T18:42:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Proposed flowchart&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:42, 24 September 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l27&quot;&gt;Line 27:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To conserve resources, the hash table is simple.  It associates the first 32 bits of the Bitcoin address (in hash160 form) with a list of the blocks that reference addresses with that prefix.  The hashtable is created upon first use, and updated each time a block is received.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To conserve resources, the hash table is simple.  It associates the first 32 bits of the Bitcoin address (in hash160 form) with a list of the blocks that reference addresses with that prefix.  The hashtable is created upon first use, and updated each time a block is received.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;sweepprivkey&#039;&#039; will also scan the in-memory transaction pool and &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;attempt&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;sweepprivkey&#039;&#039; will also scan the in-memory transaction pool and &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;incorporate unconfirmed transactions when the &#039;&#039;minconfirms&#039;&#039; parameter is zero.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;When the &amp;#039;&amp;#039;sweepprivkey&amp;#039;&amp;#039; command is run, bitcoind will:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;When the &amp;#039;&amp;#039;sweepprivkey&amp;#039;&amp;#039; command is run, bitcoind will:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Casascius</name></author>
	</entry>
</feed>