ain.account module

class ain.account.Account(privateKey: bytes | str = None)

Bases: object

Class for the account on the AIN Blockchain.

Parameters:

privateKey (Union[bytes, str]) – The private key of the account.

classmethod create(entropy: str = None)

Inits an Account with the given entropy.

Parameters:

entropy (str) – The entropy of account. Defaults to None.

classmethod fromMnemonic(mnemonic: str, index: int = 0)

Inits an Account with the given mnemonic.

Parameters:
  • mnemonic (str) – The mnemonic of account.

  • index (int) – The index of account. Defaults to 0.

address: str

The address of the account on the AIN Blockchain

private_key: str

The private key of the account.

public_key: str

The public key of the account.