multiversx_sdk.accounts package

Submodules

multiversx_sdk.accounts.account module

class multiversx_sdk.accounts.account.Account(secret_key: UserSecretKey, hrp: str | None = None)[source]

Bases: object

get_nonce_then_increment() int[source]
classmethod new_from_keypair(keypair: KeyPair) Account[source]
classmethod new_from_keystore(file_path: Path, password: str, address_index: int | None = None, hrp: str | None = None) Account[source]
classmethod new_from_mnemonic(mnemonic: str, address_index: int = 0, hrp: str | None = None) Account[source]
classmethod new_from_pem(file_path: Path, index: int = 0, hrp: str | None = None) Account[source]
save_to_keystore(path: Path, password: str = '')[source]

Saves the secret key to a keystore file with kind=secretKey.

save_to_pem(path: Path)[source]
sign(data: bytes) bytes[source]

Signs using the account’s secret key.

sign_message(message: Message) bytes[source]
sign_transaction(transaction: Transaction) bytes[source]
verify(data: bytes, signature: bytes) bool[source]

Verifies the signature using the account’s public key.

Module contents

class multiversx_sdk.accounts.Account(secret_key: UserSecretKey, hrp: str | None = None)[source]

Bases: object

get_nonce_then_increment() int[source]
classmethod new_from_keypair(keypair: KeyPair) Account[source]
classmethod new_from_keystore(file_path: Path, password: str, address_index: int | None = None, hrp: str | None = None) Account[source]
classmethod new_from_mnemonic(mnemonic: str, address_index: int = 0, hrp: str | None = None) Account[source]
classmethod new_from_pem(file_path: Path, index: int = 0, hrp: str | None = None) Account[source]
save_to_keystore(path: Path, password: str = '')[source]

Saves the secret key to a keystore file with kind=secretKey.

save_to_pem(path: Path)[source]
sign(data: bytes) bytes[source]

Signs using the account’s secret key.

sign_message(message: Message) bytes[source]
sign_transaction(transaction: Transaction) bytes[source]
verify(data: bytes, signature: bytes) bool[source]

Verifies the signature using the account’s public key.