Skip to main content

Module account

Module account 

Source
Expand description

Account management for the Aptos SDK.

This module provides account types that wrap cryptographic keys and provide a unified interface for signing transactions.

§Account Types

§Example

use aptos_sdk::account::Ed25519Account;

// Generate a new random account
let account = Ed25519Account::generate();
println!("Address: {}", account.address());

// Create from a private key
let private_key_hex = "0x...";
let account = Ed25519Account::from_private_key_hex(private_key_hex).unwrap();

Structs§

AuthenticationKey
An authentication key used to verify account ownership.
Ed25519Accounted25519
An Ed25519 account for signing transactions.
Ed25519SingleKeyAccounted25519
An Ed25519 account using the modern SingleKey authenticator format.
EphemeralKeyPairkeyless
Short-lived key pair used for keyless signing.
HttpPepperServicekeyless
HTTP pepper service client.
HttpProverServicekeyless
HTTP prover service client.
JwkSetkeyless
A JWK set
KeylessAccountkeyless
Account authenticated via OIDC.
KeylessSignaturekeyless
Keyless signature payload for transaction authentication.
Mnemonicmnemonic
A BIP-39 mnemonic phrase for key derivation.
MultiEd25519Accounted25519
A multi-Ed25519 account supporting M-of-N threshold signatures.
MultiKeyAccount
A multi-key account supporting M-of-N threshold signatures with mixed key types.
Pepperkeyless
Pepper bytes used in keyless address derivation.
Secp256k1Accountsecp256k1
A Secp256k1 ECDSA account for signing transactions.
Secp256r1Accountsecp256r1
A Secp256r1 (P-256) ECDSA account for signing transactions.
ZkProofkeyless
Zero-knowledge proof bytes.

Enums§

AnyAccount
An enum that can hold any account type.
AnyPrivateKey
A private key that can be any supported signature scheme.
OidcProviderkeyless
Supported OIDC providers.

Traits§

Account
Trait for account types that can sign transactions.
PepperServicekeyless
Service for obtaining pepper values.
ProverServicekeyless
Service for generating zero-knowledge proofs.