def test_sign_hash(self): signature = utils.sign_hash( hash=ORDER_HASH, private_key=PRIVATE_KEY_1 ) assert signature == ORDER_SIGNATURE signature = utils.sign_hash( hash=CANCEL_ORDER_HASH, private_key=PRIVATE_KEY_1 ) assert signature == CANCEL_ORDER_SIGNATURE
def sign_cancel_order(order_hash, private_key): cancel_order_hash = get_cancel_order_hash(order_hash) return utils.sign_hash(cancel_order_hash, private_key)
def sign_order(order, private_key): order_hash = get_order_hash(order) return utils.sign_hash(order_hash, private_key)