generated from Tahul/vue-composable-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add installation and update readme
- Loading branch information
1 parent
76378a6
commit b588843
Showing
6 changed files
with
107 additions
and
35 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
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
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,71 @@ | ||
--- | ||
description: '' | ||
head: | ||
meta: | ||
- name: 'keywords' | ||
content: '' | ||
--- | ||
|
||
# Installation | ||
|
||
```bash | ||
npm install pinia @vue-dapp/core @vue-dapp/modal | ||
``` | ||
|
||
```ts [main.ts] | ||
import { createPinia } from 'pinia' | ||
app.use(createPinia()) | ||
``` | ||
|
||
## Nuxt | ||
|
||
```bash | ||
npm install pinia @pinia/nuxt @vue-dapp/core @vue-dapp/nuxt @vue-dapp/modal | ||
``` | ||
|
||
```ts | ||
modules: ['@pinia/nuxt', '@vue-dapp/nuxt'] | ||
``` | ||
|
||
## Add Connectors | ||
|
||
```bash | ||
npm install @vue-dapp/walletconnect | ||
``` | ||
|
||
```bash | ||
npm install @vue-dapp/coinbase | ||
``` | ||
|
||
```ts | ||
import { BrowserWalletConnector, useVueDapp } from '@vue-dapp/core' | ||
import { WalletConnectConnector } from '@vue-dapp/walletconnect' | ||
import { CoinbaseWalletConnector } from '@vue-dapp/coinbase' | ||
|
||
const { addConnectors } = useVueDapp() | ||
|
||
addConnectors([ | ||
new BrowserWalletConnector(), | ||
new WalletConnectConnector({ | ||
projectId: 'd1e65611568666138126d315c0bafd7d', | ||
chains: [1], | ||
showQrModal: true, | ||
qrModalOptions: { | ||
themeMode: 'light', | ||
themeVariables: undefined, | ||
desktopWallets: undefined, | ||
walletImages: undefined, | ||
mobileWallets: undefined, | ||
enableExplorer: true, | ||
privacyPolicyUrl: undefined, | ||
termsOfServiceUrl: undefined, | ||
}, | ||
}), | ||
new CoinbaseWalletConnector({ | ||
appName: 'Vue Dapp', | ||
jsonRpcUrl: 'https://ethereum-rpc.publicnode.com' | ||
}), | ||
]) | ||
``` | ||
|
||
<!-- ## Integrate with Ethers.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