forked from libbitcoin/libbitcoin-explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mark as backup documentary folders that are not current.
- Loading branch information
Showing
40 changed files
with
1,326 additions
and
1,053 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
File renamed without changes
File renamed without changes
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,243 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# sx documentation build configuration file, created by | ||
# sphinx-quickstart on Fri Jan 4 11:52:36 2013. | ||
# | ||
# This file is execfile()d with the current directory set to its containing dir. | ||
# | ||
# Note that not all possible configuration values are present in this | ||
# autogenerated file. | ||
# | ||
# All configuration values have a default; values that are commented out | ||
# serve to show the default. | ||
|
||
import sys, os | ||
|
||
highlight_language = "bash" | ||
primary_domain = "bash" | ||
|
||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. If the directory is relative to the | ||
# documentation root, use os.path.abspath to make it absolute, like shown here. | ||
#sys.path.insert(0, os.path.abspath('.')) | ||
|
||
# -- General configuration ----------------------------------------------------- | ||
|
||
# If your documentation needs a minimal Sphinx version, state it here. | ||
#needs_sphinx = '1.0' | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be extensions | ||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. | ||
extensions = ['sphinx.ext.todo'] | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ['_templates'] | ||
|
||
# The suffix of source filenames. | ||
source_suffix = '.rst' | ||
|
||
# The encoding of source files. | ||
#source_encoding = 'utf-8-sig' | ||
|
||
# The master toctree document. | ||
master_doc = 'index' | ||
|
||
# General information about the project. | ||
project = u'sx' | ||
copyright = u'2013, sx' | ||
|
||
# The version info for the project you're documenting, acts as replacement for | ||
# |version| and |release|, also used in various other places throughout the | ||
# built documents. | ||
# | ||
# The short X.Y version. | ||
version = '1' | ||
# The full version, including alpha/beta/rc tags. | ||
release = '1' | ||
|
||
# The language for content autogenerated by Sphinx. Refer to documentation | ||
# for a list of supported languages. | ||
#language = None | ||
|
||
# There are two options for replacing |today|: either, you set today to some | ||
# non-false value, then it is used: | ||
#today = '' | ||
# Else, today_fmt is used as the format for a strftime call. | ||
#today_fmt = '%B %d, %Y' | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
exclude_patterns = ['_build'] | ||
|
||
# The reST default role (used for this markup: `text`) to use for all documents. | ||
#default_role = None | ||
|
||
# If true, '()' will be appended to :func: etc. cross-reference text. | ||
#add_function_parentheses = True | ||
|
||
# If true, the current module name will be prepended to all description | ||
# unit titles (such as .. function::). | ||
#add_module_names = True | ||
|
||
# If true, sectionauthor and moduleauthor directives will be shown in the | ||
# output. They are ignored by default. | ||
#show_authors = False | ||
|
||
# The name of the Pygments (syntax highlighting) style to use. | ||
pygments_style = 'sphinx' | ||
|
||
# A list of ignored prefixes for module index sorting. | ||
#modindex_common_prefix = [] | ||
|
||
|
||
# -- Options for HTML output --------------------------------------------------- | ||
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
html_theme = 'default' | ||
html_theme_options = { | ||
"collapsiblesidebar": "true" | ||
} | ||
|
||
# Add any paths that contain custom themes here, relative to this directory. | ||
#html_theme_path = [] | ||
|
||
# The name for this set of Sphinx documents. If None, it defaults to | ||
# "<project> v<release> documentation". | ||
#html_title = None | ||
|
||
# A shorter title for the navigation bar. Default is the same as html_title. | ||
#html_short_title = None | ||
|
||
# The name of an image file (relative to this directory) to place at the top | ||
# of the sidebar. | ||
#html_logo = None | ||
|
||
# The name of an image file (within the static path) to use as favicon of the | ||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 | ||
# pixels large. | ||
#html_favicon = None | ||
|
||
# Add any paths that contain custom static files (such as style sheets) here, | ||
# relative to this directory. They are copied after the builtin static files, | ||
# so a file named "default.css" will overwrite the builtin "default.css". | ||
html_static_path = ['_static'] | ||
|
||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, | ||
# using the given strftime format. | ||
#html_last_updated_fmt = '%b %d, %Y' | ||
|
||
# If true, SmartyPants will be used to convert quotes and dashes to | ||
# typographically correct entities. | ||
#html_use_smartypants = True | ||
|
||
# Custom sidebar templates, maps document names to template names. | ||
#html_sidebars = {} | ||
|
||
# Additional templates that should be rendered to pages, maps page names to | ||
# template names. | ||
#html_additional_pages = {} | ||
|
||
# If false, no module index is generated. | ||
#html_domain_indices = True | ||
|
||
# If false, no index is generated. | ||
#html_use_index = True | ||
|
||
# If true, the index is split into individual pages for each letter. | ||
#html_split_index = False | ||
|
||
# If true, links to the reST sources are added to the pages. | ||
#html_show_sourcelink = True | ||
|
||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. | ||
#html_show_sphinx = True | ||
|
||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. | ||
#html_show_copyright = True | ||
|
||
# If true, an OpenSearch description file will be output, and all pages will | ||
# contain a <link> tag referring to it. The value of this option must be the | ||
# base URL from which the finished HTML is served. | ||
#html_use_opensearch = '' | ||
|
||
# This is the file name suffix for HTML files (e.g. ".xhtml"). | ||
#html_file_suffix = None | ||
|
||
# Output file base name for HTML help builder. | ||
htmlhelp_basename = 'sxdoc' | ||
|
||
|
||
# -- Options for LaTeX output -------------------------------------------------- | ||
|
||
latex_elements = { | ||
# The paper size ('letterpaper' or 'a4paper'). | ||
#'papersize': 'letterpaper', | ||
|
||
# The font size ('10pt', '11pt' or '12pt'). | ||
#'pointsize': '10pt', | ||
|
||
# Additional stuff for the LaTeX preamble. | ||
#'preamble': '', | ||
} | ||
|
||
# Grouping the document tree into LaTeX files. List of tuples | ||
# (source start file, target name, title, author, documentclass [howto/manual]). | ||
latex_documents = [ | ||
('index', 'sx.tex', u'sx Documentation', | ||
u'sx', 'manual'), | ||
] | ||
|
||
# The name of an image file (relative to this directory) to place at the top of | ||
# the title page. | ||
#latex_logo = None | ||
|
||
# For "manual" documents, if this is true, then toplevel headings are parts, | ||
# not chapters. | ||
#latex_use_parts = False | ||
|
||
# If true, show page references after internal links. | ||
#latex_show_pagerefs = False | ||
|
||
# If true, show URL addresses after external links. | ||
#latex_show_urls = False | ||
|
||
# Documents to append as an appendix to all manuals. | ||
#latex_appendices = [] | ||
|
||
# If false, no module index is generated. | ||
#latex_domain_indices = True | ||
|
||
|
||
# -- Options for manual page output -------------------------------------------- | ||
|
||
# One entry per manual page. List of tuples | ||
# (source start file, name, description, authors, manual section). | ||
man_pages = [ | ||
('index', 'sx', u'sx Documentation', | ||
[u'Amir Taaki <[email protected]>'], 1) | ||
] | ||
|
||
# If true, show URL addresses after external links. | ||
#man_show_urls = False | ||
|
||
|
||
# -- Options for Texinfo output ------------------------------------------------ | ||
|
||
# Grouping the document tree into Texinfo files. List of tuples | ||
# (source start file, target name, title, author, | ||
# dir menu entry, description, category) | ||
texinfo_documents = [ | ||
('index', 'sx', u'sx Documentation', | ||
u'sx', 'sx', 'One line description of project.', | ||
'Miscellaneous'), | ||
] | ||
|
||
# Documents to append as an appendix to all manuals. | ||
#texinfo_appendices = [] | ||
|
||
# If false, no module index is generated. | ||
#texinfo_domain_indices = True | ||
|
||
# How to display URL addresses: 'footnote', 'no', or 'inline'. | ||
#texinfo_show_urls = 'footnote' |
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,39 @@ | ||
.. _tut-detwallet: | ||
|
||
******************** | ||
Deterministic Wallet | ||
******************** | ||
|
||
:: | ||
|
||
$ sx newseed > wallet.seed | ||
$ cat wallet.seed | ||
b220b5bd2909df1d74b71c9e664233bf | ||
$ cat wallet.seed | sx mpk > master_public.key | ||
|
||
Now you can generate your private keys for whatever number: | ||
:: | ||
|
||
$ cat wallet.seed | sx genpriv 0 | ||
5Jmb4EYzEqj63rkPwADFY7WyGV2kga3YB1HfDAzg9dHNG57NMPu | ||
$ cat wallet.seed | sx genpriv 1 | ||
5KjCYpPyxU2e88S57b1naKUsJ1JNjCudkFSQPxqcYyBYgzzahNe | ||
|
||
You can use either the master_public.key or the wallet.seed for generating | ||
Bitcoin receive addresses. But you cannot use the master_public.key for | ||
generating the private keys for spending those Bitcoins. | ||
:: | ||
|
||
$ cat master_public.key | sx genpub 0 | ||
1a4b47AC4ydSnAAcTNH1qozHq2pwJb644 | ||
$ cat wallet.seed | sx genpub 0 | ||
1a4b47AC4ydSnAAcTNH1qozHq2pwJb644 | ||
|
||
For Electrum compatible 12 word seeds, use the mnemonic tool. | ||
:: | ||
|
||
$ echo 148f0a1d77e20dbaee3ff920ca40240d | sx mnemonic | ||
people blonde admit dart couple different truth common alas stumble time cookie | ||
$ echo "people blonde admit dart couple different truth common alas stumble time cookie" | sx mnemonic | ||
148f0a1d77e20dbaee3ff920ca40240d | ||
|
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,44 @@ | ||
.. _tut-hdkeys: | ||
|
||
*************** | ||
HD Keys (BIP32) | ||
*************** | ||
|
||
HD keys come in both public and private flavors, which can be serialized into base58. It is farily easy to see which is which by looking at the prefix: | ||
:: | ||
|
||
xpub661MyMwAqRbcFtXgS5sYJABqqG9YLmC4Q1Rdap9gSE8NqtwybGhePY2gZ29ESFjqJoCu1Rupje8YtGqsefD265TMg7usUDFdp6W1EGMcet8 | ||
|
||
xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi | ||
|
||
There are three basic operations: | ||
|
||
* Generate an HD private key from entropy (used to start the chain) | ||
* Generate an HD private key from another private HD key | ||
* Generate an HD public key from either a public or private HD key | ||
|
||
The operations for generating child keys take an integer to indicate which key is in question. If the integer is >= 2^31 (i.e. MSB set), a different (secure) derivation algorithm is used. Since typing these big numbers is hard, the command line should accept a flag like "--hard" which effectively adds 2^31 to the integer. | ||
:: | ||
|
||
$ sx hd-seed [<entropy>] | ||
xprv9s21Z... | ||
$ echo $PRIVKEY | sx hd-priv <integer> [--hard] | ||
xprv9s21Z... | ||
$ echo $PRIVKEY/$PUBKEY | sx hd-pub <integer> [--hard] | ||
xpub661MyMwA... | ||
|
||
The keys aren't provided on the command line, they come from stdin. This would allow generating deep keys like so: | ||
:: | ||
|
||
# Find m/0/0/1H: | ||
$ cat my-seed-file | sx hd-seed | sx hd-priv 0 | sx hd-priv 0 | sx hd-priv 1 --hard | ||
xpub661MyMwAqRbc... | ||
|
||
This covers the major functionality found in the BIP. On the other hand, none of the other tools in the sx suite know what to do with these keys. At the very least, we need the following two commands: | ||
:: | ||
|
||
$ echo $PRIVKEY/$PUBKEY | sx hd-to-address | ||
19z88... | ||
$ echo $PRIVKEY | sx hd-to-wif | ||
K51at409... | ||
|
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,28 @@ | ||
.. _tut-history: | ||
|
||
*************** | ||
balance/history | ||
*************** | ||
|
||
The balance/history tools use a network connection to make requests | ||
against the load balancer backend. | ||
:: | ||
|
||
$ echo 134HfD2fdeBTohfx8YANxEpsYXsv5UoWyz | sx balance | ||
100000 | ||
$ echo 134HfD2fdeBTohfx8YANxEpsYXsv5UoWyz | sx history | ||
Output Hash:Index Output Height Value (Satoshis) Spend Hash:Index Spend Height | ||
97e06e49dfdd26c5a904670971ccf4c7fe7d9da53cb379bf9b442fc9427080b3:1 247683 100000 Unspent 230529504 | ||
|
||
It's possible to run as many backend workers as you like. The | ||
load balancer (obbalancer) distributes requests evenly among the backends. | ||
Use `worker-output.sh` to view debugging info from the worker. Each worker must | ||
have its own unique copy of the blockchain database. | ||
|
||
See the Obelisk config files in `/usr/local/etc/obelisk/`. The sx config file | ||
is stored at `~/.sx.cfg` (there's an example at `/usr/local/share/sx.cfg`). | ||
You can change this configuration parameter in Obelisk using | ||
`./configure --sysconfigdir=/etc/`. By configuring different workers and load | ||
balancers, you can run multiple setups on the same host. By default, it is now | ||
pointing at my development server, but I will change this soon and migrate to | ||
a new host. Also, I make no guarantees about stability or compatibility. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,24 @@ | ||
.. _tutorial-index: | ||
|
||
########################### | ||
The sx Tutorial | ||
########################### | ||
|
||
Welcome to the online version of The sx Tutorial, a free tutorial about | ||
the sx tools for the Bitcoin cryptocurrency. | ||
|
||
sx is built using `libbitcoin <http://libbitcoin.dyne.org>`_ and `obelisk <http://libbitcoin.dyne.org/obelisk/>`_. | ||
|
||
.. toctree:: | ||
:numbered: | ||
|
||
introduction | ||
quickstart | ||
offlinetx | ||
qrcode | ||
detwallet | ||
history | ||
multisig | ||
hdkeys | ||
stealth | ||
|
Oops, something went wrong.