Giter Club home page Giter Club logo

hush-utils's Introduction

Hush Utilities

shield.py

Example Run

( long fields have been truncated )

$ ./shield.py --unspent=first


-- Listing Unspent Coins --

executing: ./src/hush-cli listunspent 


Result:
[
    {
        "txid": "2019...a6f1",
        "vout": 0,
        "address": "mxFMkDZu19QECvqoCn67FQgvYi2Dbsp71Y",
        "scriptPubKey": "2102...32ac",
        "amount": 50,
        "confirmations": 258,
        "spendable": true
    }
]



-- Unspent Coins Chosen --
  User's choice: first


Result:
[
    {
        "txid": "2019...a6f1",
        "vout": 0,
        "address": "mxFMkDZu19QECvqoCn67FQgvYi2Dbsp71Y",
        "scriptPubKey": "2102...32ac",
        "amount": 50,
        "confirmations": 258,
        "spendable": true
    }
]



-- Generating Address --

executing: ./src/hush-cli zcrawkeygen 


Result:
{
    "zcaddress": "20ad....1070",
    "zcsecretkey": "20e5...cc92"
}



-- Creating Raw Tx --

executing: ./src/hush-cli createrawtransaction '[{"txid":"2019...a6f1","vout":0}]' '{}' 


Result:
"0100...0000"



-- Calling zcrawpour --

executing: ./src/hush-cli zcrawpour '0100...1070":49.9}' '50' '0.1' 


Result:
{
    "encryptedbucket1": "04f7...c275",
    "encryptedbucket2": "04e5f...d2c4",
    "rawtxn": "..."
}



-- Signing Tx --

executing: ./src/hush-cli signrawtransaction '...' 


Result:
{
    "hex": "...",
    "complete": true
}



-- Sending the Tx to ourself --

executing: ./src/hush-cli sendrawtransaction '0200...330a' 


Result:
"9ae8...230b"



-- Decrypting the received Tx --

executing: ./src/hush-cli zcrawreceive '20e5...c92' '04f7...c275' 


Result:
{
    "amount": 49.9,
    "bucket": "805b...4c68",
    "exists": false
}



-- Done! --


Usage

shield.py --unspent=

This script makes public funds (utxo) into private funds. Required: --unspent= all|first|last| all = convert all unspent outputs first = convert first unspent output last = convert last unspent output txlist = one or more txid, comma separated. Optional: --fee= fee amount. default = 0 --hush-cli= path to hush-cli. default = './src/hush-cli' --verbosity= silent|results|full|debug default = full --help display usage information

Installation and Running.

 git clone or download/unzip file.
 cd hush-utils
 chmod +x shield.py
 ./shield.py --unspent=first

hush-utils's People

Contributors

lludlow avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.