Creates a new WalletManager instance
Raw Gun instance
Storage interface for local persistence
Optional
config: Partial<WalletConfig>Additional configuration options
Private
Readonly
balancePrivate
Readonly
configPrivate
Readonly
gunPrivate
mainPrivate
Readonly
pendingPrivate
Readonly
storagePrivate
transactionPrivate
walletPrivate
checkCheck status of pending transactions
Crea e carica un wallet con un percorso specifico
Percorso di derivazione
Informazioni sul wallet
Private
decryptDecrypt sensitive text encrypted with SEA
Encrypted text
Decrypted text
Private
derivePrivate
Derives a private wallet from a mnemonic and derivation path
The BIP-39 mnemonic phrase
The derivation path
A derived HDNodeWallet instance
Deriva un wallet da un percorso derivazione
Percorso di derivazione BIP-44 (es: m/44'/60'/0'/0/0)
Wallet derivato
Emits an event with arguments
Optional
data: unknownPrivate
encryptEncrypt sensitive text using SEA
Text to encrypt
Encrypted text
Esporta tutti i dati dell'utente in un unico file
Password obbligatoria per cifrare i dati esportati
Un oggetto JSON contenente tutti i dati dell'utente
Export GunDB pair, optionally encrypted with a password
Optional
password: stringOptional password to encrypt the exported data
Exported GunDB pair (SENSITIVE DATA!) SECURITY WARNING: This method exports your GunDB credentials which give access to your encrypted data. Never share this data with anyone, store it securely, and only use it for backup purposes.
Export the mnemonic phrase, optionally encrypting it with a password
Optional
password: stringOptional password to encrypt the exported data
Exported mnemonic phrase (SENSITIVE DATA!) SECURITY WARNING: This method exports your mnemonic phrase which gives FULL ACCESS to all your wallets. Never share this data with anyone, store it securely, and only use it for backup purposes.
Export wallet data with enhanced security
Export wallet private keys, optionally encrypted with a password
Optional
password: stringOptional password to encrypt the exported data
Exported wallet keys (SENSITIVE DATA!) SECURITY WARNING: This method exports your wallet private keys which give FULL ACCESS to your funds. Never share this data with anyone, store it securely, and only use it for backup purposes.
Generate a new BIP-39 standard mnemonic compatible with all wallets
A new 12-word BIP-39 mnemonic phrase
Private
generateOverride of main function with fixes and improvements
Get wallet balance with caching to reduce RPC calls
Get the main wallet
Gets a configured JSON RPC provider instance
An ethers.js JsonRpcProvider instance
Get addresses that would be derived from a mnemonic using BIP-44 standard This is useful to verify that wallets are correctly compatible with MetaMask and other wallets
The BIP-39 mnemonic phrase
Number of addresses to derive
An array of Ethereum addresses
Private
getPrivate
Gets a unique identifier for the current user for storage purposes
A string identifier based on user's public key or "guest"
Get user's master mnemonic, first checking GunDB then localStorage
Ottiene il mnemonic dell'utente
Mnemonic dell'utente
Ottiene il saldo del wallet principale
Saldo formattato come stringa
Private
getGet wallet transaction history
Ottiene tutti i wallet dell'utente
Array di wallet
Importa un backup completo
JSON cifrato contenente tutti i dati dell'utente
Password per decifrare il backup
Opzioni di importazione (quali dati importare)
Un oggetto con il risultato dell'importazione
Importa un pair di Gun
JSON contenente il pair di Gun o JSON cifrato
Optional
password: stringPassword opzionale per decifrare i dati se cifrati
true se l'importazione è riuscita
Importa una frase mnemonica
La mnemonica o il JSON cifrato da importare
Optional
password: stringPassword opzionale per decifrare la mnemonica se cifrata
true se l'importazione è riuscita
Import wallet data with validation
Importa le chiavi private dei wallet
JSON contenente i dati dei wallet o JSON cifrato
Optional
password: stringPassword opzionale per decifrare i dati se cifrati
Il numero di wallet importati con successo
Private
initPrivate
Initialize wallet paths synchronously with basic setup
Invalidate balance cache for an address
Verifica se l'utente è loggato
true se l'utente è loggato, false altrimenti
Private
isPrivate
Verifica se l'utente è autenticato
true se l'utente è autenticato
Private
loadPrivate
Loads wallet paths from GunDB
Private
loadPrivate
Loads wallet paths from localStorage as backup
Removes an event listener
Registers an event listener
Registers a one-time event listener
Removes all listeners for an event or all events
Optional
event: EventTypeReset main wallet Useful when we want to force wallet regeneration
Salva una transazione pendente
Transazione da salvare
Save user's master mnemonic to both GunDB and localStorage
Salva il percorso di derivazione di un wallet
Indirizzo del wallet
Percorso di derivazione
Private
savePrivate
Saves wallet paths to localStorage for backup
Update the balance cache TTL
Time-to-live in milliseconds
Sets the RPC URL used for Ethereum network connections
The RPC provider URL to use
Private
setupSetup transaction monitoring
Sign a message with a wallet
Verify a signature
Class that manages Ethereum wallet functionality including: