bitshares.wallet module

class bitshares.wallet.Wallet(*args, **kwargs)[source]

Bases: bitshares.instance.BlockchainInstance, bitshares.wallet.Wallet

addPrivateKey(wif)[source]

Add a private key to the wallet database

bitshares

Alias for the specific blockchain.

blockchain
blockchain_instance_class

alias of bitshares.instance.BlockchainInstance

chain

Short form for blockchain (for the lazy)

changePassphrase(new_pwd)[source]

Change the passphrase for the wallet database

create(pwd)[source]

Alias for newWallet()

created()[source]

Do we have a wallet database already?

define_classes()[source]

Needs to define instance variables that provide classes

getAccountFromPrivateKey(wif)[source]

Obtain account name from private key

getAccountFromPublicKey(pub)[source]

Obtain the first account name from public key

getAccounts()[source]

Return all accounts installed in the wallet database

getAccountsFromPublicKey(pub)[source]

Obtain all accounts associated with a public key

getActiveKeyForAccount(name)[source]

Obtain owner Active Key for an account from the wallet database

getAllAccounts(pub)[source]

Get the account data for a public key (all accounts found for this public key)

getKeyType(account, pub)[source]

Get key type

getMemoKeyForAccount(name)[source]

Obtain owner Memo Key for an account from the wallet database

getOwnerKeyForAccount(name)[source]

Obtain owner Private Key for an account from the wallet database

getPrivateKeyForPublicKey(pub)[source]

Obtain the private key for a given public key

Parameters:pub (str) – Public Key
getPublicKeys(current=False)[source]

Return all installed public keys

Parameters:current (bool) – If true, returns only keys for currently connected blockchain
get_instance_class()

Should return the Chain instance class, e.g. bitshares.BitShares

classmethod inject(cls)
is_encrypted()[source]

Is the key store encrypted?

lock()[source]

Lock the wallet database

locked()[source]

Is the wallet database locked?

newWallet(pwd)[source]

Create a new wallet database

prefix
privatekey(key)[source]
publickey_from_wif(wif)[source]
removeAccount(account)[source]

Remove all keys associated with a given account

removePrivateKeyFromPublicKey(pub)[source]

Remove a key from the wallet database

rpc
setKeys(loadkeys)[source]

This method is strictly only for in memory keys that are passed to Wallet with the keys argument

classmethod set_shared_blockchain_instance(instance)

This method allows us to override default instance for all users of SharedInstance.instance.

Parameters:instance (chaininstance) – Chain instance
classmethod set_shared_config(config)

This allows to set a config that will be used when calling shared_blockchain_instance and allows to define the configuration without requiring to actually create an instance

set_shared_instance()

This method allows to set the current instance as default

shared_blockchain_instance()

This method will initialize SharedInstance.instance and return it. The purpose of this method is to have offer single default instance that can be reused by multiple classes.

unlock(pwd)[source]

Unlock the wallet database

unlocked()[source]

Is the wallet database unlocked?

wipe(sure=False)[source]