hd_wallet_algorand_factory

Module for creating Algorand wallet factories.

class HdWalletAlgorandFactory

Bases: object

HD wallet Algorand factory class. It allows a HdWalletAlgorand to be created in different way.

CreateRandom(wallet_name: str, words_num: AlgorandWordsNum = AlgorandWordsNum.WORDS_NUM_25, lang: AlgorandLanguages = AlgorandLanguages.ENGLISH) HdWalletBase

Create wallet randomly.

Parameters:
  • wallet_name (str) – Wallet name

  • words_num (HdWalletAlgorandWordsNum, optional) – Words number (default: 25)

  • lang (HdWalletAlgorandLanguages, optional) – Language (default: English)

Returns:

HdWalletBase object

Return type:

HdWalletBase object

Raises:

TypeError – If words number is not a HdWalletAlgorandWordsNum enum or language is not a HdWalletAlgorandLanguages enum

CreateFromMnemonic(wallet_name: str, mnemonic: str) HdWalletBase

Create wallet from mnemonic.

Parameters:
  • wallet_name (str) – Wallet name

  • mnemonic (str) – Mnemonic

Returns:

HdWalletBase object

Return type:

HdWalletBase object

Raises:

ValueError – If the mnemonic is not valid

CreateFromSeed(wallet_name: str, seed_bytes: bytes) HdWalletBase

Create wallet from seed.

Parameters:
  • wallet_name (str) – Wallet name

  • seed_bytes (bytes) – Seed bytes

Returns:

HdWalletBase object

Return type:

HdWalletBase object

Raises:

ValueError – If the seed is not valid

CreateFromPrivateKey(wallet_name: str, priv_key_bytes: bytes) HdWalletBase

Create wallet from private key.

Parameters:
  • wallet_name (str) – Wallet name

  • priv_key_bytes (bytes) – Private key bytes

Returns:

HdWalletBase object

Return type:

HdWalletBase object

Raises:

ValueError – If the private key is not valid

CreateFromPublicKey(wallet_name: str, pub_key_bytes: bytes) HdWalletBase

Create wallet from public key.

Parameters:
  • wallet_name (str) – Wallet name

  • pub_key_bytes (bytes) – Public key bytes

Returns:

HdWalletBase object

Return type:

HdWalletBase object

Raises:

ValueError – If the public key is not valid