Skip to content

Commit

Permalink
Multiprovider (#7)
Browse files Browse the repository at this point in the history
* v9.7.1: adds Entrypoints do documentation

* multiprovider

* remove console.logs

* multiprovider: pick fastest succeful provider upon intitialization

* v9.8.0: multiprovider + evm entry point fixes

* v10.0.0: async getProvider
  • Loading branch information
10xSebastian authored Oct 17, 2022
1 parent ce7ae92 commit 355930e
Show file tree
Hide file tree
Showing 48 changed files with 1,745 additions and 905 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@ request('ethereum://0x7a250d5630b4cf539739df2c5dacb4c659f2488d/getAmountsOut', {
}).then((value)=>console.log(value))
```

## Platform specific packaging

In case you want to use and package only specific platforms, use platform specific entrypoints:

```javascript
import { request } from '@depay/web3-client/index.evm'
```

## Support

This library supports the following blockchains:
Expand All @@ -48,6 +40,14 @@ This library supports the following blockchains:
- [Polygon](https://polygon.technology)
- [Solana](https://solana.com)

## Platform specific packaging

In case you want to use and package only specific platforms, use platform specific entrypoints:

```javascript
import { request } from '@depay/web3-client/dist/umd/index.evm'
```

## Functionalities

### request
Expand Down Expand Up @@ -311,11 +311,13 @@ setProvider('ethereum', provider)
In order to mock requests with [web3-mock](https://github.com/DePayFi/web3-mock) you need to fetch `@depay/web3-client` provider and pass it to `web3-mock`:

```javascript
import { provider } from '@depay/web3-client'
import { getProvider } from '@depay/web3-client'
import { mock } from '@depay/web3-mock'

const provider = await getProvider('ethereum')

mock({
provider: provider('ethereum'),
provider,
blockchain: 'ethereum'
})

Expand Down
Loading

0 comments on commit 355930e

Please sign in to comment.