shogun-button-react 6.0.3 → 6.0.5
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.
- package/dist/connector.js +4 -19
- package/dist/index.js +1 -1
- package/dist/interfaces/connector-options.d.ts +3 -1
- package/package.json +2 -2
package/dist/connector.js
CHANGED
|
@@ -1,25 +1,9 @@
|
|
|
1
|
-
import { ShogunCore,
|
|
1
|
+
import { ShogunCore, quickStart } from "shogun-core";
|
|
2
2
|
export async function shogunConnector(options) {
|
|
3
|
-
const { gunInstance,
|
|
3
|
+
const { gunInstance, appName, timeouts, webauthn, nostr, web3, zkproof, showWebauthn, showNostr, showMetamask, showZkProof, darkMode, enableGunDebug = true, enableConnectionMonitoring = true, defaultPageSize = 20, connectionTimeout = 10000, debounceInterval = 100, useQuickStart = false, crypto, ...restOptions } = options;
|
|
4
4
|
let core = null;
|
|
5
5
|
let gun = null;
|
|
6
|
-
|
|
7
|
-
if (!gunInstance) {
|
|
8
|
-
if (gunOptions) {
|
|
9
|
-
gun = Gun(gunOptions);
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
// Default Gun configuration
|
|
13
|
-
gun = Gun({
|
|
14
|
-
peers: ["https://shogunnode.scobrudot.dev/gun"],
|
|
15
|
-
radisk: false,
|
|
16
|
-
localStorage: false,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
gun = gunInstance;
|
|
22
|
-
}
|
|
6
|
+
gun = gunInstance;
|
|
23
7
|
// Use quickStart for simplified API if requested
|
|
24
8
|
if (useQuickStart) {
|
|
25
9
|
const quickStartInstance = quickStart(gun, appName || "shogun-app");
|
|
@@ -50,6 +34,7 @@ export async function shogunConnector(options) {
|
|
|
50
34
|
} : undefined,
|
|
51
35
|
timeouts,
|
|
52
36
|
silent: false, // Enable console logs for debugging
|
|
37
|
+
crypto: (crypto === null || crypto === void 0 ? void 0 : crypto.autoGenerateOnAuth) ? { autoGenerateOnAuth: true } : undefined,
|
|
53
38
|
});
|
|
54
39
|
// Note: ShogunCore v2.0.0 initializes automatically in constructor
|
|
55
40
|
// No need to call initialize() separately
|