Browse Source
WalletFactory and WalletBitkey classes --usb parameter enables experimental support for bitkey protocolmaster
4 changed files with 42 additions and 1 deletions
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env python |
||||
# |
||||
# Electrum - lightweight Bitcoin client |
||||
# Copyright (C) 2011 thomasv@gitorious |
||||
# |
||||
# This program is free software: you can redistribute it and/or modify |
||||
# it under the terms of the GNU General Public License as published by |
||||
# the Free Software Foundation, either version 3 of the License, or |
||||
# (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
|
||||
import os |
||||
|
||||
from wallet import Wallet |
||||
#import bitkeylib.bitkey_pb2 as proto |
||||
|
||||
from version import ELECTRUM_VERSION |
||||
SEED_VERSION = 4 # Version of bitkey algorithm |
||||
|
||||
class WalletBitkey(Wallet): |
||||
pass |
||||
@ -0,0 +1,11 @@
|
||||
class WalletFactory(object): |
||||
def __new__(cls, config): |
||||
if config.get('bitkey', False): |
||||
# if user requested support for Bitkey device, |
||||
# import Bitkey driver |
||||
from wallet_bitkey import WalletBitkey |
||||
return WalletBitkey(config) |
||||
|
||||
# Load standard wallet |
||||
from wallet import Wallet |
||||
return Wallet(config) |
||||
Loading…
Reference in new issue