diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/Bitcoin.app/Contents/Info.plist | 2 | ||||
-rw-r--r-- | contrib/BitcoinTemplate.dmg | bin | 0 -> 292309 bytes | |||
-rw-r--r-- | contrib/bitrpc/bitrpc.py | 324 | ||||
-rwxr-xr-x | contrib/create_osx_dmg.sh | 60 | ||||
-rw-r--r-- | contrib/gitian-downloader/linux-download-config (renamed from contrib/gitian-downloader/bitcoin-download-config) | 0 | ||||
-rw-r--r-- | contrib/gitian-downloader/win32-download-config | 30 | ||||
-rw-r--r-- | contrib/miniupnpc/Portfile | 43 | ||||
-rw-r--r-- | contrib/wallettools/walletchangepass.py | 5 | ||||
-rw-r--r-- | contrib/wallettools/walletunlock.py | 4 |
9 files changed, 467 insertions, 1 deletions
diff --git a/contrib/Bitcoin.app/Contents/Info.plist b/contrib/Bitcoin.app/Contents/Info.plist index a5c7da1c8f..d5a278a570 100644 --- a/contrib/Bitcoin.app/Contents/Info.plist +++ b/contrib/Bitcoin.app/Contents/Info.plist @@ -17,7 +17,7 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>0.4.00</string> + <string>0.4.1</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> diff --git a/contrib/BitcoinTemplate.dmg b/contrib/BitcoinTemplate.dmg Binary files differnew file mode 100644 index 0000000000..ca86308e05 --- /dev/null +++ b/contrib/BitcoinTemplate.dmg diff --git a/contrib/bitrpc/bitrpc.py b/contrib/bitrpc/bitrpc.py new file mode 100644 index 0000000000..b02b299177 --- /dev/null +++ b/contrib/bitrpc/bitrpc.py @@ -0,0 +1,324 @@ +from jsonrpc import ServiceProxy +import sys +import string + +# ===== BEGIN USER SETTINGS ===== +# if you do not set these you will be prompted for a password for every command +rpcuser = "" +rpcpass = "" +# ====== END USER SETTINGS ====== + + +if rpcpass == "": + access = ServiceProxy("http://127.0.0.1:8332") +else: + access = ServiceProxy("http://"+rpcuser+":"+rpcpass+"@127.0.0.1:8332") +cmd = sys.argv[1].lower() + +if cmd == "backupwallet": + try: + path = raw_input("Enter destination path/filename: ") + print access.backupwallet(path) + except: + print "\n---An error occurred---\n" + +elif cmd == "getaccount": + try: + addr = raw_input("Enter a Bitcoin address: ") + print access.getaccount(addr) + except: + print "\n---An error occurred---\n" + +elif cmd == "getaccountaddress": + try: + acct = raw_input("Enter an account name: ") + print access.getaccountaddress(acct) + except: + print "\n---An error occurred---\n" + +elif cmd == "getaddressesbyaccount": + try: + acct = raw_input("Enter an account name: ") + print access.getaddressesbyaccount(acct) + except: + print "\n---An error occurred---\n" + +elif cmd == "getbalance": + try: + acct = raw_input("Enter an account (optional): ") + mc = raw_input("Minimum confirmations (optional): ") + try: + print access.getbalance(acct, mc) + except: + print access.getbalance() + except: + print "\n---An error occurred---\n" + +elif cmd == "getblockbycount": + try: + height = raw_input("Height: ") + print access.getblockbycount(height) + except: + print "\n---An error occurred---\n" + +elif cmd == "getblockcount": + try: + print access.getblockcount() + except: + print "\n---An error occurred---\n" + +elif cmd == "getblocknumber": + try: + print access.getblocknumber() + except: + print "\n---An error occurred---\n" + +elif cmd == "getconnectioncount": + try: + print access.getconnectioncount() + except: + print "\n---An error occurred---\n" + +elif cmd == "getdifficulty": + try: + print access.getdifficulty() + except: + print "\n---An error occurred---\n" + +elif cmd == "getgenerate": + try: + print access.getgenerate() + except: + print "\n---An error occurred---\n" + +elif cmd == "gethashespersec": + try: + print access.gethashespersec() + except: + print "\n---An error occurred---\n" + +elif cmd == "getinfo": + try: + print access.getinfo() + except: + print "\n---An error occurred---\n" + +elif cmd == "getnewaddress": + try: + acct = raw_input("Enter an account name: ") + try: + print access.getnewaddress(acct) + except: + print access.getnewaddress() + except: + print "\n---An error occurred---\n" + +elif cmd == "getreceivedbyaccount": + try: + acct = raw_input("Enter an account (optional): ") + mc = raw_input("Minimum confirmations (optional): ") + try: + print access.getreceivedbyaccount(acct, mc) + except: + print access.getreceivedbyaccount() + except: + print "\n---An error occurred---\n" + +elif cmd == "getreceivedbyaddress": + try: + addr = raw_input("Enter a Bitcoin address (optional): ") + mc = raw_input("Minimum confirmations (optional): ") + try: + print access.getreceivedbyaddress(addr, mc) + except: + print access.getreceivedbyaddress() + except: + print "\n---An error occurred---\n" + +elif cmd == "gettransaction": + try: + txid = raw_input("Enter a transaction ID: ") + print access.gettransaction(txid) + except: + print "\n---An error occurred---\n" + +elif cmd == "getwork": + try: + data = raw_input("Data (optional): ") + try: + print access.gettransaction(data) + except: + print access.gettransaction() + except: + print "\n---An error occurred---\n" + +elif cmd == "help": + try: + cmd = raw_input("Command (optional): ") + try: + print access.help(cmd) + except: + print access.help() + except: + print "\n---An error occurred---\n" + +elif cmd == "listaccounts": + try: + mc = raw_input("Minimum confirmations (optional): ") + try: + print access.listaccounts(mc) + except: + print access.listaccounts() + except: + print "\n---An error occurred---\n" + +elif cmd == "listreceivedbyaccount": + try: + mc = raw_input("Minimum confirmations (optional): ") + incemp = raw_input("Include empty? (true/false, optional): ") + try: + print access.listreceivedbyaccount(mc, incemp) + except: + print access.listreceivedbyaccount() + except: + print "\n---An error occurred---\n" + +elif cmd == "listreceivedbyaddress": + try: + mc = raw_input("Minimum confirmations (optional): ") + incemp = raw_input("Include empty? (true/false, optional): ") + try: + print access.listreceivedbyaddress(mc, incemp) + except: + print access.listreceivedbyaddress() + except: + print "\n---An error occurred---\n" + +elif cmd == "listtransactions": + try: + acct = raw_input("Account (optional): ") + count = raw_input("Number of transactions (optional): ") + frm = raw_input("Skip (optional):") + try: + print access.listtransactions(acct, count, frm) + except: + print access.listtransactions() + except: + print "\n---An error occurred---\n" + +elif cmd == "move": + try: + frm = raw_input("From: ") + to = raw_input("To: ") + amt = raw_input("Amount:") + mc = raw_input("Minimum confirmations (optional): ") + comment = raw_input("Comment (optional): ") + try: + print access.move(frm, to, amt, mc, comment) + except: + print access.move(frm, to, amt) + except: + print "\n---An error occurred---\n" + +elif cmd == "sendfrom": + try: + frm = raw_input("From: ") + to = raw_input("To: ") + amt = raw_input("Amount:") + mc = raw_input("Minimum confirmations (optional): ") + comment = raw_input("Comment (optional): ") + commentto = raw_input("Comment-to (optional): ") + try: + print access.sendfrom(frm, to, amt, mc, comment, commentto) + except: + print access.sendfrom(frm, to, amt) + except: + print "\n---An error occurred---\n" + +elif cmd == "sendmany": + try: + frm = raw_input("From: ") + to = raw_input("To (in format address1:amount1,address2:amount2,...): ") + mc = raw_input("Minimum confirmations (optional): ") + comment = raw_input("Comment (optional): ") + try: + print access.sendmany(frm,to,mc,comment) + except: + print access.sendmany(frm,to) + except: + print "\n---An error occurred---\n" + +elif cmd == "sendtoaddress": + try: + to = raw_input("To (in format address1:amount1,address2:amount2,...): ") + amt = raw_input("Amount:") + comment = raw_input("Comment (optional): ") + commentto = raw_input("Comment-to (optional): ") + try: + print access.sendtoaddress(to,amt,comment,commentto) + except: + print access.sendtoaddress(to,amt) + except: + print "\n---An error occurred---\n" + +elif cmd == "setaccount": + try: + addr = raw_input("Address: ") + acct = raw_input("Account:") + print access.setaccount(addr,acct) + except: + print "\n---An error occurred---\n" + +elif cmd == "setgenerate": + try: + gen= raw_input("Generate? (true/false): ") + cpus = raw_input("Max processors/cores (-1 for unlimited, optional):") + try: + print access.setgenerate(gen, cpus) + except: + print access.setgenerate(gen) + except: + print "\n---An error occurred---\n" + +elif cmd == "settxfee": + try: + amt = raw_input("Amount:") + print access.settxfee(amt) + except: + print "\n---An error occurred---\n" + +elif cmd == "stop": + try: + print access.stop() + except: + print "\n---An error occurred---\n" + +elif cmd == "validateaddress": + try: + addr = raw_input("Address: ") + print access.validateaddress(addr) + except: + print "\n---An error occurred---\n" + +elif cmd == "walletpassphrase": + try: + pwd = raw_input("Enter wallet passphrase: ") + access.walletpassphrase(pwd, 60) + print "\n---Wallet unlocked---\n" + except: + print "\n---An error occurred---\n" + +elif cmd == "walletpassphrasechange": + try: + pwd = raw_input("Enter old wallet passphrase: ") + pwd2 = raw_input("Enter new wallet passphrase: ") + access.walletpassphrasechange(pwd, pwd2) + print + print "\n---Passphrase changed---\n" + except: + print + print "\n---An error occurred---\n" + print + +else: + print "Command not found or not supported"
\ No newline at end of file diff --git a/contrib/create_osx_dmg.sh b/contrib/create_osx_dmg.sh new file mode 100755 index 0000000000..af164e56cf --- /dev/null +++ b/contrib/create_osx_dmg.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash +# +# Creates a Bitcoin.dmg OSX file from the contrib/BitcoinTemplate.dmg file +# +# Recipe from: http://digital-sushi.org/entry/how-to-create-a-disk-image-installer-for-apple-mac-os-x/ +# +# To make a prettier BitcoinTemplate.dmg: +# + open (mount) BitcoinTemplate.dmg +# + change the file properties, icon positions, background image, etc +# + eject, then commit the changed BitcoinTemplate.dmg +# + +CWD=$(pwd) + +if [ $# -lt 1 ]; then + if [ $(basename $CWD) == "contrib" ] + then + TOP=$(dirname $CWD) + else + echo "Usage: $0 /path/to/bitcoin/tree" + exit 1 + fi +else + TOP=$1 +fi + +CONTRIB=$TOP/contrib +BUILD_DIR=/tmp/bitcoin_osx_build + +# First, compile bitcoin and bitcoind +cd "$TOP/src" +if [ ! -e bitcoin ]; then make -f makefile.osx bitcoin; fi +if [ ! -e bitcoind ]; then make -f makefile.osx bitcoind; fi +strip bitcoin bitcoind + +mkdir -p "$BUILD_DIR" +cd "$BUILD_DIR" + +rm -f Bitcoin.sparseimage +hdiutil convert "$CONTRIB/BitcoinTemplate.dmg" -format UDSP -o Bitcoin +hdiutil mount Bitcoin.sparseimage + +# Copy over placeholders in /Volumes/Bitcoin +cp "$TOP/src/bitcoind" /Volumes/Bitcoin/ +cp "$TOP/src/bitcoin" /Volumes/Bitcoin/Bitcoin.app/Contents/MacOS/ + +# Create source code .zip +cd "$TOP" +git archive -o /Volumes/Bitcoin/bitcoin.zip $(git branch 2>/dev/null|grep -e ^* | cut -d ' ' -f 2) + +# Fix permissions +chmod -Rf go-w /Volumes/Bitcoin + +cd "$BUILD_DIR" +hdiutil eject /Volumes/Bitcoin +rm -f "$CWD/Bitcoin.dmg" +hdiutil convert Bitcoin.sparseimage -format UDBZ -o "$CWD/Bitcoin.dmg" + +cd "$CWD" +rm -rf "$BUILD_DIR" diff --git a/contrib/gitian-downloader/bitcoin-download-config b/contrib/gitian-downloader/linux-download-config index d21bb07808..d21bb07808 100644 --- a/contrib/gitian-downloader/bitcoin-download-config +++ b/contrib/gitian-downloader/linux-download-config diff --git a/contrib/gitian-downloader/win32-download-config b/contrib/gitian-downloader/win32-download-config new file mode 100644 index 0000000000..c0de21c48f --- /dev/null +++ b/contrib/gitian-downloader/win32-download-config @@ -0,0 +1,30 @@ +--- +name: bitcoin +urls: +- http://bitcoin.org/bitcoin-latest-win32-gitian.zip +rss: +- url: http://sourceforge.net/api/file/index/project-id/244765/mtime/desc/limit/100/rss + xpath: //item/link/text() + pattern: bitcoin-\d+.\d+.\d+-win32-gitian.zip +signers: + 0A82509767C7D4A5D14DA2301AE1D35043E08E54: + weight: 40 + name: BlueMatt + key: bluematt + BF6273FAEF7CC0BA1F562E50989F6B3048A116B5: + weight: 40 + name: Devrandom + key: devrandom + D762373D24904A3E42F33B08B9A408E71DAAC974: + weight: 40 + name: Sipa + key: sipa + 77E72E69DA7EE0A148C06B21B34821D4944DE5F7: + weight: 40 + name: tcatm + key: tcatm + 01CDF4627A3B88AAE4A571C87588242FBE38D3A8: + weight: 40 + name: "Gavin Andresen" + key: gavinandresen +minimum_weight: 120 diff --git a/contrib/miniupnpc/Portfile b/contrib/miniupnpc/Portfile new file mode 100644 index 0000000000..133aee532c --- /dev/null +++ b/contrib/miniupnpc/Portfile @@ -0,0 +1,43 @@ +# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 +# $Id$ + +PortSystem 1.0 + +name miniupnpc +epoch 2 +version 1.6 +revision 2 +categories net +platforms darwin +license BSD +maintainers singingwolfboy openmaintainer +description Lightweight client for UPnP protocol +long_description \ + ${description} + +homepage http://miniupnp.free.fr/ +master_sites http://miniupnp.free.fr/files/download.php?file=${distname}${extract.suffix}&dummy= +checksums md5 88055f2d4a061cfd4cfe25a9eae22f67 \ + sha1 ef8f2edb17f2e7c5b8dc67ee80a65c199d823e0a \ + rmd160 d86b75b331a3fb5525c71708548f311977c0598f + +use_configure no + +variant universal {} +if {[variant_isset universal]} { + set archflags ${configure.universal_cflags} +} else { + set archflags ${configure.cc_archflags} +} + +build.args-append CC="${configure.cc} ${archflags}" + +post-patch { + reinplace "s|-Wl,-install_name,|-Wl,-install_name,${prefix}/lib/|" ${worksrcpath}/Makefile +} + +destroot.destdir PREFIX=${prefix} INSTALLPREFIX=${destroot}${prefix} + +livecheck.type regex +livecheck.url http://miniupnp.free.fr/files/ +livecheck.regex ${name}-(\\d+(\\.\\d{1,4})+)${extract.suffix} diff --git a/contrib/wallettools/walletchangepass.py b/contrib/wallettools/walletchangepass.py new file mode 100644 index 0000000000..30f3f5b26a --- /dev/null +++ b/contrib/wallettools/walletchangepass.py @@ -0,0 +1,5 @@ +from jsonrpc import ServiceProxy +access = ServiceProxy("http://127.0.0.1:8332") +pwd = raw_input("Enter old wallet passphrase: ") +pwd2 = raw_input("Enter new wallet passphrase: ") +access.walletpassphrasechange(pwd, pwd2)
\ No newline at end of file diff --git a/contrib/wallettools/walletunlock.py b/contrib/wallettools/walletunlock.py new file mode 100644 index 0000000000..f847c6fe61 --- /dev/null +++ b/contrib/wallettools/walletunlock.py @@ -0,0 +1,4 @@ +from jsonrpc import ServiceProxy +access = ServiceProxy("http://127.0.0.1:8332") +pwd = raw_input("Enter wallet passphrase: ") +access.walletpassphrase(pwd, 60)
\ No newline at end of file |