@depay/web3-wallets-evm 13.1.2 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -1
- package/dist/esm/index.evm.js +59988 -219
- package/dist/esm/index.js +348 -74
- package/dist/umd/index.evm.js +59979 -210
- package/dist/umd/index.js +351 -78
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -82,7 +82,7 @@ let wallets = getWallets();
|
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
```javascript
|
|
85
|
-
{ getWallets, wallets } from "@depay/web3-wallets"
|
|
85
|
+
import { getWallets, wallets } from "@depay/web3-wallets"
|
|
86
86
|
|
|
87
87
|
let foundWallets = getWallets()
|
|
88
88
|
|
|
@@ -108,6 +108,29 @@ let wallets = await getConnectedWallets();
|
|
|
108
108
|
// [<Wallet name='MetaMask'>, <Wallet name='Phantom'>]
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
+
### WalletConnectV2
|
|
112
|
+
|
|
113
|
+
```javascript
|
|
114
|
+
import { wallets } from "@depay/web3-wallets"
|
|
115
|
+
import QRCodeStyling from "qr-code-styling"
|
|
116
|
+
|
|
117
|
+
let wallet = new wallets.WalletConnectV2()
|
|
118
|
+
|
|
119
|
+
await wallet.connect({
|
|
120
|
+
blockchain: 'ethereum',
|
|
121
|
+
connect: ({ uri })=>{
|
|
122
|
+
const qrCode = new QRCodeStyling({
|
|
123
|
+
width: 300,
|
|
124
|
+
height: 300,
|
|
125
|
+
type: "svg",
|
|
126
|
+
data: uri,
|
|
127
|
+
});
|
|
128
|
+
qrCode.append(document.getElementById("walletConnectQRCode"));
|
|
129
|
+
}
|
|
130
|
+
})
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
|
|
111
134
|
### Name
|
|
112
135
|
|
|
113
136
|
`name:string`: Returns the name of the wallet.
|