-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
90 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
html { | ||
font-family: sans-serif; | ||
margin-left: 1rem; | ||
margin-right: 1rem; | ||
} | ||
|
||
body { | ||
margin-left: auto; | ||
margin-right: auto; | ||
max-width: 100%; | ||
width: 50rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,70 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>Ordinals</title> | ||
<script defer src="index.js"></script> | ||
<link rel="stylesheet" type="text/css" href="/index.css"> | ||
</head> | ||
<body> | ||
<h1>THERE WILL ONLY EVER BE 2,099,999,997,690,000 ORDINALS</h1> | ||
<h2>List</h2> | ||
<form id="form"> | ||
<label for="outpoint">Outpoint:</label> | ||
<input type="text" id="outpoint" name="outpoint" /> | ||
<input type="submit" value="Submit" /> | ||
<div id="result"></div> | ||
</form> | ||
|
||
<p>Ordinals are identities for Bitcoin. They can be used for anything that you might want to publicly own and transfer in decentralized fashion. NFTs, accounts, domains. Whatever.</p> | ||
|
||
<p>This website, a draft BIP defining ordinals, and the <code>ord</code> command-line utility are developed on <a href="https://github.com/casey/ord">GitHub</a>.</p> | ||
|
||
<p><i>At the moment, ordinals are a fun art project. There are no wallets or markets, and there might never be. Or, they might explode in popularity and take over the world. Who can say?</i></p> | ||
|
||
<h2>What are ordinals?</h2> | ||
|
||
Ordinals are numbers, like this: 804766073970493. Every satoshi, which is ΒΉββββββββββ of a bitcoin, has an ordinal, and every ordinal has a satoshi. When a satoshi changes hands, so does its ordinal. There are a lot of satoshis, and so there are a lot of ordinals. Two quadrillion ninety-nine trillion nine hundred ninety-nine billion nine hundred ninety-seven million six hundred ninety thousand, to be precise. | ||
|
||
<h2>What can ordinals do?</h2> | ||
|
||
Ordinals can be used for anything needing a public, persistent, transferable, decentralized identity. This includes NFTs, accounts, stablecoins, PKI, and more. For more ideas, see <a href="https://github.com/casey/ord/blob/master/bip.mediawiki">the BIP</a>. | ||
|
||
<h2>What are ordinals not?</h2> | ||
|
||
Ordinals are not a side chain, do not require any changes to the bitcoin protocol, and are extremely simple. | ||
|
||
<h2>How do ordinals come into existence?</h2> | ||
|
||
Since ordinals map one-to-one to satoshis, new ordinals are created in the same way that new satoshis are created, by miners. Miners don't need to do anything special to create ordinals. | ||
|
||
Every block creates new satoshis. These new satoshis are known as the <i>block subsidy</i>. Each new satoshi in each block subsidy is assigned an ordinal, which is just a number, in the order in which it is mined. So, the genesis block subsidy, which created 50 BTC, or 5,000,000,000 satoshis, contains ordinals 0 through 4,999,999,999, and the second block subsidy, which was also worth 50 BTC, contains ordinals 5,000,000,000 through 9,999,999,999. | ||
|
||
<h2>How are ordinals transferred?</h2> | ||
|
||
Ordinals are transferred the same way that bitcoin is transferred, with bitcoin transactions. Bitcoin transactions have a bunch of inputs, which is bitcoin being sent, and a bunch of outputs, which are the bitcoin being received. Each output and each input has a value in satoshis. | ||
|
||
Ordinals transfer in first-in-first-out order. This means that you go through the ordinals in the inputs to a transaction, in order, and assign each ordinal to outputs, in order. | ||
|
||
Let's imagine a transaction with three inputs and two outputs. The inputs are on the left of the arrow and the outputs are on the right, all labeled with their values: | ||
|
||
<pre>[2] [1] [3] β [4] [2]</pre> | ||
|
||
Now let's label the same transaction with the ordinals that each input contains, and question marks for each output ordinal. Ordinals are long numbers, so let's use letters to represent them: | ||
|
||
<pre>[a b] [c] [d e f] β [? ? ? ?] [? ?]</pre> | ||
|
||
To figure out which ordinal goes to which output, go through the input ordinals in order and assign each to a question mark: | ||
|
||
<pre>[a b] [c] [d e f] β [a b c d] [e f]</pre> | ||
|
||
What about fees, you might ask? Good question! Let's imagine the same transaction, this time with a two satoshi fee. Transactions with fees send more satoshis in the inputs than are received by the outputs, so to make our transaction into one that pays fees, we'll remove the second output: | ||
|
||
<pre>[2] [1] [3] β [4]</pre> | ||
|
||
The ordinals, <var>e</var> and <var>f</var> now have nowhere to go in the outputs: | ||
|
||
<pre>[a b] [c] [d e f] β [a b c d]</pre> | ||
|
||
So go to the miner who mined the block as fees. <a href="https://github.com/casey/ord/blob/master/bip.mediawiki">The BIP</a> has more details, but in short, fees paid by transactions are treated as extra inputs to the coinbase transaction, and are ordered how their corresponding transactions are ordered in the block. The coinbase transaction of the block might look like this: | ||
|
||
<pre>[SUBSIDY] [e f] β [SUBSIDY e f]</pre> | ||
|
||
<h2>Where can I read the nitty-gritty technical details?</h2> | ||
|
||
<a href="https://github.com/casey/ord/blob/master/bip.mediawiki">The BIP!</a> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Ordinals</title> | ||
<script defer src="index.js"></script> | ||
<link rel="stylesheet" type="text/css" href="/index.css"> | ||
</head> | ||
<body> | ||
<h1>List</h1> | ||
<form id="form"> | ||
<label for="outpoint">Outpoint:</label> | ||
<input type="text" id="outpoint" name="outpoint" /> | ||
<input type="submit" value="Submit" /> | ||
<div id="result"></div> | ||
</form> | ||
</body> | ||
</html> |
File renamed without changes.