-
Notifications
You must be signed in to change notification settings - Fork 1
Address Bash example
ChMarina edited this page Jul 10, 2018
·
3 revisions
Repository metahashorg/crypt_example_sh contains a script file for Bash, that describes step-by-step generation of the Metahash address with OpenSSL CLI Tool.
./crypt_example.sh function [parameter]
List of functions:
generate - generate MetaHash address with OpenSSL CLI Tool
usage - display help info
fetch-balance -- get balance information. Mandatory parameters are: --net=NETWORK(dev|main) and --address=metahash_address
fetch-history -- get history for address. Mandatory parameters are: --net=NETWORK(dev|main) and --address=metahash_address
get-tx -- get transaction information. Mandatory parameters are: --net=NETWORK(dev|main) and --tx_hash=transacation_hash
get-address -- get your own metahash address. --net=NETWORK(dev|main) and --pubkey=/path/to/public_key are mandatory
prepare_transaction -- gives you json of transaction.
Mandatory parameters:
--net=NETWORK(dev|main)
--pubkey=/path/to/public_key
--privkey=/path/to/private_key
--amount=AMOUNT_TO_SEND,
--send_to=RECEPIENT_ADDRESS
Optional parameters:
--nonce=VALUE
send_transaction -- send a transaction to server.
Mandatory parameters:
--net=NETWORK(dev|main)
--pubkey=/path/to/public_key
--privkey=/path/to/private_key
--amount=AMOUNT_TO_SEND,
--send_to=RECEPIENT_ADDRESSAs a result of the script, the following files will be created:
mh.pem # private key file
mh_addr.pub # public key fileFor more information please see the repository.
