Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1193: Remove unnecessary EIP dependencies #2620

Merged
merged 5 commits into from
Apr 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions EIPS/eip-1193.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ review-period-end: 2020-06-04
type: Standards Track
category: Interface
created: 2018-06-30
requires: 155, 695, 1102, 1474, 1767
requires: 155, 695
---

## Summary

This EIP formalizes a JavaScript Ethereum Provider API for consistency across clients and applications.

The Provider's interface is designed to be minimal, preferring that features are introduced in the API layer (e.g. see [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102)), and agnostic of transport and RPC protocols.
The Provider's interface is designed to be minimal, preferring that features are introduced in the API layer (see e.g. [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102)), and agnostic of transport and RPC protocols.

Historically, Providers have been made available as `window.ethereum` in web browsers, but this convention is not part of the specification.

Expand Down Expand Up @@ -50,11 +50,10 @@ You can find a list of common methods [here](https://eips.ethereum.org/EIPS/eip-

#### RPC Protocols

Multiple RPC protocols may be available.
Multiple RPC protocols may be available. For examples, see:

[EIP 1474](https://eips.ethereum.org/EIPS/eip-1474) specifies the Ethereum JSON-RPC API.

[EIP 1767](https://eips.ethereum.org/EIPS/eip-1767) specifies the Ethereum GraphQL schema.
- [EIP 1474](https://eips.ethereum.org/EIPS/eip-1474), the Ethereum JSON-RPC API
- [EIP 1767](https://eips.ethereum.org/EIPS/eip-1767), the Ethereum GraphQL schema

### sendAsync (DEPRECATED)

Expand All @@ -67,7 +66,7 @@ Provider.sendAsync(request: Object, callback: Function): void;
```

The interfaces of request and response objects are not specified here.
Historically, they have followed the [Ethereum JSON-RPC specification](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1474.md).
Historically, they have followed the [Ethereum JSON-RPC specification](https://eips.ethereum.org/EIPS/eip-1474).

### send (DEPRECATED)

Expand Down Expand Up @@ -346,9 +345,9 @@ The returned Promise **MUST** reject if any of the following conditions are met:

- The client returns an error for the RPC request.
- If the error returned from the client is compatible with the `ProviderRpcError` interface, the Promise **MAY** reject with that error directly.
- The Provider encounters an fails for any reason.
- The request requires access to an unauthorized account, per [EIP 1102](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1102.md).
- If rejecting for this reason, the Promise rejection error `code` **MUST** be `4100`.
- The Provider encounters an error or fails to process the request for any reason.

> If the Provider implements any kind of authorization logic, the authors recommend rejecting with a `4100` error in case of authorization failures.

The returned Promise **SHOULD** reject if any of the following conditions are met:

Expand All @@ -369,7 +368,7 @@ Providers **MAY** support whatever RPC methods required to fulfill their purpose

If a Provider supports a method defined in a finalized EIP, the Provider's implementation of this method **MUST** adhere to the method's specification.

If an RPC method defined in a finalized EIP is not supported, it **SHOULD** be rejected with an appropriate error per [EIP 1474](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1474.md#error-codes).
If an RPC method defined in a finalized EIP is not supported, it **SHOULD** be rejected with a `4200` error per the [Provider Errors](#provider-errors) section below, or an appropriate error per the RPC method's specification.

#### RPC Errors

Expand All @@ -396,7 +395,7 @@ interface ProviderRpcError extends Error {

1. The errors in the [Provider Errors](#provider-errors) section below

2. The [Ethereum JSON-RPC API error codes](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1474.md#error-codes)
2. Any errors mandated by the erroring RPC method's specification

3. The [`CloseEvent` status codes](https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent#Status_codes)

Expand Down Expand Up @@ -488,6 +487,10 @@ The "accounts available to the Provider" change when the return value of `eth_ac
- [Initial discussion in `ethereum/interfaces`](https://github.com/ethereum/interfaces/issues/16)
- [Ethereum Magicians thread](https://ethereum-magicians.org/t/eip-1193-ethereum-provider-javascript-api/640)
- [Continuing EIP-1193 discussion](https://github.com/ethereum/EIPs/issues/2319)
- Related EIPs
- [EIP 1102](https://eips.ethereum.org/EIPS/eip-1102)
- [EIP 1474](https://eips.ethereum.org/EIPS/eip-1474)
- [EIP 1767](https://eips.ethereum.org/EIPS/eip-1767)

## Copyright

Expand Down