mirror of
https://github.com/Instadapp/vue-web3.git
synced 2024-07-29 21:48:25 +00:00
wip
This commit is contained in:
parent
fab523ac65
commit
67ccc3ad8f
13
README.md
13
README.md
|
|
@ -55,3 +55,16 @@ defineComponent({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
Typescript:
|
||||||
|
|
||||||
|
```js
|
||||||
|
import Web3 from 'web3'
|
||||||
|
|
||||||
|
const { library } = useWeb3<Web3>()
|
||||||
|
```
|
||||||
|
|
||||||
|
```js
|
||||||
|
import { Web3Provider } from "@ethersproject/providers";
|
||||||
|
|
||||||
|
const { library } = useWeb3<Web3Provider>()
|
||||||
|
```
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@kabbouchi/vue-web3",
|
"name": "@kabbouchi/vue-web3",
|
||||||
"version": "0.2.15",
|
"version": "0.2.16",
|
||||||
"description": "Vue web3 composition api",
|
"description": "Vue web3 composition api",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/cjs/index.js",
|
"main": "dist/cjs/index.js",
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ export const setWeb3LibraryCallback = (
|
||||||
getLibrary = cb
|
getLibrary = cb
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useWeb3 = <TLibrary>() => {
|
export const useWeb3 = <TLibrary = any>() => {
|
||||||
const onErrorCb = ref<(error: Error) => void>()
|
const onErrorCb = ref<(error: Error) => void>()
|
||||||
|
|
||||||
const activate = async (
|
const activate = async (
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user