shogun-button-react 4.2.3 → 4.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  import { ShogunConnectorOptions, ShogunConnectorResult } from "./interfaces/connector-options";
2
- export declare function shogunConnector(options: ShogunConnectorOptions): ShogunConnectorResult;
2
+ export declare function shogunConnector(options: ShogunConnectorOptions): Promise<ShogunConnectorResult>;
package/dist/connector.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ShogunCore } from "shogun-core";
2
- export function shogunConnector(options) {
2
+ export async function shogunConnector(options) {
3
3
  const { gunInstance, gunOptions, appName, timeouts, webauthn, nostr, web3, zkproof, showWebauthn, showNostr, showMetamask, showZkProof, darkMode, enableGunDebug = true, enableConnectionMonitoring = true, defaultPageSize = 20, connectionTimeout = 10000, debounceInterval = 100, ...restOptions } = options;
4
4
  let core = null;
5
5
  if (gunInstance !== undefined) {
@@ -22,6 +22,15 @@ export function shogunConnector(options) {
22
22
  timeouts,
23
23
  });
24
24
  }
25
+ // Wait for core to initialize (plugins registration, etc.)
26
+ try {
27
+ if (typeof core.initialize === 'function') {
28
+ await core.initialize();
29
+ }
30
+ }
31
+ catch (error) {
32
+ console.error("Error initializing ShogunCore:", error);
33
+ }
25
34
  const setProvider = (provider) => {
26
35
  var _a;
27
36
  if (!core) {