<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=M0Ray</id>
	<title>Bitcoin Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=M0Ray"/>
	<link rel="alternate" type="text/html" href="https://en.bitcoin.it/wiki/Special:Contributions/M0Ray"/>
	<updated>2026-05-04T15:04:44Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Wallet_protocol&amp;diff=7307</id>
		<title>Wallet protocol</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Wallet_protocol&amp;diff=7307"/>
		<updated>2011-04-14T19:40:55Z</updated>

		<summary type="html">&lt;p&gt;M0Ray: /* Binary or plaintext */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a project to define a new wallet protocol addressing problems with the current JSON-RPC implementation in bitcoind.&lt;br /&gt;
Please feel free to make edits. If you disagree with something, turn it into a &amp;quot;debate&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Explanation ==&lt;br /&gt;
This protocol aims to be a standard for communication between Wallets and User Interfaces.&lt;br /&gt;
It can be used to access a Wallet remotely, or even locally, even if the Wallet and User Interface are produced by different or competing vendors. For example, you could use an Android User Interface from Google to control a QBitcoin Wallet.&lt;br /&gt;
&lt;br /&gt;
Please see the [[Infrastructure]] page for an overview of where this protocol fits into the big picture.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Never use human-formatted data (for example, use base bitcoin units, not Decimal BitCoins nor Tonal BitCoins, which should only be used in formatting for humans)&lt;br /&gt;
* Don&#039;t require polling (for example, broadcast events for new transactions, or changes to current &amp;quot;work&amp;quot;)&lt;br /&gt;
* Cooperative mining (see below)&lt;br /&gt;
* Allow calculating expected minimum fee for transactions, with either (wallet&#039;s choice) locking on the used inputs, or prebuilding the tx and error if it becomes invalid before sending&lt;br /&gt;
* Easy to use in a RPC-like manner, for simple applications&lt;br /&gt;
&lt;br /&gt;
=== Debates ===&lt;br /&gt;
==== Binary or plaintext ====&lt;br /&gt;
* Binary is more efficient to parse and create&lt;br /&gt;
* Plaintext is easier for humans to debug, and avoids forming a dependency on a specific number of bits, endianness, or precision&lt;br /&gt;
* Binary can include custom transactions as-is for transmission&lt;br /&gt;
* Protobuf (binary) seems efficient and easy to use from all major languages&lt;br /&gt;
* JSON implementations tend to be buggy&lt;br /&gt;
* YAML (plaintext) is both human readable and efficient for parser (available for most PLs)&lt;br /&gt;
&lt;br /&gt;
=== Cooperative mining ===&lt;br /&gt;
The protocol should support submitting completed blocks, such that it can get (just) addresses from an upstream pool to generate to, and send all completed blocks to that pool for verification and counting (and possibly submission to the network). This can reduce the pool&#039;s load.&lt;br /&gt;
&lt;br /&gt;
=== UI bundling ===&lt;br /&gt;
For more secure use by ordinary end users, UIs and Wallets should support stream-based communication over standard I/O (stdio). This allows the UI to simply execute a dedicated Wallet, without requiring the user to setup Wallet-side authentication.  This also permits full compatibility with a hardware-based wallet located on a secured device (for example, a cryptographic hardware module, or a wallet device connected via RS232 or USB).  (Suggestion, if UI&#039;s could talk to any stream, including a child process&#039;s stdio, as well as a pipe or a device, the flexibility would be valuable)&lt;br /&gt;
&lt;br /&gt;
= DRAFT 0 =&lt;br /&gt;
Everything beyond this point is strictly DRAFT, should NOT be implemented, and is subject to being completely rewritten or modified!&lt;br /&gt;
&lt;br /&gt;
== Conformance requirements ==&lt;br /&gt;
&lt;br /&gt;
All diagrams, examples, and notes in this specification are non-normative, as are all sections explicitly marked non-normative. Everything else in this specification is normative.&lt;br /&gt;
&lt;br /&gt;
The key words &amp;quot;MUST&amp;quot;, &amp;quot;MUST NOT&amp;quot;, &amp;quot;REQUIRED&amp;quot;,  &amp;quot;SHOULD&amp;quot;, &amp;quot;SHOULD NOT&amp;quot;, &amp;quot;RECOMMENDED&amp;quot;, &amp;quot;MAY&amp;quot;, and &amp;quot;OPTIONAL&amp;quot; in the normative parts of this document are to be interpreted as described in RFC2119&amp;lt;ref name=&amp;quot;RFC2119&amp;quot;/&amp;gt;. For readability, these words do not appear in all uppercase letters in this specification.&lt;br /&gt;
&lt;br /&gt;
Requirements phrased in the imperative as part of algorithms (such as &amp;quot;strip any leading space characters&amp;quot; or &amp;quot;return false and abort these steps&amp;quot;) are to be interpreted with the meaning of the key word (&amp;quot;must&amp;quot;, &amp;quot;should&amp;quot;, &amp;quot;may&amp;quot;, etc) used in introducing the algorithm.&lt;br /&gt;
&lt;br /&gt;
== Transport/Session Layer ==&lt;br /&gt;
Must support at least reliable in-order stream data.&lt;br /&gt;
&lt;br /&gt;
Such as:&lt;br /&gt;
* stdio (required for self-contained UI bundling)&lt;br /&gt;
* serial&lt;br /&gt;
* TCP&lt;br /&gt;
&lt;br /&gt;
== Presentation Layer ==&lt;br /&gt;
=== Encryption ===&lt;br /&gt;
* TLS (recommended)&lt;br /&gt;
* SSH&lt;br /&gt;
&lt;br /&gt;
=== Packetization ===&lt;br /&gt;
Reliable, in-order packetization is required.&lt;br /&gt;
Packets should be request-oriented, while supporting:&lt;br /&gt;
* Fixed-length responses (MIME&amp;lt;ref name=&amp;quot;RFC2045&amp;quot;/&amp;gt;-encoded)&lt;br /&gt;
* Persistent response streams (eg, HTTP chunked encoding)&lt;br /&gt;
* Optional: Full-duplex (two-way) communication (eg, WebSockets&amp;lt;ref name=&amp;quot;WebSocket&amp;quot;/&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
This supports:&lt;br /&gt;
* HTTP&amp;lt;ref name=&amp;quot;RFC2616&amp;quot;/&amp;gt; with SSE&amp;lt;ref name=&amp;quot;SSE&amp;quot;/&amp;gt; (and WebSockets&amp;lt;ref name=&amp;quot;WebSocket&amp;quot;/&amp;gt;)&lt;br /&gt;
* SPDY&amp;lt;ref name=&amp;quot;SPDY&amp;quot;/&amp;gt;&lt;br /&gt;
* 0MQ&amp;lt;ref name=&amp;quot;0MQ-RFC2&amp;quot;/&amp;gt;, protobuf&amp;lt;ref name=&amp;quot;protobuf&amp;quot;/&amp;gt;, and specialized .proto files&lt;br /&gt;
&lt;br /&gt;
Request types:&lt;br /&gt;
* Optional: CONNECT for establishing a full-duplex stream&lt;br /&gt;
* GET for read-only access, always returning a fixed-length response&lt;br /&gt;
* POST for method calls&lt;br /&gt;
* PUT for uploads&lt;br /&gt;
* HEAD for metadata&lt;br /&gt;
&lt;br /&gt;
Note: Some protocols (eg, HTTP) do not allow complex structures in GET requests. An implementation using these protocols should allow silently upgrading GET to a POST with the same semantics.&lt;br /&gt;
&lt;br /&gt;
Note: A logical CONNECT request may not map directly to the HTTP method by the same name. The current WebSocket specification uses a HTTP GET request.&lt;br /&gt;
&lt;br /&gt;
=== MIME Formats ===&lt;br /&gt;
These content types may be specified in the Content-Type header, and Accept header.&lt;br /&gt;
* application/x-www-form-urlencoded (required)&lt;br /&gt;
* application/x-ripemd-160 (required)&lt;br /&gt;
* application/x-sha (required)&lt;br /&gt;
* multipart/mixed (required)&lt;br /&gt;
* text/event-stream&amp;lt;ref name=&amp;quot;SSE&amp;quot;/&amp;gt; (required for events over HTTP&amp;lt;ref name=&amp;quot;RFC2616&amp;quot;/&amp;gt;)&lt;br /&gt;
* application/x-bitcoin (required wallet-side)&lt;br /&gt;
* application/json&amp;lt;ref name=&amp;quot;RFC4627&amp;quot;/&amp;gt; (recommended)&lt;br /&gt;
* application/xml&amp;lt;ref name=&amp;quot;XML&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Application Layer ==&lt;br /&gt;
=== Authentication / security ===&lt;br /&gt;
Wallets may micro-manage security as they like, but the following are RECOMMENDED security levels:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &amp;quot;Miner&amp;quot; || Can generate new addresses, get work, and report found blocks&lt;br /&gt;
|-&lt;br /&gt;
| Merchant || Can create a transaction (only with &#039;proposal&#039; flag), but not send it&lt;br /&gt;
|-&lt;br /&gt;
| Read-only || Can view accounts, addresses, and any public data, and combinations thereof (eg, balances)&lt;br /&gt;
|-&lt;br /&gt;
| Financial || Can create new transactions using the wallet&#039;s keys&lt;br /&gt;
|-&lt;br /&gt;
| Full/Admin || Can administrate (download, destroy, etc) wallet keys&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Wallets MAY grant full access to username &#039;admin&#039; with a null password, to requests over stdio.&lt;br /&gt;
&lt;br /&gt;
Wallets SHOULD grant Merchant access to username &#039;merchant&#039; will a null password, to requests made over direct (ie, physically local, like Bluetooth) connections.&lt;br /&gt;
User interfaces SHOULD monitor for new, unsigned transactions with the &#039;proposal&#039; flag set, and prompt the user to sign or delete them.&lt;br /&gt;
&lt;br /&gt;
=== Object/Query Schema ===&lt;br /&gt;
May be provided in multipart/mixed, JSON, XML, etc...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Field Name !! Blk !! Tx !! Accting !! Coin !! Key !! Acct !! Queryable !! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Yes}}&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Yes}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
| Unique data identifier; only guaranteed to remain the same for a single session&lt;br /&gt;
|-&lt;br /&gt;
| type&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Yes}}&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Yes}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
| Type of data: &#039;key&#039;, &#039;tx&#039;, &#039;coin&#039;, &#039;block&#039;, &#039;account&#039;, &#039;accounting&#039;&lt;br /&gt;
|-&lt;br /&gt;
| hash&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value No}} || {{Table Value Yes}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| size&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value No}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| time&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Yes}}&lt;br /&gt;
| {{Table Value No}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| difficulty&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value No}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| difficultyNext&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value No}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| height&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value No}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| confirmations&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
| -2 for rejected, -1 for unsent, 0 for broadcast, 1+ for number of confirms&lt;br /&gt;
|-&lt;br /&gt;
| accepted&lt;br /&gt;
| {{Table Value Unknown}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
| An unconfirmed, accepted tx, is part of the current mining merkle tree&lt;br /&gt;
|-&lt;br /&gt;
| related&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value Unknown}} || {{Table Value Unknown}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
| Can have multiple entries (in JSON, an array value)&lt;br /&gt;
|-&lt;br /&gt;
| coinbase&lt;br /&gt;
| {{Table Value No}} || {{Table Value Yes}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| inputs&lt;br /&gt;
| {{Table Value No}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value No}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| outputs&lt;br /&gt;
| {{Table Value No}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value No}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| mine&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| network&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
| 0xF9BEB4D9 for the main network; 0xFABFB5DA for testnet&lt;br /&gt;
|-&lt;br /&gt;
| proposal&lt;br /&gt;
| {{Table Value No}} || {{Table Value Yes}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value No}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value No}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Data ===&lt;br /&gt;
* Arbitrary data can be accessed with the path /data/&amp;lt;id&amp;gt;&lt;br /&gt;
* GET to fetch&lt;br /&gt;
* To get only block header, use /data/&amp;lt;id&amp;gt;/header&lt;br /&gt;
* To get only actual content (eg, no calculated values), use /data/&amp;lt;id&amp;gt;/raw&lt;br /&gt;
* Optional: PUT to upload&lt;br /&gt;
&lt;br /&gt;
=== Information ===&lt;br /&gt;
* GET /state/&amp;lt;network&amp;gt;/connections&lt;br /&gt;
* Mining info: (required for mining support)&lt;br /&gt;
** GET /state/&amp;lt;network&amp;gt;/hashesPerSec (optional)&lt;br /&gt;
** GET /state/&amp;lt;network&amp;gt;/merkle&lt;br /&gt;
* GET /info/protocols&lt;br /&gt;
** Returns a list of supported protocols/versions and their URIs&lt;br /&gt;
&lt;br /&gt;
=== Requests ===&lt;br /&gt;
==== Address validation ====&lt;br /&gt;
* GET /validate/address?network=&amp;lt;id&amp;gt;&amp;amp;address=&amp;lt;hash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Calculate balance ====&lt;br /&gt;
* GET /balance?&amp;lt;query-object&amp;gt;&lt;br /&gt;
Match transactions to be included in the balance.&lt;br /&gt;
To ignore spends, use matching.&lt;br /&gt;
&lt;br /&gt;
==== Data search ====&lt;br /&gt;
* GET /dataSearch?&amp;lt;query-object&amp;gt;&lt;br /&gt;
* POST /dataSearch allowed for more complex queries&lt;br /&gt;
&lt;br /&gt;
NOTE: To get the id rather than the data itself, use a HEAD request and check the Location header.&lt;br /&gt;
&lt;br /&gt;
==== Generate new address ====&lt;br /&gt;
* POST /newAddress&lt;br /&gt;
** Optional parameter: recycle (bool) -- allows wallet to reuse a spent change address; if not supported, wallet should silently ignore&lt;br /&gt;
** Optional parameter: generate (bool) -- if true, make a new address on the spot, never use a preexisting one; if not supported, throw an error&lt;br /&gt;
** Optional parameter: account -- associate new address funds with this account id&lt;br /&gt;
&lt;br /&gt;
==== Monitor events ====&lt;br /&gt;
* Always POST&lt;br /&gt;
&lt;br /&gt;
===== New data available =====&lt;br /&gt;
* Query&lt;br /&gt;
&lt;br /&gt;
==== Move between accounts ====&lt;br /&gt;
* POST /accounting/move&lt;br /&gt;
** dest=&amp;lt;accountId&amp;gt;&lt;br /&gt;
** query=&amp;lt;query-object&amp;gt; OR amount=&amp;lt;amount&amp;gt;&lt;br /&gt;
** Optional: comment=&amp;lt;string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Transaction creation ====&lt;br /&gt;
* POST /tx/new&lt;br /&gt;
** send (bool) -- If true, sign and broadcast the transaction immediately&lt;br /&gt;
** fee (amount or range) -- If range, the wallet will try to calculate the minimum it expects the network to accept; if omitted, automatic fee range is unlimited unless bound by other factors (eg, input+strict)&lt;br /&gt;
** Optional: fromAccount (account id)&lt;br /&gt;
** Optional: input (multiple allowed of: coin id, OR coin id=&amp;gt;scriptSig)&lt;br /&gt;
** output (multiple allowed of: address=&amp;gt;amount pairs, OR script=&amp;gt;amount)&lt;br /&gt;
** strict (bool) -- If set, error rather than vary any parameters&lt;br /&gt;
** Optional: comment=&amp;lt;string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Transaction broadcast ====&lt;br /&gt;
* POST /tx/send?id=&amp;lt;existing-tx-internal-id&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Shutdown wallet ====&lt;br /&gt;
* POST /shutdown&lt;br /&gt;
&lt;br /&gt;
=== Events ===&lt;br /&gt;
==== New Data Available ====&lt;br /&gt;
&lt;br /&gt;
=== p2p protocol encapsulation ===&lt;br /&gt;
Optional: Establish a full-duplex connection to /p2p to speak direct p2p protocol&lt;br /&gt;
&lt;br /&gt;
== Appendix A. Useful algorithms ==&lt;br /&gt;
=== Counting confirmations ===&lt;br /&gt;
Because numerous (most) transactions change confirmation at the same event, the only way to do this efficiently, is to monitor for new block events. When a block arrives, increment the confirmation count of all transactions with at least 1 confirmation already. Then check the new block&#039;s introduced transactions (incrementing them from 0 to 1), and delete/invalidate any revoked transactions (eg, from a competing chain).&lt;br /&gt;
&lt;br /&gt;
== Appendix B. JSON-RPC equivalents ==&lt;br /&gt;
=== backupwallet ===&lt;br /&gt;
=== getaccount / getlabel ===&lt;br /&gt;
=== getaddressesbyaccount / getaccountaddress / getaddressesbylabel ===&lt;br /&gt;
=== getbalance ===&lt;br /&gt;
=== getblockcount / getblocknumber ===&lt;br /&gt;
=== getconnectioncount ===&lt;br /&gt;
=== getdifficulty ===&lt;br /&gt;
=== getgenerate ===&lt;br /&gt;
=== gethashespersec ===&lt;br /&gt;
=== getinfo ===&lt;br /&gt;
=== getnewaddress ===&lt;br /&gt;
=== getreceivedbyaccount / getreceivedbylabel ===&lt;br /&gt;
=== getreceivedbyaddress / getamountreceived ===&lt;br /&gt;
=== gettransaction ===&lt;br /&gt;
=== getwork ===&lt;br /&gt;
=== help ===&lt;br /&gt;
=== listaccounts ===&lt;br /&gt;
=== listreceivedbyaccount / listreceivedbylabel ===&lt;br /&gt;
=== listreceivedbyaddress / getallreceived ===&lt;br /&gt;
=== listtransactions ===&lt;br /&gt;
=== move ===&lt;br /&gt;
=== sendfrom ===&lt;br /&gt;
=== sendtoaddress ===&lt;br /&gt;
=== setaccount / setlabel ===&lt;br /&gt;
=== setgenerate ===&lt;br /&gt;
=== settxfee ===&lt;br /&gt;
=== stop ===&lt;br /&gt;
=== validateaddress ===&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;0MQ-RFC2&amp;quot;&amp;gt;[http://rfc.zeromq.org/spec:2 The Size-Prefixed Blob Format], iMatix Corporation.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;protobuf&amp;quot;&amp;gt;[http://code.google.com/apis/protocolbuffers/docs/encoding.html Protocol Buffers Encoding], Google.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;RFC2045&amp;quot;&amp;gt;[http://tools.ietf.org/html/rfc2045 Multipurpose Internet Mail Extensions (MIME)], Freed &amp;amp; Borenstein, First Virtual.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;RFC2119&amp;quot;&amp;gt;[http://tools.ietf.org/html/rfc2119 Key words for use in RFCs to Indicate Requirement Levels], S. Bradner. IETF.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;RFC2616&amp;quot;&amp;gt;[http://tools.ietf.org/html/rfc2616 Hypertext Transfer Protocol -- HTTP/1.1], Fielding, et al, W3C.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;RFC4627&amp;quot;&amp;gt;[http://tools.ietf.org/html/rfc4627 The application/json Media Type for JavaScript Object Notation (JSON)], D. Crockford. JSON.org.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;SSE&amp;quot;&amp;gt;[http://dev.w3.org/html5/eventsource/ Server-Sent Events], Ian Hickson, Google, Inc.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;SPDY&amp;quot;&amp;gt;[http://www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft2 SPDY Protocol], various. Google, Inc.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;WebSocket&amp;quot;&amp;gt;[http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-06 The WebSocket protocol], Ian Hickson, Google, Inc.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;XML&amp;quot;&amp;gt;[http://www.w3.org/TR/REC-xml Extensible Markup Language (XML) 1.0 (Second Edition)], Tim Bray, Jean Paoli, C. M. Sperberg-McQueen and Eve Maler, W3C.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>M0Ray</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Wallet_protocol&amp;diff=7306</id>
		<title>Wallet protocol</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Wallet_protocol&amp;diff=7306"/>
		<updated>2011-04-14T19:40:29Z</updated>

		<summary type="html">&lt;p&gt;M0Ray: /* Binary or plaintext */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a project to define a new wallet protocol addressing problems with the current JSON-RPC implementation in bitcoind.&lt;br /&gt;
Please feel free to make edits. If you disagree with something, turn it into a &amp;quot;debate&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Explanation ==&lt;br /&gt;
This protocol aims to be a standard for communication between Wallets and User Interfaces.&lt;br /&gt;
It can be used to access a Wallet remotely, or even locally, even if the Wallet and User Interface are produced by different or competing vendors. For example, you could use an Android User Interface from Google to control a QBitcoin Wallet.&lt;br /&gt;
&lt;br /&gt;
Please see the [[Infrastructure]] page for an overview of where this protocol fits into the big picture.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Never use human-formatted data (for example, use base bitcoin units, not Decimal BitCoins nor Tonal BitCoins, which should only be used in formatting for humans)&lt;br /&gt;
* Don&#039;t require polling (for example, broadcast events for new transactions, or changes to current &amp;quot;work&amp;quot;)&lt;br /&gt;
* Cooperative mining (see below)&lt;br /&gt;
* Allow calculating expected minimum fee for transactions, with either (wallet&#039;s choice) locking on the used inputs, or prebuilding the tx and error if it becomes invalid before sending&lt;br /&gt;
* Easy to use in a RPC-like manner, for simple applications&lt;br /&gt;
&lt;br /&gt;
=== Debates ===&lt;br /&gt;
==== Binary or plaintext ====&lt;br /&gt;
* Binary is more efficient to parse and create&lt;br /&gt;
* Plaintext is easier for humans to debug, and avoids forming a dependency on a specific number of bits, endianness, or precision&lt;br /&gt;
* Binary can include custom transactions as-is for transmission&lt;br /&gt;
* Protobuf (binary) seems efficient and easy to use from all major languages&lt;br /&gt;
* JSON implementations tend to be buggy&lt;br /&gt;
* YAML representation is both human readable and efficient for parser (available for most PLs)&lt;br /&gt;
&lt;br /&gt;
=== Cooperative mining ===&lt;br /&gt;
The protocol should support submitting completed blocks, such that it can get (just) addresses from an upstream pool to generate to, and send all completed blocks to that pool for verification and counting (and possibly submission to the network). This can reduce the pool&#039;s load.&lt;br /&gt;
&lt;br /&gt;
=== UI bundling ===&lt;br /&gt;
For more secure use by ordinary end users, UIs and Wallets should support stream-based communication over standard I/O (stdio). This allows the UI to simply execute a dedicated Wallet, without requiring the user to setup Wallet-side authentication.  This also permits full compatibility with a hardware-based wallet located on a secured device (for example, a cryptographic hardware module, or a wallet device connected via RS232 or USB).  (Suggestion, if UI&#039;s could talk to any stream, including a child process&#039;s stdio, as well as a pipe or a device, the flexibility would be valuable)&lt;br /&gt;
&lt;br /&gt;
= DRAFT 0 =&lt;br /&gt;
Everything beyond this point is strictly DRAFT, should NOT be implemented, and is subject to being completely rewritten or modified!&lt;br /&gt;
&lt;br /&gt;
== Conformance requirements ==&lt;br /&gt;
&lt;br /&gt;
All diagrams, examples, and notes in this specification are non-normative, as are all sections explicitly marked non-normative. Everything else in this specification is normative.&lt;br /&gt;
&lt;br /&gt;
The key words &amp;quot;MUST&amp;quot;, &amp;quot;MUST NOT&amp;quot;, &amp;quot;REQUIRED&amp;quot;,  &amp;quot;SHOULD&amp;quot;, &amp;quot;SHOULD NOT&amp;quot;, &amp;quot;RECOMMENDED&amp;quot;, &amp;quot;MAY&amp;quot;, and &amp;quot;OPTIONAL&amp;quot; in the normative parts of this document are to be interpreted as described in RFC2119&amp;lt;ref name=&amp;quot;RFC2119&amp;quot;/&amp;gt;. For readability, these words do not appear in all uppercase letters in this specification.&lt;br /&gt;
&lt;br /&gt;
Requirements phrased in the imperative as part of algorithms (such as &amp;quot;strip any leading space characters&amp;quot; or &amp;quot;return false and abort these steps&amp;quot;) are to be interpreted with the meaning of the key word (&amp;quot;must&amp;quot;, &amp;quot;should&amp;quot;, &amp;quot;may&amp;quot;, etc) used in introducing the algorithm.&lt;br /&gt;
&lt;br /&gt;
== Transport/Session Layer ==&lt;br /&gt;
Must support at least reliable in-order stream data.&lt;br /&gt;
&lt;br /&gt;
Such as:&lt;br /&gt;
* stdio (required for self-contained UI bundling)&lt;br /&gt;
* serial&lt;br /&gt;
* TCP&lt;br /&gt;
&lt;br /&gt;
== Presentation Layer ==&lt;br /&gt;
=== Encryption ===&lt;br /&gt;
* TLS (recommended)&lt;br /&gt;
* SSH&lt;br /&gt;
&lt;br /&gt;
=== Packetization ===&lt;br /&gt;
Reliable, in-order packetization is required.&lt;br /&gt;
Packets should be request-oriented, while supporting:&lt;br /&gt;
* Fixed-length responses (MIME&amp;lt;ref name=&amp;quot;RFC2045&amp;quot;/&amp;gt;-encoded)&lt;br /&gt;
* Persistent response streams (eg, HTTP chunked encoding)&lt;br /&gt;
* Optional: Full-duplex (two-way) communication (eg, WebSockets&amp;lt;ref name=&amp;quot;WebSocket&amp;quot;/&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
This supports:&lt;br /&gt;
* HTTP&amp;lt;ref name=&amp;quot;RFC2616&amp;quot;/&amp;gt; with SSE&amp;lt;ref name=&amp;quot;SSE&amp;quot;/&amp;gt; (and WebSockets&amp;lt;ref name=&amp;quot;WebSocket&amp;quot;/&amp;gt;)&lt;br /&gt;
* SPDY&amp;lt;ref name=&amp;quot;SPDY&amp;quot;/&amp;gt;&lt;br /&gt;
* 0MQ&amp;lt;ref name=&amp;quot;0MQ-RFC2&amp;quot;/&amp;gt;, protobuf&amp;lt;ref name=&amp;quot;protobuf&amp;quot;/&amp;gt;, and specialized .proto files&lt;br /&gt;
&lt;br /&gt;
Request types:&lt;br /&gt;
* Optional: CONNECT for establishing a full-duplex stream&lt;br /&gt;
* GET for read-only access, always returning a fixed-length response&lt;br /&gt;
* POST for method calls&lt;br /&gt;
* PUT for uploads&lt;br /&gt;
* HEAD for metadata&lt;br /&gt;
&lt;br /&gt;
Note: Some protocols (eg, HTTP) do not allow complex structures in GET requests. An implementation using these protocols should allow silently upgrading GET to a POST with the same semantics.&lt;br /&gt;
&lt;br /&gt;
Note: A logical CONNECT request may not map directly to the HTTP method by the same name. The current WebSocket specification uses a HTTP GET request.&lt;br /&gt;
&lt;br /&gt;
=== MIME Formats ===&lt;br /&gt;
These content types may be specified in the Content-Type header, and Accept header.&lt;br /&gt;
* application/x-www-form-urlencoded (required)&lt;br /&gt;
* application/x-ripemd-160 (required)&lt;br /&gt;
* application/x-sha (required)&lt;br /&gt;
* multipart/mixed (required)&lt;br /&gt;
* text/event-stream&amp;lt;ref name=&amp;quot;SSE&amp;quot;/&amp;gt; (required for events over HTTP&amp;lt;ref name=&amp;quot;RFC2616&amp;quot;/&amp;gt;)&lt;br /&gt;
* application/x-bitcoin (required wallet-side)&lt;br /&gt;
* application/json&amp;lt;ref name=&amp;quot;RFC4627&amp;quot;/&amp;gt; (recommended)&lt;br /&gt;
* application/xml&amp;lt;ref name=&amp;quot;XML&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Application Layer ==&lt;br /&gt;
=== Authentication / security ===&lt;br /&gt;
Wallets may micro-manage security as they like, but the following are RECOMMENDED security levels:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &amp;quot;Miner&amp;quot; || Can generate new addresses, get work, and report found blocks&lt;br /&gt;
|-&lt;br /&gt;
| Merchant || Can create a transaction (only with &#039;proposal&#039; flag), but not send it&lt;br /&gt;
|-&lt;br /&gt;
| Read-only || Can view accounts, addresses, and any public data, and combinations thereof (eg, balances)&lt;br /&gt;
|-&lt;br /&gt;
| Financial || Can create new transactions using the wallet&#039;s keys&lt;br /&gt;
|-&lt;br /&gt;
| Full/Admin || Can administrate (download, destroy, etc) wallet keys&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Wallets MAY grant full access to username &#039;admin&#039; with a null password, to requests over stdio.&lt;br /&gt;
&lt;br /&gt;
Wallets SHOULD grant Merchant access to username &#039;merchant&#039; will a null password, to requests made over direct (ie, physically local, like Bluetooth) connections.&lt;br /&gt;
User interfaces SHOULD monitor for new, unsigned transactions with the &#039;proposal&#039; flag set, and prompt the user to sign or delete them.&lt;br /&gt;
&lt;br /&gt;
=== Object/Query Schema ===&lt;br /&gt;
May be provided in multipart/mixed, JSON, XML, etc...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Field Name !! Blk !! Tx !! Accting !! Coin !! Key !! Acct !! Queryable !! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Yes}}&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Yes}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
| Unique data identifier; only guaranteed to remain the same for a single session&lt;br /&gt;
|-&lt;br /&gt;
| type&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Yes}}&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Yes}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
| Type of data: &#039;key&#039;, &#039;tx&#039;, &#039;coin&#039;, &#039;block&#039;, &#039;account&#039;, &#039;accounting&#039;&lt;br /&gt;
|-&lt;br /&gt;
| hash&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value No}} || {{Table Value Yes}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| size&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value No}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| time&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Yes}}&lt;br /&gt;
| {{Table Value No}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| difficulty&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value No}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| difficultyNext&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value No}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| height&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value No}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| confirmations&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
| -2 for rejected, -1 for unsent, 0 for broadcast, 1+ for number of confirms&lt;br /&gt;
|-&lt;br /&gt;
| accepted&lt;br /&gt;
| {{Table Value Unknown}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
| An unconfirmed, accepted tx, is part of the current mining merkle tree&lt;br /&gt;
|-&lt;br /&gt;
| related&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value Unknown}} || {{Table Value Unknown}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
| Can have multiple entries (in JSON, an array value)&lt;br /&gt;
|-&lt;br /&gt;
| coinbase&lt;br /&gt;
| {{Table Value No}} || {{Table Value Yes}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| inputs&lt;br /&gt;
| {{Table Value No}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value No}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| outputs&lt;br /&gt;
| {{Table Value No}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value No}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| mine&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| network&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value Yes}} || {{Table Value Yes}} || {{Table Value Unknown}}&lt;br /&gt;
| {{Table Value Yes}}&lt;br /&gt;
| 0xF9BEB4D9 for the main network; 0xFABFB5DA for testnet&lt;br /&gt;
|-&lt;br /&gt;
| proposal&lt;br /&gt;
| {{Table Value No}} || {{Table Value Yes}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value No}} || {{Table Value No}} || {{Table Value No}}&lt;br /&gt;
| {{Table Value No}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Data ===&lt;br /&gt;
* Arbitrary data can be accessed with the path /data/&amp;lt;id&amp;gt;&lt;br /&gt;
* GET to fetch&lt;br /&gt;
* To get only block header, use /data/&amp;lt;id&amp;gt;/header&lt;br /&gt;
* To get only actual content (eg, no calculated values), use /data/&amp;lt;id&amp;gt;/raw&lt;br /&gt;
* Optional: PUT to upload&lt;br /&gt;
&lt;br /&gt;
=== Information ===&lt;br /&gt;
* GET /state/&amp;lt;network&amp;gt;/connections&lt;br /&gt;
* Mining info: (required for mining support)&lt;br /&gt;
** GET /state/&amp;lt;network&amp;gt;/hashesPerSec (optional)&lt;br /&gt;
** GET /state/&amp;lt;network&amp;gt;/merkle&lt;br /&gt;
* GET /info/protocols&lt;br /&gt;
** Returns a list of supported protocols/versions and their URIs&lt;br /&gt;
&lt;br /&gt;
=== Requests ===&lt;br /&gt;
==== Address validation ====&lt;br /&gt;
* GET /validate/address?network=&amp;lt;id&amp;gt;&amp;amp;address=&amp;lt;hash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Calculate balance ====&lt;br /&gt;
* GET /balance?&amp;lt;query-object&amp;gt;&lt;br /&gt;
Match transactions to be included in the balance.&lt;br /&gt;
To ignore spends, use matching.&lt;br /&gt;
&lt;br /&gt;
==== Data search ====&lt;br /&gt;
* GET /dataSearch?&amp;lt;query-object&amp;gt;&lt;br /&gt;
* POST /dataSearch allowed for more complex queries&lt;br /&gt;
&lt;br /&gt;
NOTE: To get the id rather than the data itself, use a HEAD request and check the Location header.&lt;br /&gt;
&lt;br /&gt;
==== Generate new address ====&lt;br /&gt;
* POST /newAddress&lt;br /&gt;
** Optional parameter: recycle (bool) -- allows wallet to reuse a spent change address; if not supported, wallet should silently ignore&lt;br /&gt;
** Optional parameter: generate (bool) -- if true, make a new address on the spot, never use a preexisting one; if not supported, throw an error&lt;br /&gt;
** Optional parameter: account -- associate new address funds with this account id&lt;br /&gt;
&lt;br /&gt;
==== Monitor events ====&lt;br /&gt;
* Always POST&lt;br /&gt;
&lt;br /&gt;
===== New data available =====&lt;br /&gt;
* Query&lt;br /&gt;
&lt;br /&gt;
==== Move between accounts ====&lt;br /&gt;
* POST /accounting/move&lt;br /&gt;
** dest=&amp;lt;accountId&amp;gt;&lt;br /&gt;
** query=&amp;lt;query-object&amp;gt; OR amount=&amp;lt;amount&amp;gt;&lt;br /&gt;
** Optional: comment=&amp;lt;string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Transaction creation ====&lt;br /&gt;
* POST /tx/new&lt;br /&gt;
** send (bool) -- If true, sign and broadcast the transaction immediately&lt;br /&gt;
** fee (amount or range) -- If range, the wallet will try to calculate the minimum it expects the network to accept; if omitted, automatic fee range is unlimited unless bound by other factors (eg, input+strict)&lt;br /&gt;
** Optional: fromAccount (account id)&lt;br /&gt;
** Optional: input (multiple allowed of: coin id, OR coin id=&amp;gt;scriptSig)&lt;br /&gt;
** output (multiple allowed of: address=&amp;gt;amount pairs, OR script=&amp;gt;amount)&lt;br /&gt;
** strict (bool) -- If set, error rather than vary any parameters&lt;br /&gt;
** Optional: comment=&amp;lt;string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Transaction broadcast ====&lt;br /&gt;
* POST /tx/send?id=&amp;lt;existing-tx-internal-id&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Shutdown wallet ====&lt;br /&gt;
* POST /shutdown&lt;br /&gt;
&lt;br /&gt;
=== Events ===&lt;br /&gt;
==== New Data Available ====&lt;br /&gt;
&lt;br /&gt;
=== p2p protocol encapsulation ===&lt;br /&gt;
Optional: Establish a full-duplex connection to /p2p to speak direct p2p protocol&lt;br /&gt;
&lt;br /&gt;
== Appendix A. Useful algorithms ==&lt;br /&gt;
=== Counting confirmations ===&lt;br /&gt;
Because numerous (most) transactions change confirmation at the same event, the only way to do this efficiently, is to monitor for new block events. When a block arrives, increment the confirmation count of all transactions with at least 1 confirmation already. Then check the new block&#039;s introduced transactions (incrementing them from 0 to 1), and delete/invalidate any revoked transactions (eg, from a competing chain).&lt;br /&gt;
&lt;br /&gt;
== Appendix B. JSON-RPC equivalents ==&lt;br /&gt;
=== backupwallet ===&lt;br /&gt;
=== getaccount / getlabel ===&lt;br /&gt;
=== getaddressesbyaccount / getaccountaddress / getaddressesbylabel ===&lt;br /&gt;
=== getbalance ===&lt;br /&gt;
=== getblockcount / getblocknumber ===&lt;br /&gt;
=== getconnectioncount ===&lt;br /&gt;
=== getdifficulty ===&lt;br /&gt;
=== getgenerate ===&lt;br /&gt;
=== gethashespersec ===&lt;br /&gt;
=== getinfo ===&lt;br /&gt;
=== getnewaddress ===&lt;br /&gt;
=== getreceivedbyaccount / getreceivedbylabel ===&lt;br /&gt;
=== getreceivedbyaddress / getamountreceived ===&lt;br /&gt;
=== gettransaction ===&lt;br /&gt;
=== getwork ===&lt;br /&gt;
=== help ===&lt;br /&gt;
=== listaccounts ===&lt;br /&gt;
=== listreceivedbyaccount / listreceivedbylabel ===&lt;br /&gt;
=== listreceivedbyaddress / getallreceived ===&lt;br /&gt;
=== listtransactions ===&lt;br /&gt;
=== move ===&lt;br /&gt;
=== sendfrom ===&lt;br /&gt;
=== sendtoaddress ===&lt;br /&gt;
=== setaccount / setlabel ===&lt;br /&gt;
=== setgenerate ===&lt;br /&gt;
=== settxfee ===&lt;br /&gt;
=== stop ===&lt;br /&gt;
=== validateaddress ===&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;0MQ-RFC2&amp;quot;&amp;gt;[http://rfc.zeromq.org/spec:2 The Size-Prefixed Blob Format], iMatix Corporation.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;protobuf&amp;quot;&amp;gt;[http://code.google.com/apis/protocolbuffers/docs/encoding.html Protocol Buffers Encoding], Google.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;RFC2045&amp;quot;&amp;gt;[http://tools.ietf.org/html/rfc2045 Multipurpose Internet Mail Extensions (MIME)], Freed &amp;amp; Borenstein, First Virtual.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;RFC2119&amp;quot;&amp;gt;[http://tools.ietf.org/html/rfc2119 Key words for use in RFCs to Indicate Requirement Levels], S. Bradner. IETF.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;RFC2616&amp;quot;&amp;gt;[http://tools.ietf.org/html/rfc2616 Hypertext Transfer Protocol -- HTTP/1.1], Fielding, et al, W3C.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;RFC4627&amp;quot;&amp;gt;[http://tools.ietf.org/html/rfc4627 The application/json Media Type for JavaScript Object Notation (JSON)], D. Crockford. JSON.org.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;SSE&amp;quot;&amp;gt;[http://dev.w3.org/html5/eventsource/ Server-Sent Events], Ian Hickson, Google, Inc.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;SPDY&amp;quot;&amp;gt;[http://www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft2 SPDY Protocol], various. Google, Inc.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;WebSocket&amp;quot;&amp;gt;[http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-06 The WebSocket protocol], Ian Hickson, Google, Inc.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;XML&amp;quot;&amp;gt;[http://www.w3.org/TR/REC-xml Extensible Markup Language (XML) 1.0 (Second Edition)], Tim Bray, Jean Paoli, C. M. Sperberg-McQueen and Eve Maler, W3C.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>M0Ray</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Fallback_Nodes&amp;diff=5202</id>
		<title>Fallback Nodes</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Fallback_Nodes&amp;diff=5202"/>
		<updated>2011-03-09T21:12:16Z</updated>

		<summary type="html">&lt;p&gt;M0Ray: /* IPv4 Nodes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a list of nodes which are considered reliable. Nodes from this list which are down for more than 24 hours will be automatically removed and status of each node is displayed and updated every hour by [[User:WikiBot|WikiBot]].&lt;br /&gt;
&lt;br /&gt;
== How to use this list ==&lt;br /&gt;
&lt;br /&gt;
=== Connect to nodes ===&lt;br /&gt;
&lt;br /&gt;
You can connect to these nodes with the &#039;&#039;-addnode=ip&#039;&#039; switch instead of the usual node harvesting process (through IRC or via the embedded nodelist). You can connect to more than one node by using &#039;&#039;-addnode=ip&#039;&#039; more than once. It is usually a good idea to connect to more than one of these nodes.&lt;br /&gt;
&lt;br /&gt;
==== Nodes without a fixed ip ====&lt;br /&gt;
&lt;br /&gt;
If the node IP is not fixed (see &amp;quot;Fixed&amp;quot; column), you will have to resolve the node&#039;s name (first column) each time the IP changes. Some nodes may have their ip change once a day, some others once a month, and some others may stay on the same IP for years. Still, as long as the IP is not fixed, there is no guarantee it will stay the same.&lt;br /&gt;
&lt;br /&gt;
The [[Original Bitcoin client]] do not support hostnames to the &#039;&#039;-addnode&#039;&#039; parameter, so you must do the resolving part for it. For example on linux:&lt;br /&gt;
 bitcoind -addnode=$(host theymos.ath.cx |sed s/&amp;quot;^.*has address &amp;quot;//)&lt;br /&gt;
&lt;br /&gt;
=== IP Transactions ===&lt;br /&gt;
&lt;br /&gt;
You can also send [[IP Transactions]] to these nodes. If you include your bitcoin address in the &amp;quot;message&amp;quot; field, you may have your coins back.&lt;br /&gt;
&lt;br /&gt;
=== Tor network ===&lt;br /&gt;
&lt;br /&gt;
To use tor .onion addresses, you need to map virtual ips via the &#039;&#039;torrc&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
 mapaddress 192.0.2.2 ijzt2eeizty3p5xe.onion&lt;br /&gt;
 mapaddress 192.0.2.3 j43z65b6r2usg3vk.onion&lt;br /&gt;
 mapaddress 192.0.2.4 pvuif6nonbhj3o3r.onion&lt;br /&gt;
&lt;br /&gt;
Once you have configured and restarted tor, 192.0.2.2 will connect to ijzt2eeizty3p5xe.onion when accessed through the Tor proxy (and likewise for the other IPs/onions). You can then run Bitcoin with -addnode=192.0.2.2, or even send bitcoins to that IP address. You can use any arbitrary IP addresses with MapAddress, though some of the common non-routable ranges (10.*, 192.168.*) will not work due to a Bitcoin bug. 192.0.2.1-192.0.2.255 is the recommended range because it is both non-routable and compatible with Bitcoin.&lt;br /&gt;
&lt;br /&gt;
== Nodes list ==&lt;br /&gt;
&lt;br /&gt;
=== IPv4 Nodes ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Hostname !! Owner !! IP !! Fixed !! Status !! Last Seen (GMT) !! Accepts IP transactions&lt;br /&gt;
|-&lt;br /&gt;
&amp;lt;!-- BEGIN NODELIST --&amp;gt;&lt;br /&gt;
| ndrix.com || mndrix || 64.22.103.150 || {{Table Value Yes}} || {{Fallback Nodes/Node Up|version=0.3.20[.2]}} || 2011-03-09 21:00:04 || ?&lt;br /&gt;
|-&lt;br /&gt;
| bitcoin-otc.com || nanotube || 69.163.132.101 || {{Table Value Yes}} || {{Fallback Nodes/Node Up|version=0.3.20[.2]}} || 2011-03-09 21:00:04 || No&lt;br /&gt;
|-&lt;br /&gt;
| 69.164.218.197 || Gavin Andresen || 69.164.218.197 || {{Table Value Yes}} || {{Fallback Nodes/Node Up|version=0.3.20[.2]}} || 2011-03-09 21:00:04 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 217.157.1.202 || kseistrup || 217.157.1.202 || {{Table Value Yes}} || {{Fallback Nodes/Node Up|version=0.3.20[.2]}} || 2011-03-09 21:00:05 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 178.63.15.200 || hendi || 178.63.15.200 || {{Table Value Yes}} || {{Fallback Nodes/Node Up|version=0.3.20[.1]}} || 2011-03-09 21:00:05 || ?&lt;br /&gt;
|-&lt;br /&gt;
| lfmcal.dontexist.org || lfm || 75.158.131.108 || {{Table Value Unknown}} || {{Fallback Nodes/Node Up|version=0.3.20[.1]}} || 2011-03-09 21:00:11 || Yes&lt;br /&gt;
|-&lt;br /&gt;
| nat.router.dashjr.org || Luke-Jr || 71.1.73.218 || {{Table Value No}} || {{Fallback Nodes/Node Up|version=0.3.20[.1]}} || 2011-03-09 21:00:09 || ?&lt;br /&gt;
|-&lt;br /&gt;
| bitcoin.sipa.be || sipa || 178.18.90.41 || {{Table Value Yes}} || {{Fallback Nodes/Node Up|version=0.3.19[.2]}} || 2011-03-09 21:00:09 || No&lt;br /&gt;
|-&lt;br /&gt;
| theymos.ath.cx || theymos || 99.27.237.13 || {{Table Value Unknown}} || {{Fallback Nodes/Node Up|version=0.3.19[.2]}} || 2011-03-09 21:00:09 || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 109.75.176.193 || MagicalTux [DE] || 109.75.176.193 || {{Table Value Yes}} || {{Fallback Nodes/Node Up|version=0.3.19}} || 2011-03-09 21:00:09 || No&lt;br /&gt;
|-&lt;br /&gt;
| bitcoins.ca || humble || 142.58.248.28 || {{Table Value Yes}} || {{Fallback Nodes/Node Up|version=0.3.19}} || 2011-03-09 21:00:09 || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 174.120.185.74 || MagicalTux [US] || 174.120.185.74 || {{Table Value Yes}} || {{Fallback Nodes/Node Up|version=0.3.19}} || 2011-03-09 21:00:09 || No&lt;br /&gt;
|-&lt;br /&gt;
| 178.63.62.15 || MagicalTux [DE] || 178.63.62.15 || {{Table Value Yes}} || {{Fallback Nodes/Node Up|version=0.3.19}} || 2011-03-09 21:00:10 || No&lt;br /&gt;
|-&lt;br /&gt;
| lyasoff.com || ? || 200.35.150.50 || {{Table Value Yes}} || {{Fallback Nodes/Node Up|version=0.3.19}} || 2011-03-09 21:00:10 || ?&lt;br /&gt;
|-&lt;br /&gt;
| bitlex.co.cc || BitLex || 78.34.69.123 || {{Table Value No}} || {{Fallback Nodes/Node Up|version=0.3.19}} || 2011-03-09 21:00:10 || Yes&lt;br /&gt;
|-&lt;br /&gt;
| fallback.bitcoin.me.uk || Vladimir || 142.58.248.28 || {{Table Value No}} || {{Fallback Nodes/Node Up|version=0.3.19}} || 2011-03-09 21:00:10 || No&lt;br /&gt;
|-&lt;br /&gt;
| 74.82.216.10 || thufir || 74.82.216.10 || {{Table Value Yes}} || {{Fallback Nodes/Node Up|version=0.3.10}} || 2011-03-09 21:00:11 || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 74.57.236.239 || ? || 74.57.236.239 || {{Table Value Yes}} || {{Fallback Nodes/Node Old|version=0.3.0}} || 2011-03-09 21:00:11 || ?&lt;br /&gt;
|-&lt;br /&gt;
| bitcoin.samara-lab.ru || m0Ray&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- END NODELIST --&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Tor nodes ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Hostname !! Owner !! Status !! Last Seen (GMT) !! Accepts IP transactions&lt;br /&gt;
|-&lt;br /&gt;
| ijzt2eeizty3p5xe.onion || ? || ? || 2011-02-11 || Yes&lt;br /&gt;
|-&lt;br /&gt;
| j43z65b6r2usg3vk.onion || Dybbuk || ? || 2011-02-11 || Yes&lt;br /&gt;
|-&lt;br /&gt;
| pvuif6nonbhj3o3r.onion || ? || ? || 2011-02-11 || Yes&lt;br /&gt;
|-&lt;br /&gt;
| c5qvugpewwyyy5oz.onion || ? || ? || 2011-02-11 || Yes&lt;br /&gt;
|-&lt;br /&gt;
| vso3r6cmjoomhhgg.onion || echelon || ? || 2011-02-11 || Yes&lt;br /&gt;
|-&lt;br /&gt;
| rnam4cxam62nkcyf.onion || BitLex || ? || 2011-02-11 || Yes&lt;br /&gt;
|-&lt;br /&gt;
| bitcoinbudtoeks7.onion || ? || ? || 2011-02-11 || ?&lt;br /&gt;
|-&lt;br /&gt;
| iy6ni3wkqazp4ytu.onion || ? || ? || 2011-02-11 || ?&lt;br /&gt;
|-&lt;br /&gt;
| h4kklwodpcmo6cbq.onion || ? || ? || 2011-02-11 || ?&lt;br /&gt;
|-&lt;br /&gt;
| vv6kcfscuntybrzm.onion || ? || ? || 2011-02-11 || ?&lt;br /&gt;
|-&lt;br /&gt;
| nlnsivjku4x4lu5n.onion || ? || ? || 2011-02-11 || ?&lt;br /&gt;
|-&lt;br /&gt;
| xqzfakpeuvrobvpj.onion || ? || ? || 2010-11-13 || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Adding a node ==&lt;br /&gt;
&lt;br /&gt;
Before adding yourself as a fallback node, you should be sure your node will stay online for a long time. If a node is offline for more than 24 hours it will be removed from the list. To accept IP transactions you will have to add the &#039;&#039;-allowreceivebyip&#039;&#039; flag to your command line parameters.&lt;br /&gt;
&lt;br /&gt;
To add a node in this list, you just need the ip/hostname and your name, the other fields will be filled automatically. Insert the following lines before the &amp;lt;tt&amp;gt;END NODELIST&amp;lt;/tt&amp;gt; line:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;|-&lt;br /&gt;
| ip || your name&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that a bot will connect to your node every hour to check its status and version.&lt;/div&gt;</summary>
		<author><name>M0Ray</name></author>
	</entry>
</feed>