Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/hosted-git-info-2.8.9
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrouid authored Jan 7, 2022
2 parents 84fc169 + 043bc68 commit f068f57
Show file tree
Hide file tree
Showing 38 changed files with 53,472 additions and 3,056 deletions.
37 changes: 33 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A single Web3 / Ethereum provider solution for all Wallets

Web3Modal is an easy-to-use library to help developers add support for multiple providers in their apps with a simple customizable configuration.

By default Web3Modal Library supports injected providers like (**Metamask**, **Dapper**, **Gnosis Safe**, **Frame**, Web3 Browsers, etc) and **WalletConnect**, You can also easily configure the library to support **Portis**, **Fortmatic**, **Squarelink**, **Torus**, **Authereum**, **D'CENT Wallet** and **Arkane**.
By default Web3Modal Library supports injected providers like (**Metamask**, **Dapper**, **Gnosis Safe**, **Frame**, Web3 Browsers, etc) and **WalletConnect**, You can also easily configure the library to support **Portis**, **Fortmatic**, **Squarelink**, **Torus**, **Authereum**, **D'CENT Wallet** and **Venly**.

## Preview

Expand All @@ -28,6 +28,10 @@ _Open a PR to add your project to the list!_
- [Dapparatus](https://github.com/austintgriffith/dapparatus/)
- [Totle Swap](https://swap.totle.com/)
- [Win Or Lose](https://www.winorlose.live/)
- [HODLbag NFT](https://hodlbag.org/)
- [Forever in Ether](https://ineth.net/)
- [Civilization](https://app.civfund.org/)
- [OlympusDAO](https://app.olympusdao.finance/)
- etc

## Related Efforts
Expand Down Expand Up @@ -73,6 +77,29 @@ const provider = await web3Modal.connect();
const web3 = new Web3(provider);
```

## Using with [ethers.js](https://github.com/ethers-io/ethers.js/)

```
import { ethers } from "ethers";
import Web3Modal from "web3modal";
const providerOptions = {
/* See Provider Options Section */
};
const web3Modal = new Web3Modal({
network: "mainnet", // optional
cacheProvider: true, // optional
providerOptions // required
});
const instance = await web3Modal.connect();
const provider = new ethers.providers.Web3Provider(instance);
const signer = provider.getSigner();
```


## Using in vanilla JavaScript

You can use the modal from the old fashioned web page JavaScript as well.
Expand Down Expand Up @@ -138,10 +165,12 @@ These are all the providers available with Web3Modal and how to configure their
- [Authereum](./docs/providers/authereum.md)
- [Frame](./docs/providers/frame.md)
- [Bitski](./docs/providers/bitski.md)
- [Arkane](./docs/providers/arkane.md)
- [Venly](./docs/providers/venly.md)
- [DCent](./docs/providers/dcent.md)
- [BurnerConnect](./docs/providers/burnerconnect.md)
- [MEWConnect](./docs/providers/mewconnect.md)
- [Binance Chain Wallet](./docs/providers/binancechainwallet.md)
- [WalletLink](./docs/providers/walletlink.md)

## API

Expand Down Expand Up @@ -300,15 +329,15 @@ const providerOptions = {
logo: "data:image/gif;base64,INSERT_BASE64_STRING",
name: "Example Provider",
description: "Connect to your example provider account"
}
},
package: ExampleProvider,
options: {
apiKey: "EXAMPLE_PROVIDER_API_KEY"
},
connector: async (ProviderPackage, options) => {
const provider = new ProviderPackage(options);

await provider.enable()
await provider.enable();

return provider;
}
Expand Down
26 changes: 0 additions & 26 deletions docs/providers/arkane.md

This file was deleted.

11 changes: 11 additions & 0 deletions docs/providers/binancechainwallet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Binance Chain Wallet

1. Set Provider Options

```typescript
const providerOptions = {
binancechainwallet: {
package: true
}
};
```
9 changes: 8 additions & 1 deletion docs/providers/fortmatic.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,18 @@ yarn add fortmatic
```typescript
import Fortmatic from "fortmatic";

// Example for Polygon/Matic:
const customNetworkOptions = {
rpcUrl: 'https://rpc-mainnet.maticvigil.com',
chainId: 137
}

const providerOptions = {
fortmatic: {
package: Fortmatic, // required
options: {
key: "FORTMATIC_KEY" // required
key: "FORTMATIC_KEY" // required,
network: customNetworkOptions // if we don't pass it, it will default to localhost:8454
}
}
};
Expand Down
26 changes: 26 additions & 0 deletions docs/providers/venly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Venly (Previously Arkane Network)

1. Install Provider Package

```bash
npm install --save @venly/web3-provider

# OR

yarn add @venly/web3-provider
```

2. Set Provider Options

```typescript
import Venly from "@venly/web3-provider";

const providerOptions = {
venly: {
package: Venly, // required
options: {
clientId: "VENLY_CLIENT_ID" // required
}
}
};
```
33 changes: 33 additions & 0 deletions docs/providers/walletlink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# WalletLink

1. Install Provider Package

```bash
npm install --save walletlink

# OR

yarn add walletlink
```

2. Set Provider Options

```typescript
import WalletLink from "walletlink";

const providerOptions = {
walletlink: {
package: WalletLink, // Required
options: {
infuraId: "INFURA_ID", // Required unless you provide a JSON RPC url; see `rpc` below
rpc: "", // Optional if `infuraId` is provided; otherwise it's required
chainId: 1, // Optional. It defaults to 1 if not provided
appName: "My Awesome App", // Required
appLogoUrl: null, // Optional. Application logo image URL. favicon is used if unspecified
darkMode: false // Optional. Use dark theme, defaults to false
}
}
};
```

[For more information on WalletLink Web3 provider](https://github.com/walletlink/walletlink).
Loading

0 comments on commit f068f57

Please sign in to comment.