@dynamic-labs/wallet-connector-core
Advanced tools
Comparing version 3.0.0-alpha.53 to 3.0.0-alpha.54
{ | ||
"name": "@dynamic-labs/wallet-connector-core", | ||
"version": "3.0.0-alpha.53", | ||
"version": "3.0.0-alpha.54", | ||
"repository": { | ||
@@ -32,9 +32,9 @@ "type": "git", | ||
"peerDependencies": { | ||
"@dynamic-labs/logger": "3.0.0-alpha.53", | ||
"@dynamic-labs/rpc-providers": "3.0.0-alpha.53", | ||
"@dynamic-labs/types": "3.0.0-alpha.53", | ||
"@dynamic-labs/utils": "3.0.0-alpha.53", | ||
"@dynamic-labs/wallet-book": "3.0.0-alpha.53", | ||
"@dynamic-labs/logger": "3.0.0-alpha.54", | ||
"@dynamic-labs/rpc-providers": "3.0.0-alpha.54", | ||
"@dynamic-labs/types": "3.0.0-alpha.54", | ||
"@dynamic-labs/utils": "3.0.0-alpha.54", | ||
"@dynamic-labs/wallet-book": "3.0.0-alpha.54", | ||
"eventemitter3": "5.0.1" | ||
} | ||
} |
@@ -38,3 +38,3 @@ import EventEmitter from 'eventemitter3'; | ||
export type InternalWalletConnector = WalletConnectorCore.WalletConnector; | ||
export type WalletConnector = Pick<InternalWalletConnector, 'canConnectViaCustodialService' | 'canConnectViaQrCode' | 'canConnectViaSocial' | 'chainRpcProviders' | 'connect' | 'connectedChain' | 'createWallet' | 'constructorProps' | 'endSession' | 'getAddress' | 'getAdditionalAddresses' | 'getConnectedAccounts' | 'getNetwork' | 'initEventListener' | 'isAvailable' | 'isEmbeddedWallet' | 'isInitialized' | 'isInstalledOnBrowser' | 'isTestnet' | 'isWalletConnect' | 'key' | 'name' | 'parseAddress' | 'proveOwnership' | 'providerResources' | 'supportedChains' | 'supportsNetworkSwitching' | 'switchNetwork' | 'switchNetworkOnlyFromWallet' | 'teardownEventListeners'> & EventEmitter<WalletConnectorEventTypes>; | ||
export type WalletConnector = Pick<InternalWalletConnector, 'canConnectViaCustodialService' | 'canConnectViaQrCode' | 'canConnectViaSocial' | 'chainRpcProviders' | 'connect' | 'connectedChain' | 'createWallet' | 'constructorProps' | 'endSession' | 'getAddress' | 'getAdditionalAddresses' | 'getConnectedAccounts' | 'getDeepLink' | 'getMobileOrInstalledWallet' | 'getNetwork' | 'getSession' | 'initEventListener' | 'isAvailable' | 'isEmbeddedWallet' | 'isInitialized' | 'isInstalledOnBrowser' | 'isTestnet' | 'isWalletConnect' | 'key' | 'name' | 'parseAddress' | 'proveOwnership' | 'providerResources' | 'supportedChains' | 'supportsNetworkSwitching' | 'switchNetwork' | 'switchNetworkOnlyFromWallet' | 'teardownEventListeners'> & EventEmitter<WalletConnectorEventTypes>; | ||
export interface WalletConnectorConstructor { | ||
@@ -41,0 +41,0 @@ new (props?: any): InternalWalletConnector; |
@@ -27,2 +27,8 @@ import type { BaseWalletProps } from '@dynamic-labs/types'; | ||
/** | ||
* Retrieves the network that the wallet is connected to. | ||
* @returns A promise that resolves to the network value as a string or number, | ||
* or undefined if the network cannot be retrieved. | ||
*/ | ||
getNetwork(): Promise<string | number | undefined>; | ||
/** | ||
* If the wallet is connected. | ||
@@ -29,0 +35,0 @@ * @returns A promise that resolves to true the wallet is connected or false if it's not connected. |
@@ -42,2 +42,12 @@ 'use client' | ||
/** | ||
* Retrieves the network that the wallet is connected to. | ||
* @returns A promise that resolves to the network value as a string or number, | ||
* or undefined if the network cannot be retrieved. | ||
*/ | ||
getNetwork() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return this._connector.getNetwork(); | ||
}); | ||
} | ||
/** | ||
* If the wallet is connected. | ||
@@ -44,0 +54,0 @@ * @returns A promise that resolves to true the wallet is connected or false if it's not connected. |
Sorry, the diff of this file is too big to display
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
460009
2922