|
|
|
|
@ -4,6 +4,7 @@ from __future__ import print_function
|
|
|
|
|
import base64 |
|
|
|
|
import pprint |
|
|
|
|
import sys |
|
|
|
|
import abc |
|
|
|
|
from binascii import unhexlify |
|
|
|
|
|
|
|
|
|
import btc |
|
|
|
|
@ -234,3 +235,29 @@ class Maker(object):
|
|
|
|
|
return |
|
|
|
|
assert hasattr(bci, 'get_wallet_name') |
|
|
|
|
bci.import_addresses(addr_list, bci.get_wallet_name(self.wallet)) |
|
|
|
|
|
|
|
|
|
@abc.abstractmethod |
|
|
|
|
def create_my_orders(self): |
|
|
|
|
"""Must generate a set of orders to be displayed |
|
|
|
|
according to the contents of the wallet + some algo. |
|
|
|
|
(Note: should be called "create_my_offers") |
|
|
|
|
""" |
|
|
|
|
|
|
|
|
|
@abc.abstractmethod |
|
|
|
|
def oid_to_order(self, cjorder, oid, amount): |
|
|
|
|
"""Must convert an order with an offer/order id |
|
|
|
|
into a set of utxos to fill the order. |
|
|
|
|
Also provides the output addresses for the Taker. |
|
|
|
|
""" |
|
|
|
|
|
|
|
|
|
@abc.abstractmethod |
|
|
|
|
def on_tx_unconfirmed(self, cjorder, txid, removed_utxos): |
|
|
|
|
"""Performs action on receipt of transaction into the |
|
|
|
|
mempool in the blockchain instance (e.g. announcing orders) |
|
|
|
|
""" |
|
|
|
|
|
|
|
|
|
@abc.abstractmethod |
|
|
|
|
def on_tx_confirmed(self, cjorder, confirmations, txid): |
|
|
|
|
"""Performs actions on receipt of 1st confirmation of |
|
|
|
|
a transaction into a block (e.g. announce orders) |
|
|
|
|
""" |
|
|
|
|
|