basicswap_miserver/basicswap/interface_part.py
tecnovert 18a5322f10
MSG3L
Debug mode is disabled by default.
2020-11-15 19:02:46 +02:00

37 lines
946 B
Python

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2020 tecnovert
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
from .contrib.test_framework.messages import (
CTxOutPart,
)
from .interface_btc import BTCInterface
from .chainparams import CoinInterface, Coins
from .rpc import make_rpc_func
class PARTInterface(BTCInterface):
@staticmethod
def coin_type():
return Coins.PART
@staticmethod
def witnessScaleFactor():
return 2
@staticmethod
def txVersion():
return 0xa0
def __init__(self, coin_settings, network):
self.rpc_callback = make_rpc_func(coin_settings['rpcport'], coin_settings['rpcauth'])
self.txoType = CTxOutPart
self._network = network
def getNewAddress(self, use_segwit):
return self.rpc_callback('getnewaddress', ['swap_receive'])