Skip to content

Commit 04af459

Browse files
committed
updated useFetchBalance and changed the ref to reactive in the data;
added a custom provider and "enableCustomProvider" in general options;
1 parent fd92177 commit 04af459

24 files changed

+529
-347
lines changed

README.md

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Simple WalletConnect v2 integration package for Vue3 apps.
1212
- [Getting started](#getting-started)
1313
- [Installation](#installation)
1414
- [Setup](#setup)
15+
- [Configure](#configure)
16+
- [Custom chain](#custom-chain)
1517
- [Usage](#usage)
1618
- [Basic usage](#basic-usage)
1719
- [Connect wallet button](#connect-wallet-button)
@@ -52,6 +54,8 @@ yarn add @kolirt/vue-web3-auth
5254

5355
## Setup
5456

57+
### Configure
58+
5559
Add dependencies to your `main.js`:
5660

5761
```javascript
@@ -72,6 +76,48 @@ app.use(createWeb3Auth({
7276
app.mount('#app')
7377
```
7478

79+
### Custom chain
80+
```ts
81+
import {Chain} from '@kolirt/vue-web3-auth'
82+
83+
const bsc: Chain = {
84+
id: 56,
85+
name: 'BNB Smart Chain',
86+
network: 'bsc',
87+
nativeCurrency: {
88+
decimals: 18,
89+
name: 'BNB',
90+
symbol: 'BNB',
91+
},
92+
rpcUrls: {
93+
default: {
94+
http: ['https://rpc.ankr.com/bsc'],
95+
webSocket: ['wss://bsc-ws-node.nariox.org:443']
96+
},
97+
public: {
98+
http: ['https://rpc.ankr.com/bsc'],
99+
webSocket: ['wss://bsc-ws-node.nariox.org:443']
100+
},
101+
},
102+
blockExplorers: {
103+
etherscan: {
104+
name: 'BscScan',
105+
url: 'https://bscscan.com',
106+
},
107+
default: {
108+
name: 'BscScan',
109+
url: 'https://bscscan.com',
110+
},
111+
},
112+
contracts: {
113+
multicall3: {
114+
address: '0xca11bde05977b3631167028862be2a173976ca11',
115+
blockCreated: 15921452,
116+
},
117+
},
118+
}
119+
```
120+
75121
# Usage
76122

77123
## Basic usage
@@ -282,8 +328,6 @@ let data = await writeContract({
282328

283329
### WatchContractEvent
284330

285-
The function works on the basis of pooling, not on the websockets
286-
287331
```js
288332
import {erc20ABI, watchContractEvent} from '@kolirt/vue-web3-auth'
289333

demo/assets/animate.es-6d19ee53.js

Lines changed: 43 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/assets/index-3edfc4b2.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/assets/index-43a7d73c.js

Lines changed: 37 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/assets/index-66dd5953.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/assets/index-91bf752d.js

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/assets/index-c3bb6768.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)