summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Todd <pete@petertodd.org>2013-10-21 02:18:47 -0400
committerPeter Todd <pete@petertodd.org>2013-10-21 02:18:47 -0400
commitd9e890a8f27e46806238e298a346397871fd7e87 (patch)
tree522a1bc5c5e064df296ac2142cf9ed573b57c706
parent3b0e74507e865d6a847aed71790bf1fb72cbc5f1 (diff)
downloadbips-d9e890a8f27e46806238e298a346397871fd7e87.tar.xz
Fix formatting
-rw-r--r--README.mediawiki4
-rw-r--r--bip-0001.mediawiki14
-rw-r--r--bip-0001/process.png (renamed from bip-0001-1.png)bin20813 -> 20813 bytes
-rw-r--r--bip-0010.mediawiki25
-rw-r--r--bip-0011.mediawiki4
-rw-r--r--bip-0012.mediawiki4
-rw-r--r--bip-0013.mediawiki14
-rw-r--r--bip-0014.mediawiki4
-rw-r--r--bip-0015.mediawiki60
-rw-r--r--bip-0016.mediawiki8
-rw-r--r--bip-0017.mediawiki8
-rw-r--r--bip-0018.mediawiki10
-rw-r--r--bip-0019.mediawiki6
-rw-r--r--bip-0020.mediawiki30
-rw-r--r--bip-0021.mediawiki15
-rw-r--r--bip-0022.mediawiki16
-rw-r--r--bip-0023.mediawiki12
-rw-r--r--bip-0030.mediawiki6
-rw-r--r--bip-0031.mediawiki6
-rw-r--r--bip-0032.mediawiki17
-rw-r--r--bip-0032/derivation.pngbin0 -> 166153 bytes
-rw-r--r--bip-0033.mediawiki2
-rw-r--r--bip-0034.mediawiki6
-rw-r--r--bip-0035.mediawiki6
-rw-r--r--bip-0036.mediawiki6
-rw-r--r--bip-0037.mediawiki6
-rw-r--r--bip-0039.mediawiki2
-rw-r--r--bip-0050.mediawiki2
-rw-r--r--bip-0060.mediawiki12
-rw-r--r--bip-0070.mediawiki14
-rw-r--r--bip-0070/Protocol_Sequence.pngbin0 -> 29564 bytes
-rw-r--r--bip-0071.mediawiki4
-rw-r--r--bip-0072.mediawiki3
-rw-r--r--bip-0073.mediawiki43
-rw-r--r--bip-0073/a.pngbin0 -> 674 bytes
-rw-r--r--bip-0073/b.pngbin0 -> 514 bytes
36 files changed, 129 insertions, 240 deletions
diff --git a/README.mediawiki b/README.mediawiki
index 83648a6..6405b42 100644
--- a/README.mediawiki
+++ b/README.mediawiki
@@ -1,10 +1,10 @@
-People wishing to submit BIPs, first should propose their idea or document to the mailing list. After discussion they should email Greg Maxwell <gmaxwell@gmail.com>. After copy-editing and acceptance, it will be published here.
+People wishing to submit BIPs, first should propose their idea or document to the mailing list. After discussion they should email Greg Maxwell &lt;gmaxwell@gmail.com&gt;. After copy-editing and acceptance, it will be published here.
We are fairly liberal with approving BIPs, and try not to be too involved in decision making on behalf of the community. The exception is in very rare cases of dispute resolution when a decision is contentious and cannot be agreed upon. In those cases, the conservative option will always be preferred.
Having a BIP here does not make it a formally accepted standard until its status becomes Active. For a BIP to become Active requires the mutual consent of the community.
-Those proposing changes should consider that ultimately consent may rest with the consensus of the Bitcoin users (see also: [[economic majority]]).
+Those proposing changes should consider that ultimately consent may rest with the consensus of the Bitcoin users (see also: [https://en.bitcoin.it/wiki/Economic_majority economic majority]).
{| class="wikitable sortable" style="width: auto; text-align: center; font-size: smaller; table-layout: fixed;"
!Number
diff --git a/bip-0001.mediawiki b/bip-0001.mediawiki
index b0662ca..3661daf 100644
--- a/bip-0001.mediawiki
+++ b/bip-0001.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 1
Title: BIP Purpose and Guidelines
@@ -26,7 +24,7 @@ There are three kinds of BIP:
==BIP Work Flow==
-The BIP editors assign BIP numbers and change their status. Please send all BIP-related email to <gmaxwell@gmail.com> (no cross-posting please). Also see BIP Editor Responsibilities & Workflow below.
+The BIP editors assign BIP numbers and change their status. Please send all BIP-related email to gmaxwell@gmail.com (no cross-posting please). Also see BIP Editor Responsibilities & Workflow below.
The BIP process begins with a new idea for Bitcoin. It is highly recommended that a single BIP contain a single key proposal or new idea. Small enhancements or patches often don't need a BIP and can be injected into the Bitcoin development work flow with a patch submission to the Bitcoin issue tracker. The more focused the BIP, the more successful it tends to be. The BIP editor reserves the right to reject BIP proposals if they appear too unfocused or too broad. If in doubt, split your BIP into several well-focused ones.
@@ -36,7 +34,7 @@ Vetting an idea publicly before going as far as writing a BIP is meant to save t
Once the champion has asked the Bitcoin community as to whether an idea has any chance of acceptance, a draft BIP should be presented to [http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development bitcoin-development@lists.sourceforge.net]. This gives the author a chance to flesh out the draft BIP to make properly formatted, of high quality, and to address initial concerns about the proposal.
-Following a discussion, the proposal should be sent to the Bitcoin-dev list with the draft BIP and the BIP editors <gmaxwell@gmail.com>. This draft must be written in BIP style as described below, else it will be sent back without further regard until proper formatting rules are followed.
+Following a discussion, the proposal should be sent to the Bitcoin-dev list with the draft BIP and the BIP editors gmaxwell@gmail.com. This draft must be written in BIP style as described below, else it will be sent back without further regard until proper formatting rules are followed.
If the BIP editor approves, he will assign the BIP a number, label it as Standards Track, Informational, or Process, give it status "Draft", and create and create a page for it on the [[Bitcoin_Improvement_Proposals|Bitcoin Wiki]]. The BIP editor will not unreasonably deny a BIP. Reasons for denying BIP status include duplication of effort, being technically unsound, not providing proper motivation or addressing backwards compatibility, or not in keeping with the Bitcoin philosophy.
@@ -58,7 +56,7 @@ BIPs can also be superseded by a different BIP, rendering the original obsolete.
The possible paths of the status of BIPs are as follows:
-[[File:BIP-0001-Process.png]]
+<img src=bip-0001/process.png></img>
Some Informational and Process BIPs may also have a status of "Active" if they are never meant to be completed. E.g. BIP 1 (this BIP).
@@ -140,10 +138,10 @@ BIPs may include auxiliary files such as diagrams. Such files must be named BIP-
It occasionally becomes necessary to transfer ownership of BIPs to a new champion. In general, we'd like to retain the original author as a co-author of the transferred BIP, but that's really up to the original author. A good reason to transfer ownership is because the original author no longer has the time or interest in updating it or following through with the BIP process, or has fallen off the face of the 'net (i.e. is unreachable or not responding to email). A bad reason to transfer ownership is because you don't agree with the direction of the BIP. We try to build consensus around a BIP, but if that's not possible, you can always submit a competing BIP.
-If you are interested in assuming ownership of a BIP, send a message asking to take over, addressed to both the original author and the BIP editor <gmaxwell@gmail.com>. If the original author doesn't respond to email in a timely manner, the BIP editor will make a unilateral decision (it's not like such decisions can't be reversed :).
+If you are interested in assuming ownership of a BIP, send a message asking to take over, addressed to both the original author and the BIP editor gmaxwell@gmail.com. If the original author doesn't respond to email in a timely manner, the BIP editor will make a unilateral decision (it's not like such decisions can't be reversed :).
BIP Editor Responsibilities & Workflow
-A BIP editor must subscribe to the <gmaxwell@gmail.com> list. All BIP-related correspondence should be sent (or CC'd) to <gmaxwell@gmail.com> (but please do not cross-post!).
+A BIP editor must subscribe to the gmaxwell@gmail.com list. All BIP-related correspondence should be sent (or CC'd) to gmaxwell@gmail.com (but please do not cross-post!).
For each new BIP that comes in an editor does the following:
@@ -170,5 +168,3 @@ The editors don't pass judgement on BIPs. We merely do the administrative & edit
==History==
This document was derived heavily from Python's PEP-0001. In many places text was simply copied and modified. Although the PEP-0001 text was written by Barry Warsaw, Jeremy Hylton, and David Goodger, they are not responsible for its use in the Bitcoin Improvement Process, and should not be bothered with technical questions specific to Bitcoin or the BIP process. Please direct all comments to the Bitcoin editors or the forums at bitcointalk.org.
-
-[[Category:BIP|A]]
diff --git a/bip-0001-1.png b/bip-0001/process.png
index 51eb2b2..51eb2b2 100644
--- a/bip-0001-1.png
+++ b/bip-0001/process.png
Binary files differ
diff --git a/bip-0010.mediawiki b/bip-0010.mediawiki
index 2270a82..ac4f4a4 100644
--- a/bip-0010.mediawiki
+++ b/bip-0010.mediawiki
@@ -1,17 +1,15 @@
-{{bip}}
-
<pre>
BIP: 10
Title: Multi-Sig Transaction Distribution
- Author: Alan Reiner
- Status: Draft
+ Author: Alan Reiner
+ Status: Draft
Type: Informational
Created: 28-10-2011
</pre>
A multi-signature transaction is one where a certain number of Bitcoins are "encumbered" with more than one recipient address. The subsequent transaction that spends these coins will require each party involved (or some subset, depending on the script), to see the proposed transaction and sign it with their private key. This necessarily requires collaboration between all parties -- to propose a distribution of encumbered funds, collect signatures from all necessary participants, and then broadcast the completed transaction.
-This BIP describes a way standardize the encoding of proposal transactions, to assist with signature collection and broadcast (which includes regular, 1-of-1 transactions requiring signatures from an offline computer). The goal is to encourage a standard that guarantees interoperability of all programs that implement it.
+This BIP describes a way standardize the encoding of proposal transactions, to assist with signature collection and broadcast (which includes regular, 1-of-1 transactions requiring signatures from an offline computer). The goal is to encourage a standard that guarantees interoperability of all programs that implement it.
==Motivation==
@@ -22,23 +20,24 @@ In addition to providing a general encoding scheme for transaction signing/colle
==Specification==
-This BIP proposes the following process, with terms in quotes referring to recommended terminology that should be encouraged across all implementations.
+This BIP proposes the following process, with terms in quotes referring to recommended terminology that should be encouraged across all implementations.
# One party will initiate this process by creating a "Distribution Proposal", which could be abbreviated DP, or TxDP
# The user creating the TxDP (the preparer) will create the transaction as they would like to see it spent, but with blank TxIn scripts (where the signatures scripts will eventually go).
# The proposed transaction will be spending a set of unspent TxOuts available in the blockchain. The full transactions containing these TxOuts will be serialized and included, as well. This so that the values of the TxIns can be verified before signing (the prev-tx-hash is part of the data being signed, but the value is not). By including the full tx, the signing party can verify that the tx matches the OutPoint hash, and then verify input values, all without any access to the blockchain.
-# The TxDP will have an "DP ID" or "Unsigned ID" which is the hash of the proposed transaction with blanked scripts, in Base58. This is a specific naming convention to make sure it is not confused with the actual the transaction ID that it will have after it is broadcast (the transaction ID cannot be determined until after all signatures are collected). The final Tx ID can be referred to as its "Broadcast ID", in order to distinguish it from the pre-signed ID.
+# The TxDP will have an "DP ID" or "Unsigned ID" which is the hash of the proposed transaction with blanked scripts, in Base58. This is a specific naming convention to make sure it is not confused with the actual the transaction ID that it will have after it is broadcast (the transaction ID cannot be determined until after all signatures are collected). The final Tx ID can be referred to as its "Broadcast ID", in order to distinguish it from the pre-signed ID.
# The TxDP will have an potentially-unordered list of sig-pubkey pairs which represent collected signatures. If you receive a TxDP missing only your signature, you can broadcast it as soon as you sign it.
# Identical TxDP objects with different signatures can be easily combined. This allows one party to send out all the requests for signatures at once, and combine them all when they are received (instead of having to "pass it around".
# For cases where the TxDP might be put into a file or sent via email, it should use .txdp or .btcdp suffix
Anyone adopting BIP 0010 for multi-sig transactions will use the following format (without indentation):
+<pre>
'-----BEGIN-TRANSACTION-TXDPID-------'
("_TXDIST_") (magicBytes) (base58Txid) (varIntTxSize)
(serializedTxListInHex_Line1)
(serializedTxListInHex_Line2)
- (serializedTxListInHex_Line3)
+ (serializedTxListInHex_Line3)
...
("_TXINPUT_") (00) (InputValue)
("_SIG_") (AddrBase58) (SigBytes) (SigHexPart0)
@@ -50,10 +49,11 @@ Anyone adopting BIP 0010 for multi-sig transactions will use the following forma
(SigHexRemainingLines)
("_TXINPUT_") (02) (InputValue)
'-------END-TRANSACTION-TXDPID-------'
-
+</pre>
The following is an example TxDP from Armory, produced while running on the test network. Its DPID is 3fX59xPj:
+</pre>
-----BEGIN-TRANSACTION-3fX59xPj-------------------------------------------------
_TXDIST_fabfb5da_3fX59xPj_00a0
010000000292807c8e70a28c687daea2998d6273d074e56fa8a55a0b10556974cf2b526e61000000
@@ -86,8 +86,7 @@ The following is an example TxDP from Armory, produced while running on the test
456298a566aa76fefeab8a7cb7a91e8a936a11757c911b4c669f0434d12ab0936fc13986b156156f
9b389ed244bbb580112be07dbe23949a4764dffb
-------END-TRANSACTION-3fX59xPj-------------------------------------------------
-
-
+</pre>
In this transaction, there are two inputs, one of 150 BTC and the other of 12 BTC. This transaction combines 162 BTC to create two outputs, one of 160 BTC, one 1.9995 BTC, and a tx fee of 0.0005. In this TxDP, both inputs have been signed, and thus could broadcast immediately.
@@ -97,7 +96,5 @@ A party receiving this TxDP can simply add their signature to the appropriate _T
== Reference Implementation ==
-This proposal has been implemented and tested in the ''Armory'' Bitcoin software for use in offline-wallet transaction signing (as a 1-of-1 transaction), and will eventually use it for multi-signature transcations. The source code for this implementation be found in the [https://github.com/etotheipi/BitcoinArmory/blob/qtdev/armoryengine.py Armory Github project]. Specifically, the [https://github.com/etotheipi/BitcoinArmory/blob/qtdev/armoryengine.py#L4704 PyTxDistProposal class] implements all features of BIP 0010. It contains reference code for both
+This proposal has been implemented and tested in the ''Armory'' Bitcoin software for use in offline-wallet transaction signing (as a 1-of-1 transaction), and will eventually use it for multi-signature transcations. The source code for this implementation be found in the [https://github.com/etotheipi/BitcoinArmory/blob/qtdev/armoryengine.py Armory Github project]. Specifically, the [https://github.com/etotheipi/BitcoinArmory/blob/qtdev/armoryengine.py#L4704 PyTxDistProposal class] implements all features of BIP 0010. It contains reference code for both
[https://github.com/etotheipi/BitcoinArmory/blob/qtdev/armoryengine.py#L5095 serializing a TxDP] and [https://github.com/etotheipi/BitcoinArmory/blob/qtdev/armoryengine.py#L5143 unserializing a TxDP].
-
-[[Category:BIP|D]]
diff --git a/bip-0011.mediawiki b/bip-0011.mediawiki
index b58cffb..6a4edbe 100644
--- a/bip-0011.mediawiki
+++ b/bip-0011.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 11
Title: M-of-N Standard Transactions
@@ -58,5 +56,3 @@ https://github.com/gavinandresen/bitcoin-git/tree/op_eval
== Post History ==
* [https://bitcointalk.org/index.php?topic=46538 OP_EVAL proposal]
-
-[[Category:BIP|C]]
diff --git a/bip-0012.mediawiki b/bip-0012.mediawiki
index 7fee6de..922283a 100644
--- a/bip-0012.mediawiki
+++ b/bip-0012.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 12
Title: OP_EVAL
@@ -83,5 +81,3 @@ https://bitcointalk.org/index.php?topic=46538
"Bitcoin Address 01" BIP
M-of-N Multisignature Transactions BIP 11
-
-[[Category:BIP|W]]
diff --git a/bip-0013.mediawiki b/bip-0013.mediawiki
index 2806584..ce71a6a 100644
--- a/bip-0013.mediawiki
+++ b/bip-0013.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 13
Title: Address Format for pay-to-script-hash
@@ -8,6 +6,7 @@
Type: Standards Track
Created: 18-10-2011
</pre>
+
==Abstract==
This BIP describes a new type of Bitcoin address to support arbitrarily complex transactions. Complexity in this context is defined as what information is needed by the recipient to respend the received coins, in contrast to needing a single ECDSA private key as in current implementations of Bitcoin.
@@ -30,7 +29,7 @@ And the 4-byte checksum is the first four bytes of the SHA256 hash of the versio
==Rationale==
-One criticism is that bitcoin addresses should be deprecated in favor of a more user-friendly mechanism for payments, and that this will just encourage continued use of a poorly designed mechanism.
+One criticism is that bitcoin addresses should be deprecated in favor of a more user-friendly mechanism for payments, and that this will just encourage continued use of a poorly designed mechanism.
Another criticism is that bitcoin addresses are inherently insecure because there is no identity information tied to them; if you only have a bitcoin address, how can you be certain that you're paying who or what you think you're paying?
@@ -52,9 +51,6 @@ See base58.cpp1/base58.h at https://github.com/bitcoin/bitcoin/src
==See Also==
-* [[BIP 0012|BIP 12: OP_EVAL, the original P2SH design]]
-* [[BIP 0016|BIP 16: Pay to Script Hash (aka "/P2SH/")]]
-* [[BIP 0017|BIP 17: OP_CHECKHASHVERIFY, another P2SH design]]
-
-[[Category:BIP|D]]
-[[Category:Security]]
+* [[bip-0012.mediawiki|BIP 12: OP_EVAL, the original P2SH design]]
+* [[bip-0016.mediawiki|BIP 16: Pay to Script Hash (aka "/P2SH/")]]
+* [[bip-0017.mediawiki|BIP 17: OP_CHECKHASHVERIFY, another P2SH design]]
diff --git a/bip-0014.mediawiki b/bip-0014.mediawiki
index d95ecb0..8673d29 100644
--- a/bip-0014.mediawiki
+++ b/bip-0014.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 14
Title: BIP Protocol Version and User Agent
@@ -89,5 +87,3 @@ They should not be misused beyond what is specified in this section.
== Timeline ==
When this document was published, the bitcoin protocol and Satoshi client versions were currently at 0.5 and undergoing changes. In order to minimise disruption and allow the undergoing changes to be completed, the next protocol version at 0.6 became peeled from the client version (also at 0.6). As of that time (January 2012), protocol and implementation version numbers are distinct from each other.
-
-[[Category:BIP|C]]
diff --git a/bip-0015.mediawiki b/bip-0015.mediawiki
index 9750c8b..1ec6f12 100644
--- a/bip-0015.mediawiki
+++ b/bip-0015.mediawiki
@@ -1,15 +1,13 @@
-{{bip}}
-
<pre>
BIP: 15
Title: BIP Aliases
Author: Amir Taaki <genjix@riseup.net>
- Status: Deferred
+ Status: Deferred
Type: Standards Track
Created: 10-12-2011
</pre>
-[[BIP 0070]] (payment protocol) may be seen as the alternative to Aliases.
+[[bip-0070.mediawiki|BIP 0070]] (payment protocol) may be seen as the alternative to Aliases.
Using vanilla bitcoin, to send funds to a destination, an address in the form 1Hd44nkJfNAcPJeZyrGC5sKJS1TzgmCTjjZ is needed. The problem with using addresses is they are not easy to remember. An analogy can be thought if one were required to enter the IP address of their favourite websites if domain names did not exist.
@@ -97,7 +95,7 @@ It also scales reasonably- anybody wishing to run a naming service can attach a
A naive implementation is provided below as an example.
-<source lang="cpp">
+<pre>
// resolv.h
#ifndef NOMRESOLV_H__
#define NOMRESOLV_H__
@@ -151,7 +149,7 @@ private:
bool Perform();
// CURL error message
- char pErrorBuffer[CURL_ERROR_SIZE];
+ char pErrorBuffer[CURL_ERROR_SIZE];
// CURL response
string strBuffer;
// CURL handle
@@ -159,9 +157,9 @@ private:
};
#endif
-</source>
+</pre>
-<source lang="cpp">
+<pre>
// resolv.cpp
#include "resolv.h"
@@ -170,16 +168,16 @@ private:
#include "access.h"
// callback used to write response from the server
-static int writer(char *pData, size_t nSize, size_t nNmemb, std::string *pBuffer)
-{
- int nResult = 0;
- if (pBuffer != NULL)
- {
- pBuffer->append(pData, nSize * nNmemb);
- // How much did we write?
- nResult = nSize * nNmemb;
- }
- return nResult;
+static int writer(char *pData, size_t nSize, size_t nNmemb, std::string *pBuffer)
+{
+ int nResult = 0;
+ if (pBuffer != NULL)
+ {
+ pBuffer->append(pData, nSize * nNmemb);
+ // How much did we write?
+ nResult = nSize * nNmemb;
+ }
+ return nResult;
}
NameResolutionService::NameResolutionService()
@@ -187,17 +185,17 @@ NameResolutionService::NameResolutionService()
// Initialise CURL with our various options.
curl = curl_easy_init();
// This goes first in case of any problems below. We get an error message.
- curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, pErrorBuffer);
+ curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, pErrorBuffer);
// fail when server sends >= 404
- curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
- curl_easy_setopt(curl, CURLOPT_HEADER, 0);
- curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
+ curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
+ curl_easy_setopt(curl, CURLOPT_HEADER, 0);
+ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_302);
- curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writer);
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writer);
curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1);
// server response goes in strBuffer
- curl_easy_setopt(curl, CURLOPT_WRITEDATA, &strBuffer);
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, &strBuffer);
pErrorBuffer[0] = '\0';
}
NameResolutionService::~NameResolutionService()
@@ -215,7 +213,7 @@ void NameResolutionService::ExplodeHandle(const string& strHandle, string& strNi
bool NameResolutionService::Perform()
{
// Called after everything has been setup. This actually does the request.
- CURLcode result = curl_easy_perform(curl);
+ CURLcode result = curl_easy_perform(curl);
return (result == CURLE_OK);
}
@@ -235,7 +233,7 @@ string NameResolutionService::FetchAddress(const string& strHandle, string& strA
// construct url for GET request
string strRequestUrl = strDomain + "/bitcoin-alias/?handle=" + pszEncodedNick;
// Pass URL to CURL
- curl_easy_setopt(curl, CURLOPT_URL, strRequestUrl.c_str());
+ curl_easy_setopt(curl, CURLOPT_URL, strRequestUrl.c_str());
if (!Perform())
return pErrorBuffer;
// Server should respond with a JSON that has the address in.
@@ -279,7 +277,7 @@ const Object CheckMaybeThrow(const string& strJsonIn)
// Now check for a key called "error"
const Value& error = find_value(request, "error");
// It's an error JSON! so propagate the error.
- if (error.type() != null_type)
+ if (error.type() != null_type)
throw JSONRPCError(-4, error.get_str());
// Return JSON object
return request;
@@ -290,7 +288,7 @@ const string CollectAddress(const string& strIn)
// If the handle does not have an @ in it, then it's a normal base58 bitcoin address
if (strIn.find('@') == (size_t)-1)
return strIn;
-
+
// Open the lookup service
NameResolutionService ns;
// We established that the input string is not a BTC address, so we use it as a handle now.
@@ -314,7 +312,7 @@ Value rpc_send(const Array& params, bool fHelp)
throw runtime_error(
"send <name@domain or address> <amount>\n"
"<amount> is a real and is rounded to the nearest 0.01");
-
+
// Intelligent function which looks up address given handle, or returns address
string strAddy = CollectAddress(params[0].get_str());
int64 nAmount = AmountFromValue(params[1]);
@@ -327,7 +325,7 @@ Value rpc_send(const Array& params, bool fHelp)
}
...
-</source>
+</pre>
=== IP Transactions ===
@@ -369,7 +367,7 @@ Two examples are presented below. The first shows a simpler format, while the se
'''More possibilities :'''
-* Allow to securely use '''unsecured channels'''
+* Allow to securely use '''unsecured channels'''
You can put an url and a bitcoin address that will be used to sign the result. It means that a query to this url will return a bitcoin address and a signature. Bitcoin can then check (with the verify_message function) that the returned address has not been replaced by another one.
$ namecoind name_show id/khal
{
diff --git a/bip-0016.mediawiki b/bip-0016.mediawiki
index 3034f67..c99f5e1 100644
--- a/bip-0016.mediawiki
+++ b/bip-0016.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 16
Title: Pay to Script Hash
@@ -90,7 +88,7 @@ Avoiding a block-chain split by malicious pay-to-script transactions requires ca
* A pay-to-script-hash transaction that is invalid for new clients/miners but valid for old clients/miners.
-To gracefully upgrade and ensure no long-lasting block-chain split occurs, more than 50% of miners must support full validation of the new transaction type and must switch from the old validation rules to the new rules at the same time.
+To gracefully upgrade and ensure no long-lasting block-chain split occurs, more than 50% of miners must support full validation of the new transaction type and must switch from the old validation rules to the new rules at the same time.
To judge whether or not more than 50% of hashing power supports this BIP, miners are asked to upgrade their software and put the string "/P2SH/" in the input of the coinbase transaction for blocks that they create.
@@ -110,6 +108,4 @@ https://gist.github.com/gavinandresen/3966071
* [[bip-0016/qa.mediawiki|Quality Assurance test checklist]]
== References ==
-<references/>
-
-[[Category:BIP|D]]
+<references>
diff --git a/bip-0017.mediawiki b/bip-0017.mediawiki
index d10ab8a..fa13c0b 100644
--- a/bip-0017.mediawiki
+++ b/bip-0017.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 17
Title: OP_CHECKHASHVERIFY (CHV)
@@ -98,8 +96,6 @@ OP_NOP2 is used, so existing OP_EVAL (BIP 12) transactions in the block chain ca
==See Also==
-* The [[BIP 0013|Address format for Pay to Script Hash BIP]]
-* [[BIP 0011|M-of-N Multisignature Transactions (BIP 11)]]
+* The [[bip-0013.mediawiki|Address format for Pay to Script Hash BIP]]
+* [[bip-0011.mediawiki|M-of-N Multisignature Transactions (BIP 11)]]
* Example BIP 17 transaction chain: [http://blockexplorer.com/tx/b8fd633e7713a43d5ac87266adc78444669b987a56b3a65fb92d58c2c4b0e84d a] [http://blockexplorer.com/tx/eb3b82c0884e3efa6d8b0be55b4915eb20be124c9766245bcc7f34fdac32bccb b] [http://blockexplorer.com/tx/055707ce7fea7b9776fdc70413f65ceec413d46344424ab01acd5138767db137 c] [http://blockexplorer.com/tx/6d36bc17e947ce00bb6f12f8e7a56a1585c5a36188ffa2b05e10b4743273a74b d]
-
-[[Category:BIP|D]]
diff --git a/bip-0018.mediawiki b/bip-0018.mediawiki
index d102aff..c0d8082 100644
--- a/bip-0018.mediawiki
+++ b/bip-0018.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 18
Title: hashScriptCheck
@@ -123,8 +121,6 @@ https://github.com/gavinandresen/bitcoin-git/tree/pay_to_script_hash
==See Also==
-* The [[BIP 0013|Address format for Pay to Script Hash BIP]]
-* [[BIP 16|BIP 16 - Pay to Script Hash (aka "/P2SH/")]]
-* M-of-N Multisignature Transactions [[BIP 0011|BIP 11]]
-
-[[Category:BIP]]
+* The [[bip-0013.mediawiki|Address format for Pay to Script Hash BIP]]
+* [[bip-0016.mediawiki|BIP 16 - Pay to Script Hash (aka "/P2SH/")]]
+* M-of-N Multisignature Transactions [[bip-0011.mediawiki|BIP 11]]
diff --git a/bip-0019.mediawiki b/bip-0019.mediawiki
index b653de8..2255313 100644
--- a/bip-0019.mediawiki
+++ b/bip-0019.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 19
Title: M-of-N Standard Transactions (Low SigOp)
@@ -60,12 +58,10 @@ scriptSig:
==Rationale==
OP_CHECKMULTISIG is already an enabled opcode, and is the most straightforward way to support several important use cases.
-This is already specified in [[BIP 0011]].
+This is already specified in [[bip-0011.mediawiki|BIP 0011]].
However, each OP_CHECKMULTISIG counts toward the block limit as 20 sigops, which only allows 1000 total multisig transactions in a block.
Using OP_CHECKSIG only counts as 1 per signature, so can scale better.
==Implementation==
All used operations are already supported by old clients and miners as a non-standard transaction type.
-
-[[Category:BIP|C]]
diff --git a/bip-0020.mediawiki b/bip-0020.mediawiki
index 3bd2605..53823e8 100644
--- a/bip-0020.mediawiki
+++ b/bip-0020.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 20
Title: URI Scheme
@@ -57,7 +55,7 @@ Graphical bitcoin clients SHOULD register themselves as the handler for the "bit
==== Transfer amount/size ====
If an amount is provided, it may be specified either in decimal or, when prefixed with a single "x" character, hexadecimal.
-The number SHOULD be followed by "X" <digits> to signify an exponent to the base multiplier.
+The number SHOULD be followed by "X" &lt;digits&gt; to signify an exponent to the base multiplier.
Thus, "X8" multiplies your number by 100,000,000.
For decimal values, this means the standard BTC unit.
For hexadecimal values, this means ᵇTBC units (which are equivalent to 42.94967296 BTC).
@@ -94,9 +92,11 @@ Make it possible for later generations to improve our work, to mend our errors,
This section is non-normative and does not cover all possible syntax.
Please see the [[#BNF grammar|BNF grammar]] above for the normative syntax.
-[foo] means optional, <bar> are placeholders
+[foo] means optional, &lt;bar&gt; are placeholders
+<pre>
bitcoin:<address>[;version=1.0][?amount=<amount>][?label=<label>][?message=<message>][?send=<private key>]
+</pre>
=== Examples ===
@@ -129,15 +129,21 @@ Characters must be URI encoded properly.
===Sending money via private key===
To send a payment to someone else first construct a new keypair. You may want to use a [[mini private key format]], or you may also use a full private key for more security depending on the amount being sent and how long you expect to pass before a claim. Now create and publish a transaction with an output of the amount you wish to send. Use this script in that output:
+<pre>
<pubkey> OP_CHECKSIG
+</pre>
Construct an address from the public key. Encode the URI as below:
+<pre>
bitcoin:<address>?send=<base 58 encoded private key>
+</pre>
-You may optionally include amount or message fields as well. In a wallet to claim money sent this way search for an incoming transaction with the output script form above, where <address> matches the public key in the script. When you find the transaction create a claim transaction with an input script of this form:
+You may optionally include amount or message fields as well. In a wallet to claim money sent this way search for an incoming transaction with the output script form above, where &lt;address&gt; matches the public key in the script. When you find the transaction create a claim transaction with an input script of this form:
+<pre>
<sig>
+</pre>
This claims the money you were sent. Until your claim transaction has confirmed the sender may take their money back.
@@ -147,6 +153,7 @@ This claims the money you were sent. Until your claim transaction has confirmed
=== Parsing amount ===
==== ECMAScript ====
+<pre>
reAmount = /^(([\d.]+)(X(\d+))?|x([\da-f]*)(\.([\da-f]*))?(X([\da-f]+))?)$/i;
function parseAmount(txt) {
var m = txt.match(reAmount);
@@ -163,8 +170,10 @@ This claims the money you were sent. Until your claim transaction has confirmed
(m[4] ? Math.pow(10, m[4]) : 1e8)
);
}
+</pre>
==== Python ====
+<pre>
m = re.match(r'^(([\d.]+)(X(\d+))?|x([\da-f]*)(\.([\da-f]*))?(X([\da-f]+))?)$', amount, re.IGNORECASE)
if m.group(5):
amount = float(int(m.group(5), 16))
@@ -180,8 +189,10 @@ This claims the money you were sent. Until your claim transaction has confirmed
amount *= 10 ** int(m.group(4))
else:
amount *= 100000000
+</pre>
==== C# ====
+<pre>
Regex amountExpression = new Regex(@"^(([\d.]+)(X(\d+))?|x([\da-f]*)(\.([\da-f]*))?(X([\da-f]+))?)$", RegexOptions.IgnoreCase);
Match match = amountExpression.Match(value);
if (match.Success)
@@ -191,11 +202,11 @@ This claims the money you were sent. Until your claim transaction has confirmed
long hexDecimal = 0;
if (match.Groups[7].Success)
hexDecimal = Convert.ToInt64(match.Groups[7].Value, 16) * (long)Math.Pow(16, -match.Groups[7].Length);
-
+
long hexExponent = 0x10000;
if (match.Groups[9].Success)
hexExponent = (long)Math.Pow(16, Convert.ToInt32(match.Groups[9].Value, 16));
-
+
Amount = (Convert.ToInt64(match.Groups[5].Value, 16) + hexDecimal) * hexExponent;
}
else
@@ -206,7 +217,4 @@ This claims the money you were sent. Until your claim transaction has confirmed
Amount = (long)(decimal.Parse(match.Groups[2].Value) * decimalExponent);
}
}
-
-[[Category:Developer]]
-[[Category:Technical]]
-[[Category:BIP|D]]
+</pre>
diff --git a/bip-0021.mediawiki b/bip-0021.mediawiki
index c4f3ef7..8f2201b 100644
--- a/bip-0021.mediawiki
+++ b/bip-0021.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 21
Title: URI Scheme
@@ -10,7 +8,7 @@
Created: 29-01-2012
</pre>
-This BIP is a modification of an earlier [[BIP 0020]] by Luke Dashjr. BIP 0020 was based off an earlier document by Nils Schneider. The alternative payment amounts in BIP 0020 have been removed.
+This BIP is a modification of an earlier [[bip-0020.mediawiki|BIP 0020]] by Luke Dashjr. BIP 0020 was based off an earlier document by Nils Schneider. The alternative payment amounts in BIP 0020 have been removed.
==Abstract==
This BIP proposes a URI scheme for making Bitcoin payments.
@@ -72,7 +70,7 @@ Other proposed names sound much more cryptic; the chance that someone googles th
Also, very likely, what he will find are mostly technical specifications - not the best introduction to bitcoin.
==Forward compatibility==
-Variables which are prefixed with a req- are considered required. If a client does not implement any variables which are prefixed with req-, it MUST consider the entire URI invalid. Any other variables which are not implemented, but which are not prefixed with a req-, can be safely ignored.
+Variables which are prefixed with a req- are considered required. If a client does not implement any variables which are prefixed with req-, it MUST consider the entire URI invalid. Any other variables which are not implemented, but which are not prefixed with a req-, can be safely ignored.
==Backward compatibility==
As this BIP is written, several clients already implement a bitcoin: URI scheme similar to this one, however usually without the additional "req-" prefix requirement. Thus, it is recommended that additional variables prefixed with req- not be used in a mission-critical way until a grace period of 6 months from the finalization of this BIP has passed in order to allow client developers to release new versions, and users of old clients to upgrade.
@@ -82,9 +80,9 @@ As this BIP is written, several clients already implement a bitcoin: URI scheme
=== Simpler syntax ===
This section is non-normative and does not cover all possible syntax.
-Please see the [[#BNF grammar|BNF grammar]] above for the normative syntax.
+Please see the BNF grammar above for the normative syntax.
-[foo] means optional, <bar> are placeholders
+[foo] means optional, &lt;bar&gt; are placeholders
<nowiki>bitcoin:<address>[?amount=<amount>][?label=<label>][?message=<message>]</nowiki>
@@ -112,8 +110,5 @@ Characters must be URI encoded properly.
== Reference Implementations ==
=== Bitcoin clients ===
-* [[Bitcoin-Qt]] supports the old version of Bitcoin URIs (ie without the req- prefix), with Windows and KDE integration as of commit 70f55355e29c8e45b607e782c5d76609d23cc858.
+* Bitcoin-Qt supports the old version of Bitcoin URIs (ie without the req- prefix), with Windows and KDE integration as of commit 70f55355e29c8e45b607e782c5d76609d23cc858.
-[[Category:Developer]]
-[[Category:Technical]]
-[[Category:BIP|D]]
diff --git a/bip-0022.mediawiki b/bip-0022.mediawiki
index 9efc8f0..793b5f3 100644
--- a/bip-0022.mediawiki
+++ b/bip-0022.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 22
Title: getblocktemplate - Fundamentals
@@ -20,7 +18,7 @@ Instead of sending a simple block header for hashing, the entire block structure
A JSON-RPC method is defined, called "getblocktemplate".
It accepts exactly one argument, which MUST be an Object of request parameters.
-If the request parameters include a "mode" key, that is used to explicitly select between the default "template" request or a [[BIP 0023#Block Proposal|"proposal"]].
+If the request parameters include a "mode" key, that is used to explicitly select between the default "template" request or a [[bip-0023.mediawiki#Block Proposal|"proposal"]].
Block template creation can be influenced by various parameters:
{| class="wikitable"
@@ -28,7 +26,7 @@ Block template creation can be influenced by various parameters:
|-
! Key !! Required !! Type !! Description
|-
-| capabilities || {{No}} || Array of Strings || SHOULD contain a list of the following, to indicate client-side support: [[#Optional: Long Polling|"longpoll"]], "coinbasetxn", "coinbasevalue", [[BIP 0023#Block Proposal|"proposal"]], [[BIP 0023#Logical Services|"serverlist"]], "workid", and any of the [[BIP 0023#Mutations|mutations]]
+| capabilities || {{No}} || Array of Strings || SHOULD contain a list of the following, to indicate client-side support: [[#Optional: Long Polling|"longpoll"]], "coinbasetxn", "coinbasevalue", [[bip-0023.mediawiki#Block Proposal|"proposal"]], [[bip-0023.mediawiki#Logical Services|"serverlist"]], "workid", and any of the [[bip-0023.mediawiki#Mutations|mutations]]
|-
| mode || {{No}} || String || MUST be "template" or omitted
|}
@@ -53,9 +51,9 @@ getblocktemplate MUST return a JSON Object containing the following keys:
|-
| transactions || {{Yes|Should}} || Array of Objects || Objects containing [[#Transactions Object Format|information for Bitcoin transactions]] (excluding coinbase)
|-
-| version || {{Yes}} || Number || always 1 or 2 (at least for bitcoin) - clients MUST understand the implications of the version they use (eg, comply with [[BIP 0034]] for version 2)
+| version || {{Yes}} || Number || always 1 or 2 (at least for bitcoin) - clients MUST understand the implications of the version they use (eg, comply with [[bip-0034.mediawiki|BIP 0034]] for version 2)
|-
-| coinbaseaux || {{No}} || Object || data that SHOULD be included in the coinbase's scriptSig content. Only the values (hexadecimal byte-for-byte) in this Object should be included, not the keys. This does not include the block height, which is required to be included in the scriptSig by [[BIP 0034]]. It is advisable to encode values inside "PUSH" opcodes, so as to not inadvertantly expend SIGOPs (which are counted toward limits, despite not being executed).
+| coinbaseaux || {{No}} || Object || data that SHOULD be included in the coinbase's scriptSig content. Only the values (hexadecimal byte-for-byte) in this Object should be included, not the keys. This does not include the block height, which is required to be included in the scriptSig by [[bip-0034.mediawiki|BIP 0034]]. It is advisable to encode values inside "PUSH" opcodes, so as to not inadvertantly expend SIGOPs (which are counted toward limits, despite not being executed).
|-
| coinbasetxn || {{Patch|this or ↓}} || Object || [[#Transactions Object Format|information for coinbase transaction]]
|-
@@ -230,7 +228,7 @@ What is the purpose of "workid"?
* If servers allow all mutations, it may be hard to identify which job it is based on. While it may be possible to verify the submission by its content, it is much easier to compare it to the job issued. It is very easy for the miner to keep track of this. Therefore, using a "workid" is a very cheap solution to enable more mutations.
Why should "sigops" be provided for transactions?
-* Due to the [[BIP 0016]] changes regarding rules on block sigops, it is impossible to count sigops from the transactions themselves (the sigops in the scriptCheck must also be included in the count).
+* Due to the [[bip-0016.mediawiki|BIP 0016]] changes regarding rules on block sigops, it is impossible to count sigops from the transactions themselves (the sigops in the scriptCheck must also be included in the count).
==Reference Implementation==
@@ -239,6 +237,4 @@ Why should "sigops" be provided for transactions?
* [https://github.com/bitcoin/bitcoin/pull/936/files bitcoind (minimal server)]
==See Also==
-* [[BIP 0023|BIP 23: getblocktemplate - Pooled Mining]]
-
-[[Category:BIP|D]]
+* [[bip-0023.mediawiki|BIP 23: getblocktemplate - Pooled Mining]]
diff --git a/bip-0023.mediawiki b/bip-0023.mediawiki
index 90bb3d7..4cdaa31 100644
--- a/bip-0023.mediawiki
+++ b/bip-0023.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 23
Title: getblocktemplate - Pooled Mining
@@ -22,8 +20,8 @@ Note that all sections of this specification are optional extensions on top of [
Something can be said to have BIP 23 Level 1 support if it implements at least:
* [http://www.ietf.org/rfc/rfc1945.txt RFC 1945]
* [http://json-rpc.org/wiki/specification JSON-RPC 1.0]
-* [[BIP 0022|BIP 22 (non-optional sections)]]
-* [[BIP 0022#Optional: Long Polling|BIP 22 Long Polling]]
+* [[bip-0022.mediawiki|BIP 22 (non-optional sections)]]
+* [[bip-0022.mediawiki#Optional: Long Polling|BIP 22 Long Polling]]
* [[#Basic Pool Extensions|BIP 23 Basic Pool Extensions]]
* [[#Mutations|BIP 23 Mutation "coinbase/append"]]
* [[#Submission Abbreviation|BIP 23 Submission Abbreviation "submit/coinbase"]]
@@ -83,7 +81,7 @@ This is accomplished by calling getblocktemplate with two keys:
The block data MUST be validated and checked against the server's usual acceptance rules (excluding the check for a valid proof-of-work).
If it is found to be in violation of any of these rules, the server MUST return one of the following:
* Null if it is acceptable as-is, with the same workid (if any) as provided. Note that this SHOULD NOT invalidate the old template's claim to the same workid.
-* A String giving the reason for the rejection (see [[BIP 0022#Appendix: Example Rejection Reasons|example rejection reasons]]).
+* A String giving the reason for the rejection (see [[bip-0022.mediawiki#appendix-example-rejection-reasons|example rejection reasons]]).
* A "delta" block template (with changes needed); in this case, any missing keys are assumed to default to those in the proposed block or, if not applicable, the original block template it was based on. This template MAY also include a "reject-reason" key with a String of the reason for rejection.
It is RECOMMENDED that servers which merely need to track the proposed block for later share/* submissions, return a simple Object of the form:
@@ -295,6 +293,4 @@ What is the purpose of the "hash" transaction list format?
* [https://github.com/bitcoin/bitcoin/pull/936/files bitcoind]
==See Also==
-* [[BIP 0022|BIP 22: getblocktemplate - Fundamentals]]
-
-[[Category:BIP|D]]
+* [[bip-0022.mediawiki|BIP 22: getblocktemplate - Fundamentals]]
diff --git a/bip-0030.mediawiki b/bip-0030.mediawiki
index 888a576..cd725b8 100644
--- a/bip-0030.mediawiki
+++ b/bip-0030.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 30
Title: Duplicate transactions
@@ -47,7 +45,3 @@ There have been additional commits to refine the implementation of this BIP.
==Acknowledgements==
Thanks to Russell O'Connor for finding and demonstrating this problem, and helping test the patch.
-
-[[Category:Developer]]
-[[Category:Technical]]
-[[Category:BIP|D]]
diff --git a/bip-0031.mediawiki b/bip-0031.mediawiki
index 8bff5c0..2c40ead 100644
--- a/bip-0031.mediawiki
+++ b/bip-0031.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 31
Title: Pong message
@@ -38,7 +36,3 @@ Clients must opt-in to the new feature by advertising a protocol version > 60000
==Implementation==
https://github.com/bitcoin/bitcoin/pull/932/files
-
-[[Category:Developer]]
-[[Category:Technical]]
-[[Category:BIP|D]]
diff --git a/bip-0032.mediawiki b/bip-0032.mediawiki
index 794d13a..b1c598d 100644
--- a/bip-0032.mediawiki
+++ b/bip-0032.mediawiki
@@ -1,10 +1,7 @@
-{{bip}}
-
-
RECENT CHANGES:
-* [16 Apr 2013] Added private derivation for i >= 0x80000000 (less risk of parent private key leakage)
-* [30 Apr 2013] Switched from multiplication by I_L to addition of I_L (faster, easier implementation)
-* [25 May 2013] Added test vectors
+* (16 Apr 2013) Added private derivation for i >= 0x80000000 (less risk of parent private key leakage)
+* (30 Apr 2013) Switched from multiplication by I_L to addition of I_L (faster, easier implementation)
+* (25 May 2013) Added test vectors
<pre>
BIP: 32
@@ -17,7 +14,7 @@ RECENT CHANGES:
==Abstract==
-This document describes [[Deterministic Wallet|hierarchical determinstic wallets]] (or "HD Wallets"): wallets which can be shared partially or entirely with different systems, each with or without the ability to spend coins.
+This document describes hierarchical determinstic wallets (or "HD Wallets"): wallets which can be shared partially or entirely with different systems, each with or without the ability to spend coins.
The specification is intended to set a standard for deterministic wallets that can be interchanged between different clients. Although the wallets described here have many features, not all are required by supporting clients.
@@ -25,7 +22,7 @@ The specification consists of two parts. In a first part, a system for deriving
==Motivation==
-The Bitcoin reference client uses randomly generated keys. In order to avoid the necessity for a backup after every transaction, (by default) 100 keys are cached in a pool of reserve keys. Still, these wallets are not intended to be shared and used on several systems simultaneously. They support hiding their private keys by using the wallet encrypt feature and not sharing the password, but such "neutered" wallets lose the power to generate public keys as well.
+The Bitcoin reference client uses randomly generated keys. In order to avoid the necessity for a backup after every transaction, (by default) 100 keys are cached in a pool of reserve keys. Still, these wallets are not intended to be shared and used on several systems simultaneously. They support hiding their private keys by using the wallet encrypt feature and not sharing the password, but such "neutered" wallets lose the power to generate public keys as well.
Deterministic wallets do not require such frequent backups, and elliptic curve mathematics permit schemes where one can calculate the public keys without revealing the private keys. This permits for example a webshop business to let its webserver generate fresh addresses (public key hashes) for each order or for each customer, without giving the webserver access to the corresponding private keys (which are required for spending the received funds).
@@ -105,7 +102,7 @@ The first 32 bits of the identifier are called the fingerprint.
Extended public and private keys are serialized as follows:
* 4 byte: version bytes (mainnet: 0x0488B21E public, 0x0488ADE4 private; testnet: 0x043587CF public, 0x04358394 private)
-* 1 byte: depth: 0x00 for master nodes, 0x01 for level-1 descendants, ....
+* 1 byte: depth: 0x00 for master nodes, 0x01 for level-1 descendants, ....
* 4 bytes: the fingerprint of the parent's key (0x00000000 if master key)
* 4 bytes: child number. This is the number i in x<sub>i</sub> = x<sub>par</sub>/i, with x<sub>i</sub> the key being serialized. This is encoded in MSB order. (0x00000000 if master key)
* 32 bytes: the chain code
@@ -127,7 +124,7 @@ The total number of possible extended keypairs is almost 2^512, but the produced
* Use I<sub>L</sub> as master secret key, and I<sub>R</sub> as master chain code.
In case I<sub>L</sub> is 0 or >=n, the master key is invalid.
-[[File:BIP32-derivation.png]]
+<img src=bip-0032/derivation.png></img>
==Specification: Wallet structure==
diff --git a/bip-0032/derivation.png b/bip-0032/derivation.png
new file mode 100644
index 0000000..7e2e78f
--- /dev/null
+++ b/bip-0032/derivation.png
Binary files differ
diff --git a/bip-0033.mediawiki b/bip-0033.mediawiki
index 0c2548c..c5721f4 100644
--- a/bip-0033.mediawiki
+++ b/bip-0033.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 33
Title: Stratized Nodes
diff --git a/bip-0034.mediawiki b/bip-0034.mediawiki
index 19dceff..528a930 100644
--- a/bip-0034.mediawiki
+++ b/bip-0034.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 34
Title: Block v2, Height in Coinbase
@@ -32,7 +30,3 @@ All older clients are compatible with this change. Users and merchants should no
==Implementation==
https://github.com/bitcoin/bitcoin/pull/1526
-
-[[Category:Developer]]
-[[Category:Technical]]
-[[Category:BIP|D]]
diff --git a/bip-0035.mediawiki b/bip-0035.mediawiki
index 6c0e46a..cdadd1d 100644
--- a/bip-0035.mediawiki
+++ b/bip-0035.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 35
Title: mempool message
@@ -38,7 +36,3 @@ Older clients remain 100% compatible and interoperable after this change.
==Implementation==
https://github.com/bitcoin/bitcoin/pull/1641
-
-[[Category:Developer]]
-[[Category:Technical]]
-[[Category:BIP|D]]
diff --git a/bip-0036.mediawiki b/bip-0036.mediawiki
index 657d632..8b114b4 100644
--- a/bip-0036.mediawiki
+++ b/bip-0036.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 36
Title: Custom Services
@@ -153,7 +151,3 @@ Finally, this BIP defines both explicitly and implicitly some useful common nome
==Copyright==
This document is placed in the public domain.
-
-[[Category:Developer]]
-[[Category:Technical]]
-[[Category:BIP|D]]
diff --git a/bip-0037.mediawiki b/bip-0037.mediawiki
index 02ef224..7b02b07 100644
--- a/bip-0037.mediawiki
+++ b/bip-0037.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 37
Title: Connection Bloom filtering
@@ -171,7 +169,3 @@ The number of hash functions required is given by <code>S * 8 / N * log(2)</code
==Copyright==
This document is placed in the public domain.
-
-[[Category:Developer]]
-[[Category:Technical]]
-[[Category:BIP|D]]
diff --git a/bip-0039.mediawiki b/bip-0039.mediawiki
index 3c91099..27a0499 100644
--- a/bip-0039.mediawiki
+++ b/bip-0039.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: BIP-0039
Title: Mnemonic code for generating deterministic keys
diff --git a/bip-0050.mediawiki b/bip-0050.mediawiki
index bcb7342..ea5243d 100644
--- a/bip-0050.mediawiki
+++ b/bip-0050.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 50
Title: March 2013 Chain Fork Post-Mortem
diff --git a/bip-0060.mediawiki b/bip-0060.mediawiki
index d2d7818..e23ecae 100644
--- a/bip-0060.mediawiki
+++ b/bip-0060.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 60
Title: Fixed Length "version" Message (Relay-Transactions Field)
@@ -28,7 +26,7 @@ Another property of fixed-length field messages is the ability to pass stream op
==Specification==
=== version ===
-When a node creates an outgoing connection, it will immediately [[Version Handshake|advertise]] its version. The remote node will respond with its version. No futher communication is possible until both peers have exchanged their version.
+When a node creates an outgoing connection, it will immediately advertise its version. The remote node will respond with its version. No futher communication is possible until both peers have exchanged their version.
Payload:
@@ -49,11 +47,11 @@ Payload:
|-
| 8 || nonce || uint64_t || Node random nonce, randomly generated every time a version packet is sent. This nonce is used to detect connections to self.
|-
-| ? || user_agent || [[#Variable length string|var_str]] || [[BIP_0014|User Agent]] (0x00 if string is 0 bytes long)
+| ? || user_agent || var_str || [[bip-0014.mediawiki|User Agent]] (0x00 if string is 0 bytes long)
|-
| 4 || start_height || int32_t || The last block received by the emitting node
|-
-| 1 || relay || bool || Whether the remote peer should announce relayed transactions or not, see [[BIP 0037]], since version >= 70001
+| 1 || relay || bool || Whether the remote peer should announce relayed transactions or not, see [[bip-0037.mediawiki|BIP 0037]], since version >= 70001
|}
A "verack" packet shall be sent if the version packet was accepted.
@@ -90,7 +88,3 @@ Additionally the protocol version is increased from 70001 to 70002.
==Copyright==
This document is placed in the public domain.
-
-[[Category:Developer]]
-[[Category:Technical]]
-[[Category:BIP|D]]
diff --git a/bip-0070.mediawiki b/bip-0070.mediawiki
index bbbd836..7e434f9 100644
--- a/bip-0070.mediawiki
+++ b/bip-0070.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 70
Title: Payment Protocol
@@ -45,7 +43,7 @@ and PaymentACK, and begins with the customer somehow indicating that
they are ready to pay and the merchant's server responding with a
PaymentRequest message:
-[[Image:Protocol_Sequence.png]]
+<img src=bip-0070/Protocol_Sequence.png></img>
==Messages==
@@ -81,7 +79,7 @@ about the merchant and a digital signature.
optional string memo = 5;
optional string payment_url = 6;
optional bytes merchant_data = 7;
- }
+ }
</pre>
{|
| network || either "main" for payments on the production Bitcoin network, or "test" for payments on test network. If a client receives a PaymentRequest for a network it does not support it must reject the request.
@@ -110,7 +108,7 @@ A PaymentRequest is PaymentDetails optionally tied to a merchant's identity:
}
</pre>
{|
-| payment_details_version || See below for a discussion of versioning/upgrading.
+| payment_details_version || See below for a discussion of versioning/upgrading.
|-
| pki_type || public-key infrastructure (PKI) system being used to identify the merchant. All implementation should support "none", "x509+sha256" and "x509+sha1".
|-
@@ -259,9 +257,9 @@ other extensions.
==References==
-[[BIP 0071]] : Payment Protocol mime types
+[[bip-0071.mediawiki|BIP 0071]] : Payment Protocol mime types
-[[BIP 0072]] : Payment Protocol bitcoin: URI extensions
+[[bip-0072.mediawiki|BIP 0072]] : Payment Protocol bitcoin: URI extensions
Public-Key Infrastructure (X.509) working group :
http://datatracker.ietf.org/wg/pkix/charter/
@@ -282,5 +280,3 @@ ThomasV's "Signed Aliases" proposal : http://ecdsa.org/bitcoin_URIs.html
Homomorphic Payment Addresses and the Pay-to-Contract Protocol :
http://arxiv.org/abs/1212.3257
-
-[[Category:BIP]]
diff --git a/bip-0070/Protocol_Sequence.png b/bip-0070/Protocol_Sequence.png
new file mode 100644
index 0000000..f528347
--- /dev/null
+++ b/bip-0070/Protocol_Sequence.png
Binary files differ
diff --git a/bip-0071.mediawiki b/bip-0071.mediawiki
index d1e21c8..1fcb174 100644
--- a/bip-0071.mediawiki
+++ b/bip-0071.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 71
Title: Payment Protocol MIME types
@@ -46,5 +44,3 @@ following headers:
Content-Type: application/bitcoin-paymentrequest
Content-Transfer-Encoding: binary
</pre>
-
-[[Category:BIP]]
diff --git a/bip-0072.mediawiki b/bip-0072.mediawiki
index 77c1276..9909118 100644
--- a/bip-0072.mediawiki
+++ b/bip-0072.mediawiki
@@ -1,5 +1,3 @@
-{{bip}}
-
<pre>
BIP: 72
Title: bitcoin: uri extensions for Payment Protocol
@@ -60,4 +58,3 @@ Non-backwards-compatible equivalent:
<pre>
bitcoin:?request=https%3A%2F%2Fmerchant.com%2Fpay.php%3Fh%3D2a8628fc2fbe
</pre>
-[[Category:BIP]]
diff --git a/bip-0073.mediawiki b/bip-0073.mediawiki
index 07add74..4414351 100644
--- a/bip-0073.mediawiki
+++ b/bip-0073.mediawiki
@@ -1,8 +1,6 @@
-{{bip}}
-
<pre>
BIP: 73
- Title: Use "Accept" header for response type negotiation with Payment Request URLs
+ Title: Use "Accept" header for response type negotiation with Payment Request URLs
Author: Stephen Pair <stephen@bitpay.com>
Status: Draft
Type: Standards Track
@@ -11,15 +9,15 @@
==Abstract==
-This BIP describes an enhancement to the payment protocol ([[BIP 0070|BIP 70]])
+This BIP describes an enhancement to the payment protocol ([[bip-0070.mediawiki|BIP 70]])
that addresses the need for short URLs when scanning from QR codes. It
-generalizes the specification for the behavior of a payment request URL in a
-way that allows the client and server to negotiate the content of the
+generalizes the specification for the behavior of a payment request URL in a
+way that allows the client and server to negotiate the content of the
response using the HTTP Accept: header field. Specifically, the client
can indicate to the server whether it prefers to receive a bitcoin URI or
a payment request.
-Implementation of this BIP does not require full payment request ([[BIP 0070|BIP 70]]) support.
+Implementation of this BIP does not require full payment request ([[bip-0070.mediawiki|BIP 70]]) support.
==Motivation==
@@ -29,7 +27,7 @@ downloaded. This creates long URIs that, when rendered as a QR code, have
a high information density. Dense QR codes can be difficult to scan resulting
in a more frustrating user experience. The goal is to create a standard that
would allow QR scanning wallets to use less dense QR codes. It also makes
-general purpose QR code scanners more usable with bitcoin accepting
+general purpose QR code scanners more usable with bitcoin accepting
websites.
==Specification==
@@ -37,35 +35,35 @@ websites.
QR scanning wallets will consider a non bitcoin URI scanned from a QR code to
be an end point where either a bitcoin URI or a payment request can be obtained.
-A wallet client uses the Accept: HTTP header to specify whether it can accept
+A wallet client uses the Accept: HTTP header to specify whether it can accept
a payment request, a URI, or both. A media type of text/uri-list specifies that
the client accepts a bitcoin URI. A media type of application/bitcoin-paymentrequest
-specifies that the client can process a payment request. In the absence of an
-Accept: header, the server is expected to respond with text/html suitable for
+specifies that the client can process a payment request. In the absence of an
+Accept: header, the server is expected to respond with text/html suitable for
rendering in a browser. An HTML response will ensure that QR codes scanned
by non Bitcoin wallet QR scanners are useful (they could render an HTML page
with a payment link that when clicked would open a wallet on the device).
-It is not required that the client and server support the full semantics of an
+It is not required that the client and server support the full semantics of an
HTTP Accept header. If application/bitcoin-paymentrequest is specified in the
header, the server should send a payment request regardless of anything else
-specified in the Accept header. If text/uri-list is specified (but not
-application/bitcoin-paymentrequest), a valid Bitcoin URI should be returned. If
+specified in the Accept header. If text/uri-list is specified (but not
+application/bitcoin-paymentrequest), a valid Bitcoin URI should be returned. If
neither is specified, the server can return an HTML page. When a uri-list is returned
only the first item in the list is used (and expected to be a bitcoin URI), any additional
URIs should be ignored.
==Compatibility==
-Only QR scanning wallets that implement this BIP will be able to process QR
+Only QR scanning wallets that implement this BIP will be able to process QR
codes containing payment request URLs. There are two possible workarounds for QR
-scanning wallets that do not implement this BIP: 1) the server gives the user an
-option to change the QR code to a bitcoin: URI or 2) the user scans the code with
+scanning wallets that do not implement this BIP: 1) the server gives the user an
+option to change the QR code to a bitcoin: URI or 2) the user scans the code with
a generic QR code scanner.
-In the second scenario, if the server responds with a webpage containing a link
+In the second scenario, if the server responds with a webpage containing a link
to a bitcoin URI, the user can complete the payment by clicking that link provided
-the user has a wallet installed on their device and it supports bitcoin URIs. If the
+the user has a wallet installed on their device and it supports bitcoin URIs. If the
wallet/device does not have support for bitcoin URIs, the user can fall back on
address copy/paste.
@@ -74,10 +72,9 @@ implementing BIP 70 make use of the Accept: HTTP header when retrieving a
payment request.
==Examples==
-The first image below is of a bitcoin URI with an amount and payment request
-specified (note, this is a fairly minimal URI as it does not contain a
+The first image below is of a bitcoin URI with an amount and payment request
+specified (note, this is a fairly minimal URI as it does not contain a
label and the request URL is of moderate size). The second image is a QR
code with only the payment request url specified.
-[[File:BIP_0073a.png]]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[File:BIP_0073b.png]]
-[[Category:BIP]]
+<img src=bip-0073/a.png></img><img src=bip-0073/b.png></img>
diff --git a/bip-0073/a.png b/bip-0073/a.png
new file mode 100644
index 0000000..50aebbb
--- /dev/null
+++ b/bip-0073/a.png
Binary files differ
diff --git a/bip-0073/b.png b/bip-0073/b.png
new file mode 100644
index 0000000..d2e303b
--- /dev/null
+++ b/bip-0073/b.png
Binary files differ