@web3modal/scaffold
Advanced tools
Comparing version 3.3.0-4df4ae5 to 3.3.0-e39005b
@@ -1,2 +0,2 @@ | ||
import { AccountController, BlockchainApiController, ConnectionController, ConnectorController, CoreHelperUtil, EventsController, ModalController, NetworkController, OptionsController, PublicStateController, ThemeController } from '@web3modal/core'; | ||
import { AccountController, BlockchainApiController, ConnectionController, ConnectorController, CoreHelperUtil, EventsController, ModalController, NetworkController, OptionsController, PublicStateController, ThemeController, SIWEController } from '@web3modal/core'; | ||
import { setColorTheme, setThemeVariables } from '@web3modal/ui'; | ||
@@ -50,2 +50,18 @@ let isInitialized = false; | ||
}; | ||
this.setSIWENonce = nonce => { | ||
SIWEController.setNonce(nonce); | ||
}; | ||
this.setSIWESession = session => { | ||
SIWEController.setSession(session); | ||
}; | ||
this.setSIWEStatus = status => { | ||
SIWEController.setStatus(status); | ||
}; | ||
this.setSIWEMessage = message => { | ||
SIWEController.setMessage(message); | ||
}; | ||
this.getSIWENonce = () => SIWEController.state.nonce; | ||
this.getSIWESession = () => SIWEController.state.session; | ||
this.getSIWEStatus = () => SIWEController.state.status; | ||
this.getSIWEMessage = () => SIWEController.state.message; | ||
this.initControllers(options); | ||
@@ -91,2 +107,5 @@ this.initOrContinue(); | ||
} | ||
subscribeSIWEState(callback) { | ||
return SIWEController.subscribe(callback); | ||
} | ||
initControllers(options) { | ||
@@ -106,2 +125,5 @@ NetworkController.setClient(options.networkControllerClient); | ||
ConnectionController.setClient(options.connectionControllerClient); | ||
if (options.siweControllerClient) { | ||
SIWEController.setSIWEClient(options.siweControllerClient); | ||
} | ||
if (options.metadata) { | ||
@@ -108,0 +130,0 @@ OptionsController.setMetadata(options.metadata); |
@@ -1,3 +0,3 @@ | ||
import type { ConnectionControllerClient, EventsControllerState, NetworkControllerClient, NetworkControllerState, OptionsControllerState, PublicStateControllerState, ThemeControllerState, ThemeMode, ThemeVariables } from '@web3modal/core'; | ||
import { AccountController, BlockchainApiController, ConnectionController, ConnectorController, NetworkController } from '@web3modal/core'; | ||
import type { ConnectionControllerClient, SIWEControllerClient, EventsControllerState, NetworkControllerClient, NetworkControllerState, OptionsControllerState, PublicStateControllerState, ThemeControllerState, ThemeMode, ThemeVariables, SIWEControllerClientState } from '@web3modal/core'; | ||
import { AccountController, BlockchainApiController, ConnectionController, ConnectorController, NetworkController, SIWEController } from '@web3modal/core'; | ||
export interface LibraryOptions { | ||
@@ -22,2 +22,3 @@ projectId: OptionsControllerState['projectId']; | ||
connectionControllerClient: ConnectionControllerClient; | ||
siweControllerClient?: SIWEControllerClient; | ||
} | ||
@@ -64,4 +65,13 @@ export interface OpenOptions { | ||
protected setAddressExplorerUrl: (typeof AccountController)['setAddressExplorerUrl']; | ||
protected setSIWENonce: (typeof SIWEController)['setNonce']; | ||
protected setSIWESession: (typeof SIWEController)['setSession']; | ||
protected setSIWEStatus: (typeof SIWEController)['setStatus']; | ||
protected setSIWEMessage: (typeof SIWEController)['setMessage']; | ||
subscribeSIWEState(callback: (newState: SIWEControllerClientState) => void): () => void; | ||
protected getSIWENonce: () => string | undefined; | ||
protected getSIWESession: () => import("@web3modal/core").SIWESession | undefined; | ||
protected getSIWEStatus: () => "error" | "success" | "ready" | "loading" | "uninitialized" | "rejected"; | ||
protected getSIWEMessage: () => string | undefined; | ||
private initControllers; | ||
private initOrContinue; | ||
} |
{ | ||
"name": "@web3modal/scaffold", | ||
"version": "3.3.0-4df4ae5", | ||
"version": "3.3.0-e39005b", | ||
"type": "module", | ||
@@ -19,8 +19,8 @@ "main": "./dist/esm/index.js", | ||
"dependencies": { | ||
"@web3modal/core": "3.3.0-4df4ae5", | ||
"@web3modal/ui": "3.3.0-4df4ae5", | ||
"lit": "3.0.1" | ||
"@web3modal/core": "3.3.0-e39005b", | ||
"@web3modal/ui": "3.3.0-e39005b", | ||
"lit": "3.0.2" | ||
}, | ||
"devDependencies": { | ||
"@web3modal/smart-account": "3.3.0-4df4ae5" | ||
"@web3modal/smart-account": "3.3.0-e39005b" | ||
}, | ||
@@ -27,0 +27,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
277199
4670
+ Added@web3modal/core@3.3.0-e39005b(transitive)
+ Added@web3modal/ui@3.3.0-e39005b(transitive)
+ Addedderive-valtio@0.1.0(transitive)
+ Addedlit@3.0.2(transitive)
+ Addedvaltio@1.12.0(transitive)
- Removed@web3modal/core@3.3.0-4df4ae5(transitive)
- Removed@web3modal/ui@3.3.0-4df4ae5(transitive)
- Removedlit@3.0.1(transitive)
- Removedvaltio@1.11.3(transitive)
Updated@web3modal/ui@3.3.0-e39005b
Updatedlit@3.0.2