forked from greenchaincoin/greenchain
-
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.
- Loading branch information
root
authored and
root
committed
Aug 15, 2018
0 parents
commit 4878432
Showing
426 changed files
with
92,785 additions
and
0 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,20 @@ | ||
Copyright (c) 2009-2013 Bitcoin Developers | ||
Copyright (c) 2018 Greenchain Developers | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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,9 @@ | ||
Building Greenchain 1.0.0 | ||
|
||
See doc/readme-qt.rst for instructions on building Greenchain 1.0.0-Qt, | ||
the intended-for-end-users, nice-graphical-interface, reference | ||
implementation of Greenchain 1.0.0. | ||
|
||
See doc/build-*.txt for instructions on building bitcoind, | ||
the intended-for-services, no-graphical-interface, reference | ||
implementation of Greenchain 1.0.0. |
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 @@ | ||
Greenchain 1.0.0 |
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,115 @@ | ||
# bash programmable completion for bitcoind(1) | ||
# Copyright (c) 2012 Christian von Roques <[email protected]> | ||
# Distributed under the MIT/X11 software license, see the accompanying | ||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
have bitcoind && { | ||
|
||
# call $bitcoind for RPC | ||
_bitcoin_rpc() { | ||
# determine already specified args necessary for RPC | ||
local rpcargs=() | ||
for i in ${COMP_LINE}; do | ||
case "$i" in | ||
-conf=*|-proxy*|-rpc*) | ||
rpcargs=( "${rpcargs[@]}" "$i" ) | ||
;; | ||
esac | ||
done | ||
$bitcoind "${rpcargs[@]}" "$@" | ||
} | ||
|
||
# Add bitcoin accounts to COMPREPLY | ||
_bitcoin_accounts() { | ||
local accounts | ||
accounts=$(_bitcoin_rpc listaccounts | awk '/".*"/ { a=$1; gsub(/"/, "", a); print a}') | ||
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) ) | ||
} | ||
|
||
_bitcoind() { | ||
local cur prev words=() cword | ||
local bitcoind | ||
|
||
# save and use original argument to invoke bitcoind | ||
# bitcoind might not be in $PATH | ||
bitcoind="$1" | ||
|
||
COMPREPLY=() | ||
_get_comp_words_by_ref -n = cur prev words cword | ||
|
||
if ((cword > 2)); then | ||
case ${words[cword-2]} in | ||
listreceivedbyaccount|listreceivedbyaddress) | ||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) | ||
return 0 | ||
;; | ||
move|setaccount) | ||
_bitcoin_accounts | ||
return 0 | ||
;; | ||
esac | ||
fi | ||
|
||
case "$prev" in | ||
backupwallet) | ||
_filedir | ||
return 0 | ||
;; | ||
setgenerate) | ||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) | ||
return 0 | ||
;; | ||
getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany) | ||
_bitcoin_accounts | ||
return 0 | ||
;; | ||
esac | ||
|
||
case "$cur" in | ||
-conf=*|-pid=*|-rpcsslcertificatechainfile=*|-rpcsslprivatekeyfile=*) | ||
cur="${cur#*=}" | ||
_filedir | ||
return 0 | ||
;; | ||
-datadir=*) | ||
cur="${cur#*=}" | ||
_filedir -d | ||
return 0 | ||
;; | ||
-*=*) # prevent nonsense completions | ||
return 0 | ||
;; | ||
*) | ||
local helpopts commands | ||
|
||
# only parse --help if senseful | ||
if [[ -z "$cur" || "$cur" =~ ^- ]]; then | ||
helpopts=$($bitcoind --help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) | ||
fi | ||
|
||
# only parse help if senseful | ||
if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then | ||
commands=$(_bitcoin_rpc help 2>/dev/null | awk '{ print $1; }') | ||
fi | ||
|
||
COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) ) | ||
|
||
# Prevent space if an argument is desired | ||
if [[ $COMPREPLY == *= ]]; then | ||
compopt -o nospace | ||
fi | ||
return 0 | ||
;; | ||
esac | ||
} | ||
|
||
complete -F _bitcoind bitcoind | ||
} | ||
|
||
# Local variables: | ||
# mode: shell-script | ||
# sh-basic-offset: 4 | ||
# sh-indent-comment: t | ||
# indent-tabs-mode: nil | ||
# End: | ||
# ex: ts=4 sw=4 et filetype=sh |
Oops, something went wrong.