From 8380abd7eb1177365a131254e0c373e09d2b5371 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Fri, 8 Jan 2016 17:45:00 +0000 Subject: Assign BIP 122 --- README.mediawiki | 12 ++-- bip-0122.mediawiki | 112 +++++++++++++++++++++++++++++++++ bip-0122/chainid.png | Bin 0 -> 2967 bytes bip-MarcoPon-BlockchainURI.mediawiki | 112 --------------------------------- bip-MarcoPon-BlockchainURI/chainid.png | Bin 2967 -> 0 bytes 5 files changed, 118 insertions(+), 118 deletions(-) create mode 100644 bip-0122.mediawiki create mode 100644 bip-0122/chainid.png delete mode 100644 bip-MarcoPon-BlockchainURI.mediawiki delete mode 100644 bip-MarcoPon-BlockchainURI/chainid.png diff --git a/README.mediawiki b/README.mediawiki index 9e68b02..389a727 100644 --- a/README.mediawiki +++ b/README.mediawiki @@ -362,6 +362,12 @@ Those proposing changes should consider that ultimately consent may rest with th | Standard | Draft |- +| [[bip-0122.mediawiki|121]] +| URI scheme for Blockchain references / exploration +| Marco Pontello +| Standard +| Draft +|- | [[bip-0123.mediawiki|123]] | BIP Classification | Eric Lombrozo @@ -373,12 +379,6 @@ Those proposing changes should consider that ultimately consent may rest with th | Suhas Daftuar | Standard | Draft -|- -| [[bip-MarcoPon-BlockchainURI.mediawiki| xx]] -| URI scheme for Blockchain references / exploration -| Marco Pontello -| Standard -| Draft |} diff --git a/bip-0122.mediawiki b/bip-0122.mediawiki new file mode 100644 index 0000000..902aa02 --- /dev/null +++ b/bip-0122.mediawiki @@ -0,0 +1,112 @@ +
+  BIP: 122
+  Title: URI scheme for Blockchain references / exploration
+  Author: Marco Pontello 
+  Status: Draft
+  Type: Standards Track
+  Created: 29 August 2015
+  Post-History: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-August/010712.html
+
+ +==Abstract== + +This BIP propose an URI scheme for looking up blocks, transactions, addresses on a Blockchain explorer, or in general to make proper Blockchain references + +==Motivation== + +The purpose of this URI scheme is to enable users to handle all the requests for details about blocks, transactions, etc. with their preferred tool (being that a web service or a local application). +Currently a Bitcoin client usually points to an arbitrary blockchain explorer when the user looks for the details of a transaction, or let him choose from a limited list of possible alternatives. +Other times resorting to cut&paste is needed. +The same happens with posts and messages that reference some particular txs or blocks, if they provide links at all. + +==Specification== + +The URI follow this form: + + blockchain:[//chain] + +Where: + +{| class="wikitable" +! style="text-align: center;" | Element +! colspan="2" style="text-align: center;" | Description +! +|- +| chain +| colspan="2" | '''chain ID''' (see below) of the desired chain, leading 0s included. If omitted (which would be the usual case), Bitcoin main net is assumed. +| optional +|- +| rowspan="3" | type +| tx +| for transactions. +| rowspan="3" | +|- +| block +| for blocks (supports both hash or height). +|- +| address +| for addresses. +|- +| hash +| colspan="2" | the relevant hash to refer to (leading zeros included), or block height. +| +|} + +---- +===Definition of chain ID=== + +The '''chain ID''' of a chain is the block hash of the corresponding genesis block. For forked chains, it's the block hash of the first block after fork. + +So, for example: +
+Bitcoin main   : 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f 
+Bitcoin test   : 000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943
+Bitcoin regtest: 0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206 
+
+ +An example of forked chain (Feathercoin, that forked Litecoin): + + + +
+Litecoin   : 12a765e31ffd4059bada1e25190f6e98c99d9714d334efa41a195a7e7e04bfe2
+Feathercoin: fdbe99b90c90bae7505796461471d89ae8388ab953997aa06a355bbda8d915cb
+
+ + +==Examples== + +A transaction on Bitcoin main net: + blockchain:/tx/b462ae6eb8bdae2e060239a2a3ea5d9c3e0f9ef34d9717beb2dcf0ed42cee7da + +A block on Bitcoin main net: + blockchain:/block/00000000000000000119af5bcae2926df54ae262e9071a94a99c913cc217cc72 +or + blockchain:/block/372338 + +An address on Bitcoin main net: + blockchain:/address/16EW6Rv9P9AxFDBrZV816dD4sj1EAYUX3f + +A transaction on Bitcoin test net: + blockchain://000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943/tx/3b95a766d7a99b87188d6875c8484cb2b310b78459b7816d4dfc3f0f7e04281a + +==Rationale== + +From the point of view of a wallet (or other Blockchain related tool) developer that need to show any kind of Blockchain references, using this scheme mean that he can simply make it a blockchain: link and be done with it, without having to worry about any specific Blockchain explorer or provide a means for the user to select one. + +Blockchain explorers in turn will simply offer to handle the blockchain: URI, the first time the user visit their website, or launch/install the application, or even set themselves if there isn't already one. + +Users get the convenience of using always their preferred explorer, which can be especially handy on mobile devices, where juggling with cut&paste is far from ideal. + +== Sample implementation == + +[https://github.com/MarcoPon/blockchain-exploration Demo Blockchain: URI handler on GitHub] + +==Acknowledgements== +Thanks to Btc Drak for suggesting to provide support for different networks. +Thanks to Jorge Timon for the idea of using genesis blocks hashes to identify them. +Thanks to Richard Moore, Matt Whitlock, Andreas Schildbach for suggestions about the structure and hierarchy of the URI scheme. + +==Copyright== + +This document is placed in the public domain. \ No newline at end of file diff --git a/bip-0122/chainid.png b/bip-0122/chainid.png new file mode 100644 index 0000000..ab6957a Binary files /dev/null and b/bip-0122/chainid.png differ diff --git a/bip-MarcoPon-BlockchainURI.mediawiki b/bip-MarcoPon-BlockchainURI.mediawiki deleted file mode 100644 index 2a0a659..0000000 --- a/bip-MarcoPon-BlockchainURI.mediawiki +++ /dev/null @@ -1,112 +0,0 @@ -
-  BIP: bip-MarcoPon-BlockchainURI
-  Title: URI scheme for Blockchain references / exploration
-  Author: Marco Pontello 
-  Status: Draft
-  Type: Standards Track
-  Created: 29 August 2015
-  Post-History: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-August/010712.html
-
- -==Abstract== - -This BIP propose an URI scheme for looking up blocks, transactions, addresses on a Blockchain explorer, or in general to make proper Blockchain references - -==Motivation== - -The purpose of this URI scheme is to enable users to handle all the requests for details about blocks, transactions, etc. with their preferred tool (being that a web service or a local application). -Currently a Bitcoin client usually points to an arbitrary blockchain explorer when the user looks for the details of a transaction, or let him choose from a limited list of possible alternatives. -Other times resorting to cut&paste is needed. -The same happens with posts and messages that reference some particular txs or blocks, if they provide links at all. - -==Specification== - -The URI follow this form: - - blockchain:[//chain] - -Where: - -{| class="wikitable" -! style="text-align: center;" | Element -! colspan="2" style="text-align: center;" | Description -! -|- -| chain -| colspan="2" | '''chain ID''' (see below) of the desired chain, leading 0s included. If omitted (which would be the usual case), Bitcoin main net is assumed. -| optional -|- -| rowspan="3" | type -| tx -| for transactions. -| rowspan="3" | -|- -| block -| for blocks (supports both hash or height). -|- -| address -| for addresses. -|- -| hash -| colspan="2" | the relevant hash to refer to (leading zeros included), or block height. -| -|} - ----- -===Definition of chain ID=== - -The '''chain ID''' of a chain is the block hash of the corresponding genesis block. For forked chains, it's the block hash of the first block after fork. - -So, for example: -
-Bitcoin main   : 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f 
-Bitcoin test   : 000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943
-Bitcoin regtest: 0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206 
-
- -An example of forked chain (Feathercoin, that forked Litecoin): - - - -
-Litecoin   : 12a765e31ffd4059bada1e25190f6e98c99d9714d334efa41a195a7e7e04bfe2
-Feathercoin: fdbe99b90c90bae7505796461471d89ae8388ab953997aa06a355bbda8d915cb
-
- - -==Examples== - -A transaction on Bitcoin main net: - blockchain:/tx/b462ae6eb8bdae2e060239a2a3ea5d9c3e0f9ef34d9717beb2dcf0ed42cee7da - -A block on Bitcoin main net: - blockchain:/block/00000000000000000119af5bcae2926df54ae262e9071a94a99c913cc217cc72 -or - blockchain:/block/372338 - -An address on Bitcoin main net: - blockchain:/address/16EW6Rv9P9AxFDBrZV816dD4sj1EAYUX3f - -A transaction on Bitcoin test net: - blockchain://000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943/tx/3b95a766d7a99b87188d6875c8484cb2b310b78459b7816d4dfc3f0f7e04281a - -==Rationale== - -From the point of view of a wallet (or other Blockchain related tool) developer that need to show any kind of Blockchain references, using this scheme mean that he can simply make it a blockchain: link and be done with it, without having to worry about any specific Blockchain explorer or provide a means for the user to select one. - -Blockchain explorers in turn will simply offer to handle the blockchain: URI, the first time the user visit their website, or launch/install the application, or even set themselves if there isn't already one. - -Users get the convenience of using always their preferred explorer, which can be especially handy on mobile devices, where juggling with cut&paste is far from ideal. - -== Sample implementation == - -[https://github.com/MarcoPon/blockchain-exploration Demo Blockchain: URI handler on GitHub] - -==Acknowledgements== -Thanks to Btc Drak for suggesting to provide support for different networks. -Thanks to Jorge Timon for the idea of using genesis blocks hashes to identify them. -Thanks to Richard Moore, Matt Whitlock, Andreas Schildbach for suggestions about the structure and hierarchy of the URI scheme. - -==Copyright== - -This document is placed in the public domain. \ No newline at end of file diff --git a/bip-MarcoPon-BlockchainURI/chainid.png b/bip-MarcoPon-BlockchainURI/chainid.png deleted file mode 100644 index ab6957a..0000000 Binary files a/bip-MarcoPon-BlockchainURI/chainid.png and /dev/null differ -- cgit v1.2.3