Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.
museack edited this page Jan 4, 2015 · 6 revisions

Welcome to the simplecoin_rpc_client wiki!

#Processing payments

  • Log into simplecoin_multi virtualenv or docker
  • cd /simplecoin_multi
  • export SIMPLECOIN_CONFIG=/simplecoin_multi/defaults.toml (should put this in bashrc or something)
  • python manage.py scheduler create_payouts (this should probably be set in cron for several times daily or whatever)
  • exit simplecoin virtualenv/docker
  • enter rpc_client virtualenv/docker
  • cd /simplecoin_rpc_client
  • python simplecoin_rpc_client/manage.py -cl /MZC-config.yml -c MZC -f pull_payouts (not sure yet if you need a separate config for each currency... you do have to specify currency on the commandline)
  • at this point, the website shows "payout pending" for miners
  • python simplecoin_rpc_client/manage.py -cl /MZC-config.yml -c MZC -f send_payout (still listed as payout pending on website)
  • python simplecoin_rpc_client/manage.py -cl /MZC-config.yml -c MZC -f associate_all (associates transaction id(s) with payments that have been processed .. website now shows "Funds sent-Pending TX confirmation" and list a TX ID)
  • python simplecoin_rpc_client/manage.py -cl /MZC-config.yml -c MZC -f confirm_trans (run this command a little while later. at XX confirmations, the web server will report successful transaction has occurred (hopefully!))

#Other commands (I'm not sure if all these work): * python simplecoin_rpc_client/manage.py -cl /config.yml (-a simulate) -c CURRENCY -f

+ associate - not how this differs from associate_all
+ get_open_trade_requests
+ close_trade_requests
+ local_associate_locked - associates a payout which is Locked and Unpaid with a TXID (individual payout ID)
+ local_associate_all_locked - same as above only all payouts in this currency that are locked and unpaid
+ reset_all_locked
+ init_db (DANGER!) - I assume this will initialize the Postgres DB that simplecoin_multi is connecting to?
+ _tabulate - display a table of payouts given a query to fetch payouts with
+ dump_incomplete - show all incomplete payouts
+ unpaid_locked
+ paid_unassoc
+ unpaid_unlocked - payouts ready to be paid out
+ dump_complete - show all payout records

simplecoin_rpc_client requires a config.yml file that will look something like this: in simplecoin_rpc_client config.yml:

sc_rpc_client:
    rpc_signature: XXXXX (this must be in sync with simplecoin's config.toml rpc_signature="XXXXX")
    rpc_url: (URL of simplecoin_multi website)
    currency_code: (ie. BTC) 
    valid_address_versions: [xx]

*note these last two aren't shown in the sc_rpc_client section in the sample config but appear to be necessary

currencies:
    enabled: True
    currency_code: (ie. BTC)
    coinserv:           (RPC connection to a coind like bitcoind)
    address: (ip address of coind)
        port: (rpc port of coind)
    username: (RPC username for coind)
    password: (RPC password for coind)
    account: (account associated with a wallet address)
    wallet-pass: (wallet passphrase)
    valid_address_versions:   (not sure if this is necessary here as it is above)
    min_confirms:
    tx_fee: 1.00000000
    min_tx_output: 0.00000001
Clone this wiki locally