Exemplo n.º 1
0
 def __init__(self, wallet):
     self.wallet = wallet
     Error.__init__(
         self, 
         "Invalid password for wallet {}"
         .format(interface.wallet_arg(wallet)), 
         True)
Exemplo n.º 2
0
 def __init__(self, wallet):
     self.wallet = wallet
     Error.__init__(
         self, 
         "Wallet ``{}`` already exists."
         .format(interface.wallet_arg(wallet)), 
         True)
Exemplo n.º 3
0
 def __init__(self, wallet):
     self.wallet = wallet
     Error.__init__(
         self, 
         "Wallet ``{}`` does not exist."
         .format(interface.wallet_arg(wallet)), 
         True)
Exemplo n.º 4
0
    def __init__(
            self, wallet="default", password="", timeout=0, is_verbose=True):
 
        if isinstance(wallet, interface.Wallet):
            password = wallet.password

        _Cleos.__init__(
            self, 
            ["--name", interface.wallet_arg(wallet), "--password", password], 
            "wallet", "unlock", is_verbose)

        self.printself()
Exemplo n.º 5
0
    def __init__(self, key, wallet="default", is_verbose=True):
        key_private = interface.key_arg(
            key, is_owner_key=True, is_private_key=True)
        _Cleos.__init__(
            self, 
            ["--private-key", key_private, "--name", 
                interface.wallet_arg(wallet)],
            "wallet", "import", is_verbose)

        self.json["key_private"] = key_private
        self.key_private = key_private
        self.printself()
Exemplo n.º 6
0
    def __init__(self, key, wallet, password, is_verbose=True):
        key_public = interface.key_arg(
            key, is_owner_key=True, is_private_key=False)

        _Cleos.__init__(
            self, 
            [key_public, "--name", interface.wallet_arg(wallet), 
                "--password", password], 
            "wallet", "remove_key", is_verbose)

        self.json["key_public"] = key_public
        self.key_public = key_public
        self.printself()
Exemplo n.º 7
0
    def __init__(self, wallet="default", is_verbose=True):
        _Cleos.__init__(
            self, ["--name", interface.wallet_arg(wallet)], 
            "wallet", "lock", is_verbose)

        self.printself()