本文整理汇总了Python中armoryengine.BDM.TheBDM.registerWallet方法的典型用法代码示例。如果您正苦于以下问题:Python TheBDM.registerWallet方法的具体用法?Python TheBDM.registerWallet怎么用?Python TheBDM.registerWallet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类armoryengine.BDM.TheBDM
的用法示例。
在下文中一共展示了TheBDM.registerWallet方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from armoryengine.BDM import TheBDM [as 别名]
# 或者: from armoryengine.BDM.TheBDM import registerWallet [as 别名]
def setUp(self):
self.verifyBlockHeight()
# Load the primary file from the test net in a box
self.fileA = os.path.join(self.tiab.tiabDirectory, 'tiab\\armory\\armory_%s_.wallet' % TEST_WALLET_ID)
self.wlt = PyBtcWallet().readWalletFile(self.fileA, doScanNow=True)
self.jsonServer = Armory_Json_Rpc_Server(self.wlt)
TheBDM.registerWallet(self.wlt)
示例2: createNewWalletFromWizard
# 需要导入模块: from armoryengine.BDM import TheBDM [as 别名]
# 或者: from armoryengine.BDM.TheBDM import registerWallet [as 别名]
def createNewWalletFromWizard(self):
self.newWallet = PyBtcWallet().createNewWallet( \
securePassphrase=self.setPassphrasePage.pageFrame.getPassphrase(), \
kdfTargSec=self.walletCreationPage.pageFrame.getKdfSec(), \
kdfMaxMem=self.walletCreationPage.pageFrame.getKdfBytes(), \
shortLabel=self.walletCreationPage.pageFrame.getName(), \
longLabel=self.walletCreationPage.pageFrame.getDescription(), \
doRegisterWithBDM=False, \
extraEntropy=self.main.getExtraEntropyForKeyGen())
self.newWallet.unlock(securePassphrase=
SecureBinaryData(self.setPassphrasePage.pageFrame.getPassphrase()))
# We always want to fill the address pool, right away.
fillPoolProgress = DlgProgress(self, self.main, HBar=1, \
Title="Creating Wallet")
fillPoolProgress.exec_(self.newWallet.fillAddressPool, doRegister=False,
Progress=fillPoolProgress.UpdateHBar)
# Reopening from file helps make sure everything is correct -- don't
# let the user use a wallet that triggers errors on reading it
wltpath = self.newWallet.walletPath
walletFromDisk = PyBtcWallet().readWalletFile(wltpath)
self.main.addWalletToApplication(walletFromDisk, walletIsNew=True)
if TheBDM.getBDMState() in ('Uninitialized', 'Offline'):
TheBDM.registerWallet(walletFromDisk, isFresh=True, wait=False)
else:
self.main.newWalletList.append([walletFromDisk, True])
示例3: setUp
# 需要导入模块: from armoryengine.BDM import TheBDM [as 别名]
# 或者: from armoryengine.BDM.TheBDM import registerWallet [as 别名]
def setUp(self):
self.verifyBlockHeight()
self.fileA = os.path.join(self.armoryHomeDir, 'armory_%s_.wallet' % TEST_WALLET_ID)
self.fileB = os.path.join(self.armoryHomeDir, 'armory_%s_backup.wallet' % TEST_WALLET_ID)
self.fileAupd = os.path.join(self.armoryHomeDir, 'armory_%s_backup_unsuccessful.wallet' % TEST_WALLET_ID)
self.fileBupd = os.path.join(self.armoryHomeDir, 'armory_%s_update_unsuccessful.wallet' % TEST_WALLET_ID)
self.removeFileList([self.fileA, self.fileB, self.fileAupd, self.fileBupd])
# We need a controlled test, so we script the all the normally-random stuff
self.privKey = SecureBinaryData('\xaa'*32)
self.privKey2 = SecureBinaryData('\x33'*32)
self.chainstr = SecureBinaryData('\xee'*32)
theIV = SecureBinaryData(hex_to_binary('77'*16))
self.passphrase = SecureBinaryData('A self.passphrase')
self.passphrase2 = SecureBinaryData('A new self.passphrase')
self.wallet = PyBtcWallet().createNewWallet(withEncrypt=False, \
plainRootKey=self.privKey, \
chaincode=self.chainstr, \
IV=theIV, \
shortLabel=TEST_WALLET_NAME, \
longLabel=TEST_WALLET_DESCRIPTION,
armoryHomeDir = self.armoryHomeDir)
self.jsonServer = Armory_Json_Rpc_Server(self.wallet)
TheBDM.registerWallet(self.wallet)
示例4: setupTheBDM
# 需要导入模块: from armoryengine.BDM import TheBDM [as 别名]
# 或者: from armoryengine.BDM.TheBDM import registerWallet [as 别名]
def setupTheBDM():
TheBDM.setBlocking(True)
if not TheBDM.isInitialized():
TheBDM.registerWallet(masterWallet)
TheBDM.setOnlineMode(True)
# Only executed on the first call if blockchain not loaded yet.
LOGINFO('Blockchain loading')
while not TheBDM.getBDMState()=='BlockchainReady':
LOGINFO('Blockchain Not Ready Yet %s' % TheBDM.getBDMState())
time.sleep(2)
示例5: setUp
# 需要导入模块: from armoryengine.BDM import TheBDM [as 别名]
# 或者: from armoryengine.BDM.TheBDM import registerWallet [as 别名]
def setUp(self):
self.verifyBlockHeight()
# Load the primary file from the test net in a box
self.fileA = os.path.join(self.tiab.tiabDirectory, 'tiab', 'armory', \
'armory_%s_.wallet' % FIRST_WLT_NAME)
self.wltA = PyBtcWallet().readWalletFile(self.fileA, doScanNow=True)
self.fileB = os.path.join(self.tiab.tiabDirectory, 'tiab', 'armory', \
'armory_%s_.wallet' % SECOND_WLT_NAME)
self.wltB = PyBtcWallet().readWalletFile(self.fileB, doScanNow=True)
self.fileC = os.path.join(self.tiab.tiabDirectory, 'tiab', 'armory', \
'armory_%s_.wallet' % THIRD_WLT_NAME)
self.wltC = PyBtcWallet().readWalletFile(self.fileC, doScanNow=True)
self.jsonServer = Armory_Json_Rpc_Server(self.wltA, \
inWltMap={SECOND_WLT_NAME : self.wltB, \
THIRD_WLT_NAME : self.wltC}, \
armoryHomeDir=os.path.join(self.tiab.tiabDirectory, \
'tiab','armory'))
TheBDM.registerWallet(self.wltA)