@davidzwfu/wagmi-connector
v2.0.0-develop.7
Published
Venly integration for wagmi
Downloads
65
Readme
@venly/wagmi-connector
Venly connector for wagmi
Setup (wagmi v2)
Install version 2.x of @venly/wagmi-connector
npm i @venly/wagmi-connector@latest
Configure your desired chains and Venly options
import { createConfig } from 'wagmi'
import { mainnet, sepolia } from 'wagmi/chains'
import { venly } from '@venly/wagmi-connector'
const config = createConfig({
chains: [mainnet, sepolia],
connectors: [
venly({
clientId: 'YOUR_CLIENT_ID', // https://docs.venly.io/widget/deep-dive/authentication#client-id
environment: 'sandbox', // optional, defaults to production
}),
],
// other options...
})
Setup (wagmi v1)
Install version 1.x of @venly/wagmi-connector
npm i @venly/wagmi-connector@1
Configure your desired chains and VenlyConnector options
import { createConfig, configureChains, mainnet } from 'wagmi'
import { publicProvider } from 'wagmi/providers/public'
import { VenlyConnector } from '@venly/wagmi-connector'
const { chains, publicClient } = configureChains(
[mainnet],
[publicProvider()],
)
const config = createConfig({
connectors: [
new VenlyConnector({
chains,
options: {
clientId: 'YOUR_CLIENT_ID', // https://docs.venly.io/widget/deep-dive/authentication#client-id
environment: 'sandbox', // optional, defaults to production
},
}),
],
publicClient,
autoConnect: true,
})
Setup (wagmi v0)
Install version 0.x of @venly/wagmi-connector
npm i @venly/[email protected]
Configure your desired chains and VenlyConnector options
import { configureChains, createClient } from 'wagmi'
import { goerli, mainnet } from 'wagmi/chains'
import { publicProvider } from 'wagmi/providers/public'
import { VenlyConnector } from '@venly/wagmi-connector'
const { chains, provider } = configureChains(
[goerli, mainnet],
[publicProvider()],
)
export const client = createClient({
connectors: [
new VenlyConnector({
chains,
options: {
clientId: 'YOUR_CLIENT_ID', // https://docs.venly.io/widget/deep-dive/authentication#client-id
environment: 'sandbox', // optional, defaults to production
},
}),
],
provider,
autoConnect: true,
})
What is Venly Wallet
Not sure yet what Venly is all about? Be sure to check out our website: https://www.venly.io/