mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-06 02:38:11 +01:00
dash: Add to prepare script.
This commit is contained in:
@@ -33,6 +33,7 @@ from .interface.ltc import LTCInterface
|
||||
from .interface.nmc import NMCInterface
|
||||
from .interface.xmr import XMRInterface
|
||||
from .interface.pivx import PIVXInterface
|
||||
from .interface.dash import DASHInterface
|
||||
from .interface.passthrough_btc import PassthroughBTCInterface
|
||||
|
||||
from . import __version__
|
||||
@@ -527,6 +528,8 @@ class BasicSwap(BaseApp):
|
||||
return xmr_i
|
||||
elif coin == Coins.PIVX:
|
||||
return PIVXInterface(self.coin_clients[coin], self.chain, self)
|
||||
elif coin == Coins.DASH:
|
||||
return DASHInterface(self.coin_clients[coin], self.chain, self)
|
||||
else:
|
||||
raise ValueError('Unknown coin type')
|
||||
|
||||
@@ -545,7 +548,7 @@ class BasicSwap(BaseApp):
|
||||
authcookiepath = os.path.join(self.getChainDatadirPath(coin), '.cookie')
|
||||
|
||||
pidfilename = cc['name']
|
||||
if cc['name'] in ('bitcoin', 'litecoin', 'namecoin'):
|
||||
if cc['name'] in ('bitcoin', 'litecoin', 'namecoin', 'dash'):
|
||||
pidfilename += 'd'
|
||||
|
||||
pidfilepath = os.path.join(self.getChainDatadirPath(coin), pidfilename + '.pid')
|
||||
|
||||
@@ -29,6 +29,7 @@ class Coins(IntEnum):
|
||||
# ZANO = 9
|
||||
# NDAU = 10
|
||||
PIVX = 11
|
||||
DASH = 12
|
||||
|
||||
|
||||
chainparams = {
|
||||
@@ -247,6 +248,45 @@ chainparams = {
|
||||
'max_amount': 100000 * COIN,
|
||||
}
|
||||
},
|
||||
Coins.DASH: {
|
||||
'name': 'dash',
|
||||
'ticker': 'DASH',
|
||||
'message_magic': 'DarkCoin Signed Message:\n',
|
||||
'blocks_target': 60 * 2.5,
|
||||
'decimal_places': 8,
|
||||
'has_csv': True,
|
||||
'has_segwit': False,
|
||||
'mainnet': {
|
||||
'rpcport': 9998,
|
||||
'pubkey_address': 76,
|
||||
'script_address': 16,
|
||||
'key_prefix': 204,
|
||||
'hrp': '',
|
||||
'bip44': 5,
|
||||
'min_amount': 1000,
|
||||
'max_amount': 100000 * COIN,
|
||||
},
|
||||
'testnet': {
|
||||
'rpcport': 19998,
|
||||
'pubkey_address': 140,
|
||||
'script_address': 19,
|
||||
'key_prefix': 239,
|
||||
'hrp': '',
|
||||
'bip44': 1,
|
||||
'min_amount': 1000,
|
||||
'max_amount': 100000 * COIN,
|
||||
},
|
||||
'regtest': {
|
||||
'rpcport': 18332,
|
||||
'pubkey_address': 140,
|
||||
'script_address': 19,
|
||||
'key_prefix': 239,
|
||||
'hrp': '',
|
||||
'bip44': 1,
|
||||
'min_amount': 1000,
|
||||
'max_amount': 100000 * COIN,
|
||||
}
|
||||
}
|
||||
}
|
||||
ticker_map = {}
|
||||
|
||||
|
||||
@@ -41,3 +41,8 @@ PIVX_BINDIR = os.path.expanduser(os.getenv('PIVX_BINDIR', os.path.join(DEFAULT_T
|
||||
PIVXD = os.getenv('PIVXD', 'pivxd' + bin_suffix)
|
||||
PIVX_CLI = os.getenv('PIVX_CLI', 'pivx-cli' + bin_suffix)
|
||||
PIVX_TX = os.getenv('PIVX_TX', 'pivx-tx' + bin_suffix)
|
||||
|
||||
DASH_BINDIR = os.path.expanduser(os.getenv('DASH_BINDIR', os.path.join(DEFAULT_TEST_BINDIR, 'dash')))
|
||||
DASHD = os.getenv('DASHD', 'dashd' + bin_suffix)
|
||||
DASH_CLI = os.getenv('DASH_CLI', 'dash-cli' + bin_suffix)
|
||||
DASH_TX = os.getenv('DASH_TX', 'dash-tx' + bin_suffix)
|
||||
|
||||
18
basicswap/interface/dash.py
Normal file
18
basicswap/interface/dash.py
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (c) 2022 tecnovert
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
from .btc import BTCInterface
|
||||
from basicswap.chainparams import Coins
|
||||
|
||||
|
||||
class DASHInterface(BTCInterface):
|
||||
@staticmethod
|
||||
def coin_type():
|
||||
return Coins.DASH
|
||||
|
||||
def initialiseWallet(self, key):
|
||||
raise ValueError('Load seed with with -hdseed daemon argument')
|
||||
Reference in New Issue
Block a user