Private
Optional
_rxjsPrivate
Readonly
onStatic
ErrorsPrivate
_saveURL of the peer to add
Private
checkCheck if a username already exists in the system
Username to check
Promise resolving to user data if exists, null otherwise
Decrypts data with Gun.SEA
Encrypted data
Decryption key
Promise that resolves with the decrypted data
Derive cryptographic keys from password and optional extras Supports multiple key derivation algorithms: P-256, secp256k1 (Bitcoin), secp256k1 (Ethereum)
Password or seed for key derivation
Optional
extra: anyAdditional entropy (string or array of strings)
Optional
options: DeriveOptionsDerivation options to specify which key types to generate
Promise resolving to derived keys object
Derive all supported key types
Password for key derivation
Optional
extra: anyAdditional entropy
Promise resolving to all key types
Derive Bitcoin secp256k1 keys with P2PKH address
Password for key derivation
Optional
extra: anyAdditional entropy
Promise resolving to Bitcoin keys and address
Derive Ethereum secp256k1 keys with Keccak256 address
Password for key derivation
Optional
extra: anyAdditional entropy
Promise resolving to Ethereum keys and address
Derive P-256 keys (default Gun.SEA behavior)
Password for key derivation
Optional
extra: anyAdditional entropy
Promise resolving to P-256 keys
Encrypts data with Gun.SEA
Data to encrypt
Encryption key
Promise that resolves with the encrypted data
Recovers password hint using security question answers
Username
Array of answers to security questions
Promise resolving with the password hint
Gets a node at the specified path
Path to the node
Gun node
Gets the list of all configured peers (connected and disconnected)
Array of peer URLs
Gets the list of currently connected peers
Array of peer URLs
Gets the current user
Current user object or null
Gets the Gun instance
Gun instance
Gets detailed information about all peers
Object with peer information
Gets the current user instance
User instance
Gets user data from the specified path
Path to get the data from (supports nested paths like "test/data/marco")
Promise that resolves with the data
Hashes text with Gun.SEA
Text to hash
Promise that resolves with the hashed text
Checks if a user is currently logged in
True if logged in
Logs in a user using direct Gun authentication
Username
Password
Optional
callback: (result: any) => voidOptional callback for login result
Promise resolving to login result
Logs out the current user using direct Gun authentication
Private
navigateHelper method to navigate to a nested path by splitting and chaining .get() calls
Starting Gun node
Path string (e.g., "test/data/marco")
Gun node at the specified path
Private
notifyRegisters an authentication callback
Function to call on auth events
Function to unsubscribe the callback
Puts data at the specified path
Path to store data
Data to store
Promise resolving to operation result
Reconnects to a specific peer
URL of the peer to reconnect
Removes data at the specified path
Path to remove
Promise resolving to operation result
Removes a peer from the network
URL of the peer to remove
Clears all peers and optionally adds new ones
Optional
newPeers: string[]Optional array of new peers to add
Attempts to restore user session from local storage
Promise resolving to session restoration result
Private
restoreSaves user data at the specified path
Path to save the data (supports nested paths like "test/data/marco")
Data to save
Promise that resolves when the data is saved
Sets data at the specified path
Path to store data
Data to store
Promise resolving to operation result
Sets up security questions and password hint
Username
Current password
Password hint
Array of security questions
Array of answers to security questions
Promise resolving with the operation result
Signs up a new user using direct Gun authentication
Username
Password
Promise resolving to signup result
Private
subscribe
Adds a new peer to the network