diff --git a/README.md b/README.md index 28e7629..80a0821 100644 --- a/README.md +++ b/README.md @@ -55,3 +55,16 @@ defineComponent({ }, }) ``` +Typescript: + +```js +import Web3 from 'web3' + +const { library } = useWeb3() +``` + +```js +import { Web3Provider } from "@ethersproject/providers"; + +const { library } = useWeb3() +``` \ No newline at end of file diff --git a/package.json b/package.json index 524ebd0..cc9d0af 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kabbouchi/vue-web3", - "version": "0.2.15", + "version": "0.2.16", "description": "Vue web3 composition api", "license": "MIT", "main": "dist/cjs/index.js", diff --git a/src/index.ts b/src/index.ts index c746e87..a71532f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -36,7 +36,7 @@ export const setWeb3LibraryCallback = ( getLibrary = cb } -export const useWeb3 = () => { +export const useWeb3 = () => { const onErrorCb = ref<(error: Error) => void>() const activate = async (