def add(self, callback = None):
     account = CoreAccount()
     Accounts.addAccount(account)
     address = Address.to0xAddress(account.address)
     callback(
         JSONRPC.createResultObject(address, self.id)
     )
 def createNewMultiSigAccountType(self, accountType, privateKey, callback = None):
     multiSigAddressBytes = bytearray()
     for publicKey in self.publicKeys:
         multiSigAddressBytes.extend(publicKey)
     multiSigAddress = Crypto.generateAddress(multiSigAddressBytes)
     account = CoreAccount(multiSigAddress, self.publicKeys, privateKey, accountType)
     Accounts.addAccount(account)
     multiSigAddress = Address.to0xAddress(multiSigAddress)
     callback(
         JSONRPC.createResultObject(multiSigAddress, self.id)
     )