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
Ed25519Account- Single-key Ed25519 account (legacy format, most common)Ed25519SingleKeyAccount- Ed25519 account using modernSingleKeyformatMultiEd25519Account- M-of-N multi-signature Ed25519 accountSecp256k1Account- Single-key Secp256k1 account (Bitcoin/Ethereum curve)Secp256r1Account- Single-key Secp256r1/P-256 account (WebAuthn/Passkey)MultiKeyAccount- M-of-N multi-signature account with mixed key typesKeylessAccount- OIDC-based keyless account
§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§
- Authentication
Key - An authentication key used to verify account ownership.
- Ed25519
Account ed25519 - An Ed25519 account for signing transactions.
- Ed25519
Single KeyAccount ed25519 - An Ed25519 account using the modern
SingleKeyauthenticator format. - Ephemeral
KeyPair keyless - Short-lived key pair used for keyless signing.
- Http
Pepper Service keyless - HTTP pepper service client.
- Http
Prover Service keyless - HTTP prover service client.
- JwkSet
keyless - A JWK set
- Keyless
Account keyless - Account authenticated via OIDC.
- Keyless
Signature keyless - Keyless signature payload for transaction authentication.
- Mnemonic
mnemonic - A BIP-39 mnemonic phrase for key derivation.
- Multi
Ed25519 Account ed25519 - A multi-Ed25519 account supporting M-of-N threshold signatures.
- Multi
KeyAccount - A multi-key account supporting M-of-N threshold signatures with mixed key types.
- Pepper
keyless - Pepper bytes used in keyless address derivation.
- Secp256k1
Account secp256k1 - A Secp256k1 ECDSA account for signing transactions.
- Secp256r1
Account secp256r1 - A Secp256r1 (P-256) ECDSA account for signing transactions.
- ZkProof
keyless - Zero-knowledge proof bytes.
Enums§
- AnyAccount
- An enum that can hold any account type.
- AnyPrivate
Key - A private key that can be any supported signature scheme.
- Oidc
Provider keyless - Supported OIDC providers.
Traits§
- Account
- Trait for account types that can sign transactions.
- Pepper
Service keyless - Service for obtaining pepper values.
- Prover
Service keyless - Service for generating zero-knowledge proofs.