# @openzeppelin/gsn-provider

> Web3 provider for GSN

Latest version **0.1.11** (published 2020-08-05) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @openzeppelin/gsn-provider
pnpm add @openzeppelin/gsn-provider
yarn add @openzeppelin/gsn-provider
bun add @openzeppelin/gsn-provider
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.11 |
| Published | 2020-08-05 |
| First published | 2019-08-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 76.9 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 38 |
| Author | santiago@openzeppelin.com |
| Maintainers | frangio, jcarpanelli, nventuro, spalladino, ylv.io |

## Links

- npm: https://www.npmjs.com/package/@openzeppelin/gsn-provider
- Repository: https://github.com/OpenZeppelin/openzeppelin-gsn-provider
- Homepage: https://github.com/OpenZeppelin/openzeppelin-gsn-provider#readme
- Issues: https://github.com/OpenZeppelin/openzeppelin-gsn-provider/issues
- npm.io page: https://npm.io/package/@openzeppelin/gsn-provider

## Dependencies (11)

- [web3](https://npm.io/package/web3.md) ^1.2.1
- [axios](https://npm.io/package/axios.md) ^0.19.0
- [eth-crypto](https://npm.io/package/eth-crypto.md) ^1.3.4
- [web3-utils](https://npm.io/package/web3-utils.md) ^1.2.1
- [abi-decoder](https://npm.io/package/abi-decoder.md) ^2.1.0
- [bignumber.js](https://npm.io/package/bignumber.js.md) ^9.0.0
- [eth-sig-util](https://npm.io/package/eth-sig-util.md) ^2.3.0
- [web3-eth-abi](https://npm.io/package/web3-eth-abi.md) ^1.2.1
- [ethereumjs-tx](https://npm.io/package/ethereumjs-tx.md) ^1.3.7
- [ethereumjs-util](https://npm.io/package/ethereumjs-util.md) ^6.1.0
- [ethereumjs-wallet](https://npm.io/package/ethereumjs-wallet.md) ^0.6.3

## Recent versions

- 0.1.11 (latest) — 2020-08-05
- 0.1.10 — 2020-03-10
- 0.1.9 — 2019-10-22
- 0.1.8 — 2019-09-25
- 0.1.7 — 2019-09-17
- 0.1.6 — 2019-08-12
- 0.1.5 — 2019-08-12
- 0.1.4 — 2019-08-09
- 0.1.3 — 2019-08-06
- 0.1.2 — 2019-08-05
- 0.1.1 — 2019-08-02
- 0.1.0 — 2019-08-02

## README

:warning: This project is **deprecated**. All development on the GSN has been moved to the [OpenGSN](https://github.com/opengsn) organization. Please refer to the [OpenGSN provider implementation](https://github.com/opengsn/gsn/tree/master/src/relayclient) (GSNv1 version [here](https://github.com/opengsn/gsn/tree/GSNv1/src/js/relayclient)). We won't be developing new features nor addressing issues. Read [here](https://forum.openzeppelin.com/t/doubling-down-in-security/2712) for more info.

# OpenZeppelin GSN Provider

[![NPM Package](https://img.shields.io/npm/v/@openzeppelin/gsn-provider.svg)](https://www.npmjs.org/package/@openzeppelin/gsn-provider)
[![Build Status](https://circleci.com/gh/OpenZeppelin/openzeppelin-gsn-provider.svg?style=shield)](https://circleci.com/gh/OpenZeppelin/openzeppelin-gsn-provider)

# GSN Provider

**A web3.js compatible provider for sending transactions via the Gas Station Network (GSN)**. This package wraps a modified version of the [`RelayClient`](https://github.com/tabookey/tabookey-gasless/blob/master/src/js/relayclient/RelayClient.js) from `tabookey-gasless` with a custom web3 Provider.

## Overview

### Installation

```console
$ npm install @openzeppelin/gsn-provider
```

### Usage

Create a `GSNProvider` and use it as the provider for your web3 instance:

```javascript
const Web3 = require("web3");
const { GSNProvider } = require("@openzeppelin/gsn-provider");

const web3 = new Web3(new GSNProvider("http://localhost:8545"));
```

Transactions sent to contracts will then be automatically routed through the GSN:

```javascript
const myContract = new web3.eth.Contract(abi, address);

// Sends the transaction via the GSN
await myContract.methods.myFunction().send({ from });

// Disable GSN for a specific transaction
await myContract.methods.myFunction().send({ from, useGSN: false });
```

## Learn More

* Check out [Getting Started](https://docs.openzeppelin.com/gsn-provider/getting-started) to use GSN Provider in a new project.
* The [Testing GSN Applications](https://docs.openzeppelin.com/gsn-provider/testing-gsn-applications) will teach you how to test your project locally.
* For detailed usage information, take a look at the [API Reference](https://docs.openzeppelin.com/gsn-provider/api).


## License

Released under the MIT License.

---
_Source: https://npm.io/package/@openzeppelin/gsn-provider · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
