This repository has been archived by the owner on Sep 6, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add connectors package * chore: add test script * chore: changeset * chore: add proxy pkgs * fix: rpc urls * chore: mark @wagmi/core as optional peer * chore: @wagmi/core 0.8 * chore: add readme * feat: dev script * chore: connectors requirements * docs: update contributing * chore: contributing update * chore: "Connectors" Co-authored-by: awkweb <tom@meagher.co> * chore: rename repo dir Co-authored-by: awkweb <tom@meagher.co> Co-authored-by: Tom Meagher <tom@meagher.co>
- Loading branch information
Showing
35 changed files
with
3,882 additions
and
58 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@wagmi/connectors': minor | ||
--- | ||
|
||
Initial release of the `@wagmi/connectors` package – a collection of Connectors for wagmi. |
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
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
Empty file.
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,58 @@ | ||
# `@wagmi/connectors` | ||
|
||
Collection of connectors for wagmi. | ||
|
||
## Installation | ||
|
||
Install the `@wagmi/connectors` package. | ||
|
||
``` | ||
npm i @wagmi/connectors | ||
``` | ||
|
||
## Usage | ||
|
||
Configure your wagmi client with connectors! | ||
|
||
```tsx | ||
import { configureChains, createClient } from 'wagmi' | ||
|
||
import { InjectedConnector } from '@wagmi/connectors/injected' | ||
import { CoinbaseWalletConnector } from '@wagmi/connectors/coinbaseWallet' | ||
import { WalletConnectConnector } from '@wagmi/connectors/walletConnect' | ||
|
||
const { chains, provider } = configureChains(...) | ||
|
||
const client = createClient({ | ||
connectors: [ | ||
new CoinbaseWalletConnector({ | ||
chains, | ||
options: { | ||
appName: 'wagmi', | ||
}, | ||
}), | ||
new WalletConnectConnector({ | ||
chains, | ||
options: { | ||
qrcode: true, | ||
}, | ||
}), | ||
new InjectedConnector({ chains }), | ||
], | ||
provider, | ||
}) | ||
``` | ||
|
||
> If your bundler supports tree-shaking (most likely), only the used connectors will be included in the bundle, so you don't have to worry about bundle size. 😊 | ||
## Connectors | ||
|
||
- [`InjectedConnector`](/packages/connectors/src/injected.ts) | ||
- [`CoinbaseWalletConnector`](/packages/connectors/src/coinbaseWallet.ts) | ||
- [`MetaMaskConnector`](/packages/connectors/src/metaMask.ts) | ||
- [`MockConnector`](/packages/connectors/src/mock.ts) | ||
- [`WalletConnectConnector`](/packages/connectors/src/walletConnect.ts) | ||
|
||
## Contributing | ||
|
||
Want to add another chain to the list? Make sure you read the [contributing guide](../../.github/CONTRIBUTING.md) first. |
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,4 @@ | ||
{ | ||
"type": "module", | ||
"main": "../dist/coinbaseWallet.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"type": "module", | ||
"main": "../dist/injected.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"type": "module", | ||
"main": "../dist/metaMask.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"type": "module", | ||
"main": "../dist/mock/index.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
{ | ||
"name": "@wagmi/connectors", | ||
"description": "A collection of connectors for wagmi", | ||
"license": "MIT", | ||
"version": "0.0.0", | ||
"scripts": { | ||
"build": "tsup", | ||
"dev": "DEV=true tsup" | ||
}, | ||
"peerDependencies": { | ||
"@wagmi/core": "0.8.x", | ||
"ethers": "^5.0.0" | ||
}, | ||
"peerDependenciesMeta": { | ||
"@wagmi/core": { | ||
"optional": true | ||
} | ||
}, | ||
"dependencies": { | ||
"@coinbase/wallet-sdk": "^3.5.4", | ||
"@walletconnect/ethereum-provider": "^1.8.0", | ||
"abitype": "^0.1.8", | ||
"eventemitter3": "^4.0.7" | ||
}, | ||
"devDependencies": { | ||
"@wagmi/core": "^0.8.0", | ||
"ethers": "^5.7.2" | ||
}, | ||
"type": "module", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.js" | ||
}, | ||
"./coinbaseWallet": { | ||
"types": "./dist/coinbaseWallet.d.ts", | ||
"default": "./dist/coinbaseWallet.js" | ||
}, | ||
"./injected": { | ||
"types": "./dist/injected.d.ts", | ||
"default": "./dist/injected.js" | ||
}, | ||
"./metaMask": { | ||
"types": "./dist/metaMask.d.ts", | ||
"default": "./dist/metaMask.js" | ||
}, | ||
"./mock": { | ||
"types": "./dist/mock/index.d.ts", | ||
"default": "./dist/mock/index.js" | ||
}, | ||
"./walletConnect": { | ||
"types": "./dist/walletConnect.d.ts", | ||
"default": "./dist/walletConnect.js" | ||
} | ||
}, | ||
"files": [ | ||
"/coinbaseWallet", | ||
"/dist", | ||
"/injected", | ||
"/metaMask", | ||
"/mock", | ||
"/walletConnect" | ||
], | ||
"sideEffects": false, | ||
"contributors": [ | ||
"awkweb.eth <t@wagmi.sh>", | ||
"jxom.eth <j@wagmi.sh>" | ||
], | ||
"homepage": "https://wagmi.sh", | ||
"ethereum": "wagmi-dev.eth", | ||
"funding": [ | ||
{ | ||
"type": "gitcoin", | ||
"url": "https://gitcoin.co/grants/4493/wagmi-react-hooks-library-for-ethereum" | ||
}, | ||
{ | ||
"type": "github", | ||
"url": "https://github.com/sponsors/wagmi-dev" | ||
} | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/wagmi-dev/references.git", | ||
"directory": "packages/connectors" | ||
}, | ||
"keywords": [ | ||
"react", | ||
"hooks", | ||
"eth", | ||
"ethereum", | ||
"dapps", | ||
"wallet", | ||
"web3", | ||
"abi" | ||
] | ||
} |
Oops, something went wrong.