Ejemplo n.º 1
0
import mmcli
import time, getpass, decimal

if mmcli.entity != 'vendor':
    raise Exception(
        "Vendserver must be run as vendor. Modify your mm.cfg file.")
wp = getpass.getpass("Enter wallet passphrase: ")
mmcli.login(wp)
mmcli.MM_util.btcd.walletlock()

while True:
    if mmcli.checkinbox():
        mmcli.MM_util.unlockwallet(wp)

        for msginfo in mmcli.processinbox():
            if msginfo.msgname == mmcli.MM_util.ORDER:
                print "Sending CONF.."
                confhash = mmcli.createconf(msginfo.hash)
                mmcli.sendmsg(confhash, prompt=False)

            elif msginfo.msgname == mmcli.MM_util.PAY:
                print "Sending REC.."
                rechash = mmcli.createrec(msginfo.hash)
                mmcli.sendmsg(rechash, prompt=False)

        mmcli.MM_util.btcd.walletlock()

    print '.'
    time.sleep(60)
Ejemplo n.º 2
0
# LICENSE file.

import mmcli
import time, getpass

if mmcli.entity != 'mod':
    raise Exception("Modserver must be run as mod. Modify your mm.cfg file.")
wp = getpass.getpass("Enter wallet passphrase: ")
mmcli.login(wp)
mmcli.MM_util.btcd.walletlock()

intervals = 0
while True:
    mmcli.MM_util.unlockwallet(wp)
    if mmcli.checkinbox():
        mmcli.processinbox()

    if intervals % 10 == 0:
        print "Sending CAST..."
#        mmcli.modbroadcast()
    if intervals >= 30:
        print "Sending Market Offer..."
        #        mmcli.sendmarketoffer(mmcli.default_channame)
        intervals = 0

    intervals += 1
    mmcli.MM_util.btcd.walletlock()

    print '.'
    time.sleep(60)
Ejemplo n.º 3
0
# LICENSE file.

import mmcli
import time, getpass, decimal

if mmcli.entity != 'vendor':
    raise Exception("Vendserver must be run as vendor. Modify your mm.cfg file.")
wp = getpass.getpass("Enter wallet passphrase: ")
mmcli.login(wp)
mmcli.MM_util.btcd.walletlock()

while True:
    if mmcli.checkinbox():
        mmcli.MM_util.unlockwallet(wp)
        
        for msginfo in mmcli.processinbox():            
            if msginfo.msgname == mmcli.MM_util.ORDER:
                print "Sending CONF.."
                confhash = mmcli.createconf(msginfo.hash)
                mmcli.sendmsg(confhash, prompt=False)
                
            elif msginfo.msgname == mmcli.MM_util.PAY:
                print "Sending REC.."
                rechash = mmcli.createrec(msginfo.hash)
                mmcli.sendmsg(rechash, prompt=False)
                
        mmcli.MM_util.btcd.walletlock()
        
    print '.'
    time.sleep(60)