@web3-onboard/vue
Advanced tools
Comparing version 2.7.12 to 2.7.13-alpha.1
{ | ||
"name": "@web3-onboard/vue", | ||
"version": "2.7.12", | ||
"version": "2.7.13-alpha.1", | ||
"description": "A collection of Vue Composables for integrating Web3-Onboard in to a Vue or Nuxt project. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", | ||
@@ -33,3 +33,2 @@ "keywords": [ | ||
"Injected Wallet", | ||
"GameStop", | ||
"Crypto", | ||
@@ -67,3 +66,3 @@ "Crypto Wallet" | ||
"@web3-onboard/common": "^2.3.3", | ||
"@web3-onboard/core": "^2.21.2", | ||
"@web3-onboard/core": "^2.21.3-alpha.1", | ||
"vue-demi": "^0.12.4" | ||
@@ -70,0 +69,0 @@ }, |
153
README.md
@@ -49,4 +49,3 @@ <a href="https://onboard.blocknative.com/"> | ||
const { wallets, connectWallet, disconnectConnectedWallet, connectedWallet } = | ||
useOnboard() | ||
const { wallets, connectWallet, disconnectConnectedWallet, connectedWallet } = useOnboard() | ||
@@ -101,7 +100,9 @@ if (connectedWallet) { | ||
import { useOnboard } from '@web3-onboard/vue' | ||
// Use the composable | ||
const onboard = useOnboard() | ||
// Or destructure it | ||
const { wallets, connectWallet, disconnectConnectedWallet, connectedWallet } = | ||
useOnboard() | ||
const { wallets, connectWallet, disconnectConnectedWallet, connectedWallet } = useOnboard() | ||
// do stuff | ||
@@ -117,11 +118,6 @@ ``` | ||
```vue | ||
<script> | ||
<script setup> | ||
import { useOnboard } from '@web3-onboard/vue' | ||
export default { | ||
setup() { | ||
const { connectWallet } = useOnboard() | ||
const connect = async () => connectWallet() | ||
return { connect } | ||
} | ||
} | ||
const { connectWallet: connect } = useOnboard() | ||
</script> | ||
@@ -141,10 +137,6 @@ | ||
```vue | ||
<script> | ||
<script setup> | ||
import { useOnboard } from '@web3-onboard/vue' | ||
export default { | ||
setup() { | ||
const { connectedChain } = useOnboard() | ||
return { connectedChain } | ||
} | ||
} | ||
const { connectedChain } = useOnboard() | ||
</script> | ||
@@ -164,10 +156,6 @@ | ||
```vue | ||
<script> | ||
<script setup> | ||
import { useOnboard } from '@web3-onboard/vue' | ||
export default { | ||
setup() { | ||
const { connectedWallet } = useOnboard() | ||
return { connectedWallet } | ||
} | ||
} | ||
const { connectedWallet } = useOnboard() | ||
</script> | ||
@@ -187,10 +175,6 @@ | ||
```vue | ||
<script> | ||
<script setup> | ||
import { useOnboard } from '@web3-onboard/vue' | ||
export default { | ||
setup() { | ||
const { connectingWallet } = useOnboard() | ||
return { connectingWallet } | ||
} | ||
} | ||
const { connectingWallet } = useOnboard() | ||
</script> | ||
@@ -210,11 +194,7 @@ | ||
```vue | ||
<script> | ||
<script setup> | ||
import { useOnboard } from '@web3-onboard/vue' | ||
export default { | ||
setup() { | ||
const { disconnectWallet } = useOnboard() | ||
const disconnect = async () => disconnectWallet('MetaMask') | ||
return { disconnect } | ||
} | ||
} | ||
const { disconnectWallet } = useOnboard() | ||
const disconnect = async () => disconnectWallet('MetaMask') | ||
</script> | ||
@@ -234,10 +214,6 @@ | ||
```vue | ||
<script> | ||
<script setup> | ||
import { useOnboard } from '@web3-onboard/vue' | ||
export default { | ||
setup() { | ||
const { disconnectConnectedWallet } = useOnboard() | ||
return { disconnectConnectedWallet } | ||
} | ||
} | ||
const { disconnectConnectedWallet } = useOnboard() | ||
</script> | ||
@@ -259,10 +235,6 @@ | ||
```vue | ||
<script> | ||
<script setup> | ||
import { useOnboard } from '@web3-onboard/vue' | ||
export default { | ||
setup() { | ||
const { getChain } = useOnboard() | ||
return { getChain } | ||
} | ||
} | ||
const { getChain } = useOnboard() | ||
</script> | ||
@@ -282,11 +254,7 @@ | ||
```vue | ||
<script> | ||
<script setup> | ||
import { useOnboard } from '@web3-onboard/vue' | ||
export default { | ||
setup() { | ||
const { setChain } = useOnboard() | ||
const set = () => setChain({ wallet: 'MetaMask', chainId: '0x1' }) | ||
return { set } | ||
} | ||
} | ||
const { setChain } = useOnboard() | ||
const set = () => setChain({ wallet: 'MetaMask', chainId: '0x1' }) | ||
</script> | ||
@@ -306,10 +274,6 @@ | ||
```vue | ||
<script> | ||
<script setup> | ||
import { useOnboard } from '@web3-onboard/vue' | ||
export default { | ||
setup() { | ||
const { settingChain } = useOnboard() | ||
return { settingChain } | ||
} | ||
} | ||
const { settingChain } = useOnboard() | ||
</script> | ||
@@ -329,10 +293,13 @@ | ||
```vue | ||
<script> | ||
<script setup> | ||
import { useOnboard } from '@web3-onboard/vue' | ||
export default { | ||
setup() { | ||
const { wallets } = useOnboard() | ||
return { wallets } | ||
} | ||
} | ||
const { wallets } = useOnboard() | ||
</script> | ||
<template> | ||
<div v-for="wallet in wallets"> | ||
<span>Label: {{ wallet.label }}</span> | ||
</div> | ||
</template> | ||
``` | ||
@@ -342,22 +309,15 @@ | ||
Readonly ref that contains every wallet that user connected to in the past; useful to reconnect wallets automatically after a reload | ||
Readonly ref that contains every wallet that user connected to in the past, useful to reconnect wallets automatically after a reload | ||
### Example usage | ||
``` | ||
vue | ||
<script> | ||
```vue | ||
<script setup> | ||
import { useOnboard } from '@web3-onboard/vue' | ||
export default { | ||
setup() { | ||
const { alreadyConnectedWallets } = useOnboard() | ||
return { alreadyConnectedWallets } | ||
} | ||
} | ||
const { alreadyConnectedWallets } = useOnboard() | ||
</script> | ||
<template> | ||
<div v-for="wallet in wallets"> | ||
<span>Label: {{wallet.label}}</span> | ||
</div> | ||
<span>{{ alreadyConnectedWallets }}</span> | ||
</template> | ||
@@ -372,12 +332,7 @@ ``` | ||
``` | ||
vue | ||
<script> | ||
```vue | ||
<script setup> | ||
import { useOnboard } from '@web3-onboard/vue' | ||
export default { | ||
setup() { | ||
const { lastConnectedTimestamp } = useOnboard() | ||
return { lastConnectedTimestamp } | ||
} | ||
} | ||
const { lastConnectedTimestamp } = useOnboard() | ||
</script> | ||
@@ -384,0 +339,0 @@ |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
13987
1
330