Initialize the Shogun SDK
SDK Configuration object
Private
_gunPrivate
_userPrivate
Optional
currentPrivate
Readonly
eventPrivate
Readonly
pluginsOptional
providerStatic
Readonly
API_Access to the Gun instance
The Gun instance
Access to the current user
The current Gun user instance
Changes the username for the currently authenticated user
New username to set
Promise resolving to the operation result
Check plugin compatibility with current ShogunCore version
Object with compatibility information
Emits an event through the core's event emitter. Plugins should use this method to emit events instead of accessing the private eventEmitter directly.
Indicates if the event had listeners.
Get an authentication method plugin by type
The type of authentication method
The authentication plugin or undefined if not available This is a more modern approach to accessing authentication methods
Get the current authentication method
The current authentication method or undefined if not set
Gets the current user information
Current user object or null
Retrieve a registered plugin by name
Type of the plugin or its public interface
Name of the plugin
The requested plugin or undefined if not found
Get the total number of registered plugins
Number of registered plugins
Get all plugins of a specific category
Category of plugins to filter
Array of plugins in the specified category
Get information about all registered plugins
Array of plugin information objects
Check if all plugins are properly initialized
Object with initialization status for each plugin
Get comprehensive debug information about the plugin system
Complete plugin system debug information
Retrieve recent errors logged by the system
Number of errors to retrieve (default: 10)
List of most recent errors
Check if a plugin is registered
Name of the plugin to check
true if the plugin is registered, false otherwise
Initialize the Shogun SDK asynchronously This method handles initialization tasks that require async operations
Authenticate user with username and password
Username
User password
Optional
pair: null | ISEAPairPromise with authentication result
Login with GunDB pair directly
GunDB SEA pair for authentication
Promise with authentication result
Registers a plugin with the Shogun SDK
Plugin instance to register
Private
registerPrivate
Register built-in plugins based on configuration
Private
registerInternal method to register a plugin
Plugin instance to register
Attempt to reinitialize failed plugins
Object with reinitialization results
Remove all listeners for a specific event or all events
Optional
eventName: string | symbolOptional. The name of the event to remove listeners for. If not provided, all listeners for all events are removed.
Returns this instance for method chaining
Saves the current user credentials to storage
Set the current authentication method This is used by plugins to indicate which authentication method was used
The authentication method used
Private
setupPrivate
Setup event forwarding from GunInstance to main event emitter
Register a new user with provided credentials
Username
Password
Optional
pair: null | ISEAPairPair of keys
Registration result
Unregisters a plugin from the Shogun SDK
Name of the plugin to unregister
Private
unregisterInternal method to unregister a plugin
Name of the plugin to unregister
Main ShogunCore class - implements the IShogunCore interface
This is the primary entry point for the Shogun SDK, providing access to:
Since
2.0.0