-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
1,961 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
/** | ||
* @package OpenMEV/SDK-Connector | ||
* @version 0.1.0 | ||
* @version 0.2.0 | ||
* @license Apache-2.0 | ||
* @export connector | ||
* @since v0.3.0 | ||
*/ | ||
export * from './connector'; | ||
import { | ||
OpenMEVSocket | ||
} from './connector' | ||
export default OpenMEVSocket | ||
//export * from './connector'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
!dist | ||
.DS_Store | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import * as useWallet from './lib'; | ||
export { useWallet }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
'use strict' | ||
|
||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./use-react-wallet.cjs.production.min.js') | ||
} else { | ||
module.exports = require('./use-react-wallet.cjs.development.js') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Web3Modal, { ICoreOptions } from 'web3modal'; | ||
import { Network, Web3Provider } from '@ethersproject/providers'; | ||
declare type State = { | ||
provider?: Web3Provider; | ||
account?: Account; | ||
network?: Network; | ||
web3Modal?: Web3Modal; | ||
}; | ||
declare type Account = string; | ||
declare type ConnectWallet = (opts?: Partial<ICoreOptions>) => void; | ||
declare type DisconnectWallet = () => void; | ||
declare type UseWallet = () => State & { | ||
connect: ConnectWallet; | ||
disconnect: DisconnectWallet; | ||
}; | ||
export declare const useWallet: UseWallet; | ||
export {}; |
Oops, something went wrong.